diff --git a/index.html b/index.html index 50f5d5e..f711bc4 100644 --- a/index.html +++ b/index.html @@ -11,4 +11,4 @@ })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', 'UA-12818324-8', 'auto'); - ga('send', 'pageview'); \ No newline at end of file + ga('send', 'pageview'); \ No newline at end of file diff --git a/js/app.0f88f92ee49c1a7bb01a.js b/js/app.0f88f92ee49c1a7bb01a.js new file mode 100644 index 0000000..295ac05 --- /dev/null +++ b/js/app.0f88f92ee49c1a7bb01a.js @@ -0,0 +1,2 @@ +webpackJsonp([2,0],{0:function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var o=i(90),l=n(o),s=i(87),a=n(s);i(82),l.default.component("v-select",a.default),new l.default({el:"#app",data:function(){return{loading:!1,selected:null,options:[{title:"Read the Docs",icon:"octicon-book",url:"docs/"},{title:"View on GitHub",icon:"octicon-mark-github",url:"https://github.com/sagalbot/vue-select"},{title:"View on NPM",icon:"octicon-database",url:"https://www.npmjs.com/package/vue-select"},{title:"View Code Climate Analysis",icon:"octicon-graph",url:"https://codeclimate.com/github/sagalbot/vue-select"},{title:"View Codepen Examples",icon:"octicon-pencil",url:"https://codepen.io/collection/nrkgxV/"}]}}})},38:function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(44),l=n(o),s=i(47),a=n(s),u=i(42),r=n(u),h=i(48),c=n(h),d=i(40),p=n(d),f=i(41),b=n(f),m=i(39),g=n(m);t.default={mixins:[p.default,b.default,g.default],props:{value:{default:null},options:{type:Array,default:function(){return[]}},disabled:{type:Boolean,default:!1},maxHeight:{type:String,default:"400px"},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},getOptionLabel:{type:Function,default:function(e){if("object"===("undefined"==typeof e?"undefined":(0,c.default)(e))){if(!e.hasOwnProperty(this.label))return console.warn('[vue-select warn]: Label key "option.'+this.label+'" does not'+(" exist in options object "+(0,r.default)(e)+".\n")+"http://sagalbot.github.io/vue-select/#ex-labels");if(this.label&&e[this.label])return e[this.label]}return e}},onChange:{type:Function,default:function(e){this.$emit("input",e)}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default:function(e,t,i){return(t||"").toLowerCase().indexOf(i.toLowerCase())>-1}},filter:{type:Function,default:function(e,t){var i=this;return e.filter(function(e){var n=i.getOptionLabel(e);return"number"==typeof n&&(n=n.toString()),i.filterBy(e,n,t)})}},createOption:{type:Function,default:function(e){return"object"===(0,c.default)(this.mutableOptions[0])&&(e=(0,a.default)({},this.label,e)),this.$emit("option:created",e),e}},resetOnOptionsChange:{type:Boolean,default:!1},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"}},data:function(){return{search:"",open:!1,mutableValue:null,mutableOptions:[]}},watch:{value:function(e){this.mutableValue=e},mutableValue:function(e,t){this.multiple?this.onChange?this.onChange(e):null:this.onChange&&e!==t?this.onChange(e):null},options:function(e){this.mutableOptions=e},mutableOptions:function(){!this.taggable&&this.resetOnOptionsChange&&(this.mutableValue=this.multiple?[]:null)},multiple:function(e){this.mutableValue=e?[]:null}},created:function(){this.mutableValue=this.value,this.mutableOptions=this.options.slice(0),this.mutableLoading=this.loading,this.$on("option:created",this.maybePushTag)},methods:{select:function(e){this.isOptionSelected(e)?this.deselect(e):(this.taggable&&!this.optionExists(e)&&(e=this.createOption(e)),this.multiple&&!this.mutableValue?this.mutableValue=[e]:this.multiple?this.mutableValue.push(e):this.mutableValue=e),this.onAfterSelect(e)},deselect:function(e){var t=this;if(this.multiple){var i=-1;this.mutableValue.forEach(function(n){(n===e||"object"===("undefined"==typeof n?"undefined":(0,c.default)(n))&&n[t.label]===e[t.label])&&(i=n)});var n=this.mutableValue.indexOf(i);this.mutableValue.splice(n,1)}else this.mutableValue=null},clearSelection:function(){this.mutableValue=this.multiple?[]:null},onAfterSelect:function(e){this.closeOnSelect&&(this.open=!this.open,this.$refs.search.blur()),this.clearSearchOnSelect&&(this.search="")},toggleDropdown:function(e){e.target!==this.$refs.openIndicator&&e.target!==this.$refs.search&&e.target!==this.$refs.toggle&&e.target!==this.$el||(this.open?this.$refs.search.blur():this.disabled||(this.open=!0,this.$refs.search.focus()))},isOptionSelected:function(e){var t=this;if(this.multiple&&this.mutableValue){var i=!1;return this.mutableValue.forEach(function(n){"object"===("undefined"==typeof n?"undefined":(0,c.default)(n))&&n[t.label]===e[t.label]?i=!0:"object"===("undefined"==typeof n?"undefined":(0,c.default)(n))&&n[t.label]===e?i=!0:n===e&&(i=!0)}),i}return this.mutableValue===e},onEscape:function(){this.search.length?this.search="":this.$refs.search.blur()},onSearchBlur:function(){this.clearSearchOnBlur&&(this.search=""),this.open=!1,this.$emit("search:blur")},onSearchFocus:function(){this.open=!0,this.$emit("search:focus")},maybeDeleteValue:function(){if(!this.$refs.search.value.length&&this.mutableValue)return this.multiple?this.mutableValue.pop():this.mutableValue=null},optionExists:function(e){var t=this,i=!1;return this.mutableOptions.forEach(function(n){"object"===("undefined"==typeof n?"undefined":(0,c.default)(n))&&n[t.label]===e?i=!0:n===e&&(i=!0)}),i},maybePushTag:function(e){this.pushTags&&this.mutableOptions.push(e)}},computed:{dropdownClasses:function(){return{open:this.dropdownOpen,single:!this.multiple,searching:this.searching,searchable:this.searchable,unsearchable:!this.searchable,loading:this.mutableLoading,rtl:"rtl"===this.dir,disabled:this.disabled}},clearSearchOnBlur:function(){return this.clearSearchOnSelect&&!this.multiple},searching:function(){return!!this.search},dropdownOpen:function(){return!this.noDrop&&(this.open&&!this.mutableLoading)},searchPlaceholder:function(){if(this.isValueEmpty&&this.placeholder)return this.placeholder},filteredOptions:function(){if(!this.filterable&&!this.taggable)return this.mutableOptions.slice();var e=this.search.length?this.filter(this.mutableOptions,this.search,this):this.mutableOptions;return this.taggable&&this.search.length&&!this.optionExists(this.search)&&e.unshift(this.search),e},isValueEmpty:function(){return!this.mutableValue||("object"===(0,c.default)(this.mutableValue)?!(0,l.default)(this.mutableValue).length:!this.mutableValue.length)},valueAsArray:function(){return this.multiple?this.mutableValue:this.mutableValue?[].concat(this.mutableValue):[]},showClearButton:function(){return!this.multiple&&!this.open&&null!=this.mutableValue}}}},39:function(e,t){"use strict";e.exports={props:{loading:{type:Boolean,default:!1},onSearch:{type:Function,default:function(e,t){}}},data:function(){return{mutableLoading:!1}},watch:{search:function(){this.search.length>0&&(this.onSearch(this.search,this.toggleLoading),this.$emit("search",this.search,this.toggleLoading))},loading:function(e){this.mutableLoading=e}},methods:{toggleLoading:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null==e?this.mutableLoading=!this.mutableLoading:this.mutableLoading=e}}}},40:function(e,t){"use strict";e.exports={watch:{typeAheadPointer:function(){this.maybeAdjustScroll()}},methods:{maybeAdjustScroll:function(){var e=this.pixelsToPointerTop(),t=this.pixelsToPointerBottom();return e<=this.viewport().top?this.scrollTo(e):t>=this.viewport().bottom?this.scrollTo(this.viewport().top+this.pointerHeight()):void 0},pixelsToPointerTop:function e(){var e=0;if(this.$refs.dropdownMenu)for(var t=0;t0&&(this.typeAheadPointer--,this.maybeAdjustScroll&&this.maybeAdjustScroll())},typeAheadDown:function(){this.typeAheadPointer -1;\n\t }\n\t },\n\t\n\t filter: {\n\t \"type\": Function,\n\t default: function _default(options, search) {\n\t var _this = this;\n\t\n\t return options.filter(function (option) {\n\t var label = _this.getOptionLabel(option);\n\t if (typeof label === 'number') {\n\t label = label.toString();\n\t }\n\t return _this.filterBy(option, label, search);\n\t });\n\t }\n\t },\n\t\n\t createOption: {\n\t type: Function,\n\t default: function _default(newOption) {\n\t if ((0, _typeof3.default)(this.mutableOptions[0]) === 'object') {\n\t newOption = (0, _defineProperty3.default)({}, this.label, newOption);\n\t }\n\t this.$emit('option:created', newOption);\n\t return newOption;\n\t }\n\t },\n\t\n\t resetOnOptionsChange: {\n\t type: Boolean,\n\t default: false\n\t },\n\t\n\t noDrop: {\n\t type: Boolean,\n\t default: false\n\t },\n\t\n\t inputId: {\n\t type: String\n\t },\n\t\n\t dir: {\n\t type: String,\n\t default: 'auto'\n\t }\n\t },\n\t\n\t data: function data() {\n\t return {\n\t search: '',\n\t open: false,\n\t mutableValue: null,\n\t mutableOptions: []\n\t };\n\t },\n\t\n\t\n\t watch: {\n\t value: function value(val) {\n\t this.mutableValue = val;\n\t },\n\t mutableValue: function mutableValue(val, old) {\n\t if (this.multiple) {\n\t this.onChange ? this.onChange(val) : null;\n\t } else {\n\t this.onChange && val !== old ? this.onChange(val) : null;\n\t }\n\t },\n\t options: function options(val) {\n\t this.mutableOptions = val;\n\t },\n\t mutableOptions: function mutableOptions() {\n\t if (!this.taggable && this.resetOnOptionsChange) {\n\t this.mutableValue = this.multiple ? [] : null;\n\t }\n\t },\n\t multiple: function multiple(val) {\n\t this.mutableValue = val ? [] : null;\n\t }\n\t },\n\t\n\t created: function created() {\n\t this.mutableValue = this.value;\n\t this.mutableOptions = this.options.slice(0);\n\t this.mutableLoading = this.loading;\n\t\n\t this.$on('option:created', this.maybePushTag);\n\t },\n\t\n\t\n\t methods: {\n\t select: function select(option) {\n\t if (this.isOptionSelected(option)) {\n\t this.deselect(option);\n\t } else {\n\t if (this.taggable && !this.optionExists(option)) {\n\t option = this.createOption(option);\n\t }\n\t\n\t if (this.multiple && !this.mutableValue) {\n\t this.mutableValue = [option];\n\t } else if (this.multiple) {\n\t this.mutableValue.push(option);\n\t } else {\n\t this.mutableValue = option;\n\t }\n\t }\n\t\n\t this.onAfterSelect(option);\n\t },\n\t deselect: function deselect(option) {\n\t var _this2 = this;\n\t\n\t if (this.multiple) {\n\t var ref = -1;\n\t this.mutableValue.forEach(function (val) {\n\t if (val === option || (typeof val === 'undefined' ? 'undefined' : (0, _typeof3.default)(val)) === 'object' && val[_this2.label] === option[_this2.label]) {\n\t ref = val;\n\t }\n\t });\n\t var index = this.mutableValue.indexOf(ref);\n\t this.mutableValue.splice(index, 1);\n\t } else {\n\t this.mutableValue = null;\n\t }\n\t },\n\t clearSelection: function clearSelection() {\n\t this.mutableValue = this.multiple ? [] : null;\n\t },\n\t onAfterSelect: function onAfterSelect(option) {\n\t if (this.closeOnSelect) {\n\t this.open = !this.open;\n\t this.$refs.search.blur();\n\t }\n\t\n\t if (this.clearSearchOnSelect) {\n\t this.search = '';\n\t }\n\t },\n\t toggleDropdown: function toggleDropdown(e) {\n\t if (e.target === this.$refs.openIndicator || e.target === this.$refs.search || e.target === this.$refs.toggle || e.target === this.$el) {\n\t if (this.open) {\n\t this.$refs.search.blur();\n\t } else {\n\t if (!this.disabled) {\n\t this.open = true;\n\t this.$refs.search.focus();\n\t }\n\t }\n\t }\n\t },\n\t isOptionSelected: function isOptionSelected(option) {\n\t var _this3 = this;\n\t\n\t if (this.multiple && this.mutableValue) {\n\t var selected = false;\n\t this.mutableValue.forEach(function (opt) {\n\t if ((typeof opt === 'undefined' ? 'undefined' : (0, _typeof3.default)(opt)) === 'object' && opt[_this3.label] === option[_this3.label]) {\n\t selected = true;\n\t } else if ((typeof opt === 'undefined' ? 'undefined' : (0, _typeof3.default)(opt)) === 'object' && opt[_this3.label] === option) {\n\t selected = true;\n\t } else if (opt === option) {\n\t selected = true;\n\t }\n\t });\n\t return selected;\n\t }\n\t\n\t return this.mutableValue === option;\n\t },\n\t onEscape: function onEscape() {\n\t if (!this.search.length) {\n\t this.$refs.search.blur();\n\t } else {\n\t this.search = '';\n\t }\n\t },\n\t onSearchBlur: function onSearchBlur() {\n\t if (this.clearSearchOnBlur) {\n\t this.search = '';\n\t }\n\t this.open = false;\n\t this.$emit('search:blur');\n\t },\n\t onSearchFocus: function onSearchFocus() {\n\t this.open = true;\n\t this.$emit('search:focus');\n\t },\n\t maybeDeleteValue: function maybeDeleteValue() {\n\t if (!this.$refs.search.value.length && this.mutableValue) {\n\t return this.multiple ? this.mutableValue.pop() : this.mutableValue = null;\n\t }\n\t },\n\t optionExists: function optionExists(option) {\n\t var _this4 = this;\n\t\n\t var exists = false;\n\t\n\t this.mutableOptions.forEach(function (opt) {\n\t if ((typeof opt === 'undefined' ? 'undefined' : (0, _typeof3.default)(opt)) === 'object' && opt[_this4.label] === option) {\n\t exists = true;\n\t } else if (opt === option) {\n\t exists = true;\n\t }\n\t });\n\t\n\t return exists;\n\t },\n\t maybePushTag: function maybePushTag(option) {\n\t if (this.pushTags) {\n\t this.mutableOptions.push(option);\n\t }\n\t }\n\t },\n\t\n\t computed: {\n\t dropdownClasses: function dropdownClasses() {\n\t return {\n\t open: this.dropdownOpen,\n\t single: !this.multiple,\n\t searching: this.searching,\n\t searchable: this.searchable,\n\t unsearchable: !this.searchable,\n\t loading: this.mutableLoading,\n\t rtl: this.dir === 'rtl',\n\t disabled: this.disabled\n\t };\n\t },\n\t clearSearchOnBlur: function clearSearchOnBlur() {\n\t return this.clearSearchOnSelect && !this.multiple;\n\t },\n\t searching: function searching() {\n\t return !!this.search;\n\t },\n\t dropdownOpen: function dropdownOpen() {\n\t return this.noDrop ? false : this.open && !this.mutableLoading;\n\t },\n\t searchPlaceholder: function searchPlaceholder() {\n\t if (this.isValueEmpty && this.placeholder) {\n\t return this.placeholder;\n\t }\n\t },\n\t filteredOptions: function filteredOptions() {\n\t if (!this.filterable && !this.taggable) {\n\t return this.mutableOptions.slice();\n\t }\n\t var options = this.search.length ? this.filter(this.mutableOptions, this.search, this) : this.mutableOptions;\n\t if (this.taggable && this.search.length && !this.optionExists(this.search)) {\n\t options.unshift(this.search);\n\t }\n\t return options;\n\t },\n\t isValueEmpty: function isValueEmpty() {\n\t if (this.mutableValue) {\n\t if ((0, _typeof3.default)(this.mutableValue) === 'object') {\n\t return !(0, _keys2.default)(this.mutableValue).length;\n\t }\n\t return !this.mutableValue.length;\n\t }\n\t\n\t return true;\n\t },\n\t valueAsArray: function valueAsArray() {\n\t if (this.multiple) {\n\t return this.mutableValue;\n\t } else if (this.mutableValue) {\n\t return [].concat(this.mutableValue);\n\t }\n\t\n\t return [];\n\t },\n\t showClearButton: function showClearButton() {\n\t return !this.multiple && !this.open && this.mutableValue != null;\n\t }\n\t }\n\t\n\t};\n\n/***/ }),\n\n/***/ 39:\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = {\n\t\tprops: {\n\t\t\tloading: {\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t},\n\t\n\t\t\tonSearch: {\n\t\t\t\ttype: Function,\n\t\t\t\tdefault: function _default(search, loading) {}\n\t\t\t}\n\t\t},\n\t\n\t\tdata: function data() {\n\t\t\treturn {\n\t\t\t\tmutableLoading: false\n\t\t\t};\n\t\t},\n\t\n\t\n\t\twatch: {\n\t\t\tsearch: function search() {\n\t\t\t\tif (this.search.length > 0) {\n\t\t\t\t\tthis.onSearch(this.search, this.toggleLoading);\n\t\t\t\t\tthis.$emit('search', this.search, this.toggleLoading);\n\t\t\t\t}\n\t\t\t},\n\t\t\tloading: function loading(val) {\n\t\t\t\tthis.mutableLoading = val;\n\t\t\t}\n\t\t},\n\t\n\t\tmethods: {\n\t\t\ttoggleLoading: function toggleLoading() {\n\t\t\t\tvar toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\n\t\t\t\tif (toggle == null) {\n\t\t\t\t\treturn this.mutableLoading = !this.mutableLoading;\n\t\t\t\t}\n\t\t\t\treturn this.mutableLoading = toggle;\n\t\t\t}\n\t\t}\n\t};\n\n/***/ }),\n\n/***/ 40:\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\t\n\tmodule.exports = {\n\t watch: {\n\t typeAheadPointer: function typeAheadPointer() {\n\t this.maybeAdjustScroll();\n\t }\n\t },\n\t\n\t methods: {\n\t maybeAdjustScroll: function maybeAdjustScroll() {\n\t var pixelsToPointerTop = this.pixelsToPointerTop();\n\t var pixelsToPointerBottom = this.pixelsToPointerBottom();\n\t\n\t if (pixelsToPointerTop <= this.viewport().top) {\n\t return this.scrollTo(pixelsToPointerTop);\n\t } else if (pixelsToPointerBottom >= this.viewport().bottom) {\n\t return this.scrollTo(this.viewport().top + this.pointerHeight());\n\t }\n\t },\n\t pixelsToPointerTop: function pixelsToPointerTop() {\n\t var pixelsToPointerTop = 0;\n\t if (this.$refs.dropdownMenu) {\n\t for (var i = 0; i < this.typeAheadPointer; i++) {\n\t pixelsToPointerTop += this.$refs.dropdownMenu.children[i].offsetHeight;\n\t }\n\t }\n\t return pixelsToPointerTop;\n\t },\n\t pixelsToPointerBottom: function pixelsToPointerBottom() {\n\t return this.pixelsToPointerTop() + this.pointerHeight();\n\t },\n\t pointerHeight: function pointerHeight() {\n\t var element = this.$refs.dropdownMenu ? this.$refs.dropdownMenu.children[this.typeAheadPointer] : false;\n\t return element ? element.offsetHeight : 0;\n\t },\n\t viewport: function viewport() {\n\t return {\n\t top: this.$refs.dropdownMenu ? this.$refs.dropdownMenu.scrollTop : 0,\n\t bottom: this.$refs.dropdownMenu ? this.$refs.dropdownMenu.offsetHeight + this.$refs.dropdownMenu.scrollTop : 0\n\t };\n\t },\n\t scrollTo: function scrollTo(position) {\n\t return this.$refs.dropdownMenu ? this.$refs.dropdownMenu.scrollTop = position : null;\n\t }\n\t }\n\t};\n\n/***/ }),\n\n/***/ 41:\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\t\n\tmodule.exports = {\n\t data: function data() {\n\t return {\n\t typeAheadPointer: -1\n\t };\n\t },\n\t\n\t\n\t watch: {\n\t filteredOptions: function filteredOptions() {\n\t this.typeAheadPointer = 0;\n\t }\n\t },\n\t\n\t methods: {\n\t typeAheadUp: function typeAheadUp() {\n\t if (this.typeAheadPointer > 0) {\n\t this.typeAheadPointer--;\n\t if (this.maybeAdjustScroll) {\n\t this.maybeAdjustScroll();\n\t }\n\t }\n\t },\n\t typeAheadDown: function typeAheadDown() {\n\t if (this.typeAheadPointer < this.filteredOptions.length - 1) {\n\t this.typeAheadPointer++;\n\t if (this.maybeAdjustScroll) {\n\t this.maybeAdjustScroll();\n\t }\n\t }\n\t },\n\t typeAheadSelect: function typeAheadSelect() {\n\t if (this.filteredOptions[this.typeAheadPointer]) {\n\t this.select(this.filteredOptions[this.typeAheadPointer]);\n\t } else if (this.taggable && this.search.length) {\n\t this.select(this.search);\n\t }\n\t\n\t if (this.clearSearchOnSelect) {\n\t this.search = \"\";\n\t }\n\t }\n\t }\n\t};\n\n/***/ }),\n\n/***/ 82:\n/***/ (function(module, exports) {\n\n\t// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 83:\n/***/ (function(module, exports) {\n\n\t// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 87:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t\n\t/* styles */\n\t__webpack_require__(83)\n\t\n\tvar Component = __webpack_require__(88)(\n\t /* script */\n\t __webpack_require__(38),\n\t /* template */\n\t __webpack_require__(89),\n\t /* scopeId */\n\t null,\n\t /* cssModules */\n\t null\n\t)\n\t\n\tmodule.exports = Component.exports\n\n\n/***/ }),\n\n/***/ 89:\n/***/ (function(module, exports) {\n\n\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n\t return _c('div', {\n\t staticClass: \"dropdown v-select\",\n\t class: _vm.dropdownClasses,\n\t attrs: {\n\t \"dir\": _vm.dir\n\t }\n\t }, [_c('div', {\n\t ref: \"toggle\",\n\t class: ['dropdown-toggle', 'clearfix'],\n\t on: {\n\t \"mousedown\": function($event) {\n\t $event.preventDefault();\n\t _vm.toggleDropdown($event)\n\t }\n\t }\n\t }, [_vm._l((_vm.valueAsArray), function(option) {\n\t return _vm._t(\"selected-option-container\", [_c('span', {\n\t key: option.index,\n\t staticClass: \"selected-tag\"\n\t }, [_vm._t(\"selected-option\", [_vm._v(\"\\n \" + _vm._s(_vm.getOptionLabel(option)) + \"\\n \")], null, (typeof option === 'object') ? option : ( _obj = {}, _obj[_vm.label] = option, _obj )), _vm._v(\" \"), (_vm.multiple) ? _c('button', {\n\t staticClass: \"close\",\n\t attrs: {\n\t \"disabled\": _vm.disabled,\n\t \"type\": \"button\",\n\t \"aria-label\": \"Remove option\"\n\t },\n\t on: {\n\t \"click\": function($event) {\n\t _vm.deselect(option)\n\t }\n\t }\n\t }, [_c('span', {\n\t attrs: {\n\t \"aria-hidden\": \"true\"\n\t }\n\t }, [_vm._v(\"×\")])]) : _vm._e()], 2)], {\n\t option: (typeof option === 'object') ? option : ( _obj$1 = {}, _obj$1[_vm.label] = option, _obj$1 ),\n\t deselect: _vm.deselect,\n\t multiple: _vm.multiple,\n\t disabled: _vm.disabled\n\t })\n\t var _obj;\n\t var _obj$1;\n\t }), _vm._v(\" \"), _c('input', {\n\t directives: [{\n\t name: \"model\",\n\t rawName: \"v-model\",\n\t value: (_vm.search),\n\t expression: \"search\"\n\t }],\n\t ref: \"search\",\n\t staticClass: \"form-control\",\n\t style: ({\n\t width: _vm.isValueEmpty ? '100%' : 'auto'\n\t }),\n\t attrs: {\n\t \"type\": \"search\",\n\t \"autocomplete\": \"false\",\n\t \"disabled\": _vm.disabled,\n\t \"placeholder\": _vm.searchPlaceholder,\n\t \"tabindex\": _vm.tabindex,\n\t \"readonly\": !_vm.searchable,\n\t \"id\": _vm.inputId,\n\t \"aria-label\": \"Search for option\"\n\t },\n\t domProps: {\n\t \"value\": (_vm.search)\n\t },\n\t on: {\n\t \"keydown\": [function($event) {\n\t if (!('button' in $event) && _vm._k($event.keyCode, \"delete\", [8, 46], $event.key)) { return null; }\n\t _vm.maybeDeleteValue($event)\n\t }, function($event) {\n\t if (!('button' in $event) && _vm._k($event.keyCode, \"up\", 38, $event.key)) { return null; }\n\t $event.preventDefault();\n\t _vm.typeAheadUp($event)\n\t }, function($event) {\n\t if (!('button' in $event) && _vm._k($event.keyCode, \"down\", 40, $event.key)) { return null; }\n\t $event.preventDefault();\n\t _vm.typeAheadDown($event)\n\t }, function($event) {\n\t if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n\t $event.preventDefault();\n\t _vm.typeAheadSelect($event)\n\t }],\n\t \"keyup\": function($event) {\n\t if (!('button' in $event) && _vm._k($event.keyCode, \"esc\", 27, $event.key)) { return null; }\n\t _vm.onEscape($event)\n\t },\n\t \"blur\": _vm.onSearchBlur,\n\t \"focus\": _vm.onSearchFocus,\n\t \"input\": function($event) {\n\t if ($event.target.composing) { return; }\n\t _vm.search = $event.target.value\n\t }\n\t }\n\t }), _vm._v(\" \"), _c('button', {\n\t directives: [{\n\t name: \"show\",\n\t rawName: \"v-show\",\n\t value: (_vm.showClearButton),\n\t expression: \"showClearButton\"\n\t }],\n\t staticClass: \"clear\",\n\t attrs: {\n\t \"disabled\": _vm.disabled,\n\t \"type\": \"button\",\n\t \"title\": \"Clear selection\"\n\t },\n\t on: {\n\t \"click\": _vm.clearSelection\n\t }\n\t }, [_c('span', {\n\t attrs: {\n\t \"aria-hidden\": \"true\"\n\t }\n\t }, [_vm._v(\"×\")])]), _vm._v(\" \"), (!_vm.noDrop) ? _c('i', {\n\t ref: \"openIndicator\",\n\t staticClass: \"open-indicator\",\n\t attrs: {\n\t \"role\": \"presentation\"\n\t }\n\t }) : _vm._e(), _vm._v(\" \"), _vm._t(\"spinner\", [_c('div', {\n\t directives: [{\n\t name: \"show\",\n\t rawName: \"v-show\",\n\t value: (_vm.mutableLoading),\n\t expression: \"mutableLoading\"\n\t }],\n\t staticClass: \"spinner\"\n\t }, [_vm._v(\"Loading...\")])])], 2), _vm._v(\" \"), _c('transition', {\n\t attrs: {\n\t \"name\": _vm.transition\n\t }\n\t }, [(_vm.dropdownOpen) ? _c('ul', {\n\t ref: \"dropdownMenu\",\n\t staticClass: \"dropdown-menu\",\n\t style: ({\n\t 'max-height': _vm.maxHeight\n\t })\n\t }, [_vm._l((_vm.filteredOptions), function(option, index) {\n\t return _c('li', {\n\t key: index,\n\t class: {\n\t active: _vm.isOptionSelected(option), highlight: index === _vm.typeAheadPointer\n\t },\n\t on: {\n\t \"mouseover\": function($event) {\n\t _vm.typeAheadPointer = index\n\t }\n\t }\n\t }, [_c('a', {\n\t on: {\n\t \"mousedown\": function($event) {\n\t $event.preventDefault();\n\t _vm.select(option)\n\t }\n\t }\n\t }, [_vm._t(\"option\", [_vm._v(\"\\n \" + _vm._s(_vm.getOptionLabel(option)) + \"\\n \")], null, (typeof option === 'object') ? option : ( _obj = {}, _obj[_vm.label] = option, _obj ))], 2)])\n\t var _obj;\n\t }), _vm._v(\" \"), (!_vm.filteredOptions.length) ? _c('li', {\n\t staticClass: \"no-options\"\n\t }, [_vm._t(\"no-options\", [_vm._v(\"Sorry, no matching options.\")])], 2) : _vm._e()], 2) : _vm._e()])], 1)\n\t},staticRenderFns: []}\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// js/app.0f88f92ee49c1a7bb01a.js","import Vue from 'vue'\nimport vSelect from '../../src/components/Select'\n\nimport './assets/scss/home.scss'\n\nVue.component('v-select', vSelect);\n\n/* eslint-disable no-new */\nnew Vue({\n el: '#app',\n data() {\n return {\n loading: false,\n selected: null,\n options: [\n {\n title: 'Read the Docs',\n icon: 'octicon-book',\n url: 'docs/'\n },\n {\n title: 'View on GitHub',\n icon: 'octicon-mark-github',\n url: 'https://github.com/sagalbot/vue-select'\n },\n {\n title: 'View on NPM',\n icon: 'octicon-database',\n url: 'https://www.npmjs.com/package/vue-select'\n },\n {\n title: 'View Code Climate Analysis',\n icon: 'octicon-graph',\n url: 'https://codeclimate.com/github/sagalbot/vue-select'\n },\n {\n title: 'View Codepen Examples',\n icon: 'octicon-pencil',\n url: 'https://codepen.io/collection/nrkgxV/'\n },\n ]\n }\n }\n});\n\n\n\n// WEBPACK FOOTER //\n// ./docs/homepage/home.js","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// Select.vue?6ec673ec","module.exports = {\n\tprops: {\n\t\t/**\n\t\t * Toggles the adding of a 'loading' class to the main\n\t\t * .v-select wrapper. Useful to control UI state when\n\t\t * results are being processed through AJAX.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\n\t\t/**\n\t\t * Accept a callback function that will be\n\t\t * run when the search text changes.\n\t\t *\n\t\t * loading() accepts a boolean value, and can\n\t\t * be used to toggle a loading class from\n\t\t * the onSearch callback.\n\t\t *\n\t\t * @param {search} String Current search text\n\t\t * @param {loading} Function(bool) Toggle loading class\n\t\t */\n\t\tonSearch: {\n\t\t\ttype: Function,\n\t\t\tdefault: function(search, loading){}\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n mutableLoading: false\n }\n\t},\n\n\twatch: {\n\t\t/**\n\t\t * If a callback & search text has been provided,\n\t\t * invoke the onSearch callback.\n\t\t */\n\t\tsearch() {\n\t\t\tif (this.search.length > 0) {\n\t\t\t\tthis.onSearch(this.search, this.toggleLoading)\n this.$emit('search', this.search, this.toggleLoading)\n }\n\t\t},\n /**\n\t\t * Sync the loading prop with the internal\n\t\t * mutable loading value.\n * @param val\n */\n\t\tloading(val) {\n\t\t\tthis.mutableLoading = val\n\t\t}\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Toggle this.loading. Optionally pass a boolean\n\t\t * value. If no value is provided, this.loading\n\t\t * will be set to the opposite of it's current value.\n\t\t * @param toggle Boolean\n\t\t * @returns {*}\n\t\t */\n\t\ttoggleLoading(toggle = null) {\n\t\t\tif (toggle == null) {\n\t\t\t\treturn this.mutableLoading = !this.mutableLoading\n\t\t\t}\n\t\t\treturn this.mutableLoading = toggle\n\t\t}\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/mixins/ajax.js","// flow\n\nmodule.exports = {\n watch: {\n typeAheadPointer() {\n this.maybeAdjustScroll()\n }\n },\n\n methods: {\n /**\n * Adjust the scroll position of the dropdown list\n * if the current pointer is outside of the\n * overflow bounds.\n * @returns {*}\n */\n maybeAdjustScroll() {\n let pixelsToPointerTop = this.pixelsToPointerTop()\n let pixelsToPointerBottom = this.pixelsToPointerBottom()\n\n if ( pixelsToPointerTop <= this.viewport().top) {\n return this.scrollTo( pixelsToPointerTop )\n } else if (pixelsToPointerBottom >= this.viewport().bottom) {\n return this.scrollTo( this.viewport().top + this.pointerHeight() )\n }\n },\n\n /**\n * The distance in pixels from the top of the dropdown\n * list to the top of the current pointer element.\n * @returns {number}\n */\n pixelsToPointerTop() {\n let pixelsToPointerTop = 0\n if( this.$refs.dropdownMenu ) {\n for (let i = 0; i < this.typeAheadPointer; i++) {\n pixelsToPointerTop += this.$refs.dropdownMenu.children[i].offsetHeight\n }\n }\n return pixelsToPointerTop\n },\n\n /**\n * The distance in pixels from the top of the dropdown\n * list to the bottom of the current pointer element.\n * @returns {*}\n */\n pixelsToPointerBottom() {\n return this.pixelsToPointerTop() + this.pointerHeight()\n },\n\n /**\n * The offsetHeight of the current pointer element.\n * @returns {number}\n */\n pointerHeight() {\n let element = this.$refs.dropdownMenu ? this.$refs.dropdownMenu.children[this.typeAheadPointer] : false\n return element ? element.offsetHeight : 0\n },\n\n /**\n * The currently viewable portion of the dropdownMenu.\n * @returns {{top: (string|*|number), bottom: *}}\n */\n viewport() {\n return {\n top: this.$refs.dropdownMenu ? this.$refs.dropdownMenu.scrollTop: 0,\n bottom: this.$refs.dropdownMenu ? this.$refs.dropdownMenu.offsetHeight + this.$refs.dropdownMenu.scrollTop : 0\n }\n },\n\n /**\n * Scroll the dropdownMenu to a given position.\n * @param position\n * @returns {*}\n */\n scrollTo(position) {\n return this.$refs.dropdownMenu ? this.$refs.dropdownMenu.scrollTop = position : null\n },\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/mixins/pointerScroll.js","module.exports = {\n data() {\n return {\n typeAheadPointer: -1\n }\n },\n\n watch: {\n filteredOptions() {\n this.typeAheadPointer = 0\n }\n },\n\n methods: {\n /**\n * Move the typeAheadPointer visually up the list by\n * subtracting the current index by one.\n * @return {void}\n */\n typeAheadUp() {\n if (this.typeAheadPointer > 0) {\n this.typeAheadPointer--\n if( this.maybeAdjustScroll ) {\n this.maybeAdjustScroll()\n }\n }\n },\n\n /**\n * Move the typeAheadPointer visually down the list by\n * adding the current index by one.\n * @return {void}\n */\n typeAheadDown() {\n if (this.typeAheadPointer < this.filteredOptions.length - 1) {\n this.typeAheadPointer++\n if( this.maybeAdjustScroll ) {\n this.maybeAdjustScroll()\n }\n }\n },\n\n /**\n * Select the option at the current typeAheadPointer position.\n * Optionally clear the search input on selection.\n * @return {void}\n */\n typeAheadSelect() {\n if( this.filteredOptions[ this.typeAheadPointer ] ) {\n this.select( this.filteredOptions[ this.typeAheadPointer ] );\n } else if (this.taggable && this.search.length){\n this.select(this.search)\n }\n\n if( this.clearSearchOnSelect ) {\n this.search = \"\";\n }\n },\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/mixins/typeAheadPointer.js","\n/* styles */\nrequire(\"!!../../node_modules/extract-text-webpack-plugin/loader.js?{\\\"omit\\\":1,\\\"extract\\\":true,\\\"remove\\\":true}!vue-style-loader!css-loader?sourceMap!../../node_modules/vue-loader/lib/style-rewriter?id=data-v-3e06dd28!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./Select.vue\")\n\nvar Component = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")(\n /* script */\n require(\"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./Select.vue\"),\n /* template */\n require(\"!!../../node_modules/vue-loader/lib/template-compiler?id=data-v-3e06dd28!../../node_modules/vue-loader/lib/selector?type=template&index=0!./Select.vue\"),\n /* scopeId */\n null,\n /* cssModules */\n null\n)\n\nmodule.exports = Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/Select.vue\n// module id = 87\n// module chunks = 2","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"dropdown v-select\",\n class: _vm.dropdownClasses,\n attrs: {\n \"dir\": _vm.dir\n }\n }, [_c('div', {\n ref: \"toggle\",\n class: ['dropdown-toggle', 'clearfix'],\n on: {\n \"mousedown\": function($event) {\n $event.preventDefault();\n _vm.toggleDropdown($event)\n }\n }\n }, [_vm._l((_vm.valueAsArray), function(option) {\n return _vm._t(\"selected-option-container\", [_c('span', {\n key: option.index,\n staticClass: \"selected-tag\"\n }, [_vm._t(\"selected-option\", [_vm._v(\"\\n \" + _vm._s(_vm.getOptionLabel(option)) + \"\\n \")], null, (typeof option === 'object') ? option : ( _obj = {}, _obj[_vm.label] = option, _obj )), _vm._v(\" \"), (_vm.multiple) ? _c('button', {\n staticClass: \"close\",\n attrs: {\n \"disabled\": _vm.disabled,\n \"type\": \"button\",\n \"aria-label\": \"Remove option\"\n },\n on: {\n \"click\": function($event) {\n _vm.deselect(option)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"×\")])]) : _vm._e()], 2)], {\n option: (typeof option === 'object') ? option : ( _obj$1 = {}, _obj$1[_vm.label] = option, _obj$1 ),\n deselect: _vm.deselect,\n multiple: _vm.multiple,\n disabled: _vm.disabled\n })\n var _obj;\n var _obj$1;\n }), _vm._v(\" \"), _c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.search),\n expression: \"search\"\n }],\n ref: \"search\",\n staticClass: \"form-control\",\n style: ({\n width: _vm.isValueEmpty ? '100%' : 'auto'\n }),\n attrs: {\n \"type\": \"search\",\n \"autocomplete\": \"false\",\n \"disabled\": _vm.disabled,\n \"placeholder\": _vm.searchPlaceholder,\n \"tabindex\": _vm.tabindex,\n \"readonly\": !_vm.searchable,\n \"id\": _vm.inputId,\n \"aria-label\": \"Search for option\"\n },\n domProps: {\n \"value\": (_vm.search)\n },\n on: {\n \"keydown\": [function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"delete\", [8, 46], $event.key)) { return null; }\n _vm.maybeDeleteValue($event)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"up\", 38, $event.key)) { return null; }\n $event.preventDefault();\n _vm.typeAheadUp($event)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"down\", 40, $event.key)) { return null; }\n $event.preventDefault();\n _vm.typeAheadDown($event)\n }, function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"enter\", 13, $event.key)) { return null; }\n $event.preventDefault();\n _vm.typeAheadSelect($event)\n }],\n \"keyup\": function($event) {\n if (!('button' in $event) && _vm._k($event.keyCode, \"esc\", 27, $event.key)) { return null; }\n _vm.onEscape($event)\n },\n \"blur\": _vm.onSearchBlur,\n \"focus\": _vm.onSearchFocus,\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.search = $event.target.value\n }\n }\n }), _vm._v(\" \"), _c('button', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.showClearButton),\n expression: \"showClearButton\"\n }],\n staticClass: \"clear\",\n attrs: {\n \"disabled\": _vm.disabled,\n \"type\": \"button\",\n \"title\": \"Clear selection\"\n },\n on: {\n \"click\": _vm.clearSelection\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"×\")])]), _vm._v(\" \"), (!_vm.noDrop) ? _c('i', {\n ref: \"openIndicator\",\n staticClass: \"open-indicator\",\n attrs: {\n \"role\": \"presentation\"\n }\n }) : _vm._e(), _vm._v(\" \"), _vm._t(\"spinner\", [_c('div', {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: (_vm.mutableLoading),\n expression: \"mutableLoading\"\n }],\n staticClass: \"spinner\"\n }, [_vm._v(\"Loading...\")])])], 2), _vm._v(\" \"), _c('transition', {\n attrs: {\n \"name\": _vm.transition\n }\n }, [(_vm.dropdownOpen) ? _c('ul', {\n ref: \"dropdownMenu\",\n staticClass: \"dropdown-menu\",\n style: ({\n 'max-height': _vm.maxHeight\n })\n }, [_vm._l((_vm.filteredOptions), function(option, index) {\n return _c('li', {\n key: index,\n class: {\n active: _vm.isOptionSelected(option), highlight: index === _vm.typeAheadPointer\n },\n on: {\n \"mouseover\": function($event) {\n _vm.typeAheadPointer = index\n }\n }\n }, [_c('a', {\n on: {\n \"mousedown\": function($event) {\n $event.preventDefault();\n _vm.select(option)\n }\n }\n }, [_vm._t(\"option\", [_vm._v(\"\\n \" + _vm._s(_vm.getOptionLabel(option)) + \"\\n \")], null, (typeof option === 'object') ? option : ( _obj = {}, _obj[_vm.label] = option, _obj ))], 2)])\n var _obj;\n }), _vm._v(\" \"), (!_vm.filteredOptions.length) ? _c('li', {\n staticClass: \"no-options\"\n }, [_vm._t(\"no-options\", [_vm._v(\"Sorry, no matching options.\")])], 2) : _vm._e()], 2) : _vm._e()])], 1)\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-3e06dd28!./~/vue-loader/lib/selector.js?type=template&index=0!./src/components/Select.vue\n// module id = 89\n// module chunks = 2"],"sourceRoot":""} \ No newline at end of file diff --git a/js/manifest.d3e366450a4f976c8ed8.js b/js/manifest.d3e366450a4f976c8ed8.js new file mode 100644 index 0000000..ad4bfa0 --- /dev/null +++ b/js/manifest.d3e366450a4f976c8ed8.js @@ -0,0 +1,2 @@ +!function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r=window.webpackJsonp;window.webpackJsonp=function(o,c){for(var p,l,s=0,i=[];s