@progress/kendo-react-dropdowns
Advanced tools
Comparing version 0.2.1-dev.201801301153 to 0.3.0-dev.201801301554
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-react-dropdowns",["react","classnames","prop-types","react-dom","@progress/kendo-react-popup"],function(e){var t,n,i,o,r;function s(e){return e.__useDefault?e.default:e}return{setters:[function(e){t=s(e)},function(e){n=s(e)},function(e){i=s(e)},function(e){o=s(e)},function(e){r=s(e)}],execute:function(){!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.c=t,n.p="",n(0)}([function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(1);n.DropDownList=o.DropDownList,function(t){for(var n in t)e(n,t[n])}(n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2);t.DropDownList=i.default},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),a=n(4),l=n(5),p=n(6),c=n(7),u=n(8),d=n(10),f=n(11),h=n(13),v=n(15),g=n(16),m=n(12),y=0,_=1,x=2,b=function(e){"INPUT"!==e.target.nodeName&&e.preventDefault()},S=function(e,t){var n=e.valueField;return(e.data||[]).findIndex(function(e){return e===t||m.getter(e,n)===t})},k=function(e,t){return-1!==["string","number","undefined"].indexOf(typeof e)?e:m.getter(e,t)},C=function(e,t){return t?m.getter(e,t):e},w=function(e,t){if(-1===t)return C(e.defaultItem,e.valueField);if(e.data){var n=e.data[t];return C(n,e.valueField)}},T=function(e,t){if(!e.data)return null;if(-1===t)return k(e.defaultItem,e.textField);var n=e.data[t];return k(n,e.textField)},P=function(e,t,n){e.events.push({type:"onPageChange",page:{skip:t,take:n}})},I=function(e){function t(t){var n=e.call(this,t)||this;n.vs=new v.default,n._selectedIndexChanged=void 0,n._lastMousedown=0,n.handleFocus=function(e){if(!n.state.isFocused){var t=n.initState();t.data.isFocused=!0,t.events.push({type:"onFocus"}),t.syntheticEvent=e,n.applyState(t)}},n.handleBlur=function(e){if(n.state.isFocused&&!n._filteringWillFocus){if((new Date).getTime()-n._lastMousedown<500)return n._lastMousedown=0,e.target.focus();var t=n.initState();t.data.isFocused=!1,t.data.opened=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,n.state.opened&&t.events.push({type:"onClose"}),n.applyState(t)}},n.handleWrapperClick=function(e){var t=n.initState();n.togglePopup(t),t.syntheticEvent=e,n.applyState(t)},n.handleItemClick=function(e,t){var i=n.initState();n.handleItemSelect(e,i),n.togglePopup(i),i.syntheticEvent=t,n.applyState(i)},n.handleDefaultItemClick=function(e,t){var i=n.initState(),o=n.props,r=o.defaultItem,s=o.valueField,a=o.textField;n.togglePopup(i);var l=C(r,s),p=k(r,a);n.setValueSelection(l,p,e,i),i.events.push({type:"onChange"}),i.syntheticEvent=t,n.applyState(i)},n.handleKeyDown=function(e){var t=n.props,i=t.data,o=t.filterable,r=t.disabled,s=e.keyCode;if(!r&&!(o&&(37===s||39===s||32===s||16===s||36===s||35===s))){var a=n.initState(),l=S(n.props,n.value),p=n._navigationService.process({current:n.vs.skip+l,max:(n.vs.enabled?n.vs.total:(i||[]).length)-1,min:n.props.defaultItem?-1:0,event:e,state:a}),c=p===g.NavigationAction.Left||p===g.NavigationAction.Right;p===g.NavigationAction.Undefined||p===g.NavigationAction.Tab||p===g.NavigationAction.Backspace||p===g.NavigationAction.Delete||c&&o||!(p!==g.NavigationAction.Enter||p===g.NavigationAction.Enter&&n.props.opened)||e.preventDefault(),a.syntheticEvent=e,n.applyState(a)}},n.handleKeyPress=function(e){if(!n.props.filterable&&0!==e.which&&13!==e.keyCode){var t=String.fromCharCode(e.charCode||e.keyCode);n.props.ignoreCase&&(t=t.toLowerCase())," "===t&&e.preventDefault(),n.setState({word:n.state.word+t,last:n.state.last+t},n.search)}},n.handleItemSelect=function(e,t){var i=n.state.skip||0,o=e-i;if(m.isPresent(e)){if(o>=0&&o<(n.props.data||[]).length||-1===o&&n.props.defaultItem){var r=w(n.props,o),s=T(n.props,o);n.setValueSelection(r,s,e,t)}else if(void 0!==n.props.virtual){var a=n._scrollElement,l=n.state.opened&&a,p=n.vs.pageSize;if(l&&0===e)P(t,0,p),n.vs.reset();else if(l&&e===n.vs.total-1)P(t,n.vs.total-n.vs.pageSize,p),n.vs.scrollToEnd();else if(l)a.scrollTop=Math.max(0,a.scrollTop-n.vs.itemHeight);else if(l||0!==e)if(l||e!==n.vs.total-1){if(!l){var c=Math.max(0,i+(o<0?-1:1));P(t,c,p)}}else P(t,n.vs.total-n.vs.pageSize,p);else P(t,0,p);n.state.opened||n.vs.reset(),n._selectedIndexChanged=e,t.data.selectedIndex=e}t.events.push({type:"onChange"})}},n.handleNavigate=function(e,t){var i=e.event;e.action===g.NavigationAction.Open&&!n.state.opened||e.action===g.NavigationAction.Close&&n.state.opened?n.togglePopup(t):13===i.keyCode||32===i.keyCode?n.togglePopup(t):void 0!==e.index&&n.handleItemSelect(e.index,t)},n.handleListFilterChange=function(e){var t=n.initState(),i=e.target.value,o=n.props.textField;t.data.filterText=i,t.events.push({type:"onFilterChange",filter:{field:o,operator:"contains",ignoreCase:!0,value:i}}),t.syntheticEvent=e,n.applyState(t)},n.renderDropDownWrapper=function(){var e=n.props,t=e.disabled,i=e.tabIndex,o=e.loading,r=e.iconClassName,a=n.state,l=a.text,u=a.opened,d=a.isFocused;return s.createElement(c.default,{disabled:t,focused:d,tabIndex:i,ariaExpanded:u||!1,ariaOwns:n.listBoxId,ariaActiveDescendant:n.optionPrefix+"-"+(n.value||""),onFocus:n.handleFocus,onBlur:n.handleBlur,onClick:n.handleWrapperClick,onKeyDown:n.handleKeyDown,onKeyPress:n.handleKeyPress,ref:function(e){n._wrapper=e}},s.createElement("span",{className:"k-input"},l),s.createElement("span",{className:"k-select"},s.createElement("span",{className:p("k-icon",r,{"k-i-arrow-s":!o&&!r,"k-i-loading":o&&!r})})))},n.renderListContainer=function(){var e=n.props.popupSettings,t=n.state.opened,i=void 0!==n.props.virtual,o={onMouseDown:function(e){n._lastMousedown=(new Date).getTime(),b(e)},onBlur:n.handleBlur,width:n.popupWidth,popupSettings:{animate:(e||{}).animate,anchor:n.element,appendTo:document.body,show:t,open:function(){n.vs.hidden=!1},className:"k-list-container k-reset",close:function(){n.vs.hidden=!0,n.onPopupClosed()}}};return s.createElement(u.default,r({},o),n.renderListFilter(),i?n.renderDefaultItem():void 0,n.renderScrollWrapper(i?[n.renderList(),n.renderScrollElement()]:[n.renderDefaultItem(),n.renderList(),n.renderScrollElement()]))},n.renderScrollWrapper=function(e){var t=n.props.popupSettings;return n.vs.enabled?s.createElement("div",{onScroll:n.vs.scrollHandler,ref:n.scrollerRef,style:{height:(t||{}).height,overflowY:"scroll"}},e):e},n.renderScrollElement=function(){return n.vs.enabled&&s.createElement("div",{ref:function(e){n.vs.scrollElement=e},key:x})},n.renderList=function(){var e=n.props,t=e.data,i=e.textField,o=e.valueField,r=e.defaultItem,a=e.popupSettings,l=n.state,p=l.opened,c=l.selectedIndex,u=l.skip,d="translateY("+n.vs.translate+"px)",f=n.value;return s.createElement(h.default,{id:n.listBoxId,show:p,data:(t||[]).slice(),selected:-1!==c||r?c:void 0,value:f,textField:i,valueField:o,optionPrefix:n.optionPrefix,listRef:function(e){n.vs.enabled&&(n.vs.list=e),n._list=e},wrapperStyle:n.vs.enabled?{float:"left",width:"100%"}:{maxHeight:(a||{}).height},wrapperCssClass:n.vs.enabled?void 0:"k-list-scroller",listStyle:n.vs.enabled?{transform:d}:void 0,key:_,skip:u,onClick:n.handleItemClick})},n.renderListFilter=function(){var e=n.props.filterable,t=n.state,i=t.opened,o=t.filterText;return e&&s.createElement(d.default,{value:o,focused:i,willFocus:n.filteringInputWillFocus,didFocus:n.filteringInputDidFocus,onChange:n.handleListFilterChange,onKeyDown:n.handleKeyDown})},n.renderDefaultItem=function(){var e=n.props,t=e.textField,i=e.defaultItem,o=n.state.selectedIndex;return i&&s.createElement(f.default,{defaultItem:i,textField:t,selected:-1===o,key:y,onClick:n.handleDefaultItemClick})},n.scrollerRef=function(e){e&&(n.vs.container=e,n._scrollElement=e,setTimeout(n.vs.calculateScrollSizes.bind(n.vs),0))},n.pageChange=function(e,t){if(n.props.virtual){var i=n.initState();P(i,e.skip,e.take),n.applyState(i)}},n.togglePopup=function(e){if(e.data.isFocused=!0,e.data.opened=!n.state.opened,n.state.opened)e.events.push({type:"onClose"});else{var t=(n.props.popupSettings||{}).width;n.popupWidth=void 0!==t?t:a.findDOMNode(n._wrapper).offsetWidth+"px",e.events.push({type:"onOpen"})}},n.search=function(){clearTimeout(n._typingTimeout),n.props.filterable||(n._typingTimeout=setTimeout(function(){n.setState({word:""})},n.props.delay),n.selectNext())},n.selectNext=function(){var e,t,i,o=(n.props.data||[]).map(function(e,t){return{item:e,itemIndex:t}}),r=m.sameCharsOnly(n.state.word,n.state.last),s=o.length,a=n.state.selectedIndex||0;for(n.props.defaultItem&&(i={item:n.props.defaultItem,itemIndex:-1},s+=1,a+=1),a+=r?1:0,o=m.shuffleData(o,a,i),t=0;t<s;t++){e=m.getter(o[t].item,n.props.textField);var l=Boolean(r&&m.matchText(e,n.state.last,n.props.ignoreCase)),p=Boolean(m.matchText(e,n.state.word,n.props.ignoreCase));if(l||p){t=o[t].itemIndex;break}}if(t!==s){var c=n.initState();n.handleItemSelect(t,c),n.applyState(c)}},n.setValueSelection=function(e,t,i,o){void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),o.data.text=t,o.data.selectedIndex=i,n._value=e},n.updateSelectedItem=function(e,t){var i=void 0!==e.value?e.value:n.value,o=S(e,i),r=T(e,o),s=e.defaultItem?C(e.defaultItem,e.valueField):void 0;m.isPresent(i)&&-1===o||(-1===o&&void 0!==s&&(i=s,r=k(e.defaultItem,n.props.textField)),o=-1!==o?o+(t.data.skip||0):o,n.setValueSelection(i,r,o,t))},n.filteringInputWillFocus=function(){n._filteringWillFocus=!0},n.filteringInputDidFocus=function(){n._filteringWillFocus=!1},n.onPopupClosed=function(){if(n.state.isFocused){var e=a.findDOMNode(n._wrapper);setTimeout(function(){e.focus()},0)}};var i,o=void 0!==t.value?t.value:t.defaultValue,l=-1;return!m.isPresent(o)&&m.isPresent(t.defaultItem)?(o=C(t.defaultItem,t.valueField),i=k(t.defaultItem,t.textField)):(l=S(t,o),i=T(t,l)),n.state={filterText:"",text:i,word:"",last:"",selectedIndex:l,skip:0,isFocused:!1,opened:n.props.opened},n._value=o,n.listBoxId=m.guid(),n.optionPrefix=m.guid(),n._navigationService=new g.NavigationService(n.handleNavigate),n.initVirtualization(n.props.virtual,void 0),n.vs.PageChange=n.pageChange,n}return o(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),t.prototype.componentWillReceiveProps=function(e){var t=this.initState();if(void 0!==e.opened&&(t.data.opened=e.opened),!e.filterable&&this.state.filterText?t.data.filterText="":e.filterable&&void 0!==e.filter&&(t.data.filterText=e.filter),this.updateVirtualization(e,t),void 0!==this._selectedIndexChanged){var n=t.data.skip||0,i=this._selectedIndexChanged,o=w(e,i-n);this._value=o,this._selectedIndexChanged=void 0}this.updateSelectedItem(e,t),this.applyState(t)},t.prototype.componentWillUpdate=function(e,t){t.opened&&this.state.selectedIndex!==t.selectedIndex&&void 0===this._selectedIndexChanged&&this.scrollToSelectedItem(t)},t.prototype.componentDidUpdate=function(e,t){var n=this;if(this.state.opened&&!t.opened){var i=this._scrollElement;if(i){var o=i.scrollTop,r=this.vs.translate,s=this.vs.hidden,a=this.state.skip||0,l=this.state.selectedIndex||0;if(o!==r||0===r&&0===o&&a>0){var p=function(){n.vs.enabled=!1;var e=r>0?r:n.vs.itemHeight*l;i.scrollTop=e,n.vs.translateTo(r||n.vs.itemHeight*(a+1)),n.vs.enabled=!0,S(n.props,n.value)>=0&&n.scrollToSelectedItem(n.state)};0===this.vs.itemHeight||s?setTimeout(p,0):p()}}else this.scrollToSelectedItem(this.state)}},t.prototype.componentWillUnmount=function(){delete this.vs.container,delete this.vs.list,delete this._scrollElement},t.prototype.updateVirtualization=function(e,t){var n=e.virtual,i=this.props.virtual;if(void 0===n||void 0===i||i.total===n.total&&0!==n.skip)this.initVirtualization(n,t);else{var o=Object.assign({},n,{skip:0});this.initVirtualization(o,t),this.vs.calculateScrollSizes()&&this.vs.reset()}},t.prototype.initVirtualization=function(e,t){this.vs.enabled=void 0!==e,void 0!==e&&(this.vs.skip=e.skip,this.vs.pageSize=e.pageSize,this.vs.total=e.total,void 0!==t&&(t.data.skip=e.skip))},t.prototype.render=function(){var e=this,t=this.props,n=t.style,i=t.className,o=t.dir,r=this.state.opened;return s.createElement("span",{ref:function(t){e._element=t},className:p("k-widget k-dropdown k-header",i),style:n,dir:o,onMouseDown:r?b:void 0},this.renderDropDownWrapper(),this.renderListContainer())},t.prototype.scrollToSelectedItem=function(e){var t=this._list,n=(e.selectedIndex||0)-(e.skip||0),i=t?t.children[0]:void 0;if(i){var o=i.offsetHeight,r=this.vs.enabled,s=this._scrollElement||t.parentNode,a=s.offsetHeight,l=o*n-(r?s.scrollTop-this.vs.translate:0);if(r){var p=0;l+o>a?p=l+o-a:l<0&&(p=l),0!==p&&(s.scrollTop+=p),0===s.scrollTop&&0!==this.vs.translate&&(s.scrollTop=this.vs.translate)}else l+o>a+s.scrollTop?s.scrollTop=l+o-a:l<s.scrollTop&&(s.scrollTop-=s.scrollTop-l)}},t.prototype.initState=function(){return{data:{},events:[],syntheticEvent:void 0}},t.prototype.applyState=function(e){var t=this,n={syntheticEvent:e.syntheticEvent,nativeEvent:e.syntheticEvent?e.syntheticEvent.nativeEvent:void 0,target:this};Object.keys(e.data).length>0&&this.setState(e.data),e.events.forEach(function(e){var i=e.type;delete e.type;var o=t.props[i];o&&o.call(void 0,r({},n,e))})},t}(s.Component);I.propTypes={opened:l.bool,delay:l.number,disabled:l.bool,dir:l.string,filterable:l.bool,ignoreCase:l.bool,loading:l.bool,tabIndex:l.number,data:l.array,value:l.oneOfType([l.string,l.number,l.object]),defaultValue:l.oneOfType([l.string,l.number,l.object]),textField:l.string,valueField:l.string,className:l.string,iconClassName:l.string,popupSettings:l.shape({animate:l.bool,width:l.string,height:l.string}),virtual:l.shape({pageSize:l.number.isRequired,skip:l.number.isRequired,total:l.number.isRequired}),onOpen:l.func,onClose:l.func,onFocus:l.func,onBlur:l.func,onChange:l.func,onFilterChange:l.func,onPageChange:l.func},I.defaultProps={delay:500,ignoreCase:!0,tabIndex:0,popupSettings:{animate:!0,height:"200px"}},t.default=I},function(e,n){e.exports=t},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t){e.exports=n},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=n(6),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.focused,i=e.style,o=e.ariaExpanded,a=e.ariaOwns,l=e.ariaActiveDescendant,p=e.tabIndex;return r.createElement("span",{role:"listbox",tabIndex:t?void 0:p,className:s("k-dropdown-wrap",this.props.className,{"k-state-default":!t,"k-state-focused":n,"k-state-disabled":t}),style:i,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onKeyDown:this.props.onKeyDown,onKeyPress:this.props.onKeyPress,onClick:this.props.onClick,"aria-disabled":t||void 0,"aria-haspopup":!0,"aria-expanded":o,"aria-owns":a,"aria-activedescendant":l},this.props.children)},t}(r.Component);t.default=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),a=n(4),l=n(9),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.onMouseDown,i=e.onBlur,o=e.width,p=e.popupSettings;return s.createElement(l.Popup,r({style:{width:o},ref:function(e){var t=a.findDOMNode(e);if(t){var n=p.anchor,i=n?getComputedStyle(n).direction:null;i&&t.setAttribute("dir",i)}}},p),s.createElement("div",{onMouseDown:n,onBlur:i},t))},t}(s.Component);t.default=p},function(e,t){e.exports=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.componentDidUpdate=function(){this._input&&this.props.focused&&(this.props.willFocus&&this.props.willFocus(),this._input.focus(),this.props.didFocus&&setTimeout(this.props.didFocus,0))},t.prototype.render=function(){var e=this;return r.createElement("span",{className:"k-list-filter"},r.createElement("input",{ref:function(t){e._input=t},value:this.props.value,className:"k-textbox",onChange:this.props.onChange,onKeyDown:this.props.onKeyDown}),r.createElement("span",{className:"k-icon k-i-search"}))},t}(r.Component);t.default=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=n(6),a=n(12),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){e.preventDefault()},t.onClick=function(e){e.preventDefault(),t.props.onClick&&t.props.onClick(-1,e)},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.defaultItem,i=e.textField;return r.createElement("div",{onClick:this.onClick,onMouseDown:this.onMouseDown,className:s("k-list-optionlabel",{"k-state-selected":t})},a.getter(n,i)||"")},t}(r.Component);t.default=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.guid=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n};var n=function(e){return null!==e&&void 0!==e};t.isPresent=n;t.getter=function(e,t,i){if(void 0===i&&(i=!1),n(e))return i?t&&n(e[t])?e[t]:e:t?e[t]:e};t.sameCharsOnly=function(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==t)return!1;return!0};t.shuffleData=function(e,t,n){var i=e;return n&&(i=[n].concat(i)),i.slice(t).concat(i.slice(0,t))};t.matchText=function(e,t,i){if(!n(e))return!1;var o=String(e);return i&&(o=o.toLowerCase()),0===o.indexOf(t)}},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=n(14),a=n(12),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.renderItems=function(){var e=this,t=this.props,n=t.textField,i=t.valueField,o=t.value,l=t.selected,p=t.optionPrefix,c=this.props.skip||0;return this.props.data.map(function(t,u){var d=a.getter(t,i),f=c+u;return r.createElement(s.default,{id:p+"-"+(d||f.toString()),dataItem:t,selected:d===o,focused:0===f&&void 0===l,index:f,key:f,onClick:e.props.onClick,textField:n})})},t.prototype.render=function(){var e=this.props,t=e.id,n=e.show,i=e.wrapperCssClass,o=e.wrapperStyle,s=e.listStyle,a=e.listRef,l=this.renderItems();return l.length?r.createElement("div",{className:i,style:o},r.createElement("ul",{id:t,role:"listbox","aria-hidden":!n||void 0,className:"k-list k-reset",ref:a,style:s},l)):r.createElement("div",{className:"k-nodata"},r.createElement("div",null,"NO DATA FOUND."))},t}(r.Component);t.default=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=n(6),a=n(12),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){e.preventDefault(),t.props.onClick&&t.props.onClick(t.props.index||0,e)},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.selected,i=e.focused,o=e.dataItem,l=e.textField;return r.createElement("li",{id:t,role:"option","aria-selected":n||!1,className:s("k-item",{"k-state-selected":n,"k-state-focused":i}),onClick:this.handleClick},a.getter(o,l))},t}(r.Component);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),o=1533915,r=function(){function e(){var e=this;this.containerHeight=0,this.skip=0,this.total=0,this.enabled=!1,this.pageSize=0,this.itemHeight=0,this.hidden=!1,this.prevScrollPos=0,this.listTranslate=0,this.scrollSyncing=!1,this.calculateScrollSizes=function(){e.scrollSyncing=!0;var t=!1;if(i.isPresent(e.list)){e.itemHeight=e.list?e.list.children[0].offsetHeight:e.itemHeight,e.containerHeight=Math.min(o,e.itemHeight*e.total);var n=e.containerHeight;(t=e.scrollElement.style.height!==n+"px")&&(e.scrollElement.style.height=n+"px")}return e.scrollSyncing=!1,t},this.scrollHandler=this.scrollHandler.bind(this)}return Object.defineProperty(e.prototype,"translate",{get:function(){return this.listTranslate},enumerable:!0,configurable:!0}),e.prototype.changePage=function(e,t){var n=Math.min(Math.max(0,e),this.total-this.pageSize);n!==this.skip&&this.PageChange({skip:n,take:this.pageSize},t)},e.prototype.translateTo=function(e){this.listTranslate=e,this.list&&(this.list.style.transform="translateY("+e+"px)")},e.prototype.reset=function(){this.scrollSyncing=!0,this.container&&(this.container.scrollTop=0),this.translateTo(0),this.scrollSyncing=!1},e.prototype.maxScroll=function(){return this.container.scrollHeight-this.container.offsetHeight},e.prototype.scrollToEnd=function(){if(this.container){var e=this.maxScroll();this.translateTo(e),this.container.scrollTop=e}},e.prototype.localScrollUp=function(e){var t,n=this.itemHeight,i=this.container.scrollTop,o=this.listTranslate,r=i-o;if(!(r>0)){for(t=0;t<this.skip&&!(o+n+r<=i);t++)o-=n;if(o=this.validateTranslate(o),this.skip-t<=0&&o>i)return this.translateTo(0),this.changePage(0,e),void(this.container.scrollTop=0);o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip-t,e))}},e.prototype.localScrollDown=function(e){var t,n=this.itemHeight,i=this.container.scrollTop,o=this.listTranslate,r=this.list.children.length;for(t=0;t<r&&!(o+n>i);t++)o+=n;o=this.validateTranslate(o),t>=r&&this.skip+t>=this.total?(this.translateTo(o),this.changePage(this.total-1,e)):o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip+t,e))},e.prototype.scrollNonStrict=function(e){var t=this.total*this.prevScrollPos/this.containerHeight,n=Math.min(Math.floor(t),this.total-1),i=this.containerHeight*t/this.total;i=this.validateTranslate(i),this.translateTo(i),this.changePage(n,e)},e.prototype.scrollHandler=function(e){if(this.enabled&&this.list&&!this.hidden&&!this.scrollSyncing){var t=this.container.scrollTop,n=this.prevScrollPos;this.prevScrollPos=t,t-n<0&&t>this.listTranslate-this.list.scrollHeight/10?this.localScrollUp(e):t-n>0&&t<this.listTranslate+2*this.list.scrollHeight/3?this.localScrollDown(e):this.scrollNonStrict(e)}},e.prototype.validateTranslate=function(e){return e=Math.max(0,e),e=Math.min(this.containerHeight-this.list.offsetHeight,e)},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o,r=n(12),s=function(){return function(e,t,n){this.index=e,this.event=t,this.action=n}}();t.NavigationEvent=s,(o=i=t.NavigationAction||(t.NavigationAction={}))[o.Undefined=0]="Undefined",o[o.Open=1]="Open",o[o.Close=2]="Close",o[o.Enter=3]="Enter",o[o.Space=4]="Space",o[o.Tab=5]="Tab",o[o.Esc=6]="Esc",o[o.Delete=7]="Delete",o[o.Backspace=8]="Backspace",o[o.Home=9]="Home",o[o.End=10]="End",o[o.Up=11]="Up",o[o.Down=12]="Down",o[o.Left=13]="Left",o[o.Right=14]="Right";var a=function(){function e(e){this.onNavigate=e}return e.prototype.process=function(e){var t=e.event,n=t.keyCode,o=t.altKey,r=e.state,a=void 0,l=i.Undefined;return o&&40===n?l=i.Open:o&&38===n?l=i.Close:13===n?l=i.Enter:32===n?l=i.Space:27===n?l=i.Close:9===n?l=i.Tab:38===n?(a=this.next({current:e.current,min:e.min,max:e.max,step:-1}),l=i.Up):37===n?(a=this.next({current:e.current,min:e.min,max:e.max,step:-1}),l=i.Left):40===n?(a=this.next({current:e.current,min:e.min,max:e.max,step:1}),l=i.Down):39===n?(a=this.next({current:e.current,min:e.min,max:e.max,step:1}),l=i.Right):36===n?(a=0,l=i.Home):35===n?(a=e.max,l=i.End):46===n?l=i.Delete:8===n&&(l=i.Backspace),l!==i.Undefined&&this.onNavigate(new s(a,t,l),r),l},e.prototype.next=function(e){return r.isPresent(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min},e}();t.NavigationService=a}])}}}); | ||
System.register("@progress/kendo-react-dropdowns",["react","prop-types","react-dom","classnames","@progress/kendo-react-popup"],function(e){var t,n,i,o,r;function s(e){return e.__useDefault?e.default:e}return{setters:[function(e){t=s(e)},function(e){n=s(e)},function(e){i=s(e)},function(e){o=s(e)},function(e){r=s(e)}],execute:function(){!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.c=t,n.p="",n(0)}([function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(1);n.DropDownList=o.DropDownList,function(t){for(var n in t)e(n,t[n])}(n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2);t.DropDownList=i.default},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),a=n(4),l=n(5),p=n(6),c=n(7),u=n(8),d=n(10),f=n(11),h=n(13),v=n(15),g=n(16),m=n(12),y=0,_=1,x=2,b=function(e){"INPUT"!==e.target.nodeName&&e.preventDefault()},S=function(e,t){var n=e.valueField;return(e.data||[]).findIndex(function(e){return e===t||m.getter(e,n)===t})},k=function(e,t){return-1!==["string","number","undefined"].indexOf(typeof e)?e:m.getter(e,t)},C=function(e,t){return t?m.getter(e,t):e},w=function(e,t){if(-1===t)return C(e.defaultItem,e.valueField);if(e.data){var n=e.data[t];return C(n,e.valueField)}},T=function(e,t){if(!e.data)return null;if(-1===t)return k(e.defaultItem,e.textField);var n=e.data[t];return k(n,e.textField)},P=function(e,t,n){e.events.push({type:"onPageChange",page:{skip:t,take:n}})},I=function(e){function t(t){var n=e.call(this,t)||this;n.vs=new v.default,n._selectedIndexChanged=void 0,n._lastMousedown=0,n.handleFocus=function(e){if(!n.state.isFocused){var t=n.initState();t.data.isFocused=!0,t.events.push({type:"onFocus"}),t.syntheticEvent=e,n.applyState(t)}},n.handleBlur=function(e){if(n.state.isFocused&&!n._filteringWillFocus){if((new Date).getTime()-n._lastMousedown<500)return n._lastMousedown=0,e.target.focus();var t=n.initState();t.data.isFocused=!1,t.data.opened=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,n.state.opened&&t.events.push({type:"onClose"}),n.applyState(t)}},n.handleWrapperClick=function(e){var t=n.initState();n.togglePopup(t),t.syntheticEvent=e,n.applyState(t)},n.handleItemClick=function(e,t){var i=n.initState();n.handleItemSelect(e,i),n.togglePopup(i),i.syntheticEvent=t,n.applyState(i)},n.handleDefaultItemClick=function(e,t){var i=n.initState(),o=n.props,r=o.defaultItem,s=o.valueField,a=o.textField;n.togglePopup(i);var l=C(r,s),p=k(r,a);n.setValueSelection(l,p,e,i),i.events.push({type:"onChange"}),i.syntheticEvent=t,n.applyState(i)},n.handleKeyDown=function(e){var t=n.props,i=t.data,o=t.filterable,r=t.disabled,s=e.keyCode;if(!r&&!(o&&(37===s||39===s||32===s||16===s||36===s||35===s))){var a=n.initState(),l=S(n.props,n.value),p=n._navigationService.process({current:n.vs.skip+l,max:(n.vs.enabled?n.vs.total:(i||[]).length)-1,min:n.props.defaultItem?-1:0,event:e,state:a}),c=p===g.NavigationAction.Left||p===g.NavigationAction.Right;p===g.NavigationAction.Undefined||p===g.NavigationAction.Tab||p===g.NavigationAction.Backspace||p===g.NavigationAction.Delete||c&&o||!(p!==g.NavigationAction.Enter||p===g.NavigationAction.Enter&&n.props.opened)||e.preventDefault(),a.syntheticEvent=e,n.applyState(a)}},n.handleKeyPress=function(e){if(!n.props.filterable&&0!==e.which&&13!==e.keyCode){var t=String.fromCharCode(e.charCode||e.keyCode);n.props.ignoreCase&&(t=t.toLowerCase())," "===t&&e.preventDefault(),n.setState({word:n.state.word+t,last:n.state.last+t},n.search)}},n.handleItemSelect=function(e,t){var i=n.state.skip||0,o=e-i;if(m.isPresent(e)){if(o>=0&&o<(n.props.data||[]).length||-1===o&&n.props.defaultItem){var r=w(n.props,o),s=T(n.props,o);n.setValueSelection(r,s,e,t)}else if(void 0!==n.props.virtual){var a=n._scrollElement,l=n.state.opened&&a,p=n.vs.pageSize;if(l&&0===e)P(t,0,p),n.vs.reset();else if(l&&e===n.vs.total-1)P(t,n.vs.total-n.vs.pageSize,p),n.vs.scrollToEnd();else if(l)a.scrollTop=Math.max(0,a.scrollTop-n.vs.itemHeight);else if(l||0!==e)if(l||e!==n.vs.total-1){if(!l){var c=Math.max(0,i+(o<0?-1:1));P(t,c,p)}}else P(t,n.vs.total-n.vs.pageSize,p);else P(t,0,p);n.state.opened||n.vs.reset(),n._selectedIndexChanged=e,t.data.selectedIndex=e}t.events.push({type:"onChange"})}},n.handleNavigate=function(e,t){var i=e.event;e.action===g.NavigationAction.Open&&!n.state.opened||e.action===g.NavigationAction.Close&&n.state.opened?n.togglePopup(t):13===i.keyCode||32===i.keyCode?n.togglePopup(t):void 0!==e.index&&n.handleItemSelect(e.index,t)},n.handleListFilterChange=function(e){var t=n.initState(),i=e.target.value,o=n.props.textField;t.data.filterText=i,t.events.push({type:"onFilterChange",filter:{field:o,operator:"contains",ignoreCase:!0,value:i}}),t.syntheticEvent=e,n.applyState(t)},n.renderDropDownWrapper=function(){var e=n.props,t=e.disabled,i=e.tabIndex,o=e.loading,r=e.iconClassName,a=n.state,l=a.text,u=a.opened,d=a.isFocused;return s.createElement(c.default,{disabled:t,focused:d,tabIndex:i,ariaExpanded:u||!1,ariaOwns:n.listBoxId,ariaActiveDescendant:n.optionPrefix+"-"+(n.value||""),onFocus:n.handleFocus,onBlur:n.handleBlur,onClick:n.handleWrapperClick,onKeyDown:n.handleKeyDown,onKeyPress:n.handleKeyPress,ref:function(e){n._wrapper=e}},s.createElement("span",{className:"k-input"},l),s.createElement("span",{className:"k-select"},s.createElement("span",{className:p("k-icon",r,{"k-i-arrow-s":!o&&!r,"k-i-loading":o&&!r})})))},n.renderListContainer=function(){var e=n.props.popupSettings,t=n.state.opened,i=void 0!==n.props.virtual,o={onMouseDown:function(e){n._lastMousedown=(new Date).getTime(),b(e)},onBlur:n.handleBlur,width:n.popupWidth,popupSettings:{animate:(e||{}).animate,anchor:n.element,appendTo:document.body,show:t,open:function(){n.vs.hidden=!1},className:"k-list-container k-reset",close:function(){n.vs.hidden=!0,n.onPopupClosed()}}};return s.createElement(u.default,r({},o),n.renderListFilter(),i?n.renderDefaultItem():void 0,n.renderScrollWrapper(i?[n.renderList(),n.renderScrollElement()]:[n.renderDefaultItem(),n.renderList(),n.renderScrollElement()]))},n.renderScrollWrapper=function(e){var t=n.props.popupSettings;return n.vs.enabled?s.createElement("div",{onScroll:n.vs.scrollHandler,ref:n.scrollerRef,style:{height:(t||{}).height,overflowY:"scroll"}},e):e},n.renderScrollElement=function(){return n.vs.enabled&&s.createElement("div",{ref:function(e){n.vs.scrollElement=e},key:x})},n.renderList=function(){var e=n.props,t=e.data,i=e.textField,o=e.valueField,r=e.defaultItem,a=e.popupSettings,l=n.state,p=l.opened,c=l.selectedIndex,u=l.skip,d="translateY("+n.vs.translate+"px)",f=n.value;return s.createElement(h.default,{id:n.listBoxId,show:p,data:(t||[]).slice(),selected:-1!==c||r?c:void 0,value:f,textField:i,valueField:o,optionPrefix:n.optionPrefix,listRef:function(e){n.vs.enabled&&(n.vs.list=e),n._list=e},wrapperStyle:n.vs.enabled?{float:"left",width:"100%"}:{maxHeight:(a||{}).height},wrapperCssClass:n.vs.enabled?void 0:"k-list-scroller",listStyle:n.vs.enabled?{transform:d}:void 0,key:_,skip:u,onClick:n.handleItemClick})},n.renderListFilter=function(){var e=n.props.filterable,t=n.state,i=t.opened,o=t.filterText;return e&&s.createElement(d.default,{value:o,focused:i,willFocus:n.filteringInputWillFocus,didFocus:n.filteringInputDidFocus,onChange:n.handleListFilterChange,onKeyDown:n.handleKeyDown})},n.renderDefaultItem=function(){var e=n.props,t=e.textField,i=e.defaultItem,o=n.state.selectedIndex;return i&&s.createElement(f.default,{defaultItem:i,textField:t,selected:-1===o,key:y,onClick:n.handleDefaultItemClick})},n.scrollerRef=function(e){e&&(n.vs.container=e,n._scrollElement=e,setTimeout(n.vs.calculateScrollSizes.bind(n.vs),0))},n.pageChange=function(e,t){if(n.props.virtual){var i=n.initState();P(i,e.skip,e.take),n.applyState(i)}},n.togglePopup=function(e){if(e.data.isFocused=!0,e.data.opened=!n.state.opened,n.state.opened)e.events.push({type:"onClose"});else{var t=(n.props.popupSettings||{}).width;n.popupWidth=void 0!==t?t:a.findDOMNode(n._wrapper).offsetWidth+"px",e.events.push({type:"onOpen"})}},n.search=function(){clearTimeout(n._typingTimeout),n.props.filterable||(n._typingTimeout=setTimeout(function(){n.setState({word:""})},n.props.delay),n.selectNext())},n.selectNext=function(){var e,t,i,o=(n.props.data||[]).map(function(e,t){return{item:e,itemIndex:t}}),r=m.sameCharsOnly(n.state.word,n.state.last),s=o.length,a=n.state.selectedIndex||0;for(n.props.defaultItem&&(i={item:n.props.defaultItem,itemIndex:-1},s+=1,a+=1),a+=r?1:0,o=m.shuffleData(o,a,i),t=0;t<s;t++){e=m.getter(o[t].item,n.props.textField);var l=Boolean(r&&m.matchText(e,n.state.last,n.props.ignoreCase)),p=Boolean(m.matchText(e,n.state.word,n.props.ignoreCase));if(l||p){t=o[t].itemIndex;break}}if(t!==s){var c=n.initState();n.handleItemSelect(t,c),n.applyState(c)}},n.setValueSelection=function(e,t,i,o){void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),o.data.text=t,o.data.selectedIndex=i,n._value=e},n.updateSelectedItem=function(e,t){var i=void 0!==e.value?e.value:n.value,o=S(e,i),r=T(e,o),s=e.defaultItem?C(e.defaultItem,e.valueField):void 0;m.isPresent(i)&&-1===o||(-1===o&&void 0!==s&&(i=s,r=k(e.defaultItem,n.props.textField)),o=-1!==o?o+(t.data.skip||0):o,n.setValueSelection(i,r,o,t))},n.filteringInputWillFocus=function(){n._filteringWillFocus=!0},n.filteringInputDidFocus=function(){n._filteringWillFocus=!1},n.onPopupClosed=function(){if(n.state.isFocused){var e=a.findDOMNode(n._wrapper);setTimeout(function(){e.focus()},0)}};var i,o=void 0!==t.value?t.value:t.defaultValue,l=-1;return!m.isPresent(o)&&m.isPresent(t.defaultItem)?(o=C(t.defaultItem,t.valueField),i=k(t.defaultItem,t.textField)):(l=S(t,o),i=T(t,l)),n.state={filterText:"",text:i,word:"",last:"",selectedIndex:l,skip:0,isFocused:!1,opened:n.props.opened},n._value=o,n.listBoxId=m.guid(),n.optionPrefix=m.guid(),n._navigationService=new g.NavigationService(n.handleNavigate),n.initVirtualization(n.props.virtual,void 0),n.vs.PageChange=n.pageChange,n}return o(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),t.prototype.componentWillReceiveProps=function(e){var t=this.initState();if(void 0!==e.opened&&(t.data.opened=e.opened),!e.filterable&&this.state.filterText?t.data.filterText="":e.filterable&&void 0!==e.filter&&(t.data.filterText=e.filter),this.updateVirtualization(e,t),void 0!==this._selectedIndexChanged){var n=t.data.skip||0,i=this._selectedIndexChanged,o=w(e,i-n);this._value=o,this._selectedIndexChanged=void 0}this.updateSelectedItem(e,t),this.applyState(t)},t.prototype.componentWillUpdate=function(e,t){t.opened&&this.state.selectedIndex!==t.selectedIndex&&void 0===this._selectedIndexChanged&&this.scrollToSelectedItem(t)},t.prototype.componentDidUpdate=function(e,t){var n=this;if(this.state.opened&&!t.opened){var i=this._scrollElement;if(i){var o=i.scrollTop,r=this.vs.translate,s=this.vs.hidden,a=this.state.skip||0,l=this.state.selectedIndex||0;if(o!==r||0===r&&0===o&&a>0){var p=function(){n.vs.enabled=!1;var e=r>0?r:n.vs.itemHeight*l;i.scrollTop=e,n.vs.translateTo(r||n.vs.itemHeight*(a+1)),n.vs.enabled=!0,S(n.props,n.value)>=0&&n.scrollToSelectedItem(n.state)};0===this.vs.itemHeight||s?setTimeout(p,0):p()}}else this.scrollToSelectedItem(this.state)}},t.prototype.componentWillUnmount=function(){delete this.vs.container,delete this.vs.list,delete this._scrollElement},t.prototype.updateVirtualization=function(e,t){var n=e.virtual,i=this.props.virtual;if(void 0===n||void 0===i||i.total===n.total&&0!==n.skip)this.initVirtualization(n,t);else{var o=Object.assign({},n,{skip:0});this.initVirtualization(o,t),this.vs.calculateScrollSizes()&&this.vs.reset()}},t.prototype.initVirtualization=function(e,t){this.vs.enabled=void 0!==e,void 0!==e&&(this.vs.skip=e.skip,this.vs.pageSize=e.pageSize,this.vs.total=e.total,void 0!==t&&(t.data.skip=e.skip))},t.prototype.render=function(){var e=this,t=this.props,n=t.style,i=t.className,o=t.dir,r=this.state.opened;return s.createElement("span",{ref:function(t){e._element=t},className:p("k-widget k-dropdown k-header",i),style:n,dir:o,onMouseDown:r?b:void 0},this.renderDropDownWrapper(),this.renderListContainer())},t.prototype.scrollToSelectedItem=function(e){var t=this._list,n=(e.selectedIndex||0)-(e.skip||0),i=t?t.children[0]:void 0;if(i){var o=i.offsetHeight,r=this.vs.enabled,s=this._scrollElement||t.parentNode,a=s.offsetHeight,l=o*n-(r?s.scrollTop-this.vs.translate:0);if(r){var p=0;l+o>a?p=l+o-a:l<0&&(p=l),0!==p&&(s.scrollTop+=p),0===s.scrollTop&&0!==this.vs.translate&&(s.scrollTop=this.vs.translate)}else l+o>a+s.scrollTop?s.scrollTop=l+o-a:l<s.scrollTop&&(s.scrollTop-=s.scrollTop-l)}},t.prototype.initState=function(){return{data:{},events:[],syntheticEvent:void 0}},t.prototype.applyState=function(e){var t=this,n={syntheticEvent:e.syntheticEvent,nativeEvent:e.syntheticEvent?e.syntheticEvent.nativeEvent:void 0,target:this};Object.keys(e.data).length>0&&this.setState(e.data),e.events.forEach(function(e){var i=e.type;delete e.type;var o=t.props[i];o&&o.call(void 0,r({},n,e))})},t}(s.Component);I.propTypes={opened:l.bool,delay:l.number,disabled:l.bool,dir:l.string,filterable:l.bool,ignoreCase:l.bool,loading:l.bool,tabIndex:l.number,data:l.array,value:l.oneOfType([l.string,l.number,l.object]),defaultValue:l.oneOfType([l.string,l.number,l.object]),textField:l.string,valueField:l.string,className:l.string,iconClassName:l.string,popupSettings:l.shape({animate:l.bool,width:l.string,height:l.string}),virtual:l.shape({pageSize:l.number.isRequired,skip:l.number.isRequired,total:l.number.isRequired}),onOpen:l.func,onClose:l.func,onFocus:l.func,onBlur:l.func,onChange:l.func,onFilterChange:l.func,onPageChange:l.func},I.defaultProps={delay:500,ignoreCase:!0,tabIndex:0,popupSettings:{animate:!0,height:"200px"}},t.default=I},function(e,n){e.exports=t},function(e,t){e.exports=i},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=n(6),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.focused,i=e.style,o=e.ariaExpanded,a=e.ariaOwns,l=e.ariaActiveDescendant,p=e.tabIndex;return r.createElement("span",{role:"listbox",tabIndex:t?void 0:p,className:s("k-dropdown-wrap",this.props.className,{"k-state-default":!t,"k-state-focused":n,"k-state-disabled":t}),style:i,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onKeyDown:this.props.onKeyDown,onKeyPress:this.props.onKeyPress,onClick:this.props.onClick,"aria-disabled":t||void 0,"aria-haspopup":!0,"aria-expanded":o,"aria-owns":a,"aria-activedescendant":l},this.props.children)},t}(r.Component);t.default=a},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),a=n(4),l=n(9),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.onMouseDown,i=e.onBlur,o=e.width,p=e.popupSettings;return s.createElement(l.Popup,r({style:{width:o},ref:function(e){var t=a.findDOMNode(e);if(t){var n=p.anchor,i=n?getComputedStyle(n).direction:null;i&&t.setAttribute("dir",i)}}},p),s.createElement("div",{onMouseDown:n,onBlur:i},t))},t}(s.Component);t.default=p},function(e,t){e.exports=r},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.componentDidUpdate=function(){this._input&&this.props.focused&&(this.props.willFocus&&this.props.willFocus(),this._input.focus(),this.props.didFocus&&setTimeout(this.props.didFocus,0))},t.prototype.render=function(){var e=this;return r.createElement("span",{className:"k-list-filter"},r.createElement("input",{ref:function(t){e._input=t},value:this.props.value,className:"k-textbox",onChange:this.props.onChange,onKeyDown:this.props.onKeyDown}),r.createElement("span",{className:"k-icon k-i-search"}))},t}(r.Component);t.default=s},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=n(6),a=n(12),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){e.preventDefault()},t.onClick=function(e){e.preventDefault(),t.props.onClick&&t.props.onClick(-1,e)},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.defaultItem,i=e.textField;return r.createElement("div",{onClick:this.onClick,onMouseDown:this.onMouseDown,className:s("k-list-optionlabel",{"k-state-selected":t})},a.getter(n,i)||"")},t}(r.Component);t.default=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.guid=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n};var n=function(e){return null!==e&&void 0!==e};t.isPresent=n;t.getter=function(e,t,i){if(void 0===i&&(i=!1),n(e))return i?t&&n(e[t])?e[t]:e:t?e[t]:e};t.sameCharsOnly=function(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==t)return!1;return!0};t.shuffleData=function(e,t,n){var i=e;return n&&(i=[n].concat(i)),i.slice(t).concat(i.slice(0,t))};t.matchText=function(e,t,i){if(!n(e))return!1;var o=String(e);return i&&(o=o.toLowerCase()),0===o.indexOf(t)}},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=n(14),a=n(12),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.renderItems=function(){var e=this,t=this.props,n=t.textField,i=t.valueField,o=t.value,l=t.selected,p=t.optionPrefix,c=this.props.skip||0;return this.props.data.map(function(t,u){var d=a.getter(t,i),f=c+u;return r.createElement(s.default,{id:p+"-"+(d||f.toString()),dataItem:t,selected:d===o,focused:0===f&&void 0===l,index:f,key:f,onClick:e.props.onClick,textField:n})})},t.prototype.render=function(){var e=this.props,t=e.id,n=e.show,i=e.wrapperCssClass,o=e.wrapperStyle,s=e.listStyle,a=e.listRef,l=this.renderItems();return l.length?r.createElement("div",{className:i,style:o},r.createElement("ul",{id:t,role:"listbox","aria-hidden":!n||void 0,className:"k-list k-reset",ref:a,style:s},l)):r.createElement("div",{className:"k-nodata"},r.createElement("div",null,"NO DATA FOUND."))},t}(r.Component);t.default=l},function(e,t,n){"use strict";var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=n(6),a=n(12),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){e.preventDefault(),t.props.onClick&&t.props.onClick(t.props.index||0,e)},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.selected,i=e.focused,o=e.dataItem,l=e.textField;return r.createElement("li",{id:t,role:"option","aria-selected":n||!1,className:s("k-item",{"k-state-selected":n,"k-state-focused":i}),onClick:this.handleClick},a.getter(o,l))},t}(r.Component);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),o=1533915,r=function(){function e(){var e=this;this.containerHeight=0,this.skip=0,this.total=0,this.enabled=!1,this.pageSize=0,this.itemHeight=0,this.hidden=!1,this.prevScrollPos=0,this.listTranslate=0,this.scrollSyncing=!1,this.calculateScrollSizes=function(){e.scrollSyncing=!0;var t=!1;if(i.isPresent(e.list)){e.itemHeight=e.list?e.list.children[0].offsetHeight:e.itemHeight,e.containerHeight=Math.min(o,e.itemHeight*e.total);var n=e.containerHeight;(t=e.scrollElement.style.height!==n+"px")&&(e.scrollElement.style.height=n+"px")}return e.scrollSyncing=!1,t},this.scrollHandler=this.scrollHandler.bind(this)}return Object.defineProperty(e.prototype,"translate",{get:function(){return this.listTranslate},enumerable:!0,configurable:!0}),e.prototype.changePage=function(e,t){var n=Math.min(Math.max(0,e),this.total-this.pageSize);n!==this.skip&&this.PageChange({skip:n,take:this.pageSize},t)},e.prototype.translateTo=function(e){this.listTranslate=e,this.list&&(this.list.style.transform="translateY("+e+"px)")},e.prototype.reset=function(){this.scrollSyncing=!0,this.container&&(this.container.scrollTop=0),this.translateTo(0),this.scrollSyncing=!1},e.prototype.maxScroll=function(){return this.container.scrollHeight-this.container.offsetHeight},e.prototype.scrollToEnd=function(){if(this.container){var e=this.maxScroll();this.translateTo(e),this.container.scrollTop=e}},e.prototype.localScrollUp=function(e){var t,n=this.itemHeight,i=this.container.scrollTop,o=this.listTranslate,r=i-o;if(!(r>0)){for(t=0;t<this.skip&&!(o+n+r<=i);t++)o-=n;if(o=this.validateTranslate(o),this.skip-t<=0&&o>i)return this.translateTo(0),this.changePage(0,e),void(this.container.scrollTop=0);o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip-t,e))}},e.prototype.localScrollDown=function(e){var t,n=this.itemHeight,i=this.container.scrollTop,o=this.listTranslate,r=this.list.children.length;for(t=0;t<r&&!(o+n>i);t++)o+=n;o=this.validateTranslate(o),t>=r&&this.skip+t>=this.total?(this.translateTo(o),this.changePage(this.total-1,e)):o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip+t,e))},e.prototype.scrollNonStrict=function(e){var t=this.total*this.prevScrollPos/this.containerHeight,n=Math.min(Math.floor(t),this.total-1),i=this.containerHeight*t/this.total;i=this.validateTranslate(i),this.translateTo(i),this.changePage(n,e)},e.prototype.scrollHandler=function(e){if(this.enabled&&this.list&&!this.hidden&&!this.scrollSyncing){var t=this.container.scrollTop,n=this.prevScrollPos;this.prevScrollPos=t,t-n<0&&t>this.listTranslate-this.list.scrollHeight/10?this.localScrollUp(e):t-n>0&&t<this.listTranslate+2*this.list.scrollHeight/3?this.localScrollDown(e):this.scrollNonStrict(e)}},e.prototype.validateTranslate=function(e){return e=Math.max(0,e),e=Math.min(this.containerHeight-this.list.offsetHeight,e)},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o,r=n(12),s=function(){return function(e,t,n){this.index=e,this.event=t,this.action=n}}();t.NavigationEvent=s,(o=i=t.NavigationAction||(t.NavigationAction={}))[o.Undefined=0]="Undefined",o[o.Open=1]="Open",o[o.Close=2]="Close",o[o.Enter=3]="Enter",o[o.Space=4]="Space",o[o.Tab=5]="Tab",o[o.Esc=6]="Esc",o[o.Delete=7]="Delete",o[o.Backspace=8]="Backspace",o[o.Home=9]="Home",o[o.End=10]="End",o[o.Up=11]="Up",o[o.Down=12]="Down",o[o.Left=13]="Left",o[o.Right=14]="Right";var a=function(){function e(e){this.onNavigate=e}return e.prototype.process=function(e){var t=e.event,n=t.keyCode,o=t.altKey,r=e.state,a=void 0,l=i.Undefined;return o&&40===n?l=i.Open:o&&38===n?l=i.Close:13===n?l=i.Enter:32===n?l=i.Space:27===n?l=i.Close:9===n?l=i.Tab:38===n?(a=this.next({current:e.current,min:e.min,max:e.max,step:-1}),l=i.Up):37===n?(a=this.next({current:e.current,min:e.min,max:e.max,step:-1}),l=i.Left):40===n?(a=this.next({current:e.current,min:e.min,max:e.max,step:1}),l=i.Down):39===n?(a=this.next({current:e.current,min:e.min,max:e.max,step:1}),l=i.Right):36===n?(a=0,l=i.Home):35===n?(a=e.max,l=i.End):46===n?l=i.Delete:8===n&&(l=i.Backspace),l!==i.Undefined&&this.onNavigate(new s(a,t,l),r),l},e.prototype.next=function(e){return r.isPresent(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min},e}();t.NavigationService=a}])}}}); |
{ | ||
"name": "@progress/kendo-react-dropdowns", | ||
"version": "0.2.1-dev.201801301153", | ||
"version": "0.3.0-dev.201801301554", | ||
"description": "Kendo UI for React DropDowns package", | ||
@@ -29,3 +29,3 @@ "repository": { | ||
"dependencies": { | ||
"@progress/kendo-react-popup": "0.2.1-dev.201801301153", | ||
"@progress/kendo-react-popup": "0.3.0-dev.201801301554", | ||
"classnames": "^2.1.5", | ||
@@ -32,0 +32,0 @@ "prop-types": "^15.6.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
+ Added@progress/kendo-react-animation@0.3.0-dev.201801301554(transitive)
+ Added@progress/kendo-react-popup@0.3.0-dev.201801301554(transitive)
- Removed@progress/kendo-react-animation@0.2.1-dev.201801301153(transitive)
- Removed@progress/kendo-react-popup@0.2.1-dev.201801301153(transitive)