vue-simple-suggest
Advanced tools
Comparing version 1.9.3 to 1.9.4
@@ -52,4 +52,3 @@ 'use strict'; | ||
return result.then(finalizer, finalizer); | ||
} | ||
return finalizer(); | ||
}return finalizer(); | ||
}function _catch(body, recover) { | ||
@@ -95,5 +94,8 @@ try { | ||
}();function _invoke(body, then) { | ||
var result = body();if (result && result.then) { | ||
var result = body(); | ||
if (result && result.then) { | ||
return result.then(then); | ||
}return then(result); | ||
} | ||
return then(result); | ||
}function _awaitIgnored(value, direct) { | ||
@@ -129,2 +131,3 @@ if (!direct) { | ||
name: 'vue-simple-suggest', | ||
inheritAttrs: false, | ||
model: { | ||
@@ -140,3 +143,4 @@ prop: 'value', | ||
} | ||
}, controls: { | ||
}, | ||
controls: { | ||
type: Object, | ||
@@ -558,5 +562,3 @@ default: function _default() { | ||
/// and exactly when the user clicks the mouse button or taps the screen. | ||
this.isClicking = this.isOverList && !this.isTabbed; | ||
if (!this.isClicking) { | ||
this.isClicking = this.isOverList && !this.isTabbed;if (!this.isClicking) { | ||
this.isInFocus = false; | ||
@@ -563,0 +565,0 @@ this.hideList(); |
@@ -36,4 +36,3 @@ const defaultControls = { | ||
return result.then(finalizer, finalizer); | ||
} | ||
return finalizer(); | ||
}return finalizer(); | ||
}function _catch(body, recover) { | ||
@@ -79,5 +78,8 @@ try { | ||
}();function _invoke(body, then) { | ||
var result = body();if (result && result.then) { | ||
var result = body(); | ||
if (result && result.then) { | ||
return result.then(then); | ||
}return then(result); | ||
} | ||
return then(result); | ||
}function _awaitIgnored(value, direct) { | ||
@@ -113,2 +115,3 @@ if (!direct) { | ||
name: 'vue-simple-suggest', | ||
inheritAttrs: false, | ||
model: { | ||
@@ -122,3 +125,4 @@ prop: 'value', | ||
default: () => ({}) | ||
}, controls: { | ||
}, | ||
controls: { | ||
type: Object, | ||
@@ -507,5 +511,3 @@ default: () => defaultControls | ||
/// and exactly when the user clicks the mouse button or taps the screen. | ||
this.isClicking = this.isOverList && !this.isTabbed; | ||
if (!this.isClicking) { | ||
this.isClicking = this.isOverList && !this.isTabbed;if (!this.isClicking) { | ||
this.isInFocus = false; | ||
@@ -512,0 +514,0 @@ this.hideList(); |
@@ -56,2 +56,3 @@ const defaultControls = { | ||
name: 'vue-simple-suggest', | ||
inheritAttrs: false, | ||
model: { | ||
@@ -58,0 +59,0 @@ prop: 'value', |
@@ -1,1 +0,1 @@ | ||
var VueSimpleSuggest=function(){"use strict";var t={selectionUp:[38],selectionDown:[40],select:[13],hideList:[27],autocomplete:[32,13]},e={input:String,select:Object};function i(t,e){if(t.length<=0)return!1;var i=function(t){return t.some(function(t){return t===e.keyCode})};return Array.isArray(t[0])?t.some(function(t){return i(t)}):i(t)}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t};function o(t,e){try{var i=t()}catch(t){return e()}return i&&i.then?i.then(e,e):e()}function r(t,e){try{var i=t()}catch(t){return e(t)}return i&&i.then?i.then(void 0,e):i}function u(t,e,i){return i?e?e(t):t:(t=Promise.resolve(t),e?t.then(e):t)}var l=function(){try{if(isNaN.apply(null,{}))return function(t){return function(){try{return Promise.resolve(t.apply(this,arguments))}catch(t){return Promise.reject(t)}}}}catch(t){}return function(t){return function(){try{return Promise.resolve(t.apply(this,Array.prototype.slice.call(arguments)))}catch(t){return Promise.reject(t)}}}}();function c(t,e){var i=t();return i&&i.then?i.then(e):e(i)}function h(){}var a={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"vue-simple-suggest",class:[t.styles.vueSimpleSuggest,{designed:!t.destyled,focus:t.isInFocus}],on:{keydown:function(e){if(!("button"in e)&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;t.isTabbed=!0}}},[i("div",{ref:"inputSlot",staticClass:"input-wrapper",class:t.styles.inputWrapper,attrs:{role:"combobox","aria-haspopup":"listbox","aria-owns":t.listId,"aria-expanded":t.listShown&&!t.removeList?"true":"false"}},[t._t("default",[i("input",t._b({staticClass:"default-input",class:t.styles.defaultInput,domProps:{value:t.text||""}},"input",t.$attrs,!1))])],2),t._v(" "),i("transition",{attrs:{name:"vue-simple-suggest"}},[t.listShown&&!t.removeList?i("ul",{staticClass:"suggestions",class:t.styles.suggestions,attrs:{id:t.listId,role:"listbox","aria-labelledby":t.listId},on:{mouseenter:function(e){t.hoverList(!0)},mouseleave:function(e){t.hoverList(!1)}}},[this.$scopedSlots["misc-item-above"]?i("li",[t._t("misc-item-above",null,{suggestions:t.suggestions,query:t.text})],2):t._e(),t._v(" "),t._l(t.suggestions,function(e,s){return i("li",{key:t.getId(e,s),staticClass:"suggest-item",class:[t.styles.suggestItem,{selected:t.isSelected(e),hover:t.isHovered(e)}],attrs:{role:"option","aria-selected":t.isHovered(e)||t.isSelected(e)?"true":"false",id:t.getId(e,s)},on:{mouseenter:function(i){t.hover(e,i.target)},mouseleave:function(e){t.hover(void 0)},click:function(i){t.suggestionClick(e,i)}}},[t._t("suggestion-item",[i("span",[t._v(t._s(t.displayProperty(e)))])],{autocomplete:function(){return t.setText(t.displayProperty(e))},suggestion:e,query:t.text})],2)}),t._v(" "),this.$scopedSlots["misc-item-below"]?i("li",[t._t("misc-item-below",null,{suggestions:t.suggestions,query:t.text})],2):t._e()],2):t._e()])],1)},staticRenderFns:[],name:"vue-simple-suggest",model:{prop:"value",event:"input"},props:{styles:{type:Object,default:function(){return{}}},controls:{type:Object,default:function(){return t}},minLength:{type:Number,default:1},maxSuggestions:{type:Number,default:10},displayAttribute:{type:String,default:"title"},valueAttribute:{type:String,default:"id"},list:{type:[Function,Array],default:function(){return[]}},removeList:{type:Boolean,default:!1},destyled:{type:Boolean,default:!1},preventSubmit:{type:Boolean,default:!0},filterByQuery:{type:Boolean,default:!1},filter:{type:Function,default:function(t,e){return!e||~this.displayProperty(t).toLowerCase().indexOf(e.toLowerCase())}},debounce:{type:Number,default:0},nullableSelect:{type:Boolean,default:!1},value:{},mode:{type:String,default:"input",validator:function(t){return!!~Object.keys(e).indexOf(t.toLowerCase())}}},watch:{mode:{handler:function(t,e){var i=this;this.constructor.options.model.event=t,this.$parent&&this.$parent.$forceUpdate(),this.$nextTick(function(){"input"===t?i.$emit("input",i.text):i.$emit("select",i.selected)})},immediate:!0},value:{handler:function(t){"string"==typeof t?this.text=t:t&&(this.text=this.displayProperty(t))},immediate:!0}},data:function(){return{selected:null,hovered:null,suggestions:[],listShown:!1,inputElement:null,canSend:!0,timeoutInstance:null,text:this.value,isPlainSuggestion:!1,isClicking:!1,isOverList:!1,isInFocus:!1,isFalseFocus:!1,isTabbed:!1,controlScheme:{},listId:this._uid+"-suggestions"}},computed:{listIsRequest:function(){return"function"==typeof this.list},inputIsComponent:function(){return this.$slots.default&&this.$slots.default.length>0&&!!this.$slots.default[0].componentInstance},input:function(){return this.inputIsComponent?this.$slots.default[0].componentInstance:this.inputElement},on:function(){return this.inputIsComponent?"$on":"addEventListener"},off:function(){return this.inputIsComponent?"$off":"removeEventListener"},hoveredIndex:function(){var t=this;return this.suggestions.findIndex(function(e){return t.hovered&&t.valueProperty(t.hovered)==t.valueProperty(e)})},textLength:function(){return this.text&&this.text.length||this.inputElement.value.length||0},isSelectedUpToDate:function(){return!!this.selected&&this.displayProperty(this.selected)===this.text}},created:function(){this.controlScheme=n({},t,this.controls)},mounted:function(){this.inputElement=this.$refs.inputSlot.querySelector("input"),this.setInputAriaAttributes(),this.prepareEventHandlers(!0)},beforeDestroy:function(){this.prepareEventHandlers(!1)},methods:{isEqual:function(t,e){return e&&this.valueProperty(t)==this.valueProperty(e)},isSelected:function(t){return this.isEqual(t,this.selected)},isHovered:function(t){return this.isEqual(t,this.hovered)},onSubmit:function(t){this.preventSubmit&&"Enter"===t.key&&(t.stopPropagation(),t.preventDefault())},setInputAriaAttributes:function(){this.inputElement.setAttribute("aria-activedescendant",""),this.inputElement.setAttribute("aria-autocomplete","list"),this.inputElement.setAttribute("aria-controls",this.listId)},prepareEventHandlers:function(t){var e=this,i=this[t?"on":"off"],s={click:this.showSuggestions,keydown:function(t){return e.moveSelection(t),e.onAutocomplete(t)},keyup:this.onListKeyUp},o=n({blur:this.onBlur,focus:this.onFocus,input:this.onInput},s);for(var r in o)this.input[i](r,o[r]);var u=t?"addEventListener":"removeEventListener";for(var l in s)this.inputElement[u](l,s[l]);if(!0===this.preventSubmit){var c=this.$el.closest("form");c&&c[u]("keydown",this.onSubmit)}},isScopedSlotEmpty:function(t){if(t){var e=t(this);return!(Array.isArray(e)||e&&(e.tag||e.context||e.text||e.children))}return!0},miscSlotsAreEmpty:function(){var t=this,e=["misc-item-above","misc-item-below"].map(function(e){return t.$scopedSlots[e]});if(e.every(function(t){return!!t}))return e.every(this.isScopedSlotEmpty.bind(this));var i=e.find(function(t){return!!t});return this.isScopedSlotEmpty.call(this,i)},getPropertyByAttribute:function(t,e){return this.isPlainSuggestion?t:void 0!==(void 0===t?"undefined":s(t))?function(t,e){return e.split(".").reduce(function(t,e){return t===Object(t)?t[e]:t},t)}(t,e):t},displayProperty:function(t){if(this.isPlainSuggestion)return t;var e=this.getPropertyByAttribute(t,this.displayAttribute);return void 0===e&&(e=JSON.stringify(t),process&&~process.env.NODE_ENV.indexOf("dev")&&console.warn("[vue-simple-suggest]: Please, provide `display-attribute` as a key or a dotted path for a property from your object.")),String(e)},valueProperty:function(t){if(this.isPlainSuggestion)return t;var e=this.getPropertyByAttribute(t,this.valueAttribute);return void 0===e&&console.error("[vue-simple-suggest]: Please, check if you passed 'value-attribute' (default is 'id') and 'display-attribute' (default is 'title') props correctly.\n Your list objects should always contain a unique identifier."),e},autocompleteText:function(t){this.setText(t)},setText:function(t){var e=this;this.$nextTick(function(){e.$emit("input",t),e.inputElement.value=t,e.text=t})},select:function(t){(this.selected!==t||this.nullableSelect&&!t)&&(this.selected=t,this.$emit("select",t),t&&this.setText(this.displayProperty(t))),this.hover(null)},hover:function(t,e){var i=t?this.getId(t,this.hoveredIndex):"";this.inputElement.setAttribute("aria-activedescendant",i),t&&t!==this.hovered&&this.$emit("hover",t,e),this.hovered=t},hoverList:function(t){this.isOverList=t},hideList:function(){this.listShown&&(this.listShown=!1,this.hover(null),this.$emit("hide-list"))},showList:function(){this.listShown||this.textLength>=this.minLength&&(this.suggestions.length>0||!this.miscSlotsAreEmpty())&&(this.listShown=!0,this.$emit("show-list"))},showSuggestions:l(function(){var t=this;return c(function(){if(0===t.suggestions.length&&t.minLength===t.textLength)return function(t,e){if(!e)return Promise.resolve(t).then(h)}(t.research())},function(){t.showList()})}),moveSelection:function(t){if(this.listShown&&this.suggestions.length&&i([this.controlScheme.selectionUp,this.controlScheme.selectionDown],t)){t.preventDefault(),this.showSuggestions();var e=i(this.controlScheme.selectionDown,t),s=2*e-1,n=e?0:this.suggestions.length-1,o=e?this.hoveredIndex<this.suggestions.length-1:this.hoveredIndex>0,r=null;r=this.hovered?o?this.suggestions[this.hoveredIndex+s]:this.suggestions[n]:this.selected||this.suggestions[n],this.hover(r)}},onListKeyUp:function(t){var e=this.controlScheme.select;i([e,this.controlScheme.hideList],t)&&(t.preventDefault(),this.listShown?(i(e,t)&&this.select(this.hovered),this.hideList()):i(e,t)&&this.research())},onAutocomplete:function(t){i(this.controlScheme.autocomplete,t)&&(t.ctrlKey||t.shiftKey)&&this.suggestions.length>0&&this.suggestions[0]&&this.listShown&&(t.preventDefault(),this.hover(this.suggestions[0]),this.setText(this.displayProperty(this.suggestions[0])))},suggestionClick:function(t,e){var i=this;this.$emit("suggestion-click",t,e),this.select(t),this.isClicking=this.isOverList=!1,this.$nextTick(function(){i.hideList()})},onBlur:function(t){var e=this;this.isInFocus?(this.isClicking=this.isOverList&&!this.isTabbed,this.isClicking?t&&t.isTrusted&&!this.isTabbed&&(this.isFalseFocus=!0,this.$nextTick(function(){e.inputElement.focus()})):(this.isInFocus=!1,this.hideList(),this.$emit("blur",t))):(this.inputElement.blur(),console.error("This should never happen!\n If you encountered this error, please make sure that your input component emits 'focus' events properly.\n For more info see https://github.com/KazanExpress/vue-simple-suggest#custom-input.\n\n If your 'vue-simple-suggest' setup does not include a custom input component - please,\n report to https://github.com/KazanExpress/vue-simple-suggest/issues/new")),this.isTabbed=!1},onFocus:function(t){this.isInFocus=!0,t&&!this.isFalseFocus&&this.$emit("focus",t),this.isFalseFocus=!1,this.isClicking||this.showSuggestions()},onInput:function(t){var e=t.target?t.target.value:t;this.text!==e&&(this.text=e,this.$emit("input",this.text),this.hovered&&this.hover(null),this.debounce?(clearTimeout(this.timeoutInstance),this.timeoutInstance=setTimeout(this.research,this.debounce)):this.research())},research:l(function(){var t=this;return o(function(){return r(function(){return function(t){var e=t();if(e&&e.then)return e.then(h)}(function(){if(t.canSend){t.canSend=!1;var e=t.$set;return u(t.getSuggestions(t.text),function(i){e.call(t,t,"suggestions",i)})}})},function(e){throw t.clearSuggestions(),e})},function(){return t.canSend=!0,0===t.suggestions.length&&t.miscSlotsAreEmpty()?t.hideList():t.showList(),t.suggestions})}),getSuggestions:l(function(t){var e=this;if((t=t||"").length<e.minLength)return e.listShown?(e.hideList(),[]):e.suggestions;e.selected=null,e.listIsRequest&&(e.$emit("request-start",t),(e.suggestions.length>0||!e.miscSlotsAreEmpty())&&e.showList());var i=[];return o(function(){return r(function(){return c(function(){if(e.listIsRequest)return u(e.list(t),function(t){i=t||[]});i=e.list},function(){Array.isArray(i)||(i=[i]),e.isPlainSuggestion="object"!==s(i[0])||Array.isArray(i[0]),e.filterByQuery&&(i=i.filter(function(i){return e.filter(i,t)})),e.listIsRequest&&e.$emit("request-done",i)})},function(t){if(!e.listIsRequest)throw t;e.$emit("request-failed",t)})},function(){return e.maxSuggestions&&i.splice(e.maxSuggestions),i})}),clearSuggestions:function(){this.suggestions.splice(0)},getId:function(t,e){return this.listId+"-suggestion-"+(this.isPlainSuggestion?e:this.valueProperty(t)||e)}}};return(Vue||window&&window.Vue)&&(Vue||window.Vue).component("vue-simple-suggest",a),a}(); | ||
var VueSimpleSuggest=function(){"use strict";var t={selectionUp:[38],selectionDown:[40],select:[13],hideList:[27],autocomplete:[32,13]},e={input:String,select:Object};function i(t,e){if(t.length<=0)return!1;var i=function(t){return t.some(function(t){return t===e.keyCode})};return Array.isArray(t[0])?t.some(function(t){return i(t)}):i(t)}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t};function o(t,e){try{var i=t()}catch(t){return e()}return i&&i.then?i.then(e,e):e()}function r(t,e){try{var i=t()}catch(t){return e(t)}return i&&i.then?i.then(void 0,e):i}function u(t,e,i){return i?e?e(t):t:(t=Promise.resolve(t),e?t.then(e):t)}var l=function(){try{if(isNaN.apply(null,{}))return function(t){return function(){try{return Promise.resolve(t.apply(this,arguments))}catch(t){return Promise.reject(t)}}}}catch(t){}return function(t){return function(){try{return Promise.resolve(t.apply(this,Array.prototype.slice.call(arguments)))}catch(t){return Promise.reject(t)}}}}();function c(t,e){var i=t();return i&&i.then?i.then(e):e(i)}function h(){}var a={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"vue-simple-suggest",class:[t.styles.vueSimpleSuggest,{designed:!t.destyled,focus:t.isInFocus}],on:{keydown:function(e){if(!("button"in e)&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;t.isTabbed=!0}}},[i("div",{ref:"inputSlot",staticClass:"input-wrapper",class:t.styles.inputWrapper,attrs:{role:"combobox","aria-haspopup":"listbox","aria-owns":t.listId,"aria-expanded":t.listShown&&!t.removeList?"true":"false"}},[t._t("default",[i("input",t._b({staticClass:"default-input",class:t.styles.defaultInput,domProps:{value:t.text||""}},"input",t.$attrs,!1))])],2),t._v(" "),i("transition",{attrs:{name:"vue-simple-suggest"}},[t.listShown&&!t.removeList?i("ul",{staticClass:"suggestions",class:t.styles.suggestions,attrs:{id:t.listId,role:"listbox","aria-labelledby":t.listId},on:{mouseenter:function(e){t.hoverList(!0)},mouseleave:function(e){t.hoverList(!1)}}},[this.$scopedSlots["misc-item-above"]?i("li",[t._t("misc-item-above",null,{suggestions:t.suggestions,query:t.text})],2):t._e(),t._v(" "),t._l(t.suggestions,function(e,s){return i("li",{key:t.getId(e,s),staticClass:"suggest-item",class:[t.styles.suggestItem,{selected:t.isSelected(e),hover:t.isHovered(e)}],attrs:{role:"option","aria-selected":t.isHovered(e)||t.isSelected(e)?"true":"false",id:t.getId(e,s)},on:{mouseenter:function(i){t.hover(e,i.target)},mouseleave:function(e){t.hover(void 0)},click:function(i){t.suggestionClick(e,i)}}},[t._t("suggestion-item",[i("span",[t._v(t._s(t.displayProperty(e)))])],{autocomplete:function(){return t.setText(t.displayProperty(e))},suggestion:e,query:t.text})],2)}),t._v(" "),this.$scopedSlots["misc-item-below"]?i("li",[t._t("misc-item-below",null,{suggestions:t.suggestions,query:t.text})],2):t._e()],2):t._e()])],1)},staticRenderFns:[],name:"vue-simple-suggest",inheritAttrs:!1,model:{prop:"value",event:"input"},props:{styles:{type:Object,default:function(){return{}}},controls:{type:Object,default:function(){return t}},minLength:{type:Number,default:1},maxSuggestions:{type:Number,default:10},displayAttribute:{type:String,default:"title"},valueAttribute:{type:String,default:"id"},list:{type:[Function,Array],default:function(){return[]}},removeList:{type:Boolean,default:!1},destyled:{type:Boolean,default:!1},preventSubmit:{type:Boolean,default:!0},filterByQuery:{type:Boolean,default:!1},filter:{type:Function,default:function(t,e){return!e||~this.displayProperty(t).toLowerCase().indexOf(e.toLowerCase())}},debounce:{type:Number,default:0},nullableSelect:{type:Boolean,default:!1},value:{},mode:{type:String,default:"input",validator:function(t){return!!~Object.keys(e).indexOf(t.toLowerCase())}}},watch:{mode:{handler:function(t,e){var i=this;this.constructor.options.model.event=t,this.$parent&&this.$parent.$forceUpdate(),this.$nextTick(function(){"input"===t?i.$emit("input",i.text):i.$emit("select",i.selected)})},immediate:!0},value:{handler:function(t){"string"==typeof t?this.text=t:t&&(this.text=this.displayProperty(t))},immediate:!0}},data:function(){return{selected:null,hovered:null,suggestions:[],listShown:!1,inputElement:null,canSend:!0,timeoutInstance:null,text:this.value,isPlainSuggestion:!1,isClicking:!1,isOverList:!1,isInFocus:!1,isFalseFocus:!1,isTabbed:!1,controlScheme:{},listId:this._uid+"-suggestions"}},computed:{listIsRequest:function(){return"function"==typeof this.list},inputIsComponent:function(){return this.$slots.default&&this.$slots.default.length>0&&!!this.$slots.default[0].componentInstance},input:function(){return this.inputIsComponent?this.$slots.default[0].componentInstance:this.inputElement},on:function(){return this.inputIsComponent?"$on":"addEventListener"},off:function(){return this.inputIsComponent?"$off":"removeEventListener"},hoveredIndex:function(){var t=this;return this.suggestions.findIndex(function(e){return t.hovered&&t.valueProperty(t.hovered)==t.valueProperty(e)})},textLength:function(){return this.text&&this.text.length||this.inputElement.value.length||0},isSelectedUpToDate:function(){return!!this.selected&&this.displayProperty(this.selected)===this.text}},created:function(){this.controlScheme=n({},t,this.controls)},mounted:function(){this.inputElement=this.$refs.inputSlot.querySelector("input"),this.setInputAriaAttributes(),this.prepareEventHandlers(!0)},beforeDestroy:function(){this.prepareEventHandlers(!1)},methods:{isEqual:function(t,e){return e&&this.valueProperty(t)==this.valueProperty(e)},isSelected:function(t){return this.isEqual(t,this.selected)},isHovered:function(t){return this.isEqual(t,this.hovered)},onSubmit:function(t){this.preventSubmit&&"Enter"===t.key&&(t.stopPropagation(),t.preventDefault())},setInputAriaAttributes:function(){this.inputElement.setAttribute("aria-activedescendant",""),this.inputElement.setAttribute("aria-autocomplete","list"),this.inputElement.setAttribute("aria-controls",this.listId)},prepareEventHandlers:function(t){var e=this,i=this[t?"on":"off"],s={click:this.showSuggestions,keydown:function(t){return e.moveSelection(t),e.onAutocomplete(t)},keyup:this.onListKeyUp},o=n({blur:this.onBlur,focus:this.onFocus,input:this.onInput},s);for(var r in o)this.input[i](r,o[r]);var u=t?"addEventListener":"removeEventListener";for(var l in s)this.inputElement[u](l,s[l]);if(!0===this.preventSubmit){var c=this.$el.closest("form");c&&c[u]("keydown",this.onSubmit)}},isScopedSlotEmpty:function(t){if(t){var e=t(this);return!(Array.isArray(e)||e&&(e.tag||e.context||e.text||e.children))}return!0},miscSlotsAreEmpty:function(){var t=this,e=["misc-item-above","misc-item-below"].map(function(e){return t.$scopedSlots[e]});if(e.every(function(t){return!!t}))return e.every(this.isScopedSlotEmpty.bind(this));var i=e.find(function(t){return!!t});return this.isScopedSlotEmpty.call(this,i)},getPropertyByAttribute:function(t,e){return this.isPlainSuggestion?t:void 0!==(void 0===t?"undefined":s(t))?function(t,e){return e.split(".").reduce(function(t,e){return t===Object(t)?t[e]:t},t)}(t,e):t},displayProperty:function(t){if(this.isPlainSuggestion)return t;var e=this.getPropertyByAttribute(t,this.displayAttribute);return void 0===e&&(e=JSON.stringify(t),process&&~process.env.NODE_ENV.indexOf("dev")&&console.warn("[vue-simple-suggest]: Please, provide `display-attribute` as a key or a dotted path for a property from your object.")),String(e)},valueProperty:function(t){if(this.isPlainSuggestion)return t;var e=this.getPropertyByAttribute(t,this.valueAttribute);return void 0===e&&console.error("[vue-simple-suggest]: Please, check if you passed 'value-attribute' (default is 'id') and 'display-attribute' (default is 'title') props correctly.\n Your list objects should always contain a unique identifier."),e},autocompleteText:function(t){this.setText(t)},setText:function(t){var e=this;this.$nextTick(function(){e.$emit("input",t),e.inputElement.value=t,e.text=t})},select:function(t){(this.selected!==t||this.nullableSelect&&!t)&&(this.selected=t,this.$emit("select",t),t&&this.setText(this.displayProperty(t))),this.hover(null)},hover:function(t,e){var i=t?this.getId(t,this.hoveredIndex):"";this.inputElement.setAttribute("aria-activedescendant",i),t&&t!==this.hovered&&this.$emit("hover",t,e),this.hovered=t},hoverList:function(t){this.isOverList=t},hideList:function(){this.listShown&&(this.listShown=!1,this.hover(null),this.$emit("hide-list"))},showList:function(){this.listShown||this.textLength>=this.minLength&&(this.suggestions.length>0||!this.miscSlotsAreEmpty())&&(this.listShown=!0,this.$emit("show-list"))},showSuggestions:l(function(){var t=this;return c(function(){if(0===t.suggestions.length&&t.minLength===t.textLength)return function(t,e){if(!e)return Promise.resolve(t).then(h)}(t.research())},function(){t.showList()})}),moveSelection:function(t){if(this.listShown&&this.suggestions.length&&i([this.controlScheme.selectionUp,this.controlScheme.selectionDown],t)){t.preventDefault(),this.showSuggestions();var e=i(this.controlScheme.selectionDown,t),s=2*e-1,n=e?0:this.suggestions.length-1,o=e?this.hoveredIndex<this.suggestions.length-1:this.hoveredIndex>0,r=null;r=this.hovered?o?this.suggestions[this.hoveredIndex+s]:this.suggestions[n]:this.selected||this.suggestions[n],this.hover(r)}},onListKeyUp:function(t){var e=this.controlScheme.select;i([e,this.controlScheme.hideList],t)&&(t.preventDefault(),this.listShown?(i(e,t)&&this.select(this.hovered),this.hideList()):i(e,t)&&this.research())},onAutocomplete:function(t){i(this.controlScheme.autocomplete,t)&&(t.ctrlKey||t.shiftKey)&&this.suggestions.length>0&&this.suggestions[0]&&this.listShown&&(t.preventDefault(),this.hover(this.suggestions[0]),this.setText(this.displayProperty(this.suggestions[0])))},suggestionClick:function(t,e){var i=this;this.$emit("suggestion-click",t,e),this.select(t),this.isClicking=this.isOverList=!1,this.$nextTick(function(){i.hideList()})},onBlur:function(t){var e=this;this.isInFocus?(this.isClicking=this.isOverList&&!this.isTabbed,this.isClicking?t&&t.isTrusted&&!this.isTabbed&&(this.isFalseFocus=!0,this.$nextTick(function(){e.inputElement.focus()})):(this.isInFocus=!1,this.hideList(),this.$emit("blur",t))):(this.inputElement.blur(),console.error("This should never happen!\n If you encountered this error, please make sure that your input component emits 'focus' events properly.\n For more info see https://github.com/KazanExpress/vue-simple-suggest#custom-input.\n\n If your 'vue-simple-suggest' setup does not include a custom input component - please,\n report to https://github.com/KazanExpress/vue-simple-suggest/issues/new")),this.isTabbed=!1},onFocus:function(t){this.isInFocus=!0,t&&!this.isFalseFocus&&this.$emit("focus",t),this.isFalseFocus=!1,this.isClicking||this.showSuggestions()},onInput:function(t){var e=t.target?t.target.value:t;this.text!==e&&(this.text=e,this.$emit("input",this.text),this.hovered&&this.hover(null),this.debounce?(clearTimeout(this.timeoutInstance),this.timeoutInstance=setTimeout(this.research,this.debounce)):this.research())},research:l(function(){var t=this;return o(function(){return r(function(){return function(t){var e=t();if(e&&e.then)return e.then(h)}(function(){if(t.canSend){t.canSend=!1;var e=t.$set;return u(t.getSuggestions(t.text),function(i){e.call(t,t,"suggestions",i)})}})},function(e){throw t.clearSuggestions(),e})},function(){return t.canSend=!0,0===t.suggestions.length&&t.miscSlotsAreEmpty()?t.hideList():t.showList(),t.suggestions})}),getSuggestions:l(function(t){var e=this;if((t=t||"").length<e.minLength)return e.listShown?(e.hideList(),[]):e.suggestions;e.selected=null,e.listIsRequest&&(e.$emit("request-start",t),(e.suggestions.length>0||!e.miscSlotsAreEmpty())&&e.showList());var i=[];return o(function(){return r(function(){return c(function(){if(e.listIsRequest)return u(e.list(t),function(t){i=t||[]});i=e.list},function(){Array.isArray(i)||(i=[i]),e.isPlainSuggestion="object"!==s(i[0])||Array.isArray(i[0]),e.filterByQuery&&(i=i.filter(function(i){return e.filter(i,t)})),e.listIsRequest&&e.$emit("request-done",i)})},function(t){if(!e.listIsRequest)throw t;e.$emit("request-failed",t)})},function(){return e.maxSuggestions&&i.splice(e.maxSuggestions),i})}),clearSuggestions:function(){this.suggestions.splice(0)},getId:function(t,e){return this.listId+"-suggestion-"+(this.isPlainSuggestion?e:this.valueProperty(t)||e)}}};return(Vue||window&&window.Vue)&&(Vue||window.Vue).component("vue-simple-suggest",a),a}(); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueSimpleSuggest=e()}(this,function(){"use strict";var t={selectionUp:[38],selectionDown:[40],select:[13],hideList:[27],autocomplete:[32,13]},e={input:String,select:Object};function i(t,e){if(t.length<=0)return!1;var i=function(t){return t.some(function(t){return t===e.keyCode})};return Array.isArray(t[0])?t.some(function(t){return i(t)}):i(t)}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function n(t,e){try{var i=t()}catch(t){return e()}return i&&i.then?i.then(e,e):e()}function o(t,e){try{var i=t()}catch(t){return e(t)}return i&&i.then?i.then(void 0,e):i}function r(t,e,i){return i?e?e(t):t:(t=Promise.resolve(t),e?t.then(e):t)}var u=function(){try{if(isNaN.apply(null,{}))return function(t){return function(){try{return Promise.resolve(t.apply(this,arguments))}catch(t){return Promise.reject(t)}}}}catch(t){}return function(t){return function(){try{return Promise.resolve(t.apply(this,Array.prototype.slice.call(arguments)))}catch(t){return Promise.reject(t)}}}}();function l(t,e){var i=t();return i&&i.then?i.then(e):e(i)}function c(){}var h={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"vue-simple-suggest",class:[t.styles.vueSimpleSuggest,{designed:!t.destyled,focus:t.isInFocus}],on:{keydown:function(e){if(!("button"in e)&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;t.isTabbed=!0}}},[i("div",{ref:"inputSlot",staticClass:"input-wrapper",class:t.styles.inputWrapper,attrs:{role:"combobox","aria-haspopup":"listbox","aria-owns":t.listId,"aria-expanded":t.listShown&&!t.removeList?"true":"false"}},[t._t("default",[i("input",t._b({staticClass:"default-input",class:t.styles.defaultInput,domProps:{value:t.text||""}},"input",t.$attrs,!1))])],2),t._v(" "),i("transition",{attrs:{name:"vue-simple-suggest"}},[t.listShown&&!t.removeList?i("ul",{staticClass:"suggestions",class:t.styles.suggestions,attrs:{id:t.listId,role:"listbox","aria-labelledby":t.listId},on:{mouseenter:function(e){t.hoverList(!0)},mouseleave:function(e){t.hoverList(!1)}}},[this.$scopedSlots["misc-item-above"]?i("li",[t._t("misc-item-above",null,{suggestions:t.suggestions,query:t.text})],2):t._e(),t._v(" "),t._l(t.suggestions,function(e,s){return i("li",{key:t.getId(e,s),staticClass:"suggest-item",class:[t.styles.suggestItem,{selected:t.isSelected(e),hover:t.isHovered(e)}],attrs:{role:"option","aria-selected":t.isHovered(e)||t.isSelected(e)?"true":"false",id:t.getId(e,s)},on:{mouseenter:function(i){t.hover(e,i.target)},mouseleave:function(e){t.hover(void 0)},click:function(i){t.suggestionClick(e,i)}}},[t._t("suggestion-item",[i("span",[t._v(t._s(t.displayProperty(e)))])],{autocomplete:function(){return t.setText(t.displayProperty(e))},suggestion:e,query:t.text})],2)}),t._v(" "),this.$scopedSlots["misc-item-below"]?i("li",[t._t("misc-item-below",null,{suggestions:t.suggestions,query:t.text})],2):t._e()],2):t._e()])],1)},staticRenderFns:[],name:"vue-simple-suggest",model:{prop:"value",event:"input"},props:{styles:{type:Object,default:function(){return{}}},controls:{type:Object,default:function(){return t}},minLength:{type:Number,default:1},maxSuggestions:{type:Number,default:10},displayAttribute:{type:String,default:"title"},valueAttribute:{type:String,default:"id"},list:{type:[Function,Array],default:function(){return[]}},removeList:{type:Boolean,default:!1},destyled:{type:Boolean,default:!1},preventSubmit:{type:Boolean,default:!0},filterByQuery:{type:Boolean,default:!1},filter:{type:Function,default:function(t,e){return!e||~this.displayProperty(t).toLowerCase().indexOf(e.toLowerCase())}},debounce:{type:Number,default:0},nullableSelect:{type:Boolean,default:!1},value:{},mode:{type:String,default:"input",validator:function(t){return!!~Object.keys(e).indexOf(t.toLowerCase())}}},watch:{mode:{handler:function(t,e){var i=this;this.constructor.options.model.event=t,this.$parent&&this.$parent.$forceUpdate(),this.$nextTick(function(){"input"===t?i.$emit("input",i.text):i.$emit("select",i.selected)})},immediate:!0},value:{handler:function(t){"string"==typeof t?this.text=t:t&&(this.text=this.displayProperty(t))},immediate:!0}},data:function(){return{selected:null,hovered:null,suggestions:[],listShown:!1,inputElement:null,canSend:!0,timeoutInstance:null,text:this.value,isPlainSuggestion:!1,isClicking:!1,isOverList:!1,isInFocus:!1,isFalseFocus:!1,isTabbed:!1,controlScheme:{},listId:this._uid+"-suggestions"}},computed:{listIsRequest:function(){return"function"==typeof this.list},inputIsComponent:function(){return this.$slots.default&&this.$slots.default.length>0&&!!this.$slots.default[0].componentInstance},input:function(){return this.inputIsComponent?this.$slots.default[0].componentInstance:this.inputElement},on:function(){return this.inputIsComponent?"$on":"addEventListener"},off:function(){return this.inputIsComponent?"$off":"removeEventListener"},hoveredIndex:function(){var t=this;return this.suggestions.findIndex(function(e){return t.hovered&&t.valueProperty(t.hovered)==t.valueProperty(e)})},textLength:function(){return this.text&&this.text.length||this.inputElement.value.length||0},isSelectedUpToDate:function(){return!!this.selected&&this.displayProperty(this.selected)===this.text}},created:function(){this.controlScheme=Object.assign({},t,this.controls)},mounted:function(){this.inputElement=this.$refs.inputSlot.querySelector("input"),this.setInputAriaAttributes(),this.prepareEventHandlers(!0)},beforeDestroy:function(){this.prepareEventHandlers(!1)},methods:{isEqual:function(t,e){return e&&this.valueProperty(t)==this.valueProperty(e)},isSelected:function(t){return this.isEqual(t,this.selected)},isHovered:function(t){return this.isEqual(t,this.hovered)},onSubmit:function(t){this.preventSubmit&&"Enter"===t.key&&(t.stopPropagation(),t.preventDefault())},setInputAriaAttributes:function(){this.inputElement.setAttribute("aria-activedescendant",""),this.inputElement.setAttribute("aria-autocomplete","list"),this.inputElement.setAttribute("aria-controls",this.listId)},prepareEventHandlers:function(t){var e=this,i=this[t?"on":"off"],s={click:this.showSuggestions,keydown:function(t){return e.moveSelection(t),e.onAutocomplete(t)},keyup:this.onListKeyUp},n=Object.assign({blur:this.onBlur,focus:this.onFocus,input:this.onInput},s);for(var o in n)this.input[i](o,n[o]);var r=t?"addEventListener":"removeEventListener";for(var u in s)this.inputElement[r](u,s[u]);if(!0===this.preventSubmit){var l=this.$el.closest("form");l&&l[r]("keydown",this.onSubmit)}},isScopedSlotEmpty:function(t){if(t){var e=t(this);return!(Array.isArray(e)||e&&(e.tag||e.context||e.text||e.children))}return!0},miscSlotsAreEmpty:function(){var t=this,e=["misc-item-above","misc-item-below"].map(function(e){return t.$scopedSlots[e]});if(e.every(function(t){return!!t}))return e.every(this.isScopedSlotEmpty.bind(this));var i=e.find(function(t){return!!t});return this.isScopedSlotEmpty.call(this,i)},getPropertyByAttribute:function(t,e){return this.isPlainSuggestion?t:void 0!==(void 0===t?"undefined":s(t))?function(t,e){return e.split(".").reduce(function(t,e){return t===Object(t)?t[e]:t},t)}(t,e):t},displayProperty:function(t){if(this.isPlainSuggestion)return t;var e=this.getPropertyByAttribute(t,this.displayAttribute);return void 0===e&&(e=JSON.stringify(t),process&&~process.env.NODE_ENV.indexOf("dev")&&console.warn("[vue-simple-suggest]: Please, provide `display-attribute` as a key or a dotted path for a property from your object.")),String(e)},valueProperty:function(t){if(this.isPlainSuggestion)return t;var e=this.getPropertyByAttribute(t,this.valueAttribute);return void 0===e&&console.error("[vue-simple-suggest]: Please, check if you passed 'value-attribute' (default is 'id') and 'display-attribute' (default is 'title') props correctly.\n Your list objects should always contain a unique identifier."),e},autocompleteText:function(t){this.setText(t)},setText:function(t){var e=this;this.$nextTick(function(){e.$emit("input",t),e.inputElement.value=t,e.text=t})},select:function(t){(this.selected!==t||this.nullableSelect&&!t)&&(this.selected=t,this.$emit("select",t),t&&this.setText(this.displayProperty(t))),this.hover(null)},hover:function(t,e){var i=t?this.getId(t,this.hoveredIndex):"";this.inputElement.setAttribute("aria-activedescendant",i),t&&t!==this.hovered&&this.$emit("hover",t,e),this.hovered=t},hoverList:function(t){this.isOverList=t},hideList:function(){this.listShown&&(this.listShown=!1,this.hover(null),this.$emit("hide-list"))},showList:function(){this.listShown||this.textLength>=this.minLength&&(this.suggestions.length>0||!this.miscSlotsAreEmpty())&&(this.listShown=!0,this.$emit("show-list"))},showSuggestions:u(function(){var t=this;return l(function(){if(0===t.suggestions.length&&t.minLength===t.textLength)return function(t,e){if(!e)return Promise.resolve(t).then(c)}(t.research())},function(){t.showList()})}),moveSelection:function(t){if(this.listShown&&this.suggestions.length&&i([this.controlScheme.selectionUp,this.controlScheme.selectionDown],t)){t.preventDefault(),this.showSuggestions();var e=i(this.controlScheme.selectionDown,t),s=2*e-1,n=e?0:this.suggestions.length-1,o=e?this.hoveredIndex<this.suggestions.length-1:this.hoveredIndex>0,r=null;r=this.hovered?o?this.suggestions[this.hoveredIndex+s]:this.suggestions[n]:this.selected||this.suggestions[n],this.hover(r)}},onListKeyUp:function(t){var e=this.controlScheme.select;i([e,this.controlScheme.hideList],t)&&(t.preventDefault(),this.listShown?(i(e,t)&&this.select(this.hovered),this.hideList()):i(e,t)&&this.research())},onAutocomplete:function(t){i(this.controlScheme.autocomplete,t)&&(t.ctrlKey||t.shiftKey)&&this.suggestions.length>0&&this.suggestions[0]&&this.listShown&&(t.preventDefault(),this.hover(this.suggestions[0]),this.setText(this.displayProperty(this.suggestions[0])))},suggestionClick:function(t,e){var i=this;this.$emit("suggestion-click",t,e),this.select(t),this.isClicking=this.isOverList=!1,this.$nextTick(function(){i.hideList()})},onBlur:function(t){var e=this;this.isInFocus?(this.isClicking=this.isOverList&&!this.isTabbed,this.isClicking?t&&t.isTrusted&&!this.isTabbed&&(this.isFalseFocus=!0,this.$nextTick(function(){e.inputElement.focus()})):(this.isInFocus=!1,this.hideList(),this.$emit("blur",t))):(this.inputElement.blur(),console.error("This should never happen!\n If you encountered this error, please make sure that your input component emits 'focus' events properly.\n For more info see https://github.com/KazanExpress/vue-simple-suggest#custom-input.\n\n If your 'vue-simple-suggest' setup does not include a custom input component - please,\n report to https://github.com/KazanExpress/vue-simple-suggest/issues/new")),this.isTabbed=!1},onFocus:function(t){this.isInFocus=!0,t&&!this.isFalseFocus&&this.$emit("focus",t),this.isFalseFocus=!1,this.isClicking||this.showSuggestions()},onInput:function(t){var e=t.target?t.target.value:t;this.text!==e&&(this.text=e,this.$emit("input",this.text),this.hovered&&this.hover(null),this.debounce?(clearTimeout(this.timeoutInstance),this.timeoutInstance=setTimeout(this.research,this.debounce)):this.research())},research:u(function(){var t=this;return n(function(){return o(function(){return function(t){var e=t();if(e&&e.then)return e.then(c)}(function(){if(t.canSend){t.canSend=!1;var e=t.$set;return r(t.getSuggestions(t.text),function(i){e.call(t,t,"suggestions",i)})}})},function(e){throw t.clearSuggestions(),e})},function(){return t.canSend=!0,0===t.suggestions.length&&t.miscSlotsAreEmpty()?t.hideList():t.showList(),t.suggestions})}),getSuggestions:u(function(t){var e=this;if((t=t||"").length<e.minLength)return e.listShown?(e.hideList(),[]):e.suggestions;e.selected=null,e.listIsRequest&&(e.$emit("request-start",t),(e.suggestions.length>0||!e.miscSlotsAreEmpty())&&e.showList());var i=[];return n(function(){return o(function(){return l(function(){if(e.listIsRequest)return r(e.list(t),function(t){i=t||[]});i=e.list},function(){Array.isArray(i)||(i=[i]),e.isPlainSuggestion="object"!==s(i[0])||Array.isArray(i[0]),e.filterByQuery&&(i=i.filter(function(i){return e.filter(i,t)})),e.listIsRequest&&e.$emit("request-done",i)})},function(t){if(!e.listIsRequest)throw t;e.$emit("request-failed",t)})},function(){return e.maxSuggestions&&i.splice(e.maxSuggestions),i})}),clearSuggestions:function(){this.suggestions.splice(0)},getId:function(t,e){return this.listId+"-suggestion-"+(this.isPlainSuggestion?e:this.valueProperty(t)||e)}}};return(Vue||window&&window.Vue)&&(Vue||window.Vue).component("vue-simple-suggest",h),h}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueSimpleSuggest=e()}(this,function(){"use strict";var t={selectionUp:[38],selectionDown:[40],select:[13],hideList:[27],autocomplete:[32,13]},e={input:String,select:Object};function i(t,e){if(t.length<=0)return!1;var i=function(t){return t.some(function(t){return t===e.keyCode})};return Array.isArray(t[0])?t.some(function(t){return i(t)}):i(t)}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function n(t,e){try{var i=t()}catch(t){return e()}return i&&i.then?i.then(e,e):e()}function o(t,e){try{var i=t()}catch(t){return e(t)}return i&&i.then?i.then(void 0,e):i}function r(t,e,i){return i?e?e(t):t:(t=Promise.resolve(t),e?t.then(e):t)}var u=function(){try{if(isNaN.apply(null,{}))return function(t){return function(){try{return Promise.resolve(t.apply(this,arguments))}catch(t){return Promise.reject(t)}}}}catch(t){}return function(t){return function(){try{return Promise.resolve(t.apply(this,Array.prototype.slice.call(arguments)))}catch(t){return Promise.reject(t)}}}}();function l(t,e){var i=t();return i&&i.then?i.then(e):e(i)}function c(){}var h={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"vue-simple-suggest",class:[t.styles.vueSimpleSuggest,{designed:!t.destyled,focus:t.isInFocus}],on:{keydown:function(e){if(!("button"in e)&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;t.isTabbed=!0}}},[i("div",{ref:"inputSlot",staticClass:"input-wrapper",class:t.styles.inputWrapper,attrs:{role:"combobox","aria-haspopup":"listbox","aria-owns":t.listId,"aria-expanded":t.listShown&&!t.removeList?"true":"false"}},[t._t("default",[i("input",t._b({staticClass:"default-input",class:t.styles.defaultInput,domProps:{value:t.text||""}},"input",t.$attrs,!1))])],2),t._v(" "),i("transition",{attrs:{name:"vue-simple-suggest"}},[t.listShown&&!t.removeList?i("ul",{staticClass:"suggestions",class:t.styles.suggestions,attrs:{id:t.listId,role:"listbox","aria-labelledby":t.listId},on:{mouseenter:function(e){t.hoverList(!0)},mouseleave:function(e){t.hoverList(!1)}}},[this.$scopedSlots["misc-item-above"]?i("li",[t._t("misc-item-above",null,{suggestions:t.suggestions,query:t.text})],2):t._e(),t._v(" "),t._l(t.suggestions,function(e,s){return i("li",{key:t.getId(e,s),staticClass:"suggest-item",class:[t.styles.suggestItem,{selected:t.isSelected(e),hover:t.isHovered(e)}],attrs:{role:"option","aria-selected":t.isHovered(e)||t.isSelected(e)?"true":"false",id:t.getId(e,s)},on:{mouseenter:function(i){t.hover(e,i.target)},mouseleave:function(e){t.hover(void 0)},click:function(i){t.suggestionClick(e,i)}}},[t._t("suggestion-item",[i("span",[t._v(t._s(t.displayProperty(e)))])],{autocomplete:function(){return t.setText(t.displayProperty(e))},suggestion:e,query:t.text})],2)}),t._v(" "),this.$scopedSlots["misc-item-below"]?i("li",[t._t("misc-item-below",null,{suggestions:t.suggestions,query:t.text})],2):t._e()],2):t._e()])],1)},staticRenderFns:[],name:"vue-simple-suggest",inheritAttrs:!1,model:{prop:"value",event:"input"},props:{styles:{type:Object,default:function(){return{}}},controls:{type:Object,default:function(){return t}},minLength:{type:Number,default:1},maxSuggestions:{type:Number,default:10},displayAttribute:{type:String,default:"title"},valueAttribute:{type:String,default:"id"},list:{type:[Function,Array],default:function(){return[]}},removeList:{type:Boolean,default:!1},destyled:{type:Boolean,default:!1},preventSubmit:{type:Boolean,default:!0},filterByQuery:{type:Boolean,default:!1},filter:{type:Function,default:function(t,e){return!e||~this.displayProperty(t).toLowerCase().indexOf(e.toLowerCase())}},debounce:{type:Number,default:0},nullableSelect:{type:Boolean,default:!1},value:{},mode:{type:String,default:"input",validator:function(t){return!!~Object.keys(e).indexOf(t.toLowerCase())}}},watch:{mode:{handler:function(t,e){var i=this;this.constructor.options.model.event=t,this.$parent&&this.$parent.$forceUpdate(),this.$nextTick(function(){"input"===t?i.$emit("input",i.text):i.$emit("select",i.selected)})},immediate:!0},value:{handler:function(t){"string"==typeof t?this.text=t:t&&(this.text=this.displayProperty(t))},immediate:!0}},data:function(){return{selected:null,hovered:null,suggestions:[],listShown:!1,inputElement:null,canSend:!0,timeoutInstance:null,text:this.value,isPlainSuggestion:!1,isClicking:!1,isOverList:!1,isInFocus:!1,isFalseFocus:!1,isTabbed:!1,controlScheme:{},listId:this._uid+"-suggestions"}},computed:{listIsRequest:function(){return"function"==typeof this.list},inputIsComponent:function(){return this.$slots.default&&this.$slots.default.length>0&&!!this.$slots.default[0].componentInstance},input:function(){return this.inputIsComponent?this.$slots.default[0].componentInstance:this.inputElement},on:function(){return this.inputIsComponent?"$on":"addEventListener"},off:function(){return this.inputIsComponent?"$off":"removeEventListener"},hoveredIndex:function(){var t=this;return this.suggestions.findIndex(function(e){return t.hovered&&t.valueProperty(t.hovered)==t.valueProperty(e)})},textLength:function(){return this.text&&this.text.length||this.inputElement.value.length||0},isSelectedUpToDate:function(){return!!this.selected&&this.displayProperty(this.selected)===this.text}},created:function(){this.controlScheme=Object.assign({},t,this.controls)},mounted:function(){this.inputElement=this.$refs.inputSlot.querySelector("input"),this.setInputAriaAttributes(),this.prepareEventHandlers(!0)},beforeDestroy:function(){this.prepareEventHandlers(!1)},methods:{isEqual:function(t,e){return e&&this.valueProperty(t)==this.valueProperty(e)},isSelected:function(t){return this.isEqual(t,this.selected)},isHovered:function(t){return this.isEqual(t,this.hovered)},onSubmit:function(t){this.preventSubmit&&"Enter"===t.key&&(t.stopPropagation(),t.preventDefault())},setInputAriaAttributes:function(){this.inputElement.setAttribute("aria-activedescendant",""),this.inputElement.setAttribute("aria-autocomplete","list"),this.inputElement.setAttribute("aria-controls",this.listId)},prepareEventHandlers:function(t){var e=this,i=this[t?"on":"off"],s={click:this.showSuggestions,keydown:function(t){return e.moveSelection(t),e.onAutocomplete(t)},keyup:this.onListKeyUp},n=Object.assign({blur:this.onBlur,focus:this.onFocus,input:this.onInput},s);for(var o in n)this.input[i](o,n[o]);var r=t?"addEventListener":"removeEventListener";for(var u in s)this.inputElement[r](u,s[u]);if(!0===this.preventSubmit){var l=this.$el.closest("form");l&&l[r]("keydown",this.onSubmit)}},isScopedSlotEmpty:function(t){if(t){var e=t(this);return!(Array.isArray(e)||e&&(e.tag||e.context||e.text||e.children))}return!0},miscSlotsAreEmpty:function(){var t=this,e=["misc-item-above","misc-item-below"].map(function(e){return t.$scopedSlots[e]});if(e.every(function(t){return!!t}))return e.every(this.isScopedSlotEmpty.bind(this));var i=e.find(function(t){return!!t});return this.isScopedSlotEmpty.call(this,i)},getPropertyByAttribute:function(t,e){return this.isPlainSuggestion?t:void 0!==(void 0===t?"undefined":s(t))?function(t,e){return e.split(".").reduce(function(t,e){return t===Object(t)?t[e]:t},t)}(t,e):t},displayProperty:function(t){if(this.isPlainSuggestion)return t;var e=this.getPropertyByAttribute(t,this.displayAttribute);return void 0===e&&(e=JSON.stringify(t),process&&~process.env.NODE_ENV.indexOf("dev")&&console.warn("[vue-simple-suggest]: Please, provide `display-attribute` as a key or a dotted path for a property from your object.")),String(e)},valueProperty:function(t){if(this.isPlainSuggestion)return t;var e=this.getPropertyByAttribute(t,this.valueAttribute);return void 0===e&&console.error("[vue-simple-suggest]: Please, check if you passed 'value-attribute' (default is 'id') and 'display-attribute' (default is 'title') props correctly.\n Your list objects should always contain a unique identifier."),e},autocompleteText:function(t){this.setText(t)},setText:function(t){var e=this;this.$nextTick(function(){e.$emit("input",t),e.inputElement.value=t,e.text=t})},select:function(t){(this.selected!==t||this.nullableSelect&&!t)&&(this.selected=t,this.$emit("select",t),t&&this.setText(this.displayProperty(t))),this.hover(null)},hover:function(t,e){var i=t?this.getId(t,this.hoveredIndex):"";this.inputElement.setAttribute("aria-activedescendant",i),t&&t!==this.hovered&&this.$emit("hover",t,e),this.hovered=t},hoverList:function(t){this.isOverList=t},hideList:function(){this.listShown&&(this.listShown=!1,this.hover(null),this.$emit("hide-list"))},showList:function(){this.listShown||this.textLength>=this.minLength&&(this.suggestions.length>0||!this.miscSlotsAreEmpty())&&(this.listShown=!0,this.$emit("show-list"))},showSuggestions:u(function(){var t=this;return l(function(){if(0===t.suggestions.length&&t.minLength===t.textLength)return function(t,e){if(!e)return Promise.resolve(t).then(c)}(t.research())},function(){t.showList()})}),moveSelection:function(t){if(this.listShown&&this.suggestions.length&&i([this.controlScheme.selectionUp,this.controlScheme.selectionDown],t)){t.preventDefault(),this.showSuggestions();var e=i(this.controlScheme.selectionDown,t),s=2*e-1,n=e?0:this.suggestions.length-1,o=e?this.hoveredIndex<this.suggestions.length-1:this.hoveredIndex>0,r=null;r=this.hovered?o?this.suggestions[this.hoveredIndex+s]:this.suggestions[n]:this.selected||this.suggestions[n],this.hover(r)}},onListKeyUp:function(t){var e=this.controlScheme.select;i([e,this.controlScheme.hideList],t)&&(t.preventDefault(),this.listShown?(i(e,t)&&this.select(this.hovered),this.hideList()):i(e,t)&&this.research())},onAutocomplete:function(t){i(this.controlScheme.autocomplete,t)&&(t.ctrlKey||t.shiftKey)&&this.suggestions.length>0&&this.suggestions[0]&&this.listShown&&(t.preventDefault(),this.hover(this.suggestions[0]),this.setText(this.displayProperty(this.suggestions[0])))},suggestionClick:function(t,e){var i=this;this.$emit("suggestion-click",t,e),this.select(t),this.isClicking=this.isOverList=!1,this.$nextTick(function(){i.hideList()})},onBlur:function(t){var e=this;this.isInFocus?(this.isClicking=this.isOverList&&!this.isTabbed,this.isClicking?t&&t.isTrusted&&!this.isTabbed&&(this.isFalseFocus=!0,this.$nextTick(function(){e.inputElement.focus()})):(this.isInFocus=!1,this.hideList(),this.$emit("blur",t))):(this.inputElement.blur(),console.error("This should never happen!\n If you encountered this error, please make sure that your input component emits 'focus' events properly.\n For more info see https://github.com/KazanExpress/vue-simple-suggest#custom-input.\n\n If your 'vue-simple-suggest' setup does not include a custom input component - please,\n report to https://github.com/KazanExpress/vue-simple-suggest/issues/new")),this.isTabbed=!1},onFocus:function(t){this.isInFocus=!0,t&&!this.isFalseFocus&&this.$emit("focus",t),this.isFalseFocus=!1,this.isClicking||this.showSuggestions()},onInput:function(t){var e=t.target?t.target.value:t;this.text!==e&&(this.text=e,this.$emit("input",this.text),this.hovered&&this.hover(null),this.debounce?(clearTimeout(this.timeoutInstance),this.timeoutInstance=setTimeout(this.research,this.debounce)):this.research())},research:u(function(){var t=this;return n(function(){return o(function(){return function(t){var e=t();if(e&&e.then)return e.then(c)}(function(){if(t.canSend){t.canSend=!1;var e=t.$set;return r(t.getSuggestions(t.text),function(i){e.call(t,t,"suggestions",i)})}})},function(e){throw t.clearSuggestions(),e})},function(){return t.canSend=!0,0===t.suggestions.length&&t.miscSlotsAreEmpty()?t.hideList():t.showList(),t.suggestions})}),getSuggestions:u(function(t){var e=this;if((t=t||"").length<e.minLength)return e.listShown?(e.hideList(),[]):e.suggestions;e.selected=null,e.listIsRequest&&(e.$emit("request-start",t),(e.suggestions.length>0||!e.miscSlotsAreEmpty())&&e.showList());var i=[];return n(function(){return o(function(){return l(function(){if(e.listIsRequest)return r(e.list(t),function(t){i=t||[]});i=e.list},function(){Array.isArray(i)||(i=[i]),e.isPlainSuggestion="object"!==s(i[0])||Array.isArray(i[0]),e.filterByQuery&&(i=i.filter(function(i){return e.filter(i,t)})),e.listIsRequest&&e.$emit("request-done",i)})},function(t){if(!e.listIsRequest)throw t;e.$emit("request-failed",t)})},function(){return e.maxSuggestions&&i.splice(e.maxSuggestions),i})}),clearSuggestions:function(){this.suggestions.splice(0)},getId:function(t,e){return this.listId+"-suggestion-"+(this.isPlainSuggestion?e:this.valueProperty(t)||e)}}};return(Vue||window&&window.Vue)&&(Vue||window.Vue).component("vue-simple-suggest",h),h}); |
{ | ||
"name": "vue-simple-suggest", | ||
"description": "Feature-rich autocomplete component for Vue.js", | ||
"version": "1.9.3", | ||
"version": "1.9.4", | ||
"author": "KazanExpress", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -294,3 +294,3 @@ # vue-simple-suggest | ||
mode="input" | ||
:placeholder="placeholder!!!" | ||
placeholder="placeholder!!!" | ||
:list="getListFunction" | ||
@@ -306,2 +306,3 @@ :max-suggestions="10" | ||
:value="defaultValue" | ||
:nullable-select="true" | ||
:controls="{ | ||
@@ -447,3 +448,3 @@ selectionUp: [38, 33], | ||
| `value-attribute` | String | `'id'` | The property in a suggestion object to use as a unique key. Supports dotted paths. | | ||
| `list` | Funciton or Array | `() => []` | The array provider function, must accept a query as its only argument. Can return an array or a promise. Can be async. The component behaves as a simple input without this function. | | ||
| `list` | Function or Array | `() => []` | The array provider function, must accept a query as its only argument. Can return an array or a promise. Can be async. The component behaves as a simple input without this function. | | ||
| `debounce` | Number | `0` | Determines the `list` debounce (a time between the input event and a function execution). | | ||
@@ -520,3 +521,3 @@ | `destyled` | Boolean | `false` | Whether to cancel the default styling of input and suggestions list. | | ||
|------|-----------|-------------| | ||
|`showSuggestions`| Alias for `onInputClick`. Will replace it in the future releases | | ||
|`showSuggestions`|| Alias for `onInputClick`. Will replace it in the future releases | | ||
|`onInput`| HTML input event | Fires whenever the input text is changed. Emits the [`input`](#emitted-events) event. | | ||
@@ -527,3 +528,3 @@ |`onFocus`| HTML focus event | Fires whenever the input comes into focus, emits the [`focus`](#emitted-events) event. | | ||
|`onListKeyUp`| HTML keyup event | Fires on component keyup. Internally used for hiding the list. | | ||
|`moveSelection`| Alias for `onArrowKeyDown`. Will replace it in the future releases. | | ||
|`moveSelection`|| Alias for `onArrowKeyDown`. Will replace it in the future releases. | | ||
@@ -783,3 +784,3 @@ ----- | ||
<!-- prettier-ignore --> | ||
<table><tr><td align="center"><a href="https://github.com/Raiondesu"><img src="https://avatars3.githubusercontent.com/u/19854420?v=4" width="100px;" alt="Alexey"/><br /><sub><b>Alexey</b></sub></a><br /><a href="#creator-Raiondesu" title="Original creator">π</a></td><td align="center"><a href="https://github.com/kaskar2008"><img src="https://avatars3.githubusercontent.com/u/6456858?v=4" width="100px;" alt="Karen"/><br /><sub><b>Karen</b></sub></a><br /><a href="#creator-pokerface-kaskar2008" title="Original creator">π</a></td><td align="center"><a href="http://simeon.fyi"><img src="https://avatars3.githubusercontent.com/u/28311328?v=4" width="100px;" alt="Simeon Kerkola"/><br /><sub><b>Simeon Kerkola</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=sssmi" title="Code">π»</a> <a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=sssmi" title="Documentation">π</a> <a href="#ideas-sssmi" title="Ideas, Planning, & Feedback">π€</a></td><td align="center"><a href="https://github.com/rcostalenz"><img src="https://avatars0.githubusercontent.com/u/4765136?v=4" width="100px;" alt="Roberson Costa"/><br /><sub><b>Roberson Costa</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=rcostalenz" title="Code">π»</a> <a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=rcostalenz" title="Documentation">π</a> <a href="#ideas-rcostalenz" title="Ideas, Planning, & Feedback">π€</a></td><td align="center"><a href="https://github.com/rosdi"><img src="https://avatars2.githubusercontent.com/u/5094028?v=4" width="100px;" alt="Rosdi Kasim"/><br /><sub><b>Rosdi Kasim</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=rosdi" title="Documentation">π</a></td><td align="center"><a href="https://github.com/antoinematyja"><img src="https://avatars2.githubusercontent.com/u/9961462?v=4" width="100px;" alt="antoinematyja"/><br /><sub><b>antoinematyja</b></sub></a><br /><a href="#ideas-antoinematyja" title="Ideas, Planning, & Feedback">π€</a></td><td align="center"><a href="http://www.contoweb.ch/"><img src="https://avatars1.githubusercontent.com/u/24254923?v=4" width="100px;" alt="Matthias Martin"/><br /><sub><b>Matthias Martin</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Amatthiascw" title="Bug reports">π</a></td></tr><tr><td align="center"><a href="http://robjbrain.com"><img src="https://avatars0.githubusercontent.com/u/10143910?v=4" width="100px;" alt="Rob Brain"/><br /><sub><b>Rob Brain</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Arobjbrain" title="Bug reports">π</a> <a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Arobjbrain" title="Bug reports">π</a></td><td align="center"><a href="https://github.com/MrWook"><img src="https://avatars1.githubusercontent.com/u/20294042?v=4" width="100px;" alt="MrWook"/><br /><sub><b>MrWook</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3AMrWook" title="Bug reports">π</a></td><td align="center"><a href="https://github.com/nattam"><img src="https://avatars3.githubusercontent.com/u/19463672?v=4" width="100px;" alt="nattam"/><br /><sub><b>nattam</b></sub></a><br /><a href="#ideas-nattam" title="Ideas, Planning, & Feedback">π€</a></td><td align="center"><a href="https://github.com/petyunchik"><img src="https://avatars1.githubusercontent.com/u/673497?v=4" width="100px;" alt="Petr"/><br /><sub><b>Petr</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Apetyunchik" title="Bug reports">π</a></td><td align="center"><a href="https://github.com/RMFogarty"><img src="https://avatars0.githubusercontent.com/u/10094132?v=4" width="100px;" alt="RMFogarty"/><br /><sub><b>RMFogarty</b></sub></a><br /><a href="#question-RMFogarty" title="Answering Questions">π¬</a></td><td align="center"><a href="https://brickgale.github.io"><img src="https://avatars3.githubusercontent.com/u/6366161?v=4" width="100px;" alt="Brian Monsales"/><br /><sub><b>Brian Monsales</b></sub></a><br /><a href="#question-brickgale" title="Answering Questions">π¬</a></td><td align="center"><a href="http://www.mila76.it"><img src="https://avatars3.githubusercontent.com/u/378500?v=4" width="100px;" alt="Mila76"/><br /><sub><b>Mila76</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Amila76" title="Bug reports">π</a></td></tr><tr><td align="center"><a href="https://github.com/Lofbergio"><img src="https://avatars3.githubusercontent.com/u/1188259?v=4" width="100px;" alt="Andriy LΓΆfberg"/><br /><sub><b>Andriy LΓΆfberg</b></sub></a><br /><a href="#question-Lofbergio" title="Answering Questions">π¬</a> <a href="#ideas-Lofbergio" title="Ideas, Planning, & Feedback">π€</a> <a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=Lofbergio" title="Code">π»</a></td><td align="center"><a href="http://buno.com.br"><img src="https://avatars3.githubusercontent.com/u/5221494?v=4" width="100px;" alt="Bruno Monteiro"/><br /><sub><b>Bruno Monteiro</b></sub></a><br /><a href="#ideas-bunomonteiro" title="Ideas, Planning, & Feedback">π€</a></td><td align="center"><a href="https://github.com/hannesaasamets"><img src="https://avatars1.githubusercontent.com/u/20644595?v=4" width="100px;" alt="hannesaasamets"/><br /><sub><b>hannesaasamets</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Ahannesaasamets" title="Bug reports">π</a></td><td align="center"><a href="https://github.com/Geminii"><img src="https://avatars1.githubusercontent.com/u/9429420?v=4" width="100px;" alt="Jimmy"/><br /><sub><b>Jimmy</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3AGeminii" title="Bug reports">π</a></td><td align="center"><a href="http://www.lastmileretail.com"><img src="https://avatars0.githubusercontent.com/u/10226784?v=4" width="100px;" alt="Will Plaehn"/><br /><sub><b>Will Plaehn</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=willplaehn" title="Code">π»</a> <a href="#ideas-willplaehn" title="Ideas, Planning, & Feedback">π€</a> <a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=willplaehn" title="Documentation">π</a></td><td align="center"><a href="https://github.com/lauri911"><img src="https://avatars2.githubusercontent.com/u/12371449?v=4" width="100px;" alt="lauri911"/><br /><sub><b>lauri911</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Alauri911" title="Bug reports">π</a></td></tr></table> | ||
<table><tr><td align="center"><a href="https://github.com/Raiondesu"><img src="https://avatars3.githubusercontent.com/u/19854420?v=4" width="100px;" alt="Alexey"/><br /><sub><b>Alexey</b></sub></a><br /><a href="#creator-Raiondesu" title="Original creator">π</a></td><td align="center"><a href="https://github.com/kaskar2008"><img src="https://avatars3.githubusercontent.com/u/6456858?v=4" width="100px;" alt="Karen"/><br /><sub><b>Karen</b></sub></a><br /><a href="#creator-pokerface-kaskar2008" title="Original creator">π</a></td><td align="center"><a href="http://simeon.fyi"><img src="https://avatars3.githubusercontent.com/u/28311328?v=4" width="100px;" alt="Simeon Kerkola"/><br /><sub><b>Simeon Kerkola</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=sssmi" title="Code">π»</a> <a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=sssmi" title="Documentation">π</a> <a href="#ideas-sssmi" title="Ideas, Planning, & Feedback">π€</a></td><td align="center"><a href="https://github.com/rcostalenz"><img src="https://avatars0.githubusercontent.com/u/4765136?v=4" width="100px;" alt="Roberson Costa"/><br /><sub><b>Roberson Costa</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=rcostalenz" title="Code">π»</a> <a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=rcostalenz" title="Documentation">π</a> <a href="#ideas-rcostalenz" title="Ideas, Planning, & Feedback">π€</a></td><td align="center"><a href="https://github.com/rosdi"><img src="https://avatars2.githubusercontent.com/u/5094028?v=4" width="100px;" alt="Rosdi Kasim"/><br /><sub><b>Rosdi Kasim</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=rosdi" title="Documentation">π</a></td><td align="center"><a href="https://github.com/antoinematyja"><img src="https://avatars2.githubusercontent.com/u/9961462?v=4" width="100px;" alt="antoinematyja"/><br /><sub><b>antoinematyja</b></sub></a><br /><a href="#ideas-antoinematyja" title="Ideas, Planning, & Feedback">π€</a></td><td align="center"><a href="http://www.contoweb.ch/"><img src="https://avatars1.githubusercontent.com/u/24254923?v=4" width="100px;" alt="Matthias Martin"/><br /><sub><b>Matthias Martin</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Amatthiascw" title="Bug reports">π</a></td></tr><tr><td align="center"><a href="http://robjbrain.com"><img src="https://avatars0.githubusercontent.com/u/10143910?v=4" width="100px;" alt="Rob Brain"/><br /><sub><b>Rob Brain</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Arobjbrain" title="Bug reports">π</a> <a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Arobjbrain" title="Bug reports">π</a></td><td align="center"><a href="https://github.com/MrWook"><img src="https://avatars1.githubusercontent.com/u/20294042?v=4" width="100px;" alt="MrWook"/><br /><sub><b>MrWook</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3AMrWook" title="Bug reports">π</a></td><td align="center"><a href="https://github.com/nattam"><img src="https://avatars3.githubusercontent.com/u/19463672?v=4" width="100px;" alt="nattam"/><br /><sub><b>nattam</b></sub></a><br /><a href="#ideas-nattam" title="Ideas, Planning, & Feedback">π€</a></td><td align="center"><a href="https://github.com/petyunchik"><img src="https://avatars1.githubusercontent.com/u/673497?v=4" width="100px;" alt="Petr"/><br /><sub><b>Petr</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Apetyunchik" title="Bug reports">π</a></td><td align="center"><a href="https://github.com/RMFogarty"><img src="https://avatars0.githubusercontent.com/u/10094132?v=4" width="100px;" alt="RMFogarty"/><br /><sub><b>RMFogarty</b></sub></a><br /><a href="#question-RMFogarty" title="Answering Questions">π¬</a></td><td align="center"><a href="https://brickgale.github.io"><img src="https://avatars3.githubusercontent.com/u/6366161?v=4" width="100px;" alt="Brian Monsales"/><br /><sub><b>Brian Monsales</b></sub></a><br /><a href="#question-brickgale" title="Answering Questions">π¬</a></td><td align="center"><a href="http://www.mila76.it"><img src="https://avatars3.githubusercontent.com/u/378500?v=4" width="100px;" alt="Mila76"/><br /><sub><b>Mila76</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Amila76" title="Bug reports">π</a></td></tr><tr><td align="center"><a href="https://github.com/Lofbergio"><img src="https://avatars3.githubusercontent.com/u/1188259?v=4" width="100px;" alt="Andriy LΓΆfberg"/><br /><sub><b>Andriy LΓΆfberg</b></sub></a><br /><a href="#question-Lofbergio" title="Answering Questions">π¬</a> <a href="#ideas-Lofbergio" title="Ideas, Planning, & Feedback">π€</a> <a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=Lofbergio" title="Code">π»</a></td><td align="center"><a href="http://buno.com.br"><img src="https://avatars3.githubusercontent.com/u/5221494?v=4" width="100px;" alt="Bruno Monteiro"/><br /><sub><b>Bruno Monteiro</b></sub></a><br /><a href="#ideas-bunomonteiro" title="Ideas, Planning, & Feedback">π€</a></td><td align="center"><a href="https://github.com/hannesaasamets"><img src="https://avatars1.githubusercontent.com/u/20644595?v=4" width="100px;" alt="hannesaasamets"/><br /><sub><b>hannesaasamets</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Ahannesaasamets" title="Bug reports">π</a></td><td align="center"><a href="https://github.com/Geminii"><img src="https://avatars1.githubusercontent.com/u/9429420?v=4" width="100px;" alt="Jimmy"/><br /><sub><b>Jimmy</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3AGeminii" title="Bug reports">π</a></td><td align="center"><a href="http://www.lastmileretail.com"><img src="https://avatars0.githubusercontent.com/u/10226784?v=4" width="100px;" alt="Will Plaehn"/><br /><sub><b>Will Plaehn</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=willplaehn" title="Code">π»</a> <a href="#ideas-willplaehn" title="Ideas, Planning, & Feedback">π€</a> <a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=willplaehn" title="Documentation">π</a></td><td align="center"><a href="https://github.com/lauri911"><img src="https://avatars2.githubusercontent.com/u/12371449?v=4" width="100px;" alt="lauri911"/><br /><sub><b>lauri911</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Alauri911" title="Bug reports">π</a></td><td align="center"><a href="https://github.com/alexhyriavets"><img src="https://avatars2.githubusercontent.com/u/19614509?v=4" width="100px;" alt="Alex Hyriavets"/><br /><sub><b>Alex Hyriavets</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Aalexhyriavets" title="Bug reports">π</a></td></tr><tr><td align="center"><a href="https://github.com/behnoodk"><img src="https://avatars3.githubusercontent.com/u/12370595?v=4" width="100px;" alt="Behnood Khani"/><br /><sub><b>Behnood Khani</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/issues?q=author%3Abehnoodk" title="Bug reports">π</a></td><td align="center"><a href="http://www.haykranen.nl"><img src="https://avatars3.githubusercontent.com/u/129681?v=4" width="100px;" alt="Hay Kranen"/><br /><sub><b>Hay Kranen</b></sub></a><br /><a href="https://github.com/KazanExpress/vue-simple-suggest/commits?author=hay" title="Documentation">π</a></td></tr></table> | ||
@@ -786,0 +787,0 @@ <!-- ALL-CONTRIBUTORS-LIST:END --> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
184020
2127
784