@progress/kendo-react-listbox 7.0.3-develop.4 → 7.0.3-develop.7
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/LICENSE.md +1 -1
- package/ListBox.d.ts +1 -1
- package/ListBoxToolbar.d.ts +1 -1
- package/NOTICE.txt +1 -1
- package/README.md +1 -1
- package/dist/cdn/js/kendo-react-listbox.js +1 -1
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +2 -2
- package/interfaces/Enums.d.ts +1 -1
- package/interfaces/ListBoxEvents.d.ts +1 -1
- package/interfaces/ListBoxProps.d.ts +1 -1
- package/interfaces/ListBoxToolBarProps.d.ts +1 -1
- package/messages/index.d.ts +1 -1
- package/package-metadata.d.ts +1 -1
- package/package.json +4 -4
- package/utils.d.ts +1 -1
package/LICENSE.md
CHANGED
|
@@ -8,4 +8,4 @@ This is commercial software. To use it, you need to agree to the [**End User Lic
|
|
|
8
8
|
|
|
9
9
|
All available KendoReact commercial licenses may be obtained at the [KendoReact website](https://www.telerik.com/kendo-react-ui/pricing).
|
|
10
10
|
|
|
11
|
-
*Copyright ©
|
|
11
|
+
*Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
|
package/ListBox.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
package/ListBoxToolbar.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
package/NOTICE.txt
CHANGED
package/README.md
CHANGED
|
@@ -47,6 +47,6 @@ High-level component overview pages
|
|
|
47
47
|
|
|
48
48
|
* [React ListBox Component](https://www.telerik.com/kendo-react-ui/listbox)
|
|
49
49
|
|
|
50
|
-
*Copyright ©
|
|
50
|
+
*Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
|
|
51
51
|
|
|
52
52
|
*Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
(function(d,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-intl"),require("@progress/kendo-svg-icons")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-buttons","@progress/kendo-react-intl","@progress/kendo-svg-icons"],b):(d=typeof globalThis<"u"?globalThis:d||self,b(d.KendoReactListbox={},d.React,d.PropTypes,d.KendoReactCommon,d.KendoReactButtons,d.KendoReactIntl,d.KendoSvgIcons))})(this,function(d,b,u,h,w,k,f){"use strict";"use client";function F(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const p=F(b);var E=(a=>(a.TOP="top",a.BOTTOM="bottom",a.LEFT="left",a.RIGHT="right",a.NONE="none",a))(E||{});const O={name:"@progress/kendo-react-listbox",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1607357111,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};let L=class extends p.PureComponent{constructor(t){super(t),this.setSelected=e=>{if(this.props.selectedField)return!!e[this.props.selectedField]},this.renderItem=e=>this.props.textField?e[this.props.textField]:e.toString(),this.handleKeyDown=e=>{this.props.onKeyDown&&h.dispatchEvent(this.props.onKeyDown,e,this,void 0)},this.handleContainerDrop=e=>{e.target.classList.contains("k-list-content")&&(this.props.data.length>0?h.dispatchEvent(this.props.onDrop,e,this,{dataItem:this.props.data[this.props.data.length-1]}):h.dispatchEvent(this.props.onDrop,e,this,{dataItem:null}))},this.setToolbarPosition=()=>this.props.toolbarPosition===E.NONE||this.props.toolbar===void 0?"":`k-listbox-actions-${this.props.toolbarPosition}`,this.handleOnDragLeave=e=>{this.props.onDragLeave&&e.target.classList.contains("k-list-content")&&h.dispatchEvent(this.props.onDragLeave,e,this,void 0)},h.validatePackage(O)}get itemGuid(){return this.props.id+"-accessibility-id"}render(){return p.createElement("div",{id:this.props.id,className:h.classNames(this.props.className,"k-listbox",this.setToolbarPosition()),style:this.props.style,unselectable:"on"},this.props.toolbar&&this.props.toolbarPosition!=="bottom"&&p.createElement(this.props.toolbar,null),p.createElement("div",{className:"k-list-scroller k-selectable","data-role":"selectable",onDragOver:t=>t.preventDefault(),onDrop:this.handleContainerDrop,onDragLeave:this.handleOnDragLeave},p.createElement("div",{className:h.classNames("k-list",{[`k-list-${h.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},p.createElement("div",{className:"k-list-content"},p.createElement("ul",{className:"k-list-ul",role:"listbox","aria-label":"listbox-container",tabIndex:0,onKeyDown:this.handleKeyDown},this.props.data.map((t,e)=>{const s=this.setSelected(t),r={className:h.classNames("k-list-item",{"k-selected":s}),role:"option","aria-selected":s,key:e,id:this.itemGuid+e,"data-uid":this.itemGuid+e,draggable:this.props.draggable,onDragStart:o=>h.dispatchEvent(this.props.onDragStart,o,this,{dataItem:t}),onDragOver:o=>{o.preventDefault(),h.dispatchEvent(this.props.onDragOver,o,this,{dataItem:t})},onDrop:o=>h.dispatchEvent(this.props.onDrop,o,this,{dataItem:t}),onClick:o=>h.dispatchEvent(this.props.onItemClick,o,this,{dataItem:t})};return this.props.item?p.createElement(this.props.item,{selected:s,dataItem:t,...r,key:r.key},p.createElement("span",{className:"k-list-item-text"},t.name)):p.createElement("li",{...r,key:r.key},p.createElement("span",{className:"k-list-item-text"},this.renderItem(t)))}))))),this.props.toolbar&&this.props.toolbarPosition==="bottom"&&p.createElement(this.props.toolbar,null),p.createElement("select",{style:{display:"none"},multiple:!0,"data-role":"listbox"},this.props.data.map((t,e)=>{const s=t[this.props.valueField||this.props.textField];return p.createElement("option",{key:e,value:s},s)})))}};L.propTypes={size:u.oneOf([null,"small","medium","large"]),toolbarPosition:u.oneOf(["none","top","bottom","left","right"]),textField:u.string,valueField:u.string,selectedField:u.string,data:u.array},L.defaultProps={toolbarPosition:E.RIGHT,draggable:!0,size:"medium"};const C="listbox.moveUp",K="listbox.moveDown",S="listbox.transferTo",z="listbox.transferFrom",U="listbox.transferAllTo",M="listbox.transferAllFrom",j="listbox.remove",q={[C]:"Move Up",[K]:"Move Down",[S]:"Transfer To",[z]:"Transfer From",[U]:"Transfer All To",[M]:"Transfer All From",[j]:"Delete"},N=[{name:"moveUp",iconName:"caret-alt-up",svgIcon:f.caretAltUpIcon},{name:"moveDown",iconName:"caret-alt-down",svgIcon:f.caretAltDownIcon},{name:"transferTo",iconName:"caret-alt-right",svgIcon:f.caretAltRightIcon},{name:"transferFrom",iconName:"caret-alt-left",svgIcon:f.caretAltLeftIcon},{name:"transferAllTo",iconName:"caret-double-alt-right",svgIcon:f.caretDoubleAltRightIcon},{name:"transferAllFrom",iconName:"caret-double-alt-left",svgIcon:f.caretDoubleAltLeftIcon},{name:"remove",iconName:"x",svgIcon:f.xIcon}];class D extends p.PureComponent{constructor(){super(...arguments),this.checkSvgIcon=t=>{switch(t.name){case"caret-alt-right":return f.caretAltLeftIcon;case"caret-alt-left":return f.caretAltRightIcon;case"caret-double-alt-right":return f.caretDoubleAltLeftIcon;case"caret-double-alt-left":return f.caretDoubleAltRightIcon}return t},this.checkFontIcon=t=>{switch(t){case"caret-alt-right":return"caret-alt-left";case"caret-alt-left":return"caret-alt-right";case"caret-double-alt-right":return"caret-double-alt-left";case"caret-double-alt-left":return"caret-double-alt-right"}return t},this.handleToolClick=(t,e)=>{h.dispatchEvent(this.props.onToolClick,t,this,{toolName:e})},this.isItemDisabled=t=>{let e=!0;const s=this.props.selectedField||"selected",r=this.props.data.length,o=this.props.dataConnected.length,i=this.props.data.findIndex(n=>n[s]===!0)>=0,c=this.props.dataConnected.findIndex(n=>n[s]===!0)>=0;switch(t){case"moveUp":i?e=this.props.data.length>0?this.props.data[0].selected:!0:c?e=this.props.dataConnected.length>0?this.props.dataConnected[0].selected:!0:e=!0;break;case"moveDown":i?e=this.props.data[r-1]?this.props.data[r-1].selected:!0:c?e=this.props.dataConnected.length>0?this.props.dataConnected[o-1].selected:!0:e=!0;break;case"transferTo":e=!(this.props.dataConnected&&i);break;case"transferFrom":this.props.dataConnected?e=!(this.props.dataConnected&&c):e=!0;break;case"transferAllTo":e=!(this.props.dataConnected&&this.props.data.length>0);break;case"transferAllFrom":e=!(this.props.dataConnected&&this.props.dataConnected.length>0);break;case"remove":e=!(i||c);break}return e}}get isRtl(){return this.props.dir==="rtl"}render(){const t=k.provideLocalizationService(this);return p.createElement("div",{className:h.classNames("k-listbox-actions")},this.props.tools&&this.props.tools.map((e,s)=>{const r=N.findIndex(l=>l.name===e),o=N[r],i=this.isItemDisabled(o.name),c=`listbox.${o.name}`,n=t.toLanguageString(c,q[c]);return p.createElement(w.Button,{key:s,disabled:i,"data-command":o.name,title:n,"aria-label":n,icon:this.isRtl?this.checkFontIcon(o.iconName):o.iconName,svgIcon:this.isRtl?this.checkSvgIcon(o.svgIcon):o.svgIcon,onClick:l=>{l.preventDefault(),this.handleToolClick(l,o.name||null)}})}))}}D.propTypes={data:u.array,dataConnected:u.array,tools:u.array,selectedField:u.string,dir:u.string},D.defaultProps={data:[],dataConnected:[],selectedField:"selected"},k.registerForLocalization(D);const G=(a=[],t=[],e,s)=>{let r=[],o=[],i=[];const c={listBoxOneData:a,listBoxTwoData:t};switch(e){case"moveUp":r=[...a],r.forEach((n,l)=>{n[s]&&(r=m(l,l-1,r))}),i=[...t],i.forEach((n,l)=>{n[s]&&(i=m(l,l-1,i))}),c.listBoxOneData=r,c.listBoxTwoData=i;break;case"moveDown":r=a.reverse(),r.forEach((n,l)=>{n[s]&&(r=m(l,l-1,r))}),i=t.reverse(),i.forEach((n,l)=>{n[s]&&(i=m(l,l-1,i))}),c.listBoxOneData=[...r].reverse(),c.listBoxTwoData=[...i].reverse();break;case"transferTo":r=a.filter(n=>!n[s]),o=a.filter(n=>n[s]),i=t.concat(o),c.listBoxOneData=r,c.listBoxTwoData=i;break;case"transferFrom":i=t.filter(n=>!n[s]),o=t.filter(n=>n[s]),r=a.concat(o),c.listBoxOneData=r,c.listBoxTwoData=i;break;case"transferAllTo":c.listBoxOneData=[],c.listBoxTwoData=t.concat(a);break;case"transferAllFrom":c.listBoxOneData=t.concat(a),c.listBoxTwoData=[];break;case"remove":i=t.filter(n=>!n[s]),r=a.filter(n=>!n[s]),c.listBoxOneData=r,c.listBoxTwoData=i;break}return c},m=(a,t,e)=>{const s=e.splice(a,1)[0];return e.splice(t,0,s),e},P=(a=[],t=[],e,s,r)=>{const o=a.findIndex(g=>g[r]===e[r]),i=t.findIndex(g=>g[r]===e[r]),c=s!==null?a.findIndex(g=>g[r]===s[r]):-1,n=s!==null?t.findIndex(g=>g[r]===s[r]):-1,l=o>=0,T=i>=0,y=c>=0,A=n>=0,v=[...a],I=[...t];return l&&y?{listBoxOneData:m(o,c,a),listBoxTwoData:t}:T&&A?{listBoxOneData:a,listBoxTwoData:m(i,n,t)}:l&&(A||s===null)?(s===null?I.push(a[o]):I.splice(n+1,0,a[o]),v.splice(o,1),{listBoxOneData:v,listBoxTwoData:I}):T&&(y||s===null)?(s===null?v.push(t[i]):v.splice(c+1,0,t[i]),I.splice(i,1),{listBoxOneData:v,listBoxTwoData:I}):{listBoxOneData:a,listBoxTwoData:t}},x=h.withIdHOC(L);x.displayName="KendoReactListBox",d.ListBox=x,d.ListBoxToolbar=D,d.moveItem=m,d.processListBoxData=G,d.processListBoxDragAndDrop=P,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
package/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
export * from './index';
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { type ListBoxProps } from './interfaces/ListBoxProps';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),m=require("prop-types"),d=require("@progress/kendo-react-common"),C=require("@progress/kendo-react-buttons"),x=require("@progress/kendo-react-intl"),h=require("@progress/kendo-svg-icons");function A(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const p=A(y);var I=(o=>(o.TOP="top",o.BOTTOM="bottom",o.LEFT="left",o.RIGHT="right",o.NONE="none",o))(I||{});const S={name:"@progress/kendo-react-listbox",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1607357111,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};let k=class extends p.PureComponent{constructor(e){super(e),this.setSelected=t=>{if(this.props.selectedField)return!!t[this.props.selectedField]},this.renderItem=t=>this.props.textField?t[this.props.textField]:t.toString(),this.handleKeyDown=t=>{this.props.onKeyDown&&d.dispatchEvent(this.props.onKeyDown,t,this,void 0)},this.handleContainerDrop=t=>{t.target.classList.contains("k-list-content")&&(this.props.data.length>0?d.dispatchEvent(this.props.onDrop,t,this,{dataItem:this.props.data[this.props.data.length-1]}):d.dispatchEvent(this.props.onDrop,t,this,{dataItem:null}))},this.setToolbarPosition=()=>this.props.toolbarPosition===I.NONE||this.props.toolbar===void 0?"":`k-listbox-actions-${this.props.toolbarPosition}`,this.handleOnDragLeave=t=>{this.props.onDragLeave&&t.target.classList.contains("k-list-content")&&d.dispatchEvent(this.props.onDragLeave,t,this,void 0)},d.validatePackage(S)}get itemGuid(){return this.props.id+"-accessibility-id"}render(){return p.createElement("div",{id:this.props.id,className:d.classNames(this.props.className,"k-listbox",this.setToolbarPosition()),style:this.props.style,unselectable:"on"},this.props.toolbar&&this.props.toolbarPosition!=="bottom"&&p.createElement(this.props.toolbar,null),p.createElement("div",{className:"k-list-scroller k-selectable","data-role":"selectable",onDragOver:e=>e.preventDefault(),onDrop:this.handleContainerDrop,onDragLeave:this.handleOnDragLeave},p.createElement("div",{className:d.classNames("k-list",{[`k-list-${d.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},p.createElement("div",{className:"k-list-content"},p.createElement("ul",{className:"k-list-ul",role:"listbox","aria-label":"listbox-container",tabIndex:0,onKeyDown:this.handleKeyDown},this.props.data.map((e,t)=>{const s=this.setSelected(e),r={className:d.classNames("k-list-item",{"k-selected":s}),role:"option","aria-selected":s,key:t,id:this.itemGuid+t,"data-uid":this.itemGuid+t,draggable:this.props.draggable,onDragStart:a=>d.dispatchEvent(this.props.onDragStart,a,this,{dataItem:e}),onDragOver:a=>{a.preventDefault(),d.dispatchEvent(this.props.onDragOver,a,this,{dataItem:e})},onDrop:a=>d.dispatchEvent(this.props.onDrop,a,this,{dataItem:e}),onClick:a=>d.dispatchEvent(this.props.onItemClick,a,this,{dataItem:e})};return this.props.item?p.createElement(this.props.item,{selected:s,dataItem:e,...r,key:r.key},p.createElement("span",{className:"k-list-item-text"},e.name)):p.createElement("li",{...r,key:r.key},p.createElement("span",{className:"k-list-item-text"},this.renderItem(e)))}))))),this.props.toolbar&&this.props.toolbarPosition==="bottom"&&p.createElement(this.props.toolbar,null),p.createElement("select",{style:{display:"none"},multiple:!0,"data-role":"listbox"},this.props.data.map((e,t)=>{const s=e[this.props.valueField||this.props.textField];return p.createElement("option",{key:t,value:s},s)})))}};k.propTypes={size:m.oneOf([null,"small","medium","large"]),toolbarPosition:m.oneOf(["none","top","bottom","left","right"]),textField:m.string,valueField:m.string,selectedField:m.string,data:m.array};k.defaultProps={toolbarPosition:I.RIGHT,draggable:!0,size:"medium"};const w="listbox.moveUp",F="listbox.moveDown",O="listbox.transferTo",R="listbox.transferFrom",P="listbox.transferAllTo",z="listbox.transferAllFrom",K="listbox.remove",U={[w]:"Move Up",[F]:"Move Down",[O]:"Transfer To",[R]:"Transfer From",[P]:"Transfer All To",[z]:"Transfer All From",[K]:"Delete"},L=[{name:"moveUp",iconName:"caret-alt-up",svgIcon:h.caretAltUpIcon},{name:"moveDown",iconName:"caret-alt-down",svgIcon:h.caretAltDownIcon},{name:"transferTo",iconName:"caret-alt-right",svgIcon:h.caretAltRightIcon},{name:"transferFrom",iconName:"caret-alt-left",svgIcon:h.caretAltLeftIcon},{name:"transferAllTo",iconName:"caret-double-alt-right",svgIcon:h.caretDoubleAltRightIcon},{name:"transferAllFrom",iconName:"caret-double-alt-left",svgIcon:h.caretDoubleAltLeftIcon},{name:"remove",iconName:"x",svgIcon:h.xIcon}];class v extends p.PureComponent{constructor(){super(...arguments),this.checkSvgIcon=e=>{switch(e.name){case"caret-alt-right":return h.caretAltLeftIcon;case"caret-alt-left":return h.caretAltRightIcon;case"caret-double-alt-right":return h.caretDoubleAltLeftIcon;case"caret-double-alt-left":return h.caretDoubleAltRightIcon}return e},this.checkFontIcon=e=>{switch(e){case"caret-alt-right":return"caret-alt-left";case"caret-alt-left":return"caret-alt-right";case"caret-double-alt-right":return"caret-double-alt-left";case"caret-double-alt-left":return"caret-double-alt-right"}return e},this.handleToolClick=(e,t)=>{d.dispatchEvent(this.props.onToolClick,e,this,{toolName:t})},this.isItemDisabled=e=>{let t=!0;const s=this.props.selectedField||"selected",r=this.props.data.length,a=this.props.dataConnected.length,i=this.props.data.findIndex(n=>n[s]===!0)>=0,c=this.props.dataConnected.findIndex(n=>n[s]===!0)>=0;switch(e){case"moveUp":i?t=this.props.data.length>0?this.props.data[0].selected:!0:c?t=this.props.dataConnected.length>0?this.props.dataConnected[0].selected:!0:t=!0;break;case"moveDown":i?t=this.props.data[r-1]?this.props.data[r-1].selected:!0:c?t=this.props.dataConnected.length>0?this.props.dataConnected[a-1].selected:!0:t=!0;break;case"transferTo":t=!(this.props.dataConnected&&i);break;case"transferFrom":this.props.dataConnected?t=!(this.props.dataConnected&&c):t=!0;break;case"transferAllTo":t=!(this.props.dataConnected&&this.props.data.length>0);break;case"transferAllFrom":t=!(this.props.dataConnected&&this.props.dataConnected.length>0);break;case"remove":t=!(i||c);break}return t}}get isRtl(){return this.props.dir==="rtl"}render(){const e=x.provideLocalizationService(this);return p.createElement("div",{className:d.classNames("k-listbox-actions")},this.props.tools&&this.props.tools.map((t,s)=>{const r=L.findIndex(l=>l.name===t),a=L[r],i=this.isItemDisabled(a.name),c=`listbox.${a.name}`,n=e.toLanguageString(c,U[c]);return p.createElement(C.Button,{key:s,disabled:i,"data-command":a.name,title:n,"aria-label":n,icon:this.isRtl?this.checkFontIcon(a.iconName):a.iconName,svgIcon:this.isRtl?this.checkSvgIcon(a.svgIcon):a.svgIcon,onClick:l=>{l.preventDefault(),this.handleToolClick(l,a.name||null)}})}))}}v.propTypes={data:m.array,dataConnected:m.array,tools:m.array,selectedField:m.string,dir:m.string};v.defaultProps={data:[],dataConnected:[],selectedField:"selected"};x.registerForLocalization(v);const M=(o=[],e=[],t,s)=>{let r=[],a=[],i=[];const c={listBoxOneData:o,listBoxTwoData:e};switch(t){case"moveUp":r=[...o],r.forEach((n,l)=>{n[s]&&(r=f(l,l-1,r))}),i=[...e],i.forEach((n,l)=>{n[s]&&(i=f(l,l-1,i))}),c.listBoxOneData=r,c.listBoxTwoData=i;break;case"moveDown":r=o.reverse(),r.forEach((n,l)=>{n[s]&&(r=f(l,l-1,r))}),i=e.reverse(),i.forEach((n,l)=>{n[s]&&(i=f(l,l-1,i))}),c.listBoxOneData=[...r].reverse(),c.listBoxTwoData=[...i].reverse();break;case"transferTo":r=o.filter(n=>!n[s]),a=o.filter(n=>n[s]),i=e.concat(a),c.listBoxOneData=r,c.listBoxTwoData=i;break;case"transferFrom":i=e.filter(n=>!n[s]),a=e.filter(n=>n[s]),r=o.concat(a),c.listBoxOneData=r,c.listBoxTwoData=i;break;case"transferAllTo":c.listBoxOneData=[],c.listBoxTwoData=e.concat(o);break;case"transferAllFrom":c.listBoxOneData=e.concat(o),c.listBoxTwoData=[];break;case"remove":i=e.filter(n=>!n[s]),r=o.filter(n=>!n[s]),c.listBoxOneData=r,c.listBoxTwoData=i;break}return c},f=(o,e,t)=>{const s=t.splice(o,1)[0];return t.splice(e,0,s),t},q=(o=[],e=[],t,s,r)=>{const a=o.findIndex(u=>u[r]===t[r]),i=e.findIndex(u=>u[r]===t[r]),c=s!==null?o.findIndex(u=>u[r]===s[r]):-1,n=s!==null?e.findIndex(u=>u[r]===s[r]):-1,l=a>=0,D=i>=0,E=c>=0,T=n>=0,g=[...o],b=[...e];return l&&E?{listBoxOneData:f(a,c,o),listBoxTwoData:e}:D&&T?{listBoxOneData:o,listBoxTwoData:f(i,n,e)}:l&&(T||s===null)?(s===null?b.push(o[a]):b.splice(n+1,0,o[a]),g.splice(a,1),{listBoxOneData:g,listBoxTwoData:b}):D&&(E||s===null)?(s===null?g.push(e[i]):g.splice(c+1,0,e[i]),b.splice(i,1),{listBoxOneData:g,listBoxTwoData:b}):{listBoxOneData:o,listBoxTwoData:e}},N=d.withIdHOC(k);N.displayName="KendoReactListBox";exports.ListBox=N;exports.ListBoxToolbar=v;exports.moveItem=f;exports.processListBoxData=M;exports.processListBoxDragAndDrop=q;
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
"use client";
|
|
@@ -14,7 +14,7 @@ const z = {
|
|
|
14
14
|
name: "@progress/kendo-react-listbox",
|
|
15
15
|
productName: "KendoReact",
|
|
16
16
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
17
|
-
publishDate:
|
|
17
|
+
publishDate: 1704377311,
|
|
18
18
|
version: "",
|
|
19
19
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
20
20
|
};
|
package/interfaces/Enums.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
export declare enum toolbarPosition {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { BaseEvent } from '@progress/kendo-react-common';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { ComponentType } from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { ListBoxToolbarClickEvent } from './ListBoxEvents';
|
package/messages/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
package/package-metadata.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { PackageMetadata } from '@progress/kendo-licensing';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-listbox",
|
|
3
|
-
"version": "7.0.3-develop.
|
|
3
|
+
"version": "7.0.3-develop.7",
|
|
4
4
|
"description": "React ListBox enables you to display a list of items and manage the data between multiple lists. KendoReact ListBox package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-licensing": "^1.3.4",
|
|
26
|
-
"@progress/kendo-react-buttons": "7.0.3-develop.
|
|
27
|
-
"@progress/kendo-react-common": "7.0.3-develop.
|
|
28
|
-
"@progress/kendo-react-intl": "7.0.3-develop.
|
|
26
|
+
"@progress/kendo-react-buttons": "7.0.3-develop.7",
|
|
27
|
+
"@progress/kendo-react-common": "7.0.3-develop.7",
|
|
28
|
+
"@progress/kendo-react-intl": "7.0.3-develop.7",
|
|
29
29
|
"@progress/kendo-svg-icons": "^2.1.0",
|
|
30
30
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
31
31
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
package/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|