From 5bab07ed500cb35dc438405519d042c29d6fa99d Mon Sep 17 00:00:00 2001 From: anovi Date: Sat, 28 Jun 2014 16:20:33 +0400 Subject: [PATCH] Updated bower and dist --- bower.json | 2 +- dist/selectonic.js | 4 ++-- dist/selectonic.min.js | 4 ++-- dist/selectonic.min.map | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index aa1ba9f..d8950d3 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "selectonic", "title": "Selectonic", - "version": "0.4.3", + "version": "0.4.4", "description": "jQuery-plugin for making any list of items selectable by mouse and keyboard.", "homepage": "https://github.com/anovi/selectonic", "author": { diff --git a/dist/selectonic.js b/dist/selectonic.js index af77eaa..5db311b 100644 --- a/dist/selectonic.js +++ b/dist/selectonic.js @@ -1,4 +1,4 @@ -/*! Selectonic - v0.4.3 - 2014-06-18 +/*! Selectonic - v0.4.4 - 2014-06-28 * https://github.com/anovi/selectonic * Copyright (c) 2014 Alexey Novichkov; Licensed MIT */ (function($, window, undefined) { @@ -290,7 +290,7 @@ var _this = this, name = this._name; this._mouseEvent = function(e) { - if ( _this._isEnable ) { _this._mouseHandler.call(_this, e); } + if ( _this._isEnable && e.which === 1) { _this._mouseHandler.call(_this, e); } }; this._keyboardEvent = function(e) { if( _this.options.get('keyboard') && _this._isEnable ) { _this._keyHandler.call(_this, e); } diff --git a/dist/selectonic.min.js b/dist/selectonic.min.js index 00be20e..8ee4d3d 100644 --- a/dist/selectonic.min.js +++ b/dist/selectonic.min.js @@ -1,6 +1,6 @@ -/*! Selectonic - v0.4.3 - 2014-06-18 +/*! Selectonic - v0.4.4 - 2014-06-28 * https://github.com/anovi/selectonic * Copyright (c) 2014 Alexey Novichkov; Licensed MIT */ -!function(a,b,c){"use strict";function d(a,b){if("object"!=typeof a)throw new TypeError("First argument must be an object with scheme of default options.");return this._schema=a,this._options={},this._callbacks={},this.set(b,!0),this}function e(b,c){this._name=e.pluginName,this.el=b,this.$el=a(b),this.ui={},this._selected=0,this._isEnable=!0,this._keyModes={},this.options=new d(i,c);var f=this;this.options.on("filter",function(a){return f._itemsSelector="."+f.options.get("listClass")+" "+a,a}),this.options.on("autoScroll",function(a){return f._setScrolledElem(a),a}),this._itemsSelector="."+this.options.get("listClass")+" "+this.options.get("filter"),this._setScrolledElem(this.options.get("autoScroll")),this._init()}var f=function(a,b,c){var d,e,f,g=null,h=0;c=c||{};var i=function(){h=c.leading===!1?0:new Date,g=null,f=a.apply(d,e)};return function(){var j=new Date;h||c.leading!==!1||(h=j);var k=b-(j-h);return d=this,e=arguments,0>=k?(clearTimeout(g),g=null,h=j,f=a.apply(d,e)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},g=a(b.document),h=function(a,b){if(a instanceof Array&&a.length>0&&b!==c)for(var d=0;d *",type:"string"},multi:{"default":!0,type:"boolean"},mouseMode:{"default":"standard",type:"string",values:["standard","mouseup","toggle"]},focusBlur:{"default":!1,type:"boolean"},selectionBlur:{"default":!1,type:"boolean"},handle:{"default":null,type:"string",nullable:!0},textSelection:{"default":!1,type:"boolean"},focusOnHover:{"default":!1,type:"boolean"},keyboard:{"default":!1,type:"boolean"},keyboardMode:{"default":"select",type:"string",values:["select","toggle"]},autoScroll:{"default":!0,type:["boolean","string"]},loop:{"default":!1,type:"boolean"},preventInputs:{"default":!0,type:"boolean"},listClass:{"default":"j-selectable",type:"string",unchangeable:!0},focusClass:{"default":"j-focused",type:"string",unchangeable:!0},selectedClass:{"default":"j-selected",type:"string",unchangeable:!0},disabledClass:{"default":"j-disabled",type:"string",unchangeable:!0},create:{"default":null,type:"function",nullable:!0},before:{"default":null,type:"function",nullable:!0},focusLost:{"default":null,type:"function",nullable:!0},select:{"default":null,type:"function",nullable:!0},unselect:{"default":null,type:"function",nullable:!0},unselectAll:{"default":null,type:"function",nullable:!0},stop:{"default":null,type:"function",nullable:!0},destroy:{"default":null,type:"function",nullable:!0}};e.pluginName="selectonic",e.keyCode={DOWN:40,UP:38,SHIFT:16,END:35,HOME:36,PAGE_DOWN:34,PAGE_UP:33,A:65,SPACE:32,ENTER:13},e.getDataObject=function(b){return a(b).data("plugin_"+e.pluginName)},e.prototype._init=function(){this.$el.addClass(this.options.get("listClass")),this._bindEvents(),this.$el.data("plugin_"+e.pluginName,this),this._callEvent("create")},e.prototype._setScrolledElem=function(b){var c;if(null===b||!1===b)return void delete this._scrolledElem;if("string"==typeof b){if(c=a(b),!(c.length>0))throw new Error('There are no elements that matches to selector - "'+b+'"');return void(this._scrolledElem=c[0])}this._scrolledElem=this.el},e.prototype._cancel=function(b,c){if(!c.wasCancelled){c.isCancellation=this._isPrevented=!0;var d=this;a.each(a(c.changedItems),function(e,f){c.prevItemsStates[e]?d._select(b,c,a(f),!0):d._unselect(b,c,a(f),!0)}),c.prevFocus&&this._setFocus(c.prevFocus),delete c.isCancellation,c.wasCancelled=!0}},e.prototype._bindEvents=function(){var a=this,b=this._name;this._mouseEvent=function(b){a._isEnable&&a._mouseHandler.call(a,b)},this._keyboardEvent=function(b){a.options.get("keyboard")&&a._isEnable&&a._keyHandler.call(a,b)},this._selectstartEvent=function(){return a.options.get("textSelection")?void 0:!1},this._mousemoveEvent=f(function(b){a._isEnable&&a.options&&a.options.get("focusOnHover")&&a._mousemoveHandler.call(a,b)},20),g.on("keydown."+b,this._keyboardEvent),g.on("keyup."+b,this._keyboardEvent),g.on("mousemove."+b,this._mousemoveEvent),g.on("click."+b,this._mouseEvent),g.on("mousedown."+b,this._mouseEvent),this.$el.on("mouseup."+b,this._mouseEvent),this.$el.on("selectstart."+b,this._selectstartEvent)},e.prototype._unbindEvents=function(){var a=this._name;g.off("keydown."+a,this._keyboardEvent),g.off("keyup."+a,this._keyboardEvent),g.off("mousemove."+a,this._mousemoveEvent),g.off("click."+a,this._mouseEvent),g.off("mousedown."+a,this._mouseEvent),this.$el.off("mouseup."+a,this._mouseEvent),this.$el.off("selectstart."+a,this._selectstartEvent)},e.prototype._getTarget=function(c){for(var d,e,f,g=c.target,h=this.options.get("handle");null!==g&&g!==this.el;)d=a(g),d.context=b.document,d.is(this._itemsSelector)&&(e=g),h&&d.is(h)&&(f=g),g=g.parentNode;return h&&g&&f?e:!h&&g?e:null},e.prototype._getItems=function(c,d,e){var f;switch(d){case"next":case"prev":for(var g=e.jquery?e:a(e),h=a.fn[d];;){if(g=h.call(g),0===g.length)break;if(g.context=b.document,g.is(this._itemsSelector))return g}return null;case"pageup":case"pagedown":return this._getNextPageElem(c,d,e);case"first":return f=c.allItems?c.allItems:this.$el.find(this.options.get("filter")),c.allItems=f,f.first();case"last":return f=c.allItems?c.allItems:this.$el.find(this.options.get("filter")),c.allItems=f,f.last();default:return f=c.allItems?c.allItems:this.$el.find(this.options.get("filter")),c.allItems=f,f}},e.prototype._getNextPageElem=function(c,d,e){var f,g,h,i,j,k=c.isShiftPageRange,l=this._scrolledElem||this.el,m=l.clientHeight,n=a(b).outerHeight(),o=a(e),p=m>n,q=p?n:m,r=o.outerHeight(),s=r,t=r,u="pageup"===d?"prev":"next";for(k&&(u="pageup"===d?-1:1,i=this._getItems(c),c.rangeStart=h=i.index(e));;){if(k?(h+=u,j=h>=0?i.eq(h):null,f=j&&j.length>0?j:null):f=this._getItems(c,u,o),!f&&o.is(e))break;if(!f)return k&&(c.rangeEnd=h-u),o;if(g=f.outerHeight(),t+=g,t>q)return s+g>q?(k&&(c.rangeEnd=h),f):(k&&(c.rangeEnd=h-u),o);s=g,o=f}return null},e.prototype._callEvent=function(a,b,c){var d,e=this.options.get(a);if(e){if("create"===a||"destroy"===a)return e.call(this.$el);switch(d={},c.target&&(d.target=c.target),this.ui.focus&&(d.focus=this.ui.focus),a){case"select":d.items=c.selected;break;case"unselectAll":case"unselect":d.items=c.unselected;break;case"stop":c.wasCancelled||(d.items=c.changedItems)}e.call(this.$el,b||null,d)}},e.prototype._controller=function(a,b){var d;return b.changedItems=[],b.prevItemsStates=[],delete this._isPrevented,this._callEvent("before",a,b),this._isPrevented?(this._cancel(a,b),void this._stop(a,b)):(b.wasSelected=this._selected>0,b.target&&b.isTargetWasSelected===c&&(b.isTargetWasSelected=this._getIsSelected(b.target)),b.isRangeSelect&&b.isTargetWasSelected&&b.target===this.ui.focus||(b.isRangeSelect?this._perfomRangeSelect(a,b):b.isMultiSelect?(d=b.isTargetWasSelected?this._unselect:this._select,d.call(this,a,b,b.items)):b.target&&!b.items&&"mouseover"===a.type||(b.target&&b.items?(this._selected&&1===this._selected&&this._getIsSelected(this.ui.focus)?this._unselect(a,b,this.ui.focus,b.isTargetWasSelected):this._selected&&this._unselectAll(a,b),this._select(a,b,b.items,b.isTargetWasSelected)):!b.target&&this._selected>0&&this.options.get("selectionBlur")&&this._unselectAll(a,b))),!this._selected&&b.wasSelected&&this._callEvent("unselectAll",a,b),b.prevFocus=this.ui.focus?this.ui.focus:null,!b.target&&this.options.get("focusBlur")?this._blur(a,b):b.target&&!b.wasCancelled&&this._setFocus(b.target),void this._stop(a,b))},e.prototype._perfomRangeSelect=function(a,b){var c,d,e,f,g,h,i,j=b.rangeStart=0?(e=j?b.rangeStart+e:b.rangeEnd+e,f=e0&&this._unselect(a,b,d)),(i&&!g||h&&!f)&&(d=i?k.slice(l,e):k.slice(e+1,m+1),d.length>0&&this._select(a,b,d))):(c=b.isTargetWasSelected?this._unselect:this._select,c.call(this,a,b,b.items))},e.prototype._changeItemsStates=function(b,c,d){var e=c>0,f=[],g=this;a(b).each(function(b,h){var i=g._getIsSelected(h),j=e?!i:i,k=h===d.target&&d.isTargetWasSelected;(!k||e||d.isMultiSelect||d.isRangeSelect)&&(j&&(d.isCancellation||(f.push(h),d.prevItemsStates.push(i)),g._selected+=c),a(h).toggleClass(g.options.get("selectedClass"),e))}),d.isCancellation||(d[e?"selected":"unselected"]=a(f),d.changedItems=d.changedItems.concat(f))},e.prototype._select=function(a,b,c,d){this._changeItemsStates(c,1,b),d||this._callEvent("select",a,b),this._isPrevented&&!b.isCancellation&&this._cancel(a,b)},e.prototype._unselect=function(a,b,c,d){this._changeItemsStates(c,-1,b),d||this._callEvent("unselect",a,b),this._isPrevented&&!b.isCancellation&&this._cancel(a,b)},e.prototype._unselectAll=function(a,b){var c,d;this._selected&&0!==this._selected&&(d=this._getItems(b),c=b.target&&b.isTargetWasSelected&&1===this._selected,this._unselect(a,b,d,c))},e.prototype._multiSelect=function(b){return b.isMultiSelect=!0,a(b.target)},e.prototype._rangeSelect=function(b){if(b.isRangeSelect=!0,b.target===this.ui.focus)return a(b.target);var c=b.allItems?b.allItems:this._getItems(b),d=c.index(b.target),e=c.index(this.ui.focus),f=e>d?c.slice(d,e):c.slice(e,d);return f.push(e>d?c[e]:c[d]),b.allItems=c,b.rangeStart=e,b.rangeEnd=d,f},e.prototype._getIsSelected=function(b){var c=this.options.get();return a(b).length<=1?a(b).hasClass(c.selectedClass):a.map(a(b),function(b){return a(b).hasClass(c.selectedClass)})},e.prototype._blur=function(b,c,d){!d&&this.ui.focus&&this._callEvent("focusLost",b,c),this.ui.focus&&(a(this.ui.focus).removeClass(this.options.get("focusClass")),delete this.ui.focus)},e.prototype._setFocus=function(b){return b?(this.ui.focus&&a(this.ui.focus).removeClass(this.options.get("focusClass")),this.ui.focus=b,a(this.ui.focus).addClass(this.options.get("focusClass")),this.ui.focus):void 0},e.prototype._stop=function(a,b){this._callEvent("stop",a,b),this._isPrevented&&this._cancel(a,b)},e.prototype._checkIfElem=function(b){var c;return b&&(b.jquery||b.nodeType)?(b=b.jquery?b:a(b),c=b.filter(this._itemsSelector),c.length>0?c:null):!1},e.prototype._checkIfSelector=function(a){var b;return a&&"string"==typeof a?(b=this.$el.find(a).filter(this._itemsSelector),b.jquery&&b.length>0?b:null):!1},e.prototype._keyHandler=function(b){if(this.options.get("keyboard")&&!(this.options.get("preventInputs")&&"INPUT"===b.target.tagName||"TEXTAREA"===b.target.tagName)){var c,d,f,g,h=b.which,i={};if("keyup"===b.type)return void(h===e.keyCode.SHIFT&&(delete this._shiftModeAction,delete this._keyModes.shift));if(h===e.keyCode.A&&this._isMulti(b)&&this.options.get("multi"))c=this._getItems(i),d=!0;else switch(h){case e.keyCode.DOWN:f="next",c=this._findNextTarget("next",i);break;case e.keyCode.UP:f="prev",c=this._findNextTarget("prev",i);break;case e.keyCode.HOME:f="prev",c=this._getItems(i,"first");break;case e.keyCode.END:f="next",c=this._getItems(i,"last");break;case e.keyCode.PAGE_DOWN:case e.keyCode.PAGE_UP:var j=h===e.keyCode.PAGE_DOWN;f=j?"next":"prev",g=j?"pagedown":"pageup",i.isShiftPageRange=this.options.get("multi")&&b.shiftKey&&!d,c=this._findNextTarget(g,i);break;case e.keyCode.SPACE:c=a(this.ui.focus);break;case e.keyCode.ENTER:this.options.get("multi")||(c=a(this.ui.focus))}c&&c.length>0?(b.preventDefault(),i.target=c[0],i.items=c,"toggle"===this.options.get("keyboardMode")?(h===e.keyCode.SPACE||h===e.keyCode.ENTER&&!this.options.get("multi")||delete i.items,this.options.get("multi")&&(i.isMultiSelect=!0),delete this.ui.solidInitialElem):this.ui.focus&&this.options.get("multi")&&b.shiftKey&&!d?(h===e.keyCode.END||h===e.keyCode.HOME||h===e.keyCode.PAGE_UP||h===e.keyCode.PAGE_DOWN?this._rangeVariator(i):this._multiVariator(i,h,f,c),this.ui.solidInitialElem||i.target===this.ui.focus||(this.ui.solidInitialElem=this.ui.focus,i.isNewSolidSelection=!0),this._shiftModeAction||(this._shiftModeAction="select"),this._keyModes.shift||(this._keyModes.shift=h)):delete this.ui.solidInitialElem,this._controller(b,i),this.scroll()):(i.prevItemsStates=[],this._callEvent("before",b,i),this._callEvent("stop",b,i))}},e.prototype._rangeVariator=function(a){var b=void 0===a.isFocusSelected?this._getIsSelected(this.ui.focus):a.isFocusSelected,c=a.isTargetWasSelected=this._getIsSelected(a.target);b||c?(a.items=this._rangeSelect(a),c&&(a.items=a.rangeStart0;)e=a.items,a.items=this._getItems(a,c,a.items);a.target=a.items?a.items:e}else g&&f&&!i?(this._keyModes.shift=this._shiftModeAction=null,a.items=this.ui.focus):f&&g?(a.items=this.ui.focus,this._shiftModeAction||(this._shiftModeAction="unselect")):f||(a.target=a.items=this.ui.focus);a.isMultiSelect=!0},e.prototype._findNextTarget=function(a,b){var c="next"===a||"pagedown"===a?"first":"last",d=this.ui.focus?this._getItems(b,a,this.ui.focus):this._getItems(b,c);return null!==d&&0!==d.length||!this.options.get("loop")||(d=this._getItems(b,c)),d},e.prototype._refreshBoxScroll=function(c){var d=a(c),e=c===b,f=e?d.outerHeight():c.clientHeight,g=d.scrollTop(),h=e?0:d.offset().top,i=a(this.ui.focus),j=i.outerHeight(),k=e?i.offset().top:i.offset().top-h+g;g>k?d.scrollTop(k):k+j>g+f&&d.scrollTop(k+j-f)},e.prototype._isRange=function(a){return a.shiftKey||a.shiftKey&&a.ctrlKey||a.shiftKey&&a.metaKey},e.prototype._isMulti=function(a){return a.ctrlKey||a.metaKey},e.prototype._mouseHandler=function(b){var c,d=this.options.get(),e=b.type,f=this._isMulti(b),g=this._isRange(b),h={};if("mouseup"===d.mouseMode){if("mouseup"!==e)return"mousedown"===e||(c=this._getTarget(b))?void 0:void 0;c=this._getTarget(b)}else{if("click"===e&&!this._mousedownOnItem)return;if("mousedown"!==e&&"click"!==e)return;if(c=this._getTarget(b),"mousedown"===e&&c&&(!d.multi||!f&&!g||"standard"!==d.mouseMode))return void(this._mousedownOnItem=c);delete this._mousedownOnItem}h.target=c,d.multi&&h.target&&(g&&this.ui.focus?h.items=this._rangeSelect(h):(f||"toggle"===d.mouseMode)&&(h.items=this._multiSelect(h))),h.target&&!h.items&&(h.items=a(h.target)),delete this.ui.solidInitialElem,this._controller(b,h)},e.prototype._mousemoveHandler=function(a){if(!this._isFocusOnHoverPrevented){var b,c={};b=this._getTarget(a),b?(delete this.ui.solidInitialElem,this._isHovered=!0,b!==this.ui.focus&&(c.target=b,this._controller(a,c))):this._isHovered&&(this._isHovered=!1,this._controller(a,c))}},e.prototype._preventMouseMove=function(){var a=this;this._isFocusOnHoverPrevented=!0,this._focusHoverTimeout&&(clearTimeout(this._focusHoverTimeout),delete this._focusHoverTimeout),this._focusHoverTimeout=setTimeout(function(){delete a._isFocusOnHoverPrevented,delete a._focusHoverTimeout},250)},e._callPublicMethod=function(b){var c,d,f=e.getDataObject(this);if(null===f||void 0===f)throw new Error("Element "+this[0]+" has no plugin "+e.pluginName);if(f[b]&&a.isFunction(f[b])&&(c=f[b]),c&&a.isFunction(c)&&"_"!==b.charAt(0))return d=Array.prototype.slice.call(arguments),d.shift(),c.apply(f,d);throw new Error('Plugin "'+e.pluginName+'" has no method "'+b+'"')},e.prototype.isEnabled=function(){return this._isEnable},e.prototype.option=function(b,c){var d=arguments.length;if(d>0&&"string"==typeof b){if(d>1){var e={};return e[b]=c,this.options.set(e),this.$el}return this.options.get(b)}if(d>0&&a.isPlainObject(b))return this.options.set(b),this.$el;if(0===d)return this.options.get();throw new Error('Format of "option" could be: "option" or "option","name" or "option","name",val or "option",{}')},e.prototype.destroy=function(){this._callEvent("destroy"),this._unbindEvents(),this._focusHoverTimeout&&clearTimeout(this._focusHoverTimeout),this.ui.focus&&(a(this.ui.focus).removeClass(this.options.get("focusClass")),delete this.ui.focus),this._selected>0&&this.getSelected().removeClass(this.options.get("selectedClass")),this.$el.removeClass(this.options.get("disabledClass")),this.$el.removeClass(this.options.get("listClass")),this.options.off(),delete this.options,delete this._scrolledElem,delete this.ui.solidInitialElem,this.$el.removeData("plugin_"+e.pluginName),this.$el=null},e.prototype.select=function(b){var c;if(c=this._checkIfElem(b),c===!1&&(c=this._checkIfSelector(b)),c===!1)throw new Error('You shold pass DOM element or selector to "select" method.');return c&&(delete this.ui.solidInitialElem,this._controller(null,{items:c.addClass?c:a(c),target:c[0]||c})),this.$el},e.prototype.blur=function(){return this._controller(null,{target:null}),this.$el},e.prototype.getSelected=function(a){var b,c=this._getItems({}).filter("."+this.options.get("selectedClass"));if(a){b=[];for(var d=0;d0?b:null}return c},e.prototype.getSelectedId=function(){return this.getSelected(!0)},e.prototype.focus=function(a){var b;if(arguments.length>0){if(b=(b=this._checkIfElem(a))===!1?this._checkIfSelector(a):b,b&&b.jquery)this._setFocus(b[0]);else if(b===!1)throw new Error("You shold pass DOM element or CSS selector to set focus or nothing to get it.");return this.$el}return this.ui.focus?this.ui.focus:null},e.prototype.scroll=function(){this._preventMouseMove(),this.ui.focus&&(this._scrolledElem&&this._refreshBoxScroll(this._scrolledElem),this._refreshBoxScroll(b))},e.prototype.enable=function(){return this._isEnable=!0,this.$el.removeClass(this.options.get("disabledClass")),this.$el},e.prototype.disable=function(){return this._isEnable=!1,this._isHovered=!1,this.$el.addClass(this.options.get("disabledClass")),this.$el},e.prototype.cancel=function(){return this._isPrevented=!0,this.$el},e.prototype.refresh=function(){var b=this.ui.focus;return b&&!a(b).is(":visible")&&delete this.ui.focus,this._selected=this.getSelected().length,this.$el},a.fn[e.pluginName]=function(a){return a&&a.charAt?e._callPublicMethod.apply(this,arguments):this.each(function(b,c){e.getDataObject(c)||new e(c,a)})}}(jQuery,window); +!function(a,b,c){"use strict";function d(a,b){if("object"!=typeof a)throw new TypeError("First argument must be an object with scheme of default options.");return this._schema=a,this._options={},this._callbacks={},this.set(b,!0),this}function e(b,c){this._name=e.pluginName,this.el=b,this.$el=a(b),this.ui={},this._selected=0,this._isEnable=!0,this._keyModes={},this.options=new d(i,c);var f=this;this.options.on("filter",function(a){return f._itemsSelector="."+f.options.get("listClass")+" "+a,a}),this.options.on("autoScroll",function(a){return f._setScrolledElem(a),a}),this._itemsSelector="."+this.options.get("listClass")+" "+this.options.get("filter"),this._setScrolledElem(this.options.get("autoScroll")),this._init()}var f=function(a,b,c){var d,e,f,g=null,h=0;c=c||{};var i=function(){h=c.leading===!1?0:new Date,g=null,f=a.apply(d,e)};return function(){var j=new Date;h||c.leading!==!1||(h=j);var k=b-(j-h);return d=this,e=arguments,0>=k?(clearTimeout(g),g=null,h=j,f=a.apply(d,e)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},g=a(b.document),h=function(a,b){if(a instanceof Array&&a.length>0&&b!==c)for(var d=0;d *",type:"string"},multi:{"default":!0,type:"boolean"},mouseMode:{"default":"standard",type:"string",values:["standard","mouseup","toggle"]},focusBlur:{"default":!1,type:"boolean"},selectionBlur:{"default":!1,type:"boolean"},handle:{"default":null,type:"string",nullable:!0},textSelection:{"default":!1,type:"boolean"},focusOnHover:{"default":!1,type:"boolean"},keyboard:{"default":!1,type:"boolean"},keyboardMode:{"default":"select",type:"string",values:["select","toggle"]},autoScroll:{"default":!0,type:["boolean","string"]},loop:{"default":!1,type:"boolean"},preventInputs:{"default":!0,type:"boolean"},listClass:{"default":"j-selectable",type:"string",unchangeable:!0},focusClass:{"default":"j-focused",type:"string",unchangeable:!0},selectedClass:{"default":"j-selected",type:"string",unchangeable:!0},disabledClass:{"default":"j-disabled",type:"string",unchangeable:!0},create:{"default":null,type:"function",nullable:!0},before:{"default":null,type:"function",nullable:!0},focusLost:{"default":null,type:"function",nullable:!0},select:{"default":null,type:"function",nullable:!0},unselect:{"default":null,type:"function",nullable:!0},unselectAll:{"default":null,type:"function",nullable:!0},stop:{"default":null,type:"function",nullable:!0},destroy:{"default":null,type:"function",nullable:!0}};e.pluginName="selectonic",e.keyCode={DOWN:40,UP:38,SHIFT:16,END:35,HOME:36,PAGE_DOWN:34,PAGE_UP:33,A:65,SPACE:32,ENTER:13},e.getDataObject=function(b){return a(b).data("plugin_"+e.pluginName)},e.prototype._init=function(){this.$el.addClass(this.options.get("listClass")),this._bindEvents(),this.$el.data("plugin_"+e.pluginName,this),this._callEvent("create")},e.prototype._setScrolledElem=function(b){var c;if(null===b||!1===b)return void delete this._scrolledElem;if("string"==typeof b){if(c=a(b),!(c.length>0))throw new Error('There are no elements that matches to selector - "'+b+'"');return void(this._scrolledElem=c[0])}this._scrolledElem=this.el},e.prototype._cancel=function(b,c){if(!c.wasCancelled){c.isCancellation=this._isPrevented=!0;var d=this;a.each(a(c.changedItems),function(e,f){c.prevItemsStates[e]?d._select(b,c,a(f),!0):d._unselect(b,c,a(f),!0)}),c.prevFocus&&this._setFocus(c.prevFocus),delete c.isCancellation,c.wasCancelled=!0}},e.prototype._bindEvents=function(){var a=this,b=this._name;this._mouseEvent=function(b){a._isEnable&&1===b.which&&a._mouseHandler.call(a,b)},this._keyboardEvent=function(b){a.options.get("keyboard")&&a._isEnable&&a._keyHandler.call(a,b)},this._selectstartEvent=function(){return a.options.get("textSelection")?void 0:!1},this._mousemoveEvent=f(function(b){a._isEnable&&a.options&&a.options.get("focusOnHover")&&a._mousemoveHandler.call(a,b)},20),g.on("keydown."+b,this._keyboardEvent),g.on("keyup."+b,this._keyboardEvent),g.on("mousemove."+b,this._mousemoveEvent),g.on("click."+b,this._mouseEvent),g.on("mousedown."+b,this._mouseEvent),this.$el.on("mouseup."+b,this._mouseEvent),this.$el.on("selectstart."+b,this._selectstartEvent)},e.prototype._unbindEvents=function(){var a=this._name;g.off("keydown."+a,this._keyboardEvent),g.off("keyup."+a,this._keyboardEvent),g.off("mousemove."+a,this._mousemoveEvent),g.off("click."+a,this._mouseEvent),g.off("mousedown."+a,this._mouseEvent),this.$el.off("mouseup."+a,this._mouseEvent),this.$el.off("selectstart."+a,this._selectstartEvent)},e.prototype._getTarget=function(c){for(var d,e,f,g=c.target,h=this.options.get("handle");null!==g&&g!==this.el;)d=a(g),d.context=b.document,d.is(this._itemsSelector)&&(e=g),h&&d.is(h)&&(f=g),g=g.parentNode;return h&&g&&f?e:!h&&g?e:null},e.prototype._getItems=function(c,d,e){var f;switch(d){case"next":case"prev":for(var g=e.jquery?e:a(e),h=a.fn[d];;){if(g=h.call(g),0===g.length)break;if(g.context=b.document,g.is(this._itemsSelector))return g}return null;case"pageup":case"pagedown":return this._getNextPageElem(c,d,e);case"first":return f=c.allItems?c.allItems:this.$el.find(this.options.get("filter")),c.allItems=f,f.first();case"last":return f=c.allItems?c.allItems:this.$el.find(this.options.get("filter")),c.allItems=f,f.last();default:return f=c.allItems?c.allItems:this.$el.find(this.options.get("filter")),c.allItems=f,f}},e.prototype._getNextPageElem=function(c,d,e){var f,g,h,i,j,k=c.isShiftPageRange,l=this._scrolledElem||this.el,m=l.clientHeight,n=a(b).outerHeight(),o=a(e),p=m>n,q=p?n:m,r=o.outerHeight(),s=r,t=r,u="pageup"===d?"prev":"next";for(k&&(u="pageup"===d?-1:1,i=this._getItems(c),c.rangeStart=h=i.index(e));;){if(k?(h+=u,j=h>=0?i.eq(h):null,f=j&&j.length>0?j:null):f=this._getItems(c,u,o),!f&&o.is(e))break;if(!f)return k&&(c.rangeEnd=h-u),o;if(g=f.outerHeight(),t+=g,t>q)return s+g>q?(k&&(c.rangeEnd=h),f):(k&&(c.rangeEnd=h-u),o);s=g,o=f}return null},e.prototype._callEvent=function(a,b,c){var d,e=this.options.get(a);if(e){if("create"===a||"destroy"===a)return e.call(this.$el);switch(d={},c.target&&(d.target=c.target),this.ui.focus&&(d.focus=this.ui.focus),a){case"select":d.items=c.selected;break;case"unselectAll":case"unselect":d.items=c.unselected;break;case"stop":c.wasCancelled||(d.items=c.changedItems)}e.call(this.$el,b||null,d)}},e.prototype._controller=function(a,b){var d;return b.changedItems=[],b.prevItemsStates=[],delete this._isPrevented,this._callEvent("before",a,b),this._isPrevented?(this._cancel(a,b),void this._stop(a,b)):(b.wasSelected=this._selected>0,b.target&&b.isTargetWasSelected===c&&(b.isTargetWasSelected=this._getIsSelected(b.target)),b.isRangeSelect&&b.isTargetWasSelected&&b.target===this.ui.focus||(b.isRangeSelect?this._perfomRangeSelect(a,b):b.isMultiSelect?(d=b.isTargetWasSelected?this._unselect:this._select,d.call(this,a,b,b.items)):b.target&&!b.items&&"mouseover"===a.type||(b.target&&b.items?(this._selected&&1===this._selected&&this._getIsSelected(this.ui.focus)?this._unselect(a,b,this.ui.focus,b.isTargetWasSelected):this._selected&&this._unselectAll(a,b),this._select(a,b,b.items,b.isTargetWasSelected)):!b.target&&this._selected>0&&this.options.get("selectionBlur")&&this._unselectAll(a,b))),!this._selected&&b.wasSelected&&this._callEvent("unselectAll",a,b),b.prevFocus=this.ui.focus?this.ui.focus:null,!b.target&&this.options.get("focusBlur")?this._blur(a,b):b.target&&!b.wasCancelled&&this._setFocus(b.target),void this._stop(a,b))},e.prototype._perfomRangeSelect=function(a,b){var c,d,e,f,g,h,i,j=b.rangeStart=0?(e=j?b.rangeStart+e:b.rangeEnd+e,f=e0&&this._unselect(a,b,d)),(i&&!g||h&&!f)&&(d=i?k.slice(l,e):k.slice(e+1,m+1),d.length>0&&this._select(a,b,d))):(c=b.isTargetWasSelected?this._unselect:this._select,c.call(this,a,b,b.items))},e.prototype._changeItemsStates=function(b,c,d){var e=c>0,f=[],g=this;a(b).each(function(b,h){var i=g._getIsSelected(h),j=e?!i:i,k=h===d.target&&d.isTargetWasSelected;(!k||e||d.isMultiSelect||d.isRangeSelect)&&(j&&(d.isCancellation||(f.push(h),d.prevItemsStates.push(i)),g._selected+=c),a(h).toggleClass(g.options.get("selectedClass"),e))}),d.isCancellation||(d[e?"selected":"unselected"]=a(f),d.changedItems=d.changedItems.concat(f))},e.prototype._select=function(a,b,c,d){this._changeItemsStates(c,1,b),d||this._callEvent("select",a,b),this._isPrevented&&!b.isCancellation&&this._cancel(a,b)},e.prototype._unselect=function(a,b,c,d){this._changeItemsStates(c,-1,b),d||this._callEvent("unselect",a,b),this._isPrevented&&!b.isCancellation&&this._cancel(a,b)},e.prototype._unselectAll=function(a,b){var c,d;this._selected&&0!==this._selected&&(d=this._getItems(b),c=b.target&&b.isTargetWasSelected&&1===this._selected,this._unselect(a,b,d,c))},e.prototype._multiSelect=function(b){return b.isMultiSelect=!0,a(b.target)},e.prototype._rangeSelect=function(b){if(b.isRangeSelect=!0,b.target===this.ui.focus)return a(b.target);var c=b.allItems?b.allItems:this._getItems(b),d=c.index(b.target),e=c.index(this.ui.focus),f=e>d?c.slice(d,e):c.slice(e,d);return f.push(e>d?c[e]:c[d]),b.allItems=c,b.rangeStart=e,b.rangeEnd=d,f},e.prototype._getIsSelected=function(b){var c=this.options.get();return a(b).length<=1?a(b).hasClass(c.selectedClass):a.map(a(b),function(b){return a(b).hasClass(c.selectedClass)})},e.prototype._blur=function(b,c,d){!d&&this.ui.focus&&this._callEvent("focusLost",b,c),this.ui.focus&&(a(this.ui.focus).removeClass(this.options.get("focusClass")),delete this.ui.focus)},e.prototype._setFocus=function(b){return b?(this.ui.focus&&a(this.ui.focus).removeClass(this.options.get("focusClass")),this.ui.focus=b,a(this.ui.focus).addClass(this.options.get("focusClass")),this.ui.focus):void 0},e.prototype._stop=function(a,b){this._callEvent("stop",a,b),this._isPrevented&&this._cancel(a,b)},e.prototype._checkIfElem=function(b){var c;return b&&(b.jquery||b.nodeType)?(b=b.jquery?b:a(b),c=b.filter(this._itemsSelector),c.length>0?c:null):!1},e.prototype._checkIfSelector=function(a){var b;return a&&"string"==typeof a?(b=this.$el.find(a).filter(this._itemsSelector),b.jquery&&b.length>0?b:null):!1},e.prototype._keyHandler=function(b){if(this.options.get("keyboard")&&!(this.options.get("preventInputs")&&"INPUT"===b.target.tagName||"TEXTAREA"===b.target.tagName)){var c,d,f,g,h=b.which,i={};if("keyup"===b.type)return void(h===e.keyCode.SHIFT&&(delete this._shiftModeAction,delete this._keyModes.shift));if(h===e.keyCode.A&&this._isMulti(b)&&this.options.get("multi"))c=this._getItems(i),d=!0;else switch(h){case e.keyCode.DOWN:f="next",c=this._findNextTarget("next",i);break;case e.keyCode.UP:f="prev",c=this._findNextTarget("prev",i);break;case e.keyCode.HOME:f="prev",c=this._getItems(i,"first");break;case e.keyCode.END:f="next",c=this._getItems(i,"last");break;case e.keyCode.PAGE_DOWN:case e.keyCode.PAGE_UP:var j=h===e.keyCode.PAGE_DOWN;f=j?"next":"prev",g=j?"pagedown":"pageup",i.isShiftPageRange=this.options.get("multi")&&b.shiftKey&&!d,c=this._findNextTarget(g,i);break;case e.keyCode.SPACE:c=a(this.ui.focus);break;case e.keyCode.ENTER:this.options.get("multi")||(c=a(this.ui.focus))}c&&c.length>0?(b.preventDefault(),i.target=c[0],i.items=c,"toggle"===this.options.get("keyboardMode")?(h===e.keyCode.SPACE||h===e.keyCode.ENTER&&!this.options.get("multi")||delete i.items,this.options.get("multi")&&(i.isMultiSelect=!0),delete this.ui.solidInitialElem):this.ui.focus&&this.options.get("multi")&&b.shiftKey&&!d?(h===e.keyCode.END||h===e.keyCode.HOME||h===e.keyCode.PAGE_UP||h===e.keyCode.PAGE_DOWN?this._rangeVariator(i):this._multiVariator(i,h,f,c),this.ui.solidInitialElem||i.target===this.ui.focus||(this.ui.solidInitialElem=this.ui.focus,i.isNewSolidSelection=!0),this._shiftModeAction||(this._shiftModeAction="select"),this._keyModes.shift||(this._keyModes.shift=h)):delete this.ui.solidInitialElem,this._controller(b,i),this.scroll()):(i.prevItemsStates=[],this._callEvent("before",b,i),this._callEvent("stop",b,i))}},e.prototype._rangeVariator=function(a){var b=void 0===a.isFocusSelected?this._getIsSelected(this.ui.focus):a.isFocusSelected,c=a.isTargetWasSelected=this._getIsSelected(a.target);b||c?(a.items=this._rangeSelect(a),c&&(a.items=a.rangeStart0;)e=a.items,a.items=this._getItems(a,c,a.items);a.target=a.items?a.items:e}else g&&f&&!i?(this._keyModes.shift=this._shiftModeAction=null,a.items=this.ui.focus):f&&g?(a.items=this.ui.focus,this._shiftModeAction||(this._shiftModeAction="unselect")):f||(a.target=a.items=this.ui.focus);a.isMultiSelect=!0},e.prototype._findNextTarget=function(a,b){var c="next"===a||"pagedown"===a?"first":"last",d=this.ui.focus?this._getItems(b,a,this.ui.focus):this._getItems(b,c);return null!==d&&0!==d.length||!this.options.get("loop")||(d=this._getItems(b,c)),d},e.prototype._refreshBoxScroll=function(c){var d=a(c),e=c===b,f=e?d.outerHeight():c.clientHeight,g=d.scrollTop(),h=e?0:d.offset().top,i=a(this.ui.focus),j=i.outerHeight(),k=e?i.offset().top:i.offset().top-h+g;g>k?d.scrollTop(k):k+j>g+f&&d.scrollTop(k+j-f)},e.prototype._isRange=function(a){return a.shiftKey||a.shiftKey&&a.ctrlKey||a.shiftKey&&a.metaKey},e.prototype._isMulti=function(a){return a.ctrlKey||a.metaKey},e.prototype._mouseHandler=function(b){var c,d=this.options.get(),e=b.type,f=this._isMulti(b),g=this._isRange(b),h={};if("mouseup"===d.mouseMode){if("mouseup"!==e)return"mousedown"===e||(c=this._getTarget(b))?void 0:void 0;c=this._getTarget(b)}else{if("click"===e&&!this._mousedownOnItem)return;if("mousedown"!==e&&"click"!==e)return;if(c=this._getTarget(b),"mousedown"===e&&c&&(!d.multi||!f&&!g||"standard"!==d.mouseMode))return void(this._mousedownOnItem=c);delete this._mousedownOnItem}h.target=c,d.multi&&h.target&&(g&&this.ui.focus?h.items=this._rangeSelect(h):(f||"toggle"===d.mouseMode)&&(h.items=this._multiSelect(h))),h.target&&!h.items&&(h.items=a(h.target)),delete this.ui.solidInitialElem,this._controller(b,h)},e.prototype._mousemoveHandler=function(a){if(!this._isFocusOnHoverPrevented){var b,c={};b=this._getTarget(a),b?(delete this.ui.solidInitialElem,this._isHovered=!0,b!==this.ui.focus&&(c.target=b,this._controller(a,c))):this._isHovered&&(this._isHovered=!1,this._controller(a,c))}},e.prototype._preventMouseMove=function(){var a=this;this._isFocusOnHoverPrevented=!0,this._focusHoverTimeout&&(clearTimeout(this._focusHoverTimeout),delete this._focusHoverTimeout),this._focusHoverTimeout=setTimeout(function(){delete a._isFocusOnHoverPrevented,delete a._focusHoverTimeout},250)},e._callPublicMethod=function(b){var c,d,f=e.getDataObject(this);if(null===f||void 0===f)throw new Error("Element "+this[0]+" has no plugin "+e.pluginName);if(f[b]&&a.isFunction(f[b])&&(c=f[b]),c&&a.isFunction(c)&&"_"!==b.charAt(0))return d=Array.prototype.slice.call(arguments),d.shift(),c.apply(f,d);throw new Error('Plugin "'+e.pluginName+'" has no method "'+b+'"')},e.prototype.isEnabled=function(){return this._isEnable},e.prototype.option=function(b,c){var d=arguments.length;if(d>0&&"string"==typeof b){if(d>1){var e={};return e[b]=c,this.options.set(e),this.$el}return this.options.get(b)}if(d>0&&a.isPlainObject(b))return this.options.set(b),this.$el;if(0===d)return this.options.get();throw new Error('Format of "option" could be: "option" or "option","name" or "option","name",val or "option",{}')},e.prototype.destroy=function(){this._callEvent("destroy"),this._unbindEvents(),this._focusHoverTimeout&&clearTimeout(this._focusHoverTimeout),this.ui.focus&&(a(this.ui.focus).removeClass(this.options.get("focusClass")),delete this.ui.focus),this._selected>0&&this.getSelected().removeClass(this.options.get("selectedClass")),this.$el.removeClass(this.options.get("disabledClass")),this.$el.removeClass(this.options.get("listClass")),this.options.off(),delete this.options,delete this._scrolledElem,delete this.ui.solidInitialElem,this.$el.removeData("plugin_"+e.pluginName),this.$el=null},e.prototype.select=function(b){var c;if(c=this._checkIfElem(b),c===!1&&(c=this._checkIfSelector(b)),c===!1)throw new Error('You shold pass DOM element or selector to "select" method.');return c&&(delete this.ui.solidInitialElem,this._controller(null,{items:c.addClass?c:a(c),target:c[0]||c})),this.$el},e.prototype.blur=function(){return this._controller(null,{target:null}),this.$el},e.prototype.getSelected=function(a){var b,c=this._getItems({}).filter("."+this.options.get("selectedClass"));if(a){b=[];for(var d=0;d0?b:null}return c},e.prototype.getSelectedId=function(){return this.getSelected(!0)},e.prototype.focus=function(a){var b;if(arguments.length>0){if(b=(b=this._checkIfElem(a))===!1?this._checkIfSelector(a):b,b&&b.jquery)this._setFocus(b[0]);else if(b===!1)throw new Error("You shold pass DOM element or CSS selector to set focus or nothing to get it.");return this.$el}return this.ui.focus?this.ui.focus:null},e.prototype.scroll=function(){this._preventMouseMove(),this.ui.focus&&(this._scrolledElem&&this._refreshBoxScroll(this._scrolledElem),this._refreshBoxScroll(b))},e.prototype.enable=function(){return this._isEnable=!0,this.$el.removeClass(this.options.get("disabledClass")),this.$el},e.prototype.disable=function(){return this._isEnable=!1,this._isHovered=!1,this.$el.addClass(this.options.get("disabledClass")),this.$el},e.prototype.cancel=function(){return this._isPrevented=!0,this.$el},e.prototype.refresh=function(){var b=this.ui.focus;return b&&!a(b).is(":visible")&&delete this.ui.focus,this._selected=this.getSelected().length,this.$el},a.fn[e.pluginName]=function(a){return a&&a.charAt?e._callPublicMethod.apply(this,arguments):this.each(function(b,c){e.getDataObject(c)||new e(c,a)})}}(jQuery,window); //# sourceMappingURL=selectonic.min.map \ No newline at end of file diff --git a/dist/selectonic.min.map b/dist/selectonic.min.map index c42cd5a..46a230b 100644 --- a/dist/selectonic.min.map +++ b/dist/selectonic.min.map @@ -1 +1 @@ -{"version":3,"file":"selectonic.min.js","sources":["selectonic.js"],"names":["$","window","undefined","Options","schema","initial","TypeError","this","_schema","_options","_callbacks","set","Plugin","element","options","_name","pluginName","el","$el","ui","_selected","_isEnable","_keyModes","_this","on","value","_itemsSelector","get","_setScrolledElem","_init","_throttle","func","wait","context","args","result","timeout","previous","later","leading","Date","apply","now","remaining","arguments","clearTimeout","trailing","setTimeout","$document","document","itContains","array","elem","Array","length","i","checkType","val","type","isNullable","nullable","prototype","obj","isNew","option","callback","newOptions","defaults","defOption","unchangeable","Error","msg","join","values","RangeError","extend","call","opt","cb","off","filter","default","multi","mouseMode","focusBlur","selectionBlur","handle","textSelection","focusOnHover","keyboard","keyboardMode","autoScroll","loop","preventInputs","listClass","focusClass","selectedClass","disabledClass","create","before","focusLost","select","unselect","unselectAll","stop","destroy","keyCode","DOWN","UP","SHIFT","END","HOME","PAGE_DOWN","PAGE_UP","A","SPACE","ENTER","getDataObject","data","addClass","_bindEvents","_callEvent","selector","_scrolledElem","_cancel","e","params","wasCancelled","isCancellation","_isPrevented","each","changedItems","index","item","prevItemsStates","_select","_unselect","prevFocus","_setFocus","name","_mouseEvent","_mouseHandler","_keyboardEvent","_keyHandler","_selectstartEvent","_mousemoveEvent","_mousemoveHandler","_unbindEvents","_getTarget","$elem","target","handleElem","is","parentNode","_getItems","items","jquery","find","fn","_getNextPageElem","allItems","first","last","$candidate","candHeight","currentIndex","cand","_isOptimized","isShiftPageRange","box","boxViewHeight","clientHeight","winViewHeight","outerHeight","$current","isBoxBigger","pageHeight","itemHeight","currentHeight","itemsHeight","direction","rangeStart","eq","rangeEnd","event","focus","selected","unselected","_controller","method","_stop","wasSelected","isTargetWasSelected","_getIsSelected","isRangeSelect","_perfomRangeSelect","isMultiSelect","_unselectAll","_blur","beforeStart","afterStart","beforeEnd","afterEnd","endAfterStart","top","bot","isNewSolidSelection","slice","add","solidInitialElem","_changeItemsStates","delta","aboveZero","isSelected","selectedCondition","isSelectedTarget","push","toggleClass","concat","silent","isOnlyTargetSelected","_multiSelect","_rangeSelect","arr","x","y","subArr","hasClass","map","removeClass","_checkIfElem","res","nodeType","_checkIfSelector","tagName","isAllSelect","page","key","which","_shiftModeAction","shift","_isMulti","_findNextTarget","isDown","shiftKey","preventDefault","_rangeVariator","_multiVariator","scroll","isFocusSelected","isTargetSelected","prevItem","afterTarget","isSelectedAfterTarget","edge","_refreshBoxScroll","$box","isWindow","boxScrollTop","scrollTop","boxWindowY","offset","$item","itemBoxTop","_isRange","ctrlKey","metaKey","isMulti","isRange","_mousedownOnItem","_isFocusOnHoverPrevented","_isHovered","_preventMouseMove","_focusHoverTimeout","_callPublicMethod","publicMethod","isFunction","charAt","isEnabled","isPlainObject","getSelected","removeData","blur","getIds","id","getSelectedId","enable","disable","cancel","refresh","jQuery"],"mappings":";;;;CAGC,SAASA,EAAGC,EAAQC,GACnB,YAwCA,SAASC,GAAUC,EAAQC,GACzB,GAAuB,gBAAXD,GAAwB,KAAM,IAAIE,WAAU,mEAKxD,OAJAC,MAAKC,QAAaJ,EAClBG,KAAKE,YACLF,KAAKG,cACLH,KAAKI,IAAKN,GAAS,GACZE,KAiHT,QAASK,GAAQC,EAASC,GACxBP,KAAKQ,MAAaH,EAAOI,WACzBT,KAAKU,GAAaJ,EAClBN,KAAKW,IAAalB,EAAGa,GACrBN,KAAKY,MACLZ,KAAKa,UAAa,EAClBb,KAAKc,WAAa,EAClBd,KAAKe,aACLf,KAAKO,QAAa,GAAIX,GAASC,EAAQU,EAEvC,IAAIS,GAAQhB,IACZA,MAAKO,QAAQU,GAAG,SAAU,SA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AKW,IAAImN,YAAa9N,KAAKO,QAAQa,IAAI,kBAChCpB,KAAKW,KAQdN,EAAOiD,UAAUkO,QAAU,WAIzB,MAHAxR,MAAKc,WAAY,EACjBd,KAAKwQ,YAAa,EAClBxQ,KAAKW,IAAIqG,SAAUhH,KAAKO,QAAQa,IAAI,kBAC7BpB,KAAKW,KAUdN,EAAOiD,UAAUmO,OAAS,WAExB,MADAzR,MAAK0H,cAAe,EACb1H,KAAKW,KAQdN,EAAOiD,UAAUoO,QAAU,WACzB,GAAIxG,GAAQlL,KAAKY,GAAGsK,KAGpB,OAFKA,KAAUzL,EAAEyL,GAAOjC,GAAG,mBAAuBjJ,MAAKY,GAAGsK,MAC1DlL,KAAKa,UAAcb,KAAKiR,cAAgBlO,OACjC/C,KAAKW,KAUdlB,EAAE8J,GAAGlJ,EAAOI,YAAc,SAAUF,GAClC,MAAIA,IAAWA,EAAQuQ,OACdzQ,EAAOsQ,kBAAkBzO,MAAOlC,KAAMqC,WAExCrC,KAAK2H,KAAM,SAAS2G,EAAKzL,GACxBxC,EAAOyG,cAAcjE,IAAU,GAAIxC,GAAQwC,EAAMtC,OAI3DoR,OAAQjS"} \ No newline at end of file +{"version":3,"file":"selectonic.min.js","sources":["selectonic.js"],"names":["$","window","undefined","Options","schema","initial","TypeError","this","_schema","_options","_callbacks","set","Plugin","element","options","_name","pluginName","el","$el","ui","_selected","_isEnable","_keyModes","_this","on","value","_itemsSelector","get","_setScrolledElem","_init","_throttle","func","wait","context","args","result","timeout","previous","later","leading","Date","apply","now","remaining","arguments","clearTimeout","trailing","setTimeout","$document","document","itContains","array","elem","Array","length","i","checkType","val","type","isNullable","nullable","prototype","obj","isNew","option","callback","newOptions","defaults","defOption","unchangeable","Error","msg","join","values","RangeError","extend","call","opt","cb","off","filter","default","multi","mouseMode","focusBlur","selectionBlur","handle","textSelection","focusOnHover","keyboard","keyboardMode","autoScroll","loop","preventInputs","listClass","focusClass","selectedClass","disabledClass","create","before","focusLost","select","unselect","unselectAll","stop","destroy","keyCode","DOWN","UP","SHIFT","END","HOME","PAGE_DOWN","PAGE_UP","A","SPACE","ENTER","getDataObject","data","addClass","_bindEvents","_callEvent","selector","_scrolledElem","_cancel","e","params","wasCancelled","isCancellation","_isPrevented","each","changedItems","index","item","prevItemsStates","_select","_unselect","prevFocus","_setFocus","name","_mouseEvent","which","_mouseHandler","_keyboardEvent","_keyHandler","_selectstartEvent","_mousemoveEvent","_mousemoveHandler","_unbindEvents","_getTarget","$elem","target","handleElem","is","parentNode","_getItems","items","jquery","find","fn","_getNextPageElem","allItems","first","last","$candidate","candHeight","currentIndex","cand","_isOptimized","isShiftPageRange","box","boxViewHeight","clientHeight","winViewHeight","outerHeight","$current","isBoxBigger","pageHeight","itemHeight","currentHeight","itemsHeight","direction","rangeStart","eq","rangeEnd","event","focus","selected","unselected","_controller","method","_stop","wasSelected","isTargetWasSelected","_getIsSelected","isRangeSelect","_perfomRangeSelect","isMultiSelect","_unselectAll","_blur","beforeStart","afterStart","beforeEnd","afterEnd","endAfterStart","top","bot","isNewSolidSelection","slice","add","solidInitialElem","_changeItemsStates","delta","aboveZero","isSelected","selectedCondition","isSelectedTarget","push","toggleClass","concat","silent","isOnlyTargetSelected","_multiSelect","_rangeSelect","arr","x","y","subArr","hasClass","map","removeClass","_checkIfElem","res","nodeType","_checkIfSelector","tagName","isAllSelect","page","key","_shiftModeAction","shift","_isMulti","_findNextTarget","isDown","shiftKey","preventDefault","_rangeVariator","_multiVariator","scroll","isFocusSelected","isTargetSelected","prevItem","afterTarget","isSelectedAfterTarget","edge","_refreshBoxScroll","$box","isWindow","boxScrollTop","scrollTop","boxWindowY","offset","$item","itemBoxTop","_isRange","ctrlKey","metaKey","isMulti","isRange","_mousedownOnItem","_isFocusOnHoverPrevented","_isHovered","_preventMouseMove","_focusHoverTimeout","_callPublicMethod","publicMethod","isFunction","charAt","isEnabled","isPlainObject","getSelected","removeData","blur","getIds","id","getSelectedId","enable","disable","cancel","refresh","jQuery"],"mappings":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