@progress/kendo-react-dropdowns 7.2.4-develop.3 → 7.3.0-develop.1
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.
- package/AutoComplete/AutoComplete.js +8 -0
- package/AutoComplete/AutoComplete.mjs +458 -0
- package/ComboBox/ComboBox.js +8 -0
- package/ComboBox/ComboBox.mjs +618 -0
- package/DropDownList/DropDownList.js +8 -0
- package/DropDownList/DropDownList.mjs +630 -0
- package/DropDownTree/DropDownTree.js +8 -0
- package/DropDownTree/DropDownTree.mjs +550 -0
- package/DropDownTree/ListNoData.js +8 -0
- package/DropDownTree/ListNoData.mjs +13 -0
- package/DropDownTree/useDropdownWidth.js +8 -0
- package/DropDownTree/useDropdownWidth.mjs +25 -0
- package/MultiColumnComboBox/MultiColumnComboBox.js +8 -0
- package/MultiColumnComboBox/MultiColumnComboBox.mjs +186 -0
- package/MultiSelect/MultiSelect.js +8 -0
- package/MultiSelect/MultiSelect.mjs +694 -0
- package/MultiSelect/TagList.js +8 -0
- package/MultiSelect/TagList.mjs +48 -0
- package/MultiSelectTree/MultiSelectTree.js +8 -0
- package/MultiSelectTree/MultiSelectTree.mjs +590 -0
- package/MultiSelectTree/utils.js +8 -0
- package/MultiSelectTree/utils.mjs +74 -0
- package/common/AdaptiveMode.js +8 -0
- package/common/AdaptiveMode.mjs +73 -0
- package/common/ClearButton.js +8 -0
- package/common/ClearButton.mjs +38 -0
- package/common/DropDownBase.js +8 -0
- package/common/DropDownBase.mjs +194 -0
- package/common/GroupStickyHeader.js +8 -0
- package/common/GroupStickyHeader.mjs +22 -0
- package/common/List.js +8 -0
- package/common/List.mjs +117 -0
- package/common/ListContainer.js +8 -0
- package/common/ListContainer.mjs +33 -0
- package/common/ListDefaultItem.js +8 -0
- package/common/ListDefaultItem.mjs +36 -0
- package/common/ListFilter.js +8 -0
- package/common/ListFilter.mjs +49 -0
- package/common/ListGroupItem.js +8 -0
- package/common/ListGroupItem.mjs +32 -0
- package/common/ListItem.js +8 -0
- package/common/ListItem.mjs +49 -0
- package/common/MultiColumnList.js +8 -0
- package/common/MultiColumnList.mjs +28 -0
- package/common/Navigation.js +8 -0
- package/common/Navigation.mjs +29 -0
- package/common/SearchBar.js +8 -0
- package/common/SearchBar.mjs +65 -0
- package/common/VirtualScroll.js +8 -0
- package/common/VirtualScroll.mjs +75 -0
- package/common/constants.js +8 -0
- package/common/constants.mjs +13 -0
- package/common/settings.js +8 -0
- package/common/settings.mjs +12 -0
- package/common/utils.js +8 -0
- package/common/utils.mjs +109 -0
- package/common/withCustomComponent.js +8 -0
- package/common/withCustomComponent.mjs +13 -0
- package/dist/cdn/js/kendo-react-dropdowns.js +8 -5
- package/index.d.mts +4098 -5
- package/index.d.ts +4098 -31
- package/index.js +8 -5
- package/index.mjs +55 -4429
- package/messages/index.js +8 -0
- package/messages/index.mjs +27 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +9 -9
- package/AutoComplete/AutoComplete.d.ts +0 -236
- package/AutoComplete/AutoCompleteProps.d.ts +0 -254
- package/ComboBox/ComboBox.d.ts +0 -254
- package/ComboBox/ComboBoxProps.d.ts +0 -324
- package/DropDownList/DropDownList.d.ts +0 -264
- package/DropDownList/DropDownListProps.d.ts +0 -329
- package/DropDownTree/DropDownTree.d.ts +0 -74
- package/DropDownTree/DropDownTreeProps.d.ts +0 -297
- package/DropDownTree/ListNoData.d.ts +0 -10
- package/DropDownTree/useDropdownWidth.d.ts +0 -10
- package/MultiColumnComboBox/MultiColumnComboBox.d.ts +0 -300
- package/MultiSelect/MultiSelect.d.ts +0 -262
- package/MultiSelect/MultiSelectProps.d.ts +0 -325
- package/MultiSelect/TagList.d.ts +0 -42
- package/MultiSelectTree/MultiSelectTree.d.ts +0 -85
- package/MultiSelectTree/MultiSelectTreeProps.d.ts +0 -324
- package/MultiSelectTree/utils.d.ts +0 -21
- package/common/AdaptiveMode.d.ts +0 -25
- package/common/ClearButton.d.ts +0 -18
- package/common/DropDownBase.d.ts +0 -180
- package/common/GroupStickyHeader.d.ts +0 -28
- package/common/List.d.ts +0 -50
- package/common/ListContainer.d.ts +0 -22
- package/common/ListDefaultItem.d.ts +0 -20
- package/common/ListFilter.d.ts +0 -23
- package/common/ListGroupItem.d.ts +0 -37
- package/common/ListItem.d.ts +0 -65
- package/common/MultiColumnList.d.ts +0 -9
- package/common/Navigation.d.ts +0 -17
- package/common/SearchBar.d.ts +0 -47
- package/common/VirtualScroll.d.ts +0 -45
- package/common/constants.d.ts +0 -8
- package/common/events.d.ts +0 -76
- package/common/filterDescriptor.d.ts +0 -45
- package/common/settings.d.ts +0 -109
- package/common/utils.d.ts +0 -70
- package/common/withCustomComponent.d.ts +0 -11
- package/messages/index.d.ts +0 -44
- package/package-metadata.d.ts +0 -9
package/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const bs=require("react"),l=require("prop-types"),d=require("@progress/kendo-react-common"),qe=require("@progress/kendo-react-labels"),xe=require("@progress/kendo-svg-icons"),xt=require("@progress/kendo-react-popup"),Ut=require("@progress/kendo-react-inputs"),ke=require("@progress/kendo-react-intl"),Fe=require("@progress/kendo-react-buttons"),ge=require("@progress/kendo-react-layout"),yt=require("@progress/kendo-react-treeview");function ys(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const o=ys(bs);class it extends o.Component{render(){const{children:t,width:e,dir:s,itemsCount:n,popupSettings:a}=this.props;return o.createElement(xt.Popup,{style:{width:e,direction:s},contentKey:n&&n.join(),...a},t)}}const zt=o.forwardRef((i,t)=>{const e=o.useRef(null);return o.useImperativeHandle(t,()=>e.current),o.createElement("div",{className:"k-list-filter"},o.createElement(Ut.TextBox,{...i,ref:e,value:i.value||"",onChange:i.onChange,onKeyDown:i.onKeyDown,tabIndex:i.tabIndex,onClick:s=>s.stopPropagation(),size:i.size,fillMode:i.fillMode,rounded:i.rounded,prefix:()=>o.createElement(Ut.InputPrefix,null,o.createElement(d.IconWrap,{name:"search",icon:xe.searchIcon}))}))});zt.propTypes={value:l.oneOfType([l.string,l.number,l.array]),tabIndex:l.number,onChange:l.func,onKeyDown:l.func,size:l.oneOf([null,"small","medium","large"]),rounded:l.oneOf([null,"small","medium","large","full"]),fillMode:l.oneOf([null,"solid","flat","outline"])};zt.displayName="KendoReactListFilter";const Me=zt;class We extends o.Component{render(){const{group:t,groupMode:e,render:s}=this.props,n=o.createElement("div",{className:"k-list-group-sticky-header"},e==="classic"?t:o.createElement("div",{className:"k-list-header-text"},t));return s!==void 0?s.call(void 0,n,this.props):n}}const G=i=>i!=null,Is=(i,t)=>{for(let e=0;e<i.length;e++)if(i.charAt(e)!==t)return!1;return!0},Cs=(i,t,e)=>{let s=i;return e&&(s=[e].concat(s)),s.slice(t).concat(s.slice(0,t))},jt=(i,t,e)=>{if(!G(i))return!1;let s=String(i);return e&&(s=s.toLowerCase()),s.indexOf(t)===0},is=(i,t,e,s,n)=>{const a=i.offsetHeight,u=t.children.item(e),p=u.offsetTop+(n?s-i.scrollTop:0),c=u.offsetHeight;if(n){let r=0;p+c>a?r=p+c-a:p<0&&(r=p),r!==0?i.scrollTop+=r:i.scrollTop===0&&s!==0&&(i.scrollTop=s)}else p+c>a+i.scrollTop?i.scrollTop=p+c-a:p<i.scrollTop&&(i.scrollTop-=i.scrollTop-p)},_e=(i,t,e)=>{let s=-1;if(t){t=t.toLowerCase();for(let n=0;n<i.length;n++){const a=(R(i[n],e)||"")+"";if(a&&a.toLowerCase().startsWith(t)){s=n;break}}}return s},Pt=(i,t,e,s=!1)=>{const n=a=>s?a:a.toLowerCase();return i.findIndex(a=>e?n(R(a,e))===n(t):n(t)===n(a.toString()))},R=(i,t)=>{if(t&&G(i)){const e=t.split(".");let s=i;return e.forEach(n=>{s=s?s[n]:void 0}),s}return i},xs=(i,t,e)=>{if(!i)return;const s=i.findIndex(n=>R(n,t)===e);return i[s]},ks=(i=[],t=[],e)=>{if(i===t)return!0;if(i.length!==t.length)return!1;for(let s=0;s<i.length;s++)if(!_(i[s],t[s],e))return!1;return!0},gt=(i,t,e)=>{t.forEach(s=>{const n=i.findIndex(a=>_(a,s,e));n!==-1&&i.splice(n,1)})},_=(i,t,e)=>i===t||G(i)===G(t)&&R(i,e)===R(t,e),Yt=(i,t,e)=>{if(t){const s=Pt(i,t,e,!0);return s!==-1?i[s]:i[_e(i,t,e)]}return i[0]},Ss=(i,t=[],e)=>{let s="";if(i){const n=t[_e(t,i,e)];if(n){const a=R(n,e);i.toLowerCase()!==a.toLowerCase()&&(s=a.substring(i.length))}}return s},ws=i=>{i.target.nodeName!=="INPUT"&&i.preventDefault()},It=(i,t,e)=>!!i!=!!t||i.text!==t.text?!1:i===t||ks(i.data,t.data,e),Es=i=>i.preventDefault();class Ds extends o.Component{render(){const{selected:t,defaultItem:e,textField:s}=this.props;return o.createElement("div",{onClick:this.props.onClick,onMouseDown:Es,style:{position:"unset"},className:d.classNames("k-list-optionlabel",{"k-selected":t})},R(e,s)||"")}}class ns extends o.Component{constructor(){super(...arguments),this.handleClick=t=>this.props.onClick(this.props.index,t)}render(){const{selected:t,group:e,dataItem:s,virtual:n,groupMode:a,disabled:u,render:p}=this.props,c=o.createElement("li",{id:this.props.id,role:"option","aria-selected":t,"aria-disabled":u?!0:void 0,className:d.classNames("k-list-item",{"k-selected":t,"k-focus":this.props.focused,"k-first":!!e&&a==="classic","k-disabled":u}),onClick:this.handleClick,style:{position:n?"relative":"unset"}},o.createElement("span",{className:"k-list-item-text"},R(s,this.props.textField).toString()),e!==void 0&&a==="classic"?o.createElement("div",{className:"k-list-item-group-label"},e):null);return p!==void 0?p.call(void 0,c,this.props):c}}class Fs extends o.Component{render(){const{group:t,virtual:e,render:s,isMultiColumn:n=!1}=this.props,a=o.createElement("li",{id:this.props.id,role:"group",className:n?"k-table-group-row":"k-list-group-item",style:n?{boxSizing:"inherit"}:{position:e?"relative":"unset"}},o.createElement("span",{className:s?void 0:n?"k-table-th":"k-list-item-text"},t));return s!==void 0?s.call(void 0,a,this.props):a}}const fe="dropdowns.nodata",et="dropdowns.clear",Ot="dropdowns.comboArrowBtnAriaLabelExpand",_t="dropdowns.comboArrowBtnAriaLabelCollapse",Rt="dropdowns.dropDownListArrowBtnAriaLabel",tt="dropdowns.apply",st="dropdowns.cancel",ne={[et]:"clear",[fe]:"NO DATA FOUND.",[Ot]:"expand combobox",[_t]:"collapse combobox",[Rt]:"select",[tt]:"Apply",[st]:"Cancel"};class Re extends o.Component{renderItems(){const{textField:t,valueField:e,groupField:s,groupMode:n,isMultiColumn:a,optionsGuid:u,skip:p=0,virtual:c,focusedIndex:r,highlightSelected:h=!0,value:f,data:g,itemRender:m,groupHeaderItemRender:v}=this.props,b=Array.isArray(f);let w=0;return g.map((k,D)=>{const N=p+D,K=p+D+w,O=k.disabled?!1:h&&(!b&&_(k,f,e)||b&&f.findIndex(E=>_(E,k,e))!==-1);let S,F,x;return D>0&&s!==void 0&&(F=R(k,s),x=R(g[D-1],s),F&&x&&F!==x&&(S=F)),S!==void 0&&n==="modern"&&(w+=1),[S!==void 0&&n==="modern"&&o.createElement(Fs,{id:`option-${u}-${K}`,virtual:c,key:N+"-group-item",group:S,isMultiColumn:a,render:v}),o.createElement(ns,{id:`option-${u}-${S!==void 0&&n==="modern"?K+1:K}`,virtual:c,dataItem:k,groupMode:n,selected:O,focused:r===D,index:N,key:N,onClick:this.props.onClick,textField:t,group:S,render:m,disabled:k.disabled})]})}renderNoValueElement(t){const e=this.props.noDataRender,s=o.createElement("div",{className:"k-nodata"},o.createElement("div",null,t.toLanguageString(fe,ne[fe])));return e?e.call(void 0,s):s}render(){const t=ke.provideLocalizationService(this),{id:e,show:s,wrapperCssClass:n,wrapperStyle:a,listStyle:u,listRef:p,wrapperRef:c,listClassName:r="k-list-ul",ariaSetSize:h}=this.props,f=this.renderItems();return f.length?o.createElement("div",{className:n,style:a,ref:c,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onScroll:this.props.onScroll,unselectable:"on"},o.createElement("ul",{id:e,role:"listbox","aria-hidden":s?void 0:!0,"aria-setsize":h,className:r,ref:p,style:u},f),this.props.scroller&&o.createElement("div",{className:"k-height-container"},this.props.scroller)):this.renderNoValueElement(t)}}ke.registerForLocalization(Re);const Ts=1533915;class Ms{constructor(){this.container=null,this.scrollElement=null,this.list=null,this.containerHeight=0,this.skip=0,this.total=0,this.enabled=!1,this.pageSize=0,this.itemHeight=0,this.PageChange=null,this.prevScrollPos=0,this.listTranslate=0,this.scrollSyncing=!1,this.scrollerRef=t=>{const e=this;e.container=t,t&&(t.setAttribute("unselectable","on"),window.setTimeout(e.calcScrollElementHeight.bind(e),0))},this.calcScrollElementHeight=()=>{this.scrollSyncing=!0;let t=!1;this.itemHeight=this.list?this.list.children[0].offsetHeight:this.itemHeight,this.containerHeight=Math.min(Ts,this.itemHeight*this.total);const e=this.containerHeight;return this.scrollElement&&(t=this.scrollElement.style.height!==e+"px",t&&(this.scrollElement.style.height=e+"px")),this.scrollSyncing=!1,t},this.scrollHandler=this.scrollHandler.bind(this)}get translate(){return this.listTranslate}changePage(t,e){const s=Math.min(Math.max(0,t),this.total-this.pageSize);s!==this.skip&&this.PageChange&&this.PageChange({skip:s,take:this.pageSize},e)}translateTo(t){this.listTranslate=t,this.list&&(this.list.style.transform="translateY("+t+"px)")}reset(){this.container&&(this.calcScrollElementHeight(),this.container.scrollTop=0,this.translateTo(0))}scrollToEnd(){this.container&&this.list&&(this.calcScrollElementHeight(),this.container.scrollTop=this.container.scrollHeight-this.container.offsetHeight,this.translateTo(this.container.scrollHeight))}localScrollUp(t){const e=this.itemHeight,s=this.container.scrollTop;let n=this.listTranslate,a,u=s-n;if(!(u>e)){for(a=0;a<this.skip&&!(n+e+u<=s);a++)n-=e;if(n=this.validateTranslate(n),this.skip-a<=0&&n>=s){this.translateTo(0),this.changePage(0,t),this.container.scrollTop=0;return}n!==this.listTranslate&&(this.translateTo(n),this.changePage(this.skip-a,t))}}localScrollDown(t){const e=this.itemHeight;let s=this.container.scrollTop,n=this.listTranslate;const a=this.list.children.length;let u;for(u=0;u<a&&!(n+e>=s);u++)n+=e;n=this.validateTranslate(n),u>=a&&this.skip+u>=this.total?(this.translateTo(n),this.changePage(this.total-1,t)):n!==this.listTranslate&&(this.translateTo(n),this.changePage(this.skip+u,t))}scrollNonStrict(t){const e=this.total*this.prevScrollPos/this.containerHeight,s=Math.min(Math.floor(e),this.total-1);let n=this.containerHeight*e/this.total;n=this.validateTranslate(n),this.translateTo(n),this.changePage(s,t)}scrollHandler(t){const e=this.container?this.container.scrollTop:0,s=this.prevScrollPos;this.prevScrollPos=e,!(!this.enabled||!this.list||!this.container||this.scrollSyncing)&&(e-s<=0&&e>this.listTranslate-this.list.scrollHeight/10?this.localScrollUp(t):e-s>0&&e<this.listTranslate+this.list.scrollHeight*2/3?this.localScrollDown(t):this.scrollNonStrict(t))}validateTranslate(t){return t=Math.max(0,t),t=Math.min(this.containerHeight,t),t}}class Ks{navigate(t){const e=t.keyCode;if(e===d.Keys.up||e===d.Keys.left)return this.next({current:t.current,min:t.min,max:t.max,step:t.skipItems?t.skipItems:-1});if(e===d.Keys.down||e===d.Keys.right)return this.next({current:t.current,min:t.min,max:t.max,step:t.skipItems?t.skipItems:1});if(e===d.Keys.home)return 0;if(e===d.Keys.end)return t.max}next(t){return G(t.current)?Math.min(t.max,Math.max(t.current+t.step,t.min)):t.min}}const Ht=class{constructor(i){this.wrapper=null,this.list=null,this.vs=new Ms,this.navigation=new Ks,this.handleItemClick=(t,e)=>{const s=this.initState();s.syntheticEvent=e,e.stopPropagation(),this.component.handleItemSelect(t,s),this.togglePopup(s),this.applyState(s)},this.handleFocus=t=>{if(!this.component.state.focused){const e=this.initState();e.data.focused=!0,e.events.push({type:"onFocus"}),e.syntheticEvent=t,this.applyState(e)}},this.filterChanged=(t,e)=>{const{textField:s,filterable:n}=this.component.props;n&&e.events.push({type:"onFilterChange",filter:{field:s,operator:"contains",ignoreCase:!0,value:t}})},this.togglePopup=t=>{const e=this.component.props,s=e.opened!==void 0?e.opened:this.component.state.opened;e.opened===void 0&&(t.data.opened=!s),s?t.events.push({type:"onClose"}):(t.events.push({type:"onOpen"}),this.calculatePopupWidth())},this.pageChange=(t,e)=>{const s=this.initState();s.syntheticEvent=e,this.triggerOnPageChange(s,t.skip,t.take),this.applyState(s)},this.scrollToVirtualItem=(t,e)=>{const s=this.vs;if(s.enabled=!1,t.skip===0)s.reset();else if(t.skip+t.pageSize===t.total)s.scrollToEnd();else{let n=s.translate;n===0&&(s.calcScrollElementHeight(),n=s.itemHeight*t.skip,s.translateTo(n-s.itemHeight)),s.container&&(s.container.scrollTop=n),this.scrollToItem(e,!0)}window.setTimeout(()=>s.enabled=!0,10)},this.scrollPopupByPageSize=t=>{var u,p,c,r,h,f;const e=this.vs,s=(p=(u=this.list)==null?void 0:u.parentElement)==null?void 0:p.scrollTop,n=e.enabled&&e.itemHeight?e.itemHeight:this.list?this.list.children[0].offsetHeight:0,a=(r=(c=this.list)==null?void 0:c.parentElement)==null?void 0:r.offsetHeight;s!==void 0&&a!==void 0&&((f=(h=this.list)==null?void 0:h.parentElement)==null||f.scroll({top:s+t*Math.floor(a/n)*n}))},this.renderScrollElement=()=>{const t=this.vs;return t.enabled&&o.createElement("div",{ref:e=>t.scrollElement=e,key:"scrollElementKey"})},this.resetGroupStickyHeader=(t,e)=>{t!==e.state.group&&e.setState({...e.state,group:t})},this.listBoxId=i.props.id+"list",this.guid=i.props.id,this.component=i,this.vs.PageChange=this.pageChange}didMount(){const i=this.component.props,t=i.popupSettings||{},e=i.style||{},s=t.width;let n=i.opened===!0;s===void 0&&this.calculatePopupWidth(),i.dir===void 0&&e.direction===void 0&&(this.calculateDir(),n=!0),n&&this.component.forceUpdate()}calculateDir(){const i=this.component.element;i&&i.ownerDocument&&i.ownerDocument.defaultView&&(this.dirCalculated=i.ownerDocument.defaultView.getComputedStyle(i).direction||void 0)}calculatePopupWidth(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")}scrollToItem(i,t,e){const s=this.list||this.vs.list;if(!s&&!e&&setTimeout(()=>{this.scrollToItem(i,t,!0)},10),s&&i>=0){const n=this.vs,a=n.container||s.parentNode,u=t!==void 0?t:n.enabled;is(a,s,i,n.translate,u)}}initState(){return{data:{},events:[],syntheticEvent:void 0}}applyState(i){Object.keys(i.data).length>0&&this.component.setState(i.data);const t={syntheticEvent:i.syntheticEvent,nativeEvent:i.syntheticEvent?i.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};i.events.forEach(e=>{const s=e.type;delete e.type;const n=s&&this.component.props[s];n&&n.call(void 0,{...t,...e})})}triggerOnPageChange(i,t,e){const s=this.component.props.virtual;if(s){const n=Math.min(Math.max(0,t),Math.max(0,s.total-e));n!==s.skip&&i.events.push({type:"onPageChange",page:{skip:n,take:e}})}}triggerPageChangeCornerItems(i,t){const e=this.component.props,{data:s=[],dataItemKey:n,virtual:a}=e,u=e.opened!==void 0?e.opened:this.component.state.opened;i&&a&&this.vs.enabled&&(a.skip>0&&_(i,s[0],n)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!u&&a.skip+a.pageSize<a.total&&_(i,s[s.length-1],n)&&this.triggerOnPageChange(t,a.skip+1,a.pageSize))}getPopupSettings(){return Object.assign({},Ht.defaultProps.popupSettings,this.component.props.popupSettings)}getGroupedDataModernMode(i,t){let e=[];return i.forEach((s,n)=>{i[n-1]&&s[t]!==i[n-1][t]&&e.push({[t]:s[t]}),e.push(i[n])}),e}};let oe=Ht;oe.basicPropTypes={opened:l.bool,disabled:l.bool,dir:l.string,tabIndex:l.number,accessKey:l.string,data:l.array,textField:l.string,className:l.string,label:l.string,loading:l.bool,popupSettings:l.shape({animate:l.oneOfType([l.bool,l.shape({openDuration:l.number,closeDuration:l.number})]),popupClass:l.string,className:l.string,appendTo:l.any,width:l.oneOfType([l.string,l.number]),height:l.oneOfType([l.string,l.number])}),onOpen:l.func,onClose:l.func,onFocus:l.func,onBlur:l.func,onChange:l.func,itemRender:l.func,listNoDataRender:l.func,focusedItemIndex:l.func,header:l.node,footer:l.node};oe.propTypes={...Ht.basicPropTypes,value:l.any,defaultValue:l.any,filterable:l.bool,filter:l.string,virtual:l.shape({pageSize:l.number.isRequired,skip:l.number.isRequired,total:l.number.isRequired}),onFilterChange:l.func,onPageChange:l.func};oe.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0};const $e={name:"@progress/kendo-react-dropdowns",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1654528156,version:"",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"},Ct=500,De=768,Ns="Please select a value from the list!",{sizeMap:Nt,roundedMap:Ps}=d.kendoThemeMaps,Bt=class extends o.Component{constructor(i){super(i),this.state={},this._element=null,this.base=new oe(this),this.searchState={word:"",last:""},this._select=null,this._skipFocusEvent=!1,this._filterInput=null,this._navigated=!1,this._lastKeypressIsFilter=!1,this.itemHeight=0,this.focus=()=>{this.base.wrapper&&this.base.wrapper.focus()},this.handleItemSelect=(t,e)=>{const{data:s=[],virtual:n,dataItemKey:a,defaultItem:u}=this.props,p=n?n.skip:0,c=t===-1&&u!==void 0?u:s[t-p],r=!_(c,this.value,a);this.triggerOnChange(c,e),r&&this.base.triggerPageChangeCornerItems(c,e)},this.componentRef=t=>{this._element=t,this.base.wrapper=t},this.dummySelect=t=>o.createElement("select",{name:this.props.name,ref:e=>{this._select=e},tabIndex:-1,"aria-hidden":!0,title:this.props.label,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},o.createElement("option",{value:this.props.valueMap?this.props.valueMap.call(void 0,t):t})),this.renderListContainer=()=>{const{header:t,footer:e,dir:s,data:n=[],size:a,groupField:u,groupStickyHeaderItemRender:p,list:c}=this.props,r=this.base,h=r.getPopupSettings(),f=this.props.opened!==void 0?this.props.opened:this.state.opened,g=h.width!==void 0?h.width:r.popupWidth,m={dir:s!==void 0?s:r.dirCalculated,width:g,popupSettings:{...h,popupClass:d.classNames(h.popupClass,"k-list-container","k-dropdownlist-popup"),anchor:h.anchor||this.element,show:f,onOpen:this.onPopupOpened,onClose:this.onPopupClosed},itemsCount:[n.length]};let{group:v}=this.state;return v===void 0&&u!==void 0&&(v=R(n[0],u)),o.createElement(it,{...m},this.renderListFilter(),t&&o.createElement("div",{className:"k-list-header"},t),o.createElement("div",{className:d.classNames("k-list",{[`k-list-${Nt[a]||a}`]:a,"k-virtual-list":this.base.vs.enabled})},this.renderDefaultItem(),!c&&v&&n.length!==0&&o.createElement(We,{group:v,groupMode:"modern",render:p}),this.renderList()),e&&o.createElement("div",{className:"k-list-footer"},e))},this.renderList=()=>{const{data:t=[],textField:e,dataItemKey:s,virtual:n={skip:0,total:void 0},groupHeaderItemRender:a,listNoDataRender:u,itemRender:p}=this.props,c=this.base.vs,r=n.skip,h=this.props.opened!==void 0?this.props.opened:this.state.opened,f=this.base.getPopupSettings(),g=`translateY(${c.translate}px)`;return o.createElement(Re,{id:this._listboxId,show:h,data:t.slice(),focusedIndex:this.getFocusedIndex(),value:this.value,textField:e,valueField:s,optionsGuid:this._guid,groupField:this.props.groupField,groupMode:"modern",listRef:m=>c.list=this.base.list=m,wrapperStyle:{maxHeight:f.height},wrapperCssClass:"k-list-content",listStyle:c.enabled?{transform:g}:void 0,key:"listkey",skip:r,onClick:this.handleItemClick,itemRender:p,groupHeaderItemRender:a,noDataRender:u,onScroll:this.onScroll,wrapperRef:c.scrollerRef,scroller:this.base.renderScrollElement(),ariaSetSize:n.total})},this.onScroll=t=>{const{vs:e,list:s}=this.base;e.scrollHandler(t);const{groupField:n}=this.props;let{data:a=[]}=this.props;if(!(!n||!a.length)&&n){const u=this.itemHeight=this.itemHeight||(e.enabled?e.itemHeight:s?s.children[0].offsetHeight:0),c=t.target.scrollTop-e.skip*u;a=this.base.getGroupedDataModernMode(a,n);let r=a[0][n];for(let h=1;h<a.length&&!(u*h>c);h++)a[h]&&a[h][n]&&(r=a[h][n]);r!==this.state.group&&this.setState({group:r})}},this.renderListFilter=()=>{const t=this.props.filter!==void 0?this.props.filter:this.state.text;return this.props.filterable&&o.createElement(Me,{value:t,ref:e=>this._filterInput=e&&e.element,onChange:this.handleListFilterChange,onKeyDown:this.handleKeyDown,size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode})},this.renderDefaultItem=()=>{const{textField:t,defaultItem:e,dataItemKey:s}=this.props;return e!==void 0&&o.createElement(Ds,{defaultItem:e,textField:t,selected:_(this.value,e,s),key:"defaultitemkey",onClick:this.handleDefaultItemClick})},this.search=t=>{clearTimeout(this._typingTimeout),this.props.filterable||(this._typingTimeout=window.setTimeout(()=>this.searchState.word="",this.props.delay),this.selectNext(t))},this.selectNext=t=>{const{data:e=[],dataItemKey:s}=this.props;let n=e.map((k,D)=>({item:k,itemIndex:D}));const a=this.searchState.word,u=this.searchState.last,p=Is(a,u);let c=n.length,r=Math.max(0,e.findIndex(k=>_(k,this.value,s))),h;this.props.defaultItem&&(h={item:this.props.defaultItem,itemIndex:-1},c+=1,r+=1),r+=p?1:0,n=Cs(n,r,h);let f,g,m,v=0;const{textField:b,ignoreCase:w}=this.props;for(;v<c;v++)if(f=R(n[v].item,b),g=p&&jt(f,u,w),m=jt(f,a,w),g||m){v=n[v].itemIndex;break}if(v!==c){const k=this.base.initState();k.syntheticEvent=t,this.handleItemSelect(v,k),this.applyState(k),this._valueDuringOnChange=void 0}},this.handleKeyDown=t=>{t&&t.target instanceof Element&&t.target.nodeName==="INPUT"&&t.stopPropagation&&t.stopPropagation();const{data:e=[],filterable:s,disabled:n,defaultItem:a,leftRightKeysNavigation:u=!0,virtual:p={skip:0,total:0,pageSize:0},dataItemKey:c,groupField:r="",textField:h,skipDisabledItems:f=!0}=this.props,g=this.value,m=e.findIndex(F=>_(F,g,c)),v=this.props.opened!==void 0?this.props.opened:this.state.opened,b=t.keyCode,w=b===d.Keys.home||b===d.Keys.end,k=b===d.Keys.up||b===d.Keys.down,D=!v&&(t.altKey&&b===d.Keys.down||b===d.Keys.enter||b===d.Keys.space),N=v&&(t.altKey&&b===d.Keys.up||b===d.Keys.esc),K=u&&(b===d.Keys.left||b===d.Keys.right),O=k||K&&!s||w,S=this.base.initState();if(S.syntheticEvent=t,!n){if(w&&this.base.vs.enabled)b===d.Keys.home?p.skip!==0?(this.base.triggerOnPageChange(S,0,p.pageSize),this._navigated=!0):this.triggerOnChange(e[0],S):p.skip<p.total-p.pageSize?(this.base.triggerOnPageChange(S,p.total-p.pageSize,p.pageSize),this._navigated=!0):this.triggerOnChange(e[e.length-1],S);else if(v&&b===d.Keys.pageUp)this.base.scrollPopupByPageSize(-1);else if(v&&b===d.Keys.pageDown)this.base.scrollPopupByPageSize(1);else if(v&&b===d.Keys.enter){const F=this.getFocusedIndex();this.haveFocusedItemAndDataNotEmpty(e,F)?(this.triggerOnChange(null,S),this.applyState(S)):this.handleItemSelect(F,S),this.base.togglePopup(S),t.preventDefault()}else if(D||N)N&&this.resetValueIfDisabledItem(),this.base.togglePopup(S),t.preventDefault();else if(O){if(this._lastKeypressIsFilter=!1,r!==""&&h)if(!f&&v)this.onNavigate(S,b);else{let F;if(b===d.Keys.down||b===d.Keys.right){const x=e.slice(m+1).find(E=>!E.disabled&&E[h]);F=x&&e.findIndex(E=>E[h]===x[h])}else if(b===d.Keys.up||b===d.Keys.left){let x;if(m===0&&a)F=-1;else if(m===-1)x=e,F=e.findIndex(E=>!E.disabled&&E[h]);else{x=e.slice(0,m);let E=x.pop();for(;E&&E.disabled;)E=x.pop();F=E&&e.findIndex(M=>M[h]===E[h])}}if(F!==void 0){const x=F-m;this.onNavigate(S,b,x)}else F===void 0&&e.findIndex(x=>x[h]===g[h])===e.length-1&&this.onNavigate(S,b)}else if(!f&&v||w)this.onNavigate(S,b);else if(h){let F;if(b===d.Keys.down||b===d.Keys.right){const x=e.slice(m+1).find(E=>!E.disabled&&E[h]);F=x&&e.findIndex(E=>E[h]===x[h])}else if(b===d.Keys.up||b===d.Keys.left){let x;if(m===0&&a)F=-1;else if(m===-1)x=e,F=e.find(E=>!E.disabled&&E[h]);else{x=e.slice(0,m);let E=x.pop();for(;E&&E.disabled;)E=x.pop();F=E&&e.findIndex(M=>M[h]===E[h])}}if(F!==void 0){const x=F-m;this.onNavigate(S,b,x)}else F===void 0&&e.findIndex(x=>x[h]===g[h])===e.length-1&&this.onNavigate(S,b)}else this.onNavigate(S,b);t.preventDefault()}this.applyState(S)}},this.handleItemClick=(t,e)=>{this.base.handleItemClick(t,e),this._valueDuringOnChange=void 0},this.handleFocus=t=>{this._skipFocusEvent||this.base.handleFocus(t)},this.handleBlur=t=>{if(this._skipFocusEvent||!this.state.focused)return;const e=this.props.opened!==void 0?this.props.opened:this.state.opened,{adaptive:s}=this.props,{windowWidth:n=0}=this.state,a=n<=De&&s,u=this.base.initState();u.syntheticEvent=t,u.data.focused=!1,u.events.push({type:"onBlur"}),e&&this.resetValueIfDisabledItem(),e&&!a&&this.base.togglePopup(u),this.applyState(u)},this.handleDefaultItemClick=t=>{const e=this.base.initState();e.syntheticEvent=t,this.base.togglePopup(e),this.triggerOnChange(this.props.defaultItem,e),this.applyState(e)},this.handleWrapperClick=t=>{if(t.isPropagationStopped())return;const e=this.base.initState();e.syntheticEvent=t,this.state.focused||(e.data.focused=!0),this.resetValueIfDisabledItem(),this.base.togglePopup(e),this.applyState(e)},this.handleKeyPress=t=>{if(this.props.filterable||t.which===0||t.keyCode===d.Keys.enter)return;let e=String.fromCharCode(t.charCode||t.keyCode);this.props.ignoreCase&&(e=e.toLowerCase()),e===" "&&t.preventDefault(),this.searchState={word:this.searchState.word+e,last:this.searchState.last+e},this.search(t)},this.handleListFilterChange=t=>{const e=this.base.initState();e.syntheticEvent=t.syntheticEvent,this.props.filter===void 0&&(e.data.text=t.target.value),this.base.filterChanged(t.target.value,e),this._lastKeypressIsFilter=!0,this.applyState(e),this.setState({group:void 0})},this.onPopupOpened=()=>{this._filterInput&&this.focusElement(this._filterInput),this.props.adaptive&&setTimeout(()=>{this._filterInput&&this.focusElement(this._filterInput)},300)},this.onPopupClosed=()=>{this.state.focused&&window.setTimeout(()=>{this.state.focused&&this.base.wrapper&&this.focusElement(this.base.wrapper)})},this.setValidity=()=>{this._select&&this._select.setCustomValidity&&this._select.setCustomValidity(this.validity.valid?"":this.props.validationMessage||Ns)},d.validatePackage($e)}get _inputId(){return this.props.id+"-accessibility-id"}get _listboxId(){return this.props.id+"-listbox-id"}get _guid(){return this.props.id+"-guid"}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get value(){let i;return this._valueDuringOnChange!==void 0?i=this._valueDuringOnChange:this.props.value!==void 0?i=this.props.value:this.state.value!==void 0?i=this.state.value:this.props.defaultValue!==void 0&&(i=this.props.defaultValue),!G(i)&&this.props.defaultItem!==void 0&&(i=this.props.defaultItem),i}get index(){const{data:i=[],dataItemKey:t}=this.props,e=this.value;return i.findIndex(s=>_(s,e,t))}get name(){return this.props.name}get validity(){const i=this.props.validationMessage!==void 0,t=!this.required||this.value!==null&&this.value!==""&&this.value!==void 0,e=this.props.valid!==void 0?this.props.valid:t;return{customError:i,valid:e,valueMissing:this.value===null}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:Bt.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:Bt.defaultProps.required}componentDidUpdate(i,t){var f;const{dataItemKey:e,virtual:s,groupField:n="",textField:a}=this.props,{data:u=[]}=this.props,p=i.virtual?i.virtual.total:0,c=this.props.opened!==void 0?this.props.opened:this.state.opened,r=i.opened!==void 0?i.opened:t.opened,h=!r&&c;if(this.base.getPopupSettings().animate||h&&this.onPopupOpened(),s&&s.total!==p)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{const g=this.value,m=i.value!==void 0?i.value:t.value;let v=u.findIndex(w=>_(w,g,e));n!==""&&g&&a&&(v=(f=this.base.getGroupedDataModernMode(u,n))==null?void 0:f.map(w=>w[a]).indexOf(g[a]));const b=!_(m,g,e);h&&s?this.base.scrollToVirtualItem(s,v):h&&!s?(this.onPopupOpened(),u&&u.length!==0&&this.base.resetGroupStickyHeader(u[0][n],this),this.base.scrollToItem(v)):c&&r&&g&&b&&!this._navigated?this.base.scrollToItem(v):c&&r&&this._navigated&&(this._navigated&&s&&s.skip===0?this.base.vs.reset():this._navigated&&s&&s.skip===s.total-s.pageSize&&this.base.vs.scrollToEnd())}this._navigated=!1,this.setValidity()}componentDidMount(){var i;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.base.didMount(),this.setValidity(),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentWillUnmount(){var i;(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const i=ke.provideLocalizationService(this).toLanguageString(Rt,ne[Rt]),{style:t,className:e,label:s,dir:n,virtual:a,size:u,rounded:p,fillMode:c,adaptive:r}=this.props,{windowWidth:h=0}=this.state,f=this.props.opened!==void 0?this.props.opened:this.state.opened,g=this.value,m=R(g,this.props.textField),v=!this.validityStyles||this.validity.valid,b=this.base,w=b.vs,k=h<=De&&r;w.enabled=a!==void 0,a!==void 0&&(b.vs.skip=a.skip,b.vs.total=a.total,b.vs.pageSize=a.pageSize);const{dataItemKey:D,data:N=[],disabled:K,tabIndex:O,loading:S,iconClassName:F,svgIcon:x,valueRender:E}=this.props,{focused:M}=this.state,H=N.findIndex(B=>_(B,g,D)),U=o.createElement("span",{id:this._inputId,className:"k-input-inner"},o.createElement("span",{className:"k-input-value-text"},m)),j=E!==void 0?E.call(void 0,U,g):U,X=o.createElement(o.Fragment,null,o.createElement("span",{ref:this.componentRef,className:d.classNames("k-dropdownlist k-picker",e,{[`k-picker-${Nt[u]||u}`]:u,[`k-rounded-${Ps[p]||p}`]:p,[`k-picker-${c}`]:c,"k-focus":M,"k-disabled":K,"k-invalid":!v,"k-loading":S,"k-required":this.required}),style:s?{...t,width:void 0}:t,dir:n,onMouseDown:f?B=>{B.target.nodeName!=="INPUT"&&(this.focusElement(this.base.wrapper),B.preventDefault())}:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:d.getTabIndex(O,K),accessKey:this.props.accessKey,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,onClick:K?void 0:this.handleWrapperClick,role:"combobox","aria-required":this.required,"aria-disabled":K||void 0,"aria-haspopup":"listbox","aria-expanded":f||!1,"aria-owns":this._listboxId,"aria-activedescendant":f?"option-"+this._guid+"-"+(H+(a?a.skip:0)):void 0,"aria-label":this.props.ariaLabel||this.props.label,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy||this._inputId,id:this.props.id,title:this.props.title},j,S&&o.createElement(d.IconWrap,{className:"k-input-loading-icon",name:"loading"}),o.createElement(Fe.Button,{tabIndex:-1,type:"button","aria-label":i,"aria-hidden":!0,size:u,fillMode:c,iconClass:F,className:"k-input-button",rounded:null,themeColor:"base",icon:F?void 0:"caret-alt-down",svgIcon:x||xe.caretAltDownIcon,onMouseDown:B=>this.state.focused&&B.preventDefault()}),this.dummySelect(g),!k&&this.renderListContainer()),k&&this.renderAdaptiveListContainer());return s?o.createElement(qe.FloatingLabel,{label:s,editorValue:m,editorValid:v,editorDisabled:this.props.disabled,style:{width:t?t.width:void 0},children:X}):X}onNavigate(i,t,e){const{data:s=[],defaultItem:n,dataItemKey:a,virtual:u={skip:0,total:0,pageSize:0}}=this.props,p=this.base.vs,c=this.value,r=s.findIndex(f=>_(f,c,a)),h=this.base.navigation.navigate({current:u.skip+r,max:(p.enabled?u.total:s.length)-1,min:n!==void 0?-1:0,keyCode:t,skipItems:e||void 0});h!==void 0&&this.handleItemSelect(h,i),this.applyState(i)}renderAdaptiveListContainer(){const{windowWidth:i=0}=this.state,{header:t,footer:e,size:s,adaptiveTitle:n,groupField:a,groupStickyHeaderItemRender:u,list:p,data:c=[]}=this.props,r=this.props.opened!==void 0?this.props.opened:this.state.opened,h={navigatable:!1,navigatableElements:[],expand:r,animation:!0,onClose:g=>this.handleWrapperClick(g),animationStyles:i<=Ct?{top:0,width:"100%",height:"100%"}:void 0,className:i<=Ct?"k-adaptive-actionsheet k-actionsheet-fullscreen":"k-adaptive-actionsheet k-actionsheet-bottom"};let{group:f}=this.state;return f===void 0&&a!==void 0&&(f=R(c[0],a)),o.createElement(ge.ActionSheet,{...h},o.createElement(ge.ActionSheetHeader,{className:"k-text-center"},o.createElement("div",{className:"k-actionsheet-titlebar-group k-hbox"},o.createElement("div",{className:"k-actionsheet-title"},o.createElement("div",null,n)),o.createElement("div",{className:"k-actionsheet-actions"},o.createElement(Fe.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",onClick:this.handleWrapperClick,icon:"x",svgIcon:xe.xIcon}))),o.createElement("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter"},this.renderListFilter())),o.createElement(ge.ActionSheetContent,{className:"!k-overflow-hidden"},t&&o.createElement("div",{className:"k-list-header"},t),o.createElement("div",{className:d.classNames("k-list",{[`k-list-${Nt[s]||s}`]:s,"k-virtual-list":this.base.vs.enabled})},this.renderDefaultItem(),!p&&f&&c.length!==0&&o.createElement(We,{group:f,groupMode:"modern",render:u}),this.renderList()),e&&o.createElement("div",{className:"k-list-footer"},e)))}getFocusedIndex(){const i=this.value,{data:t=[],textField:e,dataItemKey:s,virtual:n={skip:0},focusedItemIndex:a=_e,filterable:u,skipDisabledItems:p=!0}=this.props,c=this.props.filter?this.props.filter:this.state.text;return p&&e&&!c&&!i?t.findIndex(r=>!r.disabled&&r[e]):G(i)&&c===void 0||u&&c===""?t.findIndex(r=>_(r,i,s)):c?this._lastKeypressIsFilter?a(t,c,e):t.findIndex(r=>_(r,i,s)):n.skip===0?0:-1}focusElement(i){this._skipFocusEvent=!0,i.focus(),window.setTimeout(()=>this._skipFocusEvent=!1,30)}triggerOnChange(i,t){_(this.value,i,this.props.dataItemKey)||(this.props.value===void 0&&(t.data.value=i),this._valueDuringOnChange=i,t.events.push({type:"onChange"}))}applyState(i){this.base.applyState(i),this._valueDuringOnChange=void 0}calculateMedia(i){for(const t of i)this.setState({windowWidth:t.target.clientWidth})}resetValueIfDisabledItem(){const{data:i=[]}=this.props,t=this.base.initState(),e=this.getFocusedIndex();this.haveFocusedItemAndDataNotEmpty(i,e)&&(this.triggerOnChange(null,t),this.applyState(t))}haveFocusedItemAndDataNotEmpty(i,t){return t!==void 0&&t!==-1&&i&&i.length>0&&i[t].disabled}};let Ge=Bt;Ge.displayName="DropDownList";Ge.propTypes={delay:l.number,ignoreCase:l.bool,iconClassName:l.string,svgIcon:d.svgIconPropType,defaultItem:l.any,valueRender:l.func,valueMap:l.func,validationMessage:l.string,required:l.bool,id:l.string,ariaLabelledBy:l.string,ariaDescribedBy:l.string,ariaLabel:l.string,leftRightKeysNavigation:l.bool,title:l.string,groupField:l.string,list:l.any,skipDisabledItems:l.bool,...oe.propTypes};Ge.defaultProps={delay:500,tabIndex:0,ignoreCase:!0,...oe.defaultProps,required:!1,size:"medium",rounded:"medium",fillMode:"solid",groupMode:"modern"};const os=d.createPropsContext(),as=d.withIdHOC(d.withPropsContext(os,Ge));as.displayName="KendoReactDropDownList";class kt extends o.Component{constructor(){super(...arguments),this._input=null}get input(){return this._input}componentDidUpdate(t){const e=t.value,s=t.suggestedText,{value:n,suggestedText:a,focused:u}=this.props,p=this.input,c=e!==n||a!==s,r=c&&e.startsWith(n)&&!(s&&a&&s.endsWith(a)),h=d.getActiveElement(document);u&&p&&h!==p&&p.focus(),a&&c&&!r&&p&&p.setSelectionRange(n.length-a.length,n.length)}render(){const{expanded:t=!1,disabled:e,role:s="listbox",render:n}=this.props,a=o.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:"k-input-inner",tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:u=>this._input=u,onKeyDown:this.props.onKeyDown,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onClick:this.props.onClick,"aria-disabled":e||void 0,disabled:e||void 0,readOnly:this.props.readOnly||void 0,title:this.props.title,"aria-haspopup":"listbox","aria-expanded":t,"aria-owns":this.props.owns,"aria-activedescendant":t?this.props.activedescendant:void 0,"aria-describedby":this.props.ariaDescribedBy,"aria-labelledby":this.props.ariaLabelledBy,"aria-required":this.props.ariaRequired});return n?n.call(void 0,a):a}}class nt extends o.Component{constructor(){super(...arguments),this.onMouseDown=t=>t.preventDefault()}render(){const t=ke.provideLocalizationService(this).toLanguageString(et,ne[et]);return o.createElement("span",{className:"k-clear-value",role:"button",onClick:this.props.onClick,onMouseDown:this.onMouseDown,tabIndex:-1,title:t,key:"clearbutton"},o.createElement(d.IconWrap,{name:"x",icon:xe.xIcon}))}}ke.registerForLocalization(nt);const Os=d.useCustomComponent,Ke=Os,_s="Please enter a valid value!",{sizeMap:mt,roundedMap:Rs}=d.kendoThemeMaps,bt=class extends o.Component{constructor(i){super(i),this.state={},this.base=new oe(this),this._element=null,this._suggested="",this._skipBlur=!1,this._input=null,this._adaptiveFilterInput=null,this.itemHeight=0,this.focus=()=>{this._input&&this._input.focus()},this.handleItemSelect=(t,e)=>{const{data:s=[],virtual:n,dataItemKey:a}=this.props,u=n?n.skip:0,p=s[t-u],c=!_(p,this.value,a);this.triggerOnChange(p,e),this.state.text!==void 0&&(e.data.text=void 0),c&&this.base.triggerPageChangeCornerItems(p,e)},this.onPopupOpened=()=>{setTimeout(()=>{this.mobileMode&&this._adaptiveFilterInput&&(this._skipBlur=!0,this._adaptiveFilterInput.focus(),this._skipBlur=!1)},300)},this.componentRef=t=>{this._element=t,this.base.wrapper=t},this.toggleBtnClick=t=>{const{data:e=[],skipDisabledItems:s,textField:n}=this.props,a=this.getFocusedIndex(),u=this.getCurrentValueDisabledStatus(n,e,a),p=this.props.opened!==void 0?this.props.opened:this.state.opened,c=this.base.initState();if(c.syntheticEvent=t,!s&&n&&u&&this.clearValueOnToggleBtnClick(t),this.base.togglePopup(c),!p&&this.mobileMode){const r=this.props.adaptiveFilter!==void 0?this.props.adaptiveFilter:this.state.text||null;this.base.filterChanged(r,c)}this.applyState(c)},this.renderMobileListFilter=()=>{const t=this.props.adaptiveFilter!==void 0?this.props.adaptiveFilter:this.state.text,e=R(this.value,this.props.textField),s=G(t)?t:e;return o.createElement(Me,{value:s,ref:n=>this._adaptiveFilterInput=n&&n.element,onChange:this.handleMobileFilterChange,onKeyDown:this.onInputKeyDown,size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode})},this.handleMobileFilterChange=t=>{const e=this.base.initState();e.syntheticEvent=t.syntheticEvent,e.data.text=t.target.value,this.base.filterChanged(t.target.value,e),this.applyState(e)},this.onScroll=t=>{const{vs:e,list:s}=this.base;e.scrollHandler(t);const{groupField:n}=this.props;let{data:a=[]}=this.props;if(!n||!a.length)return;const u=this.itemHeight=this.itemHeight||(e.enabled?e.itemHeight:s?s.children[0].offsetHeight:0),c=t.target.scrollTop-e.skip*u;this.props.groupMode==="modern"&&(a=this.base.getGroupedDataModernMode(a,n));let r=a[0][n];for(let h=1;h<a.length&&!(u*h>c);h++)a[h]&&a[h][n]&&(r=a[h][n]);r!==this.state.group&&(this.setState({group:r}),this.props.onGroupScroll&&this.props.onGroupScroll.call(void 0,{group:r}))},this.handleItemClick=(t,e)=>{this.base.handleItemClick(t,e),this._valueDuringOnChange=void 0},this.handleBlur=t=>{if(this.state.focused&&!this._skipBlur){const e=this.base.initState(),{textField:s,data:n=[]}=this.props,a=this.getFocusedIndex(),p=!(a===-1)&&this.getCurrentValueDisabledStatus(s,n,a);e.data.focused=!1,e.events.push({type:"onBlur"}),e.syntheticEvent=t,s&&p&&this.clearValueOnBlur(t),this.applyValueOnRejectSuggestions(t.currentTarget.value,e)}},this.onInputClick=t=>{const e=this.props.opened!==void 0?this.props.opened:this.state.opened,s=this.props.adaptiveFilter!==void 0?this.props.adaptiveFilter:this.state.text||null;if(!e&&this.mobileMode){const n=this.base.initState();n.syntheticEvent=t,this.base.togglePopup(n),this.base.filterChanged(s,n),this.applyState(n)}},this.onInputKeyDown=t=>{const{data:e=[],skipDisabledItems:s,textField:n,dataItemKey:a,groupField:u}=this.props,p=this.value,c=Math.max(0,e.findIndex(w=>_(w,p,a))),r=t.keyCode,h=this.props.opened!==void 0?this.props.opened:this.state.opened,f=this.base.initState();if(f.syntheticEvent=t,!t.altKey&&(r===d.Keys.up||r===d.Keys.down)){if(t.preventDefault(),u!==""&&n)if(!this.props.skipDisabledItems&&h)this.onNavigate(f,r);else{let w=0;if(r===d.Keys.down||r===d.Keys.right){const k=e.slice(c+1<e.length?c+1:c).find(D=>!D.disabled&&D[n]);w=k&&e.findIndex(D=>D[n]===k[n])}else if(r===d.Keys.up||r===d.Keys.left){let k;if(c===0)k=e,w=e.findIndex(D=>!D.disabled&&D[n]);else{k=e.slice(0,c);let D=k.pop();for(;D&&D.disabled;)D=k.pop();w=D&&e.findIndex(N=>N[n]===D[n])}}if(w!==void 0){const k=w-c;this.onNavigate(f,r,k)}else w===void 0&&e.findIndex(k=>k[n]===p[n])===e.length-1&&this.onNavigate(f,r)}else if(!this.props.skipDisabledItems&&h)this.onNavigate(f,r);else{let w=null;if(r===d.Keys.down||r===d.Keys.right)w=e.slice(c+1).find(k=>!k.disabled);else if(r===d.Keys.up||r===d.Keys.left){const k=e.slice(0,c);for(w=k.pop();w&&w.disabled;)w=k.pop()}if(w){const k=w.id-c-1;this.onNavigate(f,r,k)}else this.onNavigate(f,r)}this.applyState(f)}const g=()=>{t.preventDefault(),this.base.togglePopup(f),this.applyState(f)},m=this.getFocusedIndex(),v=m===-1,b=!v&&this.getCurrentValueDisabledStatus(n,e,m);h?r===d.Keys.pageUp?this.base.scrollPopupByPageSize(-1):r===d.Keys.pageDown?this.base.scrollPopupByPageSize(1):t.altKey&&r===d.Keys.up?g():r===d.Keys.enter?(t.preventDefault(),(n&&!v&&t.currentTarget.value?e[m][n]:void 0)?!s&&n&&b?this.clearValueOnEnterOrEsc(t):b||this.applyValueOnEnter(t.currentTarget.value,f):this.applyValueOnEnter(t.currentTarget.value,f)):r===d.Keys.esc&&(!s&&n&&b&&this.clearValueOnEnterOrEsc(t),this.applyValueOnRejectSuggestions(t.currentTarget.value,f)):!h&&r===d.Keys.esc?this.clearValueOnEnterOrEsc(t):t.altKey&&r===d.Keys.down&&g()},this.inputOnChange=t=>{const e=this.base.initState();e.syntheticEvent=t;const s=this.props.opened!==void 0?this.props.opened:this.state.opened,n=t.currentTarget,a=n.value;if(this.props.suggest){const u=n.selectionEnd===a.length;let p=this.props.filter!==void 0?this.props.filter:this.state.text;G(p)||(p=R(this.value,this.props.textField)||"");const c=p&&p===a,r=p&&p.length>a.length;c||r||!u?this._suggested="":this.suggestValue(a)}this.props.filter===void 0&&(e.data.text=a),this.state.focusedItem!==void 0&&(e.data.focusedItem=void 0),s||this.base.togglePopup(e),this.base.filterChanged(a,e),this.applyState(e),this.setState({group:void 0})},this.clearButtonClick=t=>{const e=this.base.initState();e.syntheticEvent=t,t.stopPropagation(),this.clearValue()},this.clearValueOnEnterOrEsc=t=>{const e=this.base.initState();e.syntheticEvent=t,t.stopPropagation(),this.clearValue()},this.clearValueOnBlur=t=>{const e=this.base.initState();e.syntheticEvent=t,t.stopPropagation(),this.clearValue()},this.clearValueOnToggleBtnClick=t=>{const e=this.base.initState();e.syntheticEvent=t,t.stopPropagation(),this.clearValue()},this.setValidity=()=>{this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity.valid?"":this.props.validationMessage||_s)},d.validatePackage($e)}get _inputId(){return this.props.id}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=De&&this.props.adaptive)}get value(){if(this._valueDuringOnChange!==void 0)return this._valueDuringOnChange;if(this.props.value!==void 0)return this.props.value;if(this.state.value!==void 0)return this.state.value;if(this.props.defaultValue!==void 0)return this.props.defaultValue}get index(){const{data:i=[],dataItemKey:t}=this.props,e=this.value;return i.findIndex(s=>_(s,e,t))}get name(){return this.props.name}get validity(){const i=this.props.validationMessage!==void 0,t=!this.required||this.value!==null&&this.value!==""&&this.value!==void 0,e=this.props.valid!==void 0?this.props.valid:t;return{customError:i,valid:e,valueMissing:this.value===null}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:bt.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:bt.defaultProps.required}componentDidUpdate(i,t){var g;const{dataItemKey:e,virtual:s,groupField:n="",data:a=[],textField:u}=this.props,p=i.virtual?i.virtual.total:0,c=this.props.opened!==void 0?this.props.opened:this.state.opened,r=i.opened!==void 0?i.opened:t.opened,h=!r&&c,f=this.value;if(this._valueOnDidUpdate=f,s&&s.total!==p)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{const m=i.value!==void 0?i.value:t.value;let v=a.findIndex(w=>_(w,f,e));this.props.groupMode==="modern"&&u&&f&&(v=(g=this.base.getGroupedDataModernMode(a,n))==null?void 0:g.map(w=>w[u]).indexOf(f[u]));const b=!_(m,f,e);h&&s?this.base.scrollToVirtualItem(s,v):h&&!s?(this.onPopupOpened(),a&&a.length!==0&&this.base.resetGroupStickyHeader(a[0][n],this),this.base.scrollToItem(v)):c&&r&&f&&b&&this.base.scrollToItem(v)}h&&this._input&&this._input.focus(),this.setValidity()}componentDidMount(){var i;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.base.didMount(),this.setValidity(),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentWillUnmount(){var i;(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const i=ke.provideLocalizationService(this).toLanguageString(Ot,ne[Ot]),t=ke.provideLocalizationService(this).toLanguageString(_t,ne[_t]),{dir:e,disabled:s,clearButton:n=bt.defaultProps.clearButton,label:a,textField:u,adaptive:p,className:c,style:r,loading:h,iconClassName:f,virtual:g,size:m,rounded:v,fillMode:b,opened:w=this.state.opened,placeholder:k,svgIcon:D}=this.props,{windowWidth:N=0}=this.state,K=!this.validityStyles||this.validity.valid,O=this.props.filter!==void 0?this.props.filter:this.state.text,S=R(this.value,u),F=G(O)?O:S,x=n&&(!!F||G(this.value)),M=this.base.vs,H=this.props.id||this._inputId,U=N<=De&&p;M.enabled=g!==void 0,g!==void 0&&(M.skip=g.skip,M.total=g.total,M.pageSize=g.pageSize);const[j,X]=Ke(this.props.prefix||o.Fragment),[B,be]=Ke(this.props.suffix||o.Fragment),Q=o.createElement(o.Fragment,null,o.createElement("span",{className:d.classNames("k-combobox k-input",{[`k-input-${mt[m]||m}`]:m,[`k-rounded-${Rs[v]||v}`]:v,[`k-input-${b}`]:b,"k-invalid":!K,"k-loading":h,"k-required":this.required,"k-disabled":s},c),ref:this.componentRef,style:a?{...r,width:void 0}:r,dir:e},this.props.prefix&&o.createElement(j,{...X}),this.renderSearchBar(F||"",H,k),x&&!h&&o.createElement(nt,{onClick:this.clearButtonClick,key:"clearbutton"}),h&&o.createElement(d.IconWrap,{className:"k-input-loading-icon",name:"loading",key:"loading"}),this.props.suffix&&o.createElement(B,{...be}),o.createElement(Fe.Button,{tabIndex:-1,type:"button","aria-label":w?t:i,icon:f?void 0:"caret-alt-down",svgIcon:D||xe.caretAltDownIcon,iconClass:f,size:m,fillMode:b,rounded:null,themeColor:"base",className:"k-input-button",onClick:this.toggleBtnClick,onMouseDown:J=>J.preventDefault()}),!U&&this.renderListContainer()),U&&this.renderAdaptiveListContainer());return a?o.createElement(qe.FloatingLabel,{label:a,editorId:H,editorValue:F,editorValid:K,editorDisabled:s,style:{width:r?r.width:void 0},children:Q}):Q}onNavigate(i,t,e){const{data:s=[],virtual:n={skip:0}}=this.props,a=this.props.filter?this.props.filter:this.state.text,u=this.getFocusedIndex(),p=this.base.vs,c=this.value;if(this._suggested="",u!==-1&&!G(c))this.handleItemSelect(u,i);else if(a==="")this.handleItemSelect(0,i);else{const r=n.skip+u,h=this.base.navigation.navigate({keyCode:t,current:r,max:(p.enabled?p.total:s.length)-1,min:0,skipItems:e||void 0});h!==void 0&&this.handleItemSelect(h,i)}}getCurrentValueDisabledStatus(i,t,e){return i&&t&&t[e]&&t[e].disabled}applyValueOnEnter(i,t){const{data:e=[],textField:s,allowCustom:n}=this.props,a=this.props.opened!==void 0?this.props.opened:this.state.opened,p=R(this.value,s)===i?this.index:Pt(e,i,s),c=p!==-1;let r;if(this._suggested="",c)r=e[p];else if(n)r=s!==void 0?{[s]:i}:i;else return this.selectFocusedItem(i,t);this.triggerOnChange(r,t),a&&this.base.togglePopup(t),this.props.filter===void 0&&this.state.text!==void 0&&(t.data.text=void 0),this.applyState(t)}applyValueOnRejectSuggestions(i,t){const{data:e=[],textField:s,allowCustom:n}=this.props,a=this.props.opened!==void 0?this.props.opened:this.state.opened,u=R(this.value,s),p=this.state.windowWidth&&this.state.windowWidth<=De;if(this._suggested="",i===u||i===""&&!G(u))return a&&!p&&this.base.togglePopup(t),this.applyState(t);const c=Pt(e,i,s,!0),r=c!==-1;let h=null;r?h=e[c]:n&&(h=i?s?{[s]:i}:i:null),this.triggerOnChange(h,t),this.state.text!==void 0&&(t.data.text=void 0,this.base.filterChanged("",t)),a&&!p&&this.base.togglePopup(t),this.applyState(t)}selectFocusedItem(i,t){const e=this.props.opened!==void 0?this.props.opened:this.state.opened,{data:s=[],textField:n,virtual:a={skip:0},focusedItemIndex:u=_e}=this.props,p=a.skip,c=i===""&&p===0?0:u(s,i,n);return c!==-1?this.handleItemSelect(c+p,t):(this.triggerOnChange(null,t),this.state.text!==void 0&&(t.data.text=void 0)),e&&this.base.togglePopup(t),this.applyState(t)}renderAdaptiveListContainer(){const{windowWidth:i=0}=this.state,{header:t,footer:e,size:s,data:n=[],groupField:a,groupMode:u,list:p,virtual:c,adaptiveTitle:r,groupStickyHeaderItemRender:h}=this.props,f=this.props.opened!==void 0?this.props.opened:this.state.opened;let{group:g}=this.state;g===void 0&&a!==void 0&&(g=R(n[0],a));const m={navigatable:!1,navigatableElements:[],expand:f,animation:!0,onClose:v=>this.toggleBtnClick(v),animationStyles:i<=Ct?{top:0,width:"100%",height:"100%"}:void 0,className:i<=Ct?"k-adaptive-actionsheet k-actionsheet-fullscreen":"k-adaptive-actionsheet k-actionsheet-bottom"};return o.createElement(ge.ActionSheet,{...m},o.createElement(ge.ActionSheetHeader,{className:"k-text-center"},o.createElement("div",{className:"k-actionsheet-titlebar-group k-hbox"},o.createElement("div",{className:"k-actionsheet-title"},o.createElement("div",null,r)),o.createElement("div",{className:"k-actionsheet-actions"},o.createElement(Fe.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",onClick:this.toggleBtnClick,icon:"x",svgIcon:xe.xIcon}))),o.createElement("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter"},this.renderMobileListFilter())),o.createElement(ge.ActionSheetContent,{className:"!k-overflow-hidden"},o.createElement("div",{className:"k-list-container"},o.createElement("div",{className:d.classNames({"k-list":!p,"k-list-lg":!0,"k-virtual-list":c,"k-data-table":p,[`k-table-${mt[s]||s}`]:p&&s})},t&&o.createElement("div",{className:"k-table-header"},t),!p&&g&&n.length!==0&&o.createElement(We,{group:g,groupMode:u,render:h}),this.renderList(),e&&o.createElement("div",{className:"k-list-footer"},e)))))}renderListContainer(){const i=this.base,{dir:t,header:e,footer:s,data:n=[],groupField:a,groupMode:u,size:p,list:c,virtual:r,groupStickyHeaderItemRender:h}=this.props,f=this.props.opened!==void 0?this.props.opened:this.state.opened,g=i.getPopupSettings(),m=g.width!==void 0?g.width:i.popupWidth;let{group:v}=this.state;return v===void 0&&a!==void 0&&(v=R(n[0],a)),o.createElement(it,{width:m,popupSettings:{...g,anchor:g.anchor||this.element,show:f,popupClass:d.classNames(g.popupClass,"k-list-container","k-combobox-popup")},dir:t!==void 0?t:this.base.dirCalculated,itemsCount:[n.length]},o.createElement("div",{className:d.classNames({"k-list":!c,[`k-list-${mt[p]||p}`]:!c&&p,"k-virtual-list":r,"k-data-table":c,[`k-table-${mt[p]||p}`]:c&&p})},e&&o.createElement("div",{className:"k-table-header"},e),!c&&v&&n.length!==0&&o.createElement(We,{group:v,groupMode:u,render:h}),this.renderList(),s&&o.createElement("div",{className:d.classNames({"k-list-footer":!this.props.footerClassName},this.props.footerClassName)},s)))}renderList(){const i=this.base,{textField:t,dataItemKey:e,listNoDataRender:s,itemRender:n,groupHeaderItemRender:a,data:u=[],virtual:p={skip:0,total:void 0}}=this.props,c=i.getPopupSettings(),r=i.vs,h=p.skip,f=this.props.opened!==void 0?this.props.opened:this.state.opened,g=`translateY(${r.translate}px)`,m=f?this.getFocusedIndex():void 0,v=this.props.filter!==void 0?this.props.filter:this.state.text,b=R(this.value,t),w=G(v)&&v!==b?null:this.value,k=this.props.list||Re;return o.createElement(k,{id:i.listBoxId,virtual:!!p,show:f,data:u,focusedIndex:m,value:w,textField:t,valueField:e,groupField:this.props.groupField,groupMode:this.props.groupMode,isMultiColumn:this.props.isMultiColumn,optionsGuid:i.guid,listRef:D=>{r.list=this.base.list=D,this.itemHeight=0},wrapperStyle:this.state.windowWidth&&this.state.windowWidth>De?{maxHeight:c.height}:{},wrapperCssClass:d.classNames("k-list-content",{"k-list-scroller":!p}),listStyle:r.enabled?{transform:g}:void 0,key:"listkey",skip:h,onClick:this.handleItemClick,itemRender:n,groupHeaderItemRender:a,noDataRender:s,onMouseDown:D=>D.preventDefault(),onScroll:this.onScroll,wrapperRef:r.scrollerRef,scroller:this.base.renderScrollElement(),ariaSetSize:p.total})}renderSearchBar(i,t,e){const{tabIndex:s,disabled:n,data:a=[],dataItemKey:u,virtual:p={skip:0}}=this.props,c=this.props.opened!==void 0?this.props.opened:this.state.opened,r=this.value,h=Math.max(0,a.findIndex(f=>_(f,r,u)));return this._suggested&&!_(this._valueOnDidUpdate,r,u)&&(this._suggested=""),o.createElement(kt,{id:t,readOnly:c&&this.mobileMode,placeholder:e,tabIndex:s,title:this.props.title,accessKey:this.props.accessKey,value:i+this._suggested,suggestedText:this._suggested,ref:f=>this._input=f&&f.input,onClick:this.onInputClick,onKeyDown:this.onInputKeyDown,onChange:this.inputOnChange,onFocus:this.base.handleFocus,onBlur:this.handleBlur,disabled:n,expanded:c,owns:this.base.listBoxId,activedescendant:`option-${this.base.guid}-${h+p.skip}`,role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,ariaRequired:this.required,render:this.props.valueRender})}clearValue(){const i=this.base.initState();this._suggested="",this.base.filterChanged("",i),this.props.filter===void 0&&this.state.text!==void 0&&(i.data.text=void 0),this.triggerOnChange(null,i);const t=this.props.opened!==void 0?this.props.opened:this.state.opened,e=this.mobileMode;t&&!e&&this.base.togglePopup(i),this.applyState(i)}triggerOnChange(i,t){const e=this.value;!G(e)&&!G(i)||_(e,i,this.props.dataItemKey)||(this.props.value===void 0&&(t.data.value=i),this._valueDuringOnChange=i,t.events.push({type:"onChange"}))}getFocusedIndex(){const i=this.value,{data:t=[],textField:e,dataItemKey:s,virtual:n={skip:0},focusedItemIndex:a=_e,skipDisabledItems:u}=this.props,p=this.props.filter?this.props.filter:this.state.text;return G(i)&&p===void 0?t.findIndex(c=>_(c,i,s)):p?a(t,p,e):u&&e&&!p&&n.skip===0?t.findIndex(c=>!c.disabled&&c[e]):n.skip===0?0:-1}suggestValue(i){const{data:t,textField:e}=this.props;this._suggested=Ss(i,t,e)}applyState(i){this.base.applyState(i),this._valueDuringOnChange=void 0}calculateMedia(i){for(const t of i)this.setState({windowWidth:t.target.clientWidth})}};let Ue=bt;Ue.displayName="ComboBox";Ue.propTypes={...oe.propTypes,size:l.oneOf([null,"small","medium","large"]),rounded:l.oneOf([null,"small","medium","large","full"]),fillMode:l.oneOf([null,"solid","flat","outline"]),dataItemKey:l.string,groupField:l.string,groupMode:l.oneOf([void 0,"classic","modern"]),isMultiColumn:l.bool,suggest:l.bool,placeholder:l.string,title:l.string,allowCustom:l.bool,clearButton:l.bool,iconClassName:l.string,svgIcon:d.svgIconPropType,validationMessage:l.string,required:l.bool,id:l.string,ariaLabelledBy:l.string,ariaDescribedBy:l.string,list:l.any,valueRender:l.func,skipDisabledItems:l.bool};Ue.defaultProps={...oe.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};const ls=d.createPropsContext(),At=d.withIdHOC(d.withPropsContext(ls,Ue));At.displayName="KendoReactComboBox";const Bs="Please enter a valid value!",{sizeMap:Jt,roundedMap:Ls}=d.kendoThemeMaps,Lt=class extends o.Component{constructor(i){super(i),this.state={},this.base=new oe(this),this._element=null,this._suggested="",this._input=null,this._isScrolling=!1,this.itemHeight=0,this.focus=()=>{this._input&&this._input.focus()},this.handleItemSelect=(t,e)=>{const{data:s=[]}=this.props,n=R(s[t],this.props.textField);this.triggerOnChange(n,e)},this.itemFocus=(t,e)=>{const{data:s=[],textField:n}=this.props,a=s[t];_(this.state.focusedItem,a,n)||(e.data.focusedItem=a)},this.togglePopup=t=>{this.base.togglePopup(t)},this.setValidity=()=>{this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity.valid?"":this.props.validationMessage||Bs)},this.onScroll=t=>{this._isScrolling=!0;const{list:e}=this.base,{groupField:s}=this.props;let{data:n=[]}=this.props;if(!s||!n.length)return;const a=this.itemHeight||(e?e.children[0].offsetHeight:0),p=t.target.scrollTop;s&&(n=this.base.getGroupedDataModernMode(n,s));let c=n[0][s];for(let r=1;r<n.length&&!(a*r>p);r++)n[r]&&n[r][s]&&(c=n[r][s]);c!==this.state.group&&this.setState({group:c})},this.handleItemClick=(t,e)=>{this.base.handleItemClick(t,e),this._valueDuringOnChange=void 0},this.onChangeHandler=t=>{const s=this.base.initState(),n=t.currentTarget,a=n.value,u=n.selectionEnd===a.length;s.syntheticEvent=t;const p=this._suggested,c=this.value,r=c&&c.substring(0,c.length-p.length),h=r&&r===a,f=r&&r.length>a.length,{suggest:g}=this.props,m=this.props.opened!==void 0?this.props.opened:this.state.opened;if(g!==void 0&&g!==!1){h||f||!u?this._suggested="":this.suggestValue(a);const v=a+this._suggested,b={userInput:a,value:this._suggested};this.triggerOnChange(v,s,{suggestion:b})}else this._suggested="",this.triggerOnChange(a,s);(!m&&a||m&&!a)&&this.togglePopup(s),s.data.focusedItem=void 0,this.applyState(s),this.setState({group:void 0})},this.clearButtonClick=t=>{const s=this.base.initState(),n=this.props.opened!==void 0?this.props.opened:this.state.opened;s.syntheticEvent=t;const a="";this._suggested="",this.triggerOnChange(a,s),this.state.focusedItem!==void 0&&(s.data.focusedItem=void 0),n&&this.togglePopup(s),this.applyState(s)},this.onInputKeyDown=t=>{const{data:e=[],skipDisabledItems:s,groupField:n,textField:a}=this.props;this._isScrolling&&(this._isScrolling=!1);const u=this.focusedIndex(),p=e[u],c=t.keyCode,r=t.altKey,h=this.props.opened!==void 0?this.props.opened:this.state.opened,f=this.base.initState();f.syntheticEvent=t;const g=()=>{h&&t.preventDefault()};if(r&&c===d.Keys.down)this.setState({opened:!0});else if(r&&c===d.Keys.up)this.setState({opened:!1});else if(h&&c===d.Keys.pageUp)this.base.scrollPopupByPageSize(-1);else if(h&&c===d.Keys.pageDown)this.base.scrollPopupByPageSize(1);else if(h&&(c===d.Keys.enter||c===d.Keys.esc))g(),s===!1&&p&&p.disabled?(h&&this.togglePopup(f),this.applyState(f)):this.applyInputValue(t.currentTarget.value,f,t.keyCode);else if(!h&&c===d.Keys.esc){const m="";this._suggested="",this.triggerOnChange(m,f),this.state.focusedItem!==void 0&&(f.data.focusedItem=void 0),this.applyState(f)}else if(c===d.Keys.up||c===d.Keys.down){if(n!==""&&a)if(!this.props.skipDisabledItems&&h)this.onNavigate(f,c);else{let m=0;if(c===d.Keys.down||c===d.Keys.right){const v=e.slice(u+1).find(b=>!b.disabled&&b[a]);m=v&&e.findIndex(b=>b[a]===v[a])}else if(c===d.Keys.up||c===d.Keys.left){let v;if(u===-1)v=e,m=e.findIndex(b=>!b.disabled&&b[a]);else{v=e.slice(0,u);let b=v.pop();for(;b&&b.disabled;)b=v.pop();m=b&&e.findIndex(w=>w[a]===b[a])}}if(m!==void 0){const v=m-u;this.onNavigate(f,c,v)}else m===void 0&&e.findIndex(v=>v[a])===e.length-1&&this.onNavigate(f,c)}else if(!this.props.skipDisabledItems&&h)this.onNavigate(f,c);else{let m=null;if(c===d.Keys.down||c===d.Keys.right)m=e.slice(u+1).find(v=>!v.disabled);else if(c===d.Keys.up||c===d.Keys.left){const v=e.slice(0,u);for(m=v.pop();m&&m.disabled;)m=v.pop()}if(m){const v=m.id-u-1;this.onNavigate(f,c,v)}else this.onNavigate(f,c)}this.applyState(f),g()}},this.handleBlur=t=>{if(this.state.focused){const e=this.base.initState();e.data.focused=!1,e.events.push({type:"onBlur"}),e.syntheticEvent=t,this.applyInputValue(t.currentTarget.value,e)}},d.validatePackage($e)}get _inputId(){return this.props.id+"-accessibility-id"}get element(){return this._element}get value(){return this._valueDuringOnChange!==void 0?this._valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value!==void 0?this.state.value:this.props.defaultValue!==void 0?this.props.defaultValue:""}get name(){return this.props.name}get validity(){const i=this.props.validationMessage!==void 0,t=!this.required||this.value!=="",e=this.props.valid!==void 0?this.props.valid:t;return{customError:i,valid:e,valueMissing:this.value===null}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:Lt.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:Lt.defaultProps.required}componentDidUpdate(i,t){var g;const{groupField:e="",data:s=[]}=this.props,{data:n=[]}=i,a=this.focusedIndex(),u=s[a],p=n!==s,c=u!==void 0&&t.focusedItem!==u,r=this.props.opened!==void 0?this.props.opened:this.state.opened,h=i.opened!==void 0?i.opened:t.opened,f=!h&&r;if(e==="")(r&&(c||p)||f)&&this.base.scrollToItem(a);else if(!this._isScrolling){let m=(g=this.base.getGroupedDataModernMode(s,e))==null?void 0:g.indexOf(u);f&&(s&&s.length!==0&&this.base.resetGroupStickyHeader(s[0][e],this),this.base.scrollToItem(m)),r&&h&&c&&this.base.scrollToItem(m)}this.setValidity()}componentDidMount(){this.base.didMount(),this.setValidity()}render(){const{dir:i,disabled:t,label:e,className:s,style:n,loading:a,suggest:u,size:p,rounded:c,fillMode:r}=this.props,h=!this.validityStyles||this.validity.valid,f=this.base,g=this.value,m=this.props.clearButton!==!1&&!a&&!!g,v=this.props.id||this._inputId;typeof u=="string"&&(this._suggested=u);const[b,w]=Ke(this.props.prefix||o.Fragment),[k,D]=Ke(this.props.suffix||o.Fragment),N=o.createElement("span",{className:d.classNames("k-autocomplete k-input",s,{[`k-input-${Jt[p]||p}`]:p,[`k-rounded-${Ls[c]||c}`]:c,[`k-input-${r}`]:r,"k-invalid":!h,"k-loading":a,"k-required":this.required,"k-disabled":t}),ref:K=>{this._element=K,f.wrapper=K},style:e?{...n,width:void 0}:n,dir:i},this.props.prefix&&o.createElement(b,{...w}),this.renderSearchBar(g||"",v),a&&o.createElement(d.IconWrap,{className:"k-input-loading-icon",name:"loading"}),m&&!a&&o.createElement(nt,{onClick:this.clearButtonClick,key:"clearbutton"}),this.props.suffix&&o.createElement(k,{...D}),this.renderListContainer());return e?o.createElement(qe.FloatingLabel,{label:e,editorId:v,editorValue:g,editorValid:h,editorDisabled:t,style:{width:n?n.width:void 0},children:N}):N}onNavigate(i,t,e){const s=this.value,{data:n=[],textField:a,focusedItemIndex:u}=this.props,p=this.state.focusedItem!==void 0?n.findIndex(r=>_(r,this.state.focusedItem,a)):u?u(n,s,a):n.indexOf(Yt(n,s,a)),c=this.base.navigation.navigate({keyCode:t,current:p,max:n.length-1,min:0,skipItems:e||void 0});c!==void 0&&this.itemFocus(c,i),this.applyState(i)}applyInputValue(i,t,e){const s=this.props.opened!==void 0?this.props.opened:this.state.opened,{data:n=[],textField:a}=this.props,u=this.focusedIndex(),p=n[u];if(this._suggested="",s&&e===d.Keys.enter&&p&&!p.disabled){const c=R(n[this.focusedIndex(i)],a);this.triggerOnChange(c,t)}s&&this.togglePopup(t),this.applyState(t)}renderSearchBar(i,t){const e=this.base,{placeholder:s,tabIndex:n,disabled:a,readonly:u}=this.props,{focused:p}=this.state,c=this.props.opened!==void 0?this.props.opened:this.state.opened;return o.createElement(kt,{id:t,placeholder:s,tabIndex:n,accessKey:this.props.accessKey,value:i,suggestedText:this._suggested,focused:p,name:this.props.name,ref:r=>this._input=r&&r.input,onKeyDown:this.onInputKeyDown,onChange:this.onChangeHandler,onFocus:e.handleFocus,onBlur:this.handleBlur,disabled:a,readOnly:u,expanded:c,owns:e.listBoxId,activedescendant:"option-"+e.guid+"-"+this.focusedIndex(),role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,ariaRequired:this.required,render:this.props.valueRender})}renderListContainer(){const i=this.base,{dir:t,header:e,footer:s,data:n=[],size:a,groupField:u,list:p,groupStickyHeaderItemRender:c}=this.props,r=i.getPopupSettings(),h=this.props.opened!==void 0?this.props.opened:this.state.opened,f=r.width!==void 0?r.width:i.popupWidth;let{group:g}=this.state;return g===void 0&&u!==void 0&&(g=R(n[0],u)),o.createElement(it,{width:f,popupSettings:{...r,anchor:r.anchor||this.element,show:h,popupClass:d.classNames(r.popupClass,"k-list-container","k-autocomplete-popup")},dir:t!==void 0?t:this.base.dirCalculated,itemsCount:[n.length]},e&&o.createElement("div",{className:"k-list-header"},e),o.createElement("div",{className:d.classNames("k-list",{[`k-list-${Jt[a]||a}`]:a})},!p&&g&&n.length!==0&&o.createElement(We,{group:g,groupMode:"modern",render:c}),this.renderList()),s&&o.createElement("div",{className:"k-list-footer"},s))}renderList(){const i=this.base,t=i.getPopupSettings(),{textField:e,data:s=[],listNoDataRender:n,itemRender:a,groupHeaderItemRender:u}=this.props,p=this.value,c=this.props.opened!==void 0?this.props.opened:this.state.opened;return o.createElement(Re,{id:i.listBoxId,show:c,data:s.slice(),focusedIndex:this.focusedIndex(),value:p,textField:e,valueField:e,highlightSelected:!1,optionsGuid:i.guid,groupField:this.props.groupField,groupMode:"modern",listRef:r=>i.list=r,wrapperStyle:{maxHeight:t.height},wrapperCssClass:"k-list-content",onClick:this.handleItemClick,itemRender:a,groupHeaderItemRender:u,noDataRender:n,onMouseDown:r=>r.preventDefault(),onScroll:this.onScroll})}triggerOnChange(i,t,e){this.value===i&&!e||(t.data.value=i,this._valueDuringOnChange=i,t.events.push({type:"onChange",...e||{}}))}applyState(i){this.base.applyState(i),this._valueDuringOnChange=void 0}suggestValue(i){if(this._suggested="",i){const{data:t=[],textField:e}=this.props,s=t[_e(t,i,e)];if(s){const n=R(s,e);i.toLowerCase()!==n.toLowerCase()&&(this._suggested=n.substring(i.length))}}}focusedIndex(i){const{data:t=[],textField:e,focusedItemIndex:s,skipDisabledItems:n}=this.props,a=i!==void 0?i:this.value;if(this.state.focusedItem!==void 0)return t.findIndex(u=>_(u,this.state.focusedItem,e));if(s)return s(t,a,e);{const u=t.indexOf(Yt(t,a,e));return n&&e&&u===-1?t.findIndex(p=>!p.disabled&&p[e]):Math.max(0,u)}}};let ot=Lt;ot.displayName="AutoComplete";ot.propTypes={...oe.basicPropTypes,size:l.oneOf([null,"small","medium","large"]),rounded:l.oneOf([null,"small","medium","large","full"]),fillMode:l.oneOf([null,"solid","flat","outline"]),groupField:l.string,suggest:l.oneOfType([l.bool,l.string]),placeholder:l.string,value:l.string,defaultValue:l.string,validationMessage:l.string,required:l.bool,readonly:l.bool,clearButton:l.bool,valueRender:l.func,id:l.string,ariaLabelledBy:l.string,ariaDescribedBy:l.string,list:l.any,skipDisabledItems:l.bool};ot.defaultProps={...oe.defaultProps,size:"medium",rounded:"medium",fillMode:"solid",skipDisabledItems:!0,prefix:void 0,suffix:void 0};const rs=d.createPropsContext(),ds=d.withIdHOC(d.withPropsContext(rs,ot));ds.displayName="KendoReactAutoComplete";const Vs=i=>i.syntheticEvent.preventDefault(),zs=i=>i.syntheticEvent.stopPropagation();class Wt extends o.Component{render(){const{data:t,guid:e,focused:s,tagRender:n,tag:a,onTagDelete:u,size:p}=this.props;return o.createElement(o.Fragment,null,t.map((c,r)=>{const h=a?o.createElement(a,{key:c.text+r,tagData:c,guid:e,focusedTag:s,onTagDelete:u}):o.createElement(Fe.Chip,{id:`tag-${e}-${c.text.replace(/\s+/g,"-")}`,"aria-selected":!0,role:"option","aria-setsize":t.length,key:c.text+r,text:c.text,removable:!0,onRemove:f=>u.call(void 0,c.data,f.syntheticEvent),onMouseDown:Vs,onClick:zs,className:c===s?"k-focus":void 0,size:p});return n?n(c,h):h}),this.props.children)}}var Ze=(i=>(i[i.PopupList=0]="PopupList",i[i.TagsList=1]="TagsList",i))(Ze||{});const Qt=500,qt=i=>{const{footer:t,children:e,windowWidth:s=0,navigatable:n,navigatableElements:a,expand:u,animation:p,onClose:c,adaptiveTitle:r,mobileFilter:h}=i,f={navigatable:n||!1,navigatableElements:a||[],expand:u,animation:p!==!1,onClose:c,animationStyles:s<=Qt?{top:0,width:"100%",height:"100%"}:void 0,className:s<=Qt?"k-adaptive-actionsheet k-actionsheet-fullscreen":"k-adaptive-actionsheet k-actionsheet-bottom"};return o.createElement(ge.ActionSheet,{...f},o.createElement(ge.ActionSheetHeader,{className:"k-text-center"},o.createElement("div",{className:"k-actionsheet-titlebar-group k-hbox"},o.createElement("div",{className:"k-actionsheet-title"},o.createElement("div",null,r)),o.createElement("div",{className:"k-actionsheet-actions"},o.createElement(Fe.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",icon:"x",svgIcon:xe.xIcon,onClick:c}))),h&&o.createElement("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter"},h)),e,t&&o.createElement(ge.ActionSheetFooter,{className:"k-actions k-actions-stretched"},o.createElement(Fe.Button,{size:"large",tabIndex:0,"aria-label":t.cancelText,"aria-disabled":"false",type:"button",onClick:t.onCancel},t.cancelText),o.createElement(Fe.Button,{tabIndex:0,themeColor:"primary",size:"large","aria-label":t.applyText,"aria-disabled":"false",type:"button",onClick:t.onApply},t.applyText)))},{sizeMap:vt,roundedMap:Hs}=d.kendoThemeMaps,As="Please enter a valid value!",Xt=i=>i.preventDefault(),Zt=i=>i===2,Vt=class extends o.Component{constructor(i){super(i),this.state={activedescendant:Ze.PopupList,currentValue:[]},this._element=null,this._valueItemsDuringOnChange=null,this.base=new oe(this),this._tags=[],this._input=null,this._adaptiveInput=null,this._skipFocusEvent=!1,this._lastSelectedOrDeslectedItemIndex=null,this.itemHeight=0,this.scrollToFocused=!1,this.localization=null,this.focus=()=>{this._input&&this._input.focus()},this.handleItemSelect=(t,e)=>{const{data:s=[],dataItemKey:n,virtual:a}=this.props,u=a?a.skip:0,p=s[t-u],c=this.value.findIndex(f=>_(f,p,n));this._lastSelectedOrDeslectedItemIndex=s.findIndex(f=>_(f,p,n));let r=[];c!==-1?(r=this.value,r.splice(c,1)):r=[...this.value,p],(this.props.filter!==void 0?this.props.filter:this.state.text)&&!this.mobileMode&&(this.state.text&&(e.data.text=""),this.base.filterChanged("",e)),this._adaptiveInput&&this._adaptiveInput.blur(),this.state.focusedIndex!==void 0&&(e.data.focusedIndex=void 0),this.triggerOnChange(r,e),this.base.triggerPageChangeCornerItems(p,e)},this.onTagDelete=(t,e)=>{const s=this.base.initState();s.syntheticEvent=e,this.opened&&this.base.togglePopup(s),!this.state.focused&&!this.mobileMode&&(s.data.focused=!0,this.focus());const n=this.value;gt(n,t,this.props.dataItemKey),this.triggerOnChange(n,s),this.applyState(s)},this.itemFocus=(t,e)=>{const{data:s=[],allowCustom:n,virtual:a}=this.props,u=a?a.skip:0,p=this.props.filter!==void 0?this.props.filter:this.state.text,{focusedIndex:c}=this.getFocusedState(),r=n&&p,h=s[t-u];h&&c!==t?this.state.focusedIndex!==t&&(e.data.focusedIndex=t,e.data.activedescendant=Ze.PopupList):r&&t===-1&&this.state.focusedIndex!==void 0&&(e.data.focusedIndex=void 0),this.base.triggerPageChangeCornerItems(h,e)},this.componentRef=t=>{this._element=t,this.base.wrapper=t},this.searchbarRef=t=>{const e=this._input=t&&t.input;e&&this.state.focused&&window.setTimeout(()=>e.focus(),0)},this.onChangeHandler=t=>{const e=this.base.initState(),s=t.target.value;e.syntheticEvent=t,this.props.filter===void 0&&(e.data.text=s),e.data.focusedIndex=void 0,this.opened||(this.base.togglePopup(e),this.setState({currentValue:this.value})),this.base.filterChanged(s,e),this.applyState(e),this.setState({group:void 0})},this.clearButtonClick=t=>{const e=this.base.initState();e.syntheticEvent=t,t.stopPropagation(),this.value.length>0&&this.triggerOnChange([],e),this.state.focusedIndex!==void 0&&(e.data.focusedIndex=void 0),this.opened&&this.base.togglePopup(e);const s=this.props.filter!==void 0?this.props.filter:this.state.text;G(s)&&s!==""&&this.base.filterChanged("",e),this.state.text&&(e.data.text=""),this._lastSelectedOrDeslectedItemIndex=null,this.applyState(e)},this.onInputKeyDown=t=>{const{data:e=[],textField:s,groupField:n}=this.props,a=t.keyCode,u=this.props.filter!==void 0?this.props.filter:this.state.text,p=this.props.opened!==void 0?this.props.opened:this.state.opened,{focusedItem:c,focusedIndex:r}=this.getFocusedState(),h=this.base.initState();if(h.syntheticEvent=t,!u&&this.value.length>0&&(a===d.Keys.left||a===d.Keys.right||a===d.Keys.home||a===d.Keys.end||a===d.Keys.delete||a===d.Keys.backspace)&&!t.shiftKey)return this.onTagsNavigate(t,h);const f=()=>{t.preventDefault(),this.base.togglePopup(h),this.applyState(h)};if(this.opened)if(a===d.Keys.pageUp)this.base.scrollPopupByPageSize(-1);else if(a===d.Keys.pageDown)this.base.scrollPopupByPageSize(1);else if((t.ctrlKey||t.metaKey)&&t.code==="KeyA"){const m=(this.state.value&&this.state.value.length)===e.length?[]:e;this.updateStateOnKeyboardNavigation(m,h)}else if((t.ctrlKey||t.metaKey)&&t.shiftKey&&t.keyCode===d.Keys.end){const g=e.slice(this.getFocusedState().focusedIndex);this.itemFocus(e.length-1,h),this.updateStateOnKeyboardNavigation(g,h)}else if((t.ctrlKey||t.metaKey)&&t.shiftKey&&t.keyCode===d.Keys.home){const g=e.slice(0,this.getFocusedState().focusedIndex+1);this.itemFocus(0,h),this.updateStateOnKeyboardNavigation(g,h)}else if(t.shiftKey&&t.keyCode===d.Keys.up){let g;const m=this.getLastSelectedOrDeselectedIndex(1,r);m===null?g=r!==0?e.slice(r-1,r):[e[r]]:m===r?g=[e[m-1]]:r>=0&&(g=m>r?e.slice(r-1,m):e.slice(m-1,r)),g&&g.length>0&&(r>=1&&this.itemFocus(r-1,h),this.updateStateOnKeyboardNavigation(g,h))}else if(t.shiftKey&&t.keyCode===d.Keys.down){let g;const m=this.getLastSelectedOrDeselectedIndex(0,r);m===null?g=r!==e.length-1?e.slice(r,r+1):[e[r]]:m===r?g=e.slice(r,r+2):r>=0&&(g=m>r?e.slice(r+1,m+1):e.slice(m,r+2)),g&&g.length>=1&&(this.itemFocus(r+1,h),this.updateStateOnKeyboardNavigation(g,h))}else if(t.altKey&&a===d.Keys.up)f();else if(a===d.Keys.up||a===d.Keys.down){if(n!==""&&s)if(!this.props.skipDisabledItems&&p)this.onNavigate(h,a);else{let g=0;if(a===d.Keys.down||a===d.Keys.right){const m=e.slice(r+1).find(v=>!v.disabled&&v[s]);g=m&&e.findIndex(v=>v[s]===m[s])}else if(a===d.Keys.up||a===d.Keys.left){let m;if(r===-1)m=e,g=e.findIndex(v=>!v.disabled&&v[s]);else{m=e.slice(0,r);let v=m.pop();for(;v&&v.disabled;)v=m.pop();g=v&&e.findIndex(b=>b[s]===v[s])}}if(g){const m=g-r;this.onNavigate(h,a,m)}else g!==void 0&&this.onNavigate(h,a)}else if(!this.props.skipDisabledItems&&p)this.onNavigate(h,a);else{let g=null;if(a===d.Keys.down||a===d.Keys.right)g=e.slice(r+1).find(m=>!m.disabled);else if(a===d.Keys.up||a===d.Keys.left){const m=e.slice(0,r);for(g=m.pop();g&&g.disabled;)g=m.pop()}if(g){const m=g.id-r-1;this.onNavigate(h,a,m)}else this.onNavigate(h,a)}this.applyState(h),t.preventDefault()}else a===d.Keys.enter?(t.preventDefault(),this.props.allowCustom&&u&&c===null?this.customItemSelect(t):c&&c.disabled?f():this.selectFocusedItem(t)):a===d.Keys.esc&&f();else t.altKey&&a===d.Keys.down&&f()},this.listContainerContent=()=>{const{header:t,footer:e,allowCustom:s,size:n,data:a=[],groupStickyHeaderItemRender:u,groupField:p,list:c}=this.props,r=this.props.filter!==void 0?this.props.filter:this.state.text,{focusedType:h}=this.getFocusedState(),f=s&&r&&o.createElement("div",{className:d.classNames("k-list",{[`k-list-${vt[n]||n}`]:n}),key:"customitem",onClick:this.customItemSelect,onMouseDown:Xt},o.createElement("div",{className:d.classNames("k-list-item k-custom-item",{"k-focus":Zt(h)}),style:{fontStyle:"italic"}},r,o.createElement(d.IconWrap,{name:"plus",icon:xe.plusIcon,style:{position:"absolute",right:"0.5em"}})));let{group:g}=this.state;return g===void 0&&p!==void 0&&(g=R(a[0],p)),o.createElement(o.Fragment,null,t&&o.createElement("div",{className:"k-list-header"},t),f,o.createElement("div",{className:d.classNames("k-list",{[`k-list-${this.mobileMode?"lg":vt[n]||n}`]:n,"k-virtual-list":this.base.vs.enabled})},!c&&g&&a.length!==0&&o.createElement(We,{group:g,groupMode:"modern",render:u}),this.renderList()),e&&o.createElement("div",{className:"k-list-footer"},e))},this.renderListContainer=()=>{const t=this.base,{dir:e,data:s=[]}=this.props,n=this.base.getPopupSettings(),a=n.width!==void 0?n.width:t.popupWidth,u={dir:e!==void 0?e:t.dirCalculated,width:a,popupSettings:{...n,popupClass:d.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 o.createElement(it,{...u},this.listContainerContent())},this.renderAdaptiveListContainer=()=>{const{adaptiveTitle:t,filterable:e,filter:s}=this.props,{windowWidth:n=0}=this.state,a=s!==void 0?s:this.state.text;this.localization=ke.provideLocalizationService(this);const u=e?o.createElement(Me,{value:a,ref:c=>this._adaptiveInput=c&&c.element,onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode}):null,p={adaptiveTitle:t,expand:this.opened,onClose:c=>this.onCancel(c),windowWidth:n,mobileFilter:u,footer:{cancelText:this.localization.toLanguageString(st,ne[st]),onCancel:this.onCancel,applyText:this.localization.toLanguageString(tt,ne[tt]),onApply:this.closePopup}};return o.createElement(qt,{...p},o.createElement(ge.ActionSheetContent,{className:"!k-overflow-hidden"},o.createElement("div",{className:"k-list-container"},this.listContainerContent())))},this.closePopup=t=>{const e=this.base.initState();e.syntheticEvent=t,t.stopPropagation(),this.state.focusedIndex!==void 0&&(e.data.focusedIndex=void 0),this.opened&&this.base.togglePopup(e),e.events.push({type:"onClose"});const s=this.props.filter!==void 0?this.props.filter:this.state.text;G(s)&&s!==""&&this.base.filterChanged("",e),this.state.text&&(e.data.text=""),this.applyState(e)},this.onCancel=t=>{const e=this.base.initState();e.syntheticEvent=t,t.stopPropagation(),this.state.focusedIndex!==void 0&&(e.data.focusedIndex=void 0),this.opened&&this.base.togglePopup(e),e.events.push({type:"onCancel"});const s=this.props.filter!==void 0?this.props.filter:this.state.text;G(s)&&s!==""&&this.base.filterChanged("",e),this.state.text&&(e.data.text=""),this.applyState(e)},this.renderList=()=>{const{data:t=[],textField:e,listNoDataRender:s,itemRender:n,groupHeaderItemRender:a,dataItemKey:u,virtual:p={skip:0,total:void 0}}=this.props,c=this.base.vs,{focusedIndex:r}=this.getFocusedState(),h=this.base.getPopupSettings(),f=`translateY(${c.translate}px)`;return o.createElement(Re,{id:this.base.listBoxId,show:this.opened,data:t.slice(),focusedIndex:r-p.skip,value:this.value,textField:e,valueField:u,optionsGuid:this.base.guid,groupField:this.props.groupField,groupMode:"modern",listRef:g=>{c.list=this.base.list=g},wrapperStyle:this.mobileMode?{}:{maxHeight:h.height},wrapperCssClass:"k-list-content",listStyle:c.enabled?{transform:f}:void 0,key:"listKey",skip:p.skip,onClick:this.handleItemClick,itemRender:n,groupHeaderItemRender:a,noDataRender:s,onMouseDown:Xt,onBlur:this.handleBlur,onScroll:this.onScroll,wrapperRef:c.scrollerRef,scroller:this.base.renderScrollElement(),ariaSetSize:p.total})},this.onScroll=t=>{const{vs:e,list:s}=this.base;e.scrollHandler(t);const{groupField:n}=this.props;let{data:a=[]}=this.props;if(!(!n||!a.length)&&n){const u=this.itemHeight=this.itemHeight||(e.enabled?e.itemHeight:s?s.children[0].offsetHeight:0),c=t.target.scrollTop-e.skip*u;a=this.base.getGroupedDataModernMode(a,n);let r=a[0][n];for(let h=1;h<a.length&&!(u*h>c);h++)a[h]&&a[h][n]&&(r=a[h][n]);r!==this.state.group&&this.setState({group:r})}},this.customItemSelect=t=>{const e=this.props.filter!==void 0?this.props.filter:this.state.text,{textField:s}=this.props;if(!e)return;const n=this.base.initState();n.syntheticEvent=t;const a=s?{[s]:e}:e;this.state.text!==void 0&&(n.data.text=""),n.data.focusedIndex=void 0,this.base.filterChanged("",n);const u=[...this.value,a];this.triggerOnChange(u,n),this.base.togglePopup(n),this.applyState(n)},this.handleWrapperClick=t=>{const e=this._input;!this.opened&&e&&this.focusElement(e);const s=this.base.initState();s.syntheticEvent=t,!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=(t,e)=>{const s=this.base.initState();s.syntheticEvent=e,this.handleItemSelect(t,s),this.props.autoClose&&!this.mobileMode&&this.base.togglePopup(s),e.stopPropagation(),this.applyState(s)},this.handleBlur=t=>{if(!this.state.focused||this._skipFocusEvent)return;const e=this.base.initState(),{allowCustom:s,filterable:n}=this.props;e.syntheticEvent=t,e.data.focused=!1,e.events.push({type:"onBlur"}),this.opened&&!this.mobileMode&&(this.state.opened&&(e.data.opened=!1),e.events.push({type:"onClose"})),!s&&!n&&this.state.text&&(e.data.text=""),this.applyState(e)},this.handleFocus=t=>{this._skipFocusEvent||this.base.handleFocus(t)},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||As)},d.validatePackage($e)}get _inputId(){return this.props.id}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get opened(){return!!(this.props.opened!==void 0?this.props.opened:this.state.opened)}get tagsToRender(){const{tags:i,textField:t}=this.props;let e=[];return i===void 0?this.value.forEach(s=>{e.push({text:R(s,t),data:[s]})}):e.push(...i),e}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=De&&this.props.adaptive)}get value(){const i=[];return this._valueItemsDuringOnChange?i.push(...this._valueItemsDuringOnChange):this.props.value?i.push(...this.props.value):this.state.value?i.push(...this.state.value):this.props.defaultValue&&i.push(...this.props.defaultValue),i}get name(){return this.props.name}get validity(){const i=this.props.validationMessage!==void 0,t=!this.required||this.value!==null&&this.value.length>0&&this.value!==void 0,e=this.props.valid!==void 0?this.props.valid:t;return{customError:i,valid:e,valueMissing:this.value===null}}get required(){return this.props.required!==void 0?this.props.required:Vt.defaultProps.required}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:Vt.defaultProps.validityStyles}componentDidUpdate(i,t){var f;const{virtual:e,groupField:s="",data:n=[]}=this.props,a=e?e.skip:0,u=i.virtual?i.virtual.total:0,p=i.opened!==void 0?i.opened:t.opened,c=!p&&this.opened,r=p&&!this.opened;if(!this.base.getPopupSettings().animate&&r&&this.onPopupClosed(),e&&e.total!==u)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{let{focusedItem:g,focusedIndex:m}=this.getFocusedState();s!==""&&(m=(f=this.base.getGroupedDataModernMode(n,s))==null?void 0:f.indexOf(g)),c&&e?this.base.scrollToVirtualItem(e,m-a):c&&!e?(n&&n.length!==0&&this.base.resetGroupStickyHeader(n[0][s],this),this.base.scrollToItem(m)):this.opened&&p&&g&&this.scrollToFocused&&this.base.scrollToItem(m-a)}this.scrollToFocused=!1,this.setValidity()}componentDidMount(){var i;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.base.didMount(),this.setValidity(),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentWillUnmount(){var i;(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}onNavigate(i,t,e){const{allowCustom:s,data:n=[]}=this.props,a=this.props.filter!==void 0?this.props.filter:this.state.text,{focusedType:u,focusedIndex:p}=this.getFocusedState(),c=s&&a,r=Zt(u),h=this.base,f=h.vs;if(this.opened&&t===d.Keys.up&&r)this.state.focusedIndex!==void 0&&(i.data.focusedIndex=void 0);else{const g=h.navigation.navigate({keyCode:t,current:p,max:(f.enabled?f.total:n.length)-1,min:c?-1:0,skipItems:e||void 0});g!==void 0&&(this.itemFocus(g,i),this.scrollToFocused=!0)}this.applyState(i)}render(){const{style:i,className:t,label:e,dir:s,disabled:n,textField:a,dataItemKey:u,virtual:p,size:c,rounded:r,fillMode:h,loading:f,filter:g}=this.props,{text:m,focused:v,focusedTag:b,currentValue:w}=this.state,k=this.base.vs,D=this.props.id||this._inputId;k.enabled=p!==void 0,p!==void 0&&(k.skip=p.skip,k.total=p.total,k.pageSize=p.pageSize);const N=this.mobileMode&&this.opened?w:this.tagsToRender;this.setItems(this.tagsToRender,this._tags);const K=!this.validityStyles||this.validity.valid,O=!!(g!==void 0?g:m)||N&&N.length>0,[S,F]=Ke(this.props.prefix||o.Fragment),[x,E]=Ke(this.props.suffix||o.Fragment),M=o.createElement(o.Fragment,null,o.createElement("div",{ref:this.componentRef,className:d.classNames("k-multiselect k-input",t,{[`k-input-${vt[c]||c}`]:c,[`k-rounded-${Hs[r]||r}`]:r,[`k-input-${h}`]:h,"k-focus":v&&!n,"k-invalid":!K,"k-disabled":n,"k-loading":f,"k-required":this.required}),style:e?{...i,width:void 0}:i,dir:s,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleWrapperClick,onMouseDown:ws},this.props.prefix&&o.createElement(S,{...F}),o.createElement("div",{className:d.classNames("k-input-values")},o.createElement("div",{className:d.classNames("k-chip-list",{[`k-chip-list-${vt[c]||c}`]:c}),role:"listbox",id:"tagslist-"+this.base.guid},N&&N.length>0&&o.createElement(Wt,{tagRender:this.props.tagRender,onTagDelete:this.onTagDelete,data:N,guid:this.base.guid,focused:b?N.find(H=>It(H,b,u)):void 0,size:c})),this.renderSearchBar(D)),f&&o.createElement(d.IconWrap,{className:"k-input-loading-icon",name:"loading"}),this.props.suffix&&o.createElement(x,{...E}),O&&o.createElement(nt,{onClick:this.clearButtonClick}),!this.mobileMode&&this.renderListContainer()),this.mobileMode&&this.renderAdaptiveListContainer());return e?o.createElement(qe.FloatingLabel,{label:e,editorId:D,editorValue:m||R(this.value[0],a),editorValid:K,editorDisabled:n,style:{width:i?i.width:void 0},children:M}):M}renderSearchBar(i){const{activedescendant:t,focusedTag:e,currentValue:s}=this.state,{disabled:n,placeholder:a,ariaDescribedBy:u}=this.props,p=!this.mobileMode&&(this.props.filter!==void 0?this.props.filter:this.state.text)||"",{focusedIndex:c}=this.getFocusedState(),r=this.value.length===0&&!p?a:void 0,h=s&&s.length>0?void 0:a,f=t===Ze.TagsList&&e!==void 0?`tag-${this.base.guid}-${e.text.replace(/\s+/g,"-")}`:`option-${this.base.guid}-${c}`;return o.createElement(kt,{id:i,size:Math.max((r||"").length,p.length,1),tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,placeholder:this.mobileMode&&this.opened?h:r,value:p,onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,ref:this.searchbarRef,disabled:n,expanded:this.opened,owns:this.base.listBoxId,role:"combobox",activedescendant:f,ariaDescribedBy:`tagslist-${this.base.guid}${u?" "+u:""}`,ariaLabelledBy:this.props.ariaLabelledBy,ariaRequired:this.required})}onTagsNavigate(i,t){const e=i.keyCode,{focusedTag:s}=this.state,n=this._tags,a=this.props.dataItemKey;let u=s?n.findIndex(r=>It(r,s,a)):-1,p;const c=u!==-1;if(e===d.Keys.left)c?u=Math.max(0,u-1):u=n.length-1,p=n[u];else if(e===d.Keys.right)u===n.length-1?p=void 0:c&&(u=Math.min(n.length-1,u+1),p=n[u]);else if(e===d.Keys.home&&!i.shiftKey)p=n[0];else if(e===d.Keys.end&&!i.shiftKey)p=n[n.length-1];else if(e===d.Keys.delete){if(c){const r=this.value;gt(r,n[u].data,a),this.triggerOnChange(r,t)}}else if(e===d.Keys.backspace){const r=this.value;if(c)gt(r,n[u].data,a),this.triggerOnChange(r,t);else if(!c&&n.length){const h=n.pop();gt(r,h.data,a),this.triggerOnChange(r,t)}}p!==s&&(t.data.focusedTag=p,t.data.activedescendant=Ze.TagsList),this.applyState(t)}triggerOnChange(i,t){this.props.value===void 0&&(t.data.value=[...i]),this._valueItemsDuringOnChange=[],this.setItems(i,this._valueItemsDuringOnChange),t.events.push({type:"onChange"})}selectFocusedItem(i,t){const{data:e=[],virtual:s}=this.props,{focusedIndex:n}=t||this.getFocusedState(),a=s?s.skip:0;e[n-a]!==void 0&&this.handleItemClick(n,i)}setItems(i,t){t.length=0,t.push(...i)}getFocusedState(){const{focusedIndex:i}=this.state,t=this.props.filter!==void 0?this.props.filter:this.state.text,{allowCustom:e,data:s=[],dataItemKey:n,virtual:a,textField:u,focusedItemIndex:p=_e,skipDisabledItems:c}=this.props,r=a&&a.skip||0;let h;if(i!==void 0)return{focusedIndex:i,focusedItem:s[i-r],focusedType:1};const f=this.value;if(e&&t)return{focusedItem:null,focusedIndex:-1,focusedType:2};if(t)return h=p(s,t,u),{focusedItem:s[h],focusedIndex:h+r,focusedType:1};if(f.length){const g=f[f.length-1];return h=s.findIndex(m=>_(m,g,n)),s[h]!==void 0?{focusedIndex:h+r,focusedItem:s[h],focusedType:1}:{focusedType:0,focusedIndex:-1}}else if(c&&u&&!t&&r===0){const g=s.findIndex(m=>!m.disabled&&m[u]);return{focusedIndex:g,focusedItem:s[g-r],focusedType:1}}return r===0?{focusedItem:s[0],focusedIndex:0,focusedType:1}:{focusedType:0,focusedIndex:-1}}focusElement(i){this._skipFocusEvent=!0,i.focus(),window.setTimeout(()=>this._skipFocusEvent=!1,0)}applyState(i){this.base.applyState(i),this._valueItemsDuringOnChange=null}calculateMedia(i){for(let t of i)this.setState({windowWidth:t.target.clientWidth})}updateStateOnKeyboardNavigation(i,t){this.setState({value:i}),this.triggerOnChange(i,t),this.applyState(t)}getLastSelectedOrDeselectedIndex(i,t){return this._lastSelectedOrDeslectedItemIndex===null&&(this._lastSelectedOrDeslectedItemIndex=t),this._lastSelectedOrDeslectedItemIndex!==null?this._lastSelectedOrDeslectedItemIndex+i:null}};let at=Vt;at.displayName="MultiSelect";at.propTypes={...oe.propTypes,autoClose:l.bool,value:l.arrayOf(l.any),defaultValue:l.arrayOf(l.any),dataItemKey:l.string,placeholder:l.string,tags:l.arrayOf(l.shape({text:l.string,data:l.arrayOf(l.any)})),tagRender:l.func,id:l.string,ariaLabelledBy:l.string,ariaDescribedBy:l.string,groupField:l.string,list:l.any,adaptive:l.bool,adaptiveTitle:l.string,onCancel:l.func,skipDisabledItems:l.bool};at.defaultProps={...oe.defaultProps,autoClose:!0,required:!1,size:"medium",rounded:"medium",fillMode:"solid",groupMode:"modern",skipDisabledItems:!0,prefix:void 0,suffix:void 0};const cs=d.createPropsContext(),ps=d.withIdHOC(d.withPropsContext(cs,at));ps.displayName="KendoReactMultiSelect";const Ws=i=>o.createElement(Re,{...i,wrapperCssClass:"k-table-body k-table-scroller",listClassName:d.classNames("k-table k-table-list",{"k-virtual-table":i.virtual!==void 0}),listStyle:{...i.listStyle}}),qs=(i,t)=>i?typeof i=="number"?i+"px":i:t,us=d.createPropsContext(),St=o.forwardRef((i,t)=>{const e=d.usePropsContext(us,i),s=o.useRef(null),n=o.useRef(null),a=d.getScrollbarWidth(),{columns:u=He.columns,popupSettings:p=He.popupSettings,className:c,size:r,prefix:h=void 0,suffix:f=void 0,onOpen:g,onClose:m,onFocus:v,onBlur:b,onChange:w,onFilterChange:k,onPageChange:D,...N}=e;o.useImperativeHandle(s,()=>({element:n.current&&n.current.element,focus(){n.current&&n.current.focus()},get value(){return n.current&&n.current.value},get name(){return n.current&&n.current.name},props:e})),o.useImperativeHandle(t,()=>s.current);const K=o.useMemo(()=>{if(e.groupField!==void 0&&e.data)return R(e.data[0],e.groupField)},[e.data,e.groupField]),[O,S]=o.useState(K),[F,x]=o.useState(!0),[E]=h?Ke(e.prefix||o.Fragment):[],[M]=f?Ke(e.suffix||o.Fragment):[],H=o.useMemo(()=>{const P=o.createElement("th",{className:"k-table-th",colSpan:u.length},O);return o.createElement(o.Fragment,null,e.header,o.createElement("div",{className:"k-table-header-wrap"},o.createElement("table",{className:"k-table",role:"presentation"},o.createElement("colgroup",null,u.map((A,me)=>o.createElement("col",{key:A.uniqueKey?A.uniqueKey:me,style:{width:A.width?A.width:He.width}}))),o.createElement("thead",{className:"k-table-thead"},o.createElement("tr",{className:"k-table-row"},u.map((A,me)=>o.createElement("th",{className:"k-table-th",key:A.uniqueKey?A.uniqueKey:me},A.header||" "))),O&&F&&o.createElement("tr",{className:"k-table-group-row"},e.groupStickyHeaderItemRender?e.groupStickyHeaderItemRender.call(void 0,P,{}):P)))))},[e.header,u,O,F]),U=o.useMemo(()=>`calc(${u.map(P=>qs(P.width,He.width)).filter(Boolean).join(" + ")} + ${a}px + 4px)`,[u,a]),j=e.virtual?e.virtual.skip:0,X=o.useCallback((P,A)=>{const me=u.map((Z,lt)=>o.createElement("span",{className:e.itemRender?void 0:"k-table-td",style:e.itemRender?void 0:{width:Z.width?Z.width:He.width},key:Z.uniqueKey?Z.uniqueKey:lt},Z.field?String(d.getter(Z.field)(A.dataItem)):""));let V,Y,Se,le,W=e.data||[];const re=A.index-j;e.groupField!==void 0&&(le=d.getter(e.groupField),Y=le(W[re]),Se=le(W[re-1]),Y&&Se&&Y!==Se&&(V=Y)),V&&e.groupMode==="classic"&&me.push(o.createElement("div",{key:"group",className:"k-table-td k-table-group-td"},o.createElement("span",null,V)));const we=o.cloneElement(P,{...P.props,className:d.classNames("k-table-row",{"k-table-alt-row":A.index%2!==0,"k-focus":A.focused,"k-selected":A.selected,"k-first":!!V,"k-disabled":A.dataItem.disabled})},me);return e.itemRender?e.itemRender.call(void 0,we,A):we},[u,e.groupField,e.itemRender,e.data,j]),B=o.useCallback((P,A)=>{P&&P.call(void 0,{...A,target:s.current})},[]),be=o.useCallback(P=>(e.virtual||S(K),B(g,P)),[B,g,e.virtual,K]),Q=o.useCallback(P=>B(m,P),[m]),J=o.useCallback(P=>B(v,P),[v]),ae=o.useCallback(P=>B(b,P),[b]),Be=o.useCallback(P=>B(w,P),[w]),Ne=o.useCallback(P=>B(D,P),[D]),Le=o.useCallback(P=>(S(K),B(k,{...P,mobileMode:P.target.mobileMode})),[k]),z=o.useCallback(P=>{S(P.group)},[]);o.useEffect(()=>{d.setScrollbarWidth()}),o.useEffect(()=>{const P=e.data;S(K),P&&P.length!==0?x(!0):x(!1)},[e.data]);const Ve=o.useCallback(P=>o.createElement(Ws,{...P}),[]);return o.createElement(xt.PopupPropsContext.Provider,{value:P=>({...P,popupClass:`k-dropdowngrid-popup ${p.popupClass}`})},o.createElement(At,{...N,list:Ve,popupSettings:{...p,width:p.width||U,className:p.className},ref:n,header:H,itemRender:X,groupHeaderItemRender:e.groupHeaderItemRender,size:e.size,rounded:e.rounded,fillMode:e.fillMode,groupMode:e.groupMode,groupField:e.groupField,isMultiColumn:!0,onOpen:be,onClose:Q,onFocus:J,onBlur:ae,onChange:Be,onFilterChange:Le,onPageChange:Ne,onGroupScroll:z,className:d.classNames("k-dropdowngrid",c),required:e.required,adaptive:e.adaptive,adaptiveFilter:e.adaptiveFilter,adaptiveTitle:e.adaptiveTitle,footer:e.footer,footerClassName:"k-table-footer",prefix:E,suffix:M}))}),$s={...Ue.propTypes,columns:l.any.isRequired},He={columns:[],popupSettings:{},width:"200px",size:"medium",rounded:"medium",fillMode:"solid"};St.displayName="KendoMultiColumnComboBox";St.propTypes=$s;St.defaultProps=He;function Gs(i,t,e){const[s,n]=o.useState(t);return o.useEffect(()=>{s!==void 0&&i.current&&n(i.current.offsetWidth)},e),s}function hs(i,t,e,s){const n=e.width!==void 0&&e.width!==t.popupSettings.width,a=s.width!==void 0,u=n?e.width:a?s.width:t.popupSettings.width,p=Gs(i,u);return n||a?u:p&&p>t.popupSettings.width?p:t.popupSettings.width}const fs=i=>o.createElement("div",{className:"k-nodata"},o.createElement("div",null,i.children)),{sizeMap:Us,roundedMap:js}=d.kendoThemeMaps,Ys="Please select a value from the list!",Js=i=>o.createElement("span",{className:"k-input-value-text"},i.children),es=i=>i.split("_").map(t=>parseInt(t,10)),Qs=(i,t)=>{const{validationMessage:e,valid:s,required:n}=i;return{customError:e!==void 0,valid:!!(s!==void 0?s:!n||t),valueMissing:!t}},ts={selectField:"selected",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},data:[],required:!1,style:{},validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},gs=d.createPropsContext(),$t=o.forwardRef((i,t)=>{d.validatePackage($e);const e=d.usePropsContext(gs,i),s={...ts,...e},n=d.useId(),a=s.id||n,{data:u,dataItemKey:p,popupSettings:c={},style:r,opened:h,disabled:f,onOpen:g=d.noop,onClose:m=d.noop,placeholder:v,label:b,name:w,selectField:k,subItemsField:D,validationMessage:N,valid:K,required:O,validityStyles:S}=s,F=d.getTabIndex(s.tabIndex,f),x=o.useRef(null),E=o.useRef(null),M=o.useRef(null),H=o.useRef(null),U=o.useRef(null),j=o.useRef(null),X=o.useRef(!1),[B,be]=o.useState(void 0),Q=s.value!==void 0,J=Q?s.value:B!==void 0?B:s.defaultValue,ae=G(J),Be=ae?R(J,s.textField):"",Ne=Qs({validationMessage:N,valid:K,required:O},ae),Le=o.useCallback(()=>E.current&&E.current.focus(),[]);o.useImperativeHandle(x,()=>({props:s,element:E.current,focus:Le})),o.useImperativeHandle(t,()=>x.current);const z=d.useRtl(E,s.dir),P={width:hs(E,ts,c,r),...z!==void 0?{direction:z}:{}},[A,me]=o.useState(!1),V=h!==void 0?h:A,[Y,Se]=o.useState(!1),[le,W]=o.useState(),re=!!(le&&le<=De&&s.adaptive),[we,Z]=o.useState(""),lt=o.useCallback(()=>{U.current&&U.current.setCustomValidity&&U.current.setCustomValidity(Ne.valid?"":N===void 0?Ys:N)},[N,Ne]);o.useEffect(lt),o.useEffect(()=>{const I=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(Mt.bind(void 0));return document!=null&&document.body&&I&&I.observe(document.body),()=>{document!=null&&document.body&&I&&I.disconnect()}},[]);const rt=o.useCallback(I=>{if(!V){if(g){const T={...I};g.call(void 0,T)}h===void 0&&me(!0)}},[V,h,g]),Ee=o.useCallback(I=>{if(V){if(m){const T={...I};m.call(void 0,T)}h===void 0&&(me(!1),re&&setTimeout(()=>{var T;q((T=H.current)==null?void 0:T.element)},300))}},[V,h,m,re]),Et=o.useCallback(I=>{if(!I.isDefaultPrevented()&&x.current){Se(!0);const T={syntheticEvent:I,nativeEvent:I.nativeEvent,target:x.current};(V?Ee:rt)(T)}},[V,h,g,m]),ie=o.useCallback(I=>{X.current=!0,I(),window.setTimeout(()=>X.current=!1,0)},[]),ze=o.useCallback(I=>{var C,L;const{keyCode:T,altKey:$}=I,ce=j.current&&j.current.element;if(!x.current||I.isDefaultPrevented()&&((C=M.current)==null?void 0:C.element)===I.target)return;const y={syntheticEvent:I,nativeEvent:I.nativeEvent,target:x.current};if(V)if(T===d.Keys.esc||$&&T===d.Keys.up)I.preventDefault(),Ee(y);else if(ce&&ce.querySelector(".k-focus")&&(T===d.Keys.up||T===d.Keys.down||T===d.Keys.left||T===d.Keys.right||T===d.Keys.home||T===d.Keys.end)){if(T===d.Keys.up&&((L=M.current)!=null&&L.element)){const te=Array.from(ce.querySelectorAll(".k-treeview-item")),Ie=[...te].reverse().find(Ce=>!!(Ce&&Ce.querySelector(".k-focus")));if(Ie&&te.indexOf(Ie)===0)return ie(()=>{var Ce;q((Ce=M.current)==null?void 0:Ce.element)})}ie(d.noop)}else T===d.Keys.down&&ie(()=>{var te;q(((te=M.current)==null?void 0:te.element)||ce)});else $&&T===d.Keys.down?(I.preventDefault(),rt(y)):V||T===d.Keys.esc&&pt(I)},[V,h,g,m]),Pe=o.useCallback(I=>{const{keyCode:T,altKey:$}=I;$||T!==d.Keys.up&&T!==d.Keys.down||(I.preventDefault(),ie(T===d.Keys.up?()=>{q(E.current)}:()=>{q(j.current&&j.current.element)}))},[]),q=o.useCallback(I=>{I&&ie(()=>I.focus())},[]),he=o.useCallback(()=>{var I;!Y&&V&&!h?Ee({target:x.current}):e.filterable?q((I=M.current)==null?void 0:I.element):q(j.current&&j.current.element)},[m,e.filterable,Y,h,V]),ee=o.useCallback(()=>{Y&&q(E.current)},[Y]),Dt=o.useCallback(I=>{if(!Y&&!X.current&&(Se(!0),e.onFocus&&x.current)){const T={syntheticEvent:I,nativeEvent:I.nativeEvent,target:x.current};e.onFocus.call(void 0,T)}},[Y,e.onFocus]),Ft=o.useCallback(I=>{if(Y&&!X.current&&x.current){Se(!1);const T={syntheticEvent:I,nativeEvent:I.nativeEvent,target:x.current};if(e.onBlur){const $={...T};e.onBlur.call(void 0,$)}re||Ee(T)}},[Y,e.onBlur,V,h,m]),Tt=o.useCallback(()=>{Y&&ie(d.noop),re&&setTimeout(()=>{var I;q((I=H.current)==null?void 0:I.element)},300)},[Y,re]),dt=o.useCallback((I,T,$)=>{if(e.onChange){const ce={value:T,level:$?es($):[],...I};e.onChange.call(void 0,ce)}Q||be(T)},[e.onChange,Q]),ct=o.useCallback(I=>{if(_(I.item,J,p)||!x.current)return;const{item:T,itemHierarchicalIndex:$,nativeEvent:ce,syntheticEvent:y}=I,C={syntheticEvent:y,nativeEvent:ce,target:x.current};dt(C,T,$),Ee(C)},[Q,J,e.onChange,p,V,h,m]),pt=o.useCallback(I=>{if(!x.current)return;const T={syntheticEvent:I,nativeEvent:I.nativeEvent,target:x.current};dt(T,null),Ee(T),I.preventDefault()},[Q,e.onChange,V,h,m]),ut=o.useCallback(I=>{if(I.syntheticEvent.stopPropagation(),e.onExpandChange&&x.current){const{item:T,itemHierarchicalIndex:$,nativeEvent:ce,syntheticEvent:y}=I,C={level:es($),item:T,nativeEvent:ce,syntheticEvent:y,target:x.current};e.onExpandChange.call(void 0,C)}},[e.onExpandChange]),je=o.useCallback(I=>{if(e.onFilterChange&&x.current){const $={filter:{field:e.textField,operator:"contains",value:I.target.value},syntheticEvent:I.syntheticEvent,nativeEvent:I.nativeEvent,target:x.current};e.onFilterChange.call(void 0,$),e.filter===void 0&&Z(I.target.value)}},[e.onFilterChange,e.filter,e.textField]),Ye=()=>{const I=s.filterable?o.createElement(Me,{value:s.filter===void 0?we:s.filter,ref:H,onChange:je,onKeyDown:Pe,size:ve,rounded:ye,fillMode:Te}):null,T={adaptiveTitle:s.adaptiveTitle,expand:V,onClose:$=>Ee($),windowWidth:le,mobileFilter:I};return o.createElement(qt,{...T},o.createElement(ge.ActionSheetContent,{className:"!k-overflow-hidden"},o.createElement("div",{className:"k-list-container"},o.createElement("div",{className:"k-list k-list-lg"},u.length>0?o.createElement(yt.TreeView,{ref:j,tabIndex:F,data:Je,focusIdField:p,textField:s.textField,selectField:k,expandField:s.expandField,childrenField:D,expandIcons:!0,onItemClick:ct,onExpandChange:ut,size:ve,item:s.item,dir:z}):o.createElement(Qe,null,Xe.toLanguageString(fe,ne[fe]))))))},Mt=o.useCallback(I=>{for(let T of I)W(T.target.clientWidth)},[]),Je=o.useMemo(()=>Q||!ae?u:d.mapTree(u,D,I=>d.extendDataItem(I,D,{[k]:_(I,J,p)})),[u,J,Q,ae,k,D]),Qe=s.listNoData||fs,ht=s.valueHolder||Js,Xe=ke.useLocalization(),ft=!S||Ne.valid,{size:ve,rounded:ye,fillMode:Te}=s,de=o.createElement(o.Fragment,null,o.createElement("span",{className:d.classNames("k-dropdowntree k-picker",s.className,{[`k-picker-${Us[ve]||ve}`]:ve,[`k-rounded-${js[ye]||ye}`]:ye,[`k-picker-${Te}`]:Te,"k-focus":Y,"k-invalid":!ft,"k-loading":s.loading,"k-required":O,"k-disabled":s.disabled}),tabIndex:F,accessKey:s.accessKey,id:a,style:b?{...r,width:void 0}:r,dir:z,ref:E,onKeyDown:f?void 0:ze,onMouseDown:Tt,onClick:f?void 0:Et,onFocus:Dt,onBlur:Ft,role:"combobox","aria-haspopup":"tree","aria-expanded":V,"aria-disabled":f,"aria-label":b,"aria-labelledby":s.ariaLabelledBy,"aria-describedby":s.ariaDescribedBy,"aria-required":O},o.createElement("span",{className:"k-input-inner"},o.createElement(ht,{item:J},Be||v)),s.loading&&o.createElement(d.IconWrap,{className:"k-input-loading-icon",name:"loading"}),ae&&!f&&o.createElement("span",{onClick:pt,className:"k-clear-value",title:Xe.toLanguageString(et,ne[et]),role:"button",tabIndex:-1,onMouseDown:I=>I.preventDefault()},o.createElement(d.IconWrap,{name:"x",icon:xe.xIcon})),o.createElement(Fe.Button,{tabIndex:-1,type:"button","aria-label":"select",className:"k-input-button",size:ve,fillMode:Te,themeColor:"base",rounded:null,icon:"caret-alt-down",svgIcon:xe.caretAltDownIcon}),o.createElement("select",{name:w,ref:U,tabIndex:-1,"aria-hidden":!0,title:b,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},o.createElement("option",{value:s.valueMap?s.valueMap.call(void 0,J):J})),!re&&o.createElement(xt.Popup,{...c,className:d.classNames(c.className,{"k-rtl":z==="rtl"}),popupClass:d.classNames(c.popupClass,"k-dropdowntree-popup"),style:P,anchor:c.anchor||E.current,show:V,onOpen:he,onClose:ee},s.filterable&&o.createElement(Me,{value:s.filter===void 0?we:s.filter,ref:M,onChange:je,onKeyDown:Pe,size:ve,rounded:ye,fillMode:Te}),u.length>0?o.createElement(yt.TreeView,{style:{height:c.height},ref:j,tabIndex:F,data:Je,focusIdField:p,textField:s.textField,selectField:k,expandField:s.expandField,childrenField:D,expandIcons:!0,onItemClick:ct,onExpandChange:ut,size:ve,item:s.item,dir:z}):o.createElement(Qe,null,Xe.toLanguageString(fe,ne[fe])))),re&&Ye());return b?o.createElement(qe.FloatingLabel,{label:b,editorValue:Be,editorPlaceholder:v,editorValid:ft,editorDisabled:f,editorId:a,style:{width:r?r.width:void 0},children:de,dir:z}):de}),Xs={opened:l.bool,disabled:l.bool,dir:l.string,tabIndex:l.number,accessKey:l.string,data:l.array,value:l.any,valueMap:l.func,placeholder:l.string,dataItemKey:l.string.isRequired,textField:l.string.isRequired,selectField:l.string,expandField:l.string,subItemsField:l.string,className:l.string,style:l.object,label:l.string,validationMessage:l.string,validityStyles:l.bool,valid:l.bool,required:l.bool,name:l.string,id:l.string,ariaLabelledBy:l.string,ariaDescribedBy:l.string,filterable:l.bool,filter:l.string,loading:l.bool,popupSettings:l.shape({animate:l.oneOfType([l.bool,l.shape({openDuration:l.number,closeDuration:l.number})]),popupClass:l.string,className:l.string,appendTo:l.any,width:l.oneOfType([l.string,l.number]),height:l.oneOfType([l.string,l.number])}),onOpen:l.func,onClose:l.func,onFocus:l.func,onBlur:l.func,onChange:l.func,onFilterChange:l.func,onExpandChange:l.func,item:l.func,valueHolder:l.func,listNoData:l.func,adaptiveTitle:l.string,adaptive:l.bool};$t.displayName="KendoReactDropDownTree";$t.propTypes=Xs;const Zs="Please select a value from the list!",{sizeMap:ss,roundedMap:ei}=d.kendoThemeMaps,ti=i=>i.split("_").map(t=>parseInt(t,10)),si=(i,t)=>{const{validationMessage:e,valid:s,required:n}=i;return{customError:e!==void 0,valid:!!(s!==void 0?s:!n||t),valueMissing:!t}},Oe={checkField:"checkField",checkIndeterminateField:"checkIndeterminateField",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},size:"medium",rounded:"medium",fillMode:"solid",required:!1,validityStyles:!0},ms=d.createPropsContext(),wt=o.forwardRef((i,t)=>{const e=d.usePropsContext(ms,i);d.validatePackage($e);const s=d.useId(),n=e.id||s,{data:a=[],dataItemKey:u,popupSettings:p={},style:c={},opened:r,disabled:h,onOpen:f=d.noop,onClose:g=d.noop,placeholder:m,label:v,name:b,checkField:w=Oe.checkField,checkIndeterminateField:k=Oe.checkIndeterminateField,subItemsField:D=Oe.subItemsField,validationMessage:N,valid:K,tags:O,value:S,required:F=Oe.required,validityStyles:x=Oe.validityStyles}=e,E=d.getTabIndex(e.tabIndex,h),M=o.useRef(null),H=o.useRef(null),U=o.useRef(null),j=o.useRef(null),X=o.useRef(null),B=o.useRef(null),be=o.useRef(!1),Q=o.useRef([]),J=o.useRef(null),[ae,Be]=o.useState(),[Ne,Le]=o.useState(!1),[z,Ve]=o.useState(!1),[P,A]=o.useState(),[me,V]=o.useState([]),[Y,Se]=o.useState(""),le=!!(P&&P<=De&&e.adaptive),W=r!==void 0?r:Ne,re=!!(Array.isArray(S)&&S.length),we=si({validationMessage:N,valid:K,required:F},re),Z=d.useRtl(H,e.dir),rt={width:hs(H,Oe,p,c),...Z!==void 0?{direction:Z}:{}},Ee=o.useCallback(()=>H.current&&H.current.focus(),[]);Q.current=O===void 0?(S||[]).map(y=>({text:R(y,e.textField),data:[y]})):[...O],o.useImperativeHandle(M,()=>({props:e,element:H.current,focus:Ee})),o.useImperativeHandle(t,()=>M.current);const Et=o.useCallback(()=>{X.current&&X.current.setCustomValidity&&X.current.setCustomValidity(we.valid?"":N===void 0?Zs:N)},[N,we]);o.useEffect(Et),o.useEffect(()=>{const y=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(ft.bind(void 0));return document!=null&&document.body&&y&&y.observe(document.body),()=>{y&&y.disconnect()}},[]),o.useEffect(()=>{J.current&&W&&J.current.setPosition(J.current._popup)},[S,W]);const ie=o.useCallback((y,C,L)=>{if(e.onChange){const te={items:C,operation:L,...y};e.onChange.call(void 0,te)}},[e.onChange]),ze=o.useCallback(y=>{if(_(y.item,S,u)||!M.current)return;const{item:C,nativeEvent:L,syntheticEvent:te}=y,Ie={syntheticEvent:te,nativeEvent:L,target:M.current};ie(Ie,[C],"toggle")},[S,u,ie]),Pe=o.useCallback(y=>{if(!W){if(f){const C={...y};f.call(void 0,C)}r===void 0&&(Le(!0),V(S||[]),le&&setTimeout(()=>{var C;ee((C=j.current)==null?void 0:C.element)},300))}},[W,r,f,le,j]),q=o.useCallback(y=>{if(W){if(g){const C={...y};g.call(void 0,C)}r===void 0&&Le(!1)}},[W,r,g]),he=o.useCallback(y=>{be.current=!0,y(),window.setTimeout(()=>be.current=!1,0)},[]),ee=o.useCallback(y=>{y&&he(()=>y.focus())},[he]),Dt=o.useCallback(()=>{var y;!z&&W?q({target:M.current}):e.filterable?ee((y=U.current)==null?void 0:y.element):ee(B.current&&B.current.element)},[z,W,ee,q,e.filterable]),Ft=o.useCallback(()=>{z&&ee(H.current)},[z,ee]),Tt=o.useCallback(y=>{if(!z&&!be.current&&(Ve(!0),e.onFocus&&M.current)){const C={syntheticEvent:y,nativeEvent:y.nativeEvent,target:M.current};e.onFocus.call(void 0,C)}},[z,e.onFocus]),dt=o.useCallback(y=>{if(z&&!be.current&&M.current){Ve(!1);const C={syntheticEvent:y,nativeEvent:y.nativeEvent,target:M.current};if(e.onBlur){const L={...C};e.onBlur.call(void 0,L)}le||q(C)}},[z,e.onBlur,W,r,g]),ct=o.useCallback(()=>{z&&he(d.noop)},[z,he]),pt=o.useCallback(y=>{if(!y.isDefaultPrevented()&&M.current){Ve(!0);const C={syntheticEvent:y,nativeEvent:y.nativeEvent,target:M.current};W||Pe(C)}},[W,Pe]),ut=o.useCallback(y=>{var Ce,Gt;const{keyCode:C,altKey:L}=y,te=B.current&&B.current.element;if(!M.current||y.isDefaultPrevented()&&((Ce=U.current)==null?void 0:Ce.element)===y.target)return;const Ie={syntheticEvent:y,nativeEvent:y.nativeEvent,target:M.current};if(S&&S.length>0&&(C===d.Keys.left||C===d.Keys.right||C===d.Keys.home||C===d.Keys.end||C===d.Keys.delete)){const se=Q.current;let pe=ae?se.findIndex(vs=>It(vs,ae,u)):-1,ue;const Kt=pe!==-1;C===d.Keys.left?(Kt?pe=Math.max(0,pe-1):pe=se.length-1,ue=se[pe]):C===d.Keys.right?pe===se.length-1?ue=void 0:Kt&&(pe=Math.min(se.length-1,pe+1),ue=se[pe]):C===d.Keys.home?ue=se[0]:C===d.Keys.end?ue=se[se.length-1]:C===d.Keys.delete&&Kt&&ie(Ie,se[pe].data,"delete"),ue!==ae&&Be(ue)}if(W)if(C===d.Keys.esc||L&&C===d.Keys.up)y.preventDefault(),q(Ie);else if(te&&te.querySelector(".k-focus")&&(C===d.Keys.up||C===d.Keys.down||C===d.Keys.left||C===d.Keys.right||C===d.Keys.home||C===d.Keys.end)){if(C===d.Keys.up&&((Gt=U.current)!=null&&Gt.element)){const se=Array.from(te.querySelectorAll(".k-treeview-item")),pe=[...se].reverse().find(ue=>!!(ue&&ue.querySelector(".k-focus")));if(pe&&se.indexOf(pe)===0)return he(()=>{var ue;ee((ue=U.current)==null?void 0:ue.element)})}he(d.noop)}else C===d.Keys.down&&he(()=>{var se;ee(((se=U.current)==null?void 0:se.element)||te)});else L&&C===d.Keys.down&&(y.preventDefault(),Pe(Ie))},[W,q,ee,he,Pe,ae,u,S,ie]),je=o.useCallback(y=>{const{keyCode:C,altKey:L}=y;L||C!==d.Keys.up&&C!==d.Keys.down||(y.preventDefault(),he(C===d.Keys.up?()=>{ee(H.current)}:()=>{ee(B.current&&B.current.element)}))},[ee,he]),Ye=o.useCallback(y=>{if(!M.current)return;const C={syntheticEvent:y,nativeEvent:y.nativeEvent,target:M.current};ie(C,[],"clear"),q(C),y.preventDefault()},[ie,q]),Mt=o.useCallback((y,C)=>{var L;q({target:M.current}),z||ee((L=U.current)==null?void 0:L.element),ie({syntheticEvent:C,nativeEvent:C.nativeEvent,target:M.current},y,"delete")},[ie,q,ee,z]),Je=o.useCallback(y=>{if(e.onExpandChange&&M.current){const{item:C,itemHierarchicalIndex:L,nativeEvent:te,syntheticEvent:Ie}=y,Ce={level:ti(L),item:C,nativeEvent:te,syntheticEvent:Ie,target:M.current};e.onExpandChange.call(void 0,Ce)}},[e.onExpandChange]),Qe=o.useCallback(y=>{if(e.onFilterChange&&M.current){const L={filter:{field:e.textField,operator:"contains",value:y.target.value},syntheticEvent:y.syntheticEvent,nativeEvent:y.nativeEvent,target:M.current};e.onFilterChange.call(void 0,L),e.filter===void 0&&Se(y.target.value)}},[e.onFilterChange,e.filter,e.textField]),ht=o.useCallback(y=>{if(!M.current)return;const C={syntheticEvent:y,nativeEvent:y.nativeEvent,target:M.current};e.onCancel&&e.onCancel.call(void 0,C),q(C),y.preventDefault()},[e.onCancel,q]),Xe=()=>{const y=e.filterable?o.createElement(Me,{value:e.filter===void 0?Y:e.filter,ref:j,onChange:Qe,onKeyDown:je,size:de,rounded:I,fillMode:T}):null,C={adaptiveTitle:e.adaptiveTitle,expand:W,onClose:L=>e.onCancel?ht(L):Ye(L),windowWidth:P,mobileFilter:y,footer:{cancelText:ye.toLanguageString(st,ne[st]),onCancel:L=>e.onCancel?ht(L):Ye(L),applyText:ye.toLanguageString(tt,ne[tt]),onApply:L=>q(L)}};return o.createElement(qt,{...C},o.createElement(ge.ActionSheetContent,{className:"!k-overflow-hidden"},o.createElement("div",{className:"k-list-container"},o.createElement("div",{className:"k-list k-list-lg"},a.length>0?o.createElement(yt.TreeView,{ref:B,tabIndex:E,data:a,focusIdField:u,textField:e.textField,checkField:w,checkIndeterminateField:k,expandField:e.expandField,childrenField:D,expandIcons:!0,onItemClick:ze,onCheckChange:ze,onExpandChange:Je,checkboxes:!0,size:de,item:e.item,dir:Z}):o.createElement(ve,null,ye.toLanguageString(fe,ne[fe]))))))},ft=o.useCallback(y=>{for(let C of y)A(C.target.clientWidth)},[]),ve=e.listNoData||fs,ye=ke.useLocalization(),Te=!x||we.valid,{size:de,rounded:I,fillMode:T}=e,$=le&&W?me:Q.current,ce=o.createElement(o.Fragment,null,o.createElement("span",{className:d.classNames("k-multiselecttree k-input",e.className,{[`k-input-${ss[de]||de}`]:de,[`k-rounded-${ei[I]||I}`]:I,[`k-input-${T}`]:T,"k-focus":z&&!h,"k-invalid":!Te,"k-disabled":h,"k-loading":e.loading,"k-required":F}),tabIndex:E,accessKey:e.accessKey,id:n,style:v?{...c,width:void 0}:c,dir:Z,ref:H,onKeyDown:h?void 0:ut,onMouseDown:ct,onFocus:Tt,onBlur:dt,role:"combobox","aria-haspopup":"tree","aria-expanded":W,"aria-disabled":h,"aria-label":v,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy?e.ariaDescribedBy:"tagslist-"+n,"aria-required":e.required,onClick:h?void 0:pt},o.createElement("div",{id:"tagslist-"+n,className:d.classNames("k-input-values k-chip-list k-selection-multiple",{[`k-chip-list-${ss[de]||de}`]:de})},$.length>0&&o.createElement(Wt,{tag:e.tag,onTagDelete:Mt,data:$,guid:n,focused:ae?Q.current.find(y=>It(y,ae,u)):void 0,size:de})),o.createElement("span",{className:"k-input-inner"},$.length===0&&o.createElement("span",{className:"k-input-value-text"},m)),e.loading&&o.createElement(d.IconWrap,{className:"k-input-loading-icon",name:"loading"}),re&&!h&&$.length>0&&o.createElement(nt,{onClick:Ye}),o.createElement("select",{name:b,ref:X,tabIndex:-1,"aria-hidden":!0,title:v,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},o.createElement("option",{value:e.valueMap?e.valueMap.call(void 0,S):S})),!le&&o.createElement(xt.Popup,{...p,popupClass:d.classNames(p.popupClass,"k-multiselecttree-popup"),className:d.classNames(p.className,{"k-rtl":Z==="rtl"}),style:rt,anchor:p.anchor||H.current,show:W,onOpen:Dt,onClose:Ft,ref:J},e.filterable&&o.createElement(Me,{value:e.filter===void 0?Y:e.filter,ref:U,onChange:Qe,onKeyDown:je,tabIndex:E,size:de,rounded:I,fillMode:T}),a.length>0?o.createElement(yt.TreeView,{style:{height:p.height},ref:B,tabIndex:E,data:a,focusIdField:u,textField:e.textField,checkField:w,checkIndeterminateField:k,expandField:e.expandField,childrenField:D,expandIcons:!0,onItemClick:ze,onCheckChange:ze,onExpandChange:Je,checkboxes:!0,size:de,item:e.item,dir:Z}):o.createElement(ve,null,ye.toLanguageString(fe,ne[fe])))),le&&Xe());return v?o.createElement(qe.FloatingLabel,{label:v,editorValue:re,editorPlaceholder:m,editorValid:Te,editorDisabled:h,editorId:n,style:{width:c?c.width:void 0},children:ce,dir:Z}):ce}),ii={opened:l.bool,disabled:l.bool,dir:l.string,tabIndex:l.number,accessKey:l.string,data:l.array,value:l.any,valueMap:l.func,placeholder:l.string,dataItemKey:l.string.isRequired,textField:l.string.isRequired,checkField:l.string,checkIndeterminateField:l.string,expandField:l.string,subItemsField:l.string,className:l.string,style:l.object,label:l.string,validationMessage:l.string,validityStyles:l.bool,valid:l.bool,required:l.bool,name:l.string,id:l.string,ariaLabelledBy:l.string,ariaDescribedBy:l.string,filterable:l.bool,filter:l.string,loading:l.bool,tags:l.arrayOf(l.shape({text:l.string,data:l.arrayOf(l.any)})),popupSettings:l.shape({animate:l.oneOfType([l.bool,l.shape({openDuration:l.number,closeDuration:l.number})]),popupClass:l.string,className:l.string,appendTo:l.any,width:l.oneOfType([l.string,l.number]),height:l.oneOfType([l.string,l.number])}),onOpen:l.func,onClose:l.func,onFocus:l.func,onBlur:l.func,onChange:l.func,onFilterChange:l.func,onExpandChange:l.func,onCancel:l.func,item:l.func,listNoData:l.func,adaptiveTitle:l.string,adaptive:l.bool};wt.displayName="KendoReactMultiSelectTree";wt.defaultProps=Oe;wt.propTypes=ii;const Ae=(i,t)=>{const e={};return i&&i.length&&i.forEach(s=>{e[t(s)]=!0}),e},ni=(i,t)=>{const{items:e,dataItemKey:s,value:n,subItemsField:a="items",operation:u}=t,p=d.getter(s),c=Ae(n,p);if(u==="clear")return[];if(u==="delete"){const K=Ae(e,p);return n.filter(O=>!K[p(O)])}const r=e[0],h=p(r),f=d.getter(a),g=[...i],m=[];let v=[],b;for(;g.length;){const K=g.pop();if(h===p(K)){v=m.map(O=>O.item),b=K;break}else{m&&m.length&&m[m.length-1].parentPosition===g.length&&m.pop();const O=f(K);O&&O.length&&(m.push({item:K,parentPosition:g.length}),g.push(...O))}}const w=[...f(b)||[]];let k=[];for(;w.length;){const K=w.pop();k.push(K);const O=f(K);O&&O.length&&w.push(...O)}const D=!c[h],N=[];if(D){N.push(...n),N.push(b),N.push(...k.filter(S=>!c[p(S)]));const K=v.filter(S=>!c[p(S)]),O=Ae(N,p);for(let S=K.length-1;S>-1;S--){const F=K[S],x=f(F);if(x.filter(M=>O[p(M)]).length<x.length)break;N.push(F),O[p(F)]=!0}}else{const K=p(b),O=Ae(k,p),S=Ae(v,p);N.push(...n.filter(F=>{const x=p(F);return!O[x]&&K!==x&&!S[x]}))}return N};exports.AutoComplete=ds;exports.AutoCompletePropsContext=rs;exports.AutoCompleteWithoutContext=ot;exports.ComboBox=At;exports.ComboBoxPropsContext=ls;exports.ComboBoxWithoutContext=Ue;exports.DropDownList=as;exports.DropDownListClassComponent=Ge;exports.DropDownListPropsContext=os;exports.DropDownListWithoutContext=Ge;exports.DropDownTree=$t;exports.DropDownTreePropsContext=gs;exports.List=Re;exports.ListContainer=it;exports.ListFilter=Me;exports.ListItem=ns;exports.MultiColumnComboBox=St;exports.MultiColumnComboBoxPropsContext=us;exports.MultiSelect=ps;exports.MultiSelectPropsContext=cs;exports.MultiSelectTree=wt;exports.MultiSelectTreePropsContext=ms;exports.MultiSelectWithoutContext=at;exports.SearchBar=kt;exports.TagList=Wt;exports.dropdownsMessages=ne;exports.findByFieldValue=xs;exports.getItemValue=R;exports.getMultiSelectTreeValue=ni;exports.getValueMap=Ae;exports.nodata=fe;exports.scrollToItem=is;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./DropDownList/DropDownList.js"),p=require("./common/ListItem.js"),c=require("./common/List.js"),x=require("./common/SearchBar.js"),m=require("./common/ListContainer.js"),D=require("./common/ListFilter.js"),n=require("./messages/index.js"),e=require("./common/utils.js"),o=require("./ComboBox/ComboBox.js"),r=require("./AutoComplete/AutoComplete.js"),i=require("./MultiSelect/MultiSelect.js"),a=require("./MultiSelect/TagList.js"),u=require("./MultiColumnComboBox/MultiColumnComboBox.js"),l=require("./DropDownTree/DropDownTree.js"),s=require("./MultiSelectTree/MultiSelectTree.js"),C=require("./MultiSelectTree/utils.js");exports.DropDownList=t.DropDownList;exports.DropDownListClassComponent=t.DropDownListWithoutContext;exports.DropDownListPropsContext=t.DropDownListPropsContext;exports.DropDownListWithoutContext=t.DropDownListWithoutContext;exports.ListItem=p;exports.List=c;exports.SearchBar=x;exports.ListContainer=m;exports.ListFilter=D;exports.dropdownsMessages=n.messages;exports.nodata=n.nodata;exports.findByFieldValue=e.findByFieldValue;exports.getItemValue=e.getItemValue;exports.scrollToItem=e.scrollToItem;exports.ComboBox=o.ComboBox;exports.ComboBoxPropsContext=o.ComboBoxPropsContext;exports.ComboBoxWithoutContext=o.ComboBoxWithoutContext;exports.AutoComplete=r.AutoComplete;exports.AutoCompletePropsContext=r.AutoCompletePropsContext;exports.AutoCompleteWithoutContext=r.AutoCompleteWithoutContext;exports.MultiSelect=i.MultiSelect;exports.MultiSelectPropsContext=i.MultiSelectPropsContext;exports.MultiSelectWithoutContext=i.MultiSelectWithoutContext;exports.TagList=a;exports.MultiColumnComboBox=u.MultiColumnComboBox;exports.MultiColumnComboBoxPropsContext=u.MultiColumnComboBoxPropsContext;exports.DropDownTree=l.DropDownTree;exports.DropDownTreePropsContext=l.DropDownTreePropsContext;exports.MultiSelectTree=s.MultiSelectTree;exports.MultiSelectTreePropsContext=s.MultiSelectTreePropsContext;exports.getMultiSelectTreeValue=C.getMultiSelectTreeValue;exports.getValueMap=C.getValueMap;
|