From 29745ca969b2a40b8d5807b5eb8a84445f86a453 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 9 Jun 2016 07:00:37 -0400 Subject: [PATCH] set version where it matters --- bower.json | 2 +- package.json | 2 +- public/dist/autocompeter.min.css | 2 +- public/dist/autocompeter.min.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bower.json b/bower.json index b9efb35..cf24cef 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "autocompeter", - "version": "1.1.12", + "version": "1.1.13", "homepage": "https://autocompeter.com", "authors": [ "Peter Bengtsson " diff --git a/package.json b/package.json index e2194bd..1e64360 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "autocompeter", - "version": "0.1.1", + "version": "0.1.0", "description": "A really fast AJAX autocomplete service and widget", "main": "index.js", "scripts": { diff --git a/public/dist/autocompeter.min.css b/public/dist/autocompeter.min.css index f7d852b..a2ee0af 100644 --- a/public/dist/autocompeter.min.css +++ b/public/dist/autocompeter.min.css @@ -1,4 +1,4 @@ -/* Autocompeter.com 1.1.12 */ +/* Autocompeter.com 1.1.13 */ ._ac-wrap{position:relative;display:inline-block} ._ac-wrap ._ac-hint{position:absolute;top:0;left:0;border-color:transparent;box-shadow:none;opacity:1;color:#b4b4b4;background:#fff} ._ac-wrap ._ac-foreground{background-color:transparent;position:relative;vertical-align:top} diff --git a/public/dist/autocompeter.min.js b/public/dist/autocompeter.min.js index 9e58293..a912fbc 100644 --- a/public/dist/autocompeter.min.js +++ b/public/dist/autocompeter.min.js @@ -1,2 +1,2 @@ -/* Autocompeter.com 1.1.12 */ +/* Autocompeter.com 1.1.13 */ !function(e,t){"use strict";function n(e,n){var a=t.createElement(e);for(var l in n)a[l]=n[l];return a}function a(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent(t,n)}function l(){var e,t,n,a,l,r,u,o=[].slice;for(a=arguments[0],n=2<=arguments.length?o.call(arguments,1):[],r=0,u=n.length;u>r;r++){t=n[r];for(e in t)l=t[e],a[e]=l}return a}function r(r,u){function o(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function i(e){var t=N.map(o),n=new RegExp("\\b(("+t.join("|")+")[\\S']*)","gi");return e.replace(n,"$1")}function s(e){"P"===e.target.tagName&&w!==+e.target.dataset.i&&(w=+e.target.dataset.i,c())}function p(e,t){for(var n=[],a=t.map(o),l=new RegExp("\\b("+a.join("|")+")","gi"),r=0,u=e.length;u>r;r++)e[r][1].search(l)>-1&&n.push(e[r]);return n}function c(a){a=a||!1,!a&&k&&e.clearTimeout(k);var l,u;if(null!==M){if(a&&(M=p(M,N)),!M.length)return void(L.style.display="none");L.style.display="block";var s=L.getElementsByTagName("p");for(l=s.length-1;l>=0;l--)s[l].remove();b=[];var c,v,d=null,f=[];M.length||(E.value="");var m=N.map(o),g=new RegExp("\\b("+m.join("|")+")(\\w+)\\b","gi"),h=t.createDocumentFragment();for(l=0,u=M.length;u>l;l++){for(var y,x;null!==(y=g.exec(M[l][1]));)x=new RegExp("\\b"+o(y[0])+"\\b","gi"),d=y[y.length-1],void 0===d||x.test(r.value)||w===l&&f.push(d);c=n("p"),l===w&&c.classList.add("selected"),c.dataset.i=l,v=n("a",{innerHTML:i(M[l][1]),href:M[l][0]}),c.appendChild(v),h.appendChild(c),b.push(c)}L.appendChild(h),f.length&&" "!==r.value.charAt(r.value.length-1)?(d=f[w%f.length],E.value=r.value+d):E.value=""}}function v(e){var t=e.parentNode;if("FORM"===t.nodeName)return t;if(null===t)throw"too deep. no parent form node to be found";return v(t)}function d(t){var n,a;if("tab"===t)E.value!==r.value&&(r.value=E.value+" "),r.value!==E.value&&g();else if("down"===t||"up"===t){for("down"===t?w=Math.min(b.length-1,++w):"up"===t&&(w=Math.max(0,--w)),n=0,a=b.length;a>n;n++)n===w?b[n].classList.add("selected"):b[n].classList.remove("selected");c()}else if("enter"===t){if(!b.length)return v(r).submit(),!0;var l=b[w],u=l.getElementsByTagName("a")[0];r.value=E.value=u.textContent,L.style.display="none",e.location=u.href}else"esc"===t&&(L.style.display="none");return!1}function f(e){var t={13:"enter",9:"tab",38:"up",40:"down",27:"esc"};return t[e.keyCode]?(e.preventDefault(),d(t[e.keyCode])):!1}function m(){L.style.display="none"}function g(){if(!r.value.trim())return E.value="",void(L.style.display="none");if(E.value.length&&(-1===E.value.indexOf(r.value.trim())&&(E.value=r.value),"block"===L.style.display&&(N=r.value.trim().split(/\s+/),k=e.setTimeout(function(){c(!0)},150))),w=0,X[r.value.trim()]){var t=X[r.value.trim()];N=t.terms,M=t.results,c()}else{if(T&&T.abort(),e.XMLHttpRequest)T=new e.XMLHttpRequest;else{if(!e.ActiveXObject)return;T=new e.ActiveXObject("Microsoft.XMLHTTP")}if(r.value.trim().length){var n=r.value.trim().substring(0,r.value.trim().length-1);if(X[n]&&!X[n].results.length)return void(X[r.value.trim()]={results:[]})}T.onreadystatechange=function(){if(4===T.readyState)if(200===T.status){if(R===r.value){var e=JSON.parse(T.responseText);X[r.value.trim()]=e,N=e.terms,M=e.results,c()}}else 0!==T.status&&(console.warn(T.status,T.responseText),m())},T.open("GET",u.url+encodeURIComponent(r.value.trim()),!0),R=r.value,T.send()}}function h(e){E.value=r.value,setTimeout(function(){L.style.display="none"},200),e.preventDefault()}function y(){if(j&&u.ping&&e.XMLHttpRequest){var t=new e.XMLHttpRequest;t.open("GET",u.url.split("?")[0]+"/ping"),t.send(),j=!1}r.value.length&&b.length&&(L.style.display="block")}u=l({url:"https://autocompeter.com/v1",domain:location.host,groups:null,ping:!0},u||{}),u.url+=u.url.indexOf("?")>-1?"&":"?",u.number&&(u.url+="n="+u.number+"&"),u.groups&&(Array.isArray(u.groups)&&(u.groups=u.groups.join(",")),u.url+="g="+encodeURIComponent(u.groups)+"&"),u.url+="d="+u.domain+"&q=";var b=[],w=0;r.spellcheck=!1,r.autocomplete="off";var x=n("span",{className:"_ac-wrap"}),E=n("input",{tabindex:-1,spellcheck:!1,autocomplete:"off",readonly:"readonly",type:r.type||"text",className:r.className+" _ac-hint"});r.classList.add("_ac-foreground"),x.appendChild(E);var C=r.cloneNode(!0);x.appendChild(C);var L=n("div",{className:"_ac-results"});a(L,"mouseover",s),x.appendChild(L),r.parentElement.insertBefore(x,r),r.parentNode.removeChild(r),r=C;var N,T,R,M=null,k=null,X={},j=!0;a(r,"input",g),a(r,"keydown",f),a(r,"blur",h),a(r,"focus",y)}e.Autocompeter=r}(window,document); \ No newline at end of file