From 1ef2080364b835b30228dd453778a9994bcc2e26 Mon Sep 17 00:00:00 2001 From: Jack OConnor Date: Sat, 10 Oct 2015 18:57:13 -0700 Subject: [PATCH] updated version to v6.3.0 --- build/js/intlTelInput.js | 4 ++-- build/js/intlTelInput.min.js | 4 ++-- intl-tel-input.jquery.json | 2 +- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/js/intlTelInput.js b/build/js/intlTelInput.js index 1a6a68bed..3f18e8dee 100644 --- a/build/js/intlTelInput.js +++ b/build/js/intlTelInput.js @@ -1,5 +1,5 @@ /* -International Telephone Input v6.2.2 +International Telephone Input v6.3.0 https://github.com/Bluefieldscom/intl-tel-input.git */ // wrap in UMD - see https://github.com/umdjs/umd/blob/master/jqueryPluginCommonjs.js @@ -1163,7 +1163,7 @@ https://github.com/Bluefieldscom/intl-tel-input.git $.fn[pluginName].getCountryData = function() { return allCountries; }; - $.fn[pluginName].version = "6.2.2"; + $.fn[pluginName].version = "6.3.0"; // Tell JSHint to ignore this warning: "character may get silently deleted by one or more browsers" // jshint -W100 // Array of country objects for the flag dropdown. diff --git a/build/js/intlTelInput.min.js b/build/js/intlTelInput.min.js index c20f89c6f..f02b436c0 100644 --- a/build/js/intlTelInput.min.js +++ b/build/js/intlTelInput.min.js @@ -1,5 +1,5 @@ /* -International Telephone Input v6.2.2 +International Telephone Input v6.3.0 https://github.com/Bluefieldscom/intl-tel-input.git */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],function(b){a(b,window,document)}):"object"==typeof module&&module.exports?module.exports=a(require("jquery"),window,document):a(jQuery,window,document)}(function(a,b,c,d){"use strict";function e(b,c){this.a=b,c&&(a.extend(c, c, {a:c.autoFormat,h:c.autoHideDialCode,d:c.defaultCountry,i:c.ipinfoToken,n:c.nationalMode,t:c.numberType,o:c.onlyCountries,p:c.preferredCountries,v:c.preventInvalidNumbers,u:c.utilsScript})),this.b=a.extend({},h,c),this.c=h,this.ns="."+f+g++,this.d=Boolean(b.setSelectionRange),this.e=Boolean(a(b).attr("placeholder")),this.f=f}var f="intlTelInput",g=1,h={allowExtensions:!1,a:!0,h:!0,autoPlaceholder:!0,d:"",dropdownContainer:!1,geoIpLookup:null,n:!0,t:"MOBILE",o:[],p:["us","gb"],u:""},i={b:38,c:40,d:13,e:27,f:43,A:65,Z:90,g:48,h:57,i:32,Bi:8,TAB:9,k:46,l:17,m:91,n:224},j=!1;a(b).load(function(){j=!0}),e.prototype={_init:function(){return this.b.n&&(this.b.h=!1),navigator.userAgent.match(/IEMobile/i)&&(this.b.a=!1),this.isMobile=/Android.+Mobile|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.autoCountryDeferred=new a.Deferred,this.utilsScriptDeferred=new a.Deferred,this._b(),this._f(),this._h(),this._i(),this._initRequests(),[this.autoCountryDeferred,this.utilsScriptDeferred]},_b:function(){this._d(),this._e()},_c:function(a,b,c){b in this.m||(this.m[b]=[]);var d=c||0;this.m[b][d]=a},_d:function(){var b;if(this.b.o.length){for(b=0;b",{"class":"intl-tel-input"})),this.flagsContainer=a("
",{"class":"flag-container"}).insertBefore(this.g);var b=a("
",{tabindex:"0","class":"selected-flag"}).appendTo(this.flagsContainer);this.h=a("
",{"class":"iti-flag"}).appendTo(b),a("
",{"class":"arrow"}).appendTo(b),this.isMobile?this.i=a("",{"class":"iti-mobile-select"}).appendTo(this.flagsContainer):(this.i=a("
    ",{"class":"country-list hide"}),this.n.length&&!this.isMobile&&(this._g(this.n,"preferred"),a("
  • ",{"class":"divider"}).appendTo(this.i))),this._g(this.l,""),this.isMobile||(this.k=this.i.children(".country"),this.b.dropdownContainer?this.dropdown=a("
    ",{"class":"intl-tel-input iti-container"}).append(this.i):this.i.appendTo(this.flagsContainer))},_g:function(a,b){for(var c="",d=0;d",c+=e.name+" +"+e.dialCode,c+=""):(c+="
  • ",c+="
    ",c+=""+e.name+"",c+="+"+e.dialCode+"",c+="
  • ")}this.i.append(c)},_h:function(){var a=this.g.val();this._af(a)?this._v(a,!0):"auto"!=this.b.d&&(this.b.d=this.b.d?this._y(this.b.d.toLowerCase(),!1,!1):this.n.length?this.n[0]:this.l[0],this._z(this.b.d.iso2),a||this._ae(this.b.d.dialCode,!1)),a&&this._u(a)},_i:function(){var b=this;if(this._j(),(this.b.h||this.b.a)&&this._l(),this.isMobile)this.i.on("change"+this.ns,function(){b._ab(a(this).find("option:selected"))});else{var c=this.g.closest("label");c.length&&c.on("click"+this.ns,function(a){b.i.hasClass("hide")?b.g.focus():a.preventDefault()});var d=this.h.parent();d.on("click"+this.ns,function(){!b.i.hasClass("hide")||b.g.prop("disabled")||b.g.prop("readonly")||b._n()})}this.flagsContainer.on("keydown"+b.ns,function(a){var c=b.i.hasClass("hide");!c||a.which!=i.b&&a.which!=i.c&&a.which!=i.i&&a.which!=i.d||(a.preventDefault(),a.stopPropagation(),b._n()),a.which==i.TAB&&b._ac()})},_initRequests:function(){var c=this;this.b.u?j?this.loadUtils():a(b).load(function(){c.loadUtils()}):this.utilsScriptDeferred.resolve(),"auto"==this.b.d?this._loadAutoCountry():this.autoCountryDeferred.resolve()},_loadAutoCountry:function(){var b=a.cookie?a.cookie("itiAutoCountry"):"";b&&(a.fn[f].autoCountry=b),a.fn[f].autoCountry?this.autoCountryLoaded():a.fn[f].startedLoadingAutoCountry||(a.fn[f].startedLoadingAutoCountry=!0,"function"==typeof this.b.geoIpLookup&&this.b.geoIpLookup(function(b){a.fn[f].autoCountry=b.toLowerCase(),a.cookie&&a.cookie("itiAutoCountry",a.fn[f].autoCountry,{path:"/"}),setTimeout(function(){a(".intl-tel-input input").intlTelInput("autoCountryLoaded")})}))},_j:function(){var a=this;this.b.a&&this.g.on("keypress"+this.ns,function(c){if(c.which>=i.i&&!c.ctrlKey&&!c.metaKey&&b.intlTelInputUtils&&!a.g.prop("readonly")){c.preventDefault();var d=c.which>=i.g&&c.which<=i.h||c.which==i.f,e=a.g[0],f=a.d&&e.selectionStart==e.selectionEnd,g=a.g.attr("maxlength"),h=a.g.val(),j=g?h.length0;e--){var f=b.charAt(e-1);if(a.isNumeric(f)||b.substr(e-2,2)==d)return e}return 0},_getCursorFromDigitsOnRight:function(b,c){for(var d=b.length-1;d>=0;d--)if(a.isNumeric(b.charAt(d))&&0===--c)return d;return 0},_getDigitsOnRight:function(b,c){for(var d=0,e=c;eg;if(this.i.toggleClass("dropup",!h&&i),c){var j=!h&&i?0:this.g.innerHeight();this.dropdown.css({top:f+j,left:e.left}),a(b).on("scroll"+this.ns,function(){d._ac()})}},_p:function(){var b=this;this.i.on("mouseover"+this.ns,".country",function(){b._x(a(this))}),this.i.on("click"+this.ns,".country",function(){b._ab(a(this))});var d=!0;a("html").on("click"+this.ns,function(){d||b._ac(),d=!1});var e="",f=null;a(c).on("keydown"+this.ns,function(a){a.preventDefault(),a.which==i.b||a.which==i.c?b._q(a.which):a.which==i.d?b._r():a.which==i.e?b._ac():(a.which>=i.A&&a.which<=i.Z||a.which==i.i)&&(f&&clearTimeout(f),e+=String.fromCharCode(a.which),b._s(e),f=setTimeout(function(){e=""},1e3))})},_q:function(a){var b=this.i.children(".highlight").first(),c=a==i.b?b.prev():b.next();c.length&&(c.hasClass("divider")&&(c=a==i.b?c.prev():c.next()),this._x(c),this._ad(c))},_r:function(){var a=this.i.children(".highlight").first();a.length&&this._ab(a)},_s:function(a){for(var b=0;bh&&(g=g.substr(0,h))}else g=a;this.g.val(g)},_v:function(b,c){b&&this.b.n&&this.o&&"1"==this.o.dialCode&&"+"!=b.charAt(0)&&("1"!=b.charAt(0)&&(b="1"+b),b="+"+b);var d=this._af(b),e=null;if(d){var f=this.m[this._m(d)],g=this.o&&-1!=a.inArray(this.o.iso2,f);if(!g||this._w(b,d))for(var h=0;h=4},_x:function(a){this.k.removeClass("highlight"),a.addClass("highlight")},_y:function(a,b,c){for(var d=b?k:this.l,e=0;eh)b&&(j-=k),c.scrollTop(j);else if(i>f){b&&(j+=k);var l=d-g;c.scrollTop(j-l)}},_ae:function(b,c){var d,e=this.g.val();if(b="+"+b,this.b.n&&"+"!=e.charAt(0))d=e;else if(e){var f=this._af(e);if(f.length>1)d=e.replace(f,b);else{var g="+"!=e.charAt(0)?a.trim(e):"";d=b+g}}else d=!this.b.h||c?b:"";this._u(d,null,c)},_af:function(b){var c="";if("+"==b.charAt(0))for(var d="",e=0;e