From bd7707e2585e37844813dfbeb36478729c044a8d Mon Sep 17 00:00:00 2001 From: Jack OConnor Date: Sat, 19 Dec 2015 16:56:40 -0800 Subject: [PATCH] updated version to v7.0.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 0e73d7126..b3a74f8ed 100644 --- a/build/js/intlTelInput.js +++ b/build/js/intlTelInput.js @@ -1,5 +1,5 @@ /* -International Telephone Input v6.4.4 +International Telephone Input v7.0.0 https://github.com/Bluefieldscom/intl-tel-input.git */ // wrap in UMD - see https://github.com/umdjs/umd/blob/master/jqueryPluginCommonjs.js @@ -1186,7 +1186,7 @@ https://github.com/Bluefieldscom/intl-tel-input.git } }; // version - $.fn[pluginName].version = "6.4.4"; + $.fn[pluginName].version = "7.0.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 0fd51ad82..a7b6d7ce2 100644 --- a/build/js/intlTelInput.min.js +++ b/build/js/intlTelInput.min.js @@ -1,5 +1,5 @@ /* -International Telephone Input v6.4.4 +International Telephone Input v7.0.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.allowExtensions,b:c.autoFormat,c:c.autoHideDialCode,d:c.autoPlaceholder,e:c.dropdownContainer,f:c.excludeCountries,g:c.geoIpLookup,h:c.initialCountry,i:c.nationalMode,j:c.numberType,k:c.onlyCountries,l:c.preferredCountries,m: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={a:!1,b:!0,c:!0,d:!0,e:!1,f:[],g:null,h:"",i:!0,j:"MOBILE",k:[],l:["us","gb"],m:""},i={b:38,c:40,d:13,e:27,f:43,A:65,Z:90,g:48,h:57,i:32,Bi:8,k:9,l:46,m:17,n:91,o:224},j=!1;a(b).load(function(){j=!0}),e.prototype={_a:function(){return this.b.i&&(this.b.c=!1),navigator.userAgent.match(/IEMobile/i)&&(this.b.b=!1),this.g=/Android.+Mobile|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.h=new a.Deferred,this.i=new a.Deferred,this._b(),this._f(),this._h(),this._aListeners(),this._aRequests(),[this.h,this.i]},_b:function(){this._processAllCountries(),this._processCountryCodes(),this._processPreferredCountries()},_c:function(a,b,c){b in this.q||(this.q[b]=[]);var d=c||0;this.q[b][d]=a},_filterCountries:function(b,c){var d;for(d=0;d",{"class":"intl-tel-input"})),this.k=a("
",{"class":"flag-container"}).insertBefore(this.j);var b=a("
",{tabindex:"0","class":"selected-flag"}).appendTo(this.k);this.l=a("
",{"class":"iti-flag"}).appendTo(b),a("
",{"class":"iti-arrow"}).appendTo(b),this.g?this.m=a("",{"class":"iti-mobile-select"}).appendTo(this.k):(this.m=a("
    ",{"class":"country-list hide"}),this.r.length&&!this.g&&(this._g(this.r,"preferred"),a("
  • ",{"class":"divider"}).appendTo(this.m))),this._g(this.p,""),this.g||(this.mItems=this.m.children(".country"),this.b.e?this.dropdown=a("
    ",{"class":"intl-tel-input iti-container"}).append(this.m):this.m.appendTo(this.k))},_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.m.append(c)},_h:function(){var a=this.j.val();if(this._af(a))this._v(a);else if("auto"!==this.b.h&&(this.b.h?this._setFlag(this.b.h):(this.defaultCountry=this.r.length?this.r[0].iso2:this.p[0].iso2,a||this._setFlag(this.defaultCountry)),!a)){var b=this._y(this.defaultCountry,!1,!1);this._ae(b.dialCode,!1)}a&&this._u(a,null,!1,!1,!1)},_aListeners:function(){var b=this;if(this._aKeyListeners(),(this.b.c||this.b.b)&&this._aFocusListeners(),this.g)this.m.on("change"+this.ns,function(){b._ab(a(this).find("option:selected"))});else{var c=this.j.closest("label");c.length&&c.on("click"+this.ns,function(a){b.m.hasClass("hide")?b.j.focus():a.preventDefault()});var d=this.l.parent();d.on("click"+this.ns,function(){!b.m.hasClass("hide")||b.j.prop("disabled")||b.j.prop("readonly")||b._n()})}this.k.on("keydown"+b.ns,function(a){var c=b.m.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.k&&b._ac()})},_aRequests:function(){var c=this;this.b.m?j?a.fn[f].loadUtils(this.b.m,this.i):a(b).load(function(){a.fn[f].loadUtils(c.b.m,c.i)}):this.i.resolve(),"auto"===this.b.h?this._i3():this.h.resolve()},_i3:function(){var c=b.Cookies?Cookies.get("itiAutoCountry"):"";c&&(a.fn[f].autoCountry=c),a.fn[f].autoCountry?this.handleAutoCountry():a.fn[f].startedLoadingAutoCountry||(a.fn[f].startedLoadingAutoCountry=!0,"function"==typeof this.b.g&&this.b.g(function(c){a.fn[f].autoCountry=c.toLowerCase(),b.Cookies&&Cookies.set("itiAutoCountry",a.fn[f].autoCountry,{path:"/"}),setTimeout(function(){a(".intl-tel-input input").intlTelInput("handleAutoCountry")})}))},_aKeyListeners:function(){var a=this;this.b.b&&this.j.on("keypress"+this.ns,function(c){if(c.which>=i.i&&!c.ctrlKey&&!c.metaKey&&b.intlTelInputUtils&&!a.j.prop("readonly")){c.preventDefault();var d=c.which>=i.g&&c.which<=i.h||c.which==i.f,e=a.j[0],f=a.d&&e.selectionStart==e.selectionEnd,g=a.j.attr("maxlength"),h=a.j.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},_k2:function(b,c){for(var d=b.length-1;d>=0;d--)if(a.isNumeric(b.charAt(d))&&0===--c)return d;return 0},_k3:function(b,c){for(var d=0,e=c;eg;if(this.m.toggleClass("dropup",!h&&i),d){var j=!h&&i?0:this.j.innerHeight();this.dropdown.css({top:f+j,left:e.left}),a(b).on("scroll"+this.ns,function(){c._ac()})}},_p:function(){var b=this;this.m.on("mouseover"+this.ns,".country",function(){b._x(a(this))}),this.m.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.m.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.m.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.j.val(g)},_v:function(b){b&&this.b.i&&this.s&&"1"==this.s.dialCode&&"+"!=b.charAt(0)&&("1"!=b.charAt(0)&&(b="1"+b),b="+"+b);var c=this._af(b),d=null;if(c){var e=this.q[this._m(c)],f=this.s&&-1!=a.inArray(this.s.iso2,e);if(!f||this._w(b,c))for(var g=0;g=4},_x:function(a){this.mItems.removeClass("highlight"),a.addClass("highlight")},_y:function(a,b,c){for(var d=b?k:this.p,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.j.val();if(b="+"+b,this.b.i&&"+"!=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.c||c?b:"";this._u(d,null,c,!1,!1)},_af:function(b){var c="";if("+"==b.charAt(0))for(var d="",e=0;e