@progress/kendo-react-dropdowns
Advanced tools
Comparing version 0.3.0-dev.201802021152 to 0.3.0-dev.201802022204
@@ -1,1 +0,1 @@ | ||
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 a(e){return e.__useDefault?e.default:e}return{setters:[function(e){t=a(e)},function(e){n=a(e)},function(e){i=a(e)},function(e){o=a(e)},function(e){r=a(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 a=n(3),s=n(4),l=n(5),p=n(6),c=n(7),u=n(8),d=n(10),h=n(11),f=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)}},O=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}})},D=function(e){function t(t){var n=e.call(this,t)||this;n.valueDuringOnChange=void 0,n.indexDuringOnChange=void 0,n.vs=new v.default,n._valueNotInData=!1,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,a=o.valueField,s=o.textField;n.togglePopup(i);var l=C(r,a),p=k(r,s);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,a=e.keyCode;if(!r&&!(o&&(37===a||39===a||32===a||16===a||36===a||35===a))){var s=n.initState();s.syntheticEvent=e;var 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:s}),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(),n.applyState(s)}},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,r=n.props.data||[],a=void 0!==n.props.value;if(m.isPresent(e))if(o>=0&&o<r.length||-1===o&&n.props.defaultItem){var s=w(n.props,o),l=O(n.props,o),p=n.value;a?(n.valueDuringOnChange=s,n.indexDuringOnChange=e):(n._value=s,n._index=e,n._text=l,t.data.selectedIndex=e),s!==p&&t.events.push({type:"onChange"})}else if(void 0!==n.props.virtual){var c=n._scrollElement,u=n.state.opened&&c,d=n.vs.pageSize;if(u&&0===e)P(t,0,d),n.vs.reset();else if(u&&e===n.vs.total-1)P(t,n.vs.total-n.vs.pageSize,d),n.vs.scrollToEnd();else if(u){var h=n.vs.PageChange;n.vs.PageChange=function(e){P(t,e.skip,e.take)},(e>n.index?n.vs.localScrollDown:n.vs.localScrollUp).call(n.vs,t.syntheticEvent),n.vs.PageChange=h}else if(u||0!==e)if(u||e!==n.vs.total-1){if(!u){var f=Math.max(0,i+(o<0?-1:1));P(t,f,d)}}else P(t,n.vs.total-n.vs.pageSize,d);else P(t,0,d);n.state.opened||n.vs.reset(),n._valueNotInData=!0,a?n.indexDuringOnChange=e:(n._index=e,t.data.selectedIndex=e)}},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.defaultItem,i=e.valueField,o=e.disabled,r=e.tabIndex,s=e.loading,l=e.iconClassName,u=n.state,d=u.opened,h=u.isFocused,f=S(n.props,n.value),v=O(n.props,f);return!v&&m.isPresent(n.value)&&-1===f&&C(t,i)!==n.value&&(v=n._text),a.createElement(c.default,{disabled:o,focused:h,tabIndex:r,ariaExpanded:d||!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}},a.createElement("span",{className:"k-input"},v),a.createElement("span",{className:"k-select"},a.createElement("span",{className:p("k-icon",l,{"k-i-arrow-s":!s&&!l,"k-i-loading":s&&!l})})))},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)},dir:void 0!==n.props.dir?n.props.dir:n._dirCalculated,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 a.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?a.createElement("div",{onScroll:n.vs.scrollHandler,ref:n.scrollerRef,style:{height:(t||{}).height,overflowY:"scroll"}},e):e},n.renderScrollElement=function(){return n.vs.enabled&&a.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,s=e.popupSettings,l=n.state,p=l.opened,c=l.skip,u="translateY("+n.vs.translate+"px)",d=n.value,h=S(n.props,d);return a.createElement(f.default,{id:n.listBoxId,show:p,data:(t||[]).slice(),selected:-1!==h||r?h:void 0,value:d,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:(s||{}).height},wrapperCssClass:n.vs.enabled?void 0:"k-list-scroller",listStyle:n.vs.enabled?{transform:u}:void 0,key:_,skip:c,onClick:n.handleItemClick})},n.renderListFilter=function(){var e=n.props.filterable,t=n.state,i=t.opened,o=t.filterText;return e&&a.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;return i&&a.createElement(h.default,{defaultItem:i,textField:t,selected:-1===n.index,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:s.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),a=o.length,s=n.state.selectedIndex||0;for(n.props.defaultItem&&(i={item:n.props.defaultItem,itemIndex:-1},a+=1,s+=1),s+=r?1:0,o=m.shuffleData(o,s,i),t=0;t<a;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!==a){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),n.state.selectedIndex!==i&&(o.data.selectedIndex=i),n._value=e,n._text=t,n._index=i},n.updateSelectedItem=function(e,t){var i=void 0!==e.value?e.value:n.value,o=S(e,i),r=O(e,o),a=e.defaultItem?C(e.defaultItem,e.valueField):void 0;m.isPresent(i)&&-1===o&&void 0===a||(-1===o&&void 0!==a&&(i=a,r=k(e.defaultItem,n.props.textField)),o=-1!==o?o+(t.data.skip||0):o,n._text=r,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=s.findDOMNode(n._wrapper);setTimeout(function(){e.focus()},0)}};var i=void 0!==t.value?t.value:t.defaultValue,o=-1;return!m.isPresent(i)&&m.isPresent(t.defaultItem)?i=C(t.defaultItem,t.valueField):o=S(t,i),n.state={filterText:"",word:"",last:"",selectedIndex:o,skip:0,isFocused:!1,opened:n.props.opened},n._index=o,n._value=i,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 void 0!==this.valueDuringOnChange?this.valueDuringOnChange:this._value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return void 0!==this.indexDuringOnChange?this.indexDuringOnChange:this._index},enumerable:!0,configurable:!0}),t.prototype.componentWillReceiveProps=function(e){var t=this.initState();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);var n=void 0!==e.value;if(this._valueNotInData&&!n){var i=this.index-(t.data.skip||0);this._value=w(e,i),this._text=O(e,i)}else this.updateSelectedItem(e,t);this._valueNotInData=!1,this.applyState(t)},t.prototype.componentWillUpdate=function(e,t){t.opened&&this.state.selectedIndex!==t.selectedIndex&&this.state.opened&&this.scrollToSelectedItem(t),void 0!==e.value&&void 0===this.value&&(this._value=e.value)},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,a=this.vs.hidden,s=this.state.skip||0;if(o!==r||0===r&&0===o&&s>0){var l=function(){n.vs.enabled=!1;var e=r>0?r:n.vs.itemHeight*s;i.scrollTop=e,n.vs.translateTo(r||e),n.vs.enabled=!0,S(n.props,n.value)>=0&&n.scrollToSelectedItem(n.state)};0===this.vs.itemHeight||a?setTimeout(l,0):l()}}else this.scrollToSelectedItem(this.state)}},t.prototype.componentDidMount=function(){this.element&&(this._dirCalculated=window.getComputedStyle(this.element).direction||void 0)},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 a.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,a=this._scrollElement||t.parentNode,s=a.offsetHeight,l=o*n-(r?a.scrollTop-this.vs.translate:0);if(r){var p=0;l+o>s?p=l+o-s:l<0&&(p=l),0!==p?a.scrollTop+=p:0===a.scrollTop&&0!==this.vs.translate&&(a.scrollTop=this.vs.translate)}else l+o>s+a.scrollTop?a.scrollTop=l+o-s:l<a.scrollTop&&(a.scrollTop-=a.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))}),this.indexDuringOnChange=void 0,this.valueDuringOnChange=void 0},t}(a.Component);D.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},D.defaultProps={delay:500,ignoreCase:!0,tabIndex:0,popupSettings:{animate:!0,height:"200px"}},t.default=D},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),a=n(6),s=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,s=e.ariaOwns,l=e.ariaActiveDescendant,p=e.tabIndex;return r.createElement("span",{role:"listbox",tabIndex:t?void 0:p,className:a("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":s,"aria-activedescendant":l},this.props.children)},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)}),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 a=n(3),s=n(9),l=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,l=e.dir,p=e.popupSettings;return a.createElement(s.Popup,r({style:{width:o,direction:l}},p),a.createElement("div",{onMouseDown:n,onBlur:i},t))},t}(a.Component);t.default=l},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),a=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=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)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=n(6),s=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:a("k-list-optionlabel",{"k-state-selected":t})},s.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),a=n(14),s=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=s.getter(t,i),h=c+u;return r.createElement(a.default,{id:p+"-"+(d||h.toString()),dataItem:t,selected:d===o,focused:0===h&&void 0===l,index:h,key:h,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,a=e.listStyle,s=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:s,style:a},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),a=n(6),s=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:a("k-item",{"k-state-selected":n,"k-state-focused":i}),onClick:this.handleClick},s.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),a=function(){return function(e,t,n){this.index=e,this.event=t,this.action=n}}();t.NavigationEvent=a,(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 s=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,s=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?(s=this.next({current:e.current,min:e.min,max:e.max,step:-1}),l=i.Up):37===n?(s=this.next({current:e.current,min:e.min,max:e.max,step:-1}),l=i.Left):40===n?(s=this.next({current:e.current,min:e.min,max:e.max,step:1}),l=i.Down):39===n?(s=this.next({current:e.current,min:e.min,max:e.max,step:1}),l=i.Right):36===n?(s=0,l=i.Home):35===n?(s=e.max,l=i.End):46===n?l=i.Delete:8===n&&(l=i.Backspace),l!==i.Undefined&&this.onNavigate(new a(s,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=s}])}}}); | ||
System.register("@progress/kendo-react-dropdowns",["react","react-dom","prop-types","classnames","@progress/kendo-react-popup"],function(e){var t,n,i,o,r;function a(e){return e.__useDefault?e.default:e}return{setters:[function(e){t=a(e)},function(e){n=a(e)},function(e){i=a(e)},function(e){o=a(e)},function(e){r=a(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 a=n(3),s=n(4),l=n(5),p=n(6),c=n(7),u=n(8),d=n(10),h=n(11),f=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)}},O=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}})},D=function(e){function t(t){var n=e.call(this,t)||this;n.valueDuringOnChange=void 0,n.indexDuringOnChange=void 0,n.vs=new v.default,n._valueNotInData=!1,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,a=o.valueField,s=o.textField;n.togglePopup(i);var l=C(r,a),p=k(r,s);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,a=e.keyCode;if(!r&&!(o&&(37===a||39===a||32===a||16===a||36===a||35===a))){var s=n.initState();s.syntheticEvent=e;var 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:s}),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(),n.applyState(s)}},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,r=n.props.data||[],a=void 0!==n.props.value;if(m.isPresent(e))if(o>=0&&o<r.length||-1===o&&n.props.defaultItem){var s=w(n.props,o),l=O(n.props,o),p=n.value;a?(n.valueDuringOnChange=s,n.indexDuringOnChange=e):(n._value=s,n._index=e,n._text=l,t.data.selectedIndex=e),s!==p&&t.events.push({type:"onChange"})}else if(void 0!==n.props.virtual){var c=n._scrollElement,u=n.state.opened&&c,d=n.vs.pageSize;if(u&&0===e)P(t,0,d),n.vs.reset();else if(u&&e===n.vs.total-1)P(t,n.vs.total-n.vs.pageSize,d),n.vs.scrollToEnd();else if(u){var h=n.vs.PageChange;n.vs.PageChange=function(e){P(t,e.skip,e.take)},(e>n.index?n.vs.localScrollDown:n.vs.localScrollUp).call(n.vs,t.syntheticEvent),n.vs.PageChange=h}else if(u||0!==e)if(u||e!==n.vs.total-1){if(!u){var f=Math.max(0,i+(o<0?-1:1));P(t,f,d)}}else P(t,n.vs.total-n.vs.pageSize,d);else P(t,0,d);n.state.opened||n.vs.reset(),n._valueNotInData=!0,a?n.indexDuringOnChange=e:(n._index=e,t.data.selectedIndex=e)}},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.defaultItem,i=e.valueField,o=e.disabled,r=e.tabIndex,s=e.loading,l=e.iconClassName,u=n.state,d=u.opened,h=u.isFocused,f=S(n.props,n.value),v=O(n.props,f);return!v&&m.isPresent(n.value)&&-1===f&&C(t,i)!==n.value&&(v=n._text),a.createElement(c.default,{disabled:o,focused:h,tabIndex:r,ariaExpanded:d||!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}},a.createElement("span",{className:"k-input"},v),a.createElement("span",{className:"k-select"},a.createElement("span",{className:p("k-icon",l,{"k-i-arrow-s":!s&&!l,"k-i-loading":s&&!l})})))},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)},dir:void 0!==n.props.dir?n.props.dir:n._dirCalculated,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 a.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?a.createElement("div",{onScroll:n.vs.scrollHandler,ref:n.scrollerRef,style:{height:(t||{}).height,overflowY:"scroll"}},e):e},n.renderScrollElement=function(){return n.vs.enabled&&a.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,s=e.popupSettings,l=n.state,p=l.opened,c=l.skip,u="translateY("+n.vs.translate+"px)",d=n.value,h=S(n.props,d);return a.createElement(f.default,{id:n.listBoxId,show:p,data:(t||[]).slice(),selected:-1!==h||r?h:void 0,value:d,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:(s||{}).height},wrapperCssClass:n.vs.enabled?void 0:"k-list-scroller",listStyle:n.vs.enabled?{transform:u}:void 0,key:_,skip:c,onClick:n.handleItemClick})},n.renderListFilter=function(){var e=n.props.filterable,t=n.state,i=t.opened,o=t.filterText;return e&&a.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;return i&&a.createElement(h.default,{defaultItem:i,textField:t,selected:-1===n.index,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:s.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),a=o.length,s=n.state.selectedIndex||0;for(n.props.defaultItem&&(i={item:n.props.defaultItem,itemIndex:-1},a+=1,s+=1),s+=r?1:0,o=m.shuffleData(o,s,i),t=0;t<a;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!==a){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),n.state.selectedIndex!==i&&(o.data.selectedIndex=i),n._value=e,n._text=t,n._index=i},n.updateSelectedItem=function(e,t){var i=void 0!==e.value?e.value:n.value,o=S(e,i),r=O(e,o),a=e.defaultItem?C(e.defaultItem,e.valueField):void 0;m.isPresent(i)&&-1===o&&void 0===a||(-1===o&&void 0!==a&&(i=a,r=k(e.defaultItem,n.props.textField)),o=-1!==o?o+(t.data.skip||0):o,n._text=r,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=s.findDOMNode(n._wrapper);setTimeout(function(){e.focus()},0)}};var i=void 0!==t.value?t.value:t.defaultValue,o=-1;return!m.isPresent(i)&&m.isPresent(t.defaultItem)?i=C(t.defaultItem,t.valueField):o=S(t,i),n.state={filterText:"",word:"",last:"",selectedIndex:o,skip:0,isFocused:!1,opened:n.props.opened},n._index=o,n._value=i,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 void 0!==this.valueDuringOnChange?this.valueDuringOnChange:this._value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return void 0!==this.indexDuringOnChange?this.indexDuringOnChange:this._index},enumerable:!0,configurable:!0}),t.prototype.componentWillReceiveProps=function(e){var t=this.initState();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);var n=void 0!==e.value;if(this._valueNotInData&&!n){var i=this.index-(t.data.skip||0);this._value=w(e,i),this._text=O(e,i)}else this.updateSelectedItem(e,t);this._valueNotInData=!1,this.applyState(t)},t.prototype.componentWillUpdate=function(e,t){t.opened&&this.state.selectedIndex!==t.selectedIndex&&this.state.opened&&this.scrollToSelectedItem(t),void 0!==e.value&&void 0===this.value&&(this._value=e.value)},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,a=this.vs.hidden,s=this.state.skip||0;if(o!==r||0===r&&0===o&&s>0){var l=function(){n.vs.enabled=!1;var e=r>0?r:n.vs.itemHeight*s;i.scrollTop=e,n.vs.translateTo(r||e),n.vs.enabled=!0,S(n.props,n.value)>=0&&n.scrollToSelectedItem(n.state)};0===this.vs.itemHeight||a?setTimeout(l,0):l()}}else this.scrollToSelectedItem(this.state)}},t.prototype.componentDidMount=function(){this.element&&(this._dirCalculated=window.getComputedStyle(this.element).direction||void 0)},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 a.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,a=this._scrollElement||t.parentNode,s=a.offsetHeight,l=o*n-(r?a.scrollTop-this.vs.translate:0);if(r){var p=0;l+o>s?p=l+o-s:l<0&&(p=l),0!==p?a.scrollTop+=p:0===a.scrollTop&&0!==this.vs.translate&&(a.scrollTop=this.vs.translate)}else l+o>s+a.scrollTop?a.scrollTop=l+o-s:l<a.scrollTop&&(a.scrollTop-=a.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))}),this.indexDuringOnChange=void 0,this.valueDuringOnChange=void 0},t}(a.Component);D.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},D.defaultProps={delay:500,ignoreCase:!0,tabIndex:0,popupSettings:{animate:!0,height:"200px"}},t.default=D},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=i},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),a=n(6),s=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,s=e.ariaOwns,l=e.ariaActiveDescendant,p=e.tabIndex;return r.createElement("span",{role:"listbox",tabIndex:t?void 0:p,className:a("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":s,"aria-activedescendant":l},this.props.children)},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)}),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 a=n(3),s=n(9),l=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,l=e.dir,p=e.popupSettings;return a.createElement(s.Popup,r({style:{width:o,direction:l}},p),a.createElement("div",{onMouseDown:n,onBlur:i},t))},t}(a.Component);t.default=l},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),a=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=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)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=n(6),s=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:a("k-list-optionlabel",{"k-state-selected":t})},s.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),a=n(14),s=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=s.getter(t,i),h=c+u;return r.createElement(a.default,{id:p+"-"+(d||h.toString()),dataItem:t,selected:d===o,focused:0===h&&void 0===l,index:h,key:h,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,a=e.listStyle,s=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:s,style:a},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),a=n(6),s=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:a("k-item",{"k-state-selected":n,"k-state-focused":i}),onClick:this.handleClick},s.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),a=function(){return function(e,t,n){this.index=e,this.event=t,this.action=n}}();t.NavigationEvent=a,(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 s=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,s=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?(s=this.next({current:e.current,min:e.min,max:e.max,step:-1}),l=i.Up):37===n?(s=this.next({current:e.current,min:e.min,max:e.max,step:-1}),l=i.Left):40===n?(s=this.next({current:e.current,min:e.min,max:e.max,step:1}),l=i.Down):39===n?(s=this.next({current:e.current,min:e.min,max:e.max,step:1}),l=i.Right):36===n?(s=0,l=i.Home):35===n?(s=e.max,l=i.End):46===n?l=i.Delete:8===n&&(l=i.Backspace),l!==i.Undefined&&this.onNavigate(new a(s,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=s}])}}}); |
{ | ||
"name": "@progress/kendo-react-dropdowns", | ||
"version": "0.3.0-dev.201802021152", | ||
"version": "0.3.0-dev.201802022204", | ||
"description": "Kendo UI for React DropDowns package", | ||
@@ -29,3 +29,3 @@ "repository": { | ||
"dependencies": { | ||
"@progress/kendo-react-popup": "0.3.0-dev.201802021152", | ||
"@progress/kendo-react-popup": "0.3.0-dev.201802022204", | ||
"classnames": "^2.1.5", | ||
@@ -32,0 +32,0 @@ "prop-types": "^15.6.0" |
Sorry, the diff of this file is too big to display
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
388090
4567
+ Added@progress/kendo-react-animation@0.3.0-dev.201802022204(transitive)
+ Added@progress/kendo-react-popup@0.3.0-dev.201802022204(transitive)
- Removed@progress/kendo-react-animation@0.3.0-dev.201802021152(transitive)
- Removed@progress/kendo-react-popup@0.3.0-dev.201802021152(transitive)