@progress/kendo-react-dropdowns 12.2.0-develop.4 → 12.2.0-develop.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-labels"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-treeview")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-labels","@progress/kendo-svg-icons","@progress/kendo-react-popup","@progress/kendo-react-inputs","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-react-layout","@progress/kendo-react-treeview"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactDropdowns={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactLabels,e.KendoSvgIcons,e.KendoReactPopup,e.KendoReactInputs,e.KendoReactIntl,e.KendoReactButtons,e.KendoReactLayout,e.KendoReactTreeview)}(this,(function(e,t,s,i,n,a,o,l,r,d,u,p){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var h=c(t);const g=e=>{const{children:t,width:s,dir:n,itemsCount:a,popupSettings:l}=e,r=h.useContext(i.ZIndexContext),d=r?r+2e3:12e3;return h.createElement(i.ZIndexContext.Provider,{value:d},h.createElement(o.Popup,{style:{width:s,direction:n},contentKey:a&&a.join(),...l},t))},v=h.forwardRef(((e,t)=>{const s=h.useRef(null),{renderListFilterWrapper:n=!1,renderPrefixSeparator:o=!1,placeholder:r,...d}=e,u=i.useUnstyled(),p=u&&u.uDropDownsBase;h.useImperativeHandle(t,(()=>s.current));const c=h.createElement(l.TextBox,{...d,ref:s,className:i.classNames(i.uDropDownsBase.searchbox({c:p})),value:e.value||"",onChange:e.onChange,onKeyDown:e.onKeyDown,tabIndex:e.tabIndex,onClick:e=>e.stopPropagation(),size:e.size,fillMode:e.fillMode,rounded:e.rounded,prefix:()=>h.createElement(h.Fragment,null,h.createElement(l.InputPrefix,null,h.createElement(i.IconWrap,{name:"search",icon:a.searchIcon,className:i.classNames(i.uDropDownsBase.inputIcon({c:p}))})),o&&h.createElement(l.InputSeparator,null)),placeholder:r});return n?h.createElement("div",{className:i.classNames(i.uDropDownsBase.listFilter({c:p}))}," ",c," "):c}));v.propTypes={value:s.oneOfType([s.string,s.number,s.array]),tabIndex:s.number,onChange:s.func,onKeyDown:s.func,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"solid","flat","outline"]),renderListFilterWrapper:s.bool,placeholder:s.string,renderPrefixSeparator:s.bool},v.displayName="KendoReactListFilter";const m=e=>{const{group:t,groupMode:s,render:n}=e,a=i.useUnstyled(),o=a&&a.uDropDownsBase,l=h.createElement("div",{className:i.classNames(i.uDropDownsBase.groupStickyHeader({c:o}))},"classic"===s?t:h.createElement("div",{className:i.classNames(i.uDropDownsBase.listHeaderText({c:o}))},t));return void 0!==n?n.call(void 0,l,e):l},f=e=>null!=e,b=(e,t,s)=>{if(!f(e))return!1;let i=String(e);return s&&(i=i.toLowerCase()),0===i.indexOf(t)},y=(e,t,s,i,n)=>{const a=e.offsetHeight,o=t.children.item(s),l=o.offsetTop+(n?i-e.scrollTop:0),r=o.offsetHeight;if(n){let t=0;l+r>a?t=l+r-a:l<0&&(t=l),0!==t?e.scrollTop+=t:0===e.scrollTop&&0!==i&&(e.scrollTop=i)}else l+r>a+e.scrollTop?e.scrollTop=l+r-a:l<e.scrollTop&&(e.scrollTop-=e.scrollTop-l)},C=(e,t,s)=>{let i=-1;if(t){t=t.toLowerCase();for(let n=0;n<e.length;n++){const a=(I(e[n],s)||"")+"";if(a&&a.toLowerCase().startsWith(t)){i=n;break}}}return i},x=(e,t,s,i=!1)=>{const n=e=>i?e:e.toLowerCase();return e.findIndex((e=>s?n(I(e,s))===n(t):n(t)===n(e.toString())))},I=(e,t)=>{if(t&&f(e)){const s=t.split(".");let i=e;return s.forEach((e=>{i=i?i[e]:void 0})),i}return e},k=(e,t,s)=>{t.forEach((t=>{const i=e.findIndex((e=>w(e,t,s)));-1!==i&&e.splice(i,1)}))},w=(e,t,s)=>e===t||f(e)===f(t)&&I(e,s)===I(t,s),S=(e,t,s)=>{if(t){const i=x(e,t,s,!0);return-1!==i?e[i]:e[C(e,t,s)]}return e[0]},E=e=>{"INPUT"!==e.target.nodeName&&e.preventDefault()},D=(e,t,s)=>!!e==!!t&&e.text===t.text&&(e===t||((e=[],t=[],s)=>{if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!w(e[i],t[i],s))return!1;return!0})(e.data,t.data,s)),F=e=>{const{data:t=[],groupField:s}=e;return s?t.filter((e=>s&&void 0!==e[s])):t},M=e=>e.preventDefault(),K=e=>{const{selected:t,defaultItem:s,textField:n}=e,a=i.useUnstyled(),o=a&&a.uDropDownsBase;return h.createElement("div",{onClick:e.onClick,onMouseDown:M,style:{position:"unset"},className:i.classNames(i.uDropDownsBase.optionLabel({c:o,selected:t}))},I(s,n)||"")},N=e=>{const{selected:t,group:s,dataItem:n,virtual:a,groupMode:o,disabled:l,id:r,focused:d,render:u}=e,p=i.useUnstyled(),c=p&&p.uDropDownsBase,g=h.createElement("li",{id:r,role:"option","aria-selected":t,"aria-disabled":!!l||void 0,className:i.classNames(i.uDropDownsBase.li({c:c,selected:t,focused:d,first:!!s&&"classic"===o,disabled:l})),onClick:t=>e.onClick(e.index,t),style:{position:a?"relative":"unset"}},h.createElement("span",{className:i.classNames(i.uDropDownsBase.itemText({c:c}))},I(n,e.textField).toString()),void 0!==s&&"classic"===o?h.createElement("div",{className:i.classNames(i.uDropDownsBase.itemGroupLabel({c:c}))},s):null);return void 0!==u?u.call(void 0,g,e):g},T=e=>{const{group:t,virtual:s,render:n,isMultiColumn:a=!1,id:o}=e,l=i.useUnstyled(),r=l&&l.uDropDownsBase,d=h.createElement("li",{id:o,role:"group",className:i.classNames(i.uDropDownsBase.groupLi({c:r,isMultiColumn:a})),style:a?{boxSizing:"inherit",position:s?"relative":"unset"}:{position:s?"relative":"unset"}},h.createElement("span",{className:n?void 0:i.classNames(i.uDropDownsBase.groupItemText({c:r,isMultiColumn:a}))},t));return void 0!==n?n.call(void 0,d,e):d},P="dropdowns.nodata",O="dropdowns.clear",R="dropdowns.comboArrowBtnAriaLabelExpand",B="dropdowns.comboArrowBtnAriaLabelCollapse",L="dropdowns.dropDownListArrowBtnAriaLabel",_="dropdowns.dropDownListAdaptiveFilterPlaceholder",z={[O]:"clear",[P]:"NO DATA FOUND.",[R]:"expand combobox",[B]:"collapse combobox",[L]:"select",[_]:"Filter","dropdowns.apply":"Apply","dropdowns.cancel":"Cancel"},H=e=>{const t=r.useLocalization(),s=i.useUnstyled(),n=s&&s.uDropDownsBase,{id:a,show:o,wrapperCssClass:l,wrapperStyle:d,listStyle:u,listRef:p,wrapperRef:c,listClassName:g,ariaSetSize:v}=e,m=(()=>{const{textField:t,valueField:s,groupField:i,groupMode:n,isMultiColumn:a,optionsGuid:o,skip:l=0,virtual:r,focusedIndex:d,hasDuplicates:u,highlightSelected:p=!0,value:c,data:g,itemRender:v,groupHeaderItemRender:m}=e,f=Array.isArray(c);let b=0;return g.map(((y,C)=>{const x=l+C,k=l+C+b,S=u?!!c&&d===C:!y.disabled&&(p&&(!f&&w(y,c,s)||f&&-1!==c.findIndex((e=>w(e,y,s)))));let E,D,F;C>0&&void 0!==i&&(D=I(y,i),F=I(g[C-1],i),D&&F&&D!==F&&(E=D));const M=void 0!==E&&"modern"===n;return M?b+=1:b=0,[M&&h.createElement(T,{id:`option-${o}-${k}`,virtual:r,key:x+"-group-item",group:E,isMultiColumn:a,render:m}),h.createElement(N,{id:`option-${o}-${M?k+1:k}`,virtual:r,dataItem:y,groupMode:n,selected:S,focused:d===C,index:x,key:x,onClick:e.onClick,textField:t,group:E,render:v,disabled:y.disabled})]}))})();return m.length?h.createElement("div",{className:l,style:d,ref:c,onMouseDown:e.onMouseDown,onBlur:e.onBlur,onScroll:e.onScroll,unselectable:"on"},h.createElement("ul",{id:a,role:"listbox","aria-hidden":!o||void 0,"aria-setsize":v,className:g||i.classNames(i.uDropDownsBase.ul({c:n})),ref:p,style:u},m),e.scroller&&h.createElement("div",{className:i.classNames(i.uDropDownsBase.heightContainer({c:n}))},e.scroller)):(()=>{const s=e.noDataRender,a=h.createElement("div",{className:i.classNames(i.uDropDownsBase.noData({c:n}))},h.createElement("div",null,t.toLanguageString(P,z[P])));return s?s.call(void 0,a):a})()},V="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent);class q{constructor(){this.table=null,this.total=0,this.enabled=!1,this.skip=0,this.pageSize=0,this.PageChange=null,this.scrollElement=null,this.listTransform="",this.itemHeight=0,this.containerHeight=0,this.reactVersion=Number.parseFloat(h.version),this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.listTranslate=0,this.list=null,this.container=null,this.calcScrollElementHeight=()=>{var e;this.scrollSyncing=!0;let t=!1;this.itemHeight=this.list?this.list.children[0].offsetHeight:this.itemHeight;const s=this.itemHeight*this.total-((null==(e=this.list)?void 0:e.offsetHeight)||0);this.containerHeight=V?Math.min(17895697,s):s;const i=this.containerHeight;return this.scrollElement&&(t=this.scrollElement.style.height!==i+"px",t&&(this.scrollElement.style.height=i+"px")),this.scrollSyncing=!1,t},this.scrollerRef=e=>{this.container=e,e&&(e.setAttribute("unselectable","on"),window.setTimeout(this.calcScrollElementHeight.bind(this),0))},this.getRowHeightService=i.memoizeOne(((e,t)=>new i.RowHeightService(t,e))),this.firstLoaded=this.pageSize,this.lastLoaded=this.skip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get translate(){return this.listTranslate}translateTo(e,t){this.listTranslate=e,this.enabled&&this.list&&(V||this.reactVersion<=17||t?this.list.style.transform="translateY("+e+"px)":this.listTransform="translateY("+e+"px)")}changePage(e,t){const s=Math.min(Math.max(0,e),this.total-this.pageSize);s!==this.skip&&this.PageChange&&this.PageChange({skip:s,take:this.pageSize},t)}reset(){this.container&&(this.calcScrollElementHeight(),this.container.scrollTop=0,this.translateTo(0,!0))}scrollToEnd(){if(this.container&&this.list){this.calcScrollElementHeight();const{scrollHeight:e,offsetHeight:t}=this.container;this.container.scrollTop=e,this.translateTo(e-t,!0)}}scrollHandler(e){if(!this.enabled||!this.container||!this.list)return;if(this.scrollSyncing)return void(this.scrollSyncing=!1);this.rowHeightService=this.getRowHeightService(this.itemHeight,this.total);const t=this.container.scrollTop,s=this.lastScrollTop>=t,i=!s,n=Math.abs(t-this.lastScrollTop);this.lastScrollTop=t;let a=this.rowHeightService.index(t),o=this.rowHeightService.offset(a);const{offsetHeight:l}=this.container,r=this.rowHeightService.index(t+l);if(i&&r>=this.lastLoaded&&this.lastLoaded<this.total){const t=a+this.pageSize-this.total;t>0&&(a-=t,o=this.rowHeightService.offset(a)),this.firstLoaded=a,this.translateTo(o);const s=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(s,this.total),this.changePage(this.firstLoaded,e)}else if(s&&a-1<=this.firstLoaded){const t=n===this.itemHeight;if(0===this.skip&&t)this.lastScrollTop=0,this.firstLoaded=0,this.lastLoaded=this.pageSize,this.container.scrollTop=0,this.translateTo(0,!0);else{const t=Math.floor(.3*this.pageSize);this.firstLoaded=Math.max(a-t,0),this.translateTo(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,e)}}}}class W{navigate(e){const t=e.keyCode;return t===i.Keys.up||t===i.Keys.left?this.next({current:e.current,min:e.min,max:e.max,step:e.skipItems?e.skipItems:-1}):t===i.Keys.down||t===i.Keys.right?this.next({current:e.current,min:e.min,max:e.max,step:e.skipItems?e.skipItems:1}):t===i.Keys.home?0:t===i.Keys.end?e.max:void 0}next(e){return f(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min}}const A=class e{constructor(e){this.wrapper=null,this.list=null,this.vs=new q,this.navigation=new W,this.handleItemClick=(e,t)=>{const s=this.initState();s.syntheticEvent=t,t.stopPropagation(),this.component.handleItemSelect(e,s),this.togglePopup(s),this.applyState(s)},this.handleFocus=e=>{if(!this.component.state.focused){const t=this.initState();t.data.focused=!0,t.events.push({type:"onFocus"}),t.syntheticEvent=e,this.applyState(t)}},this.filterChanged=(e,t)=>{const{textField:s,filterable:i}=this.component.props;i&&t.events.push({type:"onFilterChange",filter:{field:s,operator:"contains",ignoreCase:!0,value:e}})},this.togglePopup=e=>{const t=this.component.props,s=void 0!==t.opened?t.opened:this.component.state.opened;void 0===t.opened&&(e.data.opened=!s),s?e.events.push({type:"onClose"}):(e.events.push({type:"onOpen"}),this.calculatePopupWidth())},this.pageChange=(e,t)=>{const s=this.initState();s.syntheticEvent=t,this.triggerOnPageChange(s,e.skip,e.take),this.applyState(s)},this.scrollToVirtualItem=(e,t)=>{const s=this.vs;if(0===e.skip)s.reset();else{let i=s.translate;0===i&&(s.calcScrollElementHeight(),i=s.itemHeight*e.skip,s.translateTo(i,!0)),t<0&&i>0&&(i+=s.itemHeight*(e.pageSize/4)),s.container&&(s.container.scrollTop=i),this.scrollToItem(t,!0)}},this.scrollPopupByPageSize=e=>{var t,s,i,n,a,o;const l=this.vs,r=null==(s=null==(t=this.list)?void 0:t.parentElement)?void 0:s.scrollTop,d=l.enabled&&l.itemHeight?l.itemHeight:this.list?this.list.children[0].offsetHeight:0,u=null==(n=null==(i=this.list)?void 0:i.parentElement)?void 0:n.offsetHeight;void 0!==r&&void 0!==u&&(null==(o=null==(a=this.list)?void 0:a.parentElement)||o.scroll({top:r+e*Math.floor(u/d)*d}))},this.renderScrollElement=()=>{const e=this.vs;return e.enabled&&h.createElement("div",{ref:t=>{e.scrollElement=t},key:"scrollElementKey"})},this.resetGroupStickyHeader=(e,t)=>{e!==t.state.group&&t.setState({group:e})},this.listBoxId=e.props.id+"list",this.guid=e.props.id,this.component=e,this.vs.PageChange=this.pageChange}didUpdate(){this.vs.listTransform&&this.vs.list&&(this.vs.list.style.transform=this.vs.listTransform,this.vs.listTransform="")}didMount(){const e=this.component.props,t=e.popupSettings||{},s=e.style||{},i=t.width;let n=!0===e.opened;void 0===i&&this.calculatePopupWidth(),void 0===e.dir&&void 0===s.direction&&(this.calculateDir(),n=!0),n&&this.component.forceUpdate()}calculateDir(){const e=this.component.element;e&&e.ownerDocument&&e.ownerDocument.defaultView&&(this.dirCalculated=e.ownerDocument.defaultView.getComputedStyle(e).direction||void 0)}calculatePopupWidth(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")}scrollToItem(e,t,s){const i=this.list||this.vs.list;if(!i&&!s&&setTimeout((()=>{this.scrollToItem(e,t,!0)}),10),0===e&&t&&0===this.vs.skip)this.vs.reset();else if(i&&e>=0){const s=this.vs,n=s.container||i.parentNode,a=void 0!==t?t:s.enabled;y(n,i,e,s.translate,a)}}updateComponentArgs(e){for(let t in e)Object.hasOwnProperty.call(e,t)&&(this.component[t]=e[t])}initState(){return{data:{},events:[],syntheticEvent:void 0}}applyState(e){Object.keys(e.data).length>0&&this.component.setState(e.data);const t={syntheticEvent:e.syntheticEvent,nativeEvent:e.syntheticEvent?e.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};e.events.forEach((e=>{const s=e.type;delete e.type;const i=s&&this.component.props[s];i&&i.call(void 0,{...t,...e})}))}triggerOnPageChange(e,t,s){const i=this.component.props.virtual;if(i){const n=Math.min(Math.max(0,t),Math.max(0,i.total-s));n!==i.skip&&e.events.push({type:"onPageChange",page:{skip:n,take:s}})}}triggerPageChangeCornerItems(e,t){const s=this.component.props,{data:i=[],dataItemKey:n,virtual:a}=s,o=void 0!==s.opened?s.opened:this.component.state.opened;e&&a&&this.vs.enabled&&(a.skip>0&&w(e,i[0],n)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!o&&a.skip+a.pageSize<a.total&&w(e,i[i.length-1],n)&&this.triggerOnPageChange(t,a.skip+1,a.pageSize))}getPopupSettings(){return Object.assign({},e.defaultProps.popupSettings,this.component.props.popupSettings)}getAdaptiveAnimation(){const e=this.getPopupSettings();return void 0===e.animate||e.animate}getGroupedDataModernMode(e,t){const s=[];return e.forEach(((i,n)=>{e[n-1]&&i[t]!==e[n-1][t]&&s.push({[t]:i[t]}),s.push(e[n])})),s}};A.basicPropTypes={opened:s.bool,disabled:s.bool,dir:s.string,tabIndex:s.number,accessKey:s.string,data:s.array,textField:s.string,className:s.string,label:s.string,loading:s.bool,popupSettings:s.shape({animate:s.oneOfType([s.bool,s.shape({openDuration:s.number,closeDuration:s.number})]),popupClass:s.string,className:s.string,appendTo:s.any,width:s.oneOfType([s.string,s.number]),height:s.oneOfType([s.string,s.number])}),onOpen:s.func,onClose:s.func,onFocus:s.func,onBlur:s.func,onChange:s.func,itemRender:s.func,listNoDataRender:s.func,focusedItemIndex:s.func,header:s.node,footer:s.node},A.propTypes={...A.basicPropTypes,value:s.any,defaultValue:s.any,filterable:s.bool,filter:s.string,virtual:s.shape({pageSize:s.number.isRequired,skip:s.number.isRequired,total:s.number.isRequired}),onFilterChange:s.func,onPageChange:s.func},A.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0};let U=A;const $=Object.freeze({name:"@progress/kendo-react-dropdowns",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1654528156,version:"12.2.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}),G=e=>{const{footer:t,windowWidth:s=0,mobileFilter:n,children:o,navigatable:l,navigatableElements:r,expand:p,animation:c,title:g,subTitle:v,onClose:m}=e,f=i.useAdaptiveModeContext(),b={navigatable:l||!1,navigatableElements:r||[],expand:p,animation:!1!==c,suffixActions:h.createElement(d.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",size:"large",themeColor:"primary",svgIcon:a.checkIcon,onClick:m}),filter:n,onClose:m,animationStyles:f&&s<=f.small?{top:0,width:"100%",height:"100%"}:void 0,title:g,subTitle:v,className:"k-adaptive-actionsheet",position:f&&s<=f.small?"fullscreen":void 0};return h.createElement(u.ActionSheet,{...b},o,t&&h.createElement(u.ActionSheetFooter,{className:"k-actions k-actions-stretched"},h.createElement(d.Button,{size:"large",tabIndex:0,"aria-label":t.cancelText,"aria-disabled":"false",type:"button",onClick:t.onCancel},t.cancelText),h.createElement(d.Button,{tabIndex:0,themeColor:"primary",size:"large","aria-label":t.applyText,"aria-disabled":"false",type:"button",onClick:t.onApply},t.applyText)))},j=h.forwardRef(((e,t)=>{let s=!1;const o=i.getLicenseMessage($),l=i.usePropsContext(Z,e),{delay:p=Y.delay,tabIndex:c=Y.tabIndex,ignoreCase:y=Y.ignoreCase,size:x=Y.size,rounded:k=Y.rounded,fillMode:S=Y.fillMode,groupMode:E=Y.groupMode}=l;if(l.filterable||l.virtual){const e=[];l.filterable&&e.push("filterable"),l.virtual&&e.push("virtualization"),s=!i.validatePackage($,{component:"DropDownList",features:e})}const D=i.useUnstyled(),M=i.useId(l.id),N=()=>{var e;if(i.canUseDOM)return(null==(e=me.current)?void 0:e.ownerDocument)||window.document},T=()=>{var e,t;null!=(e=null==De?void 0:De.current)&&e.wrapper&&(null==(t=null==De?void 0:De.current)||t.wrapper.focus({preventScroll:!0}))},P=()=>{let e;return void 0!==Ie.current&&null!==Ie.current?e=Ie.current:void 0!==l.value?e=l.value:void 0!==Ke.value&&null!==Ke.value?e=Ke.value:void 0!==l.defaultValue&&null!==l.defaultValue&&(e=l.defaultValue),!f(e)&&void 0!==l.defaultItem&&null!==l.defaultItem&&(e=l.defaultItem),e},O=()=>void 0!==l.required?l.required:Y.required,R=()=>{const e=void 0!==l.validationMessage,t=P(),s=!O()||null!==t&&""!==t&&void 0!==t;return{customError:e,valid:void 0!==l.valid?l.valid:s,valueMissing:null===t}},B=e=>{xe.current=!0,e.focus(),window.setTimeout((()=>xe.current=!1),30)},V=()=>{be.current&&B(be.current),l.adaptive&&setTimeout((()=>{be.current&&B(be.current)}),300)},q=h.useCallback((e=>{for(const t of e)Pe(t.target.clientWidth)}),[]),W=()=>{var e;null!=(e=fe.current)&&e.setCustomValidity&&fe.current.setCustomValidity(R().valid?"":l.validationMessage||"Please select a value from the list!")},A=(e,t)=>{const s=P();w(s,e,l.dataItemKey)||(void 0===l.value&&(t.data.value=e),De.current.updateComponentArgs({value:e}),Ie.current=e,t.events.push({type:"onChange"}))},j=e=>{var t;null==(t=null==De?void 0:De.current)||t.applyState(e),Ie.current=void 0},J=(e,t)=>{var s;const{virtual:i,dataItemKey:n,defaultItem:a}=l,o=F(l),r=i?i.skip:0,d=P(),u=-1===e&&void 0!==a?a:o[e-r],p=!w(u,d,n);A(u,t),p&&(null==(s=null==De?void 0:De.current)||s.triggerPageChangeCornerItems(u,t))},Q=(e,t,s)=>{var i,n;const{defaultItem:a,dataItemKey:o,virtual:r={skip:0,total:0,pageSize:0}}=l,d=P(),u=F(l),p=null==(i=null==De?void 0:De.current)?void 0:i.vs,c=u.findIndex((e=>w(e,d,o))),h=null==(n=null==De?void 0:De.current)?void 0:n.navigation.navigate({current:r.skip+c,max:(null!=p&&p.enabled?r.total:u.length)-1,min:void 0!==a?-1:0,keyCode:t,skipItems:s||void 0});void 0!==h&&J(h,e),j(e)},X=()=>{const{textField:e,dataItemKey:t,virtual:s={skip:0},focusedItemIndex:i=C,filterable:n,skipDisabledItems:a=!0}=l,o=P(),r=F(l),d=l.filter?l.filter:Ke.text;return a&&e&&!d&&!o?r.findIndex((t=>!t.disabled&&t[e])):f(o)&&void 0===d||n&&""===d?r.findIndex((e=>w(e,o,t))):d?we.current?i(r,d,e):r.findIndex((e=>w(e,o,t))):0===s.skip?0:-1},ee=(e,t)=>void 0!==t&&-1!==t&&e&&e.length>0&&e[t].disabled,te=()=>{const e=F(l),t=De.current.initState(),s=X();ee(e,s)&&(A(null,t),j(t))},se=e=>{if(e.isPropagationStopped())return;const t=De.current.initState();t.syntheticEvent=e,Ke.focused||(t.data.focused=!0),te(),De.current.togglePopup(t),j(t)},ie=e=>{var t,s,n,a,o,r,d;e&&e.target instanceof Element&&"INPUT"===e.target.nodeName&&e.stopPropagation&&e.stopPropagation();const{filterable:u,disabled:p,defaultItem:c,leftRightKeysNavigation:h=!0,virtual:g={skip:0,total:0,pageSize:0},dataItemKey:v,groupField:m="",textField:f,skipDisabledItems:b=!0}=l,y=F(l),C=P(),x=y.findIndex((e=>w(e,C,v))),I=void 0!==l.opened?l.opened:Ke.opened,k=e.keyCode,S=k===i.Keys.home||k===i.Keys.end,E=k===i.Keys.up||k===i.Keys.down,D=!I&&(e.altKey&&k===i.Keys.down||k===i.Keys.enter||k===i.Keys.space),M=I&&(e.altKey&&k===i.Keys.up||k===i.Keys.esc),K=h&&(k===i.Keys.left||k===i.Keys.right),N=E||K&&!u||S,T=De.current.initState();if(T.syntheticEvent=e,!p){if(S&&null!=(t=null==De?void 0:De.current)&&t.vs.enabled)k===i.Keys.home?0!==g.skip?(null==(s=null==De?void 0:De.current)||s.triggerOnPageChange(T,0,g.pageSize),ke.current=!0):A(y[0],T):g.skip<g.total-g.pageSize?(null==(n=null==De?void 0:De.current)||n.triggerOnPageChange(T,g.total-g.pageSize,g.pageSize),ke.current=!0):A(y[y.length-1],T);else if(I&&k===i.Keys.pageUp)e.preventDefault(),null==(a=null==De?void 0:De.current)||a.scrollPopupByPageSize(-1);else if(I&&k===i.Keys.pageDown)e.preventDefault(),null==(o=null==De?void 0:De.current)||o.scrollPopupByPageSize(1);else if(I&&k===i.Keys.enter){const t=X();ee(y,t)?(A(null,T),j(T)):J(t,T),null==(r=null==De?void 0:De.current)||r.togglePopup(T),e.preventDefault()}else if(D||M)M&&te(),null==(d=null==De?void 0:De.current)||d.togglePopup(T),e.preventDefault();else if(N){if(we.current=!1,""!==m&&f)if(!b&&I)Q(T,k);else{let e;if(k===i.Keys.down||k===i.Keys.right){const t=y.slice(x+1).find((e=>!e.disabled&&e[f]));e=t&&y.findIndex((e=>e[f]===t[f]))}else if(k===i.Keys.up||k===i.Keys.left){let t;if(0===x&&c)e=-1;else if(-1===x)t=y,e=y.findIndex((e=>!e.disabled&&e[f]));else{t=y.slice(0,x);let s=t.pop();for(;s&&s.disabled;)s=t.pop();e=s&&y.findIndex((e=>e[f]===s[f]))}}if(void 0!==e){Q(T,k,e-x)}else void 0===e&&y.findIndex((e=>e[f]===C[f]))===y.length-1&&Q(T,k)}else if(!b&&I||S)Q(T,k);else if(f){let e;if(k===i.Keys.down||k===i.Keys.right){const t=y.slice(x+1).find((e=>!e.disabled&&e[f]));e=t&&y.findIndex((e=>e[f]===t[f]))}else if(k===i.Keys.up||k===i.Keys.left){let t;if(0===x&&c)e=-1;else if(-1===x)t=y,e=y.find((e=>!e.disabled&&e[f]));else{t=y.slice(0,x);let s=t.pop();for(;s&&s.disabled;)s=t.pop();e=s&&y.findIndex((e=>e[f]===s[f]))}}if(void 0!==e){Q(T,k,e-x)}else void 0===e&&y.findIndex((e=>e[f]===C[f]))===y.length-1&&Q(T,k)}else Q(T,k);e.preventDefault()}j(T)}},ne=e=>{const t=De.current.initState();t.syntheticEvent=e.syntheticEvent,void 0===l.filter&&(t.data.text=e.target.value),De.current.filterChanged(e.target.value,t),we.current=!0,j(t),Be({group:void 0,text:String(e.target.value)})},ae=e=>{const t=void 0!==l.filter?l.filter:Ke.text;return l.filterable&&h.createElement(v,{value:t,ref:e=>{be.current=e&&e.element},onChange:ne,onKeyDown:ie,size:e?"large":x,rounded:k,fillMode:S,renderListFilterWrapper:!0,placeholder:Re.toLanguageString(_,z[_])})},oe=e=>{var t;const s=De.current.initState();s.syntheticEvent=e,null==(t=null==De?void 0:De.current)||t.togglePopup(s),A(l.defaultItem,s),j(s)},le=(e,t)=>{var s;null==(s=null==De?void 0:De.current)||s.handleItemClick(e,t),Ie.current=void 0},re=e=>{const{vs:t,list:s}=De.current;t.scrollHandler(e);const{groupField:i}=l;let n=F(l);if(i&&n.length&&i){const a=Fe.current=Fe.current||(t.enabled?t.itemHeight:s?s.children[0].offsetHeight:0),o=e.target.scrollTop-t.skip*a;n=De.current.getGroupedDataModernMode(n,i);let l=n[0][i];for(let e=1;e<n.length&&!(a*e>o);e++)n[e]&&n[e][i]&&(l=n[e][i]);l!==Ke.group&&Be({group:l})}},de=()=>{var e;const{textField:t,dataItemKey:s,virtual:n={skip:0,total:void 0},groupHeaderItemRender:a,listNoDataRender:o,itemRender:r}=l,d=F(l),u=D&&D.uDropDownList,p=De.current.vs,c=n.skip,g=void 0!==l.opened?l.opened:Ke.opened,v=De.current.getPopupSettings(),m=`translateY(${p.translate}px)`,f=P();return h.createElement(H,{id:_e,show:g,data:d.slice(),focusedIndex:X(),value:f,textField:t,valueField:s,optionsGuid:ze,groupField:l.groupField,groupMode:"modern",listRef:e=>{p.list=De.current.list=e},wrapperStyle:{maxHeight:lt?void 0:v.height},wrapperCssClass:i.classNames(i.uDropDownList.listContent({c:u})),listStyle:p.enabled?{transform:m}:void 0,key:"listkey",skip:c,onClick:le,itemRender:r,groupHeaderItemRender:a,noDataRender:o,onScroll:re,wrapperRef:p.scrollerRef,scroller:null==(e=null==De?void 0:De.current)?void 0:e.renderScrollElement(),ariaSetSize:n.total})},ue=()=>{Ke.focused&&window.setTimeout((()=>{Ke.focused&&De.current.wrapper&&B(De.current.wrapper)}))},pe=e=>{"onMouseDownOutside"in(l.popupSettings||{})&&l.popupSettings.onMouseDownOutside.call(void 0,e)},ce=()=>{const{header:e,footer:t,groupStickyHeaderItemRender:s,groupField:n,list:a}=l,o=F(l),r=D&&D.uDropDownList;let{group:d}=Ke;return void 0===d&&void 0!==n&&(d=I(o[0],n)),h.createElement(h.Fragment,null,e&&h.createElement("div",{className:i.classNames(i.uDropDownList.listHeader({c:r}))},e),h.createElement("div",{className:i.classNames("k-list",{[`k-list-${lt?"lg":i.sizeMap[x]||x}`]:x})},!a&&d&&0!==o.length&&h.createElement(m,{group:d,groupMode:"modern",render:s}),de()),t&&h.createElement("div",{className:"k-list-footer"},t))},he=e=>{clearTimeout(ye.current),l.filterable||(ye.current=window.setTimeout((()=>Ce.current.word=""),p),(e=>{const{dataItemKey:t}=l,s=F(l),i=P();let n=s.map(((e,t)=>({item:e,itemIndex:t})));const a=Ce.current.word,o=Ce.current.last,r=((e,t)=>{for(let s=0;s<e.length;s++)if(e.charAt(s)!==t)return!1;return!0})(a,o);let d,u=n.length,p=Math.max(0,s.findIndex((e=>w(e,i,t))));l.defaultItem&&(d={item:l.defaultItem,itemIndex:-1},u+=1,p+=1),p+=r?1:0,n=((e,t,s)=>{let i=e;return s&&(i=[s].concat(i)),i.slice(t).concat(i.slice(0,t))})(n,p,d);let c,h,g,v=0;const{textField:m}=l;for(;v<u;){if(c=I(n[v].item,m),h=r&&b(c,o,y),g=b(c,a,y),h||g){v=n[v].itemIndex;break}v++}if(v!==u){const t=De.current.initState();t.syntheticEvent=e,J(v,t),j(t),Ie.current=void 0}})(e))},ge=()=>{const e=De.current.initState();e.data.opened=Ke.opened,De.current.togglePopup(e),j(e)},ve=h.useRef(null),me=h.useRef(null),fe=h.useRef(null),be=h.useRef(null);h.useImperativeHandle(ve,(()=>({get element(){return me.current},get index(){return(()=>{const{dataItemKey:e}=l,t=F(l),s=P();return t.findIndex((t=>w(t,s,e)))})()},get name(){return l.name},get validity(){return R()},get value(){return P()},get focused(){return Ke.focused},get opened(){return Ke.opened},focus:T,props:l,togglePopup:ge}))),h.useImperativeHandle(t,(()=>ve.current));const ye=h.useRef(null),Ce=h.useRef({word:"",last:""}),xe=h.useRef(!1),Ie=h.useRef(null),ke=h.useRef(!1),we=h.useRef(!1),Se=h.useRef({}),Ee=h.useRef({}),De=h.useRef(new U({props:l,setState:()=>{},state:{},forceUpdate:()=>{},element:null,value:null,handleItemSelect:()=>{}})),Fe=h.useRef(0),Me=h.useRef(null),[Ke,Ne]=h.useState({}),[Te,Pe]=h.useState(),[,Oe]=h.useReducer((e=>e),!0),Re=r.useLocalization(),Be=e=>{Ne({...Ke,...e})};h.useEffect((()=>{De.current.updateComponentArgs({props:l,setState:Be,state:Ke,forceUpdate:Oe,element:me.current,handleItemSelect:J,value:P()})}),[Be,Ke,Oe,J,P]),h.useEffect((()=>{var e,t,s,i,n,a,o,r,d,u,p,c,h;const{dataItemKey:g,virtual:v,groupField:m="",textField:f}=l,b=F(l),y=Se.current.virtual?Se.current.virtual.total:0,C=void 0!==l.opened?l.opened:Ke.opened,x=void 0!==Se.current.opened?Se.current.opened:Ee.current.opened,I=!x&&C;if(null==(e=null==De?void 0:De.current)||e.didUpdate(),null!=(t=null==De?void 0:De.current)&&t.getPopupSettings().animate||I&&V(),v&&v.total!==y)null==(s=null==De?void 0:De.current)||s.vs.calcScrollElementHeight(),null==(i=null==De?void 0:De.current)||i.vs.reset();else{const e=P(),t=void 0!==Se.current.value?Se.current.value:Ee.current.value;let s=b.findIndex((t=>w(t,e,g)));""!==m&&e&&f&&(s=null==(a=null==(n=null==De?void 0:De.current)?void 0:n.getGroupedDataModernMode(b,m))?void 0:a.map((e=>e[f])).indexOf(e[f]));const i=!w(t,e,g);I&&v?null==(o=null==De?void 0:De.current)||o.scrollToVirtualItem(v,s):I&&!v?(V(),b&&0!==b.length&&(null==(r=null==De?void 0:De.current)||r.resetGroupStickyHeader(b[0][m],{setState:Be,group:Ke.group,state:Ke})),null==(d=null==De?void 0:De.current)||d.scrollToItem(s)):C&&x&&e&&i&&!ke.current?null==(p=null==De?void 0:De.current)||p.scrollToItem(s,null==(u=null==De?void 0:De.current)?void 0:u.vs.enabled):C&&x&&ke.current&&(ke.current&&v&&0===v.skip?null==(c=null==De?void 0:De.current)||c.vs.reset():ke.current&&v&&v.skip===v.total-v.pageSize&&(null==(h=null==De?void 0:De.current)||h.vs.scrollToEnd()))}ke.current=!1,Ee.current=Ke,Se.current=l,W()})),h.useEffect((()=>{var e,t;return Me.current=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(q.bind(void 0)),null==(e=null==De?void 0:De.current)||e.didMount(),W(),null!=(t=N())&&t.body&&Me.current&&Me.current.observe(N().body),()=>{var e;null!=(e=N())&&e.body&&Me.current&&Me.current.disconnect()}}),[]);const Le=M+"-accessibility-id",_e=M+"-listbox-id",ze=M+"-guid",He=Re.toLanguageString(L,z[L]),{style:Ve,className:qe,label:We,dir:Ae,virtual:Ue,adaptive:$e,dataItemKey:Ge,disabled:je,loading:Ye,iconClassName:Ze,svgIcon:Je,valueRender:Qe}=l,Xe=void 0!==l.opened?l.opened:Ke.opened,et=P(),tt=I(et,l.textField),st=!(void 0!==l.validityStyles?l.validityStyles:Y.validityStyles)||R().valid,it=De.current,nt=it.vs,at=D&&D.uDropDownList;nt.enabled=void 0!==Ue;const ot=i.useAdaptiveModeContext(),lt=!!(Te&&ot&&Te<=ot.medium&&l.adaptive);void 0!==Ue&&(it.vs.skip=Ue.skip,it.vs.total=Ue.total,it.vs.pageSize=Ue.pageSize);const rt=F(l),{focused:dt}=Ke,ut=rt.findIndex((e=>w(e,et,Ge))),pt=h.createElement("span",{id:Le,className:i.classNames(i.uDropDownList.inputInner({c:at}))},tt&&h.createElement("span",{className:i.classNames(i.uDropDownList.inputText({c:at}))},tt)),ct=void 0!==Qe?Qe.call(void 0,pt,et):pt,ht=h.createElement(h.Fragment,null,h.createElement("span",{ref:e=>{me.current=e,De.current.wrapper=e},className:i.classNames(i.uDropDownList.wrapper({c:at,size:x,rounded:k,fillMode:S,focused:dt,disabled:je,invalid:!st,loading:Ye,required:O()}),qe),style:We?{...Ve,width:void 0}:Ve,dir:Ae,onMouseDown:Xe?e=>{"INPUT"!==e.target.nodeName&&(B(De.current.wrapper),e.preventDefault())}:void 0,onFocus:lt?e=>se(e):e=>{xe.current||De.current.handleFocus(e)},onBlur:e=>{if(xe.current||!Ke.focused)return;const t=void 0!==l.opened?l.opened:Ke.opened,s=De.current.initState();s.syntheticEvent=e,s.data.focused=!1,s.events.push({type:"onBlur"}),t&&te(),t&&!lt&&De.current.togglePopup(s),j(s)},tabIndex:i.getTabIndex(c,je),accessKey:l.accessKey,onKeyDown:ie,onKeyPress:e=>{if(l.filterable||0===e.which||e.keyCode===i.Keys.enter)return;let t=String.fromCharCode(e.charCode||e.keyCode);y&&(t=t.toLowerCase())," "===t&&e.preventDefault(),Ce.current={word:Ce.current.word+t,last:Ce.current.last+t},he(e)},onClick:je?void 0:se,role:"combobox","aria-required":O(),"aria-disabled":je||void 0,"aria-haspopup":"listbox","aria-expanded":Xe||!1,"aria-owns":_e,"aria-activedescendant":Xe?"option-"+ze+"-"+(ut+(Ue?Ue.skip:0)):void 0,"aria-label":l.ariaLabel||l.label,"aria-labelledby":l.ariaLabelledBy,"aria-describedby":l.ariaDescribedBy||Le,"aria-controls":_e,id:l.id,title:l.title},ct,Ye&&h.createElement(i.IconWrap,{className:i.classNames(i.uDropDownList.loadingIcon({c:at})),name:"loading"}),h.createElement(d.Button,{tabIndex:-1,type:"button","aria-label":He,size:x,fillMode:S,className:i.classNames(i.uDropDownList.inputButton({c:at})),rounded:null,themeColor:"base",iconClass:Ze,svgIcon:Ze?void 0:Je||a.caretAltDownIcon,onMouseDown:e=>Ke.focused&&e.preventDefault()}),(e=>h.createElement("select",{name:l.name,ref:e=>{fe.current=e},tabIndex:-1,"aria-hidden":!0,title:l.label,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},h.createElement("option",{value:l.valueMap?l.valueMap.call(void 0,e):e})))(et),!lt&&(()=>{const{header:e,footer:t,dir:n,groupField:a,groupStickyHeaderItemRender:r,list:d}=l,u=F(l),p=De.current,c=p.getPopupSettings(),v=void 0!==l.opened?l.opened:Ke.opened,f=void 0!==c.width?c.width:p.popupWidth,b=D&&D.uDropDownList,y={dir:void 0!==n?n:p.dirCalculated,width:f,popupSettings:{...c,popupClass:i.classNames(c.popupClass,i.uDropDownList.listContainer({c:b,popup:!0})),anchor:c.anchor||me.current,show:v,onOpen:V,onClose:ue,onMouseDownOutside:pe},itemsCount:[u.length]};let{group:C}=Ke;return void 0===C&&void 0!==a&&(C=I(u[0],a)),h.createElement(g,{...y},ae(!1),e&&h.createElement("div",{className:i.classNames(i.uDropDownList.listHeader({c:b}))},e),h.createElement("div",{className:i.classNames(i.uDropDownList.list({c:b,size:x,virtual:De.current.vs.enabled}))},(()=>{const{textField:e,defaultItem:t,dataItemKey:s}=l,i=P();return void 0!==t&&h.createElement(K,{defaultItem:t,textField:e,selected:w(i,t,s),key:"defaultitemkey",onClick:oe})})(),!d&&C&&0!==u.length&&h.createElement(m,{group:C,groupMode:"modern",render:r}),de()),t&&h.createElement("div",{className:i.classNames(i.uDropDownList.listFooter({c:b}))},t),s&&h.createElement(i.WatermarkOverlay,{message:o}))})()),lt&&(()=>{const{groupField:e}=l,t=F(l),s=void 0!==l.opened?l.opened:Ke.opened,n=D&&D.uDropDownList,a={title:l.adaptiveTitle||l.label,subTitle:l.adaptiveSubtitle,expand:s,onClose:e=>se(e),windowWidth:Te,mobileFilter:ae(!0)};let{group:o}=Ke;return void 0===o&&void 0!==e&&(o=I(t[0],e)),h.createElement(G,{...a},h.createElement(u.ActionSheetContent,null,h.createElement("div",{className:i.classNames(i.uDropDownList.listContainer({c:n,popup:!1}))},ce())))})());return We?h.createElement(n.FloatingLabel,{label:We,editorValue:tt,editorValid:st,editorDisabled:l.disabled,style:{width:Ve?Ve.width:void 0},children:ht}):ht}));j.propTypes={delay:s.number,ignoreCase:s.bool,iconClassName:s.string,svgIcon:i.svgIconPropType,defaultItem:s.any,valueRender:s.func,valueMap:s.func,validationMessage:s.string,required:s.bool,id:s.string,ariaLabelledBy:s.string,ariaDescribedBy:s.string,ariaLabel:s.string,leftRightKeysNavigation:s.bool,title:s.string,groupField:s.string,list:s.any,skipDisabledItems:s.bool};const Y={delay:500,tabIndex:0,ignoreCase:!0,...U.defaultProps,required:!1,size:"medium",rounded:"medium",fillMode:"solid",groupMode:"modern"};j.displayName="KendoReactDropDownList";const Z=i.createPropsContext();j.displayName="KendoReactDropDownList";let J=class extends h.Component{constructor(){super(...arguments),this._input=null}get input(){return this._input}componentDidUpdate(e){const t=e.value,s=e.suggestedText,{value:n,suggestedText:a,focused:o}=this.props,l=this.input,r=t!==n||a!==s,d=r&&t.startsWith(n)&&!(s&&a&&s.endsWith(a)),u=i.getActiveElement(document);o&&l&&u!==l&&l.focus(),a&&r&&!d&&l&&l.setSelectionRange(n.length-a.length,n.length)}render(){const{expanded:e=!1,disabled:t,role:s="listbox",render:n,tabIndex:a,accessKey:o,unstyled:l,inputAttributes:r}=this.props,d=l&&l.uDropDownsBase,u={tabIndex:a,accessKey:o},p=h.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:i.classNames(i.uDropDownsBase.inputInner({c:d})),role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:e=>{this._input=e},onKeyDown:this.props.onKeyDown,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onClick:this.props.onClick,"aria-disabled":t||void 0,disabled:t||void 0,readOnly:this.props.readOnly||void 0,title:this.props.title,"aria-haspopup":"listbox","aria-expanded":e,"aria-owns":this.props.owns,"aria-activedescendant":e?this.props.activedescendant:void 0,"aria-describedby":this.props.ariaDescribedBy,"aria-labelledby":this.props.ariaLabelledBy,"aria-label":this.props.ariaLabel,"aria-required":this.props.ariaRequired,"aria-controls":this.props.ariaControls,...Object.assign({},u,r)});return n?n.call(void 0,p):p}};const Q=e=>{const t=r.useLocalization(),s=i.useUnstyled(),n=s&&s.uDropDownsBase,o=t.toLanguageString(O,z[O]);return h.createElement("span",{className:i.classNames(i.uDropDownsBase.clearButton({c:n})),role:"button",onClick:e.onClick,onMouseDown:e=>e.preventDefault(),tabIndex:-1,title:o,key:"clearbutton"},h.createElement(i.IconWrap,{name:"x",icon:a.xIcon}))},X=i.useCustomComponent,ee=class e extends h.Component{constructor(e){super(e),this.state={},this.base=new U(this),this._element=null,this._suggested="",this._skipBlur=!1,this._input=null,this._adaptiveFilterInput=null,this._skipFocus=!1,this.itemHeight=0,this.duplicates=[],this.hasDuplicates=!1,this.showLicenseWatermark=!1,this.focus=()=>{this._input&&this._input.focus()},this.checkForDuplicatePlainTextRecords=()=>{const e=void 0!==this.props.textField,t=void 0!==this.props.dataItemKey;if(this.props.data&&this.props.data.length>0&&!e&&!t){const e=this.props.data;this.duplicates=(e=>{const t=e.filter(((t,s)=>e.some(((e,i)=>e===t&&i!==s))));return Array.from(new Set(t))})(e),this.hasDuplicates=this.duplicates.length>0}},this.handleItemSelect=(e,t)=>{const{virtual:s,dataItemKey:i}=this.props,n=F(this.props)[e-(s?s.skip:0)],a=this.hasDuplicates||!w(n,this.value,i);this.triggerOnChange(n,t),void 0!==this.state.text&&(t.data.text=void 0),a&&this.base.triggerPageChangeCornerItems(n,t)},this.onPopupOpened=()=>{setTimeout((()=>{this.mobileMode&&this._adaptiveFilterInput&&(this._skipBlur=!0,this._adaptiveFilterInput.focus(),this._skipBlur=!1)}),300)},this.componentRef=e=>{this._element=e,this.base.wrapper=e},this.toggleBtnClick=e=>{this._skipFocus=!0;const{skipDisabledItems:t,textField:s}=this.props,i=F(this.props),n=this.getFocusedIndex(),a=this.getCurrentValueDisabledStatus(s,i,n),o=void 0!==this.props.opened?this.props.opened:this.state.opened,l=this.base.initState();if(l.syntheticEvent=e,!t&&s&&a&&this.clearValueOnToggleBtnClick(e),this.base.togglePopup(l),!o&&this.mobileMode){const e=void 0!==this.props.adaptiveFilter?this.props.adaptiveFilter:this.state.text||null;this.base.filterChanged(e,l)}this.applyState(l),setTimeout((()=>{this._skipFocus=!1}),300)},this.closeOpenedApplyStateNonMobileMode=(e,t)=>{t&&!this.mobileMode&&this.base.togglePopup(e)},this.renderMobileListFilter=()=>{const e=void 0!==this.props.adaptiveFilter?this.props.adaptiveFilter:this.state.text,t=I(this.value,this.props.textField),s=f(e)?e:t;return h.createElement(v,{value:s,ref:e=>{this._adaptiveFilterInput=e&&e.element},onChange:this.handleMobileFilterChange,onKeyDown:this.onInputKeyDown,size:"large",rounded:this.props.rounded,fillMode:this.props.fillMode,placeholder:this.props.placeholder})},this.listContainerContent=()=>{const{header:e,footer:t,size:s,groupStickyHeaderItemRender:n,groupField:a,list:o,groupMode:l,unstyled:r,virtual:d}=this.props,u=F(this.props),p=r&&r.uComboBox;let{group:c}=this.state;return void 0===c&&void 0!==a&&(c=I(u[0],a)),h.createElement("div",{className:i.classNames(i.uComboBox.list({c:p,list:o,size:"large",tableSize:s,virtual:d}))},e&&h.createElement("div",{className:i.classNames(i.uComboBox.listHeader({c:p}))},e),!o&&c&&0!==u.length&&h.createElement(m,{group:c,groupMode:l,render:n}),this.renderList(),t&&h.createElement("div",{className:i.classNames(i.uComboBox.listFooter({c:p}),this.props.footerClassName)},t))},this.handleMobileFilterChange=e=>{const t=this.base.initState();t.syntheticEvent=e.syntheticEvent,t.data.text=e.target.value,this.base.filterChanged(e.target.value,t),this.applyState(t)},this.onScroll=e=>{const{vs:t,list:s}=this.base;t.scrollHandler(e);const{groupField:i}=this.props;let n=F(this.props);if(!i||!n.length)return;const a=this.itemHeight=this.itemHeight||(t.enabled?t.itemHeight:s?s.children[0].offsetHeight:0),o=e.target.scrollTop-t.skip*a;"modern"===this.props.groupMode&&(n=this.base.getGroupedDataModernMode(n,i));let l=n[0][i];for(let e=1;e<n.length&&!(a*e>o);e++)n[e]&&n[e][i]&&(l=n[e][i]);l!==this.state.group&&(this.setState({group:l}),this.props.onGroupScroll&&this.props.onGroupScroll.call(void 0,{group:l}))},this.handleItemClick=(e,t)=>{this.navigationIndex=e,this.base.handleItemClick(e,t),this._valueDuringOnChange=void 0},this.handleBlur=e=>{if(this.state.focused&&!this._skipBlur){const t=this.base.initState(),{textField:s}=this.props,i=F(this.props),n=this.getFocusedIndex(),a=!(-1===n)&&this.getCurrentValueDisabledStatus(s,i,n);t.data.focused=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,s&&a&&this.clearValueOnBlur(e),this.applyValueOnRejectSuggestions(e.currentTarget.value,t)}},this.onInputClick=e=>{const t=void 0!==this.props.opened?this.props.opened:this.state.opened,s=void 0!==this.props.adaptiveFilter?this.props.adaptiveFilter:this.state.text||null;if(!t&&this.mobileMode){const t=this.base.initState();t.syntheticEvent=e,this.base.togglePopup(t),this.base.filterChanged(s,t),this.applyState(t)}},this.onInputKeyDown=e=>{const{skipDisabledItems:t,textField:s,dataItemKey:n,groupField:a}=this.props,o=F(this.props),l=this.value,r=Math.max(0,o.findIndex((e=>w(e,l,n)))),d=e.keyCode,u=void 0!==this.props.opened?this.props.opened:this.state.opened,p=this.base.initState();if(p.syntheticEvent=e,!e.altKey&&(d===i.Keys.up||d===i.Keys.down)){if(e.preventDefault(),""!==a&&s)if(!this.props.skipDisabledItems&&u)this.onNavigate(p,d);else{let e=0;if(d===i.Keys.down||d===i.Keys.right){const t=o.slice(r+1<o.length?r+1:r).find((e=>!e.disabled&&e[s]));e=t&&o.findIndex((e=>e[s]===t[s]))}else if(d===i.Keys.up||d===i.Keys.left){let t;if(0===r)t=o,e=o.findIndex((e=>!e.disabled&&e[s]));else{t=o.slice(0,r);let i=t.pop();for(;i&&i.disabled;)i=t.pop();e=i&&o.findIndex((e=>e[s]===i[s]))}}if(void 0!==e){const t=e-r;this.onNavigate(p,d,t)}else void 0===e&&o.findIndex((e=>e[s]===l[s]))===o.length-1&&this.onNavigate(p,d)}else if(!this.props.skipDisabledItems&&u)this.onNavigate(p,d);else{let e=null;if(d===i.Keys.down||d===i.Keys.right)e=o.slice(r+1).find((e=>!e.disabled));else if(d===i.Keys.up||d===i.Keys.left){const t=o.slice(0,r);for(e=t.pop();e&&e.disabled;)e=t.pop()}if(e){const t=e.id-r-1;this.onNavigate(p,d,t)}else this.onNavigate(p,d)}this.applyState(p)}const c=()=>{e.preventDefault(),this.base.togglePopup(p),this.applyState(p)},h=this.getFocusedIndex(),g=-1===h,v=!g&&this.getCurrentValueDisabledStatus(s,o,h);u?d===i.Keys.pageUp?(e.preventDefault(),this.base.scrollPopupByPageSize(-1)):d===i.Keys.pageDown?(e.preventDefault(),this.base.scrollPopupByPageSize(1)):e.altKey&&d===i.Keys.up?c():d===i.Keys.enter?(e.preventDefault(),(s&&!g&&e.currentTarget.value?o[h][s]:void 0)?!t&&s&&v?this.clearValueOnEnterOrEsc(e):v||this.applyValueOnEnter(e.currentTarget.value,p):this.applyValueOnEnter(e.currentTarget.value,p)):d===i.Keys.esc&&(!t&&s&&v&&this.clearValueOnEnterOrEsc(e),this.applyValueOnRejectSuggestions(e.currentTarget.value,p)):u||d!==i.Keys.esc?e.altKey&&d===i.Keys.down&&c():this.clearValueOnEnterOrEsc(e)},this.inputOnChange=e=>{const t=this.base.initState();t.syntheticEvent=e;const s=void 0!==this.props.opened?this.props.opened:this.state.opened,i=e.currentTarget,n=i.value;if(this.props.suggest){const e=i.selectionEnd===n.length;let t=void 0!==this.props.filter?this.props.filter:this.state.text;f(t)||(t=I(this.value,this.props.textField)||"");const s=t&&t===n,a=t&&t.length>n.length;s||a||!e?this._suggested="":this.suggestValue(n)}void 0===this.props.filter&&(t.data.text=n),void 0!==this.state.focusedItem&&(t.data.focusedItem=void 0),s||this.base.togglePopup(t),this.base.filterChanged(n,t),this.applyState(t),this.setState({group:void 0})},this.clearButtonClick=e=>{this.base.initState().syntheticEvent=e,e.stopPropagation(),this.clearValue()},this.clearValueOnEnterOrEsc=e=>{this.base.initState().syntheticEvent=e,e.stopPropagation(),this.clearValue()},this.clearValueOnBlur=e=>{this.base.initState().syntheticEvent=e,e.stopPropagation(),this.clearValue()},this.clearValueOnToggleBtnClick=e=>{this.base.initState().syntheticEvent=e,e.stopPropagation(),this.clearValue()},this.setValidity=()=>{this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity.valid?"":this.props.validationMessage||"Please enter a valid value!")},this.handleFocus=e=>{if(this._skipFocus)return;const t=this.base.initState();t.syntheticEvent=e,this.mobileMode&&!this._skipFocus&&(this._skipFocus=!0,this.base.togglePopup(t),this.applyState(t),setTimeout((()=>{this._skipFocus=!1}),300)),this.base.handleFocus(e)},this.showLicenseWatermark=!i.validatePackage($,{component:"ComboBox"}),this.licenseMessage=i.getLicenseMessage($)}get _inputId(){return this.props.id}get document(){if(i.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}get value(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:void 0}get index(){const{dataItemKey:e}=this.props,t=F(this.props),s=this.value;return t.findIndex((t=>w(t,s,e)))}get name(){return this.props.name}get validity(){const e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&""!==this.value&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}}get validityStyles(){return void 0!==this.props.validityStyles?this.props.validityStyles:e.defaultProps.validityStyles}get required(){return void 0!==this.props.required?this.props.required:e.defaultProps.required}componentDidUpdate(e,t){var s;const{dataItemKey:i,virtual:n,groupField:a="",textField:o}=this.props,l=F(this.props),r=e.virtual?e.virtual.total:0,d=void 0!==this.props.opened?this.props.opened:this.state.opened,u=void 0!==e.opened?e.opened:t.opened;e.data!==l&&this.checkForDuplicatePlainTextRecords();const p=!u&&d,c=this.value;if(this._valueOnDidUpdate=c,this.base.didUpdate(),n&&n.total!==r)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{const r=void 0!==e.value?e.value:t.value;let h=this.hasDuplicates?this.navigationIndex||0:l.findIndex((e=>w(e,c,i)));"modern"===this.props.groupMode&&o&&c&&(h=null==(s=this.base.getGroupedDataModernMode(l,a))?void 0:s.map((e=>e[o])).indexOf(c[o]));const g=!w(r,c,i);p&&n?this.base.scrollToVirtualItem(n,h):p&&!n?(this.onPopupOpened(),l&&0!==l.length&&this.base.resetGroupStickyHeader(l[0][a],this),this.base.scrollToItem(h)):(this.hasDuplicates||d&&u&&c&&g)&&this.base.scrollToItem(h)}p&&this._input&&this._input.focus(),this.setValidity()}componentDidMount(){var e;this.observerResize=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.base.didMount(),this.setValidity(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body),this.checkForDuplicatePlainTextRecords()}componentWillUnmount(){var e;null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.disconnect()}render(){const t=r.provideLocalizationService(this).toLanguageString(R,z[R]),s=r.provideLocalizationService(this).toLanguageString(B,z[B]),{dir:o,disabled:l,clearButton:u=e.defaultProps.clearButton,label:p,textField:c,className:g,style:v,loading:m,iconClassName:b,virtual:y,size:C,rounded:x,fillMode:k,opened:w=this.state.opened,placeholder:S,svgIcon:E,unstyled:D}=this.props,F=!this.validityStyles||this.validity.valid,M=void 0!==this.props.filter?this.props.filter:this.state.text,K=I(this.value,c),N=f(M)?M:K,T=u&&(!!N||f(this.value)),P=this.base.vs,O=this.props.id||this._inputId,L=D&&D.uComboBox;P.enabled=void 0!==y,void 0!==y&&(P.skip=y.skip,P.total=y.total,P.pageSize=y.pageSize);const[_,H]=X(this.props.prefix||h.Fragment),[V,q]=X(this.props.suffix||h.Fragment),W=h.createElement(h.Fragment,null,h.createElement("span",{className:i.classNames(i.uComboBox.wrapper({c:L,size:C,rounded:x,fillMode:k,disabled:l,invalid:!F,loading:m,required:this.required}),g),ref:this.componentRef,style:p?{...v,width:void 0}:v,dir:o,onFocus:this.handleFocus},this.props.prefix&&h.createElement(_,{...H}),this.renderSearchBar(N||"",O,S),T&&!m&&h.createElement(Q,{onClick:this.clearButtonClick,key:"clearbutton"}),m&&h.createElement(i.IconWrap,{className:i.classNames(i.uComboBox.loadingIcon({c:L})),name:"loading",key:"loading"}),this.props.suffix&&h.createElement(V,{...q}),h.createElement(d.Button,{tabIndex:-1,type:"button","aria-label":w?s:t,icon:b?void 0:"caret-alt-down",svgIcon:E||a.caretAltDownIcon,iconClass:b,size:C,fillMode:k,rounded:null,themeColor:"base",className:i.classNames(i.uComboBox.inputButton({c:L})),onClick:this.toggleBtnClick,onMouseDown:e=>e.preventDefault()}),!this.mobileMode&&this.renderListContainer()),this.mobileMode&&this.renderAdaptiveListContainer());return p?h.createElement(n.FloatingLabel,{label:p,editorId:O,editorValue:N,editorValid:F,editorDisabled:l,style:{width:v?v.width:void 0},children:W,unstyled:D}):W}onNavigate(e,t,s){const{virtual:i={skip:0}}=this.props,n=F(this.props),a=this.props.filter?this.props.filter:this.state.text;let o,l=-1;const r=this.base.vs,d=this.value;this._suggested="";const u=this.hasDuplicates&&-1!==this.duplicates.indexOf(d);if(l=this.getFocusedIndex(u),-1===l||f(d))if(""===a)this.handleItemSelect(0,e);else{const a=i.skip+l;o=this.base.navigation.navigate({keyCode:t,current:a,max:(r.enabled?r.total:n.length)-1,min:0,skipItems:s||void 0}),void 0!==o&&this.handleItemSelect(o,e)}else this.handleItemSelect(l,e);this.navigationIndex=o}getCurrentValueDisabledStatus(e,t,s){return e&&t&&t[s]&&t[s].disabled}applyValueOnEnter(e,t){const{textField:s,allowCustom:i}=this.props,n=F(this.props),a=void 0!==this.props.opened?this.props.opened:this.state.opened,o=I(this.value,s)===e?this.index:x(n,e,s),l=-1!==o;let r;if(this._suggested="",l)r=n[o];else{if(!i)return this.selectFocusedItem(e,t);r=void 0!==s?{[s]:e}:e}this.triggerOnChange(r,t),a&&this.base.togglePopup(t),void 0===this.props.filter&&void 0!==this.state.text&&(t.data.text=void 0),this.applyState(t)}applyValueOnRejectSuggestions(e,t){const{textField:s,allowCustom:i}=this.props,n=F(this.props),a=void 0!==this.props.opened?this.props.opened:this.state.opened,o=I(this.value,s);if(this._suggested="",e===o||""===e&&!f(o))return this.closeOpenedApplyStateNonMobileMode(t,a),this.applyState(t);const l=x(n,e,s,!0);let r=null;-1!==l?r=n[l]:i&&(r=e?s?{[s]:e}:e:null),this.triggerOnChange(r,t),void 0!==this.state.text&&(t.data.text=void 0,this.base.filterChanged("",t)),this.closeOpenedApplyStateNonMobileMode(t,a),this.applyState(t)}selectFocusedItem(e,t){const s=void 0!==this.props.opened?this.props.opened:this.state.opened,{textField:i,virtual:n={skip:0},focusedItemIndex:a=C}=this.props,o=F(this.props),l=n.skip,r=""===e&&0===l?0:a(o,e,i);return-1!==r?this.handleItemSelect(r+l,t):(this.triggerOnChange(null,t),void 0!==this.state.text&&(t.data.text=void 0)),s&&this.base.togglePopup(t),this.applyState(t)}renderAdaptiveListContainer(){const{windowWidth:e=0}=this.state,{groupField:t,adaptiveTitle:s=this.props.label,adaptiveSubtitle:i}=this.props,n=F(this.props),a=void 0!==this.props.opened?this.props.opened:this.state.opened;let{group:o}=this.state;void 0===o&&void 0!==t&&(o=I(n[0],t));const l={title:s||this.props.label,subTitle:i,expand:a,onClose:e=>this.toggleBtnClick(e),windowWidth:e,mobileFilter:this.renderMobileListFilter()};return h.createElement(G,{...l},h.createElement(u.ActionSheetContent,null,h.createElement("div",{className:"k-list-container"},this.listContainerContent())))}renderListContainer(){const e=this.base,{dir:t,header:s,footer:n,groupField:a,groupMode:o,size:l,list:r,virtual:d,groupStickyHeaderItemRender:u,unstyled:p}=this.props,c=F(this.props),v=void 0!==this.props.opened?this.props.opened:this.state.opened,f=e.getPopupSettings(),b=void 0!==f.width?f.width:e.popupWidth,y=p&&p.uComboBox;let{group:C}=this.state;return void 0===C&&void 0!==a&&(C=I(c[0],a)),h.createElement(g,{width:b,popupSettings:{...f,anchor:f.anchor||this.element,show:v,popupClass:i.classNames(f.popupClass,i.uComboBox.listContainer({c:y,popup:!0}))},dir:void 0!==t?t:this.base.dirCalculated,itemsCount:[c.length]},h.createElement("div",{className:i.classNames(i.uComboBox.list({c:y,list:r,size:l,tableSize:l,virtual:d}))},s&&h.createElement("div",{className:i.classNames(i.uComboBox.listHeader({c:y}))},s),!r&&C&&0!==c.length&&h.createElement(m,{group:C,groupMode:o,render:u}),this.renderList(),n&&h.createElement("div",{className:i.classNames(i.uComboBox.listFooter({c:y}),this.props.footerClassName)},n)),this.showLicenseWatermark&&h.createElement(i.WatermarkOverlay,{message:this.licenseMessage}))}renderList(){const e=this.base,{textField:t,dataItemKey:s,listNoDataRender:n,itemRender:a,groupHeaderItemRender:o,virtual:l={skip:0,total:void 0},unstyled:r}=this.props,d=F(this.props),u=e.getPopupSettings(),p=e.vs,c=l.skip,g=void 0!==this.props.opened?this.props.opened:this.state.opened,v=`translateY(${p.translate}px)`,m=g?this.getFocusedIndex(this.hasDuplicates):void 0,b=void 0!==this.props.filter?this.props.filter:this.state.text,y=I(this.value,t),C=f(b)&&b!==y?null:this.value,x=this.props.list||H,k=r&&r.uComboBox;return h.createElement(x,{id:e.listBoxId,virtual:!!l,show:g,data:d,focusedIndex:m,value:C,textField:t,valueField:s,groupField:this.props.groupField,groupMode:this.props.groupMode,isMultiColumn:this.props.isMultiColumn,optionsGuid:e.guid,hasDuplicates:this.hasDuplicates,listRef:e=>{p.list=this.base.list=e,this.itemHeight=0},wrapperStyle:this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth>this.props._adaptiveMode.medium?{maxHeight:u.height}:{},wrapperCssClass:i.classNames(i.uComboBox.listContent({c:k,virtual:l})),listStyle:p.enabled?{transform:v}:void 0,key:"listkey",skip:c,onClick:this.handleItemClick,itemRender:a,groupHeaderItemRender:o,noDataRender:n,onMouseDown:e=>e.preventDefault(),onScroll:this.onScroll,wrapperRef:p.scrollerRef,scroller:this.base.renderScrollElement(),ariaSetSize:l.total})}renderSearchBar(e,t,s){const{tabIndex:i,accessKey:n,disabled:a,title:o,ariaLabelledBy:l,ariaDescribedBy:r,dataItemKey:d,virtual:u={skip:0},unstyled:p,inputAttributes:c}=this.props,g=F(this.props),v=void 0!==this.props.opened?this.props.opened:this.state.opened,m=this.value,f=Math.max(0,g.findIndex((e=>w(e,m,d))));return this._suggested&&!w(this._valueOnDidUpdate,m,d)&&(this._suggested=""),h.createElement(J,{id:t,readOnly:v&&this.mobileMode,placeholder:s,tabIndex:i,accessKey:n,title:o,value:e+this._suggested,suggestedText:this._suggested,ref:e=>{this._input=e&&e.input},onClick:this.onInputClick,onKeyDown:this.onInputKeyDown,onChange:this.inputOnChange,onFocus:this.base.handleFocus,onBlur:this.handleBlur,disabled:a,expanded:v,owns:this.base.listBoxId,activedescendant:`option-${this.base.guid}-${f+u.skip}`,role:"combobox",ariaLabelledBy:l,ariaLabel:this.props.ariaLabel,ariaDescribedBy:r,ariaRequired:this.required,render:this.props.valueRender,ariaControls:this.base.listBoxId,unstyled:p,inputAttributes:c})}clearValue(){const e=this.base.initState();this._suggested="",this.navigationIndex=void 0,this.base.filterChanged("",e),void 0===this.props.filter&&void 0!==this.state.text&&(e.data.text=void 0),this.triggerOnChange(null,e);const t=void 0!==this.props.opened?this.props.opened:this.state.opened,s=this.mobileMode;t&&!s&&this.base.togglePopup(e),this.applyState(e)}triggerOnChange(e,t){const s=this.value;!this.hasDuplicates&&(!f(s)&&!f(e)||w(s,e,this.props.dataItemKey))||(void 0===this.props.value&&(t.data.value=e),this._valueDuringOnChange=e,t.events.push({type:"onChange"}))}getFocusedIndex(e){const t=this.value,{textField:s,dataItemKey:i,virtual:n={skip:0},focusedItemIndex:a=C,skipDisabledItems:o}=this.props,l=F(this.props),r=this.props.filter?this.props.filter:this.state.text;return e&&void 0!==this.navigationIndex?this.navigationIndex:f(t)&&void 0===r?l.findIndex((e=>w(e,t,i))):r?a(l,r,s):o&&s&&!r&&0===n.skip?l.findIndex((e=>!e.disabled&&e[s])):0===n.skip?0:-1}suggestValue(e){const{data:t,textField:s}=this.props;this._suggested=((e,t=[],s)=>{let i="";if(e){const n=t[C(t,e,s)];if(n){const t=I(n,s);e.toLowerCase()!==t.toLowerCase()&&(i=t.substring(e.length))}}return i})(e,t,s)}applyState(e){this.base.applyState(e),this._valueDuringOnChange=void 0}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}};ee.displayName="ComboBox",ee.propTypes={...U.propTypes,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"solid","flat","outline"]),dataItemKey:s.string,groupField:s.string,groupMode:s.oneOf([void 0,"classic","modern"]),isMultiColumn:s.bool,suggest:s.bool,placeholder:s.string,title:s.string,allowCustom:s.bool,clearButton:s.bool,iconClassName:s.string,svgIcon:i.svgIconPropType,validationMessage:s.string,required:s.bool,id:s.string,ariaLabelledBy:s.string,ariaLabel:s.string,ariaDescribedBy:s.string,list:s.any,valueRender:s.func,skipDisabledItems:s.bool,inputAttributes:s.object},ee.defaultProps={...U.defaultProps,size:"medium",rounded:"medium",fillMode:"solid",allowCustom:!1,clearButton:!0,required:!1,groupMode:"modern",isMultiColumn:!1,skipDisabledItems:!0,prefix:void 0,suffix:void 0};let te=ee;const se=i.createPropsContext(),ie=i.withIdHOC(i.withPropsContext(se,i.withUnstyledHOC(i.withAdaptiveModeContext(te))));ie.displayName="KendoReactComboBox";const{sizeMap:ne,roundedMap:ae}=i.kendoThemeMaps,oe=class e extends h.Component{constructor(){super(...arguments),this.state={},this.base=new U(this),this._element=null,this._suggested="",this._input=null,this._adaptiveInput=null,this._skipFocusEvent=!1,this._isScrolling=!1,this.itemHeight=0,this.focus=()=>{this._input&&this._input.focus()},this.handleItemSelect=(e,t)=>{const s=F(this.props),i=I(s[e],this.props.textField);this.state.text&&!this.mobileMode&&(this.state.text&&(t.data.text=""),this.base.filterChanged("",t)),this._adaptiveInput&&this._adaptiveInput.blur(),this.triggerOnChange(i,t)},this.itemFocus=(e,t)=>{const{textField:s}=this.props,i=F(this.props)[e];w(this.state.focusedItem,i,s)||(t.data.focusedItem=i)},this.togglePopup=e=>{this.base.togglePopup(e)},this.setValidity=()=>{this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity.valid?"":this.props.validationMessage||"Please enter a valid value!")},this.renderAdaptiveListContainer=()=>{const{windowWidth:e=0}=this.state,t=h.createElement(v,{value:this.value,ref:e=>{this._adaptiveInput=e&&e.element},onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,size:"large",rounded:this.props.rounded,fillMode:this.props.fillMode,placeholder:this.props.placeholder}),s={title:this.props.adaptiveTitle||this.props.label,subTitle:this.props.adaptiveSubtitle,expand:this.opened,onClose:e=>this.onCancel(e),windowWidth:e,mobileFilter:t};return h.createElement(G,{...s},h.createElement(u.ActionSheetContent,null,h.createElement("div",{className:"k-list-container"},this.listContainerContent())))},this.onCancel=e=>{const t=this.base.initState();t.syntheticEvent=e,e.stopPropagation(),this.opened&&this.base.togglePopup(t),t.events.push({type:"onCancel"});const s=this.state.text;f(s)&&""!==s&&this.base.filterChanged("",t),this.state.text&&(t.data.text=""),this.applyState(t)},this.listContainerContent=()=>{const{header:e,footer:t,size:s,groupStickyHeaderItemRender:n,groupField:a,list:o}=this.props,l=F(this.props);let{group:r}=this.state;return void 0===r&&void 0!==a&&(r=I(l[0],a)),h.createElement(h.Fragment,null,e&&h.createElement("div",{className:"k-list-header"},e),h.createElement("div",{className:i.classNames("k-list",{[`k-list-${this.mobileMode?"lg":ne[s]||s}`]:s})},!o&&r&&0!==l.length&&h.createElement(m,{group:r,groupMode:"modern",render:n}),this.renderList()),t&&h.createElement("div",{className:"k-list-footer"},t))},this.onScroll=e=>{this._isScrolling=!0;const{list:t}=this.base,{groupField:s}=this.props;let i=F(this.props);if(!s||!i.length)return;const n=this.itemHeight||(t?t.children[0].offsetHeight:0),a=e.target.scrollTop;s&&(i=this.base.getGroupedDataModernMode(i,s));let o=i[0][s];for(let e=1;e<i.length&&!(n*e>a);e++)i[e]&&i[e][s]&&(o=i[e][s]);o!==this.state.group&&this.setState({group:o})},this.handleItemClick=(e,t)=>{this.base.handleItemClick(e,t),this._valueDuringOnChange=void 0},this.onChangeHandler=e=>{const t=this.base.initState(),s=this.mobileMode?e.target.element:e.currentTarget,i=s.value,n=s.selectionEnd===i.length;t.syntheticEvent=e;const a=this._suggested,o=this.value,l=o&&o.substring(0,o.length-a.length),r=l&&l===i,d=l&&l.length>i.length,{suggest:u}=this.props,p=void 0!==this.props.opened?this.props.opened:this.state.opened;if(void 0!==u&&!1!==u){r||d||!n?this._suggested="":this.suggestValue(i);const e=i+this._suggested,s={userInput:i,value:this._suggested};this.triggerOnChange(e,t,{suggestion:s})}else this._suggested="",this.triggerOnChange(i,t);(!p&&i||p&&!i)&&this.togglePopup(t),t.data.focusedItem=void 0,this.applyState(t),this.setState({group:void 0})},this.clearButtonClick=e=>{const t=this.base.initState(),s=void 0!==this.props.opened?this.props.opened:this.state.opened;t.syntheticEvent=e;this._suggested="",this.triggerOnChange("",t),void 0!==this.state.focusedItem&&(t.data.focusedItem=void 0),s&&this.togglePopup(t),this.applyState(t)},this.onInputKeyDown=e=>{const{skipDisabledItems:t,groupField:s,textField:n}=this.props,a=F(this.props);this._isScrolling&&(this._isScrolling=!1);const o=this.focusedIndex(),l=a[o],r=e.keyCode,d=e.altKey,u=void 0!==this.props.opened?this.props.opened:this.state.opened,p=this.base.initState();p.syntheticEvent=e;const c=()=>{u&&e.preventDefault()};if(d&&r===i.Keys.down)this.setState({opened:!0});else if(d&&r===i.Keys.up)this.setState({opened:!1});else if(u&&r===i.Keys.pageUp)c(),this.base.scrollPopupByPageSize(-1);else if(u&&r===i.Keys.pageDown)c(),this.base.scrollPopupByPageSize(1);else if(!u||r!==i.Keys.enter&&r!==i.Keys.esc)if(u||r!==i.Keys.esc){if(r===i.Keys.up||r===i.Keys.down){if(""!==s&&n)if(!this.props.skipDisabledItems&&u)this.onNavigate(p,r);else{let e=0;if(r===i.Keys.down||r===i.Keys.right){const t=a.slice(o+1).find((e=>!e.disabled&&e[n]));e=t&&a.findIndex((e=>e[n]===t[n]))}else if(r===i.Keys.up||r===i.Keys.left){let t;if(-1===o)t=a,e=a.findIndex((e=>!e.disabled&&e[n]));else{t=a.slice(0,o);let s=t.pop();for(;s&&s.disabled;)s=t.pop();e=s&&a.findIndex((e=>e[n]===s[n]))}}if(void 0!==e){const t=e-o;this.onNavigate(p,r,t)}else void 0===e&&a.findIndex((e=>e[n]))===a.length-1&&this.onNavigate(p,r)}else if(!this.props.skipDisabledItems&&u)this.onNavigate(p,r);else{let e=null;if(r===i.Keys.down||r===i.Keys.right)e=a.slice(o+1).find((e=>!e.disabled));else if(r===i.Keys.up||r===i.Keys.left){const t=a.slice(0,o);for(e=t.pop();e&&e.disabled;)e=t.pop()}if(e){const t=e.id-o-1;this.onNavigate(p,r,t)}else this.onNavigate(p,r)}this.applyState(p),c()}}else{const e="";this._suggested="",this.triggerOnChange(e,p),void 0!==this.state.focusedItem&&(p.data.focusedItem=void 0),this.applyState(p)}else c(),!1===t&&l&&l.disabled?(u&&this.togglePopup(p),this.applyState(p)):this.applyInputValue(e.currentTarget.value,p,e.keyCode)},this.handleFocus=e=>{this._skipFocusEvent||this.base.handleFocus(e)},this.handleBlur=e=>{const t=this.base.initState();!this.state.focused||this._skipFocusEvent||(t.syntheticEvent=e,t.data.focused=!1,t.events.push({type:"onBlur"}),this.opened&&!this.mobileMode&&(this.state.opened&&(t.data.opened=!1),t.events.push({type:"onClose"})),this.applyState(t))},this.handleWrapperClick=e=>{const t=this._input;!this.opened&&t&&this.focusElement(t);const s=this.base.initState();s.syntheticEvent=e,!this.state.focused&&!this.mobileMode&&(s.events.push({type:"onFocus"}),s.data.focused=!0),this.mobileMode&&window.setTimeout((()=>this._adaptiveInput&&this._adaptiveInput.focus()),300),this.base.togglePopup(s),this.applyState(s)}}get _inputId(){return this.props.id+"-accessibility-id"}get document(){if(i.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get value(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""}get name(){return this.props.name}get validity(){const e=void 0!==this.props.validationMessage,t=!this.required||""!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}}get opened(){return!!(void 0!==this.props.opened?this.props.opened:this.state.opened)}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}get validityStyles(){return void 0!==this.props.validityStyles?this.props.validityStyles:e.defaultProps.validityStyles}get required(){return void 0!==this.props.required?this.props.required:e.defaultProps.required}componentDidUpdate(e,t){var s;const{groupField:i=""}=this.props,n=F(this.props),{data:a=[]}=e,o=this.focusedIndex(),l=n[o],r=a!==n,d=void 0!==l&&t.focusedItem!==l,u=void 0!==this.props.opened?this.props.opened:this.state.opened,p=void 0!==e.opened?e.opened:t.opened,c=!p&&u;if(""===i)(u&&(d||r)||c)&&this.base.scrollToItem(o);else if(!this._isScrolling){const e=null==(s=this.base.getGroupedDataModernMode(n,i))?void 0:s.indexOf(l);c&&(n&&0!==n.length&&this.base.resetGroupStickyHeader(n[0][i],this),this.base.scrollToItem(e)),u&&p&&d&&this.base.scrollToItem(e)}this.setValidity()}componentDidMount(){var e;this.observerResize=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.base.didMount(),this.setValidity(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentWillUnmount(){this.observerResize&&this.observerResize.disconnect()}render(){const{dir:e,disabled:t,label:s,className:a,style:o,loading:l,suggest:r,size:d,rounded:u,fillMode:p}=this.props,c=!this.validityStyles||this.validity.valid,g=this.base,v=this.value,m=!1!==this.props.clearButton&&!l&&!!v,f=this.props.id||this._inputId,b=this.state.focused;"string"==typeof r&&(this._suggested=r);const[y,C]=X(this.props.prefix||h.Fragment),[x,I]=X(this.props.suffix||h.Fragment),k=h.createElement(h.Fragment,null,h.createElement("span",{className:i.classNames("k-autocomplete k-input",a,{[`k-input-${ne[d]||d}`]:d,[`k-rounded-${ae[u]||u}`]:u,[`k-input-${p}`]:p,"k-invalid":!c,"k-focus":b&&!t,"k-loading":l,"k-required":this.required,"k-disabled":t}),ref:e=>{this._element=e,g.wrapper=e},style:s?{...o,width:void 0}:o,dir:e,onFocus:this.mobileMode?e=>this.handleWrapperClick(e):this.handleFocus,onBlur:this.handleBlur,onClick:this.handleWrapperClick},this.props.prefix&&h.createElement(y,{...C}),this.renderSearchBar(v||"",f),l&&h.createElement(i.IconWrap,{className:"k-input-loading-icon",name:"loading"}),m&&!l&&h.createElement(Q,{onClick:this.clearButtonClick,key:"clearbutton"}),this.props.suffix&&h.createElement(x,{...I}),!this.mobileMode&&this.renderListContainer()),this.mobileMode&&this.renderAdaptiveListContainer());return s?h.createElement(n.FloatingLabel,{label:s,editorId:f,editorValue:v,editorValid:c,editorDisabled:t,style:{width:o?o.width:void 0},children:k}):k}onNavigate(e,t,s){const i=this.value,{textField:n,focusedItemIndex:a}=this.props,o=F(this.props),l=void 0!==this.state.focusedItem?o.findIndex((e=>w(e,this.state.focusedItem,n))):a?a(o,i,n):o.indexOf(S(o,i,n)),r=this.base.navigation.navigate({keyCode:t,current:l,max:o.length-1,min:0,skipItems:s||void 0});void 0!==r&&this.itemFocus(r,e),this.applyState(e)}applyInputValue(e,t,s){const n=void 0!==this.props.opened?this.props.opened:this.state.opened,{textField:a}=this.props,o=F(this.props),l=o[this.focusedIndex()];if(this._suggested="",n&&s===i.Keys.enter&&l&&!l.disabled){const s=I(o[this.focusedIndex(e)],a);this.triggerOnChange(s,t)}n&&this.togglePopup(t),this.applyState(t)}renderSearchBar(e,t){const s=this.base,{placeholder:i,tabIndex:n,disabled:a,readonly:o,inputAttributes:l}=this.props,{focused:r}=this.state,d=void 0!==this.props.opened?this.props.opened:this.state.opened;return h.createElement(J,{id:t,placeholder:i,tabIndex:n,accessKey:this.props.accessKey,value:e,suggestedText:this._suggested,focused:r,name:this.props.name,ref:e=>{this._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.onChangeHandler,onFocus:s.handleFocus,onBlur:this.handleBlur,disabled:a,readOnly:o,expanded:d,owns:s.listBoxId,activedescendant:"option-"+s.guid+"-"+this.focusedIndex(),role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,ariaRequired:this.required,render:this.props.valueRender,inputAttributes:l})}renderListContainer(){const e=this.base,{dir:t,groupField:s}=this.props,n=F(this.props),a=e.getPopupSettings(),o=void 0!==this.props.opened?this.props.opened:this.state.opened,l=void 0!==a.width?a.width:e.popupWidth;let{group:r}=this.state;return void 0===r&&void 0!==s&&(r=I(n[0],s)),h.createElement(g,{width:l,popupSettings:{...a,anchor:a.anchor||this.element,show:o,popupClass:i.classNames(a.popupClass,"k-list-container","k-autocomplete-popup")},dir:void 0!==t?t:this.base.dirCalculated,itemsCount:[n.length]},this.listContainerContent())}renderList(){const e=this.base,t=e.getPopupSettings(),{textField:s,listNoDataRender:i,itemRender:n,groupHeaderItemRender:a}=this.props,o=F(this.props),l=this.value,r=void 0!==this.props.opened?this.props.opened:this.state.opened;return h.createElement(H,{id:e.listBoxId,show:r,data:o.slice(),focusedIndex:this.focusedIndex(),value:l,textField:s,valueField:s,highlightSelected:!1,optionsGuid:e.guid,groupField:this.props.groupField,groupMode:"modern",listRef:t=>{e.list=t},wrapperStyle:this.mobileMode?{}:{maxHeight:t.height},wrapperCssClass:"k-list-content",onClick:this.handleItemClick,itemRender:n,groupHeaderItemRender:a,noDataRender:i,onMouseDown:e=>e.preventDefault(),onScroll:this.onScroll})}triggerOnChange(e,t,s){this.value===e&&!s||(t.data.value=e,this._valueDuringOnChange=e,t.events.push({type:"onChange",...s||{}}))}focusElement(e){this._skipFocusEvent=!0,e.focus(),window.setTimeout((()=>this._skipFocusEvent=!1),0)}applyState(e){this.base.applyState(e),this._valueDuringOnChange=void 0}suggestValue(e){if(this._suggested="",e){const{textField:t}=this.props,s=F(this.props),i=s[C(s,e,t)];if(i){const s=I(i,t);e.toLowerCase()!==s.toLowerCase()&&(this._suggested=s.substring(e.length))}}}focusedIndex(e){const{textField:t,focusedItemIndex:s,skipDisabledItems:i}=this.props,n=F(this.props),a=void 0!==e?e:this.value;if(void 0!==this.state.focusedItem)return n.findIndex((e=>w(e,this.state.focusedItem,t)));if(s)return s(n,a,t);const o=n.indexOf(S(n,a,t));return i&&t&&-1===o?n.findIndex((e=>!e.disabled&&e[t])):Math.max(0,o)}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}};oe.displayName="AutoComplete",oe.propTypes={...U.basicPropTypes,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"solid","flat","outline"]),groupField:s.string,suggest:s.oneOfType([s.bool,s.string]),placeholder:s.string,value:s.string,defaultValue:s.string,validationMessage:s.string,required:s.bool,readonly:s.bool,clearButton:s.bool,valueRender:s.func,id:s.string,ariaLabelledBy:s.string,ariaDescribedBy:s.string,list:s.any,adaptive:s.bool,adaptiveTitle:s.string,adaptiveSubtitle:s.string,onCancel:s.func,skipDisabledItems:s.bool,inputAttributes:s.object},oe.defaultProps={...U.defaultProps,size:"medium",rounded:"medium",fillMode:"solid",skipDisabledItems:!0,prefix:void 0,suffix:void 0};let le=oe;const re=i.createPropsContext(),de=i.withIdHOC(i.withPropsContext(re,i.withAdaptiveModeContext(le)));de.displayName="KendoReactAutoComplete";const ue=e=>e.syntheticEvent.preventDefault(),pe=e=>e.syntheticEvent.stopPropagation();class ce extends h.Component{render(){const{data:e,guid:t,focused:s,tagRender:i,tag:n,onTagDelete:a,size:o}=this.props;return h.createElement(h.Fragment,null,e.map(((l,r)=>{const u=n?h.createElement(n,{key:l.text+r,tagData:l,guid:t,focusedTag:s,onTagDelete:a}):h.createElement(d.Chip,{id:`tag-${t}-${l.text.replace(/\s+/g,"-")}`,"aria-selected":!0,role:"option","aria-setsize":e.length,key:l.text+r,text:l.text,removable:!0,onRemove:e=>a.call(void 0,l.data,e.syntheticEvent),onMouseDown:ue,onClick:pe,className:l===s?"k-focus":void 0,size:o});return i?i(l,u):u})),this.props.children)}}var he=(e=>(e[e.PopupList=0]="PopupList",e[e.TagsList=1]="TagsList",e))(he||{});const{sizeMap:ge,roundedMap:ve}=i.kendoThemeMaps,me=e=>e.preventDefault(),fe=e=>2===e,be=class e extends h.Component{constructor(e){super(e),this.state={activedescendant:he.PopupList,currentValue:[]},this._element=null,this._valueItemsDuringOnChange=null,this.base=new U(this),this._tags=[],this._input=null,this._adaptiveInput=null,this._skipFocusEvent=!1,this._lastSelectedOrDeslectedItemIndex=null,this.itemHeight=0,this.scrollToFocused=!1,this.showLicenseWatermark=!1,this.focus=()=>{this._input&&this._input.focus()},this.handleItemSelect=(e,t)=>{const{dataItemKey:s,virtual:i}=this.props,n=F(this.props),a=n[e-(i?i.skip:0)],o=this.value.findIndex((e=>w(e,a,s)));this._lastSelectedOrDeslectedItemIndex=n.findIndex((e=>w(e,a,s)));let l=[];-1!==o?(l=this.value,l.splice(o,1)):l=[...this.value,a],(void 0!==this.props.filter?this.props.filter:this.state.text)&&!this.mobileMode&&(this.state.text&&(t.data.text=""),this.base.filterChanged("",t)),this._adaptiveInput&&this._adaptiveInput.blur(),void 0!==this.state.focusedIndex&&(t.data.focusedIndex=void 0),this.triggerOnChange(l,t),this.base.triggerPageChangeCornerItems(a,t)},this.onTagDelete=(e,t)=>{const s=this.base.initState();s.syntheticEvent=t,this.opened&&this.base.togglePopup(s),!this.state.focused&&!this.mobileMode&&(s.data.focused=!0,this.focus());const i=this.value;k(i,e,this.props.dataItemKey),this.triggerOnChange(i,s),this.applyState(s)},this.itemFocus=(e,t)=>{const{allowCustom:s,virtual:i}=this.props,n=F(this.props),a=i?i.skip:0,o=void 0!==this.props.filter?this.props.filter:this.state.text,{focusedIndex:l}=this.getFocusedState(),r=s&&o,d=n[e-a];d&&l!==e?this.state.focusedIndex!==e&&(t.data.focusedIndex=e,t.data.activedescendant=he.PopupList):r&&-1===e&&void 0!==this.state.focusedIndex&&(t.data.focusedIndex=void 0),this.base.triggerPageChangeCornerItems(d,t)},this.componentRef=e=>{this._element=e,this.base.wrapper=e},this.searchbarRef=e=>{const t=this._input=e&&e.input;t&&this.state.focused&&window.setTimeout((()=>t.focus()),0)},this.onChangeHandler=e=>{const t=this.base.initState(),s=e.target.value;t.syntheticEvent=e,void 0===this.props.filter&&(t.data.text=s),t.data.focusedIndex=void 0,this.opened||(this.base.togglePopup(t),this.setState({currentValue:this.value})),this.base.filterChanged(s,t),this.applyState(t),this.setState({group:void 0})},this.clearButtonClick=e=>{const t=this.base.initState();t.syntheticEvent=e,e.stopPropagation(),this.value.length>0&&this.triggerOnChange([],t),void 0!==this.state.focusedIndex&&(t.data.focusedIndex=void 0),this.opened&&this.base.togglePopup(t);const s=void 0!==this.props.filter?this.props.filter:this.state.text;f(s)&&""!==s&&this.base.filterChanged("",t),this.state.text&&(t.data.text=""),this._lastSelectedOrDeslectedItemIndex=null,this.applyState(t)},this.onInputKeyDown=e=>{const{textField:t,groupField:s}=this.props,n=F(this.props),a=e.keyCode,o=void 0!==this.props.filter?this.props.filter:this.state.text,l=void 0!==this.props.opened?this.props.opened:this.state.opened,{focusedItem:r,focusedIndex:d}=this.getFocusedState(),u=this.base.initState();if(u.syntheticEvent=e,!o&&this.value.length>0&&(a===i.Keys.left||a===i.Keys.right||a===i.Keys.home||a===i.Keys.end||a===i.Keys.delete||a===i.Keys.backspace)&&!e.shiftKey)return this.onTagsNavigate(e,u);const p=()=>{e.preventDefault(),this.base.togglePopup(u),this.applyState(u)};if(this.opened)if(a===i.Keys.pageUp)e.preventDefault(),this.base.scrollPopupByPageSize(-1);else if(a===i.Keys.pageDown)e.preventDefault(),this.base.scrollPopupByPageSize(1);else if((e.ctrlKey||e.metaKey)&&"KeyA"===e.code){const e=(this.state.value&&this.state.value.length)===n.length?[]:n;this.updateStateOnKeyboardNavigation(e,u)}else if((e.ctrlKey||e.metaKey)&&e.shiftKey&&e.keyCode===i.Keys.end){const e=n.slice(this.getFocusedState().focusedIndex);this.itemFocus(n.length-1,u),this.updateStateOnKeyboardNavigation(e,u)}else if((e.ctrlKey||e.metaKey)&&e.shiftKey&&e.keyCode===i.Keys.home){const e=n.slice(0,this.getFocusedState().focusedIndex+1);this.itemFocus(0,u),this.updateStateOnKeyboardNavigation(e,u)}else if(e.shiftKey&&e.keyCode===i.Keys.up){let e;const t=this.getLastSelectedOrDeselectedIndex(1,d);null===t?e=0!==d?n.slice(d-1,d):[n[d]]:t===d?e=[n[t-1]]:d>=0&&(e=t>d?n.slice(d-1,t):n.slice(t-1,d)),e&&e.length>0&&(d>=1&&this.itemFocus(d-1,u),this.updateStateOnKeyboardNavigation(e,u))}else if(e.shiftKey&&e.keyCode===i.Keys.down){let e;const t=this.getLastSelectedOrDeselectedIndex(0,d);null===t?e=d!==n.length-1?n.slice(d,d+1):[n[d]]:t===d?e=n.slice(d,d+2):d>=0&&(e=t>d?n.slice(d+1,t+1):n.slice(t,d+2)),e&&e.length>=1&&(this.itemFocus(d+1,u),this.updateStateOnKeyboardNavigation(e,u))}else if(e.altKey&&a===i.Keys.up)p();else if(a===i.Keys.up||a===i.Keys.down){if(""!==s&&t)if(!this.props.skipDisabledItems&&l)this.onNavigate(u,a);else{let e=0;if(a===i.Keys.down||a===i.Keys.right){const s=n.slice(d+1).find((e=>!e.disabled&&e[t]));e=s&&n.findIndex((e=>e[t]===s[t]))}else if(a===i.Keys.up||a===i.Keys.left){let s;if(-1===d)s=n,e=n.findIndex((e=>!e.disabled&&e[t]));else{s=n.slice(0,d);let i=s.pop();for(;i&&i.disabled;)i=s.pop();e=i&&n.findIndex((e=>e[t]===i[t]))}}if(e){const t=e-d;this.onNavigate(u,a,t)}else void 0!==e&&this.onNavigate(u,a)}else if(!this.props.skipDisabledItems&&l)this.onNavigate(u,a);else{let e=null;if(a===i.Keys.down||a===i.Keys.right)e=n.slice(d+1).find((e=>!e.disabled));else if(a===i.Keys.up||a===i.Keys.left){const t=n.slice(0,d);for(e=t.pop();e&&e.disabled;)e=t.pop()}if(e){const t=e.id-d-1;this.onNavigate(u,a,t)}else this.onNavigate(u,a)}this.applyState(u),e.preventDefault()}else a===i.Keys.enter?(e.preventDefault(),this.props.allowCustom&&o&&null===r?this.customItemSelect(e):r&&r.disabled?p():this.selectFocusedItem(e)):a===i.Keys.esc&&p();else e.altKey&&a===i.Keys.down?p():a===i.Keys.esc&&this.clearButtonClick(e)},this.listContainerContent=()=>{const{header:e,footer:t,allowCustom:s,size:n,groupStickyHeaderItemRender:o,groupField:l,list:r}=this.props,d=F(this.props),u=void 0!==this.props.filter?this.props.filter:this.state.text,{focusedType:p}=this.getFocusedState(),c=s&&u&&h.createElement("div",{className:i.classNames("k-list",{[`k-list-${ge[n]||n}`]:n}),key:"customitem",onClick:this.customItemSelect,onMouseDown:me},h.createElement("div",{className:i.classNames("k-list-item k-custom-item",{"k-focus":fe(p)}),style:{fontStyle:"italic"}},u,h.createElement(i.IconWrap,{name:"plus",icon:a.plusIcon,style:{position:"absolute",right:"0.5em"}})));let{group:g}=this.state;return void 0===g&&void 0!==l&&(g=I(d[0],l)),h.createElement(h.Fragment,null,e&&h.createElement("div",{className:"k-list-header"},e),c,h.createElement("div",{className:i.classNames("k-list",{[`k-list-${this.mobileMode?"lg":ge[n]||n}`]:n,"k-virtual-list":this.base.vs.enabled})},!r&&g&&0!==d.length&&h.createElement(m,{group:g,groupMode:"modern",render:o}),this.renderList()),this.showLicenseWatermark&&h.createElement(i.WatermarkOverlay,{message:this.licenseMessage}),t&&h.createElement("div",{className:"k-list-footer"},t))},this.renderListContainer=()=>{const e=this.base,{dir:t}=this.props,s=F(this.props),n=this.base.getPopupSettings(),a=void 0!==n.width?n.width:e.popupWidth,o={dir:void 0!==t?t:e.dirCalculated,width:a,popupSettings:{...n,popupClass:i.classNames(n.popupClass,"k-list-container","k-multiselect-popup"),anchor:n.anchor||this.element,show:this.opened,onOpen:this.onPopupOpened,onClose:this.onPopupClosed},itemsCount:[s.length,this.value.length]};return h.createElement(g,{...o},this.listContainerContent())},this.renderAdaptiveListContainer=()=>{const{adaptiveTitle:e,adaptiveSubtitle:t,filterable:s,filter:i}=this.props,{windowWidth:n=0}=this.state,a=void 0!==i?i:this.state.text,o=s?h.createElement(v,{value:a,ref:e=>{this._adaptiveInput=e&&e.element},onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,size:"large",rounded:this.props.rounded,fillMode:this.props.fillMode,placeholder:this.props.placeholder}):null,l={title:e||this.props.label,subTitle:t,expand:this.opened,onClose:e=>this.closePopup(e),windowWidth:n,mobileFilter:o};return h.createElement(G,{...l},h.createElement(u.ActionSheetContent,null,h.createElement("div",{className:"k-list-container"},this.listContainerContent())))},this.closePopup=e=>{const t=this.base.initState();t.syntheticEvent=e,e.stopPropagation(),void 0!==this.state.focusedIndex&&(t.data.focusedIndex=void 0),this.opened&&this.base.togglePopup(t),t.events.push({type:"onClose"});const s=void 0!==this.props.filter?this.props.filter:this.state.text;f(s)&&""!==s&&this.base.filterChanged("",t),this.state.text&&(t.data.text=""),this.applyState(t)},this.onCancel=e=>{const t=this.base.initState();t.syntheticEvent=e,e.stopPropagation(),void 0!==this.state.focusedIndex&&(t.data.focusedIndex=void 0),this.opened&&this.base.togglePopup(t),t.events.push({type:"onCancel"});const s=void 0!==this.props.filter?this.props.filter:this.state.text;f(s)&&""!==s&&this.base.filterChanged("",t),this.state.text&&(t.data.text=""),this.applyState(t)},this.renderList=()=>{const{textField:e,listNoDataRender:t,itemRender:s,groupHeaderItemRender:i,dataItemKey:n,virtual:a={skip:0,total:void 0}}=this.props,o=F(this.props),l=this.base.vs,{focusedIndex:r}=this.getFocusedState(),d=this.base.getPopupSettings(),u=`translateY(${l.translate}px)`;return h.createElement(H,{id:this.base.listBoxId,show:this.opened,data:o.slice(),focusedIndex:r-a.skip,value:this.value,textField:e,valueField:n,optionsGuid:this.base.guid,groupField:this.props.groupField,groupMode:"modern",listRef:e=>{l.list=this.base.list=e},wrapperStyle:this.mobileMode?{}:{maxHeight:d.height},wrapperCssClass:"k-list-content",listStyle:l.enabled?{transform:u}:void 0,key:"listKey",skip:a.skip,onClick:this.handleItemClick,itemRender:s,groupHeaderItemRender:i,noDataRender:t,onMouseDown:me,onBlur:this.handleBlur,onScroll:this.onScroll,wrapperRef:l.scrollerRef,scroller:this.base.renderScrollElement(),ariaSetSize:a.total})},this.onScroll=e=>{const{vs:t,list:s}=this.base;t.scrollHandler(e);const{groupField:i}=this.props;let n=F(this.props);if(i&&n.length&&i){const a=this.itemHeight=this.itemHeight||(t.enabled?t.itemHeight:s?s.children[0].offsetHeight:0),o=e.target.scrollTop-t.skip*a;n=this.base.getGroupedDataModernMode(n,i);let l=n[0][i];for(let e=1;e<n.length&&!(a*e>o);e++)n[e]&&n[e][i]&&(l=n[e][i]);l!==this.state.group&&this.setState({group:l})}},this.customItemSelect=e=>{const t=void 0!==this.props.filter?this.props.filter:this.state.text,{textField:s}=this.props;if(!t)return;const i=this.base.initState();i.syntheticEvent=e;const n=s?{[s]:t}:t;void 0!==this.state.text&&(i.data.text=""),i.data.focusedIndex=void 0,this.base.filterChanged("",i);const a=[...this.value,n];this.triggerOnChange(a,i),this.base.togglePopup(i),this.applyState(i)},this.handleWrapperClick=e=>{const t=this._input;!this.opened&&t&&this.focusElement(t);const s=this.base.initState();s.syntheticEvent=e,!this.state.focused&&!this.mobileMode&&(s.events.push({type:"onFocus"}),s.data.focused=!0),this.mobileMode&&(this.setState({currentValue:this.tagsToRender}),this.mobileMode&&window.setTimeout((()=>this._adaptiveInput&&this._adaptiveInput.focus()),300)),this.base.togglePopup(s),this.applyState(s)},this.handleItemClick=(e,t)=>{const s=this.base.initState();s.syntheticEvent=t,this.handleItemSelect(e,s),this.props.autoClose&&this.base.togglePopup(s),t.stopPropagation(),this.applyState(s)},this.handleBlur=e=>{if(!this.state.focused||this._skipFocusEvent)return;const t=this.base.initState(),{allowCustom:s,filterable:i}=this.props;t.syntheticEvent=e,t.data.focused=!1,t.events.push({type:"onBlur"}),this.opened&&!this.mobileMode&&(this.state.opened&&(t.data.opened=!1),t.events.push({type:"onClose"})),!s&&!i&&this.state.text&&(t.data.text=""),this.applyState(t)},this.handleFocus=e=>{this._skipFocusEvent||this.base.handleFocus(e)},this.onPopupOpened=()=>{this._input&&this.state.focused&&!this.mobileMode&&this.focusElement(this._input)},this.onPopupClosed=()=>{this.state.focused&&window.setTimeout((()=>{this.state.focused&&this.focusElement(this._input)}),0)},this.setValidity=()=>{this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity.valid?"":this.props.validationMessage||"Please enter a valid value!")},this.validate(e),this.licenseMessage=i.getLicenseMessage($)}get _inputId(){return this.props.id}get document(){if(i.canUseDOM)return this.element&&this.element.ownerDocument||document}validate(e){if(e.filterable||e.virtual){const t=[];e.filterable&&t.push("filterable"),e.virtual&&t.push("virtualization"),this.showLicenseWatermark=!i.validatePackage($,{component:"MultiSelect",features:t})}}get element(){return this._element}get opened(){return!!(void 0!==this.props.opened?this.props.opened:this.state.opened)}get tagsToRender(){const{tags:e,textField:t}=this.props,s=[];return void 0===e?this.value.forEach((e=>{s.push({text:I(e,t),data:[e]})})):s.push(...e),s}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}get value(){const e=[];return this._valueItemsDuringOnChange?e.push(...this._valueItemsDuringOnChange):this.props.value?e.push(...this.props.value):this.state.value?e.push(...this.state.value):this.props.defaultValue&&e.push(...this.props.defaultValue),e}get name(){return this.props.name}get validity(){const e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&this.value.length>0&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}}get required(){return void 0!==this.props.required?this.props.required:e.defaultProps.required}get validityStyles(){return void 0!==this.props.validityStyles?this.props.validityStyles:e.defaultProps.validityStyles}componentDidUpdate(e,t){var s;const{virtual:i,groupField:n=""}=this.props,a=F(this.props),o=i?i.skip:0,l=e.virtual?e.virtual.total:0,r=void 0!==e.opened?e.opened:t.opened,d=!r&&this.opened,u=r&&!this.opened,p=this.base.getPopupSettings();if(this.validate(this.props),this.base.didUpdate(),!p.animate&&u&&this.onPopupClosed(),i&&i.total!==l)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{let{focusedItem:e,focusedIndex:t}=this.getFocusedState();""!==n&&(t=null==(s=this.base.getGroupedDataModernMode(a,n))?void 0:s.indexOf(e)),d&&i?this.base.scrollToVirtualItem(i,t-o):d&&!i?(a&&0!==a.length&&this.base.resetGroupStickyHeader(a[0][n],this),this.base.scrollToItem(t)):this.opened&&r&&e&&this.scrollToFocused&&this.base.scrollToItem(t-o)}this.scrollToFocused=!1,this.setValidity()}componentDidMount(){var e;this.observerResize=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.base.didMount(),this.setValidity(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentWillUnmount(){var e;null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.disconnect()}onNavigate(e,t,s){const{allowCustom:n}=this.props,a=F(this.props),o=void 0!==this.props.filter?this.props.filter:this.state.text,{focusedType:l,focusedIndex:r}=this.getFocusedState(),d=n&&o,u=fe(l),p=this.base,c=p.vs;if(this.opened&&t===i.Keys.up&&u)void 0!==this.state.focusedIndex&&(e.data.focusedIndex=void 0);else{const i=p.navigation.navigate({keyCode:t,current:r,max:(c.enabled?c.total:a.length)-1,min:d?-1:0,skipItems:s||void 0});void 0!==i&&(this.itemFocus(i,e),this.scrollToFocused=!0)}this.applyState(e)}render(){const{style:e,className:t,label:s,dir:a,disabled:o,textField:l,dataItemKey:r,virtual:d,size:u,rounded:p,fillMode:c,loading:g,filter:v}=this.props,{text:m,focused:f,focusedTag:b,currentValue:y}=this.state,C=this.base.vs,x=this.props.id||this._inputId;C.enabled=void 0!==d,void 0!==d&&(C.skip=d.skip,C.total=d.total,C.pageSize=d.pageSize);const k=this.mobileMode&&this.opened?y:this.tagsToRender;this.setItems(this.tagsToRender,this._tags);const w=!this.validityStyles||this.validity.valid,S=!!(void 0!==v?v:m)||k&&k.length>0,[F,M]=X(this.props.prefix||h.Fragment),[K,N]=X(this.props.suffix||h.Fragment),T=h.createElement(h.Fragment,null,h.createElement("div",{ref:this.componentRef,className:i.classNames("k-multiselect k-input",t,{[`k-input-${ge[u]||u}`]:u,[`k-rounded-${ve[p]||p}`]:p,[`k-input-${c}`]:c,"k-focus":f&&!o,"k-invalid":!w,"k-disabled":o,"k-loading":g,"k-required":this.required}),style:s?{...e,width:void 0}:e,dir:a,onFocus:e=>{this.mobileMode?this.handleWrapperClick(e):this.handleFocus(e)},onBlur:this.handleBlur,onClick:this.handleWrapperClick,onMouseDown:E},this.props.prefix&&h.createElement(F,{...M}),h.createElement("div",{className:i.classNames("k-input-values")},h.createElement("div",{className:i.classNames("k-chip-list",{[`k-chip-list-${ge[u]||u}`]:u}),role:"listbox",id:"tagslist-"+this.base.guid},k&&k.length>0&&h.createElement(ce,{tagRender:this.props.tagRender,onTagDelete:this.onTagDelete,data:k,guid:this.base.guid,focused:b?k.find((e=>D(e,b,r))):void 0,size:u})),this.renderSearchBar(x)),g&&h.createElement(i.IconWrap,{className:"k-input-loading-icon",name:"loading"}),this.props.suffix&&h.createElement(K,{...N}),S&&h.createElement(Q,{onClick:this.clearButtonClick}),!this.mobileMode&&this.renderListContainer()),this.mobileMode&&this.renderAdaptiveListContainer());return s?h.createElement(n.FloatingLabel,{label:s,editorId:x,editorValue:m||I(this.value[0],l),editorValid:w,editorDisabled:o,style:{width:e?e.width:void 0},children:T}):T}renderSearchBar(e){const{activedescendant:t,focusedTag:s,currentValue:i}=this.state,{disabled:n,placeholder:a,ariaDescribedBy:o,ariaLabelledBy:l,ariaLabel:r,inputAttributes:d}=this.props,u=!this.mobileMode&&(void 0!==this.props.filter?this.props.filter:this.state.text)||"",{focusedIndex:p}=this.getFocusedState(),c=0!==this.value.length||u?void 0:a,g=i&&i.length>0?void 0:a,v=t===he.TagsList&&void 0!==s?`tag-${this.base.guid}-${s.text.replace(/\s+/g,"-")}`:`option-${this.base.guid}-${p}`,m={accessKey:this.props.accessKey,tabIndex:this.props.tabIndex};return h.createElement(J,{id:e,size:Math.max((c||"").length,u.length,1),placeholder:this.mobileMode&&this.opened?g:c,value:u,onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,ref:this.searchbarRef,disabled:n,expanded:this.opened,owns:this.base.listBoxId,role:"combobox",activedescendant:v,ariaDescribedBy:`tagslist-${this.base.guid}${o?" "+o:""}`,ariaLabelledBy:l,ariaRequired:this.required,ariaLabel:r,inputAttributes:d,...m})}onTagsNavigate(e,t){const s=e.keyCode,{focusedTag:n}=this.state,a=this._tags,o=this.props.dataItemKey;let l,r=n?a.findIndex((e=>D(e,n,o))):-1;const d=-1!==r;if(s===i.Keys.left)r=d?Math.max(0,r-1):a.length-1,l=a[r];else if(s===i.Keys.right)r===a.length-1?l=void 0:d&&(r=Math.min(a.length-1,r+1),l=a[r]);else if(s!==i.Keys.home||e.shiftKey)if(s!==i.Keys.end||e.shiftKey){if(s===i.Keys.delete){if(d){const e=this.value;k(e,a[r].data,o),this.triggerOnChange(e,t)}}else if(s===i.Keys.backspace){const e=this.value;if(d)k(e,a[r].data,o),this.triggerOnChange(e,t);else if(!d&&a.length){const s=a.pop();k(e,s.data,o),this.triggerOnChange(e,t)}}}else l=a[a.length-1];else l=a[0];l!==n&&(t.data.focusedTag=l,t.data.activedescendant=he.TagsList),this.applyState(t)}triggerOnChange(e,t){void 0===this.props.value&&(t.data.value=[...e]),this._valueItemsDuringOnChange=[],this.setItems(e,this._valueItemsDuringOnChange),t.events.push({type:"onChange"})}selectFocusedItem(e,t){const{virtual:s}=this.props,i=F(this.props),{focusedIndex:n}=t||this.getFocusedState();void 0!==i[n-(s?s.skip:0)]&&this.handleItemClick(n,e)}setItems(e,t){t.length=0,t.push(...e)}getFocusedState(){const{focusedIndex:e}=this.state,t=void 0!==this.props.filter?this.props.filter:this.state.text,{allowCustom:s,dataItemKey:i,virtual:n,textField:a,focusedItemIndex:o=C,skipDisabledItems:l}=this.props,r=F(this.props),d=n&&n.skip||0;let u;if(void 0!==e)return{focusedIndex:e,focusedItem:r[e-d],focusedType:1};const p=this.value;if(s&&t)return{focusedItem:null,focusedIndex:-1,focusedType:2};if(t)return u=o(r,t,a),{focusedItem:r[u],focusedIndex:u+d,focusedType:1};if(p.length){const e=p[p.length-1];return u=r.findIndex((t=>w(t,e,i))),void 0!==r[u]?{focusedIndex:u+d,focusedItem:r[u],focusedType:1}:{focusedType:0,focusedIndex:-1}}if(l&&a&&!t&&0===d){const e=r.findIndex((e=>!e.disabled&&e[a]));return{focusedIndex:e,focusedItem:r[e-d],focusedType:1}}return 0===d?{focusedItem:r[0],focusedIndex:0,focusedType:1}:{focusedType:0,focusedIndex:-1}}focusElement(e){this._skipFocusEvent=!0,e.focus(),window.setTimeout((()=>this._skipFocusEvent=!1),0)}applyState(e){this.base.applyState(e),this._valueItemsDuringOnChange=null}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}updateStateOnKeyboardNavigation(e,t){this.setState({value:e}),this.triggerOnChange(e,t),this.applyState(t)}getLastSelectedOrDeselectedIndex(e,t){return null===this._lastSelectedOrDeslectedItemIndex&&(this._lastSelectedOrDeslectedItemIndex=t),null!==this._lastSelectedOrDeslectedItemIndex?this._lastSelectedOrDeslectedItemIndex+e:null}};be.displayName="MultiSelect",be.propTypes={...U.propTypes,autoClose:s.bool,value:s.arrayOf(s.any),defaultValue:s.arrayOf(s.any),dataItemKey:s.string,placeholder:s.string,tags:s.arrayOf(s.shape({text:s.string,data:s.arrayOf(s.any)})),tagRender:s.func,id:s.string,ariaLabelledBy:s.string,ariaDescribedBy:s.string,groupField:s.string,list:s.any,adaptive:s.bool,adaptiveTitle:s.string,adaptiveSubtitle:s.string,onCancel:s.func,skipDisabledItems:s.bool,inputAttributes:s.object},be.defaultProps={...U.defaultProps,autoClose:!0,required:!1,size:"medium",rounded:"medium",fillMode:"solid",groupMode:"modern",skipDisabledItems:!0,prefix:void 0,suffix:void 0};let ye=be;const Ce=i.createPropsContext(),xe=i.withIdHOC(i.withPropsContext(Ce,i.withAdaptiveModeContext(ye)));xe.displayName="KendoReactMultiSelect";const Ie=e=>h.createElement(H,{...e,wrapperCssClass:"k-table-body k-table-scroller",listClassName:i.classNames("k-table k-table-list",{"k-virtual-table":void 0!==e.virtual}),listStyle:{...e.listStyle}}),ke=i.createPropsContext(),we=h.forwardRef(((e,t)=>{const s=i.usePropsContext(ke,e),n=h.useRef(null),a=h.useRef(null),o=i.getScrollbarWidth(),{columns:l=Ee.columns,popupSettings:r=Ee.popupSettings,size:d=Ee.size,rounded:u=Ee.rounded,fillMode:p=Ee.fillMode,className:c,prefix:g,suffix:v,onOpen:m,onClose:f,onFocus:b,onBlur:y,onChange:C,onFilterChange:x,onPageChange:k,...w}=s;h.useImperativeHandle(n,(()=>{var e;return{element:(null==(e=a.current)?void 0:e.element)||null,focus(){a.current&&a.current.focus()},get value(){var e;return null==(e=a.current)?void 0:e.value},get name(){var e;return null==(e=a.current)?void 0:e.name},props:s}})),h.useImperativeHandle(t,(()=>n.current));const S=h.useMemo((()=>{if(void 0!==s.groupField&&s.data)return I(s.data[0],s.groupField)}),[s.data,s.groupField]),[E,D]=h.useState(S),[F,M]=h.useState(!0),[K]=g?X(s.prefix||h.Fragment):[],[N]=v?X(s.suffix||h.Fragment):[],T=h.useMemo((()=>{const e=h.createElement("th",{className:"k-table-th",colSpan:l.length},E);return h.createElement(h.Fragment,null,s.header,h.createElement("div",{className:"k-table-header-wrap k-table-scroller"},h.createElement("table",{className:"k-table",role:"presentation"},h.createElement("colgroup",null,l.map(((e,t)=>h.createElement("col",{key:e.uniqueKey?e.uniqueKey:t,style:{width:e.width?e.width:Ee.width}})))),h.createElement("thead",{className:"k-table-thead"},h.createElement("tr",{className:"k-table-row"},l.map(((e,t)=>h.createElement("th",{className:"k-table-th",key:e.uniqueKey?e.uniqueKey:t},e.header||" ")))),E&&F&&h.createElement("tr",{className:"k-table-group-row"},s.groupStickyHeaderItemRender?s.groupStickyHeaderItemRender.call(void 0,e,{}):e)))))}),[s.header,l,E,F]),P=h.useMemo((()=>`calc(${l.map((e=>((e,t)=>e?"number"==typeof e?e+"px":e:t)(e.width,Ee.width))).filter(Boolean).join(" + ")} + ${o}px + 4px)`),[l,o]),O=s.virtual?s.virtual.skip:0,R=h.useCallback(((e,t)=>{const n=l.map(((e,n)=>h.createElement("span",{className:s.itemRender?void 0:"k-table-td",style:s.itemRender?void 0:{width:e.width?e.width:Ee.width},key:e.uniqueKey?e.uniqueKey:n},e.field?String(i.getter(e.field)(t.dataItem)):"")));let a,o,r,d,u=s.data||[];const p=t.index-O;void 0!==s.groupField&&(d=i.getter(s.groupField),o=d(u[p]),r=d(u[p-1]),o&&r&&o!==r&&(a=o)),a&&"classic"===s.groupMode&&n.push(h.createElement("div",{key:"group",className:"k-table-td k-table-group-td"},h.createElement("span",null,a)));const c=h.cloneElement(e,{...e.props,className:i.classNames("k-table-row",{"k-table-alt-row":t.index%2!=0,"k-focus":t.focused,"k-selected":t.selected,"k-first":!!a,"k-disabled":t.dataItem.disabled})},n);return s.itemRender?s.itemRender.call(void 0,c,t):c}),[l,s.groupField,s.itemRender,s.data,O]),B=h.useCallback(((e,t)=>{e&&e.call(void 0,{...t,target:n.current})}),[]),L=h.useCallback((e=>(s.virtual||D(S),B(m,e))),[B,m,s.virtual,S]),_=h.useCallback((e=>B(f,e)),[f]),z=h.useCallback((e=>B(b,e)),[b]),H=h.useCallback((e=>B(y,e)),[y]),V=h.useCallback((e=>B(C,e)),[C]),q=h.useCallback((e=>B(k,e)),[k]),W=h.useCallback((e=>(D(S),B(x,{...e,mobileMode:e.target.mobileMode}))),[x]),A=h.useCallback((e=>{D(e.group)}),[]);h.useEffect((()=>{i.setScrollbarWidth()})),h.useEffect((()=>{const e=s.data;D(S),e&&0!==e.length?M(!0):M(!1)}),[s.data]);const U=h.useCallback((e=>h.createElement(Ie,{...e})),[]);return h.createElement(ie,{...w,list:U,popupSettings:{...r,popupClass:i.classNames("k-dropdowngrid-popup",r.popupClass),width:r.width||P,className:r.className},ref:a,header:T,itemRender:R,groupHeaderItemRender:s.groupHeaderItemRender,size:d,rounded:u,fillMode:p,groupMode:s.groupMode,groupField:s.groupField,isMultiColumn:!0,onOpen:L,onClose:_,onFocus:z,onBlur:H,onChange:V,onFilterChange:W,onPageChange:q,onGroupScroll:A,className:i.classNames("k-dropdowngrid",c),required:s.required,adaptive:s.adaptive,adaptiveFilter:s.adaptiveFilter,adaptiveTitle:s.adaptiveTitle,adaptiveSubtitle:s.adaptiveSubtitle,footer:s.footer,footerClassName:"k-table-footer",prefix:K,suffix:N})})),Se={...te.propTypes,columns:s.any.isRequired},Ee={columns:[],popupSettings:{},width:"200px",size:"medium",rounded:"medium",fillMode:"solid"};function De(e){return"string"==typeof e?Number(e.replace("px","")):e}function Fe(e,t,s,i){const n=De(t.popupSettings.width),a=(void 0!==s.width&&De(s.width))!==n,o=void 0!==i.width,l=a?s.width:o?i.width:n,r=De(function(e,t,s){const[i,n]=h.useState(t);return h.useEffect((()=>{void 0!==i&&e.current&&n(e.current.offsetWidth)}),s),i}(e,l));return a||o?l:r&&n&&r>n?r:n}we.displayName="KendoMultiColumnComboBox",we.propTypes=Se;const Me=e=>h.createElement("div",{className:"k-nodata"},h.createElement("div",null,e.children)),{sizeMap:Ke,roundedMap:Ne}=i.kendoThemeMaps,Te=e=>h.createElement("span",{className:"k-input-value-text"},e.children),Pe=e=>e.split("_").map((e=>parseInt(e,10))),Oe={selectField:"selected",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},data:[],required:!1,style:{},validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},Re=i.createPropsContext(),Be=h.forwardRef(((e,t)=>{const s=!i.validatePackage($,{component:"DropDownTree"}),l=i.getLicenseMessage($),c=i.usePropsContext(Re,e),g={...Oe,...c},m=i.useId(),b=g.id||m,{data:y,dataItemKey:C,popupSettings:x={},style:k,opened:S,disabled:E,onOpen:D=i.noop,onClose:F=i.noop,placeholder:M,label:K,name:N,selectField:T,subItemsField:R,validationMessage:B,valid:L,required:_,validityStyles:H}=g,V=i.getTabIndex(g.tabIndex,E),q=h.useRef(null),W=h.useRef(null),A=h.useRef(null),U=h.useRef(null),j=h.useRef(null),Y=h.useRef(null),Z=h.useRef(!1),[J,Q]=h.useState(void 0),X=void 0!==g.value,ee=X?g.value:void 0!==J?J:g.defaultValue,te=f(ee),se=te?I(ee,g.textField):"",ie=((e,t)=>{const{validationMessage:s,valid:i,required:n}=e;return{customError:void 0!==s,valid:!!(void 0!==i?i:!n||t),valueMissing:!t}})({validationMessage:B,valid:L,required:_},te),ne=h.useContext(i.ZIndexContext),ae=ne?ne+2e3:12e3,oe=h.useCallback((()=>W.current&&W.current.focus()),[]);h.useImperativeHandle(q,(()=>({props:g,element:W.current,focus:oe}))),h.useImperativeHandle(t,(()=>q.current));const le=i.useRtl(W,g.dir),re={width:Fe(W,Oe,{...Oe.popupSettings,...x},k),...void 0!==le?{direction:le}:{}},[de,ue]=h.useState(!1),pe=void 0!==S?S:de,[ce,he]=h.useState(!1),[ge,ve]=h.useState(),[me,fe]=h.useState(""),be=i.useAdaptiveModeContext(),ye=!!(ge&&be&&ge<=be.medium&&g.adaptive),Ce=h.useCallback((()=>{j.current&&j.current.setCustomValidity&&j.current.setCustomValidity(ie.valid?"":void 0===B?"Please select a value from the list!":B)}),[B,ie]);h.useEffect(Ce),h.useEffect((()=>{const e=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver($e.bind(void 0));return null!=document&&document.body&&e&&e.observe(document.body),()=>{null!=document&&document.body&&e&&e.disconnect()}}),[]);const xe=h.useCallback((e=>{if(!pe){if(D){const t={...e};D.call(void 0,t)}void 0===S&&ue(!0)}}),[pe,S,D]),Ie=h.useCallback((e=>{if(pe){if(F){const t={...e};F.call(void 0,t)}void 0===S&&(ue(!1),ye&&setTimeout((()=>{var e;De(null==(e=U.current)?void 0:e.element)}),300))}}),[pe,S,F,ye]),ke=h.useCallback((e=>{if(!e.isDefaultPrevented()&&q.current){he(!0);const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};(pe?Ie:xe)(t)}}),[pe,S,D,F]),we=h.useCallback((e=>{Z.current=!0,e(),window.setTimeout((()=>Z.current=!1),0)}),[]),Se=h.useCallback((e=>{var t,s;const{keyCode:n,altKey:a}=e,o=Y.current&&Y.current.element;if(!q.current||e.isDefaultPrevented()&&(null==(t=A.current)?void 0:t.element)===e.target)return;const l={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};if(pe)if(n===i.Keys.esc||a&&n===i.Keys.up)e.preventDefault(),Ie(l);else if(o&&o.querySelector(".k-focus")&&(n===i.Keys.up||n===i.Keys.down||n===i.Keys.left||n===i.Keys.right||n===i.Keys.home||n===i.Keys.end)){if(n===i.Keys.up&&null!=(s=A.current)&&s.element){const e=Array.from(o.querySelectorAll(".k-treeview-item")),t=[...e].reverse().find((e=>null==e?void 0:e.querySelector(".k-focus")));if(t&&0===e.indexOf(t))return we((()=>{var e;De(null==(e=A.current)?void 0:e.element)}))}we(i.noop)}else n===i.Keys.down&&we((()=>{var e;De((null==(e=A.current)?void 0:e.element)||o)}));else a&&n===i.Keys.down?(e.preventDefault(),xe(l)):pe||n===i.Keys.esc&&We(e)}),[pe,S,D,F]),Ee=h.useCallback((e=>{const{keyCode:t,altKey:s}=e;s||t!==i.Keys.up&&t!==i.Keys.down||(e.preventDefault(),we(t===i.Keys.up?()=>{De(W.current)}:()=>{var e;De(null==(e=Y.current)?void 0:e.element)}))}),[]),De=h.useCallback((e=>{e&&we((()=>e.focus()))}),[]),Be=h.useCallback((()=>{var e;ce||!pe||S?c.filterable?De(null==(e=A.current)?void 0:e.element):De(Y.current&&Y.current.element):Ie({target:q.current})}),[F,c.filterable,ce,S,pe]),Le=h.useCallback((()=>{ce&&De(W.current)}),[ce]),_e=h.useCallback((e=>{if(!ce&&!Z.current&&(he(!0),c.onFocus&&q.current)){const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};c.onFocus.call(void 0,t)}}),[ce,c.onFocus]),ze=h.useCallback((e=>{if(ce&&!Z.current&&q.current){he(!1);const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};if(c.onBlur){const e={...t};c.onBlur.call(void 0,e)}ye||Ie(t)}}),[ce,c.onBlur,pe,S,F]),He=h.useCallback((()=>{ce&&we(i.noop),ye&&setTimeout((()=>{var e;De(null==(e=U.current)?void 0:e.element)}),300)}),[ce,ye]),Ve=h.useCallback(((e,t,s)=>{if(c.onChange){const i={value:t,level:s?Pe(s):[],...e};c.onChange.call(void 0,i)}X||Q(t)}),[c.onChange,X]),qe=h.useCallback((e=>{if(w(e.item,ee,C)||!q.current)return;const{item:t,itemHierarchicalIndex:s,nativeEvent:i,syntheticEvent:n}=e,a={syntheticEvent:n,nativeEvent:i,target:q.current};Ve(a,t,s),Ie(a)}),[X,ee,c.onChange,C,pe,S,F]),We=h.useCallback((e=>{if(!q.current)return;const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};Ve(t,null),Ie(t),e.preventDefault()}),[X,c.onChange,pe,S,F]),Ae=h.useCallback((e=>{if(e.syntheticEvent.stopPropagation(),c.onExpandChange&&q.current){const{item:t,itemHierarchicalIndex:s,nativeEvent:i,syntheticEvent:n}=e,a={level:Pe(s),item:t,nativeEvent:i,syntheticEvent:n,target:q.current};c.onExpandChange.call(void 0,a)}}),[c.onExpandChange]),Ue=h.useCallback((e=>{if(c.onFilterChange&&q.current){const t={filter:{field:c.textField,operator:"contains",value:e.target.value},syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,target:q.current};c.onFilterChange.call(void 0,t),void 0===c.filter&&fe(e.target.value)}}),[c.onFilterChange,c.filter,c.textField]),$e=h.useCallback((e=>{for(const t of e)ve(t.target.clientWidth)}),[]),Ge=h.useMemo((()=>X||!te?y:i.mapTree(y,R,(e=>i.extendDataItem(e,R,{[T]:w(e,ee,C)})))),[y,ee,X,te,T,R]),je=g.listNoData||Me,Ye=g.valueHolder||Te,Ze=r.useLocalization(),Je=!H||ie.valid,{size:Qe,rounded:Xe,fillMode:et}=g,tt=h.createElement(h.Fragment,null,h.createElement("span",{className:i.classNames("k-dropdowntree k-picker",g.className,{[`k-picker-${Ke[Qe]||Qe}`]:Qe,[`k-rounded-${Ne[Xe]||Xe}`]:Xe,[`k-picker-${et}`]:et,"k-focus":ce,"k-invalid":!Je,"k-loading":g.loading,"k-required":_,"k-disabled":g.disabled}),tabIndex:V,accessKey:g.accessKey,id:b,style:K?{...k,width:void 0}:k,dir:le,ref:W,onKeyDown:E?void 0:Se,onMouseDown:He,onClick:E?void 0:ke,onFocus:ye?e=>ke(e):_e,onBlur:ze,role:"combobox","aria-haspopup":"tree","aria-expanded":pe,"aria-disabled":E,"aria-label":K,"aria-labelledby":g.ariaLabelledBy,"aria-describedby":g.ariaDescribedBy,"aria-required":_},h.createElement("span",{className:"k-input-inner"},(se||M)&&h.createElement(Ye,{item:ee},se||M)),g.loading&&h.createElement(i.IconWrap,{className:"k-input-loading-icon",name:"loading"}),te&&!E&&h.createElement("span",{onClick:We,className:"k-clear-value",title:Ze.toLanguageString(O,z[O]),role:"button",tabIndex:-1,onMouseDown:e=>e.preventDefault()},h.createElement(i.IconWrap,{name:"x",icon:a.xIcon})),h.createElement(d.Button,{tabIndex:-1,type:"button","aria-label":"select",className:"k-input-button",size:Qe,fillMode:et,themeColor:"base",rounded:null,icon:"caret-alt-down",svgIcon:a.caretAltDownIcon}),h.createElement("select",{name:N,ref:j,tabIndex:-1,"aria-hidden":!0,title:K,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},h.createElement("option",{value:g.valueMap?g.valueMap.call(void 0,ee):ee})),!ye&&h.createElement(i.ZIndexContext.Provider,{value:ae},h.createElement(o.Popup,{...x,className:i.classNames(x.className,{"k-rtl":"rtl"===le}),popupClass:i.classNames(x.popupClass,"k-dropdowntree-popup k-list-container"),style:re,anchor:x.anchor||W.current,show:pe,onOpen:Be,onClose:Le},g.filterable&&h.createElement(v,{value:void 0===g.filter?me:g.filter,ref:A,onChange:Ue,onKeyDown:Ee,size:Qe,rounded:Xe,fillMode:et,renderListFilterWrapper:!0,renderPrefixSeparator:!0}),y.length>0?h.createElement(p.TreeView,{style:{height:x.height},ref:Y,tabIndex:V,data:Ge,focusIdField:C,textField:g.textField,selectField:T,expandField:g.expandField,childrenField:R,expandIcons:!0,onItemClick:qe,onExpandChange:Ae,size:Qe,item:g.item,dir:le,animate:x.animate}):h.createElement(je,null,Ze.toLanguageString(P,z[P])),s&&h.createElement(i.WatermarkOverlay,{message:l})))),ye&&(()=>{const e=g.filterable?h.createElement(v,{value:void 0===g.filter?me:g.filter,ref:U,onChange:Ue,onKeyDown:Ee,size:"large",rounded:Xe,fillMode:et,placeholder:M}):null,t={title:g.adaptiveTitle||K,subTitle:g.adaptiveSubtitle,expand:pe,onClose:e=>Ie(e),windowWidth:ge,mobileFilter:e};return h.createElement(G,{...t},h.createElement(u.ActionSheetContent,null,y.length>0?h.createElement(p.TreeView,{ref:Y,tabIndex:V,data:Ge,focusIdField:C,textField:g.textField,selectField:T,expandField:g.expandField,childrenField:R,expandIcons:!0,onItemClick:qe,onExpandChange:Ae,size:"large",item:g.item,dir:le,animate:x.animate}):h.createElement(je,null,Ze.toLanguageString(P,z[P]))))})());return K?h.createElement(n.FloatingLabel,{label:K,editorValue:se,editorPlaceholder:M,editorValid:Je,editorDisabled:E,editorId:b,style:{width:k?k.width:void 0},children:tt,dir:le}):tt})),Le={opened:s.bool,disabled:s.bool,dir:s.string,tabIndex:s.number,accessKey:s.string,data:s.array,value:s.any,valueMap:s.func,placeholder:s.string,dataItemKey:s.string.isRequired,textField:s.string.isRequired,selectField:s.string,expandField:s.string,subItemsField:s.string,className:s.string,style:s.object,label:s.string,validationMessage:s.string,validityStyles:s.bool,valid:s.bool,required:s.bool,name:s.string,id:s.string,ariaLabelledBy:s.string,ariaDescribedBy:s.string,filterable:s.bool,filter:s.string,loading:s.bool,popupSettings:s.shape({animate:s.oneOfType([s.bool,s.shape({openDuration:s.number,closeDuration:s.number})]),popupClass:s.string,className:s.string,appendTo:s.any,width:s.oneOfType([s.string,s.number]),height:s.oneOfType([s.string,s.number])}),onOpen:s.func,onClose:s.func,onFocus:s.func,onBlur:s.func,onChange:s.func,onFilterChange:s.func,onExpandChange:s.func,item:s.func,valueHolder:s.func,listNoData:s.func,adaptiveTitle:s.string,adaptiveSubtitle:s.string,adaptive:s.bool};Be.displayName="KendoReactDropDownTree",Be.propTypes=Le;const{sizeMap:_e,roundedMap:ze}=i.kendoThemeMaps,He=e=>e.split("_").map((e=>parseInt(e,10))),Ve={checkField:"checkField",checkIndeterminateField:"checkIndeterminateField",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},size:"medium",rounded:"medium",fillMode:"solid",required:!1,validityStyles:!0},qe=i.createPropsContext(),We=h.forwardRef(((e,t)=>{const s=i.usePropsContext(qe,e),a=!i.validatePackage($,{component:"MultiSelectTree"}),l=i.getLicenseMessage($),d=i.useId(),c=s.id||d,{data:g=[],dataItemKey:m,style:f={},placeholder:b,label:y,name:C,validationMessage:x,valid:k,tags:S,value:E,opened:F,disabled:M,popupSettings:K=Ve.popupSettings,checkField:N=Ve.checkField,checkIndeterminateField:T=Ve.checkIndeterminateField,subItemsField:O=Ve.subItemsField,size:R=Ve.size,rounded:B=Ve.rounded,fillMode:L=Ve.fillMode,required:_=Ve.required,validityStyles:H=Ve.validityStyles,onOpen:V=i.noop,onClose:q=i.noop}=s,W=i.getTabIndex(s.tabIndex,M),A=h.useRef(null),U=h.useRef(null),j=h.useRef(null),Y=h.useRef(null),Z=h.useRef(null),J=h.useRef(null),X=h.useRef(!1),ee=h.useRef([]),te=h.useRef(null),[se,ie]=h.useState(),[ne,ae]=h.useState(!1),[oe,le]=h.useState(!1),[re,de]=h.useState(),[ue,pe]=h.useState([]),[he,ge]=h.useState(""),ve=void 0!==F?F:ne,me=!(!Array.isArray(E)||!E.length),fe=((e,t)=>{const{validationMessage:s,valid:i,required:n}=e;return{customError:void 0!==s,valid:!!(void 0!==i?i:!n||t),valueMissing:!t}})({validationMessage:x,valid:k,required:_},me),be=i.useRtl(U,s.dir),ye={width:Fe(U,Ve,K,f),...void 0!==be?{direction:be}:{}},Ce=h.useCallback((()=>U.current&&U.current.focus()),[]),xe=i.useAdaptiveModeContext(),Ie=!!(re&&xe&&re<=xe.medium&&s.adaptive);ee.current=void 0===S?(E||[]).map((e=>({text:I(e,s.textField),data:[e]}))):[...S],h.useImperativeHandle(A,(()=>({props:s,element:U.current,focus:Ce}))),h.useImperativeHandle(t,(()=>A.current));const ke=h.useCallback((()=>{Z.current&&Z.current.setCustomValidity&&Z.current.setCustomValidity(fe.valid?"":void 0===x?"Please select a value from the list!":x)}),[x,fe]);h.useEffect(ke),h.useEffect((()=>{const e=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(Ye.bind(void 0));return null!=document&&document.body&&e&&e.observe(document.body),()=>{e&&e.disconnect()}}),[]),h.useEffect((()=>{te.current&&ve&&te.current.setPosition(te.current.element)}),[E,ve]);const we=h.useCallback(((e,t,i)=>{if(s.onChange){const n={items:t,operation:i,...e};s.onChange.call(void 0,n)}}),[s.onChange]),Se=h.useCallback((e=>{if(w(e.item,E,m)||!A.current)return;const{item:t,nativeEvent:s,syntheticEvent:i}=e,n={syntheticEvent:i,nativeEvent:s,target:A.current};we(n,[t],"toggle")}),[E,m,we]),Ee=h.useCallback((e=>{if(!ve){if(V){const t={...e};V.call(void 0,t)}void 0===F&&(ae(!0),pe(E||[]),Ie&&setTimeout((()=>{var e;Ne(null==(e=Y.current)?void 0:e.element)}),300))}}),[ve,F,V,Ie,Y]),De=h.useCallback((e=>{if(ve){if(q){const t={...e};q.call(void 0,t)}void 0===F&&ae(!1)}}),[ve,F,q]),Ke=h.useCallback((e=>{X.current=!0,e(),window.setTimeout((()=>X.current=!1),0)}),[]),Ne=h.useCallback((e=>{e&&Ke((()=>e.focus()))}),[Ke]),Te=h.useCallback((()=>{var e;!oe&&ve?De({target:A.current}):s.filterable?Ne(null==(e=j.current)?void 0:e.element):Ne(J.current&&J.current.element)}),[oe,ve,Ne,De,s.filterable]),Pe=h.useCallback((()=>{oe&&Ne(U.current)}),[oe,Ne]),Oe=h.useCallback((e=>{if(!oe&&!X.current&&(le(!0),s.onFocus&&A.current)){const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};s.onFocus.call(void 0,t)}}),[oe,s.onFocus]),Re=h.useCallback((e=>{if(oe&&!X.current&&A.current){le(!1);const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};if(s.onBlur){const e={...t};s.onBlur.call(void 0,e)}Ie||De(t)}}),[oe,s.onBlur,ve,F,q]),Be=h.useCallback((()=>{oe&&Ke(i.noop)}),[oe,Ke]),Le=h.useCallback((e=>{if(!e.isDefaultPrevented()&&A.current){le(!0);const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};ve||Ee(t)}}),[ve,Ee]),We=h.useCallback((e=>{var t,s;const{keyCode:n,altKey:a}=e,o=J.current&&J.current.element;if(!A.current||e.isDefaultPrevented()&&(null==(t=j.current)?void 0:t.element)===e.target)return;const l={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};if(E&&E.length>0&&(n===i.Keys.left||n===i.Keys.right||n===i.Keys.home||n===i.Keys.end||n===i.Keys.delete)){const e=ee.current;let t,s=se?e.findIndex((e=>D(e,se,m))):-1;const a=-1!==s;n===i.Keys.left?(s=a?Math.max(0,s-1):e.length-1,t=e[s]):n===i.Keys.right?s===e.length-1?t=void 0:a&&(s=Math.min(e.length-1,s+1),t=e[s]):n===i.Keys.home?t=e[0]:n===i.Keys.end?t=e[e.length-1]:n===i.Keys.delete&&a&&we(l,e[s].data,"delete"),t!==se&&ie(t)}if(ve)if(n===i.Keys.esc||a&&n===i.Keys.up)e.preventDefault(),De(l);else if(o&&o.querySelector(".k-focus")&&(n===i.Keys.up||n===i.Keys.down||n===i.Keys.left||n===i.Keys.right||n===i.Keys.home||n===i.Keys.end)){if(n===i.Keys.up&&null!=(s=j.current)&&s.element){const e=Array.from(o.querySelectorAll(".k-treeview-item")),t=[...e].reverse().find((e=>!(!e||!e.querySelector(".k-focus"))));if(t&&0===e.indexOf(t))return Ke((()=>{var e;Ne(null==(e=j.current)?void 0:e.element)}))}Ke(i.noop)}else n===i.Keys.down&&Ke((()=>{var e;Ne((null==(e=j.current)?void 0:e.element)||o)}));else a&&n===i.Keys.down&&(e.preventDefault(),Ee(l))}),[ve,De,Ne,Ke,Ee,se,m,E,we]),Ae=h.useCallback((e=>{const{keyCode:t,altKey:s}=e;s||t!==i.Keys.up&&t!==i.Keys.down||(e.preventDefault(),Ke(t===i.Keys.up?()=>{Ne(U.current)}:()=>{Ne(J.current&&J.current.element)}))}),[Ne,Ke]),Ue=h.useCallback((e=>{if(!A.current)return;const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};we(t,[],"clear"),De(t),e.preventDefault()}),[we,De]),$e=h.useCallback(((e,t)=>{var s;De({target:A.current}),oe||Ne(null==(s=j.current)?void 0:s.element),we({syntheticEvent:t,nativeEvent:t.nativeEvent,target:A.current},e,"delete")}),[we,De,Ne,oe]),Ge=h.useCallback((e=>{if(s.onExpandChange&&A.current){const{item:t,itemHierarchicalIndex:i,nativeEvent:n,syntheticEvent:a}=e,o={level:He(i),item:t,nativeEvent:n,syntheticEvent:a,target:A.current};s.onExpandChange.call(void 0,o)}}),[s.onExpandChange]),je=h.useCallback((e=>{if(s.onFilterChange&&A.current){const t={filter:{field:s.textField,operator:"contains",value:e.target.value},syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,target:A.current};s.onFilterChange.call(void 0,t),void 0===s.filter&&ge(e.target.value)}}),[s.onFilterChange,s.filter,s.textField]);h.useCallback((e=>{if(!A.current)return;const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};s.onCancel&&s.onCancel.call(void 0,t),De(t),e.preventDefault()}),[s.onCancel,De]);const Ye=h.useCallback((e=>{for(const t of e)de(t.target.clientWidth)}),[]),Ze=s.listNoData||Me,Je=r.useLocalization(),Qe=!H||fe.valid,Xe=Ie&&ve?ue:ee.current,et=h.createElement(h.Fragment,null,h.createElement("span",{className:i.classNames("k-multiselecttree k-input",s.className,{[`k-input-${_e[R]||R}`]:R,[`k-rounded-${ze[B]||B}`]:B,[`k-input-${L}`]:L,"k-focus":oe&&!M,"k-invalid":!Qe,"k-disabled":M,"k-loading":s.loading,"k-required":_}),tabIndex:W,accessKey:s.accessKey,id:c,style:y?{...f,width:void 0}:f,dir:be,ref:U,onKeyDown:M?void 0:We,onMouseDown:Be,onFocus:e=>{Ie?Le(e):Oe(e)},onBlur:Re,role:"combobox","aria-haspopup":"tree","aria-expanded":ve,"aria-disabled":M,"aria-label":y,"aria-labelledby":s.ariaLabelledBy,"aria-describedby":s.ariaDescribedBy?s.ariaDescribedBy:"tagslist-"+c,"aria-required":s.required,onClick:M?void 0:Le},h.createElement("div",{id:"tagslist-"+c,className:i.classNames("k-input-values k-chip-list",{[`k-chip-list-${_e[R]||R}`]:R})},Xe.length>0&&h.createElement(ce,{tag:s.tag,onTagDelete:$e,data:Xe,guid:c,focused:se?ee.current.find((e=>D(e,se,m))):void 0,size:R})),h.createElement("span",{className:"k-input-inner"},0===Xe.length&&h.createElement("span",{className:"k-input-value-text"},b)),s.loading&&h.createElement(i.IconWrap,{className:"k-input-loading-icon",name:"loading"}),me&&!M&&Xe.length>0&&h.createElement(Q,{onClick:Ue}),h.createElement("select",{name:C,ref:Z,tabIndex:-1,"aria-hidden":!0,title:y,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},h.createElement("option",{value:s.valueMap?s.valueMap.call(void 0,E):E})),!Ie&&h.createElement(o.Popup,{...K,popupClass:i.classNames(K.popupClass,"k-multiselecttree-popup"),className:i.classNames(K.className,{"k-rtl":"rtl"===be}),style:ye,anchor:K.anchor||U.current,show:ve,onOpen:Te,onClose:Pe,ref:te},s.filterable&&h.createElement(v,{value:void 0===s.filter?he:s.filter,ref:j,onChange:je,onKeyDown:Ae,tabIndex:W,size:R,rounded:B,fillMode:L,renderListFilterWrapper:!0,renderPrefixSeparator:!0}),g.length>0?h.createElement(p.TreeView,{style:{height:K.height},ref:J,tabIndex:W,data:g,focusIdField:m,textField:s.textField,checkField:N,checkIndeterminateField:T,expandField:s.expandField,childrenField:O,expandIcons:!0,onItemClick:Se,onCheckChange:Se,onExpandChange:Ge,checkboxes:!0,size:R,item:s.item,dir:be}):h.createElement(Ze,null,Je.toLanguageString(P,z[P])),a&&h.createElement(i.WatermarkOverlay,{message:l}))),Ie&&(()=>{const e=s.filterable?h.createElement(v,{value:void 0===s.filter?he:s.filter,ref:Y,onChange:je,onKeyDown:Ae,size:"large",rounded:B,fillMode:L,placeholder:b}):null,t={title:s.adaptiveTitle||s.label,subTitle:s.adaptiveSubtitle,expand:ve,onClose:e=>De(e),windowWidth:re,mobileFilter:e};return h.createElement(G,{...t},h.createElement(u.ActionSheetContent,null,g.length>0?h.createElement(p.TreeView,{ref:J,tabIndex:W,data:g,focusIdField:m,textField:s.textField,checkField:N,checkIndeterminateField:T,expandField:s.expandField,childrenField:O,expandIcons:!0,onItemClick:Se,onCheckChange:Se,onExpandChange:Ge,checkboxes:!0,size:"large",item:s.item,dir:be}):h.createElement(Ze,null,Je.toLanguageString(P,z[P]))))})());return y?h.createElement(n.FloatingLabel,{label:y,editorValue:me,editorPlaceholder:b,editorValid:Qe,editorDisabled:M,editorId:c,style:{width:f?f.width:void 0},children:et,dir:be}):et})),Ae={opened:s.bool,disabled:s.bool,dir:s.string,tabIndex:s.number,accessKey:s.string,data:s.array,value:s.any,valueMap:s.func,placeholder:s.string,dataItemKey:s.string.isRequired,textField:s.string.isRequired,checkField:s.string,checkIndeterminateField:s.string,expandField:s.string,subItemsField:s.string,className:s.string,style:s.object,label:s.string,validationMessage:s.string,validityStyles:s.bool,valid:s.bool,required:s.bool,name:s.string,id:s.string,ariaLabelledBy:s.string,ariaDescribedBy:s.string,filterable:s.bool,filter:s.string,loading:s.bool,tags:s.arrayOf(s.shape({text:s.string,data:s.arrayOf(s.any)})),popupSettings:s.shape({animate:s.oneOfType([s.bool,s.shape({openDuration:s.number,closeDuration:s.number})]),popupClass:s.string,className:s.string,appendTo:s.any,width:s.oneOfType([s.string,s.number]),height:s.oneOfType([s.string,s.number])}),onOpen:s.func,onClose:s.func,onFocus:s.func,onBlur:s.func,onChange:s.func,onFilterChange:s.func,onExpandChange:s.func,onCancel:s.func,item:s.func,listNoData:s.func,adaptiveTitle:s.string,adaptiveSubtitle:s.string,adaptive:s.bool};We.displayName="KendoReactMultiSelectTree",We.propTypes=Ae;const Ue=(e,t)=>{const s={};return e&&e.length&&e.forEach((e=>{s[t(e)]=!0})),s};e.AutoComplete=de,e.AutoCompletePropsContext=re,e.AutoCompleteWithoutContext=le,e.ComboBox=ie,e.ComboBoxPropsContext=se,e.ComboBoxWithoutContext=te,e.DropDownList=j,e.DropDownListPropsContext=Z,e.DropDownTree=Be,e.DropDownTreePropsContext=Re,e.List=H,e.ListContainer=g,e.ListFilter=v,e.ListItem=N,e.MultiColumnComboBox=we,e.MultiColumnComboBoxPropsContext=ke,e.MultiSelect=xe,e.MultiSelectPropsContext=Ce,e.MultiSelectTree=We,e.MultiSelectTreePropsContext=qe,e.MultiSelectWithoutContext=ye,e.SearchBar=J,e.TagList=ce,e.dropDownListDefaultProps=Y,e.dropdownsMessages=z,e.findByFieldValue=(e,t,s)=>{if(!e)return;const i=e.findIndex((e=>I(e,t)===s));return e[i]},e.getItemValue=I,e.getMultiSelectTreeValue=(e,t)=>{const{items:s,dataItemKey:n,value:a,subItemsField:o="items",operation:l}=t,r=i.getter(n),d=Ue(a,r);if("clear"===l)return[];if("delete"===l){const e=Ue(s,r);return a.filter((t=>!e[r(t)]))}const u=s[0],p=r(u),c=i.getter(o),h=[...e],g=[];let v,m=[];for(;h.length;){const e=h.pop();if(p===r(e)){m=g.map((e=>e.item)),v=e;break}{g&&g.length&&g[g.length-1].parentPosition===h.length&&g.pop();const t=c(e);t&&t.length&&(g.push({item:e,parentPosition:h.length}),h.push(...t))}}const f=[...c(v)||[]],b=[];for(;f.length;){const e=f.pop();b.push(e);const t=c(e);t&&t.length&&f.push(...t)}const y=[];if(!d[p]){y.push(...a),y.push(v),y.push(...b.filter((e=>!d[r(e)])));const e=m.filter((e=>!d[r(e)])),t=Ue(y,r);for(let s=e.length-1;s>-1;s--){const i=e[s],n=c(i);if(n.filter((e=>t[r(e)])).length<n.length)break;y.push(i),t[r(i)]=!0}}else{const e=r(v),t=Ue(b,r),s=Ue(m,r);y.push(...a.filter((i=>{const n=r(i);return!t[n]&&e!==n&&!s[n]})))}return y},e.getValueMap=Ue,e.nodata=P,e.scrollToItem=y}));
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-labels"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-treeview")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-labels","@progress/kendo-svg-icons","@progress/kendo-react-popup","@progress/kendo-react-inputs","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-react-layout","@progress/kendo-react-treeview"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactDropdowns={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactLabels,e.KendoSvgIcons,e.KendoReactPopup,e.KendoReactInputs,e.KendoReactIntl,e.KendoReactButtons,e.KendoReactLayout,e.KendoReactTreeview)}(this,(function(e,t,s,i,n,a,o,l,r,d,u,p){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var h=c(t);const g=e=>{const{children:t,width:s,dir:n,itemsCount:a,popupSettings:l}=e,r=h.useContext(i.ZIndexContext),d=r?r+2e3:12e3;return h.createElement(i.ZIndexContext.Provider,{value:d},h.createElement(o.Popup,{style:{width:s,direction:n},contentKey:a&&a.join(),...l},t))},v=h.forwardRef(((e,t)=>{const s=h.useRef(null),{renderListFilterWrapper:n=!1,renderPrefixSeparator:o=!1,placeholder:r,...d}=e,u=i.useUnstyled(),p=u&&u.uDropDownsBase;h.useImperativeHandle(t,(()=>s.current));const c=h.createElement(l.TextBox,{...d,ref:s,className:i.classNames(i.uDropDownsBase.searchbox({c:p})),value:e.value||"",onChange:e.onChange,onKeyDown:e.onKeyDown,tabIndex:e.tabIndex,onClick:e=>e.stopPropagation(),size:e.size,fillMode:e.fillMode,rounded:e.rounded,prefix:()=>h.createElement(h.Fragment,null,h.createElement(l.InputPrefix,null,h.createElement(i.IconWrap,{name:"search",icon:a.searchIcon,className:i.classNames(i.uDropDownsBase.inputIcon({c:p}))})),o&&h.createElement(l.InputSeparator,null)),placeholder:r});return n?h.createElement("div",{className:i.classNames(i.uDropDownsBase.listFilter({c:p}))}," ",c," "):c}));v.propTypes={value:s.oneOfType([s.string,s.number,s.array]),tabIndex:s.number,onChange:s.func,onKeyDown:s.func,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"solid","flat","outline"]),renderListFilterWrapper:s.bool,placeholder:s.string,renderPrefixSeparator:s.bool},v.displayName="KendoReactListFilter";const m=e=>{const{group:t,groupMode:s,render:n}=e,a=i.useUnstyled(),o=a&&a.uDropDownsBase,l=h.createElement("div",{className:i.classNames(i.uDropDownsBase.groupStickyHeader({c:o}))},"classic"===s?t:h.createElement("div",{className:i.classNames(i.uDropDownsBase.listHeaderText({c:o}))},t));return void 0!==n?n.call(void 0,l,e):l},f=e=>null!=e,b=(e,t,s)=>{if(!f(e))return!1;let i=String(e);return s&&(i=i.toLowerCase()),0===i.indexOf(t)},y=(e,t,s,i,n)=>{const a=e.offsetHeight,o=t.children.item(s),l=o.offsetTop+(n?i-e.scrollTop:0),r=o.offsetHeight;if(n){let t=0;l+r>a?t=l+r-a:l<0&&(t=l),0!==t?e.scrollTop+=t:0===e.scrollTop&&0!==i&&(e.scrollTop=i)}else l+r>a+e.scrollTop?e.scrollTop=l+r-a:l<e.scrollTop&&(e.scrollTop-=e.scrollTop-l)},C=(e,t,s)=>{let i=-1;if(t){t=t.toLowerCase();for(let n=0;n<e.length;n++){const a=(I(e[n],s)||"")+"";if(a&&a.toLowerCase().startsWith(t)){i=n;break}}}return i},x=(e,t,s,i=!1)=>{const n=e=>i?e:e.toLowerCase();return e.findIndex((e=>s?n(I(e,s))===n(t):n(t)===n(e.toString())))},I=(e,t)=>{if(t&&f(e)){const s=t.split(".");let i=e;return s.forEach((e=>{i=i?i[e]:void 0})),i}return e},k=(e,t,s)=>{t.forEach((t=>{const i=e.findIndex((e=>w(e,t,s)));-1!==i&&e.splice(i,1)}))},w=(e,t,s)=>e===t||f(e)===f(t)&&I(e,s)===I(t,s),S=(e,t,s)=>{if(t){const i=x(e,t,s,!0);return-1!==i?e[i]:e[C(e,t,s)]}return e[0]},E=e=>{"INPUT"!==e.target.nodeName&&e.preventDefault()},D=(e,t,s)=>!!e==!!t&&e.text===t.text&&(e===t||((e=[],t=[],s)=>{if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!w(e[i],t[i],s))return!1;return!0})(e.data,t.data,s)),F=e=>{const{data:t=[],groupField:s}=e;return s?t.filter((e=>s&&void 0!==e[s])):t},M=e=>e.preventDefault(),K=e=>{const{selected:t,defaultItem:s,textField:n}=e,a=i.useUnstyled(),o=a&&a.uDropDownsBase;return h.createElement("div",{onClick:e.onClick,onMouseDown:M,style:{position:"unset"},className:i.classNames(i.uDropDownsBase.optionLabel({c:o,selected:t}))},I(s,n)||"")},N=e=>{const{selected:t,group:s,dataItem:n,virtual:a,groupMode:o,disabled:l,id:r,focused:d,render:u}=e,p=i.useUnstyled(),c=p&&p.uDropDownsBase,g=h.createElement("li",{id:r,role:"option","aria-selected":t,"aria-disabled":!!l||void 0,className:i.classNames(i.uDropDownsBase.li({c:c,selected:t,focused:d,first:!!s&&"classic"===o,disabled:l})),onClick:t=>e.onClick(e.index,t),style:{position:a?"relative":"unset"}},h.createElement("span",{className:i.classNames(i.uDropDownsBase.itemText({c:c}))},I(n,e.textField).toString()),void 0!==s&&"classic"===o?h.createElement("div",{className:i.classNames(i.uDropDownsBase.itemGroupLabel({c:c}))},s):null);return void 0!==u?u.call(void 0,g,e):g},T=e=>{const{group:t,virtual:s,render:n,isMultiColumn:a=!1,id:o}=e,l=i.useUnstyled(),r=l&&l.uDropDownsBase,d=h.createElement("li",{id:o,role:"group",className:i.classNames(i.uDropDownsBase.groupLi({c:r,isMultiColumn:a})),style:a?{boxSizing:"inherit",position:s?"relative":"unset"}:{position:s?"relative":"unset"}},h.createElement("span",{className:n?void 0:i.classNames(i.uDropDownsBase.groupItemText({c:r,isMultiColumn:a}))},t));return void 0!==n?n.call(void 0,d,e):d},P="dropdowns.nodata",O="dropdowns.clear",R="dropdowns.comboArrowBtnAriaLabelExpand",B="dropdowns.comboArrowBtnAriaLabelCollapse",L="dropdowns.dropDownListArrowBtnAriaLabel",_="dropdowns.dropDownListAdaptiveFilterPlaceholder",z={[O]:"clear",[P]:"NO DATA FOUND.",[R]:"expand combobox",[B]:"collapse combobox",[L]:"select",[_]:"Filter","dropdowns.apply":"Apply","dropdowns.cancel":"Cancel"},H=e=>{const t=r.useLocalization(),s=i.useUnstyled(),n=s&&s.uDropDownsBase,{id:a,show:o,wrapperCssClass:l,wrapperStyle:d,listStyle:u,listRef:p,wrapperRef:c,listClassName:g,ariaSetSize:v}=e,m=(()=>{const{textField:t,valueField:s,groupField:i,groupMode:n,isMultiColumn:a,optionsGuid:o,skip:l=0,virtual:r,focusedIndex:d,hasDuplicates:u,highlightSelected:p=!0,value:c,data:g,itemRender:v,groupHeaderItemRender:m}=e,f=Array.isArray(c);let b=0;return g.map(((y,C)=>{const x=l+C,k=l+C+b,S=u?!!c&&d===C:!y.disabled&&(p&&(!f&&w(y,c,s)||f&&-1!==c.findIndex((e=>w(e,y,s)))));let E,D,F;C>0&&void 0!==i&&(D=I(y,i),F=I(g[C-1],i),D&&F&&D!==F&&(E=D));const M=void 0!==E&&"modern"===n;return M?b+=1:b=0,[M&&h.createElement(T,{id:`option-${o}-${k}`,virtual:r,key:x+"-group-item",group:E,isMultiColumn:a,render:m}),h.createElement(N,{id:`option-${o}-${M?k+1:k}`,virtual:r,dataItem:y,groupMode:n,selected:S,focused:d===C,index:x,key:x,onClick:e.onClick,textField:t,group:E,render:v,disabled:y.disabled})]}))})();return m.length?h.createElement("div",{className:l,style:d,ref:c,onMouseDown:e.onMouseDown,onBlur:e.onBlur,onScroll:e.onScroll,unselectable:"on"},h.createElement("ul",{id:a,role:"listbox","aria-hidden":!o||void 0,"aria-setsize":v,className:g||i.classNames(i.uDropDownsBase.ul({c:n})),ref:p,style:u},m),e.scroller&&h.createElement("div",{className:i.classNames(i.uDropDownsBase.heightContainer({c:n}))},e.scroller)):(()=>{const s=e.noDataRender,a=h.createElement("div",{className:i.classNames(i.uDropDownsBase.noData({c:n}))},h.createElement("div",null,t.toLanguageString(P,z[P])));return s?s.call(void 0,a):a})()},V="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent);class q{constructor(){this.table=null,this.total=0,this.enabled=!1,this.skip=0,this.pageSize=0,this.PageChange=null,this.scrollElement=null,this.listTransform="",this.itemHeight=0,this.containerHeight=0,this.reactVersion=Number.parseFloat(h.version),this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.listTranslate=0,this.list=null,this.container=null,this.calcScrollElementHeight=()=>{var e;this.scrollSyncing=!0;let t=!1;this.itemHeight=this.list?this.list.children[0].offsetHeight:this.itemHeight;const s=this.itemHeight*this.total-((null==(e=this.list)?void 0:e.offsetHeight)||0);this.containerHeight=V?Math.min(17895697,s):s;const i=this.containerHeight;return this.scrollElement&&(t=this.scrollElement.style.height!==i+"px",t&&(this.scrollElement.style.height=i+"px")),this.scrollSyncing=!1,t},this.scrollerRef=e=>{this.container=e,e&&(e.setAttribute("unselectable","on"),window.setTimeout(this.calcScrollElementHeight.bind(this),0))},this.getRowHeightService=i.memoizeOne(((e,t)=>new i.RowHeightService(t,e))),this.firstLoaded=this.pageSize,this.lastLoaded=this.skip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get translate(){return this.listTranslate}translateTo(e,t){this.listTranslate=e,this.enabled&&this.list&&(V||this.reactVersion<=17||t?this.list.style.transform="translateY("+e+"px)":this.listTransform="translateY("+e+"px)")}changePage(e,t){const s=Math.min(Math.max(0,e),this.total-this.pageSize);s!==this.skip&&this.PageChange&&this.PageChange({skip:s,take:this.pageSize},t)}reset(){this.container&&(this.calcScrollElementHeight(),this.container.scrollTop=0,this.translateTo(0,!0))}scrollToEnd(){if(this.container&&this.list){this.calcScrollElementHeight();const{scrollHeight:e,offsetHeight:t}=this.container;this.container.scrollTop=e,this.translateTo(e-t,!0)}}scrollHandler(e){if(!this.enabled||!this.container||!this.list)return;if(this.scrollSyncing)return void(this.scrollSyncing=!1);this.rowHeightService=this.getRowHeightService(this.itemHeight,this.total);const t=this.container.scrollTop,s=this.lastScrollTop>=t,i=!s,n=Math.abs(t-this.lastScrollTop);this.lastScrollTop=t;let a=this.rowHeightService.index(t),o=this.rowHeightService.offset(a);const{offsetHeight:l}=this.container,r=this.rowHeightService.index(t+l);if(i&&r>=this.lastLoaded&&this.lastLoaded<this.total){const t=a+this.pageSize-this.total;t>0&&(a-=t,o=this.rowHeightService.offset(a)),this.firstLoaded=a,this.translateTo(o);const s=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(s,this.total),this.changePage(this.firstLoaded,e)}else if(s&&a-1<=this.firstLoaded){const t=n===this.itemHeight;if(0===this.skip&&t)this.lastScrollTop=0,this.firstLoaded=0,this.lastLoaded=this.pageSize,this.container.scrollTop=0,this.translateTo(0,!0);else{const t=Math.floor(.3*this.pageSize);this.firstLoaded=Math.max(a-t,0),this.translateTo(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,e)}}}}class W{navigate(e){const t=e.keyCode;return t===i.Keys.up||t===i.Keys.left?this.next({current:e.current,min:e.min,max:e.max,step:e.skipItems?e.skipItems:-1}):t===i.Keys.down||t===i.Keys.right?this.next({current:e.current,min:e.min,max:e.max,step:e.skipItems?e.skipItems:1}):t===i.Keys.home?0:t===i.Keys.end?e.max:void 0}next(e){return f(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min}}const A=class e{constructor(e){this.wrapper=null,this.list=null,this.vs=new q,this.navigation=new W,this.handleItemClick=(e,t)=>{const s=this.initState();s.syntheticEvent=t,t.stopPropagation(),this.component.handleItemSelect(e,s),this.togglePopup(s),this.applyState(s)},this.handleFocus=e=>{if(!this.component.state.focused){const t=this.initState();t.data.focused=!0,t.events.push({type:"onFocus"}),t.syntheticEvent=e,this.applyState(t)}},this.filterChanged=(e,t)=>{const{textField:s,filterable:i}=this.component.props;i&&t.events.push({type:"onFilterChange",filter:{field:s,operator:"contains",ignoreCase:!0,value:e}})},this.togglePopup=e=>{const t=this.component.props,s=void 0!==t.opened?t.opened:this.component.state.opened;void 0===t.opened&&(e.data.opened=!s),s?e.events.push({type:"onClose"}):(e.events.push({type:"onOpen"}),this.calculatePopupWidth())},this.pageChange=(e,t)=>{const s=this.initState();s.syntheticEvent=t,this.triggerOnPageChange(s,e.skip,e.take),this.applyState(s)},this.scrollToVirtualItem=(e,t)=>{const s=this.vs;if(0===e.skip)s.reset();else{let i=s.translate;0===i&&(s.calcScrollElementHeight(),i=s.itemHeight*e.skip,s.translateTo(i,!0)),t<0&&i>0&&(i+=s.itemHeight*(e.pageSize/4)),s.container&&(s.container.scrollTop=i),this.scrollToItem(t,!0)}},this.scrollPopupByPageSize=e=>{var t,s,i,n,a,o;const l=this.vs,r=null==(s=null==(t=this.list)?void 0:t.parentElement)?void 0:s.scrollTop,d=l.enabled&&l.itemHeight?l.itemHeight:this.list?this.list.children[0].offsetHeight:0,u=null==(n=null==(i=this.list)?void 0:i.parentElement)?void 0:n.offsetHeight;void 0!==r&&void 0!==u&&(null==(o=null==(a=this.list)?void 0:a.parentElement)||o.scroll({top:r+e*Math.floor(u/d)*d}))},this.renderScrollElement=()=>{const e=this.vs;return e.enabled&&h.createElement("div",{ref:t=>{e.scrollElement=t},key:"scrollElementKey"})},this.resetGroupStickyHeader=(e,t)=>{e!==t.state.group&&t.setState({group:e})},this.listBoxId=e.props.id+"list",this.guid=e.props.id,this.component=e,this.vs.PageChange=this.pageChange}didUpdate(){this.vs.listTransform&&this.vs.list&&(this.vs.list.style.transform=this.vs.listTransform,this.vs.listTransform="")}didMount(){const e=this.component.props,t=e.popupSettings||{},s=e.style||{},i=t.width;let n=!0===e.opened;void 0===i&&this.calculatePopupWidth(),void 0===e.dir&&void 0===s.direction&&(this.calculateDir(),n=!0),n&&this.component.forceUpdate()}calculateDir(){const e=this.component.element;e&&e.ownerDocument&&e.ownerDocument.defaultView&&(this.dirCalculated=e.ownerDocument.defaultView.getComputedStyle(e).direction||void 0)}calculatePopupWidth(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")}scrollToItem(e,t,s){const i=this.list||this.vs.list;if(!i&&!s&&setTimeout((()=>{this.scrollToItem(e,t,!0)}),10),0===e&&t&&0===this.vs.skip)this.vs.reset();else if(i&&e>=0){const s=this.vs,n=s.container||i.parentNode,a=void 0!==t?t:s.enabled;y(n,i,e,s.translate,a)}}updateComponentArgs(e){for(let t in e)Object.hasOwnProperty.call(e,t)&&(this.component[t]=e[t])}initState(){return{data:{},events:[],syntheticEvent:void 0}}applyState(e){Object.keys(e.data).length>0&&this.component.setState(e.data);const t={syntheticEvent:e.syntheticEvent,nativeEvent:e.syntheticEvent?e.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};e.events.forEach((e=>{const s=e.type;delete e.type;const i=s&&this.component.props[s];i&&i.call(void 0,{...t,...e})}))}triggerOnPageChange(e,t,s){const i=this.component.props.virtual;if(i){const n=Math.min(Math.max(0,t),Math.max(0,i.total-s));n!==i.skip&&e.events.push({type:"onPageChange",page:{skip:n,take:s}})}}triggerPageChangeCornerItems(e,t){const s=this.component.props,{data:i=[],dataItemKey:n,virtual:a}=s,o=void 0!==s.opened?s.opened:this.component.state.opened;e&&a&&this.vs.enabled&&(a.skip>0&&w(e,i[0],n)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!o&&a.skip+a.pageSize<a.total&&w(e,i[i.length-1],n)&&this.triggerOnPageChange(t,a.skip+1,a.pageSize))}getPopupSettings(){return Object.assign({},e.defaultProps.popupSettings,this.component.props.popupSettings)}getAdaptiveAnimation(){const e=this.getPopupSettings();return void 0===e.animate||e.animate}getGroupedDataModernMode(e,t){const s=[];return e.forEach(((i,n)=>{e[n-1]&&i[t]!==e[n-1][t]&&s.push({[t]:i[t]}),s.push(e[n])})),s}};A.basicPropTypes={opened:s.bool,disabled:s.bool,dir:s.string,tabIndex:s.number,accessKey:s.string,data:s.array,textField:s.string,className:s.string,label:s.string,loading:s.bool,popupSettings:s.shape({animate:s.oneOfType([s.bool,s.shape({openDuration:s.number,closeDuration:s.number})]),popupClass:s.string,className:s.string,appendTo:s.any,width:s.oneOfType([s.string,s.number]),height:s.oneOfType([s.string,s.number])}),onOpen:s.func,onClose:s.func,onFocus:s.func,onBlur:s.func,onChange:s.func,itemRender:s.func,listNoDataRender:s.func,focusedItemIndex:s.func,header:s.node,footer:s.node},A.propTypes={...A.basicPropTypes,value:s.any,defaultValue:s.any,filterable:s.bool,filter:s.string,virtual:s.shape({pageSize:s.number.isRequired,skip:s.number.isRequired,total:s.number.isRequired}),onFilterChange:s.func,onPageChange:s.func},A.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0};let U=A;const $=Object.freeze({name:"@progress/kendo-react-dropdowns",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1654528156,version:"12.2.0-develop.6",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}),G=e=>{const{footer:t,windowWidth:s=0,mobileFilter:n,children:o,navigatable:l,navigatableElements:r,expand:p,animation:c,title:g,subTitle:v,onClose:m}=e,f=i.useAdaptiveModeContext(),b={navigatable:l||!1,navigatableElements:r||[],expand:p,animation:!1!==c,suffixActions:h.createElement(d.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",size:"large",themeColor:"primary",svgIcon:a.checkIcon,onClick:m}),filter:n,onClose:m,animationStyles:f&&s<=f.small?{top:0,width:"100%",height:"100%"}:void 0,title:g,subTitle:v,className:"k-adaptive-actionsheet",position:f&&s<=f.small?"fullscreen":void 0};return h.createElement(u.ActionSheet,{...b},o,t&&h.createElement(u.ActionSheetFooter,{className:"k-actions k-actions-stretched"},h.createElement(d.Button,{size:"large",tabIndex:0,"aria-label":t.cancelText,"aria-disabled":"false",type:"button",onClick:t.onCancel},t.cancelText),h.createElement(d.Button,{tabIndex:0,themeColor:"primary",size:"large","aria-label":t.applyText,"aria-disabled":"false",type:"button",onClick:t.onApply},t.applyText)))},j=h.forwardRef(((e,t)=>{let s=!1;const o=i.getLicenseMessage($),l=i.usePropsContext(Z,e),{delay:p=Y.delay,tabIndex:c=Y.tabIndex,ignoreCase:y=Y.ignoreCase,size:x=Y.size,rounded:k=Y.rounded,fillMode:S=Y.fillMode,groupMode:E=Y.groupMode}=l;if(l.filterable||l.virtual){const e=[];l.filterable&&e.push("filterable"),l.virtual&&e.push("virtualization"),s=!i.validatePackage($,{component:"DropDownList",features:e})}const D=i.useUnstyled(),M=i.useId(l.id),N=()=>{var e;if(i.canUseDOM)return(null==(e=me.current)?void 0:e.ownerDocument)||window.document},T=()=>{var e,t;null!=(e=null==De?void 0:De.current)&&e.wrapper&&(null==(t=null==De?void 0:De.current)||t.wrapper.focus({preventScroll:!0}))},P=()=>{let e;return void 0!==Ie.current&&null!==Ie.current?e=Ie.current:void 0!==l.value?e=l.value:void 0!==Ke.value&&null!==Ke.value?e=Ke.value:void 0!==l.defaultValue&&null!==l.defaultValue&&(e=l.defaultValue),!f(e)&&void 0!==l.defaultItem&&null!==l.defaultItem&&(e=l.defaultItem),e},O=()=>void 0!==l.required?l.required:Y.required,R=()=>{const e=void 0!==l.validationMessage,t=P(),s=!O()||null!==t&&""!==t&&void 0!==t;return{customError:e,valid:void 0!==l.valid?l.valid:s,valueMissing:null===t}},B=e=>{xe.current=!0,e.focus(),window.setTimeout((()=>xe.current=!1),30)},V=()=>{be.current&&B(be.current),l.adaptive&&setTimeout((()=>{be.current&&B(be.current)}),300)},q=h.useCallback((e=>{for(const t of e)Pe(t.target.clientWidth)}),[]),W=()=>{var e;null!=(e=fe.current)&&e.setCustomValidity&&fe.current.setCustomValidity(R().valid?"":l.validationMessage||"Please select a value from the list!")},A=(e,t)=>{const s=P();w(s,e,l.dataItemKey)||(void 0===l.value&&(t.data.value=e),De.current.updateComponentArgs({value:e}),Ie.current=e,t.events.push({type:"onChange"}))},j=e=>{var t;null==(t=null==De?void 0:De.current)||t.applyState(e),Ie.current=void 0},J=(e,t)=>{var s;const{virtual:i,dataItemKey:n,defaultItem:a}=l,o=F(l),r=i?i.skip:0,d=P(),u=-1===e&&void 0!==a?a:o[e-r],p=!w(u,d,n);A(u,t),p&&(null==(s=null==De?void 0:De.current)||s.triggerPageChangeCornerItems(u,t))},Q=(e,t,s)=>{var i,n;const{defaultItem:a,dataItemKey:o,virtual:r={skip:0,total:0,pageSize:0}}=l,d=P(),u=F(l),p=null==(i=null==De?void 0:De.current)?void 0:i.vs,c=u.findIndex((e=>w(e,d,o))),h=null==(n=null==De?void 0:De.current)?void 0:n.navigation.navigate({current:r.skip+c,max:(null!=p&&p.enabled?r.total:u.length)-1,min:void 0!==a?-1:0,keyCode:t,skipItems:s||void 0});void 0!==h&&J(h,e),j(e)},X=()=>{const{textField:e,dataItemKey:t,virtual:s={skip:0},focusedItemIndex:i=C,filterable:n,skipDisabledItems:a=!0}=l,o=P(),r=F(l),d=l.filter?l.filter:Ke.text;return a&&e&&!d&&!o?r.findIndex((t=>!t.disabled&&t[e])):f(o)&&void 0===d||n&&""===d?r.findIndex((e=>w(e,o,t))):d?we.current?i(r,d,e):r.findIndex((e=>w(e,o,t))):0===s.skip?0:-1},ee=(e,t)=>void 0!==t&&-1!==t&&e&&e.length>0&&e[t].disabled,te=()=>{const e=F(l),t=De.current.initState(),s=X();ee(e,s)&&(A(null,t),j(t))},se=e=>{if(e.isPropagationStopped())return;const t=De.current.initState();t.syntheticEvent=e,Ke.focused||(t.data.focused=!0),te(),De.current.togglePopup(t),j(t)},ie=e=>{var t,s,n,a,o,r,d;e&&e.target instanceof Element&&"INPUT"===e.target.nodeName&&e.stopPropagation&&e.stopPropagation();const{filterable:u,disabled:p,defaultItem:c,leftRightKeysNavigation:h=!0,virtual:g={skip:0,total:0,pageSize:0},dataItemKey:v,groupField:m="",textField:f,skipDisabledItems:b=!0}=l,y=F(l),C=P(),x=y.findIndex((e=>w(e,C,v))),I=void 0!==l.opened?l.opened:Ke.opened,k=e.keyCode,S=k===i.Keys.home||k===i.Keys.end,E=k===i.Keys.up||k===i.Keys.down,D=!I&&(e.altKey&&k===i.Keys.down||k===i.Keys.enter||k===i.Keys.space),M=I&&(e.altKey&&k===i.Keys.up||k===i.Keys.esc),K=h&&(k===i.Keys.left||k===i.Keys.right),N=E||K&&!u||S,T=De.current.initState();if(T.syntheticEvent=e,!p){if(S&&null!=(t=null==De?void 0:De.current)&&t.vs.enabled)k===i.Keys.home?0!==g.skip?(null==(s=null==De?void 0:De.current)||s.triggerOnPageChange(T,0,g.pageSize),ke.current=!0):A(y[0],T):g.skip<g.total-g.pageSize?(null==(n=null==De?void 0:De.current)||n.triggerOnPageChange(T,g.total-g.pageSize,g.pageSize),ke.current=!0):A(y[y.length-1],T);else if(I&&k===i.Keys.pageUp)e.preventDefault(),null==(a=null==De?void 0:De.current)||a.scrollPopupByPageSize(-1);else if(I&&k===i.Keys.pageDown)e.preventDefault(),null==(o=null==De?void 0:De.current)||o.scrollPopupByPageSize(1);else if(I&&k===i.Keys.enter){const t=X();ee(y,t)?(A(null,T),j(T)):J(t,T),null==(r=null==De?void 0:De.current)||r.togglePopup(T),e.preventDefault()}else if(D||M)M&&te(),null==(d=null==De?void 0:De.current)||d.togglePopup(T),e.preventDefault();else if(N){if(we.current=!1,""!==m&&f)if(!b&&I)Q(T,k);else{let e;if(k===i.Keys.down||k===i.Keys.right){const t=y.slice(x+1).find((e=>!e.disabled&&e[f]));e=t&&y.findIndex((e=>e[f]===t[f]))}else if(k===i.Keys.up||k===i.Keys.left){let t;if(0===x&&c)e=-1;else if(-1===x)t=y,e=y.findIndex((e=>!e.disabled&&e[f]));else{t=y.slice(0,x);let s=t.pop();for(;s&&s.disabled;)s=t.pop();e=s&&y.findIndex((e=>e[f]===s[f]))}}if(void 0!==e){Q(T,k,e-x)}else void 0===e&&y.findIndex((e=>e[f]===C[f]))===y.length-1&&Q(T,k)}else if(!b&&I||S)Q(T,k);else if(f){let e;if(k===i.Keys.down||k===i.Keys.right){const t=y.slice(x+1).find((e=>!e.disabled&&e[f]));e=t&&y.findIndex((e=>e[f]===t[f]))}else if(k===i.Keys.up||k===i.Keys.left){let t;if(0===x&&c)e=-1;else if(-1===x)t=y,e=y.find((e=>!e.disabled&&e[f]));else{t=y.slice(0,x);let s=t.pop();for(;s&&s.disabled;)s=t.pop();e=s&&y.findIndex((e=>e[f]===s[f]))}}if(void 0!==e){Q(T,k,e-x)}else void 0===e&&y.findIndex((e=>e[f]===C[f]))===y.length-1&&Q(T,k)}else Q(T,k);e.preventDefault()}j(T)}},ne=e=>{const t=De.current.initState();t.syntheticEvent=e.syntheticEvent,void 0===l.filter&&(t.data.text=e.target.value),De.current.filterChanged(e.target.value,t),we.current=!0,j(t),Be({group:void 0,text:String(e.target.value)})},ae=e=>{const t=void 0!==l.filter?l.filter:Ke.text;return l.filterable&&h.createElement(v,{value:t,ref:e=>{be.current=e&&e.element},onChange:ne,onKeyDown:ie,size:e?"large":x,rounded:k,fillMode:S,renderListFilterWrapper:!0,placeholder:Re.toLanguageString(_,z[_])})},oe=e=>{var t;const s=De.current.initState();s.syntheticEvent=e,null==(t=null==De?void 0:De.current)||t.togglePopup(s),A(l.defaultItem,s),j(s)},le=(e,t)=>{var s;null==(s=null==De?void 0:De.current)||s.handleItemClick(e,t),Ie.current=void 0},re=e=>{const{vs:t,list:s}=De.current;t.scrollHandler(e);const{groupField:i}=l;let n=F(l);if(i&&n.length&&i){const a=Fe.current=Fe.current||(t.enabled?t.itemHeight:s?s.children[0].offsetHeight:0),o=e.target.scrollTop-t.skip*a;n=De.current.getGroupedDataModernMode(n,i);let l=n[0][i];for(let e=1;e<n.length&&!(a*e>o);e++)n[e]&&n[e][i]&&(l=n[e][i]);l!==Ke.group&&Be({group:l})}},de=()=>{var e;const{textField:t,dataItemKey:s,virtual:n={skip:0,total:void 0},groupHeaderItemRender:a,listNoDataRender:o,itemRender:r}=l,d=F(l),u=D&&D.uDropDownList,p=De.current.vs,c=n.skip,g=void 0!==l.opened?l.opened:Ke.opened,v=De.current.getPopupSettings(),m=`translateY(${p.translate}px)`,f=P();return h.createElement(H,{id:_e,show:g,data:d.slice(),focusedIndex:X(),value:f,textField:t,valueField:s,optionsGuid:ze,groupField:l.groupField,groupMode:"modern",listRef:e=>{p.list=De.current.list=e},wrapperStyle:{maxHeight:lt?void 0:v.height},wrapperCssClass:i.classNames(i.uDropDownList.listContent({c:u})),listStyle:p.enabled?{transform:m}:void 0,key:"listkey",skip:c,onClick:le,itemRender:r,groupHeaderItemRender:a,noDataRender:o,onScroll:re,wrapperRef:p.scrollerRef,scroller:null==(e=null==De?void 0:De.current)?void 0:e.renderScrollElement(),ariaSetSize:n.total})},ue=()=>{Ke.focused&&window.setTimeout((()=>{Ke.focused&&De.current.wrapper&&B(De.current.wrapper)}))},pe=e=>{"onMouseDownOutside"in(l.popupSettings||{})&&l.popupSettings.onMouseDownOutside.call(void 0,e)},ce=()=>{const{header:e,footer:t,groupStickyHeaderItemRender:s,groupField:n,list:a}=l,o=F(l),r=D&&D.uDropDownList;let{group:d}=Ke;return void 0===d&&void 0!==n&&(d=I(o[0],n)),h.createElement(h.Fragment,null,e&&h.createElement("div",{className:i.classNames(i.uDropDownList.listHeader({c:r}))},e),h.createElement("div",{className:i.classNames("k-list",{[`k-list-${lt?"lg":i.sizeMap[x]||x}`]:x})},!a&&d&&0!==o.length&&h.createElement(m,{group:d,groupMode:"modern",render:s}),de()),t&&h.createElement("div",{className:"k-list-footer"},t))},he=e=>{clearTimeout(ye.current),l.filterable||(ye.current=window.setTimeout((()=>Ce.current.word=""),p),(e=>{const{dataItemKey:t}=l,s=F(l),i=P();let n=s.map(((e,t)=>({item:e,itemIndex:t})));const a=Ce.current.word,o=Ce.current.last,r=((e,t)=>{for(let s=0;s<e.length;s++)if(e.charAt(s)!==t)return!1;return!0})(a,o);let d,u=n.length,p=Math.max(0,s.findIndex((e=>w(e,i,t))));l.defaultItem&&(d={item:l.defaultItem,itemIndex:-1},u+=1,p+=1),p+=r?1:0,n=((e,t,s)=>{let i=e;return s&&(i=[s].concat(i)),i.slice(t).concat(i.slice(0,t))})(n,p,d);let c,h,g,v=0;const{textField:m}=l;for(;v<u;){if(c=I(n[v].item,m),h=r&&b(c,o,y),g=b(c,a,y),h||g){v=n[v].itemIndex;break}v++}if(v!==u){const t=De.current.initState();t.syntheticEvent=e,J(v,t),j(t),Ie.current=void 0}})(e))},ge=()=>{const e=De.current.initState();e.data.opened=Ke.opened,De.current.togglePopup(e),j(e)},ve=h.useRef(null),me=h.useRef(null),fe=h.useRef(null),be=h.useRef(null);h.useImperativeHandle(ve,(()=>({get element(){return me.current},get index(){return(()=>{const{dataItemKey:e}=l,t=F(l),s=P();return t.findIndex((t=>w(t,s,e)))})()},get name(){return l.name},get validity(){return R()},get value(){return P()},get focused(){return Ke.focused},get opened(){return Ke.opened},focus:T,props:l,togglePopup:ge}))),h.useImperativeHandle(t,(()=>ve.current));const ye=h.useRef(null),Ce=h.useRef({word:"",last:""}),xe=h.useRef(!1),Ie=h.useRef(null),ke=h.useRef(!1),we=h.useRef(!1),Se=h.useRef({}),Ee=h.useRef({}),De=h.useRef(new U({props:l,setState:()=>{},state:{},forceUpdate:()=>{},element:null,value:null,handleItemSelect:()=>{}})),Fe=h.useRef(0),Me=h.useRef(null),[Ke,Ne]=h.useState({}),[Te,Pe]=h.useState(),[,Oe]=h.useReducer((e=>e),!0),Re=r.useLocalization(),Be=e=>{Ne({...Ke,...e})};h.useEffect((()=>{De.current.updateComponentArgs({props:l,setState:Be,state:Ke,forceUpdate:Oe,element:me.current,handleItemSelect:J,value:P()})}),[Be,Ke,Oe,J,P]),h.useEffect((()=>{var e,t,s,i,n,a,o,r,d,u,p,c,h;const{dataItemKey:g,virtual:v,groupField:m="",textField:f}=l,b=F(l),y=Se.current.virtual?Se.current.virtual.total:0,C=void 0!==l.opened?l.opened:Ke.opened,x=void 0!==Se.current.opened?Se.current.opened:Ee.current.opened,I=!x&&C;if(null==(e=null==De?void 0:De.current)||e.didUpdate(),null!=(t=null==De?void 0:De.current)&&t.getPopupSettings().animate||I&&V(),v&&v.total!==y)null==(s=null==De?void 0:De.current)||s.vs.calcScrollElementHeight(),null==(i=null==De?void 0:De.current)||i.vs.reset();else{const e=P(),t=void 0!==Se.current.value?Se.current.value:Ee.current.value;let s=b.findIndex((t=>w(t,e,g)));""!==m&&e&&f&&(s=null==(a=null==(n=null==De?void 0:De.current)?void 0:n.getGroupedDataModernMode(b,m))?void 0:a.map((e=>e[f])).indexOf(e[f]));const i=!w(t,e,g);I&&v?null==(o=null==De?void 0:De.current)||o.scrollToVirtualItem(v,s):I&&!v?(V(),b&&0!==b.length&&(null==(r=null==De?void 0:De.current)||r.resetGroupStickyHeader(b[0][m],{setState:Be,group:Ke.group,state:Ke})),null==(d=null==De?void 0:De.current)||d.scrollToItem(s)):C&&x&&e&&i&&!ke.current?null==(p=null==De?void 0:De.current)||p.scrollToItem(s,null==(u=null==De?void 0:De.current)?void 0:u.vs.enabled):C&&x&&ke.current&&(ke.current&&v&&0===v.skip?null==(c=null==De?void 0:De.current)||c.vs.reset():ke.current&&v&&v.skip===v.total-v.pageSize&&(null==(h=null==De?void 0:De.current)||h.vs.scrollToEnd()))}ke.current=!1,Ee.current=Ke,Se.current=l,W()})),h.useEffect((()=>{var e,t;return Me.current=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(q.bind(void 0)),null==(e=null==De?void 0:De.current)||e.didMount(),W(),null!=(t=N())&&t.body&&Me.current&&Me.current.observe(N().body),()=>{var e;null!=(e=N())&&e.body&&Me.current&&Me.current.disconnect()}}),[]);const Le=M+"-accessibility-id",_e=M+"-listbox-id",ze=M+"-guid",He=Re.toLanguageString(L,z[L]),{style:Ve,className:qe,label:We,dir:Ae,virtual:Ue,adaptive:$e,dataItemKey:Ge,disabled:je,loading:Ye,iconClassName:Ze,svgIcon:Je,valueRender:Qe}=l,Xe=void 0!==l.opened?l.opened:Ke.opened,et=P(),tt=I(et,l.textField),st=!(void 0!==l.validityStyles?l.validityStyles:Y.validityStyles)||R().valid,it=De.current,nt=it.vs,at=D&&D.uDropDownList;nt.enabled=void 0!==Ue;const ot=i.useAdaptiveModeContext(),lt=!!(Te&&ot&&Te<=ot.medium&&l.adaptive);void 0!==Ue&&(it.vs.skip=Ue.skip,it.vs.total=Ue.total,it.vs.pageSize=Ue.pageSize);const rt=F(l),{focused:dt}=Ke,ut=rt.findIndex((e=>w(e,et,Ge))),pt=h.createElement("span",{id:Le,className:i.classNames(i.uDropDownList.inputInner({c:at}))},tt&&h.createElement("span",{className:i.classNames(i.uDropDownList.inputText({c:at}))},tt)),ct=void 0!==Qe?Qe.call(void 0,pt,et):pt,ht=h.createElement(h.Fragment,null,h.createElement("span",{ref:e=>{me.current=e,De.current.wrapper=e},className:i.classNames(i.uDropDownList.wrapper({c:at,size:x,rounded:k,fillMode:S,focused:dt,disabled:je,invalid:!st,loading:Ye,required:O()}),qe),style:We?{...Ve,width:void 0}:Ve,dir:Ae,onMouseDown:Xe?e=>{"INPUT"!==e.target.nodeName&&(B(De.current.wrapper),e.preventDefault())}:void 0,onFocus:lt?e=>se(e):e=>{xe.current||De.current.handleFocus(e)},onBlur:e=>{if(xe.current||!Ke.focused)return;const t=void 0!==l.opened?l.opened:Ke.opened,s=De.current.initState();s.syntheticEvent=e,s.data.focused=!1,s.events.push({type:"onBlur"}),t&&te(),t&&!lt&&De.current.togglePopup(s),j(s)},tabIndex:i.getTabIndex(c,je),accessKey:l.accessKey,onKeyDown:ie,onKeyPress:e=>{if(l.filterable||0===e.which||e.keyCode===i.Keys.enter)return;let t=String.fromCharCode(e.charCode||e.keyCode);y&&(t=t.toLowerCase())," "===t&&e.preventDefault(),Ce.current={word:Ce.current.word+t,last:Ce.current.last+t},he(e)},onClick:je?void 0:se,role:"combobox","aria-required":O(),"aria-disabled":je||void 0,"aria-haspopup":"listbox","aria-expanded":Xe||!1,"aria-owns":_e,"aria-activedescendant":Xe?"option-"+ze+"-"+(ut+(Ue?Ue.skip:0)):void 0,"aria-label":l.ariaLabel||l.label,"aria-labelledby":l.ariaLabelledBy,"aria-describedby":l.ariaDescribedBy||Le,"aria-controls":_e,id:l.id,title:l.title},ct,Ye&&h.createElement(i.IconWrap,{className:i.classNames(i.uDropDownList.loadingIcon({c:at})),name:"loading"}),h.createElement(d.Button,{tabIndex:-1,type:"button","aria-label":He,size:x,fillMode:S,className:i.classNames(i.uDropDownList.inputButton({c:at})),rounded:null,themeColor:"base",iconClass:Ze,svgIcon:Ze?void 0:Je||a.caretAltDownIcon,onMouseDown:e=>Ke.focused&&e.preventDefault()}),(e=>h.createElement("select",{name:l.name,ref:e=>{fe.current=e},tabIndex:-1,"aria-hidden":!0,title:l.label,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},h.createElement("option",{value:l.valueMap?l.valueMap.call(void 0,e):e})))(et),!lt&&(()=>{const{header:e,footer:t,dir:n,groupField:a,groupStickyHeaderItemRender:r,list:d}=l,u=F(l),p=De.current,c=p.getPopupSettings(),v=void 0!==l.opened?l.opened:Ke.opened,f=void 0!==c.width?c.width:p.popupWidth,b=D&&D.uDropDownList,y={dir:void 0!==n?n:p.dirCalculated,width:f,popupSettings:{...c,popupClass:i.classNames(c.popupClass,i.uDropDownList.listContainer({c:b,popup:!0})),anchor:c.anchor||me.current,show:v,onOpen:V,onClose:ue,onMouseDownOutside:pe},itemsCount:[u.length]};let{group:C}=Ke;return void 0===C&&void 0!==a&&(C=I(u[0],a)),h.createElement(g,{...y},ae(!1),e&&h.createElement("div",{className:i.classNames(i.uDropDownList.listHeader({c:b}))},e),h.createElement("div",{className:i.classNames(i.uDropDownList.list({c:b,size:x,virtual:De.current.vs.enabled}))},(()=>{const{textField:e,defaultItem:t,dataItemKey:s}=l,i=P();return void 0!==t&&h.createElement(K,{defaultItem:t,textField:e,selected:w(i,t,s),key:"defaultitemkey",onClick:oe})})(),!d&&C&&0!==u.length&&h.createElement(m,{group:C,groupMode:"modern",render:r}),de()),t&&h.createElement("div",{className:i.classNames(i.uDropDownList.listFooter({c:b}))},t),s&&h.createElement(i.WatermarkOverlay,{message:o}))})()),lt&&(()=>{const{groupField:e}=l,t=F(l),s=void 0!==l.opened?l.opened:Ke.opened,n=D&&D.uDropDownList,a={title:l.adaptiveTitle||l.label,subTitle:l.adaptiveSubtitle,expand:s,onClose:e=>se(e),windowWidth:Te,mobileFilter:ae(!0)};let{group:o}=Ke;return void 0===o&&void 0!==e&&(o=I(t[0],e)),h.createElement(G,{...a},h.createElement(u.ActionSheetContent,null,h.createElement("div",{className:i.classNames(i.uDropDownList.listContainer({c:n,popup:!1}))},ce())))})());return We?h.createElement(n.FloatingLabel,{label:We,editorValue:tt,editorValid:st,editorDisabled:l.disabled,style:{width:Ve?Ve.width:void 0},children:ht}):ht}));j.propTypes={delay:s.number,ignoreCase:s.bool,iconClassName:s.string,svgIcon:i.svgIconPropType,defaultItem:s.any,valueRender:s.func,valueMap:s.func,validationMessage:s.string,required:s.bool,id:s.string,ariaLabelledBy:s.string,ariaDescribedBy:s.string,ariaLabel:s.string,leftRightKeysNavigation:s.bool,title:s.string,groupField:s.string,list:s.any,skipDisabledItems:s.bool};const Y={delay:500,tabIndex:0,ignoreCase:!0,...U.defaultProps,required:!1,size:"medium",rounded:"medium",fillMode:"solid",groupMode:"modern"};j.displayName="KendoReactDropDownList";const Z=i.createPropsContext();j.displayName="KendoReactDropDownList";let J=class extends h.Component{constructor(){super(...arguments),this._input=null}get input(){return this._input}componentDidUpdate(e){const t=e.value,s=e.suggestedText,{value:n,suggestedText:a,focused:o}=this.props,l=this.input,r=t!==n||a!==s,d=r&&t.startsWith(n)&&!(s&&a&&s.endsWith(a)),u=i.getActiveElement(document);o&&l&&u!==l&&l.focus(),a&&r&&!d&&l&&l.setSelectionRange(n.length-a.length,n.length)}render(){const{expanded:e=!1,disabled:t,role:s="listbox",render:n,tabIndex:a,accessKey:o,unstyled:l,inputAttributes:r}=this.props,d=l&&l.uDropDownsBase,u={tabIndex:a,accessKey:o},p=h.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:i.classNames(i.uDropDownsBase.inputInner({c:d})),role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:e=>{this._input=e},onKeyDown:this.props.onKeyDown,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onClick:this.props.onClick,"aria-disabled":t||void 0,disabled:t||void 0,readOnly:this.props.readOnly||void 0,title:this.props.title,"aria-haspopup":"listbox","aria-expanded":e,"aria-owns":this.props.owns,"aria-activedescendant":e?this.props.activedescendant:void 0,"aria-describedby":this.props.ariaDescribedBy,"aria-labelledby":this.props.ariaLabelledBy,"aria-label":this.props.ariaLabel,"aria-required":this.props.ariaRequired,"aria-controls":this.props.ariaControls,...Object.assign({},u,r)});return n?n.call(void 0,p):p}};const Q=e=>{const t=r.useLocalization(),s=i.useUnstyled(),n=s&&s.uDropDownsBase,o=t.toLanguageString(O,z[O]);return h.createElement("span",{className:i.classNames(i.uDropDownsBase.clearButton({c:n})),role:"button",onClick:e.onClick,onMouseDown:e=>e.preventDefault(),tabIndex:-1,title:o,key:"clearbutton"},h.createElement(i.IconWrap,{name:"x",icon:a.xIcon}))},X=i.useCustomComponent,ee=class e extends h.Component{constructor(e){super(e),this.state={},this.base=new U(this),this._element=null,this._suggested="",this._skipBlur=!1,this._input=null,this._adaptiveFilterInput=null,this._skipFocus=!1,this.itemHeight=0,this.duplicates=[],this.hasDuplicates=!1,this.showLicenseWatermark=!1,this.focus=()=>{this._input&&this._input.focus()},this.checkForDuplicatePlainTextRecords=()=>{const e=void 0!==this.props.textField,t=void 0!==this.props.dataItemKey;if(this.props.data&&this.props.data.length>0&&!e&&!t){const e=this.props.data;this.duplicates=(e=>{const t=e.filter(((t,s)=>e.some(((e,i)=>e===t&&i!==s))));return Array.from(new Set(t))})(e),this.hasDuplicates=this.duplicates.length>0}},this.handleItemSelect=(e,t)=>{const{virtual:s,dataItemKey:i}=this.props,n=F(this.props)[e-(s?s.skip:0)],a=this.hasDuplicates||!w(n,this.value,i);this.triggerOnChange(n,t),void 0!==this.state.text&&(t.data.text=void 0),a&&this.base.triggerPageChangeCornerItems(n,t)},this.onPopupOpened=()=>{setTimeout((()=>{this.mobileMode&&this._adaptiveFilterInput&&(this._skipBlur=!0,this._adaptiveFilterInput.focus(),this._skipBlur=!1)}),300)},this.componentRef=e=>{this._element=e,this.base.wrapper=e},this.toggleBtnClick=e=>{this._skipFocus=!0;const{skipDisabledItems:t,textField:s}=this.props,i=F(this.props),n=this.getFocusedIndex(),a=this.getCurrentValueDisabledStatus(s,i,n),o=void 0!==this.props.opened?this.props.opened:this.state.opened,l=this.base.initState();if(l.syntheticEvent=e,!t&&s&&a&&this.clearValueOnToggleBtnClick(e),this.base.togglePopup(l),!o&&this.mobileMode){const e=void 0!==this.props.adaptiveFilter?this.props.adaptiveFilter:this.state.text||null;this.base.filterChanged(e,l)}this.applyState(l),setTimeout((()=>{this._skipFocus=!1}),300)},this.closeOpenedApplyStateNonMobileMode=(e,t)=>{t&&!this.mobileMode&&this.base.togglePopup(e)},this.renderMobileListFilter=()=>{const e=void 0!==this.props.adaptiveFilter?this.props.adaptiveFilter:this.state.text,t=I(this.value,this.props.textField),s=f(e)?e:t;return h.createElement(v,{value:s,ref:e=>{this._adaptiveFilterInput=e&&e.element},onChange:this.handleMobileFilterChange,onKeyDown:this.onInputKeyDown,size:"large",rounded:this.props.rounded,fillMode:this.props.fillMode,placeholder:this.props.placeholder})},this.listContainerContent=()=>{const{header:e,footer:t,size:s,groupStickyHeaderItemRender:n,groupField:a,list:o,groupMode:l,unstyled:r,virtual:d}=this.props,u=F(this.props),p=r&&r.uComboBox;let{group:c}=this.state;return void 0===c&&void 0!==a&&(c=I(u[0],a)),h.createElement("div",{className:i.classNames(i.uComboBox.list({c:p,list:o,size:"large",tableSize:s,virtual:d}))},e&&h.createElement("div",{className:i.classNames(i.uComboBox.listHeader({c:p}))},e),!o&&c&&0!==u.length&&h.createElement(m,{group:c,groupMode:l,render:n}),this.renderList(),t&&h.createElement("div",{className:i.classNames(i.uComboBox.listFooter({c:p}),this.props.footerClassName)},t))},this.handleMobileFilterChange=e=>{const t=this.base.initState();t.syntheticEvent=e.syntheticEvent,t.data.text=e.target.value,this.base.filterChanged(e.target.value,t),this.applyState(t)},this.onScroll=e=>{const{vs:t,list:s}=this.base;t.scrollHandler(e);const{groupField:i}=this.props;let n=F(this.props);if(!i||!n.length)return;const a=this.itemHeight=this.itemHeight||(t.enabled?t.itemHeight:s?s.children[0].offsetHeight:0),o=e.target.scrollTop-t.skip*a;"modern"===this.props.groupMode&&(n=this.base.getGroupedDataModernMode(n,i));let l=n[0][i];for(let e=1;e<n.length&&!(a*e>o);e++)n[e]&&n[e][i]&&(l=n[e][i]);l!==this.state.group&&(this.setState({group:l}),this.props.onGroupScroll&&this.props.onGroupScroll.call(void 0,{group:l}))},this.handleItemClick=(e,t)=>{this.navigationIndex=e,this.base.handleItemClick(e,t),this._valueDuringOnChange=void 0},this.handleBlur=e=>{if(this.state.focused&&!this._skipBlur){const t=this.base.initState(),{textField:s}=this.props,i=F(this.props),n=this.getFocusedIndex(),a=!(-1===n)&&this.getCurrentValueDisabledStatus(s,i,n);t.data.focused=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,s&&a&&this.clearValueOnBlur(e),this.applyValueOnRejectSuggestions(e.currentTarget.value,t)}},this.onInputClick=e=>{const t=void 0!==this.props.opened?this.props.opened:this.state.opened,s=void 0!==this.props.adaptiveFilter?this.props.adaptiveFilter:this.state.text||null;if(!t&&this.mobileMode){const t=this.base.initState();t.syntheticEvent=e,this.base.togglePopup(t),this.base.filterChanged(s,t),this.applyState(t)}},this.onInputKeyDown=e=>{const{skipDisabledItems:t,textField:s,dataItemKey:n,groupField:a}=this.props,o=F(this.props),l=this.value,r=Math.max(0,o.findIndex((e=>w(e,l,n)))),d=e.keyCode,u=void 0!==this.props.opened?this.props.opened:this.state.opened,p=this.base.initState();if(p.syntheticEvent=e,!e.altKey&&(d===i.Keys.up||d===i.Keys.down)){if(e.preventDefault(),""!==a&&s)if(!this.props.skipDisabledItems&&u)this.onNavigate(p,d);else{let e=0;if(d===i.Keys.down||d===i.Keys.right){const t=o.slice(r+1<o.length?r+1:r).find((e=>!e.disabled&&e[s]));e=t&&o.findIndex((e=>e[s]===t[s]))}else if(d===i.Keys.up||d===i.Keys.left){let t;if(0===r)t=o,e=o.findIndex((e=>!e.disabled&&e[s]));else{t=o.slice(0,r);let i=t.pop();for(;i&&i.disabled;)i=t.pop();e=i&&o.findIndex((e=>e[s]===i[s]))}}if(void 0!==e){const t=e-r;this.onNavigate(p,d,t)}else void 0===e&&o.findIndex((e=>e[s]===l[s]))===o.length-1&&this.onNavigate(p,d)}else if(!this.props.skipDisabledItems&&u)this.onNavigate(p,d);else{let e=null;if(d===i.Keys.down||d===i.Keys.right)e=o.slice(r+1).find((e=>!e.disabled));else if(d===i.Keys.up||d===i.Keys.left){const t=o.slice(0,r);for(e=t.pop();e&&e.disabled;)e=t.pop()}if(e){const t=e.id-r-1;this.onNavigate(p,d,t)}else this.onNavigate(p,d)}this.applyState(p)}const c=()=>{e.preventDefault(),this.base.togglePopup(p),this.applyState(p)},h=this.getFocusedIndex(),g=-1===h,v=!g&&this.getCurrentValueDisabledStatus(s,o,h);u?d===i.Keys.pageUp?(e.preventDefault(),this.base.scrollPopupByPageSize(-1)):d===i.Keys.pageDown?(e.preventDefault(),this.base.scrollPopupByPageSize(1)):e.altKey&&d===i.Keys.up?c():d===i.Keys.enter?(e.preventDefault(),(s&&!g&&e.currentTarget.value?o[h][s]:void 0)?!t&&s&&v?this.clearValueOnEnterOrEsc(e):v||this.applyValueOnEnter(e.currentTarget.value,p):this.applyValueOnEnter(e.currentTarget.value,p)):d===i.Keys.esc&&(!t&&s&&v&&this.clearValueOnEnterOrEsc(e),this.applyValueOnRejectSuggestions(e.currentTarget.value,p)):u||d!==i.Keys.esc?e.altKey&&d===i.Keys.down&&c():this.clearValueOnEnterOrEsc(e)},this.inputOnChange=e=>{const t=this.base.initState();t.syntheticEvent=e;const s=void 0!==this.props.opened?this.props.opened:this.state.opened,i=e.currentTarget,n=i.value;if(this.props.suggest){const e=i.selectionEnd===n.length;let t=void 0!==this.props.filter?this.props.filter:this.state.text;f(t)||(t=I(this.value,this.props.textField)||"");const s=t&&t===n,a=t&&t.length>n.length;s||a||!e?this._suggested="":this.suggestValue(n)}void 0===this.props.filter&&(t.data.text=n),void 0!==this.state.focusedItem&&(t.data.focusedItem=void 0),s||this.base.togglePopup(t),this.base.filterChanged(n,t),this.applyState(t),this.setState({group:void 0})},this.clearButtonClick=e=>{this.base.initState().syntheticEvent=e,e.stopPropagation(),this.clearValue()},this.clearValueOnEnterOrEsc=e=>{this.base.initState().syntheticEvent=e,e.stopPropagation(),this.clearValue()},this.clearValueOnBlur=e=>{this.base.initState().syntheticEvent=e,e.stopPropagation(),this.clearValue()},this.clearValueOnToggleBtnClick=e=>{this.base.initState().syntheticEvent=e,e.stopPropagation(),this.clearValue()},this.setValidity=()=>{this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity.valid?"":this.props.validationMessage||"Please enter a valid value!")},this.handleFocus=e=>{if(this._skipFocus)return;const t=this.base.initState();t.syntheticEvent=e,this.mobileMode&&!this._skipFocus&&(this._skipFocus=!0,this.base.togglePopup(t),this.applyState(t),setTimeout((()=>{this._skipFocus=!1}),300)),this.base.handleFocus(e)},this.showLicenseWatermark=!i.validatePackage($,{component:"ComboBox"}),this.licenseMessage=i.getLicenseMessage($)}get _inputId(){return this.props.id}get document(){if(i.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}get value(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:void 0}get index(){const{dataItemKey:e}=this.props,t=F(this.props),s=this.value;return t.findIndex((t=>w(t,s,e)))}get name(){return this.props.name}get validity(){const e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&""!==this.value&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}}get validityStyles(){return void 0!==this.props.validityStyles?this.props.validityStyles:e.defaultProps.validityStyles}get required(){return void 0!==this.props.required?this.props.required:e.defaultProps.required}componentDidUpdate(e,t){var s;const{dataItemKey:i,virtual:n,groupField:a="",textField:o}=this.props,l=F(this.props),r=e.virtual?e.virtual.total:0,d=void 0!==this.props.opened?this.props.opened:this.state.opened,u=void 0!==e.opened?e.opened:t.opened;e.data!==l&&this.checkForDuplicatePlainTextRecords();const p=!u&&d,c=this.value;if(this._valueOnDidUpdate=c,this.base.didUpdate(),n&&n.total!==r)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{const r=void 0!==e.value?e.value:t.value;let h=this.hasDuplicates?this.navigationIndex||0:l.findIndex((e=>w(e,c,i)));"modern"===this.props.groupMode&&o&&c&&(h=null==(s=this.base.getGroupedDataModernMode(l,a))?void 0:s.map((e=>e[o])).indexOf(c[o]));const g=!w(r,c,i);p&&n?this.base.scrollToVirtualItem(n,h):p&&!n?(this.onPopupOpened(),l&&0!==l.length&&this.base.resetGroupStickyHeader(l[0][a],this),this.base.scrollToItem(h)):(this.hasDuplicates||d&&u&&c&&g)&&this.base.scrollToItem(h)}p&&this._input&&this._input.focus(),this.setValidity()}componentDidMount(){var e;this.observerResize=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.base.didMount(),this.setValidity(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body),this.checkForDuplicatePlainTextRecords()}componentWillUnmount(){var e;null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.disconnect()}render(){const t=r.provideLocalizationService(this).toLanguageString(R,z[R]),s=r.provideLocalizationService(this).toLanguageString(B,z[B]),{dir:o,disabled:l,clearButton:u=e.defaultProps.clearButton,label:p,textField:c,className:g,style:v,loading:m,iconClassName:b,virtual:y,size:C,rounded:x,fillMode:k,opened:w=this.state.opened,placeholder:S,svgIcon:E,unstyled:D}=this.props,F=!this.validityStyles||this.validity.valid,M=void 0!==this.props.filter?this.props.filter:this.state.text,K=I(this.value,c),N=f(M)?M:K,T=u&&(!!N||f(this.value)),P=this.base.vs,O=this.props.id||this._inputId,L=D&&D.uComboBox;P.enabled=void 0!==y,void 0!==y&&(P.skip=y.skip,P.total=y.total,P.pageSize=y.pageSize);const[_,H]=X(this.props.prefix||h.Fragment),[V,q]=X(this.props.suffix||h.Fragment),W=h.createElement(h.Fragment,null,h.createElement("span",{className:i.classNames(i.uComboBox.wrapper({c:L,size:C,rounded:x,fillMode:k,disabled:l,invalid:!F,loading:m,required:this.required}),g),ref:this.componentRef,style:p?{...v,width:void 0}:v,dir:o,onFocus:this.handleFocus},this.props.prefix&&h.createElement(_,{...H}),this.renderSearchBar(N||"",O,S),T&&!m&&h.createElement(Q,{onClick:this.clearButtonClick,key:"clearbutton"}),m&&h.createElement(i.IconWrap,{className:i.classNames(i.uComboBox.loadingIcon({c:L})),name:"loading",key:"loading"}),this.props.suffix&&h.createElement(V,{...q}),h.createElement(d.Button,{tabIndex:-1,type:"button","aria-label":w?s:t,icon:b?void 0:"caret-alt-down",svgIcon:E||a.caretAltDownIcon,iconClass:b,size:C,fillMode:k,rounded:null,themeColor:"base",className:i.classNames(i.uComboBox.inputButton({c:L})),onClick:this.toggleBtnClick,onMouseDown:e=>e.preventDefault()}),!this.mobileMode&&this.renderListContainer()),this.mobileMode&&this.renderAdaptiveListContainer());return p?h.createElement(n.FloatingLabel,{label:p,editorId:O,editorValue:N,editorValid:F,editorDisabled:l,style:{width:v?v.width:void 0},children:W,unstyled:D}):W}onNavigate(e,t,s){const{virtual:i={skip:0}}=this.props,n=F(this.props),a=this.props.filter?this.props.filter:this.state.text;let o,l=-1;const r=this.base.vs,d=this.value;this._suggested="";const u=this.hasDuplicates&&-1!==this.duplicates.indexOf(d);if(l=this.getFocusedIndex(u),-1===l||f(d))if(""===a)this.handleItemSelect(0,e);else{const a=i.skip+l;o=this.base.navigation.navigate({keyCode:t,current:a,max:(r.enabled?r.total:n.length)-1,min:0,skipItems:s||void 0}),void 0!==o&&this.handleItemSelect(o,e)}else this.handleItemSelect(l,e);this.navigationIndex=o}getCurrentValueDisabledStatus(e,t,s){return e&&t&&t[s]&&t[s].disabled}applyValueOnEnter(e,t){const{textField:s,allowCustom:i}=this.props,n=F(this.props),a=void 0!==this.props.opened?this.props.opened:this.state.opened,o=I(this.value,s)===e?this.index:x(n,e,s),l=-1!==o;let r;if(this._suggested="",l)r=n[o];else{if(!i)return this.selectFocusedItem(e,t);r=void 0!==s?{[s]:e}:e}this.triggerOnChange(r,t),a&&this.base.togglePopup(t),void 0===this.props.filter&&void 0!==this.state.text&&(t.data.text=void 0),this.applyState(t)}applyValueOnRejectSuggestions(e,t){const{textField:s,allowCustom:i}=this.props,n=F(this.props),a=void 0!==this.props.opened?this.props.opened:this.state.opened,o=I(this.value,s);if(this._suggested="",e===o||""===e&&!f(o))return this.closeOpenedApplyStateNonMobileMode(t,a),this.applyState(t);const l=x(n,e,s,!0);let r=null;-1!==l?r=n[l]:i&&(r=e?s?{[s]:e}:e:null),this.triggerOnChange(r,t),void 0!==this.state.text&&(t.data.text=void 0,this.base.filterChanged("",t)),this.closeOpenedApplyStateNonMobileMode(t,a),this.applyState(t)}selectFocusedItem(e,t){const s=void 0!==this.props.opened?this.props.opened:this.state.opened,{textField:i,virtual:n={skip:0},focusedItemIndex:a=C}=this.props,o=F(this.props),l=n.skip,r=""===e&&0===l?0:a(o,e,i);return-1!==r?this.handleItemSelect(r+l,t):(this.triggerOnChange(null,t),void 0!==this.state.text&&(t.data.text=void 0)),s&&this.base.togglePopup(t),this.applyState(t)}renderAdaptiveListContainer(){const{windowWidth:e=0}=this.state,{groupField:t,adaptiveTitle:s=this.props.label,adaptiveSubtitle:i}=this.props,n=F(this.props),a=void 0!==this.props.opened?this.props.opened:this.state.opened;let{group:o}=this.state;void 0===o&&void 0!==t&&(o=I(n[0],t));const l={title:s||this.props.label,subTitle:i,expand:a,onClose:e=>this.toggleBtnClick(e),windowWidth:e,mobileFilter:this.renderMobileListFilter()};return h.createElement(G,{...l},h.createElement(u.ActionSheetContent,null,h.createElement("div",{className:"k-list-container"},this.listContainerContent())))}renderListContainer(){const e=this.base,{dir:t,header:s,footer:n,groupField:a,groupMode:o,size:l,list:r,virtual:d,groupStickyHeaderItemRender:u,unstyled:p}=this.props,c=F(this.props),v=void 0!==this.props.opened?this.props.opened:this.state.opened,f=e.getPopupSettings(),b=void 0!==f.width?f.width:e.popupWidth,y=p&&p.uComboBox;let{group:C}=this.state;return void 0===C&&void 0!==a&&(C=I(c[0],a)),h.createElement(g,{width:b,popupSettings:{...f,anchor:f.anchor||this.element,show:v,popupClass:i.classNames(f.popupClass,i.uComboBox.listContainer({c:y,popup:!0}))},dir:void 0!==t?t:this.base.dirCalculated,itemsCount:[c.length]},h.createElement("div",{className:i.classNames(i.uComboBox.list({c:y,list:r,size:l,tableSize:l,virtual:d}))},s&&h.createElement("div",{className:i.classNames(i.uComboBox.listHeader({c:y}))},s),!r&&C&&0!==c.length&&h.createElement(m,{group:C,groupMode:o,render:u}),this.renderList(),n&&h.createElement("div",{className:i.classNames(i.uComboBox.listFooter({c:y}),this.props.footerClassName)},n)),this.showLicenseWatermark&&h.createElement(i.WatermarkOverlay,{message:this.licenseMessage}))}renderList(){const e=this.base,{textField:t,dataItemKey:s,listNoDataRender:n,itemRender:a,groupHeaderItemRender:o,virtual:l={skip:0,total:void 0},unstyled:r}=this.props,d=F(this.props),u=e.getPopupSettings(),p=e.vs,c=l.skip,g=void 0!==this.props.opened?this.props.opened:this.state.opened,v=`translateY(${p.translate}px)`,m=g?this.getFocusedIndex(this.hasDuplicates):void 0,b=void 0!==this.props.filter?this.props.filter:this.state.text,y=I(this.value,t),C=f(b)&&b!==y?null:this.value,x=this.props.list||H,k=r&&r.uComboBox;return h.createElement(x,{id:e.listBoxId,virtual:!!l,show:g,data:d,focusedIndex:m,value:C,textField:t,valueField:s,groupField:this.props.groupField,groupMode:this.props.groupMode,isMultiColumn:this.props.isMultiColumn,optionsGuid:e.guid,hasDuplicates:this.hasDuplicates,listRef:e=>{p.list=this.base.list=e,this.itemHeight=0},wrapperStyle:this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth>this.props._adaptiveMode.medium?{maxHeight:u.height}:{},wrapperCssClass:i.classNames(i.uComboBox.listContent({c:k,virtual:l})),listStyle:p.enabled?{transform:v}:void 0,key:"listkey",skip:c,onClick:this.handleItemClick,itemRender:a,groupHeaderItemRender:o,noDataRender:n,onMouseDown:e=>e.preventDefault(),onScroll:this.onScroll,wrapperRef:p.scrollerRef,scroller:this.base.renderScrollElement(),ariaSetSize:l.total})}renderSearchBar(e,t,s){const{tabIndex:i,accessKey:n,disabled:a,title:o,ariaLabelledBy:l,ariaDescribedBy:r,dataItemKey:d,virtual:u={skip:0},unstyled:p,inputAttributes:c}=this.props,g=F(this.props),v=void 0!==this.props.opened?this.props.opened:this.state.opened,m=this.value,f=Math.max(0,g.findIndex((e=>w(e,m,d))));return this._suggested&&!w(this._valueOnDidUpdate,m,d)&&(this._suggested=""),h.createElement(J,{id:t,readOnly:v&&this.mobileMode,placeholder:s,tabIndex:i,accessKey:n,title:o,value:e+this._suggested,suggestedText:this._suggested,ref:e=>{this._input=e&&e.input},onClick:this.onInputClick,onKeyDown:this.onInputKeyDown,onChange:this.inputOnChange,onFocus:this.base.handleFocus,onBlur:this.handleBlur,disabled:a,expanded:v,owns:this.base.listBoxId,activedescendant:`option-${this.base.guid}-${f+u.skip}`,role:"combobox",ariaLabelledBy:l,ariaLabel:this.props.ariaLabel,ariaDescribedBy:r,ariaRequired:this.required,render:this.props.valueRender,ariaControls:this.base.listBoxId,unstyled:p,inputAttributes:c})}clearValue(){const e=this.base.initState();this._suggested="",this.navigationIndex=void 0,this.base.filterChanged("",e),void 0===this.props.filter&&void 0!==this.state.text&&(e.data.text=void 0),this.triggerOnChange(null,e);const t=void 0!==this.props.opened?this.props.opened:this.state.opened,s=this.mobileMode;t&&!s&&this.base.togglePopup(e),this.applyState(e)}triggerOnChange(e,t){const s=this.value;!this.hasDuplicates&&(!f(s)&&!f(e)||w(s,e,this.props.dataItemKey))||(void 0===this.props.value&&(t.data.value=e),this._valueDuringOnChange=e,t.events.push({type:"onChange"}))}getFocusedIndex(e){const t=this.value,{textField:s,dataItemKey:i,virtual:n={skip:0},focusedItemIndex:a=C,skipDisabledItems:o}=this.props,l=F(this.props),r=this.props.filter?this.props.filter:this.state.text;return e&&void 0!==this.navigationIndex?this.navigationIndex:f(t)&&void 0===r?l.findIndex((e=>w(e,t,i))):r?a(l,r,s):o&&s&&!r&&0===n.skip?l.findIndex((e=>!e.disabled&&e[s])):0===n.skip?0:-1}suggestValue(e){const{data:t,textField:s}=this.props;this._suggested=((e,t=[],s)=>{let i="";if(e){const n=t[C(t,e,s)];if(n){const t=I(n,s);e.toLowerCase()!==t.toLowerCase()&&(i=t.substring(e.length))}}return i})(e,t,s)}applyState(e){this.base.applyState(e),this._valueDuringOnChange=void 0}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}};ee.displayName="ComboBox",ee.propTypes={...U.propTypes,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"solid","flat","outline"]),dataItemKey:s.string,groupField:s.string,groupMode:s.oneOf([void 0,"classic","modern"]),isMultiColumn:s.bool,suggest:s.bool,placeholder:s.string,title:s.string,allowCustom:s.bool,clearButton:s.bool,iconClassName:s.string,svgIcon:i.svgIconPropType,validationMessage:s.string,required:s.bool,id:s.string,ariaLabelledBy:s.string,ariaLabel:s.string,ariaDescribedBy:s.string,list:s.any,valueRender:s.func,skipDisabledItems:s.bool,inputAttributes:s.object},ee.defaultProps={...U.defaultProps,size:"medium",rounded:"medium",fillMode:"solid",allowCustom:!1,clearButton:!0,required:!1,groupMode:"modern",isMultiColumn:!1,skipDisabledItems:!0,prefix:void 0,suffix:void 0};let te=ee;const se=i.createPropsContext(),ie=i.withIdHOC(i.withPropsContext(se,i.withUnstyledHOC(i.withAdaptiveModeContext(te))));ie.displayName="KendoReactComboBox";const{sizeMap:ne,roundedMap:ae}=i.kendoThemeMaps,oe=class e extends h.Component{constructor(){super(...arguments),this.state={},this.base=new U(this),this._element=null,this._suggested="",this._input=null,this._adaptiveInput=null,this._skipFocusEvent=!1,this._isScrolling=!1,this.itemHeight=0,this.focus=()=>{this._input&&this._input.focus()},this.handleItemSelect=(e,t)=>{const s=F(this.props),i=I(s[e],this.props.textField);this.state.text&&!this.mobileMode&&(this.state.text&&(t.data.text=""),this.base.filterChanged("",t)),this._adaptiveInput&&this._adaptiveInput.blur(),this.triggerOnChange(i,t)},this.itemFocus=(e,t)=>{const{textField:s}=this.props,i=F(this.props)[e];w(this.state.focusedItem,i,s)||(t.data.focusedItem=i)},this.togglePopup=e=>{this.base.togglePopup(e)},this.setValidity=()=>{this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity.valid?"":this.props.validationMessage||"Please enter a valid value!")},this.renderAdaptiveListContainer=()=>{const{windowWidth:e=0}=this.state,t=h.createElement(v,{value:this.value,ref:e=>{this._adaptiveInput=e&&e.element},onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,size:"large",rounded:this.props.rounded,fillMode:this.props.fillMode,placeholder:this.props.placeholder}),s={title:this.props.adaptiveTitle||this.props.label,subTitle:this.props.adaptiveSubtitle,expand:this.opened,onClose:e=>this.onCancel(e),windowWidth:e,mobileFilter:t};return h.createElement(G,{...s},h.createElement(u.ActionSheetContent,null,h.createElement("div",{className:"k-list-container"},this.listContainerContent())))},this.onCancel=e=>{const t=this.base.initState();t.syntheticEvent=e,e.stopPropagation(),this.opened&&this.base.togglePopup(t),t.events.push({type:"onCancel"});const s=this.state.text;f(s)&&""!==s&&this.base.filterChanged("",t),this.state.text&&(t.data.text=""),this.applyState(t)},this.listContainerContent=()=>{const{header:e,footer:t,size:s,groupStickyHeaderItemRender:n,groupField:a,list:o}=this.props,l=F(this.props);let{group:r}=this.state;return void 0===r&&void 0!==a&&(r=I(l[0],a)),h.createElement(h.Fragment,null,e&&h.createElement("div",{className:"k-list-header"},e),h.createElement("div",{className:i.classNames("k-list",{[`k-list-${this.mobileMode?"lg":ne[s]||s}`]:s})},!o&&r&&0!==l.length&&h.createElement(m,{group:r,groupMode:"modern",render:n}),this.renderList()),t&&h.createElement("div",{className:"k-list-footer"},t))},this.onScroll=e=>{this._isScrolling=!0;const{list:t}=this.base,{groupField:s}=this.props;let i=F(this.props);if(!s||!i.length)return;const n=this.itemHeight||(t?t.children[0].offsetHeight:0),a=e.target.scrollTop;s&&(i=this.base.getGroupedDataModernMode(i,s));let o=i[0][s];for(let e=1;e<i.length&&!(n*e>a);e++)i[e]&&i[e][s]&&(o=i[e][s]);o!==this.state.group&&this.setState({group:o})},this.handleItemClick=(e,t)=>{this.base.handleItemClick(e,t),this._valueDuringOnChange=void 0},this.onChangeHandler=e=>{const t=this.base.initState(),s=this.mobileMode?e.target.element:e.currentTarget,i=s.value,n=s.selectionEnd===i.length;t.syntheticEvent=e;const a=this._suggested,o=this.value,l=o&&o.substring(0,o.length-a.length),r=l&&l===i,d=l&&l.length>i.length,{suggest:u}=this.props,p=void 0!==this.props.opened?this.props.opened:this.state.opened;if(void 0!==u&&!1!==u){r||d||!n?this._suggested="":this.suggestValue(i);const e=i+this._suggested,s={userInput:i,value:this._suggested};this.triggerOnChange(e,t,{suggestion:s})}else this._suggested="",this.triggerOnChange(i,t);(!p&&i||p&&!i)&&this.togglePopup(t),t.data.focusedItem=void 0,this.applyState(t),this.setState({group:void 0})},this.clearButtonClick=e=>{const t=this.base.initState(),s=void 0!==this.props.opened?this.props.opened:this.state.opened;t.syntheticEvent=e;this._suggested="",this.triggerOnChange("",t),void 0!==this.state.focusedItem&&(t.data.focusedItem=void 0),s&&this.togglePopup(t),this.applyState(t)},this.onInputKeyDown=e=>{const{skipDisabledItems:t,groupField:s,textField:n}=this.props,a=F(this.props);this._isScrolling&&(this._isScrolling=!1);const o=this.focusedIndex(),l=a[o],r=e.keyCode,d=e.altKey,u=void 0!==this.props.opened?this.props.opened:this.state.opened,p=this.base.initState();p.syntheticEvent=e;const c=()=>{u&&e.preventDefault()};if(d&&r===i.Keys.down)this.setState({opened:!0});else if(d&&r===i.Keys.up)this.setState({opened:!1});else if(u&&r===i.Keys.pageUp)c(),this.base.scrollPopupByPageSize(-1);else if(u&&r===i.Keys.pageDown)c(),this.base.scrollPopupByPageSize(1);else if(!u||r!==i.Keys.enter&&r!==i.Keys.esc)if(u||r!==i.Keys.esc){if(r===i.Keys.up||r===i.Keys.down){if(""!==s&&n)if(!this.props.skipDisabledItems&&u)this.onNavigate(p,r);else{let e=0;if(r===i.Keys.down||r===i.Keys.right){const t=a.slice(o+1).find((e=>!e.disabled&&e[n]));e=t&&a.findIndex((e=>e[n]===t[n]))}else if(r===i.Keys.up||r===i.Keys.left){let t;if(-1===o)t=a,e=a.findIndex((e=>!e.disabled&&e[n]));else{t=a.slice(0,o);let s=t.pop();for(;s&&s.disabled;)s=t.pop();e=s&&a.findIndex((e=>e[n]===s[n]))}}if(void 0!==e){const t=e-o;this.onNavigate(p,r,t)}else void 0===e&&a.findIndex((e=>e[n]))===a.length-1&&this.onNavigate(p,r)}else if(!this.props.skipDisabledItems&&u)this.onNavigate(p,r);else{let e=null;if(r===i.Keys.down||r===i.Keys.right)e=a.slice(o+1).find((e=>!e.disabled));else if(r===i.Keys.up||r===i.Keys.left){const t=a.slice(0,o);for(e=t.pop();e&&e.disabled;)e=t.pop()}if(e){const t=e.id-o-1;this.onNavigate(p,r,t)}else this.onNavigate(p,r)}this.applyState(p),c()}}else{const e="";this._suggested="",this.triggerOnChange(e,p),void 0!==this.state.focusedItem&&(p.data.focusedItem=void 0),this.applyState(p)}else c(),!1===t&&l&&l.disabled?(u&&this.togglePopup(p),this.applyState(p)):this.applyInputValue(e.currentTarget.value,p,e.keyCode)},this.handleFocus=e=>{this._skipFocusEvent||this.base.handleFocus(e)},this.handleBlur=e=>{const t=this.base.initState();!this.state.focused||this._skipFocusEvent||(t.syntheticEvent=e,t.data.focused=!1,t.events.push({type:"onBlur"}),this.opened&&!this.mobileMode&&(this.state.opened&&(t.data.opened=!1),t.events.push({type:"onClose"})),this.applyState(t))},this.handleWrapperClick=e=>{const t=this._input;!this.opened&&t&&this.focusElement(t);const s=this.base.initState();s.syntheticEvent=e,!this.state.focused&&!this.mobileMode&&(s.events.push({type:"onFocus"}),s.data.focused=!0),this.mobileMode&&window.setTimeout((()=>this._adaptiveInput&&this._adaptiveInput.focus()),300),this.base.togglePopup(s),this.applyState(s)}}get _inputId(){return this.props.id+"-accessibility-id"}get document(){if(i.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get value(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""}get name(){return this.props.name}get validity(){const e=void 0!==this.props.validationMessage,t=!this.required||""!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}}get opened(){return!!(void 0!==this.props.opened?this.props.opened:this.state.opened)}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}get validityStyles(){return void 0!==this.props.validityStyles?this.props.validityStyles:e.defaultProps.validityStyles}get required(){return void 0!==this.props.required?this.props.required:e.defaultProps.required}componentDidUpdate(e,t){var s;const{groupField:i=""}=this.props,n=F(this.props),{data:a=[]}=e,o=this.focusedIndex(),l=n[o],r=a!==n,d=void 0!==l&&t.focusedItem!==l,u=void 0!==this.props.opened?this.props.opened:this.state.opened,p=void 0!==e.opened?e.opened:t.opened,c=!p&&u;if(""===i)(u&&(d||r)||c)&&this.base.scrollToItem(o);else if(!this._isScrolling){const e=null==(s=this.base.getGroupedDataModernMode(n,i))?void 0:s.indexOf(l);c&&(n&&0!==n.length&&this.base.resetGroupStickyHeader(n[0][i],this),this.base.scrollToItem(e)),u&&p&&d&&this.base.scrollToItem(e)}this.setValidity()}componentDidMount(){var e;this.observerResize=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.base.didMount(),this.setValidity(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentWillUnmount(){this.observerResize&&this.observerResize.disconnect()}render(){const{dir:e,disabled:t,label:s,className:a,style:o,loading:l,suggest:r,size:d,rounded:u,fillMode:p}=this.props,c=!this.validityStyles||this.validity.valid,g=this.base,v=this.value,m=!1!==this.props.clearButton&&!l&&!!v,f=this.props.id||this._inputId,b=this.state.focused;"string"==typeof r&&(this._suggested=r);const[y,C]=X(this.props.prefix||h.Fragment),[x,I]=X(this.props.suffix||h.Fragment),k=h.createElement(h.Fragment,null,h.createElement("span",{className:i.classNames("k-autocomplete k-input",a,{[`k-input-${ne[d]||d}`]:d,[`k-rounded-${ae[u]||u}`]:u,[`k-input-${p}`]:p,"k-invalid":!c,"k-focus":b&&!t,"k-loading":l,"k-required":this.required,"k-disabled":t}),ref:e=>{this._element=e,g.wrapper=e},style:s?{...o,width:void 0}:o,dir:e,onFocus:this.mobileMode?e=>this.handleWrapperClick(e):this.handleFocus,onBlur:this.handleBlur,onClick:this.handleWrapperClick},this.props.prefix&&h.createElement(y,{...C}),this.renderSearchBar(v||"",f),l&&h.createElement(i.IconWrap,{className:"k-input-loading-icon",name:"loading"}),m&&!l&&h.createElement(Q,{onClick:this.clearButtonClick,key:"clearbutton"}),this.props.suffix&&h.createElement(x,{...I}),!this.mobileMode&&this.renderListContainer()),this.mobileMode&&this.renderAdaptiveListContainer());return s?h.createElement(n.FloatingLabel,{label:s,editorId:f,editorValue:v,editorValid:c,editorDisabled:t,style:{width:o?o.width:void 0},children:k}):k}onNavigate(e,t,s){const i=this.value,{textField:n,focusedItemIndex:a}=this.props,o=F(this.props),l=void 0!==this.state.focusedItem?o.findIndex((e=>w(e,this.state.focusedItem,n))):a?a(o,i,n):o.indexOf(S(o,i,n)),r=this.base.navigation.navigate({keyCode:t,current:l,max:o.length-1,min:0,skipItems:s||void 0});void 0!==r&&this.itemFocus(r,e),this.applyState(e)}applyInputValue(e,t,s){const n=void 0!==this.props.opened?this.props.opened:this.state.opened,{textField:a}=this.props,o=F(this.props),l=o[this.focusedIndex()];if(this._suggested="",n&&s===i.Keys.enter&&l&&!l.disabled){const s=I(o[this.focusedIndex(e)],a);this.triggerOnChange(s,t)}n&&this.togglePopup(t),this.applyState(t)}renderSearchBar(e,t){const s=this.base,{placeholder:i,tabIndex:n,disabled:a,readonly:o,inputAttributes:l}=this.props,{focused:r}=this.state,d=void 0!==this.props.opened?this.props.opened:this.state.opened;return h.createElement(J,{id:t,placeholder:i,tabIndex:n,accessKey:this.props.accessKey,value:e,suggestedText:this._suggested,focused:r,name:this.props.name,ref:e=>{this._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.onChangeHandler,onFocus:s.handleFocus,onBlur:this.handleBlur,disabled:a,readOnly:o,expanded:d,owns:s.listBoxId,activedescendant:"option-"+s.guid+"-"+this.focusedIndex(),role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,ariaRequired:this.required,render:this.props.valueRender,inputAttributes:l})}renderListContainer(){const e=this.base,{dir:t,groupField:s}=this.props,n=F(this.props),a=e.getPopupSettings(),o=void 0!==this.props.opened?this.props.opened:this.state.opened,l=void 0!==a.width?a.width:e.popupWidth;let{group:r}=this.state;return void 0===r&&void 0!==s&&(r=I(n[0],s)),h.createElement(g,{width:l,popupSettings:{...a,anchor:a.anchor||this.element,show:o,popupClass:i.classNames(a.popupClass,"k-list-container","k-autocomplete-popup")},dir:void 0!==t?t:this.base.dirCalculated,itemsCount:[n.length]},this.listContainerContent())}renderList(){const e=this.base,t=e.getPopupSettings(),{textField:s,listNoDataRender:i,itemRender:n,groupHeaderItemRender:a}=this.props,o=F(this.props),l=this.value,r=void 0!==this.props.opened?this.props.opened:this.state.opened;return h.createElement(H,{id:e.listBoxId,show:r,data:o.slice(),focusedIndex:this.focusedIndex(),value:l,textField:s,valueField:s,highlightSelected:!1,optionsGuid:e.guid,groupField:this.props.groupField,groupMode:"modern",listRef:t=>{e.list=t},wrapperStyle:this.mobileMode?{}:{maxHeight:t.height},wrapperCssClass:"k-list-content",onClick:this.handleItemClick,itemRender:n,groupHeaderItemRender:a,noDataRender:i,onMouseDown:e=>e.preventDefault(),onScroll:this.onScroll})}triggerOnChange(e,t,s){this.value===e&&!s||(t.data.value=e,this._valueDuringOnChange=e,t.events.push({type:"onChange",...s||{}}))}focusElement(e){this._skipFocusEvent=!0,e.focus(),window.setTimeout((()=>this._skipFocusEvent=!1),0)}applyState(e){this.base.applyState(e),this._valueDuringOnChange=void 0}suggestValue(e){if(this._suggested="",e){const{textField:t}=this.props,s=F(this.props),i=s[C(s,e,t)];if(i){const s=I(i,t);e.toLowerCase()!==s.toLowerCase()&&(this._suggested=s.substring(e.length))}}}focusedIndex(e){const{textField:t,focusedItemIndex:s,skipDisabledItems:i}=this.props,n=F(this.props),a=void 0!==e?e:this.value;if(void 0!==this.state.focusedItem)return n.findIndex((e=>w(e,this.state.focusedItem,t)));if(s)return s(n,a,t);const o=n.indexOf(S(n,a,t));return i&&t&&-1===o?n.findIndex((e=>!e.disabled&&e[t])):Math.max(0,o)}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}};oe.displayName="AutoComplete",oe.propTypes={...U.basicPropTypes,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"solid","flat","outline"]),groupField:s.string,suggest:s.oneOfType([s.bool,s.string]),placeholder:s.string,value:s.string,defaultValue:s.string,validationMessage:s.string,required:s.bool,readonly:s.bool,clearButton:s.bool,valueRender:s.func,id:s.string,ariaLabelledBy:s.string,ariaDescribedBy:s.string,list:s.any,adaptive:s.bool,adaptiveTitle:s.string,adaptiveSubtitle:s.string,onCancel:s.func,skipDisabledItems:s.bool,inputAttributes:s.object},oe.defaultProps={...U.defaultProps,size:"medium",rounded:"medium",fillMode:"solid",skipDisabledItems:!0,prefix:void 0,suffix:void 0};let le=oe;const re=i.createPropsContext(),de=i.withIdHOC(i.withPropsContext(re,i.withAdaptiveModeContext(le)));de.displayName="KendoReactAutoComplete";const ue=e=>e.syntheticEvent.preventDefault(),pe=e=>e.syntheticEvent.stopPropagation();class ce extends h.Component{render(){const{data:e,guid:t,focused:s,tagRender:i,tag:n,onTagDelete:a,size:o}=this.props;return h.createElement(h.Fragment,null,e.map(((l,r)=>{const u=n?h.createElement(n,{key:l.text+r,tagData:l,guid:t,focusedTag:s,onTagDelete:a}):h.createElement(d.Chip,{id:`tag-${t}-${l.text.replace(/\s+/g,"-")}`,"aria-selected":!0,role:"option","aria-setsize":e.length,key:l.text+r,text:l.text,removable:!0,onRemove:e=>a.call(void 0,l.data,e.syntheticEvent),onMouseDown:ue,onClick:pe,className:l===s?"k-focus":void 0,size:o});return i?i(l,u):u})),this.props.children)}}var he=(e=>(e[e.PopupList=0]="PopupList",e[e.TagsList=1]="TagsList",e))(he||{});const{sizeMap:ge,roundedMap:ve}=i.kendoThemeMaps,me=e=>e.preventDefault(),fe=e=>2===e,be=class e extends h.Component{constructor(e){super(e),this.state={activedescendant:he.PopupList,currentValue:[]},this._element=null,this._valueItemsDuringOnChange=null,this.base=new U(this),this._tags=[],this._input=null,this._adaptiveInput=null,this._skipFocusEvent=!1,this._lastSelectedOrDeslectedItemIndex=null,this.itemHeight=0,this.scrollToFocused=!1,this.showLicenseWatermark=!1,this.focus=()=>{this._input&&this._input.focus()},this.handleItemSelect=(e,t)=>{const{dataItemKey:s,virtual:i}=this.props,n=F(this.props),a=n[e-(i?i.skip:0)],o=this.value.findIndex((e=>w(e,a,s)));this._lastSelectedOrDeslectedItemIndex=n.findIndex((e=>w(e,a,s)));let l=[];-1!==o?(l=this.value,l.splice(o,1)):l=[...this.value,a],(void 0!==this.props.filter?this.props.filter:this.state.text)&&!this.mobileMode&&(this.state.text&&(t.data.text=""),this.base.filterChanged("",t)),this._adaptiveInput&&this._adaptiveInput.blur(),void 0!==this.state.focusedIndex&&(t.data.focusedIndex=void 0),this.triggerOnChange(l,t),this.base.triggerPageChangeCornerItems(a,t)},this.onTagDelete=(e,t)=>{const s=this.base.initState();s.syntheticEvent=t,this.opened&&this.base.togglePopup(s),!this.state.focused&&!this.mobileMode&&(s.data.focused=!0,this.focus());const i=this.value;k(i,e,this.props.dataItemKey),this.triggerOnChange(i,s),this.applyState(s)},this.itemFocus=(e,t)=>{const{allowCustom:s,virtual:i}=this.props,n=F(this.props),a=i?i.skip:0,o=void 0!==this.props.filter?this.props.filter:this.state.text,{focusedIndex:l}=this.getFocusedState(),r=s&&o,d=n[e-a];d&&l!==e?this.state.focusedIndex!==e&&(t.data.focusedIndex=e,t.data.activedescendant=he.PopupList):r&&-1===e&&void 0!==this.state.focusedIndex&&(t.data.focusedIndex=void 0),this.base.triggerPageChangeCornerItems(d,t)},this.componentRef=e=>{this._element=e,this.base.wrapper=e},this.searchbarRef=e=>{const t=this._input=e&&e.input;t&&this.state.focused&&window.setTimeout((()=>t.focus()),0)},this.onChangeHandler=e=>{const t=this.base.initState(),s=e.target.value;t.syntheticEvent=e,void 0===this.props.filter&&(t.data.text=s),t.data.focusedIndex=void 0,this.opened||(this.base.togglePopup(t),this.setState({currentValue:this.value})),this.base.filterChanged(s,t),this.applyState(t),this.setState({group:void 0})},this.clearButtonClick=e=>{const t=this.base.initState();t.syntheticEvent=e,e.stopPropagation(),this.value.length>0&&this.triggerOnChange([],t),void 0!==this.state.focusedIndex&&(t.data.focusedIndex=void 0),this.opened&&this.base.togglePopup(t);const s=void 0!==this.props.filter?this.props.filter:this.state.text;f(s)&&""!==s&&this.base.filterChanged("",t),this.state.text&&(t.data.text=""),this._lastSelectedOrDeslectedItemIndex=null,this.applyState(t)},this.onInputKeyDown=e=>{const{textField:t,groupField:s}=this.props,n=F(this.props),a=e.keyCode,o=void 0!==this.props.filter?this.props.filter:this.state.text,l=void 0!==this.props.opened?this.props.opened:this.state.opened,{focusedItem:r,focusedIndex:d}=this.getFocusedState(),u=this.base.initState();if(u.syntheticEvent=e,!o&&this.value.length>0&&(a===i.Keys.left||a===i.Keys.right||a===i.Keys.home||a===i.Keys.end||a===i.Keys.delete||a===i.Keys.backspace)&&!e.shiftKey)return this.onTagsNavigate(e,u);const p=()=>{e.preventDefault(),this.base.togglePopup(u),this.applyState(u)};if(this.opened)if(a===i.Keys.pageUp)e.preventDefault(),this.base.scrollPopupByPageSize(-1);else if(a===i.Keys.pageDown)e.preventDefault(),this.base.scrollPopupByPageSize(1);else if((e.ctrlKey||e.metaKey)&&"KeyA"===e.code){const e=(this.state.value&&this.state.value.length)===n.length?[]:n;this.updateStateOnKeyboardNavigation(e,u)}else if((e.ctrlKey||e.metaKey)&&e.shiftKey&&e.keyCode===i.Keys.end){const e=n.slice(this.getFocusedState().focusedIndex);this.itemFocus(n.length-1,u),this.updateStateOnKeyboardNavigation(e,u)}else if((e.ctrlKey||e.metaKey)&&e.shiftKey&&e.keyCode===i.Keys.home){const e=n.slice(0,this.getFocusedState().focusedIndex+1);this.itemFocus(0,u),this.updateStateOnKeyboardNavigation(e,u)}else if(e.shiftKey&&e.keyCode===i.Keys.up){let e;const t=this.getLastSelectedOrDeselectedIndex(1,d);null===t?e=0!==d?n.slice(d-1,d):[n[d]]:t===d?e=[n[t-1]]:d>=0&&(e=t>d?n.slice(d-1,t):n.slice(t-1,d)),e&&e.length>0&&(d>=1&&this.itemFocus(d-1,u),this.updateStateOnKeyboardNavigation(e,u))}else if(e.shiftKey&&e.keyCode===i.Keys.down){let e;const t=this.getLastSelectedOrDeselectedIndex(0,d);null===t?e=d!==n.length-1?n.slice(d,d+1):[n[d]]:t===d?e=n.slice(d,d+2):d>=0&&(e=t>d?n.slice(d+1,t+1):n.slice(t,d+2)),e&&e.length>=1&&(this.itemFocus(d+1,u),this.updateStateOnKeyboardNavigation(e,u))}else if(e.altKey&&a===i.Keys.up)p();else if(a===i.Keys.up||a===i.Keys.down){if(""!==s&&t)if(!this.props.skipDisabledItems&&l)this.onNavigate(u,a);else{let e=0;if(a===i.Keys.down||a===i.Keys.right){const s=n.slice(d+1).find((e=>!e.disabled&&e[t]));e=s&&n.findIndex((e=>e[t]===s[t]))}else if(a===i.Keys.up||a===i.Keys.left){let s;if(-1===d)s=n,e=n.findIndex((e=>!e.disabled&&e[t]));else{s=n.slice(0,d);let i=s.pop();for(;i&&i.disabled;)i=s.pop();e=i&&n.findIndex((e=>e[t]===i[t]))}}if(e){const t=e-d;this.onNavigate(u,a,t)}else void 0!==e&&this.onNavigate(u,a)}else if(!this.props.skipDisabledItems&&l)this.onNavigate(u,a);else{let e=null;if(a===i.Keys.down||a===i.Keys.right)e=n.slice(d+1).find((e=>!e.disabled));else if(a===i.Keys.up||a===i.Keys.left){const t=n.slice(0,d);for(e=t.pop();e&&e.disabled;)e=t.pop()}if(e){const t=e.id-d-1;this.onNavigate(u,a,t)}else this.onNavigate(u,a)}this.applyState(u),e.preventDefault()}else a===i.Keys.enter?(e.preventDefault(),this.props.allowCustom&&o&&null===r?this.customItemSelect(e):r&&r.disabled?p():this.selectFocusedItem(e)):a===i.Keys.esc&&p();else e.altKey&&a===i.Keys.down?p():a===i.Keys.esc&&this.clearButtonClick(e)},this.listContainerContent=()=>{const{header:e,footer:t,allowCustom:s,size:n,groupStickyHeaderItemRender:o,groupField:l,list:r}=this.props,d=F(this.props),u=void 0!==this.props.filter?this.props.filter:this.state.text,{focusedType:p}=this.getFocusedState(),c=s&&u&&h.createElement("div",{className:i.classNames("k-list",{[`k-list-${ge[n]||n}`]:n}),key:"customitem",onClick:this.customItemSelect,onMouseDown:me},h.createElement("div",{className:i.classNames("k-list-item k-custom-item",{"k-focus":fe(p)}),style:{fontStyle:"italic"}},u,h.createElement(i.IconWrap,{name:"plus",icon:a.plusIcon,style:{position:"absolute",right:"0.5em"}})));let{group:g}=this.state;return void 0===g&&void 0!==l&&(g=I(d[0],l)),h.createElement(h.Fragment,null,e&&h.createElement("div",{className:"k-list-header"},e),c,h.createElement("div",{className:i.classNames("k-list",{[`k-list-${this.mobileMode?"lg":ge[n]||n}`]:n,"k-virtual-list":this.base.vs.enabled})},!r&&g&&0!==d.length&&h.createElement(m,{group:g,groupMode:"modern",render:o}),this.renderList()),this.showLicenseWatermark&&h.createElement(i.WatermarkOverlay,{message:this.licenseMessage}),t&&h.createElement("div",{className:"k-list-footer"},t))},this.renderListContainer=()=>{const e=this.base,{dir:t}=this.props,s=F(this.props),n=this.base.getPopupSettings(),a=void 0!==n.width?n.width:e.popupWidth,o={dir:void 0!==t?t:e.dirCalculated,width:a,popupSettings:{...n,popupClass:i.classNames(n.popupClass,"k-list-container","k-multiselect-popup"),anchor:n.anchor||this.element,show:this.opened,onOpen:this.onPopupOpened,onClose:this.onPopupClosed},itemsCount:[s.length,this.value.length]};return h.createElement(g,{...o},this.listContainerContent())},this.renderAdaptiveListContainer=()=>{const{adaptiveTitle:e,adaptiveSubtitle:t,filterable:s,filter:i}=this.props,{windowWidth:n=0}=this.state,a=void 0!==i?i:this.state.text,o=s?h.createElement(v,{value:a,ref:e=>{this._adaptiveInput=e&&e.element},onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,size:"large",rounded:this.props.rounded,fillMode:this.props.fillMode,placeholder:this.props.placeholder}):null,l={title:e||this.props.label,subTitle:t,expand:this.opened,onClose:e=>this.closePopup(e),windowWidth:n,mobileFilter:o};return h.createElement(G,{...l},h.createElement(u.ActionSheetContent,null,h.createElement("div",{className:"k-list-container"},this.listContainerContent())))},this.closePopup=e=>{const t=this.base.initState();t.syntheticEvent=e,e.stopPropagation(),void 0!==this.state.focusedIndex&&(t.data.focusedIndex=void 0),this.opened&&this.base.togglePopup(t),t.events.push({type:"onClose"});const s=void 0!==this.props.filter?this.props.filter:this.state.text;f(s)&&""!==s&&this.base.filterChanged("",t),this.state.text&&(t.data.text=""),this.applyState(t)},this.onCancel=e=>{const t=this.base.initState();t.syntheticEvent=e,e.stopPropagation(),void 0!==this.state.focusedIndex&&(t.data.focusedIndex=void 0),this.opened&&this.base.togglePopup(t),t.events.push({type:"onCancel"});const s=void 0!==this.props.filter?this.props.filter:this.state.text;f(s)&&""!==s&&this.base.filterChanged("",t),this.state.text&&(t.data.text=""),this.applyState(t)},this.renderList=()=>{const{textField:e,listNoDataRender:t,itemRender:s,groupHeaderItemRender:i,dataItemKey:n,virtual:a={skip:0,total:void 0}}=this.props,o=F(this.props),l=this.base.vs,{focusedIndex:r}=this.getFocusedState(),d=this.base.getPopupSettings(),u=`translateY(${l.translate}px)`;return h.createElement(H,{id:this.base.listBoxId,show:this.opened,data:o.slice(),focusedIndex:r-a.skip,value:this.value,textField:e,valueField:n,optionsGuid:this.base.guid,groupField:this.props.groupField,groupMode:"modern",listRef:e=>{l.list=this.base.list=e},wrapperStyle:this.mobileMode?{}:{maxHeight:d.height},wrapperCssClass:"k-list-content",listStyle:l.enabled?{transform:u}:void 0,key:"listKey",skip:a.skip,onClick:this.handleItemClick,itemRender:s,groupHeaderItemRender:i,noDataRender:t,onMouseDown:me,onBlur:this.handleBlur,onScroll:this.onScroll,wrapperRef:l.scrollerRef,scroller:this.base.renderScrollElement(),ariaSetSize:a.total})},this.onScroll=e=>{const{vs:t,list:s}=this.base;t.scrollHandler(e);const{groupField:i}=this.props;let n=F(this.props);if(i&&n.length&&i){const a=this.itemHeight=this.itemHeight||(t.enabled?t.itemHeight:s?s.children[0].offsetHeight:0),o=e.target.scrollTop-t.skip*a;n=this.base.getGroupedDataModernMode(n,i);let l=n[0][i];for(let e=1;e<n.length&&!(a*e>o);e++)n[e]&&n[e][i]&&(l=n[e][i]);l!==this.state.group&&this.setState({group:l})}},this.customItemSelect=e=>{const t=void 0!==this.props.filter?this.props.filter:this.state.text,{textField:s}=this.props;if(!t)return;const i=this.base.initState();i.syntheticEvent=e;const n=s?{[s]:t}:t;void 0!==this.state.text&&(i.data.text=""),i.data.focusedIndex=void 0,this.base.filterChanged("",i);const a=[...this.value,n];this.triggerOnChange(a,i),this.base.togglePopup(i),this.applyState(i)},this.handleWrapperClick=e=>{const t=this._input;!this.opened&&t&&this.focusElement(t);const s=this.base.initState();s.syntheticEvent=e,!this.state.focused&&!this.mobileMode&&(s.events.push({type:"onFocus"}),s.data.focused=!0),this.mobileMode&&(this.setState({currentValue:this.tagsToRender}),this.mobileMode&&window.setTimeout((()=>this._adaptiveInput&&this._adaptiveInput.focus()),300)),this.base.togglePopup(s),this.applyState(s)},this.handleItemClick=(e,t)=>{const s=this.base.initState();s.syntheticEvent=t,this.handleItemSelect(e,s),this.props.autoClose&&this.base.togglePopup(s),t.stopPropagation(),this.applyState(s)},this.handleBlur=e=>{if(!this.state.focused||this._skipFocusEvent)return;const t=this.base.initState(),{allowCustom:s,filterable:i}=this.props;t.syntheticEvent=e,t.data.focused=!1,t.events.push({type:"onBlur"}),this.opened&&!this.mobileMode&&(this.state.opened&&(t.data.opened=!1),t.events.push({type:"onClose"})),!s&&!i&&this.state.text&&(t.data.text=""),this.applyState(t)},this.handleFocus=e=>{this._skipFocusEvent||this.base.handleFocus(e)},this.onPopupOpened=()=>{this._input&&this.state.focused&&!this.mobileMode&&this.focusElement(this._input)},this.onPopupClosed=()=>{this.state.focused&&window.setTimeout((()=>{this.state.focused&&this.focusElement(this._input)}),0)},this.setValidity=()=>{this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity.valid?"":this.props.validationMessage||"Please enter a valid value!")},this.validate(e),this.licenseMessage=i.getLicenseMessage($)}get _inputId(){return this.props.id}get document(){if(i.canUseDOM)return this.element&&this.element.ownerDocument||document}validate(e){if(e.filterable||e.virtual){const t=[];e.filterable&&t.push("filterable"),e.virtual&&t.push("virtualization"),this.showLicenseWatermark=!i.validatePackage($,{component:"MultiSelect",features:t})}}get element(){return this._element}get opened(){return!!(void 0!==this.props.opened?this.props.opened:this.state.opened)}get tagsToRender(){const{tags:e,textField:t}=this.props,s=[];return void 0===e?this.value.forEach((e=>{s.push({text:I(e,t),data:[e]})})):s.push(...e),s}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}get value(){const e=[];return this._valueItemsDuringOnChange?e.push(...this._valueItemsDuringOnChange):this.props.value?e.push(...this.props.value):this.state.value?e.push(...this.state.value):this.props.defaultValue&&e.push(...this.props.defaultValue),e}get name(){return this.props.name}get validity(){const e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&this.value.length>0&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}}get required(){return void 0!==this.props.required?this.props.required:e.defaultProps.required}get validityStyles(){return void 0!==this.props.validityStyles?this.props.validityStyles:e.defaultProps.validityStyles}componentDidUpdate(e,t){var s;const{virtual:i,groupField:n=""}=this.props,a=F(this.props),o=i?i.skip:0,l=e.virtual?e.virtual.total:0,r=void 0!==e.opened?e.opened:t.opened,d=!r&&this.opened,u=r&&!this.opened,p=this.base.getPopupSettings();if(this.validate(this.props),this.base.didUpdate(),!p.animate&&u&&this.onPopupClosed(),i&&i.total!==l)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{let{focusedItem:e,focusedIndex:t}=this.getFocusedState();""!==n&&(t=null==(s=this.base.getGroupedDataModernMode(a,n))?void 0:s.indexOf(e)),d&&i?this.base.scrollToVirtualItem(i,t-o):d&&!i?(a&&0!==a.length&&this.base.resetGroupStickyHeader(a[0][n],this),this.base.scrollToItem(t)):this.opened&&r&&e&&this.scrollToFocused&&this.base.scrollToItem(t-o)}this.scrollToFocused=!1,this.setValidity()}componentDidMount(){var e;this.observerResize=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.base.didMount(),this.setValidity(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentWillUnmount(){var e;null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.disconnect()}onNavigate(e,t,s){const{allowCustom:n}=this.props,a=F(this.props),o=void 0!==this.props.filter?this.props.filter:this.state.text,{focusedType:l,focusedIndex:r}=this.getFocusedState(),d=n&&o,u=fe(l),p=this.base,c=p.vs;if(this.opened&&t===i.Keys.up&&u)void 0!==this.state.focusedIndex&&(e.data.focusedIndex=void 0);else{const i=p.navigation.navigate({keyCode:t,current:r,max:(c.enabled?c.total:a.length)-1,min:d?-1:0,skipItems:s||void 0});void 0!==i&&(this.itemFocus(i,e),this.scrollToFocused=!0)}this.applyState(e)}render(){const{style:e,className:t,label:s,dir:a,disabled:o,textField:l,dataItemKey:r,virtual:d,size:u,rounded:p,fillMode:c,loading:g,filter:v}=this.props,{text:m,focused:f,focusedTag:b,currentValue:y}=this.state,C=this.base.vs,x=this.props.id||this._inputId;C.enabled=void 0!==d,void 0!==d&&(C.skip=d.skip,C.total=d.total,C.pageSize=d.pageSize);const k=this.mobileMode&&this.opened?y:this.tagsToRender;this.setItems(this.tagsToRender,this._tags);const w=!this.validityStyles||this.validity.valid,S=!!(void 0!==v?v:m)||k&&k.length>0,[F,M]=X(this.props.prefix||h.Fragment),[K,N]=X(this.props.suffix||h.Fragment),T=h.createElement(h.Fragment,null,h.createElement("div",{ref:this.componentRef,className:i.classNames("k-multiselect k-input",t,{[`k-input-${ge[u]||u}`]:u,[`k-rounded-${ve[p]||p}`]:p,[`k-input-${c}`]:c,"k-focus":f&&!o,"k-invalid":!w,"k-disabled":o,"k-loading":g,"k-required":this.required}),style:s?{...e,width:void 0}:e,dir:a,onFocus:e=>{this.mobileMode?this.handleWrapperClick(e):this.handleFocus(e)},onBlur:this.handleBlur,onClick:this.handleWrapperClick,onMouseDown:E},this.props.prefix&&h.createElement(F,{...M}),h.createElement("div",{className:i.classNames("k-input-values")},h.createElement("div",{className:i.classNames("k-chip-list",{[`k-chip-list-${ge[u]||u}`]:u}),role:"listbox",id:"tagslist-"+this.base.guid},k&&k.length>0&&h.createElement(ce,{tagRender:this.props.tagRender,onTagDelete:this.onTagDelete,data:k,guid:this.base.guid,focused:b?k.find((e=>D(e,b,r))):void 0,size:u})),this.renderSearchBar(x)),g&&h.createElement(i.IconWrap,{className:"k-input-loading-icon",name:"loading"}),this.props.suffix&&h.createElement(K,{...N}),S&&h.createElement(Q,{onClick:this.clearButtonClick}),!this.mobileMode&&this.renderListContainer()),this.mobileMode&&this.renderAdaptiveListContainer());return s?h.createElement(n.FloatingLabel,{label:s,editorId:x,editorValue:m||I(this.value[0],l),editorValid:w,editorDisabled:o,style:{width:e?e.width:void 0},children:T}):T}renderSearchBar(e){const{activedescendant:t,focusedTag:s,currentValue:i}=this.state,{disabled:n,placeholder:a,ariaDescribedBy:o,ariaLabelledBy:l,ariaLabel:r,inputAttributes:d}=this.props,u=!this.mobileMode&&(void 0!==this.props.filter?this.props.filter:this.state.text)||"",{focusedIndex:p}=this.getFocusedState(),c=0!==this.value.length||u?void 0:a,g=i&&i.length>0?void 0:a,v=t===he.TagsList&&void 0!==s?`tag-${this.base.guid}-${s.text.replace(/\s+/g,"-")}`:`option-${this.base.guid}-${p}`,m={accessKey:this.props.accessKey,tabIndex:this.props.tabIndex};return h.createElement(J,{id:e,size:Math.max((c||"").length,u.length,1),placeholder:this.mobileMode&&this.opened?g:c,value:u,onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,ref:this.searchbarRef,disabled:n,expanded:this.opened,owns:this.base.listBoxId,role:"combobox",activedescendant:v,ariaDescribedBy:`tagslist-${this.base.guid}${o?" "+o:""}`,ariaLabelledBy:l,ariaRequired:this.required,ariaLabel:r,inputAttributes:d,...m})}onTagsNavigate(e,t){const s=e.keyCode,{focusedTag:n}=this.state,a=this._tags,o=this.props.dataItemKey;let l,r=n?a.findIndex((e=>D(e,n,o))):-1;const d=-1!==r;if(s===i.Keys.left)r=d?Math.max(0,r-1):a.length-1,l=a[r];else if(s===i.Keys.right)r===a.length-1?l=void 0:d&&(r=Math.min(a.length-1,r+1),l=a[r]);else if(s!==i.Keys.home||e.shiftKey)if(s!==i.Keys.end||e.shiftKey){if(s===i.Keys.delete){if(d){const e=this.value;k(e,a[r].data,o),this.triggerOnChange(e,t)}}else if(s===i.Keys.backspace){const e=this.value;if(d)k(e,a[r].data,o),this.triggerOnChange(e,t);else if(!d&&a.length){const s=a.pop();k(e,s.data,o),this.triggerOnChange(e,t)}}}else l=a[a.length-1];else l=a[0];l!==n&&(t.data.focusedTag=l,t.data.activedescendant=he.TagsList),this.applyState(t)}triggerOnChange(e,t){void 0===this.props.value&&(t.data.value=[...e]),this._valueItemsDuringOnChange=[],this.setItems(e,this._valueItemsDuringOnChange),t.events.push({type:"onChange"})}selectFocusedItem(e,t){const{virtual:s}=this.props,i=F(this.props),{focusedIndex:n}=t||this.getFocusedState();void 0!==i[n-(s?s.skip:0)]&&this.handleItemClick(n,e)}setItems(e,t){t.length=0,t.push(...e)}getFocusedState(){const{focusedIndex:e}=this.state,t=void 0!==this.props.filter?this.props.filter:this.state.text,{allowCustom:s,dataItemKey:i,virtual:n,textField:a,focusedItemIndex:o=C,skipDisabledItems:l}=this.props,r=F(this.props),d=n&&n.skip||0;let u;if(void 0!==e)return{focusedIndex:e,focusedItem:r[e-d],focusedType:1};const p=this.value;if(s&&t)return{focusedItem:null,focusedIndex:-1,focusedType:2};if(t)return u=o(r,t,a),{focusedItem:r[u],focusedIndex:u+d,focusedType:1};if(p.length){const e=p[p.length-1];return u=r.findIndex((t=>w(t,e,i))),void 0!==r[u]?{focusedIndex:u+d,focusedItem:r[u],focusedType:1}:{focusedType:0,focusedIndex:-1}}if(l&&a&&!t&&0===d){const e=r.findIndex((e=>!e.disabled&&e[a]));return{focusedIndex:e,focusedItem:r[e-d],focusedType:1}}return 0===d?{focusedItem:r[0],focusedIndex:0,focusedType:1}:{focusedType:0,focusedIndex:-1}}focusElement(e){this._skipFocusEvent=!0,e.focus(),window.setTimeout((()=>this._skipFocusEvent=!1),0)}applyState(e){this.base.applyState(e),this._valueItemsDuringOnChange=null}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}updateStateOnKeyboardNavigation(e,t){this.setState({value:e}),this.triggerOnChange(e,t),this.applyState(t)}getLastSelectedOrDeselectedIndex(e,t){return null===this._lastSelectedOrDeslectedItemIndex&&(this._lastSelectedOrDeslectedItemIndex=t),null!==this._lastSelectedOrDeslectedItemIndex?this._lastSelectedOrDeslectedItemIndex+e:null}};be.displayName="MultiSelect",be.propTypes={...U.propTypes,autoClose:s.bool,value:s.arrayOf(s.any),defaultValue:s.arrayOf(s.any),dataItemKey:s.string,placeholder:s.string,tags:s.arrayOf(s.shape({text:s.string,data:s.arrayOf(s.any)})),tagRender:s.func,id:s.string,ariaLabelledBy:s.string,ariaDescribedBy:s.string,groupField:s.string,list:s.any,adaptive:s.bool,adaptiveTitle:s.string,adaptiveSubtitle:s.string,onCancel:s.func,skipDisabledItems:s.bool,inputAttributes:s.object},be.defaultProps={...U.defaultProps,autoClose:!0,required:!1,size:"medium",rounded:"medium",fillMode:"solid",groupMode:"modern",skipDisabledItems:!0,prefix:void 0,suffix:void 0};let ye=be;const Ce=i.createPropsContext(),xe=i.withIdHOC(i.withPropsContext(Ce,i.withAdaptiveModeContext(ye)));xe.displayName="KendoReactMultiSelect";const Ie=e=>h.createElement(H,{...e,wrapperCssClass:"k-table-body k-table-scroller",listClassName:i.classNames("k-table k-table-list",{"k-virtual-table":void 0!==e.virtual}),listStyle:{...e.listStyle}}),ke=i.createPropsContext(),we=h.forwardRef(((e,t)=>{const s=i.usePropsContext(ke,e),n=h.useRef(null),a=h.useRef(null),o=i.getScrollbarWidth(),{columns:l=Ee.columns,popupSettings:r=Ee.popupSettings,size:d=Ee.size,rounded:u=Ee.rounded,fillMode:p=Ee.fillMode,className:c,prefix:g,suffix:v,onOpen:m,onClose:f,onFocus:b,onBlur:y,onChange:C,onFilterChange:x,onPageChange:k,...w}=s;h.useImperativeHandle(n,(()=>{var e;return{element:(null==(e=a.current)?void 0:e.element)||null,focus(){a.current&&a.current.focus()},get value(){var e;return null==(e=a.current)?void 0:e.value},get name(){var e;return null==(e=a.current)?void 0:e.name},props:s}})),h.useImperativeHandle(t,(()=>n.current));const S=h.useMemo((()=>{if(void 0!==s.groupField&&s.data)return I(s.data[0],s.groupField)}),[s.data,s.groupField]),[E,D]=h.useState(S),[F,M]=h.useState(!0),[K]=g?X(s.prefix||h.Fragment):[],[N]=v?X(s.suffix||h.Fragment):[],T=h.useMemo((()=>{const e=h.createElement("th",{className:"k-table-th",colSpan:l.length},E);return h.createElement(h.Fragment,null,s.header,h.createElement("div",{className:"k-table-header-wrap k-table-scroller"},h.createElement("table",{className:"k-table",role:"presentation"},h.createElement("colgroup",null,l.map(((e,t)=>h.createElement("col",{key:e.uniqueKey?e.uniqueKey:t,style:{width:e.width?e.width:Ee.width}})))),h.createElement("thead",{className:"k-table-thead"},h.createElement("tr",{className:"k-table-row"},l.map(((e,t)=>h.createElement("th",{className:"k-table-th",key:e.uniqueKey?e.uniqueKey:t},e.header||" ")))),E&&F&&h.createElement("tr",{className:"k-table-group-row"},s.groupStickyHeaderItemRender?s.groupStickyHeaderItemRender.call(void 0,e,{}):e)))))}),[s.header,l,E,F]),P=h.useMemo((()=>`calc(${l.map((e=>((e,t)=>e?"number"==typeof e?e+"px":e:t)(e.width,Ee.width))).filter(Boolean).join(" + ")} + ${o}px + 4px)`),[l,o]),O=s.virtual?s.virtual.skip:0,R=h.useCallback(((e,t)=>{const n=l.map(((e,n)=>h.createElement("span",{className:s.itemRender?void 0:"k-table-td",style:s.itemRender?void 0:{width:e.width?e.width:Ee.width},key:e.uniqueKey?e.uniqueKey:n},e.field?String(i.getter(e.field)(t.dataItem)):"")));let a,o,r,d,u=s.data||[];const p=t.index-O;void 0!==s.groupField&&(d=i.getter(s.groupField),o=d(u[p]),r=d(u[p-1]),o&&r&&o!==r&&(a=o)),a&&"classic"===s.groupMode&&n.push(h.createElement("div",{key:"group",className:"k-table-td k-table-group-td"},h.createElement("span",null,a)));const c=h.cloneElement(e,{...e.props,className:i.classNames("k-table-row",{"k-table-alt-row":t.index%2!=0,"k-focus":t.focused,"k-selected":t.selected,"k-first":!!a,"k-disabled":t.dataItem.disabled})},n);return s.itemRender?s.itemRender.call(void 0,c,t):c}),[l,s.groupField,s.itemRender,s.data,O]),B=h.useCallback(((e,t)=>{e&&e.call(void 0,{...t,target:n.current})}),[]),L=h.useCallback((e=>(s.virtual||D(S),B(m,e))),[B,m,s.virtual,S]),_=h.useCallback((e=>B(f,e)),[f]),z=h.useCallback((e=>B(b,e)),[b]),H=h.useCallback((e=>B(y,e)),[y]),V=h.useCallback((e=>B(C,e)),[C]),q=h.useCallback((e=>B(k,e)),[k]),W=h.useCallback((e=>(D(S),B(x,{...e,mobileMode:e.target.mobileMode}))),[x]),A=h.useCallback((e=>{D(e.group)}),[]);h.useEffect((()=>{i.setScrollbarWidth()})),h.useEffect((()=>{const e=s.data;D(S),e&&0!==e.length?M(!0):M(!1)}),[s.data]);const U=h.useCallback((e=>h.createElement(Ie,{...e})),[]);return h.createElement(ie,{...w,list:U,popupSettings:{...r,popupClass:i.classNames("k-dropdowngrid-popup",r.popupClass),width:r.width||P,className:r.className},ref:a,header:T,itemRender:R,groupHeaderItemRender:s.groupHeaderItemRender,size:d,rounded:u,fillMode:p,groupMode:s.groupMode,groupField:s.groupField,isMultiColumn:!0,onOpen:L,onClose:_,onFocus:z,onBlur:H,onChange:V,onFilterChange:W,onPageChange:q,onGroupScroll:A,className:i.classNames("k-dropdowngrid",c),required:s.required,adaptive:s.adaptive,adaptiveFilter:s.adaptiveFilter,adaptiveTitle:s.adaptiveTitle,adaptiveSubtitle:s.adaptiveSubtitle,footer:s.footer,footerClassName:"k-table-footer",prefix:K,suffix:N})})),Se={...te.propTypes,columns:s.any.isRequired},Ee={columns:[],popupSettings:{},width:"200px",size:"medium",rounded:"medium",fillMode:"solid"};function De(e){return"string"==typeof e?Number(e.replace("px","")):e}function Fe(e,t,s,i){const n=De(t.popupSettings.width),a=(void 0!==s.width&&De(s.width))!==n,o=void 0!==i.width,l=a?s.width:o?i.width:n,r=De(function(e,t,s){const[i,n]=h.useState(t);return h.useEffect((()=>{void 0!==i&&e.current&&n(e.current.offsetWidth)}),s),i}(e,l));return a||o?l:r&&n&&r>n?r:n}we.displayName="KendoMultiColumnComboBox",we.propTypes=Se;const Me=e=>h.createElement("div",{className:"k-nodata"},h.createElement("div",null,e.children)),{sizeMap:Ke,roundedMap:Ne}=i.kendoThemeMaps,Te=e=>h.createElement("span",{className:"k-input-value-text"},e.children),Pe=e=>e.split("_").map((e=>parseInt(e,10))),Oe={selectField:"selected",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},data:[],required:!1,style:{},validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},Re=i.createPropsContext(),Be=h.forwardRef(((e,t)=>{const s=!i.validatePackage($,{component:"DropDownTree"}),l=i.getLicenseMessage($),c=i.usePropsContext(Re,e),g={...Oe,...c},m=i.useId(),b=g.id||m,{data:y,dataItemKey:C,popupSettings:x={},style:k,opened:S,disabled:E,onOpen:D=i.noop,onClose:F=i.noop,placeholder:M,label:K,name:N,selectField:T,subItemsField:R,validationMessage:B,valid:L,required:_,validityStyles:H}=g,V=i.getTabIndex(g.tabIndex,E),q=h.useRef(null),W=h.useRef(null),A=h.useRef(null),U=h.useRef(null),j=h.useRef(null),Y=h.useRef(null),Z=h.useRef(!1),[J,Q]=h.useState(void 0),X=void 0!==g.value,ee=X?g.value:void 0!==J?J:g.defaultValue,te=f(ee),se=te?I(ee,g.textField):"",ie=((e,t)=>{const{validationMessage:s,valid:i,required:n}=e;return{customError:void 0!==s,valid:!!(void 0!==i?i:!n||t),valueMissing:!t}})({validationMessage:B,valid:L,required:_},te),ne=h.useContext(i.ZIndexContext),ae=ne?ne+2e3:12e3,oe=h.useCallback((()=>W.current&&W.current.focus()),[]);h.useImperativeHandle(q,(()=>({props:g,element:W.current,focus:oe}))),h.useImperativeHandle(t,(()=>q.current));const le=i.useRtl(W,g.dir),re={width:Fe(W,Oe,{...Oe.popupSettings,...x},k),...void 0!==le?{direction:le}:{}},[de,ue]=h.useState(!1),pe=void 0!==S?S:de,[ce,he]=h.useState(!1),[ge,ve]=h.useState(),[me,fe]=h.useState(""),be=i.useAdaptiveModeContext(),ye=!!(ge&&be&&ge<=be.medium&&g.adaptive),Ce=h.useCallback((()=>{j.current&&j.current.setCustomValidity&&j.current.setCustomValidity(ie.valid?"":void 0===B?"Please select a value from the list!":B)}),[B,ie]);h.useEffect(Ce),h.useEffect((()=>{const e=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver($e.bind(void 0));return null!=document&&document.body&&e&&e.observe(document.body),()=>{null!=document&&document.body&&e&&e.disconnect()}}),[]);const xe=h.useCallback((e=>{if(!pe){if(D){const t={...e};D.call(void 0,t)}void 0===S&&ue(!0)}}),[pe,S,D]),Ie=h.useCallback((e=>{if(pe){if(F){const t={...e};F.call(void 0,t)}void 0===S&&(ue(!1),ye&&setTimeout((()=>{var e;De(null==(e=U.current)?void 0:e.element)}),300))}}),[pe,S,F,ye]),ke=h.useCallback((e=>{if(!e.isDefaultPrevented()&&q.current){he(!0);const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};(pe?Ie:xe)(t)}}),[pe,S,D,F]),we=h.useCallback((e=>{Z.current=!0,e(),window.setTimeout((()=>Z.current=!1),0)}),[]),Se=h.useCallback((e=>{var t,s;const{keyCode:n,altKey:a}=e,o=Y.current&&Y.current.element;if(!q.current||e.isDefaultPrevented()&&(null==(t=A.current)?void 0:t.element)===e.target)return;const l={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};if(pe)if(n===i.Keys.esc||a&&n===i.Keys.up)e.preventDefault(),Ie(l);else if(o&&o.querySelector(".k-focus")&&(n===i.Keys.up||n===i.Keys.down||n===i.Keys.left||n===i.Keys.right||n===i.Keys.home||n===i.Keys.end)){if(n===i.Keys.up&&null!=(s=A.current)&&s.element){const e=Array.from(o.querySelectorAll(".k-treeview-item")),t=[...e].reverse().find((e=>null==e?void 0:e.querySelector(".k-focus")));if(t&&0===e.indexOf(t))return we((()=>{var e;De(null==(e=A.current)?void 0:e.element)}))}we(i.noop)}else n===i.Keys.down&&we((()=>{var e;De((null==(e=A.current)?void 0:e.element)||o)}));else a&&n===i.Keys.down?(e.preventDefault(),xe(l)):pe||n===i.Keys.esc&&We(e)}),[pe,S,D,F]),Ee=h.useCallback((e=>{const{keyCode:t,altKey:s}=e;s||t!==i.Keys.up&&t!==i.Keys.down||(e.preventDefault(),we(t===i.Keys.up?()=>{De(W.current)}:()=>{var e;De(null==(e=Y.current)?void 0:e.element)}))}),[]),De=h.useCallback((e=>{e&&we((()=>e.focus()))}),[]),Be=h.useCallback((()=>{var e;ce||!pe||S?c.filterable?De(null==(e=A.current)?void 0:e.element):De(Y.current&&Y.current.element):Ie({target:q.current})}),[F,c.filterable,ce,S,pe]),Le=h.useCallback((()=>{ce&&De(W.current)}),[ce]),_e=h.useCallback((e=>{if(!ce&&!Z.current&&(he(!0),c.onFocus&&q.current)){const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};c.onFocus.call(void 0,t)}}),[ce,c.onFocus]),ze=h.useCallback((e=>{if(ce&&!Z.current&&q.current){he(!1);const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};if(c.onBlur){const e={...t};c.onBlur.call(void 0,e)}ye||Ie(t)}}),[ce,c.onBlur,pe,S,F]),He=h.useCallback((()=>{ce&&we(i.noop),ye&&setTimeout((()=>{var e;De(null==(e=U.current)?void 0:e.element)}),300)}),[ce,ye]),Ve=h.useCallback(((e,t,s)=>{if(c.onChange){const i={value:t,level:s?Pe(s):[],...e};c.onChange.call(void 0,i)}X||Q(t)}),[c.onChange,X]),qe=h.useCallback((e=>{if(w(e.item,ee,C)||!q.current)return;const{item:t,itemHierarchicalIndex:s,nativeEvent:i,syntheticEvent:n}=e,a={syntheticEvent:n,nativeEvent:i,target:q.current};Ve(a,t,s),Ie(a)}),[X,ee,c.onChange,C,pe,S,F]),We=h.useCallback((e=>{if(!q.current)return;const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:q.current};Ve(t,null),Ie(t),e.preventDefault()}),[X,c.onChange,pe,S,F]),Ae=h.useCallback((e=>{if(e.syntheticEvent.stopPropagation(),c.onExpandChange&&q.current){const{item:t,itemHierarchicalIndex:s,nativeEvent:i,syntheticEvent:n}=e,a={level:Pe(s),item:t,nativeEvent:i,syntheticEvent:n,target:q.current};c.onExpandChange.call(void 0,a)}}),[c.onExpandChange]),Ue=h.useCallback((e=>{if(c.onFilterChange&&q.current){const t={filter:{field:c.textField,operator:"contains",value:e.target.value},syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,target:q.current};c.onFilterChange.call(void 0,t),void 0===c.filter&&fe(e.target.value)}}),[c.onFilterChange,c.filter,c.textField]),$e=h.useCallback((e=>{for(const t of e)ve(t.target.clientWidth)}),[]),Ge=h.useMemo((()=>X||!te?y:i.mapTree(y,R,(e=>i.extendDataItem(e,R,{[T]:w(e,ee,C)})))),[y,ee,X,te,T,R]),je=g.listNoData||Me,Ye=g.valueHolder||Te,Ze=r.useLocalization(),Je=!H||ie.valid,{size:Qe,rounded:Xe,fillMode:et}=g,tt=h.createElement(h.Fragment,null,h.createElement("span",{className:i.classNames("k-dropdowntree k-picker",g.className,{[`k-picker-${Ke[Qe]||Qe}`]:Qe,[`k-rounded-${Ne[Xe]||Xe}`]:Xe,[`k-picker-${et}`]:et,"k-focus":ce,"k-invalid":!Je,"k-loading":g.loading,"k-required":_,"k-disabled":g.disabled}),tabIndex:V,accessKey:g.accessKey,id:b,style:K?{...k,width:void 0}:k,dir:le,ref:W,onKeyDown:E?void 0:Se,onMouseDown:He,onClick:E?void 0:ke,onFocus:ye?e=>ke(e):_e,onBlur:ze,role:"combobox","aria-haspopup":"tree","aria-expanded":pe,"aria-disabled":E,"aria-label":K,"aria-labelledby":g.ariaLabelledBy,"aria-describedby":g.ariaDescribedBy,"aria-required":_},h.createElement("span",{className:"k-input-inner"},(se||M)&&h.createElement(Ye,{item:ee},se||M)),g.loading&&h.createElement(i.IconWrap,{className:"k-input-loading-icon",name:"loading"}),te&&!E&&h.createElement("span",{onClick:We,className:"k-clear-value",title:Ze.toLanguageString(O,z[O]),role:"button",tabIndex:-1,onMouseDown:e=>e.preventDefault()},h.createElement(i.IconWrap,{name:"x",icon:a.xIcon})),h.createElement(d.Button,{tabIndex:-1,type:"button","aria-label":"select",className:"k-input-button",size:Qe,fillMode:et,themeColor:"base",rounded:null,icon:"caret-alt-down",svgIcon:a.caretAltDownIcon}),h.createElement("select",{name:N,ref:j,tabIndex:-1,"aria-hidden":!0,title:K,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},h.createElement("option",{value:g.valueMap?g.valueMap.call(void 0,ee):ee})),!ye&&h.createElement(i.ZIndexContext.Provider,{value:ae},h.createElement(o.Popup,{...x,className:i.classNames(x.className,{"k-rtl":"rtl"===le}),popupClass:i.classNames(x.popupClass,"k-dropdowntree-popup k-list-container"),style:re,anchor:x.anchor||W.current,show:pe,onOpen:Be,onClose:Le},g.filterable&&h.createElement(v,{value:void 0===g.filter?me:g.filter,ref:A,onChange:Ue,onKeyDown:Ee,size:Qe,rounded:Xe,fillMode:et,renderListFilterWrapper:!0,renderPrefixSeparator:!0}),y.length>0?h.createElement(p.TreeView,{style:{height:x.height},ref:Y,tabIndex:V,data:Ge,focusIdField:C,textField:g.textField,selectField:T,expandField:g.expandField,childrenField:R,expandIcons:!0,onItemClick:qe,onExpandChange:Ae,size:Qe,item:g.item,dir:le,animate:x.animate}):h.createElement(je,null,Ze.toLanguageString(P,z[P])),s&&h.createElement(i.WatermarkOverlay,{message:l})))),ye&&(()=>{const e=g.filterable?h.createElement(v,{value:void 0===g.filter?me:g.filter,ref:U,onChange:Ue,onKeyDown:Ee,size:"large",rounded:Xe,fillMode:et,placeholder:M}):null,t={title:g.adaptiveTitle||K,subTitle:g.adaptiveSubtitle,expand:pe,onClose:e=>Ie(e),windowWidth:ge,mobileFilter:e};return h.createElement(G,{...t},h.createElement(u.ActionSheetContent,null,y.length>0?h.createElement(p.TreeView,{ref:Y,tabIndex:V,data:Ge,focusIdField:C,textField:g.textField,selectField:T,expandField:g.expandField,childrenField:R,expandIcons:!0,onItemClick:qe,onExpandChange:Ae,size:"large",item:g.item,dir:le,animate:x.animate}):h.createElement(je,null,Ze.toLanguageString(P,z[P]))))})());return K?h.createElement(n.FloatingLabel,{label:K,editorValue:se,editorPlaceholder:M,editorValid:Je,editorDisabled:E,editorId:b,style:{width:k?k.width:void 0},children:tt,dir:le}):tt})),Le={opened:s.bool,disabled:s.bool,dir:s.string,tabIndex:s.number,accessKey:s.string,data:s.array,value:s.any,valueMap:s.func,placeholder:s.string,dataItemKey:s.string.isRequired,textField:s.string.isRequired,selectField:s.string,expandField:s.string,subItemsField:s.string,className:s.string,style:s.object,label:s.string,validationMessage:s.string,validityStyles:s.bool,valid:s.bool,required:s.bool,name:s.string,id:s.string,ariaLabelledBy:s.string,ariaDescribedBy:s.string,filterable:s.bool,filter:s.string,loading:s.bool,popupSettings:s.shape({animate:s.oneOfType([s.bool,s.shape({openDuration:s.number,closeDuration:s.number})]),popupClass:s.string,className:s.string,appendTo:s.any,width:s.oneOfType([s.string,s.number]),height:s.oneOfType([s.string,s.number])}),onOpen:s.func,onClose:s.func,onFocus:s.func,onBlur:s.func,onChange:s.func,onFilterChange:s.func,onExpandChange:s.func,item:s.func,valueHolder:s.func,listNoData:s.func,adaptiveTitle:s.string,adaptiveSubtitle:s.string,adaptive:s.bool};Be.displayName="KendoReactDropDownTree",Be.propTypes=Le;const{sizeMap:_e,roundedMap:ze}=i.kendoThemeMaps,He=e=>e.split("_").map((e=>parseInt(e,10))),Ve={checkField:"checkField",checkIndeterminateField:"checkIndeterminateField",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},size:"medium",rounded:"medium",fillMode:"solid",required:!1,validityStyles:!0},qe=i.createPropsContext(),We=h.forwardRef(((e,t)=>{const s=i.usePropsContext(qe,e),a=!i.validatePackage($,{component:"MultiSelectTree"}),l=i.getLicenseMessage($),d=i.useId(),c=s.id||d,{data:g=[],dataItemKey:m,style:f={},placeholder:b,label:y,name:C,validationMessage:x,valid:k,tags:S,value:E,opened:F,disabled:M,popupSettings:K=Ve.popupSettings,checkField:N=Ve.checkField,checkIndeterminateField:T=Ve.checkIndeterminateField,subItemsField:O=Ve.subItemsField,size:R=Ve.size,rounded:B=Ve.rounded,fillMode:L=Ve.fillMode,required:_=Ve.required,validityStyles:H=Ve.validityStyles,onOpen:V=i.noop,onClose:q=i.noop}=s,W=i.getTabIndex(s.tabIndex,M),A=h.useRef(null),U=h.useRef(null),j=h.useRef(null),Y=h.useRef(null),Z=h.useRef(null),J=h.useRef(null),X=h.useRef(!1),ee=h.useRef([]),te=h.useRef(null),[se,ie]=h.useState(),[ne,ae]=h.useState(!1),[oe,le]=h.useState(!1),[re,de]=h.useState(),[ue,pe]=h.useState([]),[he,ge]=h.useState(""),ve=void 0!==F?F:ne,me=!(!Array.isArray(E)||!E.length),fe=((e,t)=>{const{validationMessage:s,valid:i,required:n}=e;return{customError:void 0!==s,valid:!!(void 0!==i?i:!n||t),valueMissing:!t}})({validationMessage:x,valid:k,required:_},me),be=i.useRtl(U,s.dir),ye={width:Fe(U,Ve,K,f),...void 0!==be?{direction:be}:{}},Ce=h.useCallback((()=>U.current&&U.current.focus()),[]),xe=i.useAdaptiveModeContext(),Ie=!!(re&&xe&&re<=xe.medium&&s.adaptive);ee.current=void 0===S?(E||[]).map((e=>({text:I(e,s.textField),data:[e]}))):[...S],h.useImperativeHandle(A,(()=>({props:s,element:U.current,focus:Ce}))),h.useImperativeHandle(t,(()=>A.current));const ke=h.useCallback((()=>{Z.current&&Z.current.setCustomValidity&&Z.current.setCustomValidity(fe.valid?"":void 0===x?"Please select a value from the list!":x)}),[x,fe]);h.useEffect(ke),h.useEffect((()=>{const e=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(Ye.bind(void 0));return null!=document&&document.body&&e&&e.observe(document.body),()=>{e&&e.disconnect()}}),[]),h.useEffect((()=>{te.current&&ve&&te.current.setPosition(te.current.element)}),[E,ve]);const we=h.useCallback(((e,t,i)=>{if(s.onChange){const n={items:t,operation:i,...e};s.onChange.call(void 0,n)}}),[s.onChange]),Se=h.useCallback((e=>{if(w(e.item,E,m)||!A.current)return;const{item:t,nativeEvent:s,syntheticEvent:i}=e,n={syntheticEvent:i,nativeEvent:s,target:A.current};we(n,[t],"toggle")}),[E,m,we]),Ee=h.useCallback((e=>{if(!ve){if(V){const t={...e};V.call(void 0,t)}void 0===F&&(ae(!0),pe(E||[]),Ie&&setTimeout((()=>{var e;Ne(null==(e=Y.current)?void 0:e.element)}),300))}}),[ve,F,V,Ie,Y]),De=h.useCallback((e=>{if(ve){if(q){const t={...e};q.call(void 0,t)}void 0===F&&ae(!1)}}),[ve,F,q]),Ke=h.useCallback((e=>{X.current=!0,e(),window.setTimeout((()=>X.current=!1),0)}),[]),Ne=h.useCallback((e=>{e&&Ke((()=>e.focus()))}),[Ke]),Te=h.useCallback((()=>{var e;!oe&&ve?De({target:A.current}):s.filterable?Ne(null==(e=j.current)?void 0:e.element):Ne(J.current&&J.current.element)}),[oe,ve,Ne,De,s.filterable]),Pe=h.useCallback((()=>{oe&&Ne(U.current)}),[oe,Ne]),Oe=h.useCallback((e=>{if(!oe&&!X.current&&(le(!0),s.onFocus&&A.current)){const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};s.onFocus.call(void 0,t)}}),[oe,s.onFocus]),Re=h.useCallback((e=>{if(oe&&!X.current&&A.current){le(!1);const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};if(s.onBlur){const e={...t};s.onBlur.call(void 0,e)}Ie||De(t)}}),[oe,s.onBlur,ve,F,q]),Be=h.useCallback((()=>{oe&&Ke(i.noop)}),[oe,Ke]),Le=h.useCallback((e=>{if(!e.isDefaultPrevented()&&A.current){le(!0);const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};ve||Ee(t)}}),[ve,Ee]),We=h.useCallback((e=>{var t,s;const{keyCode:n,altKey:a}=e,o=J.current&&J.current.element;if(!A.current||e.isDefaultPrevented()&&(null==(t=j.current)?void 0:t.element)===e.target)return;const l={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};if(E&&E.length>0&&(n===i.Keys.left||n===i.Keys.right||n===i.Keys.home||n===i.Keys.end||n===i.Keys.delete)){const e=ee.current;let t,s=se?e.findIndex((e=>D(e,se,m))):-1;const a=-1!==s;n===i.Keys.left?(s=a?Math.max(0,s-1):e.length-1,t=e[s]):n===i.Keys.right?s===e.length-1?t=void 0:a&&(s=Math.min(e.length-1,s+1),t=e[s]):n===i.Keys.home?t=e[0]:n===i.Keys.end?t=e[e.length-1]:n===i.Keys.delete&&a&&we(l,e[s].data,"delete"),t!==se&&ie(t)}if(ve)if(n===i.Keys.esc||a&&n===i.Keys.up)e.preventDefault(),De(l);else if(o&&o.querySelector(".k-focus")&&(n===i.Keys.up||n===i.Keys.down||n===i.Keys.left||n===i.Keys.right||n===i.Keys.home||n===i.Keys.end)){if(n===i.Keys.up&&null!=(s=j.current)&&s.element){const e=Array.from(o.querySelectorAll(".k-treeview-item")),t=[...e].reverse().find((e=>!(!e||!e.querySelector(".k-focus"))));if(t&&0===e.indexOf(t))return Ke((()=>{var e;Ne(null==(e=j.current)?void 0:e.element)}))}Ke(i.noop)}else n===i.Keys.down&&Ke((()=>{var e;Ne((null==(e=j.current)?void 0:e.element)||o)}));else a&&n===i.Keys.down&&(e.preventDefault(),Ee(l))}),[ve,De,Ne,Ke,Ee,se,m,E,we]),Ae=h.useCallback((e=>{const{keyCode:t,altKey:s}=e;s||t!==i.Keys.up&&t!==i.Keys.down||(e.preventDefault(),Ke(t===i.Keys.up?()=>{Ne(U.current)}:()=>{Ne(J.current&&J.current.element)}))}),[Ne,Ke]),Ue=h.useCallback((e=>{if(!A.current)return;const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};we(t,[],"clear"),De(t),e.preventDefault()}),[we,De]),$e=h.useCallback(((e,t)=>{var s;De({target:A.current}),oe||Ne(null==(s=j.current)?void 0:s.element),we({syntheticEvent:t,nativeEvent:t.nativeEvent,target:A.current},e,"delete")}),[we,De,Ne,oe]),Ge=h.useCallback((e=>{if(s.onExpandChange&&A.current){const{item:t,itemHierarchicalIndex:i,nativeEvent:n,syntheticEvent:a}=e,o={level:He(i),item:t,nativeEvent:n,syntheticEvent:a,target:A.current};s.onExpandChange.call(void 0,o)}}),[s.onExpandChange]),je=h.useCallback((e=>{if(s.onFilterChange&&A.current){const t={filter:{field:s.textField,operator:"contains",value:e.target.value},syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,target:A.current};s.onFilterChange.call(void 0,t),void 0===s.filter&&ge(e.target.value)}}),[s.onFilterChange,s.filter,s.textField]);h.useCallback((e=>{if(!A.current)return;const t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:A.current};s.onCancel&&s.onCancel.call(void 0,t),De(t),e.preventDefault()}),[s.onCancel,De]);const Ye=h.useCallback((e=>{for(const t of e)de(t.target.clientWidth)}),[]),Ze=s.listNoData||Me,Je=r.useLocalization(),Qe=!H||fe.valid,Xe=Ie&&ve?ue:ee.current,et=h.createElement(h.Fragment,null,h.createElement("span",{className:i.classNames("k-multiselecttree k-input",s.className,{[`k-input-${_e[R]||R}`]:R,[`k-rounded-${ze[B]||B}`]:B,[`k-input-${L}`]:L,"k-focus":oe&&!M,"k-invalid":!Qe,"k-disabled":M,"k-loading":s.loading,"k-required":_}),tabIndex:W,accessKey:s.accessKey,id:c,style:y?{...f,width:void 0}:f,dir:be,ref:U,onKeyDown:M?void 0:We,onMouseDown:Be,onFocus:e=>{Ie?Le(e):Oe(e)},onBlur:Re,role:"combobox","aria-haspopup":"tree","aria-expanded":ve,"aria-disabled":M,"aria-label":y,"aria-labelledby":s.ariaLabelledBy,"aria-describedby":s.ariaDescribedBy?s.ariaDescribedBy:"tagslist-"+c,"aria-required":s.required,onClick:M?void 0:Le},h.createElement("div",{id:"tagslist-"+c,className:i.classNames("k-input-values k-chip-list",{[`k-chip-list-${_e[R]||R}`]:R})},Xe.length>0&&h.createElement(ce,{tag:s.tag,onTagDelete:$e,data:Xe,guid:c,focused:se?ee.current.find((e=>D(e,se,m))):void 0,size:R})),h.createElement("span",{className:"k-input-inner"},0===Xe.length&&h.createElement("span",{className:"k-input-value-text"},b)),s.loading&&h.createElement(i.IconWrap,{className:"k-input-loading-icon",name:"loading"}),me&&!M&&Xe.length>0&&h.createElement(Q,{onClick:Ue}),h.createElement("select",{name:C,ref:Z,tabIndex:-1,"aria-hidden":!0,title:y,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},h.createElement("option",{value:s.valueMap?s.valueMap.call(void 0,E):E})),!Ie&&h.createElement(o.Popup,{...K,popupClass:i.classNames(K.popupClass,"k-multiselecttree-popup"),className:i.classNames(K.className,{"k-rtl":"rtl"===be}),style:ye,anchor:K.anchor||U.current,show:ve,onOpen:Te,onClose:Pe,ref:te},s.filterable&&h.createElement(v,{value:void 0===s.filter?he:s.filter,ref:j,onChange:je,onKeyDown:Ae,tabIndex:W,size:R,rounded:B,fillMode:L,renderListFilterWrapper:!0,renderPrefixSeparator:!0}),g.length>0?h.createElement(p.TreeView,{style:{height:K.height},ref:J,tabIndex:W,data:g,focusIdField:m,textField:s.textField,checkField:N,checkIndeterminateField:T,expandField:s.expandField,childrenField:O,expandIcons:!0,onItemClick:Se,onCheckChange:Se,onExpandChange:Ge,checkboxes:!0,size:R,item:s.item,dir:be}):h.createElement(Ze,null,Je.toLanguageString(P,z[P])),a&&h.createElement(i.WatermarkOverlay,{message:l}))),Ie&&(()=>{const e=s.filterable?h.createElement(v,{value:void 0===s.filter?he:s.filter,ref:Y,onChange:je,onKeyDown:Ae,size:"large",rounded:B,fillMode:L,placeholder:b}):null,t={title:s.adaptiveTitle||s.label,subTitle:s.adaptiveSubtitle,expand:ve,onClose:e=>De(e),windowWidth:re,mobileFilter:e};return h.createElement(G,{...t},h.createElement(u.ActionSheetContent,null,g.length>0?h.createElement(p.TreeView,{ref:J,tabIndex:W,data:g,focusIdField:m,textField:s.textField,checkField:N,checkIndeterminateField:T,expandField:s.expandField,childrenField:O,expandIcons:!0,onItemClick:Se,onCheckChange:Se,onExpandChange:Ge,checkboxes:!0,size:"large",item:s.item,dir:be}):h.createElement(Ze,null,Je.toLanguageString(P,z[P]))))})());return y?h.createElement(n.FloatingLabel,{label:y,editorValue:me,editorPlaceholder:b,editorValid:Qe,editorDisabled:M,editorId:c,style:{width:f?f.width:void 0},children:et,dir:be}):et})),Ae={opened:s.bool,disabled:s.bool,dir:s.string,tabIndex:s.number,accessKey:s.string,data:s.array,value:s.any,valueMap:s.func,placeholder:s.string,dataItemKey:s.string.isRequired,textField:s.string.isRequired,checkField:s.string,checkIndeterminateField:s.string,expandField:s.string,subItemsField:s.string,className:s.string,style:s.object,label:s.string,validationMessage:s.string,validityStyles:s.bool,valid:s.bool,required:s.bool,name:s.string,id:s.string,ariaLabelledBy:s.string,ariaDescribedBy:s.string,filterable:s.bool,filter:s.string,loading:s.bool,tags:s.arrayOf(s.shape({text:s.string,data:s.arrayOf(s.any)})),popupSettings:s.shape({animate:s.oneOfType([s.bool,s.shape({openDuration:s.number,closeDuration:s.number})]),popupClass:s.string,className:s.string,appendTo:s.any,width:s.oneOfType([s.string,s.number]),height:s.oneOfType([s.string,s.number])}),onOpen:s.func,onClose:s.func,onFocus:s.func,onBlur:s.func,onChange:s.func,onFilterChange:s.func,onExpandChange:s.func,onCancel:s.func,item:s.func,listNoData:s.func,adaptiveTitle:s.string,adaptiveSubtitle:s.string,adaptive:s.bool};We.displayName="KendoReactMultiSelectTree",We.propTypes=Ae;const Ue=(e,t)=>{const s={};return e&&e.length&&e.forEach((e=>{s[t(e)]=!0})),s};e.AutoComplete=de,e.AutoCompletePropsContext=re,e.AutoCompleteWithoutContext=le,e.ComboBox=ie,e.ComboBoxPropsContext=se,e.ComboBoxWithoutContext=te,e.DropDownList=j,e.DropDownListPropsContext=Z,e.DropDownTree=Be,e.DropDownTreePropsContext=Re,e.List=H,e.ListContainer=g,e.ListFilter=v,e.ListItem=N,e.MultiColumnComboBox=we,e.MultiColumnComboBoxPropsContext=ke,e.MultiSelect=xe,e.MultiSelectPropsContext=Ce,e.MultiSelectTree=We,e.MultiSelectTreePropsContext=qe,e.MultiSelectWithoutContext=ye,e.SearchBar=J,e.TagList=ce,e.dropDownListDefaultProps=Y,e.dropdownsMessages=z,e.findByFieldValue=(e,t,s)=>{if(!e)return;const i=e.findIndex((e=>I(e,t)===s));return e[i]},e.getItemValue=I,e.getMultiSelectTreeValue=(e,t)=>{const{items:s,dataItemKey:n,value:a,subItemsField:o="items",operation:l}=t,r=i.getter(n),d=Ue(a,r);if("clear"===l)return[];if("delete"===l){const e=Ue(s,r);return a.filter((t=>!e[r(t)]))}const u=s[0],p=r(u),c=i.getter(o),h=[...e],g=[];let v,m=[];for(;h.length;){const e=h.pop();if(p===r(e)){m=g.map((e=>e.item)),v=e;break}{g&&g.length&&g[g.length-1].parentPosition===h.length&&g.pop();const t=c(e);t&&t.length&&(g.push({item:e,parentPosition:h.length}),h.push(...t))}}const f=[...c(v)||[]],b=[];for(;f.length;){const e=f.pop();b.push(e);const t=c(e);t&&t.length&&f.push(...t)}const y=[];if(!d[p]){y.push(...a),y.push(v),y.push(...b.filter((e=>!d[r(e)])));const e=m.filter((e=>!d[r(e)])),t=Ue(y,r);for(let s=e.length-1;s>-1;s--){const i=e[s],n=c(i);if(n.filter((e=>t[r(e)])).length<n.length)break;y.push(i),t[r(i)]=!0}}else{const e=r(v),t=Ue(b,r),s=Ue(m,r);y.push(...a.filter((i=>{const n=r(i);return!t[n]&&e!==n&&!s[n]})))}return y},e.getValueMap=Ue,e.nodata=P,e.scrollToItem=y}));
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-dropdowns",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-dropdowns",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1761042880,version:"12.2.0-develop.6",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = Object.freeze({
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "12.2.0-develop.
|
|
13
|
+
publishDate: 1761042880,
|
|
14
|
+
version: "12.2.0-develop.6",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
|
|
16
16
|
});
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-dropdowns",
|
|
3
|
-
"version": "12.2.0-develop.
|
|
3
|
+
"version": "12.2.0-develop.6",
|
|
4
4
|
"description": "React DropDowns offer an interface for users to select different items from a list and more. KendoReact Dropdowns package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.0",
|
|
29
|
-
"@progress/kendo-react-buttons": "12.2.0-develop.
|
|
30
|
-
"@progress/kendo-react-common": "12.2.0-develop.
|
|
31
|
-
"@progress/kendo-react-inputs": "12.2.0-develop.
|
|
32
|
-
"@progress/kendo-react-intl": "12.2.0-develop.
|
|
33
|
-
"@progress/kendo-react-labels": "12.2.0-develop.
|
|
34
|
-
"@progress/kendo-react-layout": "12.2.0-develop.
|
|
35
|
-
"@progress/kendo-react-popup": "12.2.0-develop.
|
|
36
|
-
"@progress/kendo-react-treeview": "12.2.0-develop.
|
|
29
|
+
"@progress/kendo-react-buttons": "12.2.0-develop.6",
|
|
30
|
+
"@progress/kendo-react-common": "12.2.0-develop.6",
|
|
31
|
+
"@progress/kendo-react-inputs": "12.2.0-develop.6",
|
|
32
|
+
"@progress/kendo-react-intl": "12.2.0-develop.6",
|
|
33
|
+
"@progress/kendo-react-labels": "12.2.0-develop.6",
|
|
34
|
+
"@progress/kendo-react-layout": "12.2.0-develop.6",
|
|
35
|
+
"@progress/kendo-react-popup": "12.2.0-develop.6",
|
|
36
|
+
"@progress/kendo-react-treeview": "12.2.0-develop.6",
|
|
37
37
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
38
38
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
39
39
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"package": {
|
|
68
68
|
"productName": "KendoReact",
|
|
69
69
|
"productCode": "KENDOUIREACT",
|
|
70
|
-
"publishDate":
|
|
70
|
+
"publishDate": 1761042880,
|
|
71
71
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
|
|
72
72
|
}
|
|
73
73
|
},
|