vue-multiselect
Advanced tools
Comparing version 1.1.2 to 2.0.0-beta.1
@@ -13,11 +13,2 @@ import deepClone from './utils' | ||
/** | ||
* Decide whether to filter the results based on search query. | ||
* Useful for async filtering, where we search through more complex data. | ||
* @type {Boolean} | ||
*/ | ||
localSearch: { | ||
type: Boolean, | ||
default: true | ||
}, | ||
/** | ||
* Array of available options: Objects, Strings or Integers. | ||
@@ -52,4 +43,3 @@ * If array of objects, visible label will default to option.label. | ||
key: { | ||
type: String, | ||
default: false | ||
type: String | ||
}, | ||
@@ -62,4 +52,3 @@ /** | ||
label: { | ||
type: String, | ||
default: false | ||
type: String | ||
}, | ||
@@ -146,4 +135,3 @@ /** | ||
customLabel: { | ||
type: Function, | ||
default: false | ||
type: Function | ||
}, | ||
@@ -174,4 +162,3 @@ /** | ||
max: { | ||
type: Number, | ||
default: false | ||
type: Number | ||
}, | ||
@@ -197,3 +184,5 @@ /** | ||
: this.options | ||
if (this.localSearch) options = this.$options.filters.filterBy(options, this.search) | ||
options = this.label | ||
? options.filter((option) => option[this.label].indexOf(this.search) !== -1) | ||
: options.filter((option) => option.indexOf(this.search) !== -1) | ||
if (this.taggable && search.length && !this.isExistingOption(search)) { | ||
@@ -357,3 +346,4 @@ options.unshift({ isTag: true, label: search }) | ||
} else { | ||
this.value.$remove(option) | ||
const index = this.valueKeys.indexOf(option) | ||
this.value.splice(index, 1) | ||
} | ||
@@ -387,3 +377,3 @@ this.$emit('remove', deepClone(option), this.id) | ||
this.search = '' | ||
this.$els.search.focus() | ||
this.$el.children[1].children[2].focus() | ||
} else { | ||
@@ -405,3 +395,3 @@ this.$el.focus() | ||
if (this.searchable) { | ||
this.$els.search.blur() | ||
this.$el.children[1].children[2].blur() | ||
this.adjustSearch() | ||
@@ -408,0 +398,0 @@ } else { |
@@ -5,3 +5,3 @@ module.exports = { | ||
pointer: 0, | ||
visibleElements: this.maxHeight / this.optionHeight | ||
visibleElements: this.maxHeight / 40 | ||
} | ||
@@ -18,11 +18,2 @@ }, | ||
default: true | ||
}, | ||
/** | ||
* Sets the height of the option. Used for scroll calculations | ||
* @type {Number} | ||
* @default 40 | ||
*/ | ||
optionHeight: { | ||
type: Number, | ||
default: 40 | ||
} | ||
@@ -32,3 +23,3 @@ }, | ||
pointerPosition () { | ||
return this.pointer * this.optionHeight | ||
return this.pointer * 40 | ||
} | ||
@@ -42,2 +33,8 @@ }, | ||
methods: { | ||
optionHighlight (index, option) { | ||
return { | ||
'multiselect__option--highlight': index === this.pointer && this.showPointer, | ||
'multiselect__option--selected': !this.isNotSelected(option) | ||
} | ||
}, | ||
addPointerElement () { | ||
@@ -52,4 +49,4 @@ if (this.filteredOptions.length > 0) { | ||
this.pointer++ | ||
if (this.$els.list.scrollTop <= this.pointerPosition - this.visibleElements * this.optionHeight) { | ||
this.$els.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight | ||
if (this.$refs.list.scrollTop <= this.pointerPosition - this.visibleElements * 40) { | ||
this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * 40 | ||
} | ||
@@ -61,4 +58,4 @@ } | ||
this.pointer-- | ||
if (this.$els.list.scrollTop >= this.pointerPosition) { | ||
this.$els.list.scrollTop = this.pointerPosition | ||
if (this.$refs.list.scrollTop >= this.pointerPosition) { | ||
this.$refs.list.scrollTop = this.pointerPosition | ||
} | ||
@@ -71,4 +68,4 @@ } | ||
this.pointer = 0 | ||
if (this.$els.list) { | ||
this.$els.list.scrollTop = 0 | ||
if (this.$refs.list) { | ||
this.$refs.list.scrollTop = 0 | ||
} | ||
@@ -75,0 +72,0 @@ }, |
@@ -1,3 +0,3 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueMultiselect=e():t.VueMultiselect=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="/",e(0)}([function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.deepClone=e.pointerMixin=e.multiselectMixin=e.Multiselect=void 0;var o=n(80),r=i(o),s=n(28),l=i(s),a=n(29),u=i(a),c=n(30),f=i(c);e["default"]=r["default"],e.Multiselect=r["default"],e.multiselectMixin=l["default"],e.pointerMixin=u["default"],e.deepClone=f["default"]},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(55),o=n(15);t.exports=function(t){return i(o(t))}},function(t,e,n){t.exports=!n(9)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(6),o=n(13);t.exports=n(4)?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(11),o=n(34),r=n(25),s=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(i(t),e=r(e,!0),i(n),o)try{return s(t,e,n)}catch(l){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(23)("wks"),o=n(14),r=n(1).Symbol,s="function"==typeof r,l=t.exports=function(t){return i[t]||(i[t]=s&&r[t]||(s?r:o)("Symbol."+t))};l.store=i},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){var i=n(39),o=n(16);t.exports=Object.keys||function(t){return i(t,o)}},function(t,e,n){var i=n(12);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(1),o=n(8),r=n(52),s=n(5),l="prototype",a=function(t,e,n){var u,c,f,p=t&a.F,d=t&a.G,h=t&a.S,m=t&a.P,v=t&a.B,b=t&a.W,g=d?o:o[e]||(o[e]={}),y=g[l],x=d?i:h?i[e]:(i[e]||{})[l];d&&(n=e);for(u in n)c=!p&&x&&void 0!==x[u],c&&u in g||(f=c?x[u]:n[u],g[u]=d&&"function"!=typeof x[u]?n[u]:v&&c?r(f,i):b&&x[u]==f?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e[l]=t[l],e}(f):m&&"function"==typeof f?r(Function.call,f):f,m&&((g.virtual||(g.virtual={}))[u]=f,t&a.R&&y&&!y[u]&&s(y,u,f)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e){t.exports={}},function(t,e){t.exports=!0},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(6).f,o=n(2),r=n(7)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,r)&&i(t,r,{configurable:!0,value:e})}},function(t,e,n){var i=n(23)("keys"),o=n(14);t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var i=n(1),o="__core-js_shared__",r=i[o]||(i[o]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(12);t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var i=n(1),o=n(8),r=n(19),s=n(27),l=n(6).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||l(e,t,{value:s.f(t)})}},function(t,e,n){e.f=n(7)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var o=n(31),r=i(o),s=n(30),l=i(s);t.exports={data:function(){return{search:"",isOpen:!1,value:this.selected?(0,l["default"])(this.selected):this.multiple?[]:null}},props:{localSearch:{type:Boolean,"default":!0},options:{type:Array,required:!0},multiple:{type:Boolean,"default":!1},selected:{},key:{type:String,"default":!1},label:{type:String,"default":!1},searchable:{type:Boolean,"default":!0},clearOnSelect:{type:Boolean,"default":!0},hideSelected:{type:Boolean,"default":!1},placeholder:{type:String,"default":"Select option"},maxHeight:{type:Number,"default":300},allowEmpty:{type:Boolean,"default":!0},resetAfter:{type:Boolean,"default":!1},closeOnSelect:{type:Boolean,"default":!0},customLabel:{type:Function,"default":!1},taggable:{type:Boolean,"default":!1},tagPlaceholder:{type:String,"default":"Press enter to create a tag"},max:{type:Number,"default":!1},id:{"default":null}},created:function(){this.searchable&&this.adjustSearch()},computed:{filteredOptions:function(){var t=this.search||"",e=this.hideSelected?this.options.filter(this.isNotSelected):this.options;return this.localSearch&&(e=this.$options.filters.filterBy(e,this.search)),this.taggable&&t.length&&!this.isExistingOption(t)&&e.unshift({isTag:!0,label:t}),e},valueKeys:function(){var t=this;return this.key?this.multiple?this.value.map(function(e){return e[t.key]}):this.value[this.key]:this.value},optionKeys:function(){var t=this;return this.label?this.options.map(function(e){return e[t.label]}):this.options},currentOptionLabel:function(){return this.getOptionLabel(this.value)}},watch:{value:function(){this.resetAfter&&(this.$set("value",null),this.$set("search",null),this.$set("selected",null)),this.adjustSearch()},search:function(){this.search!==this.currentOptionLabel&&this.$emit("search-change",this.search,this.id)},selected:function(t,e){this.value=(0,l["default"])(this.selected)}},methods:{isExistingOption:function(t){return this.options?this.optionKeys.indexOf(t)>-1:!1},isSelected:function(t){if(!this.value)return!1;var e=this.key?t[this.key]:t;return this.multiple?this.valueKeys.indexOf(e)>-1:this.valueKeys===e},isNotSelected:function(t){return!this.isSelected(t)},getOptionLabel:function(t){return"object"!==("undefined"==typeof t?"undefined":(0,r["default"])(t))||null===t?t:this.customLabel?this.customLabel(t):this.label&&t[this.label]?t[this.label]:t.label?t.label:void 0},select:function(t){if(!this.max||!this.multiple||this.value.length!==this.max)if(t.isTag)this.$emit("tag",t.label,this.id),this.search="";else{if(this.multiple)this.isNotSelected(t)?(this.value.push(t),this.$emit("select",(0,l["default"])(t),this.id),this.$emit("update",(0,l["default"])(this.value),this.id)):this.removeElement(t);else{var e=this.isSelected(t);if(e&&!this.allowEmpty)return;this.value=e?null:t,this.$emit("select",(0,l["default"])(t),this.id),this.$emit("update",(0,l["default"])(this.value),this.id)}this.closeOnSelect&&this.deactivate()}},removeElement:function(t){if(this.allowEmpty||!(this.value.length<=1)){if(this.multiple&&"object"===("undefined"==typeof t?"undefined":(0,r["default"])(t))){var e=this.valueKeys.indexOf(t[this.key]);this.value.splice(e,1)}else this.value.$remove(t);this.$emit("remove",(0,l["default"])(t),this.id),this.$emit("update",(0,l["default"])(this.value),this.id)}},removeLastElement:function(){0===this.search.length&&Array.isArray(this.value)&&this.removeElement(this.value[this.value.length-1])},activate:function(){this.isOpen||(this.isOpen=!0,this.searchable?(this.search="",this.$els.search.focus()):this.$el.focus(),this.$emit("open",this.id))},deactivate:function(){this.isOpen&&(this.isOpen=!1,this.searchable?(this.$els.search.blur(),this.adjustSearch()):this.$el.blur(),this.$emit("close",(0,l["default"])(this.value),this.id))},adjustSearch:function(){this.searchable&&this.clearOnSelect&&(this.search=this.multiple?"":this.currentOptionLabel)},toggle:function(){this.isOpen?this.deactivate():this.activate()}}}},function(t,e){"use strict";t.exports={data:function(){return{pointer:0,visibleElements:this.maxHeight/this.optionHeight}},props:{showPointer:{type:Boolean,"default":!0},optionHeight:{type:Number,"default":40}},computed:{pointerPosition:function(){return this.pointer*this.optionHeight}},watch:{filteredOptions:function(){this.pointerAdjust()}},methods:{addPointerElement:function(){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer]),this.pointerReset()},pointerForward:function(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$els.list.scrollTop<=this.pointerPosition-this.visibleElements*this.optionHeight&&(this.$els.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight))},pointerBackward:function(){this.pointer>0&&(this.pointer--,this.$els.list.scrollTop>=this.pointerPosition&&(this.$els.list.scrollTop=this.pointerPosition))},pointerReset:function(){this.closeOnSelect&&(this.pointer=0,this.$els.list&&(this.$els.list.scrollTop=0))},pointerAdjust:function(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0)},pointerSet:function(t){this.pointer=t}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var o=n(43),r=i(o),s=n(31),l=i(s),a=function u(t){if(Array.isArray(t))return t.map(u);if(t&&"object"===("undefined"==typeof t?"undefined":(0,l["default"])(t))){for(var e={},n=(0,r["default"])(t),i=0,o=n.length;o>i;i++){var s=n[i];e[s]=u(t[s])}return e}return t};t.exports=a},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(45),r=i(o),s=n(44),l=i(s),a="function"==typeof l["default"]&&"symbol"==typeof r["default"]?function(t){return typeof t}:function(t){return t&&"function"==typeof l["default"]&&t.constructor===l["default"]?"symbol":typeof t};e["default"]="function"==typeof l["default"]&&"symbol"===a(r["default"])?function(t){return"undefined"==typeof t?"undefined":a(t)}:function(t){return t&&"function"==typeof l["default"]&&t.constructor===l["default"]?"symbol":"undefined"==typeof t?"undefined":a(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(12),o=n(1).document,r=i(o)&&i(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},function(t,e,n){t.exports=!n(4)&&!n(9)(function(){return 7!=Object.defineProperty(n(33)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var i=n(19),o=n(17),r=n(40),s=n(5),l=n(2),a=n(18),u=n(57),c=n(21),f=n(64),p=n(7)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",v="values",b=function(){return this};t.exports=function(t,e,n,g,y,x,_){u(n,e,g);var w,O,S,k=function(t){if(!d&&t in M)return M[t];switch(t){case m:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},j=e+" Iterator",E=y==v,P=!1,M=t.prototype,L=M[p]||M[h]||y&&M[y],A=L||k(y),T=y?E?k("entries"):A:void 0,$="Array"==e?M.entries||L:L;if($&&(S=f($.call(new t)),S!==Object.prototype&&(c(S,j,!0),i||l(S,p)||s(S,p,b))),E&&L&&L.name!==v&&(P=!0,A=function(){return L.call(this)}),i&&!_||!d&&!P&&M[p]||s(M,p,A),a[e]=A,a[j]=b,y)if(w={values:E?A:k(v),keys:x?A:k(m),entries:T},_)for(O in w)O in M||r(M,O,w[O]);else o(o.P+o.F*(d||P),e,w);return w}},function(t,e,n){var i=n(11),o=n(61),r=n(16),s=n(22)("IE_PROTO"),l=function(){},a="prototype",u=function(){var t,e=n(33)("iframe"),i=r.length,o=">";for(e.style.display="none",n(54).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object</script"+o),t.close(),u=t.F;i--;)delete u[a][r[i]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(l[a]=i(t),n=new l,l[a]=null,n[s]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e,n){var i=n(39),o=n(16).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(2),o=n(3),r=n(51)(!1),s=n(22)("IE_PROTO");t.exports=function(t,e){var n,l=o(t),a=0,u=[];for(n in l)n!=s&&i(l,n)&&u.push(n);for(;e.length>a;)i(l,n=e[a++])&&(~r(u,n)||u.push(n));return u}},function(t,e,n){t.exports=n(5)},function(t,e,n){var i=n(15);t.exports=function(t){return Object(i(t))}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(28),r=i(o),s=n(29),l=i(s);e["default"]={mixins:[r["default"],l["default"]],props:{optionPartial:{type:String,"default":""},selectLabel:{type:String,"default":"Press enter to select"},selectedLabel:{type:String,"default":"Selected"},deselectLabel:{type:String,"default":"Press enter to remove"},showLabels:{type:Boolean,"default":!0},limit:{type:Number,"default":99999},limitText:{type:Function,"default":function(t){return"and "+t+" more"}},loading:{type:Boolean,"default":!1},disabled:{type:Boolean,"default":!1}},computed:{visibleValue:function(){return this.multiple?this.value.slice(0,this.limit):this.value}},ready:function(){this.showLabels||(this.deselectLabel=this.selectedLabel=this.selectLabel="")}}},function(t,e,n){t.exports={"default":n(46),__esModule:!0}},function(t,e,n){t.exports={"default":n(47),__esModule:!0}},function(t,e,n){t.exports={"default":n(48),__esModule:!0}},function(t,e,n){n(70),t.exports=n(8).Object.keys},function(t,e,n){n(73),n(71),n(74),n(75),t.exports=n(8).Symbol},function(t,e,n){n(72),n(76),t.exports=n(27).f("iterator")},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(){}},function(t,e,n){var i=n(3),o=n(68),r=n(67);t.exports=function(t){return function(e,n,s){var l,a=i(e),u=o(a.length),c=r(s,u);if(t&&n!=n){for(;u>c;)if(l=a[c++],l!=l)return!0}else for(;u>c;c++)if((t||c in a)&&a[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var i=n(49);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(10),o=n(38),r=n(20);t.exports=function(t){var e=i(t),n=o.f;if(n)for(var s,l=n(t),a=r.f,u=0;l.length>u;)a.call(t,s=l[u++])&&e.push(s);return e}},function(t,e,n){t.exports=n(1).document&&document.documentElement},function(t,e,n){var i=n(32);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(32);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";var i=n(36),o=n(13),r=n(21),s={};n(5)(s,n(7)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:o(1,n)}),r(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var i=n(10),o=n(3);t.exports=function(t,e){for(var n,r=o(t),s=i(r),l=s.length,a=0;l>a;)if(r[n=s[a++]]===e)return n}},function(t,e,n){var i=n(14)("meta"),o=n(12),r=n(2),s=n(6).f,l=0,a=Object.isExtensible||function(){return!0},u=!n(9)(function(){return a(Object.preventExtensions({}))}),c=function(t){s(t,i,{value:{i:"O"+ ++l,w:{}}})},f=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!r(t,i)){if(!a(t))return"F";if(!e)return"E";c(t)}return t[i].i},p=function(t,e){if(!r(t,i)){if(!a(t))return!0;if(!e)return!1;c(t)}return t[i].w},d=function(t){return u&&h.NEED&&a(t)&&!r(t,i)&&c(t),t},h=t.exports={KEY:i,NEED:!1,fastKey:f,getWeak:p,onFreeze:d}},function(t,e,n){var i=n(6),o=n(11),r=n(10);t.exports=n(4)?Object.defineProperties:function(t,e){o(t);for(var n,s=r(e),l=s.length,a=0;l>a;)i.f(t,n=s[a++],e[n]);return t}},function(t,e,n){var i=n(20),o=n(13),r=n(3),s=n(25),l=n(2),a=n(34),u=Object.getOwnPropertyDescriptor;e.f=n(4)?u:function(t,e){if(t=r(t),e=s(e,!0),a)try{return u(t,e)}catch(n){}return l(t,e)?o(!i.f.call(t,e),t[e]):void 0}},function(t,e,n){var i=n(3),o=n(37).f,r={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(t){try{return o(t)}catch(e){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==r.call(t)?l(t):o(i(t))}},function(t,e,n){var i=n(2),o=n(41),r=n(22)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),i(t,r)?t[r]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var i=n(17),o=n(8),r=n(9);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],s={};s[t]=e(n),i(i.S+i.F*r(function(){n(1)}),"Object",s)}},function(t,e,n){var i=n(24),o=n(15);t.exports=function(t){return function(e,n){var r,s,l=String(o(e)),a=i(n),u=l.length;return 0>a||a>=u?t?"":void 0:(r=l.charCodeAt(a),55296>r||r>56319||a+1===u||(s=l.charCodeAt(a+1))<56320||s>57343?t?l.charAt(a):r:t?l.slice(a,a+2):(r-55296<<10)+(s-56320)+65536)}}},function(t,e,n){var i=n(24),o=Math.max,r=Math.min;t.exports=function(t,e){return t=i(t),0>t?o(t+e,0):r(t,e)}},function(t,e,n){var i=n(24),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},function(t,e,n){"use strict";var i=n(50),o=n(58),r=n(18),s=n(3);t.exports=n(35)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(t,e,n){var i=n(41),o=n(10);n(65)("keys",function(){return function(t){return o(i(t))}})},function(t,e){},function(t,e,n){"use strict";var i=n(66)(!0);n(35)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var i=n(1),o=n(2),r=n(4),s=n(17),l=n(40),a=n(60).KEY,u=n(9),c=n(23),f=n(21),p=n(14),d=n(7),h=n(27),m=n(26),v=n(59),b=n(53),g=n(56),y=n(11),x=n(3),_=n(25),w=n(13),O=n(36),S=n(63),k=n(62),j=n(6),E=n(10),P=k.f,M=j.f,L=S.f,A=i.Symbol,T=i.JSON,$=T&&T.stringify,N="prototype",B=d("_hidden"),C=d("toPrimitive"),F={}.propertyIsEnumerable,z=c("symbol-registry"),I=c("symbols"),R=c("op-symbols"),H=Object[N],K="function"==typeof A,D=i.QObject,W=!D||!D[N]||!D[N].findChild,J=r&&u(function(){return 7!=O(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=P(H,e);i&&delete H[e],M(t,e,n),i&&t!==H&&M(H,e,i)}:M,U=function(t){var e=I[t]=O(A[N]);return e._k=t,e},V=K&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},G=function(t,e,n){return t===H&&G(R,e,n),y(t),e=_(e,!0),y(n),o(I,e)?(n.enumerable?(o(t,B)&&t[B][e]&&(t[B][e]=!1),n=O(n,{enumerable:w(0,!1)})):(o(t,B)||M(t,B,w(1,{})),t[B][e]=!0),J(t,e,n)):M(t,e,n)},q=function(t,e){y(t);for(var n,i=b(e=x(e)),o=0,r=i.length;r>o;)G(t,n=i[o++],e[n]);return t},Y=function(t,e){return void 0===e?O(t):q(O(t),e)},Q=function(t){var e=F.call(this,t=_(t,!0));return this===H&&o(I,t)&&!o(R,t)?!1:e||!o(this,t)||!o(I,t)||o(this,B)&&this[B][t]?e:!0},X=function(t,e){if(t=x(t),e=_(e,!0),t!==H||!o(I,e)||o(R,e)){var n=P(t,e);return!n||!o(I,e)||o(t,B)&&t[B][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=L(x(t)),i=[],r=0;n.length>r;)o(I,e=n[r++])||e==B||e==a||i.push(e);return i},tt=function(t){for(var e,n=t===H,i=L(n?R:x(t)),r=[],s=0;i.length>s;)o(I,e=i[s++])&&(n?o(H,e):!0)&&r.push(I[e]);return r};K||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===H&&e.call(R,n),o(this,B)&&o(this[B],t)&&(this[B][t]=!1),J(this,t,w(1,n))};return r&&W&&J(H,t,{configurable:!0,set:e}),U(t)},l(A[N],"toString",function(){return this._k}),k.f=X,j.f=G,n(37).f=S.f=Z,n(20).f=Q,n(38).f=tt,r&&!n(19)&&l(H,"propertyIsEnumerable",Q,!0),h.f=function(t){return U(d(t))}),s(s.G+s.W+s.F*!K,{Symbol:A});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var et=E(d.store),nt=0;et.length>nt;)m(et[nt++]);s(s.S+s.F*!K,"Symbol",{"for":function(t){return o(z,t+="")?z[t]:z[t]=A(t)},keyFor:function(t){if(V(t))return v(z,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){W=!0},useSimple:function(){W=!1}}),s(s.S+s.F*!K,"Object",{create:Y,defineProperty:G,defineProperties:q,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),T&&s(s.S+s.F*(!K||u(function(){var t=A();return"[null]"!=$([t])||"{}"!=$({a:t})||"{}"!=$(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!V(t)){for(var e,n,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);return e=i[1],"function"==typeof e&&(n=e),!n&&g(e)||(e=function(t,e){return n&&(e=n.call(this,t,e)),V(e)?void 0:e}),i[1]=e,$.apply(T,i)}}}),A[N][C]||n(5)(A[N],C,A[N].valueOf),f(A,"Symbol"),f(Math,"Math",!0),f(i.JSON,"JSON",!0)},function(t,e,n){n(26)("asyncIterator")},function(t,e,n){n(26)("observable")},function(t,e,n){n(69);for(var i=n(1),o=n(5),r=n(18),s=n(7)("toStringTag"),l=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],a=0;5>a;a++){var u=l[a],c=i[u],f=c&&c.prototype;f&&!f[s]&&o(f,s,u),r[u]=r.Array}},function(t,e,n){e=t.exports=n(78)(),e.push([t.id,'fieldset[disabled] .multiselect{pointer-events:none}.multiselect__spinner{position:absolute;right:1px;top:1px;width:48px;height:35px;background:#fff;display:block}.multiselect__spinner:after,.multiselect__spinner:before{position:absolute;content:"";top:50%;left:50%;margin:-8px 0 0 -8px;width:16px;height:16px;border-radius:100%;border-color:#41b883 transparent transparent;border-style:solid;border-width:2px;box-shadow:0 0 0 1px transparent}.multiselect__spinner:before{-webkit-animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__spinner:after{-webkit-animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__loading-transition{-webkit-transition:opacity .4s ease-in-out;transition:opacity .4s ease-in-out;opacity:1}.multiselect__loading-enter,.multiselect__loading-leave{opacity:0}.multiselect,.multiselect__input,.multiselect__single{font-family:inherit;font-size:14px}.multiselect{box-sizing:content-box;display:block;position:relative;width:100%;min-height:40px;text-align:left;color:#35495e}.multiselect *{box-sizing:border-box}.multiselect:focus{outline:none}.multiselect--disabled{pointer-events:none;opacity:.6}.multiselect--active{z-index:50}.multiselect--active .multiselect__current,.multiselect--active .multiselect__input,.multiselect--active .multiselect__tags{border-bottom-left-radius:0;border-bottom-right-radius:0}.multiselect--active .multiselect__select{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.multiselect__input,.multiselect__single{position:relative;display:inline-block;min-height:20px;line-height:20px;border:none;border-radius:5px;background:#fff;padding:1px 0 0 5px;width:100%;-webkit-transition:border .1s ease;transition:border .1s ease;box-sizing:border-box;margin-bottom:8px}.multiselect__tag~.multiselect__input{width:auto}.multiselect__input:hover,.multiselect__single:hover{border-color:#cfcfcf}.multiselect__input:focus,.multiselect__single:focus{border-color:#a8a8a8;outline:none}.multiselect__single{padding-left:6px;margin-bottom:8px}.multiselect__tags{min-height:40px;display:block;padding:8px 40px 0 8px;border-radius:5px;border:1px solid #e8e8e8;background:#fff}.multiselect__tag{position:relative;display:inline-block;padding:4px 26px 4px 10px;border-radius:5px;margin-right:10px;color:#fff;line-height:1;background:#41b883;margin-bottom:8px;white-space:nowrap}.multiselect__tag-icon{cursor:pointer;margin-left:7px;position:absolute;right:0;top:0;bottom:0;font-weight:700;font-style:initial;width:22px;text-align:center;line-height:22px;-webkit-transition:all .2s ease;transition:all .2s ease;border-radius:5px}.multiselect__tag-icon:after{content:"\\D7";color:#266d4d;font-size:14px}.multiselect__tag-icon:focus,.multiselect__tag-icon:hover{background:#369a6e}.multiselect__tag-icon:focus:after,.multiselect__tag-icon:hover:after{color:#fff}.multiselect__current{min-height:40px;overflow:hidden;padding:8px 12px 0;padding-right:30px;white-space:nowrap;border-radius:5px;border:1px solid #e8e8e8}.multiselect__current,.multiselect__select{line-height:16px;box-sizing:border-box;display:block;margin:0;text-decoration:none;cursor:pointer}.multiselect__select{position:absolute;width:40px;height:38px;right:1px;top:1px;padding:4px 8px;text-align:center;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.multiselect__select:before{position:relative;right:0;top:65%;color:#999;margin-top:4px;border-style:solid;border-width:5px 5px 0;border-color:#999 transparent transparent;content:""}.multiselect__placeholder{color:#adadad;display:inline-block;margin-bottom:10px;padding-top:2px}.multiselect--active .multiselect__placeholder{display:none}.multiselect__content{position:absolute;list-style:none;display:block;background:#fff;width:100%;max-height:240px;overflow:auto;padding:0;margin:0;border:1px solid #e8e8e8;border-top:none;border-bottom-left-radius:5px;border-bottom-right-radius:5px;z-index:50}.multiselect__content::webkit-scrollbar{display:none}.multiselect__option{display:block;padding:12px;min-height:40px;line-height:16px;text-decoration:none;text-transform:none;vertical-align:middle;position:relative;cursor:pointer;white-space:nowrap}.multiselect__option:after{top:0;right:0;position:absolute;line-height:40px;padding-right:12px;padding-left:20px}.multiselect__option--highlight{background:#41b883;outline:none;color:#fff}.multiselect__option--highlight:after{content:attr(data-select);background:#41b883;color:#fff}.multiselect__option--selected{background:#f3f3f3;color:#35495e;font-weight:700}.multiselect__option--selected:after{content:attr(data-selected);color:silver}.multiselect__option--selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect--disabled{background:#ededed;pointer-events:none}.multiselect--disabled .multiselect__current,.multiselect--disabled .multiselect__select,.multiselect__option--disabled{background:#ededed;color:#a6a6a6}.multiselect__option--disabled{cursor:text;pointer-events:none}.multiselect__option--disabled:visited{color:#a6a6a6}.multiselect__option--disabled:focus,.multiselect__option--disabled:hover{background:#3dad7b}.multiselect-transition{-webkit-transition:all .3s ease;transition:all .3s ease}.multiselect-enter,.multiselect-leave{opacity:0;max-height:0!important}@-webkit-keyframes spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(2turn);transform:rotate(2turn)}}@keyframes spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(2turn);transform:rotate(2turn)}}',""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(i[r]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(t,e){t.exports='<div tabindex=0 :class="{ \'multiselect--active\': isOpen, \'multiselect--disabled\': disabled }" @focus=activate() @blur="searchable ? false : deactivate()" @keydown.self.down.prevent=pointerForward() @keydown.self.up.prevent=pointerBackward() @keydown.enter.stop.prevent.self=addPointerElement() @keyup.esc=deactivate() class=multiselect> <div @mousedown.prevent=toggle() class=multiselect__select></div> <div v-el:tags class=multiselect__tags> <span v-if=multiple v-for="option in visibleValue" track-by=$index onmousedown=event.preventDefault() class=multiselect__tag> <span v-text=getOptionLabel(option)></span> <i aria-hidden=true tabindex=1 @keydown.enter.prevent=removeElement(option) @mousedown.prevent=removeElement(option) class=multiselect__tag-icon> </i> </span> <template v-if="value && value.length > limit"> <strong v-text="limitText(value.length - limit)"></strong> </template> <div v-show=loading transition=multiselect__loading class=multiselect__spinner></div> <input name=search type=text autocomplete=off :placeholder=placeholder v-el:search v-if=searchable v-model=search :disabled=disabled @focus.prevent=activate() @blur.prevent=deactivate() @keyup.esc=deactivate() @keyup.down=pointerForward() @keyup.up=pointerBackward() @keydown.enter.stop.prevent.self=addPointerElement() @keydown.delete=removeLastElement() class=multiselect__input /> <span v-if="!searchable && !multiple" class=multiselect__single v-text="currentOptionLabel || placeholder"> </span> </div> <ul transition=multiselect :style="{ maxHeight: maxHeight + \'px\' }" v-el:list v-show=isOpen class=multiselect__content> <slot name=beforeList></slot> <li v-if="multiple && max === value.length"> <span class=multiselect__option> <slot name=maxElements>Maximum of {{ max }} options selected. First remove a selected option to select another.</slot> </span> </li> <template v-if="!max || value.length < max"> <li v-for="option in filteredOptions" track-by=$index tabindex=0 :class="{ \'multiselect__option--highlight\': $index === pointer && this.showPointer, \'multiselect__option--selected\': !isNotSelected(option) }" class=multiselect__option @mousedown.prevent=select(option) @mouseenter=pointerSet($index) :data-select="option.isTag ? tagPlaceholder : selectLabel" :data-selected=selectedLabel :data-deselect=deselectLabel> <partial :name=optionPartial v-if=optionPartial.length></partial> <span v-else v-text=getOptionLabel(option)></span> </li> </template> <li v-show="filteredOptions.length === 0 && search"> <span class=multiselect__option> <slot name=noResult>No elements found. Consider changing the search query.</slot> </span> </li> <slot name=afterList></slot> </ul> </div>'},function(t,e,n){var i,o;n(82),i=n(42),o=n(79),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports["default"]),o&&(("function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports).template=o)},function(t,e,n){function i(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=f[i.id];if(o){o.refs++;for(var r=0;r<o.parts.length;r++)o.parts[r](i.parts[r]);for(;r<i.parts.length;r++)o.parts.push(a(i.parts[r],e))}else{for(var s=[],r=0;r<i.parts.length;r++)s.push(a(i.parts[r],e));f[i.id]={id:i.id,refs:1,parts:s}}}}function o(t){for(var e=[],n={},i=0;i<t.length;i++){var o=t[i],r=o[0],s=o[1],l=o[2],a=o[3],u={css:s,media:l,sourceMap:a};n[r]?n[r].parts.push(u):e.push(n[r]={id:r,parts:[u]})}return e}function r(t,e){ | ||
var n=h(),i=b[b.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),b.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function s(t){t.parentNode.removeChild(t);var e=b.indexOf(t);e>=0&&b.splice(e,1)}function l(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function a(t,e){var n,i,o;if(e.singleton){var r=v++;n=m||(m=l(e)),i=u.bind(null,n,r,!1),o=u.bind(null,n,r,!0)}else n=l(e),i=c.bind(null,n),o=function(){s(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}function u(t,e,n,i){var o=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=g(e,o);else{var r=document.createTextNode(o),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function c(t,e){var n=e.css,i=e.media,o=e.sourceMap;if(i&&t.setAttribute("media",i),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var f={},p=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},d=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=p(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,v=0,b=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=d()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=o(t);return i(n,e),function(t){for(var r=[],s=0;s<n.length;s++){var l=n[s],a=f[l.id];a.refs--,r.push(a)}if(t){var u=o(t);i(u,e)}for(var s=0;s<r.length;s++){var a=r[s];if(0===a.refs){for(var c=0;c<a.parts.length;c++)a.parts[c]();delete f[a.id]}}}};var g=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){var i=n(77);"string"==typeof i&&(i=[[t.id,i,""]]);n(81)(i,{});i.locals&&(t.exports=i.locals)}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueMultiselect=e():t.VueMultiselect=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="/",e(0)}([function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.deepClone=e.pointerMixin=e.multiselectMixin=e.Multiselect=void 0;var o=n(80),r=i(o),s=n(28),l=i(s),u=n(29),a=i(u),c=n(30),f=i(c);e["default"]=r["default"],e.Multiselect=r["default"],e.multiselectMixin=l["default"],e.pointerMixin=a["default"],e.deepClone=f["default"]},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(56),o=n(15);t.exports=function(t){return i(o(t))}},function(t,e,n){t.exports=!n(9)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(6),o=n(13);t.exports=n(4)?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(11),o=n(34),r=n(25),s=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(i(t),e=r(e,!0),i(n),o)try{return s(t,e,n)}catch(l){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(23)("wks"),o=n(14),r=n(1).Symbol,s="function"==typeof r,l=t.exports=function(t){return i[t]||(i[t]=s&&r[t]||(s?r:o)("Symbol."+t))};l.store=i},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){var i=n(39),o=n(16);t.exports=Object.keys||function(t){return i(t,o)}},function(t,e,n){var i=n(12);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(1),o=n(8),r=n(53),s=n(5),l="prototype",u=function(t,e,n){var a,c,f,p=t&u.F,d=t&u.G,h=t&u.S,m=t&u.P,v=t&u.B,b=t&u.W,g=d?o:o[e]||(o[e]={}),y=g[l],_=d?i:h?i[e]:(i[e]||{})[l];d&&(n=e);for(a in n)c=!p&&_&&void 0!==_[a],c&&a in g||(f=c?_[a]:n[a],g[a]=d&&"function"!=typeof _[a]?n[a]:v&&c?r(f,i):b&&_[a]==f?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e[l]=t[l],e}(f):m&&"function"==typeof f?r(Function.call,f):f,m&&((g.virtual||(g.virtual={}))[a]=f,t&u.R&&y&&!y[a]&&s(y,a,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){t.exports={}},function(t,e){t.exports=!0},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(6).f,o=n(2),r=n(7)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,r)&&i(t,r,{configurable:!0,value:e})}},function(t,e,n){var i=n(23)("keys"),o=n(14);t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var i=n(1),o="__core-js_shared__",r=i[o]||(i[o]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(12);t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var i=n(1),o=n(8),r=n(19),s=n(27),l=n(6).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||l(e,t,{value:s.f(t)})}},function(t,e,n){e.f=n(7)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var o=n(31),r=i(o),s=n(30),l=i(s);t.exports={data:function(){return{search:"",isOpen:!1,value:this.selected?(0,l["default"])(this.selected):this.multiple?[]:null}},props:{options:{type:Array,required:!0},multiple:{type:Boolean,"default":!1},selected:{},key:{type:String},label:{type:String},searchable:{type:Boolean,"default":!0},clearOnSelect:{type:Boolean,"default":!0},hideSelected:{type:Boolean,"default":!1},placeholder:{type:String,"default":"Select option"},maxHeight:{type:Number,"default":300},allowEmpty:{type:Boolean,"default":!0},resetAfter:{type:Boolean,"default":!1},closeOnSelect:{type:Boolean,"default":!0},customLabel:{type:Function},taggable:{type:Boolean,"default":!1},tagPlaceholder:{type:String,"default":"Press enter to create a tag"},max:{type:Number},id:{"default":null}},created:function(){this.searchable&&this.adjustSearch()},computed:{filteredOptions:function(){var t=this,e=this.search||"",n=this.hideSelected?this.options.filter(this.isNotSelected):this.options;return n=this.label?n.filter(function(e){return-1!==e[t.label].indexOf(t.search)}):n.filter(function(e){return-1!==e.indexOf(t.search)}),this.taggable&&e.length&&!this.isExistingOption(e)&&n.unshift({isTag:!0,label:e}),n},valueKeys:function(){var t=this;return this.key?this.multiple?this.value.map(function(e){return e[t.key]}):this.value[this.key]:this.value},optionKeys:function(){var t=this;return this.label?this.options.map(function(e){return e[t.label]}):this.options},currentOptionLabel:function(){return this.getOptionLabel(this.value)}},watch:{value:function(){this.resetAfter&&(this.$set("value",null),this.$set("search",null),this.$set("selected",null)),this.adjustSearch()},search:function(){this.search!==this.currentOptionLabel&&this.$emit("search-change",this.search,this.id)},selected:function(t,e){this.value=(0,l["default"])(this.selected)}},methods:{isExistingOption:function(t){return this.options?this.optionKeys.indexOf(t)>-1:!1},isSelected:function(t){if(!this.value)return!1;var e=this.key?t[this.key]:t;return this.multiple?this.valueKeys.indexOf(e)>-1:this.valueKeys===e},isNotSelected:function(t){return!this.isSelected(t)},getOptionLabel:function(t){return"object"!==("undefined"==typeof t?"undefined":(0,r["default"])(t))||null===t?t:this.customLabel?this.customLabel(t):this.label&&t[this.label]?t[this.label]:t.label?t.label:void 0},select:function(t){if(!this.max||!this.multiple||this.value.length!==this.max)if(t.isTag)this.$emit("tag",t.label,this.id),this.search="";else{if(this.multiple)this.isNotSelected(t)?(this.value.push(t),this.$emit("select",(0,l["default"])(t),this.id),this.$emit("update",(0,l["default"])(this.value),this.id)):this.removeElement(t);else{var e=this.isSelected(t);if(e&&!this.allowEmpty)return;this.value=e?null:t,this.$emit("select",(0,l["default"])(t),this.id),this.$emit("update",(0,l["default"])(this.value),this.id)}this.closeOnSelect&&this.deactivate()}},removeElement:function(t){if(this.allowEmpty||!(this.value.length<=1)){if(this.multiple&&"object"===("undefined"==typeof t?"undefined":(0,r["default"])(t))){var e=this.valueKeys.indexOf(t[this.key]);this.value.splice(e,1)}else{var n=this.valueKeys.indexOf(t);this.value.splice(n,1)}this.$emit("remove",(0,l["default"])(t),this.id),this.$emit("update",(0,l["default"])(this.value),this.id)}},removeLastElement:function(){0===this.search.length&&Array.isArray(this.value)&&this.removeElement(this.value[this.value.length-1])},activate:function(){this.isOpen||(this.isOpen=!0,this.searchable?(this.search="",this.$el.children[1].children[2].focus()):this.$el.focus(),this.$emit("open",this.id))},deactivate:function(){this.isOpen&&(this.isOpen=!1,this.searchable?(this.$el.children[1].children[2].blur(),this.adjustSearch()):this.$el.blur(),this.$emit("close",(0,l["default"])(this.value),this.id))},adjustSearch:function(){this.searchable&&this.clearOnSelect&&(this.search=this.multiple?"":this.currentOptionLabel)},toggle:function(){this.isOpen?this.deactivate():this.activate()}}}},function(t,e){"use strict";t.exports={data:function(){return{pointer:0,visibleElements:this.maxHeight/40}},props:{showPointer:{type:Boolean,"default":!0}},computed:{pointerPosition:function(){return 40*this.pointer}},watch:{filteredOptions:function(){this.pointerAdjust()}},methods:{optionHighlight:function(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":!this.isNotSelected(e)}},addPointerElement:function(){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer]),this.pointerReset()},pointerForward:function(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-40*this.visibleElements&&(this.$refs.list.scrollTop=this.pointerPosition-40*(this.visibleElements-1)))},pointerBackward:function(){this.pointer>0&&(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition))},pointerReset:function(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust:function(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0)},pointerSet:function(t){this.pointer=t}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var o=n(44),r=i(o),s=n(31),l=i(s),u=function a(t){if(Array.isArray(t))return t.map(a);if(t&&"object"===("undefined"==typeof t?"undefined":(0,l["default"])(t))){for(var e={},n=(0,r["default"])(t),i=0,o=n.length;o>i;i++){var s=n[i];e[s]=a(t[s])}return e}return t};t.exports=u},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(46),r=i(o),s=n(45),l=i(s),u="function"==typeof l["default"]&&"symbol"==typeof r["default"]?function(t){return typeof t}:function(t){return t&&"function"==typeof l["default"]&&t.constructor===l["default"]?"symbol":typeof t};e["default"]="function"==typeof l["default"]&&"symbol"===u(r["default"])?function(t){return"undefined"==typeof t?"undefined":u(t)}:function(t){return t&&"function"==typeof l["default"]&&t.constructor===l["default"]?"symbol":"undefined"==typeof t?"undefined":u(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(12),o=n(1).document,r=i(o)&&i(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},function(t,e,n){t.exports=!n(4)&&!n(9)(function(){return 7!=Object.defineProperty(n(33)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var i=n(19),o=n(17),r=n(40),s=n(5),l=n(2),u=n(18),a=n(58),c=n(21),f=n(65),p=n(7)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",v="values",b=function(){return this};t.exports=function(t,e,n,g,y,_,x){a(n,e,g);var O,w,S,k=function(t){if(!d&&t in E)return E[t];switch(t){case m:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},j=e+" Iterator",P=y==v,C=!1,E=t.prototype,M=E[p]||E[h]||y&&E[y],L=M||k(y),T=y?P?k("entries"):L:void 0,A="Array"==e?E.entries||M:M;if(A&&(S=f(A.call(new t)),S!==Object.prototype&&(c(S,j,!0),i||l(S,p)||s(S,p,b))),P&&M&&M.name!==v&&(C=!0,L=function(){return M.call(this)}),i&&!x||!d&&!C&&E[p]||s(E,p,L),u[e]=L,u[j]=b,y)if(O={values:P?L:k(v),keys:_?L:k(m),entries:T},x)for(w in O)w in E||r(E,w,O[w]);else o(o.P+o.F*(d||C),e,O);return O}},function(t,e,n){var i=n(11),o=n(62),r=n(16),s=n(22)("IE_PROTO"),l=function(){},u="prototype",a=function(){var t,e=n(33)("iframe"),i=r.length,o=">";for(e.style.display="none",n(55).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object</script"+o),t.close(),a=t.F;i--;)delete a[u][r[i]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(l[u]=i(t),n=new l,l[u]=null,n[s]=t):n=a(),void 0===e?n:o(n,e)}},function(t,e,n){var i=n(39),o=n(16).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(2),o=n(3),r=n(52)(!1),s=n(22)("IE_PROTO");t.exports=function(t,e){var n,l=o(t),u=0,a=[];for(n in l)n!=s&&i(l,n)&&a.push(n);for(;e.length>u;)i(l,n=e[u++])&&(~r(a,n)||a.push(n));return a}},function(t,e,n){t.exports=n(5)},function(t,e,n){var i=n(15);t.exports=function(t){return Object(i(t))}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={functional:!0,render:function(t,e){return e.props.optionFunction(t,e.props.option,e.props.label)},props:{optionFunction:{type:Function,required:!0},label:{required:!0},option:{}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(28),r=i(o),s=n(29),l=i(s),u=n(42),a=i(u);e["default"]={components:{MultiselectOption:a["default"]},mixins:[r["default"],l["default"]],props:{selectLabel:{type:String,"default":"Press enter to select"},selectedLabel:{type:String,"default":"Selected"},deselectLabel:{type:String,"default":"Press enter to remove"},showLabels:{type:Boolean,"default":!0},limit:{type:Number,"default":99999},limitText:{type:Function,"default":function(t){return"and "+t+" more"}},loading:{type:Boolean,"default":!1},disabled:{type:Boolean,"default":!1},optionFunction:{type:Function,"default":function(t,e,n){return t("span",{},n)}}},computed:{visibleValue:function(){return this.multiple?this.value.slice(0,this.limit):this.value}},mounted:function(){this.showLabels||(this.deselectLabel=this.selectedLabel=this.selectLabel="")}}},function(t,e,n){t.exports={"default":n(47),__esModule:!0}},function(t,e,n){t.exports={"default":n(48),__esModule:!0}},function(t,e,n){t.exports={"default":n(49),__esModule:!0}},function(t,e,n){n(71),t.exports=n(8).Object.keys},function(t,e,n){n(74),n(72),n(75),n(76),t.exports=n(8).Symbol},function(t,e,n){n(73),n(77),t.exports=n(27).f("iterator")},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(){}},function(t,e,n){var i=n(3),o=n(69),r=n(68);t.exports=function(t){return function(e,n,s){var l,u=i(e),a=o(u.length),c=r(s,a);if(t&&n!=n){for(;a>c;)if(l=u[c++],l!=l)return!0}else for(;a>c;c++)if((t||c in u)&&u[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var i=n(50);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(10),o=n(38),r=n(20);t.exports=function(t){var e=i(t),n=o.f;if(n)for(var s,l=n(t),u=r.f,a=0;l.length>a;)u.call(t,s=l[a++])&&e.push(s);return e}},function(t,e,n){t.exports=n(1).document&&document.documentElement},function(t,e,n){var i=n(32);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(32);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";var i=n(36),o=n(13),r=n(21),s={};n(5)(s,n(7)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:o(1,n)}),r(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var i=n(10),o=n(3);t.exports=function(t,e){for(var n,r=o(t),s=i(r),l=s.length,u=0;l>u;)if(r[n=s[u++]]===e)return n}},function(t,e,n){var i=n(14)("meta"),o=n(12),r=n(2),s=n(6).f,l=0,u=Object.isExtensible||function(){return!0},a=!n(9)(function(){return u(Object.preventExtensions({}))}),c=function(t){s(t,i,{value:{i:"O"+ ++l,w:{}}})},f=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!r(t,i)){if(!u(t))return"F";if(!e)return"E";c(t)}return t[i].i},p=function(t,e){if(!r(t,i)){if(!u(t))return!0;if(!e)return!1;c(t)}return t[i].w},d=function(t){return a&&h.NEED&&u(t)&&!r(t,i)&&c(t),t},h=t.exports={KEY:i,NEED:!1,fastKey:f,getWeak:p,onFreeze:d}},function(t,e,n){var i=n(6),o=n(11),r=n(10);t.exports=n(4)?Object.defineProperties:function(t,e){o(t);for(var n,s=r(e),l=s.length,u=0;l>u;)i.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var i=n(20),o=n(13),r=n(3),s=n(25),l=n(2),u=n(34),a=Object.getOwnPropertyDescriptor;e.f=n(4)?a:function(t,e){if(t=r(t),e=s(e,!0),u)try{return a(t,e)}catch(n){}return l(t,e)?o(!i.f.call(t,e),t[e]):void 0}},function(t,e,n){var i=n(3),o=n(37).f,r={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(t){try{return o(t)}catch(e){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==r.call(t)?l(t):o(i(t))}},function(t,e,n){var i=n(2),o=n(41),r=n(22)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),i(t,r)?t[r]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var i=n(17),o=n(8),r=n(9);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],s={};s[t]=e(n),i(i.S+i.F*r(function(){n(1)}),"Object",s)}},function(t,e,n){var i=n(24),o=n(15);t.exports=function(t){return function(e,n){var r,s,l=String(o(e)),u=i(n),a=l.length;return 0>u||u>=a?t?"":void 0:(r=l.charCodeAt(u),55296>r||r>56319||u+1===a||(s=l.charCodeAt(u+1))<56320||s>57343?t?l.charAt(u):r:t?l.slice(u,u+2):(r-55296<<10)+(s-56320)+65536)}}},function(t,e,n){var i=n(24),o=Math.max,r=Math.min;t.exports=function(t,e){return t=i(t),0>t?o(t+e,0):r(t,e)}},function(t,e,n){var i=n(24),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},function(t,e,n){"use strict";var i=n(51),o=n(59),r=n(18),s=n(3);t.exports=n(35)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(t,e,n){var i=n(41),o=n(10);n(66)("keys",function(){return function(t){return o(i(t))}})},function(t,e){},function(t,e,n){"use strict";var i=n(67)(!0);n(35)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var i=n(1),o=n(2),r=n(4),s=n(17),l=n(40),u=n(61).KEY,a=n(9),c=n(23),f=n(21),p=n(14),d=n(7),h=n(27),m=n(26),v=n(60),b=n(54),g=n(57),y=n(11),_=n(3),x=n(25),O=n(13),w=n(36),S=n(64),k=n(63),j=n(6),P=n(10),C=k.f,E=j.f,M=S.f,L=i.Symbol,T=i.JSON,A=T&&T.stringify,F="prototype",N=d("_hidden"),$=d("toPrimitive"),B={}.propertyIsEnumerable,D=c("symbol-registry"),R=c("symbols"),I=c("op-symbols"),z=Object[F],K="function"==typeof L,H=i.QObject,W=!H||!H[F]||!H[F].findChild,J=r&&a(function(){return 7!=w(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=C(z,e);i&&delete z[e],E(t,e,n),i&&t!==z&&E(z,e,i)}:E,V=function(t){var e=R[t]=w(L[F]);return e._k=t,e},q=K&&"symbol"==typeof L.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof L},U=function(t,e,n){return t===z&&U(I,e,n),y(t),e=x(e,!0),y(n),o(R,e)?(n.enumerable?(o(t,N)&&t[N][e]&&(t[N][e]=!1),n=w(n,{enumerable:O(0,!1)})):(o(t,N)||E(t,N,O(1,{})),t[N][e]=!0),J(t,e,n)):E(t,e,n)},G=function(t,e){y(t);for(var n,i=b(e=_(e)),o=0,r=i.length;r>o;)U(t,n=i[o++],e[n]);return t},Y=function(t,e){return void 0===e?w(t):G(w(t),e)},Q=function(t){var e=B.call(this,t=x(t,!0));return this===z&&o(R,t)&&!o(I,t)?!1:e||!o(this,t)||!o(R,t)||o(this,N)&&this[N][t]?e:!0},X=function(t,e){if(t=_(t),e=x(e,!0),t!==z||!o(R,e)||o(I,e)){var n=C(t,e);return!n||!o(R,e)||o(t,N)&&t[N][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=M(_(t)),i=[],r=0;n.length>r;)o(R,e=n[r++])||e==N||e==u||i.push(e);return i},tt=function(t){for(var e,n=t===z,i=M(n?I:_(t)),r=[],s=0;i.length>s;)o(R,e=i[s++])&&(n?o(z,e):!0)&&r.push(R[e]);return r};K||(L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call(I,n),o(this,N)&&o(this[N],t)&&(this[N][t]=!1),J(this,t,O(1,n))};return r&&W&&J(z,t,{configurable:!0,set:e}),V(t)},l(L[F],"toString",function(){return this._k}),k.f=X,j.f=U,n(37).f=S.f=Z,n(20).f=Q,n(38).f=tt,r&&!n(19)&&l(z,"propertyIsEnumerable",Q,!0),h.f=function(t){return V(d(t))}),s(s.G+s.W+s.F*!K,{Symbol:L});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var et=P(d.store),nt=0;et.length>nt;)m(et[nt++]);s(s.S+s.F*!K,"Symbol",{"for":function(t){return o(D,t+="")?D[t]:D[t]=L(t)},keyFor:function(t){if(q(t))return v(D,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){W=!0},useSimple:function(){W=!1}}),s(s.S+s.F*!K,"Object",{create:Y,defineProperty:U,defineProperties:G,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),T&&s(s.S+s.F*(!K||a(function(){var t=L();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!q(t)){for(var e,n,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);return e=i[1],"function"==typeof e&&(n=e),!n&&g(e)||(e=function(t,e){return n&&(e=n.call(this,t,e)),q(e)?void 0:e}),i[1]=e,A.apply(T,i)}}}),L[F][$]||n(5)(L[F],$,L[F].valueOf),f(L,"Symbol"),f(Math,"Math",!0),f(i.JSON,"JSON",!0)},function(t,e,n){n(26)("asyncIterator")},function(t,e,n){n(26)("observable")},function(t,e,n){n(70);for(var i=n(1),o=n(5),r=n(18),s=n(7)("toStringTag"),l=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;5>u;u++){var a=l[u],c=i[a],f=c&&c.prototype;f&&!f[s]&&o(f,s,a),r[a]=r.Array}},function(t,e,n){e=t.exports=n(79)(),e.push([t.id,'fieldset[disabled] .multiselect{pointer-events:none}.multiselect__spinner{position:absolute;right:1px;top:1px;width:48px;height:35px;background:#fff;display:block}.multiselect__spinner:after,.multiselect__spinner:before{position:absolute;content:"";top:50%;left:50%;margin:-8px 0 0 -8px;width:16px;height:16px;border-radius:100%;border-color:#41b883 transparent transparent;border-style:solid;border-width:2px;box-shadow:0 0 0 1px transparent}.multiselect__spinner:before{animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);animation-iteration-count:infinite}.multiselect__spinner:after{animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);animation-iteration-count:infinite}.multiselect__loading-transition{transition:opacity .4s ease-in-out;opacity:1}.multiselect__loading-enter,.multiselect__loading-leave{opacity:0}.multiselect,.multiselect__input,.multiselect__single{font-family:inherit;font-size:14px}.multiselect{box-sizing:content-box;display:block;position:relative;width:100%;min-height:40px;text-align:left;color:#35495e}.multiselect *{box-sizing:border-box}.multiselect:focus{outline:none}.multiselect--disabled{pointer-events:none;opacity:.6}.multiselect--active{z-index:50}.multiselect--active .multiselect__current,.multiselect--active .multiselect__input,.multiselect--active .multiselect__tags{border-bottom-left-radius:0;border-bottom-right-radius:0}.multiselect--active .multiselect__select{transform:rotate(180deg)}.multiselect__input,.multiselect__single{position:relative;display:inline-block;min-height:20px;line-height:20px;border:none;border-radius:5px;background:#fff;padding:1px 0 0 5px;width:100%;transition:border .1s ease;box-sizing:border-box;margin-bottom:8px}.multiselect__tag~.multiselect__input{width:auto}.multiselect__input:hover,.multiselect__single:hover{border-color:#cfcfcf}.multiselect__input:focus,.multiselect__single:focus{border-color:#a8a8a8;outline:none}.multiselect__single{padding-left:6px;margin-bottom:8px}.multiselect__tags{min-height:40px;display:block;padding:8px 40px 0 8px;border-radius:5px;border:1px solid #e8e8e8;background:#fff}.multiselect__tag{position:relative;display:inline-block;padding:4px 26px 4px 10px;border-radius:5px;margin-right:10px;color:#fff;line-height:1;background:#41b883;margin-bottom:8px;white-space:nowrap}.multiselect__tag-icon{cursor:pointer;margin-left:7px;position:absolute;right:0;top:0;bottom:0;font-weight:700;font-style:initial;width:22px;text-align:center;line-height:22px;transition:all .2s ease;border-radius:5px}.multiselect__tag-icon:after{content:"\\D7";color:#266d4d;font-size:14px}.multiselect__tag-icon:focus,.multiselect__tag-icon:hover{background:#369a6e}.multiselect__tag-icon:focus:after,.multiselect__tag-icon:hover:after{color:#fff}.multiselect__current{min-height:40px;overflow:hidden;padding:8px 12px 0;padding-right:30px;white-space:nowrap;border-radius:5px;border:1px solid #e8e8e8}.multiselect__current,.multiselect__select{line-height:16px;box-sizing:border-box;display:block;margin:0;text-decoration:none;cursor:pointer}.multiselect__select{position:absolute;width:40px;height:38px;right:1px;top:1px;padding:4px 8px;text-align:center;transition:transform .2s ease}.multiselect__select:before{position:relative;right:0;top:65%;color:#999;margin-top:4px;border-style:solid;border-width:5px 5px 0;border-color:#999 transparent transparent;content:""}.multiselect__placeholder{color:#adadad;display:inline-block;margin-bottom:10px;padding-top:2px}.multiselect--active .multiselect__placeholder{display:none}.multiselect__content{position:absolute;list-style:none;display:block;background:#fff;width:100%;max-height:240px;overflow:auto;padding:0;margin:0;border:1px solid #e8e8e8;border-top:none;border-bottom-left-radius:5px;border-bottom-right-radius:5px;z-index:50}.multiselect__content::webkit-scrollbar{display:none}.multiselect__option{display:block;padding:12px;min-height:40px;line-height:16px;text-decoration:none;text-transform:none;vertical-align:middle;position:relative;cursor:pointer;white-space:nowrap}.multiselect__option:after{top:0;right:0;position:absolute;line-height:40px;padding-right:12px;padding-left:20px}.multiselect__option--highlight{background:#41b883;outline:none;color:#fff}.multiselect__option--highlight:after{content:attr(data-select);background:#41b883;color:#fff}.multiselect__option--selected{background:#f3f3f3;color:#35495e;font-weight:700}.multiselect__option--selected:after{content:attr(data-selected);color:silver}.multiselect__option--selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect--disabled{background:#ededed;pointer-events:none}.multiselect--disabled .multiselect__current,.multiselect--disabled .multiselect__select,.multiselect__option--disabled{background:#ededed;color:#a6a6a6}.multiselect__option--disabled{cursor:text;pointer-events:none}.multiselect__option--disabled:visited{color:#a6a6a6}.multiselect__option--disabled:focus,.multiselect__option--disabled:hover{background:#3dad7b}.multiselect-transition{transition:all .3s ease}.multiselect-enter,.multiselect-leave{opacity:0;max-height:0!important}@keyframes spinning{0%{transform:rotate(0)}to{transform:rotate(2turn)}}',""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(i[r]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(t,e,n){var i,o;n(83),i=n(43);var r=n(81);o=i=i||{},"object"==typeof i["default"]&&(o=i=i["default"]),"function"==typeof o&&(o=o.options),o.render=r.render,o.staticRenderFns=r.staticRenderFns,t.exports=i},function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"multiselect","class":{"multiselect--active":isOpen,"multiselect--disabled":disabled},attrs:{tabindex:"0"},on:{focus:function(t){activate()},blur:function(t){searchable?!1:deactivate()},keydown:[function(t){40===t.keyCode&&t.target===t.currentTarget&&(t.preventDefault(),pointerForward())},function(t){38===t.keyCode&&t.target===t.currentTarget&&(t.preventDefault(),pointerBackward())},function(t){13===t.keyCode&&(t.stopPropagation(),t.preventDefault(),t.target===t.currentTarget&&addPointerElement())}],keyup:function(t){27===t.keyCode&&deactivate()}}},[_h("div",{staticClass:"multiselect__select",on:{mousedown:function(t){t.preventDefault(),toggle()}}})," ",_h("div",{ref:"tags",staticClass:"multiselect__tags"},[visibleValue&&_l(visibleValue,function(t){return multiple?_h("span",{staticClass:"multiselect__tag",attrs:{onmousedown:"event.preventDefault()"}},[_h("span",{domProps:{textContent:_s(getOptionLabel(t))}})," ",_h("i",{staticClass:"multiselect__tag-icon",attrs:{"aria-hidden":"true",tabindex:"1"},on:{keydown:function(e){13===e.keyCode&&(e.preventDefault(),removeElement(t))},mousedown:function(e){e.preventDefault(),removeElement(t)}}})]):void 0})," ",value&&value.length>limit?[_h("strong",{domProps:{textContent:_s(limitText(value.length-limit))}})]:void 0," ",_h("div",{directives:[{name:"show",value:loading,expression:"loading"}],staticClass:"multiselect__spinner"})," ",searchable?_h("input",{directives:[{name:"model",value:search,expression:"search",modifiers:{trim:!0}}],staticClass:"multiselect__input",attrs:{name:"search",type:"text",autocomplete:"off",placeholder:placeholder,disabled:disabled},domProps:{value:_s(search)},on:{focus:function(t){t.preventDefault(),activate()},blur:function(t){t.preventDefault(),deactivate()},keyup:[function(t){27===t.keyCode&&deactivate()},function(t){40===t.keyCode&&pointerForward()},function(t){38===t.keyCode&&pointerBackward()}],keydown:[function(t){13===t.keyCode&&(t.stopPropagation(),t.preventDefault(),t.target===t.currentTarget&&addPointerElement())},function(t){8!==t.keyCode&&46!==t.keyCode||removeLastElement()}],input:function(t){t.target.composing||(search=t.target.value.trim())}}}):void 0," ",searchable||multiple?void 0:_h("span",{staticClass:"multiselect__single",domProps:{textContent:_s(currentOptionLabel||placeholder)}})])," ",_h("ul",{directives:[{name:"show",value:isOpen,expression:"isOpen"}],ref:"list",staticClass:"multiselect__content",style:{maxHeight:maxHeight+"px"}},[$slots.beforeList," ",multiple&&max===value.length?_h("li",[_h("span",{staticClass:"multiselect__option"},[$slots.maxElements||["Maximum of "+_s(max)+" options selected. First remove a selected option to select another."]])]):void 0," ",!max||value.length<max?[filteredOptions&&_l(filteredOptions,function(t,e){return _h("li",{key:e},[_h("span",{staticClass:"multiselect__option","class":optionHighlight(e,t),attrs:{tabindex:"0","data-select":t.isTag?tagPlaceholder:selectLabel,"data-selected":selectedLabel,"data-deselect":deselectLabel},on:{mousedown:function(e){e.preventDefault(),select(t)},mouseenter:function(t){pointerSet(e)}}},[_h("multiselect-option",{attrs:{"option-function":optionFunction,label:getOptionLabel(t),option:t}})])])})]:void 0," ",_h("li",{directives:[{name:"show",value:0===filteredOptions.length&&search,expression:"filteredOptions.length === 0 && search"}]},[_h("span",{ | ||
staticClass:"multiselect__option"},[$slots.noResult||["No elements found. Consider changing the search query."]])])," ",$slots.afterList])])},staticRenderFns:[]}},function(t,e,n){function i(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=f[i.id];if(o){o.refs++;for(var r=0;r<o.parts.length;r++)o.parts[r](i.parts[r]);for(;r<i.parts.length;r++)o.parts.push(u(i.parts[r],e))}else{for(var s=[],r=0;r<i.parts.length;r++)s.push(u(i.parts[r],e));f[i.id]={id:i.id,refs:1,parts:s}}}}function o(t){for(var e=[],n={},i=0;i<t.length;i++){var o=t[i],r=o[0],s=o[1],l=o[2],u=o[3],a={css:s,media:l,sourceMap:u};n[r]?n[r].parts.push(a):e.push(n[r]={id:r,parts:[a]})}return e}function r(t,e){var n=h(),i=b[b.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),b.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function s(t){t.parentNode.removeChild(t);var e=b.indexOf(t);e>=0&&b.splice(e,1)}function l(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function u(t,e){var n,i,o;if(e.singleton){var r=v++;n=m||(m=l(e)),i=a.bind(null,n,r,!1),o=a.bind(null,n,r,!0)}else n=l(e),i=c.bind(null,n),o=function(){s(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}function a(t,e,n,i){var o=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=g(e,o);else{var r=document.createTextNode(o),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function c(t,e){var n=e.css,i=e.media,o=e.sourceMap;if(i&&t.setAttribute("media",i),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var f={},p=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},d=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=p(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,v=0,b=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=d()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=o(t);return i(n,e),function(t){for(var r=[],s=0;s<n.length;s++){var l=n[s],u=f[l.id];u.refs--,r.push(u)}if(t){var a=o(t);i(a,e)}for(var s=0;s<r.length;s++){var u=r[s];if(0===u.refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete f[u.id]}}}};var g=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){var i=n(78);"string"==typeof i&&(i=[[t.id,i,""]]);n(82)(i,{});i.locals&&(t.exports=i.locals)}])}); | ||
//# sourceMappingURL=vue-multiselect.min.js.map |
{ | ||
"name": "vue-multiselect", | ||
"version": "1.1.2", | ||
"version": "2.0.0-beta.1", | ||
"description": "Multiselect component for vue.js", | ||
@@ -42,4 +42,7 @@ "author": "Damian Dulisz <damian.dulisz@monterail.com>", | ||
"babel-core": "^6.7.7", | ||
"babel-helper-vue-jsx-merge-props": "^2.0.1", | ||
"babel-loader": "^6.2.4", | ||
"babel-plugin-syntax-jsx": "^6.13.0", | ||
"babel-plugin-transform-runtime": "^6.7.5", | ||
"babel-plugin-transform-vue-jsx": "^2.0.2", | ||
"babel-preset-es2015": "^6.6.0", | ||
@@ -92,6 +95,6 @@ "babel-preset-stage-2": "^6.5.0", | ||
"url-loader": "^0.5.7", | ||
"vue": "^1.0.21", | ||
"vue": "^2.0.0-rc.3", | ||
"vue-hot-reload-api": "^1.2.0", | ||
"vue-html-loader": "^1.0.0", | ||
"vue-loader": "^8.2.1", | ||
"vue-loader": "^9.3.2", | ||
"vue-style-loader": "^1.0.0", | ||
@@ -98,0 +101,0 @@ "webpack": "^1.13.0", |
# vue-multiselect ![Build Status](https://circleci.com/gh/monterail/vue-multiselect/tree/master.svg?style=shield&circle-token=5c931ff28fd12587610f835472becdd514d09cef) | ||
Probably the most complete *selecting* solution for Vue.js, without jQuery. | ||
#### Current version: v1.1.2 | ||
### Features & characteristics: | ||
@@ -11,3 +9,2 @@ * NO dependencies | ||
* Tagging | ||
* Custom option templates (1.1.0+) | ||
* Dropdowns | ||
@@ -81,2 +78,3 @@ * Filtering | ||
* Grouping | ||
* Support for partials | ||
* Examples of custom components / templates ready to use in project | ||
@@ -117,3 +115,3 @@ | ||
### Multiple select with search | ||
```jade | ||
``` jade | ||
multiselect( | ||
@@ -133,3 +131,3 @@ :options="source", | ||
with `@tag` event | ||
```jade | ||
``` jade | ||
multiselect( | ||
@@ -149,3 +147,4 @@ :options="taggingOptions", | ||
```javascript | ||
``` javascript | ||
addTag (newTag) { | ||
@@ -161,46 +160,2 @@ const tag = { | ||
### Custom option template | ||
Using partial API | ||
```jade | ||
multiselect( | ||
:options="styleList", | ||
:selected="selectedStyle", | ||
:option-height="130", | ||
:custom-label="styleLabel", | ||
@update="updateSelectedStyle", | ||
option-partial="customOptionPartial" | ||
placeholder="Fav No Man’s Sky path" | ||
label="title" | ||
key="title" | ||
) | ||
``` | ||
``` javascript | ||
import customOptionPartial from './partials/customOptionPartial.html' | ||
Vue.partial('customOptionPartial', customOptionPartial) | ||
// ...Inside Vue component | ||
methods: { | ||
styleLabel ({ title, desc }) { | ||
return `${title} – ${desc}` | ||
}, | ||
updateSelectedStyle (style) { | ||
this.selectedStyle = style | ||
} | ||
} | ||
``` | ||
``` html | ||
<div> | ||
<img class="option__image" :src="option.img" alt="No Man’s Sky" /> | ||
<div class="option__desc"> | ||
<span class="option__title">{{ option.title }}</span> | ||
<span class="option__small"> | ||
{{ option.desc }} | ||
</span> | ||
</div> | ||
</div> | ||
``` | ||
### Asynchronous dropdown | ||
@@ -222,3 +177,3 @@ ``` jade | ||
```javascript | ||
``` javascript | ||
methods: { | ||
@@ -225,0 +180,0 @@ asyncFind (query) { |
@@ -13,11 +13,2 @@ import deepClone from './utils' | ||
/** | ||
* Decide whether to filter the results based on search query. | ||
* Useful for async filtering, where we search through more complex data. | ||
* @type {Boolean} | ||
*/ | ||
localSearch: { | ||
type: Boolean, | ||
default: true | ||
}, | ||
/** | ||
* Array of available options: Objects, Strings or Integers. | ||
@@ -52,4 +43,3 @@ * If array of objects, visible label will default to option.label. | ||
key: { | ||
type: String, | ||
default: false | ||
type: String | ||
}, | ||
@@ -62,4 +52,3 @@ /** | ||
label: { | ||
type: String, | ||
default: false | ||
type: String | ||
}, | ||
@@ -146,4 +135,3 @@ /** | ||
customLabel: { | ||
type: Function, | ||
default: false | ||
type: Function | ||
}, | ||
@@ -174,4 +162,3 @@ /** | ||
max: { | ||
type: Number, | ||
default: false | ||
type: Number | ||
}, | ||
@@ -197,3 +184,5 @@ /** | ||
: this.options | ||
if (this.localSearch) options = this.$options.filters.filterBy(options, this.search) | ||
options = this.label | ||
? options.filter((option) => option[this.label].indexOf(this.search) !== -1) | ||
: options.filter((option) => option.indexOf(this.search) !== -1) | ||
if (this.taggable && search.length && !this.isExistingOption(search)) { | ||
@@ -357,3 +346,4 @@ options.unshift({ isTag: true, label: search }) | ||
} else { | ||
this.value.$remove(option) | ||
const index = this.valueKeys.indexOf(option) | ||
this.value.splice(index, 1) | ||
} | ||
@@ -387,3 +377,3 @@ this.$emit('remove', deepClone(option), this.id) | ||
this.search = '' | ||
this.$els.search.focus() | ||
this.$el.children[1].children[2].focus() | ||
} else { | ||
@@ -405,3 +395,3 @@ this.$el.focus() | ||
if (this.searchable) { | ||
this.$els.search.blur() | ||
this.$el.children[1].children[2].blur() | ||
this.adjustSearch() | ||
@@ -408,0 +398,0 @@ } else { |
@@ -5,3 +5,3 @@ module.exports = { | ||
pointer: 0, | ||
visibleElements: this.maxHeight / this.optionHeight | ||
visibleElements: this.maxHeight / 40 | ||
} | ||
@@ -18,11 +18,2 @@ }, | ||
default: true | ||
}, | ||
/** | ||
* Sets the height of the option. Used for scroll calculations | ||
* @type {Number} | ||
* @default 40 | ||
*/ | ||
optionHeight: { | ||
type: Number, | ||
default: 40 | ||
} | ||
@@ -32,3 +23,3 @@ }, | ||
pointerPosition () { | ||
return this.pointer * this.optionHeight | ||
return this.pointer * 40 | ||
} | ||
@@ -42,2 +33,8 @@ }, | ||
methods: { | ||
optionHighlight (index, option) { | ||
return { | ||
'multiselect__option--highlight': index === this.pointer && this.showPointer, | ||
'multiselect__option--selected': !this.isNotSelected(option) | ||
} | ||
}, | ||
addPointerElement () { | ||
@@ -52,4 +49,4 @@ if (this.filteredOptions.length > 0) { | ||
this.pointer++ | ||
if (this.$els.list.scrollTop <= this.pointerPosition - this.visibleElements * this.optionHeight) { | ||
this.$els.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight | ||
if (this.$refs.list.scrollTop <= this.pointerPosition - this.visibleElements * 40) { | ||
this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * 40 | ||
} | ||
@@ -61,4 +58,4 @@ } | ||
this.pointer-- | ||
if (this.$els.list.scrollTop >= this.pointerPosition) { | ||
this.$els.list.scrollTop = this.pointerPosition | ||
if (this.$refs.list.scrollTop >= this.pointerPosition) { | ||
this.$refs.list.scrollTop = this.pointerPosition | ||
} | ||
@@ -71,4 +68,4 @@ } | ||
this.pointer = 0 | ||
if (this.$els.list) { | ||
this.$els.list.scrollTop = 0 | ||
if (this.$refs.list) { | ||
this.$refs.list.scrollTop = 0 | ||
} | ||
@@ -75,0 +72,0 @@ }, |
@@ -12,3 +12,14 @@ import Vue from 'vue' | ||
const vmSingle = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" @update="onUpdate" id="single"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
id: 'single' | ||
}, | ||
on: { | ||
update: this.onUpdate | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -28,3 +39,15 @@ data: { | ||
const vmMulti = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" @update="onUpdate" :multiple="true" id="multi"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true, | ||
id: 'multi' | ||
}, | ||
on: { | ||
update: this.onUpdate | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -71,3 +94,14 @@ data: { | ||
const vmSingle = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" @select="onSelect" id="single"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
id: 'single' | ||
}, | ||
on: { | ||
select: this.onSelect | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -87,3 +121,15 @@ data: { | ||
const vmMulti = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" @select="onSelect" :multiple="true" id="multi"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
id: 'multi', | ||
multiple: true | ||
}, | ||
on: { | ||
select: this.onSelect | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -134,3 +180,15 @@ data: { | ||
const vmMulti = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" @remove="onRemove" :multiple="true" :id="1"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true, | ||
id: '1' | ||
}, | ||
on: { | ||
remove: this.onRemove | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -170,3 +228,14 @@ data: { | ||
const vmMulti = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" @close="onClose" :id="1"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
id: '1' | ||
}, | ||
on: { | ||
close: this.onClose | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -204,3 +273,26 @@ data: { | ||
const vmMulti = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" @open="onOpen" :id="1"></multiselect><multiselect :selected="value" :options="source" @open="onOpen" :id="2"></multiselect>', | ||
render (h) { | ||
return h('div', [ | ||
h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
id: '1' | ||
}, | ||
on: { | ||
open: this.onOpen | ||
} | ||
}), | ||
h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
id: '2' | ||
}, | ||
on: { | ||
open: this.onOpen | ||
} | ||
}) | ||
]) | ||
}, | ||
components: { Multiselect }, | ||
@@ -236,3 +328,10 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -249,3 +348,10 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -266,3 +372,11 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -275,3 +389,3 @@ data: { | ||
expect(vm.$children[0].selected).to.deep.equal(vm.value) | ||
expect(vm.$children[0].$els.tags.querySelector('.multiselect__tag').textContent).to.contain('1') | ||
expect(vm.$children[0].$refs.tags.querySelector('.multiselect__tag').textContent).to.contain('1') | ||
}) | ||
@@ -281,3 +395,13 @@ | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -290,3 +414,3 @@ data: { | ||
expect(vm.$children[0].selected).to.deep.equal(vm.value) | ||
expect(vm.$children[0].$els.tags.querySelector('.multiselect__tag').textContent).to.contain('2') | ||
expect(vm.$children[0].$refs.tags.querySelector('.multiselect__tag').textContent).to.contain('2') | ||
}) | ||
@@ -296,3 +420,13 @@ | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true" label="id" key="id"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -305,7 +439,17 @@ data: { | ||
expect(vm.$children[0].selected).to.deep.equal(vm.value) | ||
expect(vm.$children[0].$els.tags.querySelector('.multiselect__tag').textContent).to.contain('3') | ||
expect(vm.$children[0].$refs.tags.querySelector('.multiselect__tag').textContent).to.contain('3') | ||
}) | ||
it('should set value to [] when passing null as selected', () => { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true" label="id" key="id"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -318,3 +462,3 @@ data: { | ||
expect(vm.$children[0].value).to.deep.equal([]) | ||
expect(vm.$children[0].$els.tags.querySelector('.multiselect__tag')).to.equal(null) | ||
expect(vm.$children[0].$refs.tags.querySelector('.multiselect__tag')).to.equal(null) | ||
}) | ||
@@ -326,3 +470,10 @@ }) | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -335,3 +486,3 @@ data: { | ||
expect(vm.$children[0].selected).to.deep.equal(vm.value) | ||
expect(vm.$children[0].$els.tags.querySelector('input').value).to.contain('1') | ||
expect(vm.$children[0].$refs.tags.querySelector('input').value).to.contain('1') | ||
}) | ||
@@ -341,3 +492,12 @@ | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id' | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -350,3 +510,3 @@ data: { | ||
expect(vm.$children[0].selected).to.deep.equal(vm.value) | ||
expect(vm.$children[0].$els.tags.querySelector('input').value).to.contain('2') | ||
expect(vm.$children[0].$refs.tags.querySelector('input').value).to.contain('2') | ||
}) | ||
@@ -356,3 +516,12 @@ | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id' | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -365,3 +534,3 @@ data: { | ||
expect(vm.$children[0].value).to.deep.equal(null) | ||
expect(vm.$children[0].$els.tags.querySelector('.multiselect__tag')).to.equal(null) | ||
expect(vm.$children[0].$refs.tags.querySelector('.multiselect__tag')).to.equal(null) | ||
}) | ||
@@ -371,3 +540,12 @@ | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id' | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -380,3 +558,3 @@ data: { | ||
expect(vm.$children[0].search).to.equal('1') | ||
expect(vm.$children[0].$els.search.value).to.equal('1') | ||
expect(vm.$children[0].$refs.search.value).to.equal('1') | ||
}) | ||
@@ -386,3 +564,12 @@ | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id' | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -395,7 +582,17 @@ data: { | ||
expect(vm.$children[0].search).to.equal(2) | ||
expect(vm.$children[0].$els.search.value).to.equal('2') | ||
expect(vm.$children[0].$refs.search.value).to.equal('2') | ||
}) | ||
it('if selected is null should set search value to empty string', () => { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :taggable="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
taggable: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -408,3 +605,3 @@ data: { | ||
expect(vm.$children[0].search).to.equal(null) | ||
expect(vm.$children[0].$els.search.value).to.equal('') | ||
expect(vm.$children[0].$refs.search.value).to.equal('') | ||
}) | ||
@@ -416,3 +613,11 @@ }) | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :searchable="false"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
searchable: false | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -425,3 +630,3 @@ data: { | ||
expect(vm.$children[0].selected).to.deep.equal(vm.value) | ||
expect(vm.$children[0].$els.tags.querySelector('.multiselect__single').textContent).to.contain('1') | ||
expect(vm.$children[0].$refs.tags.querySelector('.multiselect__single').textContent).to.contain('1') | ||
}) | ||
@@ -431,3 +636,13 @@ | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :searchable="false"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: false | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -440,3 +655,3 @@ data: { | ||
expect(vm.$children[0].selected).to.deep.equal(vm.value) | ||
expect(vm.$children[0].$els.tags.querySelector('.multiselect__single').textContent).to.contain('2') | ||
expect(vm.$children[0].$refs.tags.querySelector('.multiselect__single').textContent).to.contain('2') | ||
}) | ||
@@ -449,3 +664,11 @@ }) | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -457,7 +680,7 @@ data: { | ||
}).$mount() | ||
vm.$children[0].$els.search.focus() | ||
vm.$children[0].$refs.search.focus() | ||
vm.$children[0].search = 'test' | ||
vm.$children[0].select(vm.source[0]) | ||
Vue.nextTick(function () { | ||
expect(vm.$children[0].$els.tags.querySelector('input').value).to.equal('') | ||
expect(vm.$children[0].$refs.tags.querySelector('input').value).to.equal('') | ||
done() | ||
@@ -469,3 +692,12 @@ }) | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true" :clear-on-select="false"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true, | ||
clearOnSelect: false | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -477,7 +709,7 @@ data: { | ||
}).$mount() | ||
vm.$children[0].$els.search.focus() | ||
vm.$children[0].$refs.search.focus() | ||
vm.$children[0].search = 'test' | ||
vm.$children[0].select(vm.source[0]) | ||
Vue.nextTick(function () { | ||
expect(vm.$children[0].$els.tags.querySelector('input').value).to.equal('test') | ||
expect(vm.$children[0].$refs.tags.querySelector('input').value).to.equal('test') | ||
done() | ||
@@ -490,3 +722,11 @@ }) | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -505,3 +745,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true" label="id" key="id"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -520,3 +770,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -537,3 +797,14 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true" :max="3"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true, | ||
max: 3 | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -559,3 +830,12 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id' | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -576,3 +856,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :close-on-select="false"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
closeOnSelect: false | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -597,3 +887,12 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id' | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -611,3 +910,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :allow-empty="false"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
allowEmpty: false | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -629,3 +938,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -645,3 +964,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -662,3 +991,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -681,3 +1020,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -702,3 +1051,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -721,3 +1080,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -742,3 +1111,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -763,3 +1142,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -784,3 +1173,17 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="sel" :options="source" label="id" key="id" :searchable="false" @update="addMore" :multiple="false"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.sel, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: false, | ||
searchable: false | ||
}, | ||
on: { | ||
update: this.addMore | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -808,3 +1211,16 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :searchable="false" @update="afterSelect"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: false | ||
}, | ||
on: { | ||
update: this.afterSelect | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -833,3 +1249,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected.sync="value" :options="source" label="id" key="id" :searchable="false"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: false | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -853,3 +1279,14 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :searchable="false" :reset-after="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: false, | ||
resetAfter: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -873,3 +1310,14 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :searchable="true" :clear-on-select="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: true, | ||
clearOnSelect: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -893,2 +1341,16 @@ data: { | ||
const vm = new Vue({ | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
clearOnSelect: false | ||
}, | ||
on: { | ||
'search-change': this.afterSearch | ||
} | ||
}) | ||
}, | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" @search-change="afterSearch" :clear-on-select="false"></multiselect>', | ||
@@ -918,3 +1380,13 @@ components: { Multiselect }, | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -938,3 +1410,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :searchable="false"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: false | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -959,3 +1441,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -977,3 +1469,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -996,3 +1498,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" label="id" key="id" :multiple="false"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: false | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1017,3 +1529,11 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1030,3 +1550,11 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1046,3 +1574,11 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1060,3 +1596,11 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1074,3 +1618,10 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1088,3 +1639,10 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1104,3 +1662,11 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1118,3 +1684,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true" label="id" key="id"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1132,3 +1708,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true" label="id" key="id"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1146,3 +1732,14 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true" label="id" key="id" :custom-label="idWithId"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
multiple: true, | ||
customLabel: this.idWithId | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1165,3 +1762,11 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1178,3 +1783,14 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: true, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1191,3 +1807,14 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" label="id" key="id" :multiple="false"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: true, | ||
multiple: false | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1206,3 +1833,12 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
multiple: true, | ||
searchable: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1219,3 +1855,14 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: true, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1234,3 +1881,14 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: true, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1249,3 +1907,14 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" label="id" key="id" :multiple="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: true, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1264,3 +1933,15 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" label="id" key="id" :multiple="true" :hide-selected="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
label: 'id', | ||
key: 'id', | ||
searchable: true, | ||
hideSelected: true, | ||
multiple: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1279,3 +1960,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" :multiple="true" :taggable="true"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
searchable: true, | ||
multiple: true, | ||
taggable: true | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1296,18 +1987,2 @@ data: { | ||
}) | ||
it('should not alter the available options when :local-search is FALSE', () => { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :options="source" :multiple="true" :local-search="false"></multiselect>', | ||
components: { Multiselect }, | ||
data: { | ||
value: [], | ||
source: [10, 20, 30] | ||
} | ||
}).$mount() | ||
expect(vm.$children[0].filteredOptions).to.deep.equal([10, 20, 30]) | ||
expect(vm.$children[0].filteredOptions.length).to.equal(3) | ||
vm.$children[0].search = 'test' | ||
expect(vm.$children[0].filteredOptions).to.deep.equal([10, 20, 30]) | ||
expect(vm.$children[0].filteredOptions.length).to.equal(3) | ||
}) | ||
}) | ||
@@ -1318,3 +1993,16 @@ | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" :multiple="true" :taggable="true" @tag="addTag"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
searchable: true, | ||
multiple: true, | ||
taggable: true | ||
}, | ||
on: { | ||
tag: this.addTag | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1346,3 +2034,13 @@ data () { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" :multiple="true" :limit="2"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
searchable: true, | ||
multiple: true, | ||
limit: 2 | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1362,3 +2060,13 @@ data: { | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" :multiple="true" :limit="1"></multiselect>', | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
searchable: true, | ||
multiple: true, | ||
limit: 1 | ||
} | ||
}) | ||
}, | ||
components: { Multiselect }, | ||
@@ -1381,4 +2089,15 @@ data: { | ||
const vm = new Vue({ | ||
render (h) { | ||
return h(Multiselect, { | ||
props: { | ||
selected: this.value, | ||
options: this.source, | ||
searchable: true, | ||
multiple: true, | ||
limit: 1, | ||
showLabels: false | ||
} | ||
}) | ||
}, | ||
el: 'App', | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" :multiple="true" :limit="1" :show-labels="false"></multiselect>', | ||
components: { Multiselect }, | ||
@@ -1395,18 +2114,2 @@ data: { | ||
}) | ||
describe(':option-partial', () => { | ||
it('should switch the option template to the one provided in the partial', () => { | ||
Vue.partial('customPartial', '<span>test_test</span>') | ||
const vm = new Vue({ | ||
template: '<multiselect :selected="value" :searchable="true" :options="source" :multiple="true" :limit="1" option-partial="customPartial"></multiselect>', | ||
components: { Multiselect }, | ||
data: { | ||
value: ['1', '2', '3'], | ||
source: ['1', '2', '3', '4', '5'] | ||
} | ||
}).$mount() | ||
vm.$children[0].activate() | ||
expect(vm.$children[0].$els.list.children[0].children[0].textContent).to.equal('test_test') | ||
}) | ||
}) | ||
}) |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
3775
452946
62
39
2
463