@progress/kendo-vue-listbox 8.0.3-develop.1 → 8.0.3-develop.3
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/ListBox.d.ts +93 -0
- package/ListBoxToolbar.d.ts +38 -0
- package/dist/cdn/js/kendo-vue-listbox.js +1 -1
- package/index.d.mts +8 -305
- package/index.d.ts +8 -305
- package/interfaces/Enums.d.ts +14 -0
- package/interfaces/Enums.js +1 -1
- package/interfaces/Enums.mjs +2 -2
- package/interfaces/ListBoxEvents.d.ts +20 -0
- package/interfaces/ListBoxProps.d.ts +99 -0
- package/interfaces/ListBoxToolBarProps.d.ts +39 -0
- package/messages/main.d.ts +47 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -7
- package/utils.d.ts +38 -0
package/ListBox.d.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { toolbarPosition } from './interfaces/Enums';
|
|
9
|
+
import { PropType } from 'vue';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
declare const ListBox: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
14
|
+
size: {
|
|
15
|
+
type: PropType<"small" | "medium" | "large">;
|
|
16
|
+
validator: (value: string) => boolean;
|
|
17
|
+
};
|
|
18
|
+
toolbarPosition: {
|
|
19
|
+
type: PropType<string>;
|
|
20
|
+
default: toolbarPosition;
|
|
21
|
+
validator: (value: string) => boolean;
|
|
22
|
+
};
|
|
23
|
+
textField: PropType<string>;
|
|
24
|
+
valueField: PropType<string>;
|
|
25
|
+
keyField: PropType<string>;
|
|
26
|
+
selectedField: PropType<string>;
|
|
27
|
+
item: PropType<string | object | Function>;
|
|
28
|
+
toolbar: PropType<string | object | Function>;
|
|
29
|
+
tabIndex: PropType<number>;
|
|
30
|
+
dataItems: {
|
|
31
|
+
type: PropType<any[]>;
|
|
32
|
+
default: () => any[];
|
|
33
|
+
};
|
|
34
|
+
draggable: {
|
|
35
|
+
type: PropType<boolean>;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
}>, {}, {}, {
|
|
39
|
+
wrapperClass(): {
|
|
40
|
+
[x: string]: boolean;
|
|
41
|
+
'k-listbox': boolean;
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
44
|
+
dispatchEvent(eventName: string, event: any, item: any): void;
|
|
45
|
+
setSelected(item: any): boolean;
|
|
46
|
+
handleKeyDown(event: any): void;
|
|
47
|
+
handleContainerDrop(event: any): void;
|
|
48
|
+
handleOnDragLeave(event: any): void;
|
|
49
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
50
|
+
dragstart: any;
|
|
51
|
+
itemclick: any;
|
|
52
|
+
drop: any;
|
|
53
|
+
dragover: any;
|
|
54
|
+
keydown: any;
|
|
55
|
+
dragleave: any;
|
|
56
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
57
|
+
size: {
|
|
58
|
+
type: PropType<"small" | "medium" | "large">;
|
|
59
|
+
validator: (value: string) => boolean;
|
|
60
|
+
};
|
|
61
|
+
toolbarPosition: {
|
|
62
|
+
type: PropType<string>;
|
|
63
|
+
default: toolbarPosition;
|
|
64
|
+
validator: (value: string) => boolean;
|
|
65
|
+
};
|
|
66
|
+
textField: PropType<string>;
|
|
67
|
+
valueField: PropType<string>;
|
|
68
|
+
keyField: PropType<string>;
|
|
69
|
+
selectedField: PropType<string>;
|
|
70
|
+
item: PropType<string | object | Function>;
|
|
71
|
+
toolbar: PropType<string | object | Function>;
|
|
72
|
+
tabIndex: PropType<number>;
|
|
73
|
+
dataItems: {
|
|
74
|
+
type: PropType<any[]>;
|
|
75
|
+
default: () => any[];
|
|
76
|
+
};
|
|
77
|
+
draggable: {
|
|
78
|
+
type: PropType<boolean>;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
}>> & Readonly<{
|
|
82
|
+
onDragleave?: (...args: any[] | unknown[]) => any;
|
|
83
|
+
onDragover?: (...args: any[] | unknown[]) => any;
|
|
84
|
+
onDragstart?: (...args: any[] | unknown[]) => any;
|
|
85
|
+
onDrop?: (...args: any[] | unknown[]) => any;
|
|
86
|
+
onKeydown?: (...args: any[] | unknown[]) => any;
|
|
87
|
+
onItemclick?: (...args: any[] | unknown[]) => any;
|
|
88
|
+
}>, {
|
|
89
|
+
draggable: boolean;
|
|
90
|
+
toolbarPosition: string;
|
|
91
|
+
dataItems: any[];
|
|
92
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
93
|
+
export { ListBox };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { PropType } from 'vue';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
declare const ListBoxToolbar: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
13
|
+
dataItems: PropType<any[]>;
|
|
14
|
+
dataConnected: PropType<any[]>;
|
|
15
|
+
tools: PropType<string[]>;
|
|
16
|
+
selectedField: {
|
|
17
|
+
type: PropType<string>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
}>, {}, {
|
|
21
|
+
currentRtl: boolean;
|
|
22
|
+
}, {}, {
|
|
23
|
+
getRtlSvgIcon(toolIcon: any): any;
|
|
24
|
+
getRtlFontIcon(toolIcon: any): any;
|
|
25
|
+
handleToolClick(event: any, name: any): void;
|
|
26
|
+
isItemDisabled(tool: string): boolean;
|
|
27
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
28
|
+
dataItems: PropType<any[]>;
|
|
29
|
+
dataConnected: PropType<any[]>;
|
|
30
|
+
tools: PropType<string[]>;
|
|
31
|
+
selectedField: {
|
|
32
|
+
type: PropType<string>;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
}>> & Readonly<{}>, {
|
|
36
|
+
selectedField: string;
|
|
37
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
export { ListBoxToolbar };
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-vue-buttons"),require("@progress/kendo-vue-intl"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-vue-buttons","@progress/kendo-vue-intl","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueListbox={},e.Vue,e.KendoVueCommon,e.KendoVueButtons,e.KendoVueIntl,e.KendoSVGIcons)}(this,
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-vue-buttons"),require("@progress/kendo-vue-intl"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-vue-buttons","@progress/kendo-vue-intl","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueListbox={},e.Vue,e.KendoVueCommon,e.KendoVueButtons,e.KendoVueIntl,e.KendoSVGIcons)}(this,function(e,t,o,s,a,n){"use strict";let r=function(e){return e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.NONE="none",e}({});const l={name:"@progress/kendo-vue-listbox",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1672219056,version:"8.0.3-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},i=t.defineComponent({name:"KendoListBox",emits:{dragstart:null,itemclick:null,drop:null,dragover:null,keydown:null,dragleave:null},props:{size:{type:String,validator:function(e){return["small","medium","large"].includes(e)}},toolbarPosition:{type:String,default:r.RIGHT,validator:function(e){return["none","top","bottom","left","right"].includes(e)}},textField:String,valueField:String,keyField:String,selectedField:String,item:[String,Object,Function],toolbar:[String,Object,Function],tabIndex:Number,dataItems:{type:Array,default:function(){return[]}},draggable:{type:Boolean,default:!1}},created(){o.validatePackage(l)},computed:{wrapperClass(){const e=this.$props.toolbarPosition===r.NONE||void 0===this.$props.toolbar;return{"k-listbox":!0,[`k-listbox-actions-${this.$props.toolbarPosition}`]:!e}}},render(){const e=o.templateRendering.call(this,this.$props.toolbar,o.getListeners.call(this)),s=o.getTemplate.call(this,{h:t.h,template:e});return t.createVNode("div",{class:this.wrapperClass,unselectable:"on"},["bottom"!==this.$props.toolbarPosition&&s,t.createVNode("div",{class:"k-list-scroller k-selectable","data-role":"selectable",onDragover:e=>e.preventDefault(),onDrop:this.handleContainerDrop,onDragleave:this.handleOnDragLeave},[t.createVNode("div",{class:o.classNames("k-list",{[`k-list-${o.kendoThemeMaps.sizeMap[this.$props.size]||this.$props.size}`]:this.$props.size})},[t.createVNode("div",{class:"k-list-content"},[t.createVNode("ul",{class:"k-list-ul",role:"listbox","aria-label":"listbox-container",tabindex:this.tabIndex,onKeydown:this.handleKeyDown},[this.$props.dataItems.map(function(e,s){let a=this.setSelected(e),n=o.guid();const r=t.createVNode("span",{class:"k-list-item-text"},[this.$props.textField?e[this.$props.textField]:e.toString()]),l=o.templateRendering.call(this,this.$props.item,o.getListeners.call(this)),i=o.getTemplate.call(this,{h:t.h,template:l,defaultRendering:r,additionalProps:{dataItem:e,index:s}});return t.createVNode("li",{class:o.classNames("k-list-item",{"k-selected":a},e.class),style:e.style,role:"option","aria-selected":a,key:this.$props.keyField?e[this.$props.keyField]:s,id:n+s,"data-uid":n+s,draggable:this.$props.draggable,onDragstart:t=>this.dispatchEvent("dragstart",t,e),onDragover:t=>{t.preventDefault(),this.dispatchEvent("dragover",t,e)},onDrop:t=>this.dispatchEvent("drop",t,e),onClick:t=>this.dispatchEvent("itemclick",t,e)},[i])},this)])])])]),"bottom"===this.$props.toolbarPosition&&s,t.createVNode("select",{style:{display:"none"},multiple:!0,"data-role":"listbox"},[this.$props.dataItems.map(function(e,o){let s=e[this.$props.valueField||this.$props.textField];return t.createVNode("option",{key:o,value:s},[s])},this)])])},methods:{dispatchEvent(e,t,o){this.$emit(e,{event:t,component:this,dataItem:o})},setSelected(e){if(this.$props.selectedField)return!!e[this.$props.selectedField]},handleKeyDown(e){this.$emit("keydown",{event:e,component:this})},handleContainerDrop(e){const t=e.target,o=t.closest(".k-list-scroller"),s=t.closest(".k-list-ul"),a=this.$props.dataItems;o&&!s&&this.$emit("drop",{event:e,component:this,dataItem:a.length>0?a[a.length-1]:null})},handleOnDragLeave(e){e.target.classList.contains("k-list-content")&&this.$emit("dragleave",{event:e,component:this})}}}),c="listbox.moveUp",d="listbox.moveDown",p="listbox.transferTo",u="listbox.transferFrom",h="listbox.transferAllTo",m="listbox.transferAllFrom",g="listbox.remove",f={[c]:"Move Up",[d]:"Move Down",[p]:"Transfer To",[u]:"Transfer From",[h]:"Transfer All To",[m]:"Transfer All From",[g]:"Delete"},v=[{name:"moveUp",iconName:"caret-alt-up",svgIcon:n.caretAltUpIcon},{name:"moveDown",iconName:"caret-alt-down",svgIcon:n.caretAltDownIcon},{name:"transferTo",iconName:"caret-alt-right",svgIcon:n.caretAltRightIcon},{name:"transferFrom",iconName:"caret-alt-left",svgIcon:n.caretAltLeftIcon},{name:"transferAllTo",iconName:"caret-double-alt-right",svgIcon:n.caretDoubleAltRightIcon},{name:"transferAllFrom",iconName:"caret-double-alt-left",svgIcon:n.caretDoubleAltLeftIcon},{name:"remove",iconName:"x",svgIcon:n.xIcon}],b=t.defineComponent({name:"KendoListBoxToolbar",props:{dataItems:Array,dataConnected:Array,tools:Array,selectedField:{type:String,default:"selected"}},inject:{kendoLocalizationService:{default:null}},data:()=>({currentRtl:!1}),mounted(){this.currentRtl=o.isRtl(this.$el)},render(){const e=a.provideLocalizationService(this);return t.createVNode("div",{class:"k-listbox-actions"},[this.$props.tools&&this.$props.tools.map(function(o,a){let n=v.findIndex(e=>e.name===o),r=v[n],l=this.isItemDisabled(r.name),i=`listbox.${r.name}`;const c=e.toLanguageString(i,f[i]);return t.createVNode(s.Button,{key:a,disabled:l,"data-command":r.name,title:c,"aria-label":c,icon:this.currentRtl?this.getRtlFontIcon(r.iconName):r.iconName,svgIcon:this.currentRtl?this.getRtlSvgIcon(r.svgIcon):r.svgIcon,onClick:e=>{e.preventDefault(),this.handleToolClick(e,r.name||null)}},null)},this)])},methods:{getRtlSvgIcon(e){switch(e.name){case"caret-alt-right":return n.caretAltLeftIcon;case"caret-alt-left":return n.caretAltRightIcon;case"caret-double-alt-right":return n.caretDoubleAltLeftIcon;case"caret-double-alt-left":return n.caretDoubleAltRightIcon}return e},getRtlFontIcon(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},handleToolClick(e,t){this.$emit("toolclick",{event:e,component:this,toolName:t})},isItemDisabled(e){let t=!0,o=this.$props.selectedField||"selected",s=this.$props.dataItems.length,a=this.$props.dataConnected.length,n=this.$props.dataItems.findIndex(e=>!0===e[o])>=0,r=this.$props.dataConnected.findIndex(e=>!0===e[o])>=0;switch(e){case"moveUp":t=n?!(this.$props.dataItems.length>0)||this.$props.dataItems[0].selected:!r||(!(this.$props.dataConnected.length>0)||this.$props.dataConnected[0].selected);break;case"moveDown":t=n?!this.$props.dataItems[s-1]||this.$props.dataItems[s-1].selectedField:!r||(!(this.$props.dataConnected.length>0)||this.$props.dataConnected[a-1].selected);break;case"transferTo":t=!(this.$props.dataConnected&&n);break;case"transferFrom":t=!this.$props.dataConnected||!(this.$props.dataConnected&&r);break;case"transferAllTo":t=!(this.$props.dataConnected&&this.$props.dataItems.length>0);break;case"transferAllFrom":t=!(this.$props.dataConnected&&this.$props.dataConnected.length>0);break;case"remove":t=!(n||r)}return t}}}),x=(e,t,o)=>{let s=o.splice(e,1)[0];return o.splice(t,0,s),o};e.ListBox=i,e.ListBoxToolbar=b,e.moveItem=x,e.processListBoxData=(e=[],t=[],o,s)=>{let a=[],n=[],r=[],l={listBoxOneData:e,listBoxTwoData:t};switch(o){case"moveUp":a=[...e],a.forEach((e,t)=>{e[s]&&(a=x(t,t-1,a))}),r=[...t],r.forEach((e,t)=>{e[s]&&(r=x(t,t-1,r))}),l.listBoxOneData=a,l.listBoxTwoData=r;break;case"moveDown":a=e.reverse(),a.forEach((e,t)=>{e[s]&&(a=x(t,t-1,a))}),r=t.reverse(),r.forEach((e,t)=>{e[s]&&(r=x(t,t-1,r))}),l.listBoxOneData=[...a].reverse(),l.listBoxTwoData=[...r].reverse();break;case"transferTo":a=e.filter(e=>!e[s]),n=e.filter(e=>e[s]),r=t.concat(n),l.listBoxOneData=a,l.listBoxTwoData=r;break;case"transferFrom":r=t.filter(e=>!e[s]),n=t.filter(e=>e[s]),a=e.concat(n),l.listBoxOneData=a,l.listBoxTwoData=r;break;case"transferAllTo":l.listBoxOneData=[],l.listBoxTwoData=t.concat(e);break;case"transferAllFrom":l.listBoxOneData=t.concat(e),l.listBoxTwoData=[];break;case"remove":r=t.filter(e=>!e[s]),a=e.filter(e=>!e[s]),l.listBoxOneData=a,l.listBoxTwoData=r}return l},e.processListBoxDragAndDrop=(e=[],t=[],o,s,a)=>{let n=e.findIndex(e=>e[a]===o[a]),r=t.findIndex(e=>e[a]===o[a]),l=null!==s?e.findIndex(e=>e[a]===s[a]):-1,i=null!==s?t.findIndex(e=>e[a]===s[a]):-1,c=n>=0,d=r>=0,p=l>=0,u=i>=0,h=[...e],m=[...t];return c&&p?{listBoxOneData:x(n,l,e),listBoxTwoData:t}:d&&u?{listBoxOneData:e,listBoxTwoData:x(r,i,t)}:c&&(u||null===s)?(null===s?m.push(e[n]):m.splice(i+1,0,e[n]),h.splice(n,1),{listBoxOneData:h,listBoxTwoData:m}):d&&(p||null===s)?(null===s?h.push(t[r]):h.splice(l+1,0,t[r]),m.splice(r,1),{listBoxOneData:h,listBoxTwoData:m}):{listBoxOneData:e,listBoxTwoData:t}}});
|
package/index.d.mts
CHANGED
|
@@ -5,308 +5,11 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @hidden
|
|
17
|
-
*/
|
|
18
|
-
export declare const ListBox: DefineComponent<ExtractPropTypes< {
|
|
19
|
-
size: {
|
|
20
|
-
type: PropType<"small" | "medium" | "large">;
|
|
21
|
-
validator: (value: string) => boolean;
|
|
22
|
-
};
|
|
23
|
-
toolbarPosition: {
|
|
24
|
-
type: PropType<string>;
|
|
25
|
-
default: toolbarPosition;
|
|
26
|
-
validator: (value: string) => boolean;
|
|
27
|
-
};
|
|
28
|
-
textField: PropType<string>;
|
|
29
|
-
valueField: PropType<string>;
|
|
30
|
-
keyField: PropType<string>;
|
|
31
|
-
selectedField: PropType<string>;
|
|
32
|
-
item: PropType<string | object | Function>;
|
|
33
|
-
toolbar: PropType<string | object | Function>;
|
|
34
|
-
tabIndex: PropType<number>;
|
|
35
|
-
dataItems: {
|
|
36
|
-
type: PropType<any[]>;
|
|
37
|
-
default: () => any[];
|
|
38
|
-
};
|
|
39
|
-
draggable: {
|
|
40
|
-
type: PropType<boolean>;
|
|
41
|
-
default: boolean;
|
|
42
|
-
};
|
|
43
|
-
}>, {}, {}, {
|
|
44
|
-
wrapperClass(): {
|
|
45
|
-
[x: string]: boolean;
|
|
46
|
-
'k-listbox': boolean;
|
|
47
|
-
};
|
|
48
|
-
}, {
|
|
49
|
-
dispatchEvent(eventName: string, event: any, item: any): void;
|
|
50
|
-
setSelected(item: any): boolean;
|
|
51
|
-
handleKeyDown(event: any): void;
|
|
52
|
-
handleContainerDrop(event: any): void;
|
|
53
|
-
handleOnDragLeave(event: any): void;
|
|
54
|
-
}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
55
|
-
dragstart: any;
|
|
56
|
-
itemclick: any;
|
|
57
|
-
drop: any;
|
|
58
|
-
dragover: any;
|
|
59
|
-
keydown: any;
|
|
60
|
-
dragleave: any;
|
|
61
|
-
}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
62
|
-
size: {
|
|
63
|
-
type: PropType<"small" | "medium" | "large">;
|
|
64
|
-
validator: (value: string) => boolean;
|
|
65
|
-
};
|
|
66
|
-
toolbarPosition: {
|
|
67
|
-
type: PropType<string>;
|
|
68
|
-
default: toolbarPosition;
|
|
69
|
-
validator: (value: string) => boolean;
|
|
70
|
-
};
|
|
71
|
-
textField: PropType<string>;
|
|
72
|
-
valueField: PropType<string>;
|
|
73
|
-
keyField: PropType<string>;
|
|
74
|
-
selectedField: PropType<string>;
|
|
75
|
-
item: PropType<string | object | Function>;
|
|
76
|
-
toolbar: PropType<string | object | Function>;
|
|
77
|
-
tabIndex: PropType<number>;
|
|
78
|
-
dataItems: {
|
|
79
|
-
type: PropType<any[]>;
|
|
80
|
-
default: () => any[];
|
|
81
|
-
};
|
|
82
|
-
draggable: {
|
|
83
|
-
type: PropType<boolean>;
|
|
84
|
-
default: boolean;
|
|
85
|
-
};
|
|
86
|
-
}>> & Readonly<{
|
|
87
|
-
onDragleave?: (...args: any[] | unknown[]) => any;
|
|
88
|
-
onDragover?: (...args: any[] | unknown[]) => any;
|
|
89
|
-
onDragstart?: (...args: any[] | unknown[]) => any;
|
|
90
|
-
onDrop?: (...args: any[] | unknown[]) => any;
|
|
91
|
-
onKeydown?: (...args: any[] | unknown[]) => any;
|
|
92
|
-
onItemclick?: (...args: any[] | unknown[]) => any;
|
|
93
|
-
}>, {
|
|
94
|
-
draggable: boolean;
|
|
95
|
-
toolbarPosition: string;
|
|
96
|
-
dataItems: any[];
|
|
97
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
98
|
-
|
|
99
|
-
export declare interface ListBoxDragEvent {
|
|
100
|
-
dataItem?: any;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
declare interface ListBoxDragLeaveEvent {
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export declare interface ListBoxItemClickEvent {
|
|
107
|
-
dataItem?: any;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export declare interface ListBoxKeyDownEvent {
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Represents the props of the [Kendo UI for Vue ListBox component]({% slug overview_listbox %}).
|
|
115
|
-
*/
|
|
116
|
-
export declare interface ListBoxProps {
|
|
117
|
-
/**
|
|
118
|
-
* Sets a class of the Tooltip animation container.
|
|
119
|
-
*/
|
|
120
|
-
className?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Configures the `size` of the ListBox.
|
|
123
|
-
*
|
|
124
|
-
* The available options are:
|
|
125
|
-
* - small
|
|
126
|
-
* - medium
|
|
127
|
-
* - large
|
|
128
|
-
*
|
|
129
|
-
* @default `undefined`
|
|
130
|
-
*/
|
|
131
|
-
size?: 'small' | 'medium' | 'large';
|
|
132
|
-
/**
|
|
133
|
-
* Set the data of the ListBox.
|
|
134
|
-
*/
|
|
135
|
-
dataItems: Array<any>;
|
|
136
|
-
/**
|
|
137
|
-
* Makes the items of the ListBox draggable.
|
|
138
|
-
*/
|
|
139
|
-
draggable?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Set the selected field of the ListBox. Based on that value of that field, an item will be selected or not.
|
|
142
|
-
*/
|
|
143
|
-
selectedField?: string;
|
|
144
|
-
/**
|
|
145
|
-
* Sets the data item field that represents the item text. If the data contains only primitive values, do not define it.
|
|
146
|
-
*/
|
|
147
|
-
textField: string;
|
|
148
|
-
/**
|
|
149
|
-
* The field that be used during form submit. Defaults to the textField if not set.
|
|
150
|
-
*/
|
|
151
|
-
valueField?: string;
|
|
152
|
-
/**
|
|
153
|
-
* The field that is used for rendering key of the items.
|
|
154
|
-
*/
|
|
155
|
-
keyField?: string;
|
|
156
|
-
/**
|
|
157
|
-
* Sets the position of the toolbar of the ListBox if one is set. The ListBox may have no toolbar.
|
|
158
|
-
* * The possible values are:
|
|
159
|
-
* * `top`
|
|
160
|
-
* * `bottom`
|
|
161
|
-
* * `left`
|
|
162
|
-
* * `right` (Default)
|
|
163
|
-
* * `none`
|
|
164
|
-
*/
|
|
165
|
-
toolbarPosition?: toolbarPosition | string;
|
|
166
|
-
/**
|
|
167
|
-
* Renders a toolbar component next to the ListBox.
|
|
168
|
-
*/
|
|
169
|
-
toolbar?: string | object | Function;
|
|
170
|
-
/**
|
|
171
|
-
* Sets the `tabIndex` attribute of the ListBox.
|
|
172
|
-
*/
|
|
173
|
-
tabIndex?: number;
|
|
174
|
-
/**
|
|
175
|
-
* Defines the component that will be rendered for each item of the data collection.
|
|
176
|
-
*/
|
|
177
|
-
item?: string | object | Function;
|
|
178
|
-
/**
|
|
179
|
-
* Fires when an item from the ListBox is clicked. Contains the clicked item.
|
|
180
|
-
*/
|
|
181
|
-
onItemclick?: (event: ListBoxItemClickEvent) => void;
|
|
182
|
-
/**
|
|
183
|
-
* Fires on keydown over the ListBox list items. It can be use to add keyboard extra keyboard navigation option.
|
|
184
|
-
*/
|
|
185
|
-
onKeydown?: (event: ListBoxKeyDownEvent) => void;
|
|
186
|
-
/**
|
|
187
|
-
* Fires when an the user start to drag an item from the ListBox. The event contains information for the item that is being dragged.
|
|
188
|
-
*/
|
|
189
|
-
onDragstart?: (event: ListBoxDragEvent) => void;
|
|
190
|
-
/**
|
|
191
|
-
* Fires when an the user drags over an item from the ListBox. The event contains information for the item that is dragged over.
|
|
192
|
-
*/
|
|
193
|
-
onDragover?: (event: ListBoxDragEvent) => void;
|
|
194
|
-
/**
|
|
195
|
-
* Fires when an the user drops an item. The event contains information for the drop target item.
|
|
196
|
-
*/
|
|
197
|
-
onDrop?: (event: ListBoxDragEvent) => void;
|
|
198
|
-
/**
|
|
199
|
-
* Fires when a dragged element or text selection leaves the ListBox element.
|
|
200
|
-
*/
|
|
201
|
-
onDragleave?: (event: ListBoxDragLeaveEvent) => void;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* @hidden
|
|
206
|
-
*/
|
|
207
|
-
export declare const ListBoxToolbar: DefineComponent<ExtractPropTypes< {
|
|
208
|
-
dataItems: PropType<any[]>;
|
|
209
|
-
dataConnected: PropType<any[]>;
|
|
210
|
-
tools: PropType<string[]>;
|
|
211
|
-
selectedField: {
|
|
212
|
-
type: PropType<string>;
|
|
213
|
-
default: string;
|
|
214
|
-
};
|
|
215
|
-
}>, {}, {
|
|
216
|
-
currentRtl: boolean;
|
|
217
|
-
}, {}, {
|
|
218
|
-
getRtlSvgIcon(toolIcon: any): any;
|
|
219
|
-
getRtlFontIcon(toolIcon: any): any;
|
|
220
|
-
handleToolClick(event: any, name: any): void;
|
|
221
|
-
isItemDisabled(tool: string): boolean;
|
|
222
|
-
}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
223
|
-
dataItems: PropType<any[]>;
|
|
224
|
-
dataConnected: PropType<any[]>;
|
|
225
|
-
tools: PropType<string[]>;
|
|
226
|
-
selectedField: {
|
|
227
|
-
type: PropType<string>;
|
|
228
|
-
default: string;
|
|
229
|
-
};
|
|
230
|
-
}>> & Readonly<{}>, {
|
|
231
|
-
selectedField: string;
|
|
232
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
233
|
-
|
|
234
|
-
export declare interface ListBoxToolbarClickEvent {
|
|
235
|
-
toolName?: string;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
export declare interface ListBoxToolbarProps {
|
|
239
|
-
/**
|
|
240
|
-
* Sets the tools of the ListBoxToolbar. By default, the ListBoxToolbar renders no tools.
|
|
241
|
-
* The built-in tools are:
|
|
242
|
-
* * `moveUp`
|
|
243
|
-
* * `moveDown`
|
|
244
|
-
* * `transferTo`
|
|
245
|
-
* * `transferFrom`
|
|
246
|
-
* * `transferAllTo`
|
|
247
|
-
* * `transferAllFrom`
|
|
248
|
-
* * `remove`
|
|
249
|
-
*/
|
|
250
|
-
tools?: Array<string>;
|
|
251
|
-
/**
|
|
252
|
-
* The data of the main ListBox.
|
|
253
|
-
*/
|
|
254
|
-
dataItems: Array<any>;
|
|
255
|
-
/**
|
|
256
|
-
* The data of the connected ListBox.
|
|
257
|
-
*/
|
|
258
|
-
dataConnected: Array<any>;
|
|
259
|
-
/**
|
|
260
|
-
* Set the selected field of the ListBoxToolbar.
|
|
261
|
-
* Based on that value of that field the ListBoxToolbar will determine which actions are allowed and which disabled.
|
|
262
|
-
*/
|
|
263
|
-
selectedField?: string;
|
|
264
|
-
/**
|
|
265
|
-
* Fires when one of the ListBoxToolbar tools is clicked.
|
|
266
|
-
*/
|
|
267
|
-
onToolclick?: (event: ListBoxToolbarClickEvent) => void;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @hidden
|
|
272
|
-
*/
|
|
273
|
-
export declare const moveItem: (from: number, to: number, data: Array<any>) => any[];
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Process the data collection/s based on the clicked ListBoxToolbar tool.
|
|
277
|
-
*
|
|
278
|
-
* @param {T[]} listBoxOneData - The first data collection.
|
|
279
|
-
* @param {T[]} listBoxTwoData - The second data collection. Pass an empty array if there is only one ListBox.
|
|
280
|
-
* @param {string} toolName - The tool that was clicked.
|
|
281
|
-
* @param {string} selectedField - The field that contains the selected information in the data object.
|
|
282
|
-
* @returns {{listBoxOneData: T[], listBoxTwoData: t[]}} - The object that contains the new data collections.
|
|
283
|
-
*/
|
|
284
|
-
export declare const processListBoxData: (listBoxOneData: Array<any>, listBoxTwoData: Array<any>, toolName: string, selectedField: string) => {
|
|
285
|
-
listBoxOneData: any[];
|
|
286
|
-
listBoxTwoData: any[];
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Process the data collection/s based on the dragged and drop item.
|
|
291
|
-
*
|
|
292
|
-
* @param {T[]} listBoxOneData - The first data collection.
|
|
293
|
-
* @param {T[]} listBoxTwoData - The second data collection. Pass an empty array if there is only one ListBox.
|
|
294
|
-
* @param {any} dragItem - The item that was dragged.
|
|
295
|
-
* @param {any} dropItem - The drop target item.
|
|
296
|
-
* @param {string} valueField - The field which points to the unique value of each data item.
|
|
297
|
-
* @returns {{listBoxOneData: T[], listBoxTwoData: t[]}} - The object that contains the new data collections.
|
|
298
|
-
*/
|
|
299
|
-
export declare const processListBoxDragAndDrop: (listBoxOneData: Array<any>, listBoxTwoData: Array<any>, dragItem: any, dropItem: any, valueField: string) => {
|
|
300
|
-
listBoxOneData: any[];
|
|
301
|
-
listBoxTwoData: any[];
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
declare enum toolbarPosition {
|
|
305
|
-
TOP = "top",
|
|
306
|
-
BOTTOM = "bottom",
|
|
307
|
-
LEFT = "left",
|
|
308
|
-
RIGHT = "right",
|
|
309
|
-
NONE = "none"
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
export { }
|
|
8
|
+
import { ListBox } from './ListBox.js';
|
|
9
|
+
import { ListBoxProps } from './interfaces/ListBoxProps.js';
|
|
10
|
+
import { ListBoxToolbar } from './ListBoxToolbar.js';
|
|
11
|
+
import { ListBoxToolbarProps } from './interfaces/ListBoxToolBarProps.js';
|
|
12
|
+
import { processListBoxData, moveItem, processListBoxDragAndDrop } from './utils.js';
|
|
13
|
+
import { ListBoxDragEvent, ListBoxItemClickEvent, ListBoxKeyDownEvent, ListBoxToolbarClickEvent } from './interfaces/ListBoxEvents.js';
|
|
14
|
+
export { ListBox, ListBoxToolbar, processListBoxData, moveItem, processListBoxDragAndDrop };
|
|
15
|
+
export type { ListBoxProps, ListBoxToolbarProps, ListBoxDragEvent, ListBoxItemClickEvent, ListBoxKeyDownEvent, ListBoxToolbarClickEvent };
|
package/index.d.ts
CHANGED
|
@@ -5,308 +5,11 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @hidden
|
|
17
|
-
*/
|
|
18
|
-
export declare const ListBox: DefineComponent<ExtractPropTypes< {
|
|
19
|
-
size: {
|
|
20
|
-
type: PropType<"small" | "medium" | "large">;
|
|
21
|
-
validator: (value: string) => boolean;
|
|
22
|
-
};
|
|
23
|
-
toolbarPosition: {
|
|
24
|
-
type: PropType<string>;
|
|
25
|
-
default: toolbarPosition;
|
|
26
|
-
validator: (value: string) => boolean;
|
|
27
|
-
};
|
|
28
|
-
textField: PropType<string>;
|
|
29
|
-
valueField: PropType<string>;
|
|
30
|
-
keyField: PropType<string>;
|
|
31
|
-
selectedField: PropType<string>;
|
|
32
|
-
item: PropType<string | object | Function>;
|
|
33
|
-
toolbar: PropType<string | object | Function>;
|
|
34
|
-
tabIndex: PropType<number>;
|
|
35
|
-
dataItems: {
|
|
36
|
-
type: PropType<any[]>;
|
|
37
|
-
default: () => any[];
|
|
38
|
-
};
|
|
39
|
-
draggable: {
|
|
40
|
-
type: PropType<boolean>;
|
|
41
|
-
default: boolean;
|
|
42
|
-
};
|
|
43
|
-
}>, {}, {}, {
|
|
44
|
-
wrapperClass(): {
|
|
45
|
-
[x: string]: boolean;
|
|
46
|
-
'k-listbox': boolean;
|
|
47
|
-
};
|
|
48
|
-
}, {
|
|
49
|
-
dispatchEvent(eventName: string, event: any, item: any): void;
|
|
50
|
-
setSelected(item: any): boolean;
|
|
51
|
-
handleKeyDown(event: any): void;
|
|
52
|
-
handleContainerDrop(event: any): void;
|
|
53
|
-
handleOnDragLeave(event: any): void;
|
|
54
|
-
}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
55
|
-
dragstart: any;
|
|
56
|
-
itemclick: any;
|
|
57
|
-
drop: any;
|
|
58
|
-
dragover: any;
|
|
59
|
-
keydown: any;
|
|
60
|
-
dragleave: any;
|
|
61
|
-
}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
62
|
-
size: {
|
|
63
|
-
type: PropType<"small" | "medium" | "large">;
|
|
64
|
-
validator: (value: string) => boolean;
|
|
65
|
-
};
|
|
66
|
-
toolbarPosition: {
|
|
67
|
-
type: PropType<string>;
|
|
68
|
-
default: toolbarPosition;
|
|
69
|
-
validator: (value: string) => boolean;
|
|
70
|
-
};
|
|
71
|
-
textField: PropType<string>;
|
|
72
|
-
valueField: PropType<string>;
|
|
73
|
-
keyField: PropType<string>;
|
|
74
|
-
selectedField: PropType<string>;
|
|
75
|
-
item: PropType<string | object | Function>;
|
|
76
|
-
toolbar: PropType<string | object | Function>;
|
|
77
|
-
tabIndex: PropType<number>;
|
|
78
|
-
dataItems: {
|
|
79
|
-
type: PropType<any[]>;
|
|
80
|
-
default: () => any[];
|
|
81
|
-
};
|
|
82
|
-
draggable: {
|
|
83
|
-
type: PropType<boolean>;
|
|
84
|
-
default: boolean;
|
|
85
|
-
};
|
|
86
|
-
}>> & Readonly<{
|
|
87
|
-
onDragleave?: (...args: any[] | unknown[]) => any;
|
|
88
|
-
onDragover?: (...args: any[] | unknown[]) => any;
|
|
89
|
-
onDragstart?: (...args: any[] | unknown[]) => any;
|
|
90
|
-
onDrop?: (...args: any[] | unknown[]) => any;
|
|
91
|
-
onKeydown?: (...args: any[] | unknown[]) => any;
|
|
92
|
-
onItemclick?: (...args: any[] | unknown[]) => any;
|
|
93
|
-
}>, {
|
|
94
|
-
draggable: boolean;
|
|
95
|
-
toolbarPosition: string;
|
|
96
|
-
dataItems: any[];
|
|
97
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
98
|
-
|
|
99
|
-
export declare interface ListBoxDragEvent {
|
|
100
|
-
dataItem?: any;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
declare interface ListBoxDragLeaveEvent {
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export declare interface ListBoxItemClickEvent {
|
|
107
|
-
dataItem?: any;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export declare interface ListBoxKeyDownEvent {
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Represents the props of the [Kendo UI for Vue ListBox component]({% slug overview_listbox %}).
|
|
115
|
-
*/
|
|
116
|
-
export declare interface ListBoxProps {
|
|
117
|
-
/**
|
|
118
|
-
* Sets a class of the Tooltip animation container.
|
|
119
|
-
*/
|
|
120
|
-
className?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Configures the `size` of the ListBox.
|
|
123
|
-
*
|
|
124
|
-
* The available options are:
|
|
125
|
-
* - small
|
|
126
|
-
* - medium
|
|
127
|
-
* - large
|
|
128
|
-
*
|
|
129
|
-
* @default `undefined`
|
|
130
|
-
*/
|
|
131
|
-
size?: 'small' | 'medium' | 'large';
|
|
132
|
-
/**
|
|
133
|
-
* Set the data of the ListBox.
|
|
134
|
-
*/
|
|
135
|
-
dataItems: Array<any>;
|
|
136
|
-
/**
|
|
137
|
-
* Makes the items of the ListBox draggable.
|
|
138
|
-
*/
|
|
139
|
-
draggable?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Set the selected field of the ListBox. Based on that value of that field, an item will be selected or not.
|
|
142
|
-
*/
|
|
143
|
-
selectedField?: string;
|
|
144
|
-
/**
|
|
145
|
-
* Sets the data item field that represents the item text. If the data contains only primitive values, do not define it.
|
|
146
|
-
*/
|
|
147
|
-
textField: string;
|
|
148
|
-
/**
|
|
149
|
-
* The field that be used during form submit. Defaults to the textField if not set.
|
|
150
|
-
*/
|
|
151
|
-
valueField?: string;
|
|
152
|
-
/**
|
|
153
|
-
* The field that is used for rendering key of the items.
|
|
154
|
-
*/
|
|
155
|
-
keyField?: string;
|
|
156
|
-
/**
|
|
157
|
-
* Sets the position of the toolbar of the ListBox if one is set. The ListBox may have no toolbar.
|
|
158
|
-
* * The possible values are:
|
|
159
|
-
* * `top`
|
|
160
|
-
* * `bottom`
|
|
161
|
-
* * `left`
|
|
162
|
-
* * `right` (Default)
|
|
163
|
-
* * `none`
|
|
164
|
-
*/
|
|
165
|
-
toolbarPosition?: toolbarPosition | string;
|
|
166
|
-
/**
|
|
167
|
-
* Renders a toolbar component next to the ListBox.
|
|
168
|
-
*/
|
|
169
|
-
toolbar?: string | object | Function;
|
|
170
|
-
/**
|
|
171
|
-
* Sets the `tabIndex` attribute of the ListBox.
|
|
172
|
-
*/
|
|
173
|
-
tabIndex?: number;
|
|
174
|
-
/**
|
|
175
|
-
* Defines the component that will be rendered for each item of the data collection.
|
|
176
|
-
*/
|
|
177
|
-
item?: string | object | Function;
|
|
178
|
-
/**
|
|
179
|
-
* Fires when an item from the ListBox is clicked. Contains the clicked item.
|
|
180
|
-
*/
|
|
181
|
-
onItemclick?: (event: ListBoxItemClickEvent) => void;
|
|
182
|
-
/**
|
|
183
|
-
* Fires on keydown over the ListBox list items. It can be use to add keyboard extra keyboard navigation option.
|
|
184
|
-
*/
|
|
185
|
-
onKeydown?: (event: ListBoxKeyDownEvent) => void;
|
|
186
|
-
/**
|
|
187
|
-
* Fires when an the user start to drag an item from the ListBox. The event contains information for the item that is being dragged.
|
|
188
|
-
*/
|
|
189
|
-
onDragstart?: (event: ListBoxDragEvent) => void;
|
|
190
|
-
/**
|
|
191
|
-
* Fires when an the user drags over an item from the ListBox. The event contains information for the item that is dragged over.
|
|
192
|
-
*/
|
|
193
|
-
onDragover?: (event: ListBoxDragEvent) => void;
|
|
194
|
-
/**
|
|
195
|
-
* Fires when an the user drops an item. The event contains information for the drop target item.
|
|
196
|
-
*/
|
|
197
|
-
onDrop?: (event: ListBoxDragEvent) => void;
|
|
198
|
-
/**
|
|
199
|
-
* Fires when a dragged element or text selection leaves the ListBox element.
|
|
200
|
-
*/
|
|
201
|
-
onDragleave?: (event: ListBoxDragLeaveEvent) => void;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* @hidden
|
|
206
|
-
*/
|
|
207
|
-
export declare const ListBoxToolbar: DefineComponent<ExtractPropTypes< {
|
|
208
|
-
dataItems: PropType<any[]>;
|
|
209
|
-
dataConnected: PropType<any[]>;
|
|
210
|
-
tools: PropType<string[]>;
|
|
211
|
-
selectedField: {
|
|
212
|
-
type: PropType<string>;
|
|
213
|
-
default: string;
|
|
214
|
-
};
|
|
215
|
-
}>, {}, {
|
|
216
|
-
currentRtl: boolean;
|
|
217
|
-
}, {}, {
|
|
218
|
-
getRtlSvgIcon(toolIcon: any): any;
|
|
219
|
-
getRtlFontIcon(toolIcon: any): any;
|
|
220
|
-
handleToolClick(event: any, name: any): void;
|
|
221
|
-
isItemDisabled(tool: string): boolean;
|
|
222
|
-
}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
223
|
-
dataItems: PropType<any[]>;
|
|
224
|
-
dataConnected: PropType<any[]>;
|
|
225
|
-
tools: PropType<string[]>;
|
|
226
|
-
selectedField: {
|
|
227
|
-
type: PropType<string>;
|
|
228
|
-
default: string;
|
|
229
|
-
};
|
|
230
|
-
}>> & Readonly<{}>, {
|
|
231
|
-
selectedField: string;
|
|
232
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
233
|
-
|
|
234
|
-
export declare interface ListBoxToolbarClickEvent {
|
|
235
|
-
toolName?: string;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
export declare interface ListBoxToolbarProps {
|
|
239
|
-
/**
|
|
240
|
-
* Sets the tools of the ListBoxToolbar. By default, the ListBoxToolbar renders no tools.
|
|
241
|
-
* The built-in tools are:
|
|
242
|
-
* * `moveUp`
|
|
243
|
-
* * `moveDown`
|
|
244
|
-
* * `transferTo`
|
|
245
|
-
* * `transferFrom`
|
|
246
|
-
* * `transferAllTo`
|
|
247
|
-
* * `transferAllFrom`
|
|
248
|
-
* * `remove`
|
|
249
|
-
*/
|
|
250
|
-
tools?: Array<string>;
|
|
251
|
-
/**
|
|
252
|
-
* The data of the main ListBox.
|
|
253
|
-
*/
|
|
254
|
-
dataItems: Array<any>;
|
|
255
|
-
/**
|
|
256
|
-
* The data of the connected ListBox.
|
|
257
|
-
*/
|
|
258
|
-
dataConnected: Array<any>;
|
|
259
|
-
/**
|
|
260
|
-
* Set the selected field of the ListBoxToolbar.
|
|
261
|
-
* Based on that value of that field the ListBoxToolbar will determine which actions are allowed and which disabled.
|
|
262
|
-
*/
|
|
263
|
-
selectedField?: string;
|
|
264
|
-
/**
|
|
265
|
-
* Fires when one of the ListBoxToolbar tools is clicked.
|
|
266
|
-
*/
|
|
267
|
-
onToolclick?: (event: ListBoxToolbarClickEvent) => void;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @hidden
|
|
272
|
-
*/
|
|
273
|
-
export declare const moveItem: (from: number, to: number, data: Array<any>) => any[];
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Process the data collection/s based on the clicked ListBoxToolbar tool.
|
|
277
|
-
*
|
|
278
|
-
* @param {T[]} listBoxOneData - The first data collection.
|
|
279
|
-
* @param {T[]} listBoxTwoData - The second data collection. Pass an empty array if there is only one ListBox.
|
|
280
|
-
* @param {string} toolName - The tool that was clicked.
|
|
281
|
-
* @param {string} selectedField - The field that contains the selected information in the data object.
|
|
282
|
-
* @returns {{listBoxOneData: T[], listBoxTwoData: t[]}} - The object that contains the new data collections.
|
|
283
|
-
*/
|
|
284
|
-
export declare const processListBoxData: (listBoxOneData: Array<any>, listBoxTwoData: Array<any>, toolName: string, selectedField: string) => {
|
|
285
|
-
listBoxOneData: any[];
|
|
286
|
-
listBoxTwoData: any[];
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Process the data collection/s based on the dragged and drop item.
|
|
291
|
-
*
|
|
292
|
-
* @param {T[]} listBoxOneData - The first data collection.
|
|
293
|
-
* @param {T[]} listBoxTwoData - The second data collection. Pass an empty array if there is only one ListBox.
|
|
294
|
-
* @param {any} dragItem - The item that was dragged.
|
|
295
|
-
* @param {any} dropItem - The drop target item.
|
|
296
|
-
* @param {string} valueField - The field which points to the unique value of each data item.
|
|
297
|
-
* @returns {{listBoxOneData: T[], listBoxTwoData: t[]}} - The object that contains the new data collections.
|
|
298
|
-
*/
|
|
299
|
-
export declare const processListBoxDragAndDrop: (listBoxOneData: Array<any>, listBoxTwoData: Array<any>, dragItem: any, dropItem: any, valueField: string) => {
|
|
300
|
-
listBoxOneData: any[];
|
|
301
|
-
listBoxTwoData: any[];
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
declare enum toolbarPosition {
|
|
305
|
-
TOP = "top",
|
|
306
|
-
BOTTOM = "bottom",
|
|
307
|
-
LEFT = "left",
|
|
308
|
-
RIGHT = "right",
|
|
309
|
-
NONE = "none"
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
export { }
|
|
8
|
+
import { ListBox } from './ListBox';
|
|
9
|
+
import { ListBoxProps } from './interfaces/ListBoxProps';
|
|
10
|
+
import { ListBoxToolbar } from './ListBoxToolbar';
|
|
11
|
+
import { ListBoxToolbarProps } from './interfaces/ListBoxToolBarProps';
|
|
12
|
+
import { processListBoxData, moveItem, processListBoxDragAndDrop } from './utils';
|
|
13
|
+
import { ListBoxDragEvent, ListBoxItemClickEvent, ListBoxKeyDownEvent, ListBoxToolbarClickEvent } from './interfaces/ListBoxEvents';
|
|
14
|
+
export { ListBox, ListBoxToolbar, processListBoxData, moveItem, processListBoxDragAndDrop };
|
|
15
|
+
export type { ListBoxProps, ListBoxToolbarProps, ListBoxDragEvent, ListBoxItemClickEvent, ListBoxKeyDownEvent, ListBoxToolbarClickEvent };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
export declare enum toolbarPosition {
|
|
9
|
+
TOP = "top",
|
|
10
|
+
BOTTOM = "bottom",
|
|
11
|
+
LEFT = "left",
|
|
12
|
+
RIGHT = "right",
|
|
13
|
+
NONE = "none"
|
|
14
|
+
}
|
package/interfaces/Enums.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let t=function(e){return e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.NONE="none",e}({});exports.toolbarPosition=t;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let t=(function(e){return e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.NONE="none",e})({});exports.toolbarPosition=t;
|
package/interfaces/Enums.mjs
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
let T = /* @__PURE__ */ function(e) {
|
|
8
|
+
let T = /* @__PURE__ */ (function(e) {
|
|
9
9
|
return e.TOP = "top", e.BOTTOM = "bottom", e.LEFT = "left", e.RIGHT = "right", e.NONE = "none", e;
|
|
10
|
-
}({});
|
|
10
|
+
})({});
|
|
11
11
|
export {
|
|
12
12
|
T as toolbarPosition
|
|
13
13
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
export interface ListBoxItemClickEvent {
|
|
9
|
+
dataItem?: any;
|
|
10
|
+
}
|
|
11
|
+
export interface ListBoxKeyDownEvent {
|
|
12
|
+
}
|
|
13
|
+
export interface ListBoxDragLeaveEvent {
|
|
14
|
+
}
|
|
15
|
+
export interface ListBoxToolbarClickEvent {
|
|
16
|
+
toolName?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ListBoxDragEvent {
|
|
19
|
+
dataItem?: any;
|
|
20
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ListBoxItemClickEvent, ListBoxKeyDownEvent, ListBoxDragEvent, ListBoxDragLeaveEvent } from './ListBoxEvents';
|
|
9
|
+
import { toolbarPosition } from './Enums';
|
|
10
|
+
/**
|
|
11
|
+
* Represents the props of the [Kendo UI for Vue ListBox component]({% slug overview_listbox %}).
|
|
12
|
+
*/
|
|
13
|
+
export interface ListBoxProps {
|
|
14
|
+
/**
|
|
15
|
+
* Sets a class of the Tooltip animation container.
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Configures the `size` of the ListBox.
|
|
20
|
+
*
|
|
21
|
+
* The available options are:
|
|
22
|
+
* - small
|
|
23
|
+
* - medium
|
|
24
|
+
* - large
|
|
25
|
+
*
|
|
26
|
+
* @default `undefined`
|
|
27
|
+
*/
|
|
28
|
+
size?: 'small' | 'medium' | 'large';
|
|
29
|
+
/**
|
|
30
|
+
* Set the data of the ListBox.
|
|
31
|
+
*/
|
|
32
|
+
dataItems: Array<any>;
|
|
33
|
+
/**
|
|
34
|
+
* Makes the items of the ListBox draggable.
|
|
35
|
+
*/
|
|
36
|
+
draggable?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Set the selected field of the ListBox. Based on that value of that field, an item will be selected or not.
|
|
39
|
+
*/
|
|
40
|
+
selectedField?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the data item field that represents the item text. If the data contains only primitive values, do not define it.
|
|
43
|
+
*/
|
|
44
|
+
textField: string;
|
|
45
|
+
/**
|
|
46
|
+
* The field that be used during form submit. Defaults to the textField if not set.
|
|
47
|
+
*/
|
|
48
|
+
valueField?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The field that is used for rendering key of the items.
|
|
51
|
+
*/
|
|
52
|
+
keyField?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Sets the position of the toolbar of the ListBox if one is set. The ListBox may have no toolbar.
|
|
55
|
+
* * The possible values are:
|
|
56
|
+
* * `top`
|
|
57
|
+
* * `bottom`
|
|
58
|
+
* * `left`
|
|
59
|
+
* * `right` (Default)
|
|
60
|
+
* * `none`
|
|
61
|
+
*/
|
|
62
|
+
toolbarPosition?: toolbarPosition | string;
|
|
63
|
+
/**
|
|
64
|
+
* Renders a toolbar component next to the ListBox.
|
|
65
|
+
*/
|
|
66
|
+
toolbar?: string | object | Function;
|
|
67
|
+
/**
|
|
68
|
+
* Sets the `tabIndex` attribute of the ListBox.
|
|
69
|
+
*/
|
|
70
|
+
tabIndex?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Defines the component that will be rendered for each item of the data collection.
|
|
73
|
+
*/
|
|
74
|
+
item?: string | object | Function;
|
|
75
|
+
/**
|
|
76
|
+
* Fires when an item from the ListBox is clicked. Contains the clicked item.
|
|
77
|
+
*/
|
|
78
|
+
onItemclick?: (event: ListBoxItemClickEvent) => void;
|
|
79
|
+
/**
|
|
80
|
+
* Fires on keydown over the ListBox list items. It can be use to add keyboard extra keyboard navigation option.
|
|
81
|
+
*/
|
|
82
|
+
onKeydown?: (event: ListBoxKeyDownEvent) => void;
|
|
83
|
+
/**
|
|
84
|
+
* Fires when an the user start to drag an item from the ListBox. The event contains information for the item that is being dragged.
|
|
85
|
+
*/
|
|
86
|
+
onDragstart?: (event: ListBoxDragEvent) => void;
|
|
87
|
+
/**
|
|
88
|
+
* Fires when an the user drags over an item from the ListBox. The event contains information for the item that is dragged over.
|
|
89
|
+
*/
|
|
90
|
+
onDragover?: (event: ListBoxDragEvent) => void;
|
|
91
|
+
/**
|
|
92
|
+
* Fires when an the user drops an item. The event contains information for the drop target item.
|
|
93
|
+
*/
|
|
94
|
+
onDrop?: (event: ListBoxDragEvent) => void;
|
|
95
|
+
/**
|
|
96
|
+
* Fires when a dragged element or text selection leaves the ListBox element.
|
|
97
|
+
*/
|
|
98
|
+
onDragleave?: (event: ListBoxDragLeaveEvent) => void;
|
|
99
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ListBoxToolbarClickEvent } from './ListBoxEvents';
|
|
9
|
+
export interface ListBoxToolbarProps {
|
|
10
|
+
/**
|
|
11
|
+
* Sets the tools of the ListBoxToolbar. By default, the ListBoxToolbar renders no tools.
|
|
12
|
+
* The built-in tools are:
|
|
13
|
+
* * `moveUp`
|
|
14
|
+
* * `moveDown`
|
|
15
|
+
* * `transferTo`
|
|
16
|
+
* * `transferFrom`
|
|
17
|
+
* * `transferAllTo`
|
|
18
|
+
* * `transferAllFrom`
|
|
19
|
+
* * `remove`
|
|
20
|
+
*/
|
|
21
|
+
tools?: Array<string>;
|
|
22
|
+
/**
|
|
23
|
+
* The data of the main ListBox.
|
|
24
|
+
*/
|
|
25
|
+
dataItems: Array<any>;
|
|
26
|
+
/**
|
|
27
|
+
* The data of the connected ListBox.
|
|
28
|
+
*/
|
|
29
|
+
dataConnected: Array<any>;
|
|
30
|
+
/**
|
|
31
|
+
* Set the selected field of the ListBoxToolbar.
|
|
32
|
+
* Based on that value of that field the ListBoxToolbar will determine which actions are allowed and which disabled.
|
|
33
|
+
*/
|
|
34
|
+
selectedField?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Fires when one of the ListBoxToolbar tools is clicked.
|
|
37
|
+
*/
|
|
38
|
+
onToolclick?: (event: ListBoxToolbarClickEvent) => void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare const moveUp = "listbox.moveUp";
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export declare const moveDown = "listbox.moveDown";
|
|
16
|
+
/**
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
export declare const transferTo = "listbox.transferTo";
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export declare const transferFrom = "listbox.transferFrom";
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export declare const transferAllTo = "listbox.transferAllTo";
|
|
28
|
+
/**
|
|
29
|
+
* @hidden
|
|
30
|
+
*/
|
|
31
|
+
export declare const transferAllFrom = "listbox.transferAllFrom";
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
export declare const remove = "listbox.remove";
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
export declare const messages: {
|
|
40
|
+
"listbox.moveUp": string;
|
|
41
|
+
"listbox.moveDown": string;
|
|
42
|
+
"listbox.transferTo": string;
|
|
43
|
+
"listbox.transferFrom": string;
|
|
44
|
+
"listbox.transferAllTo": string;
|
|
45
|
+
"listbox.transferAllFrom": string;
|
|
46
|
+
"listbox.remove": string;
|
|
47
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { PackageMetadata } from '@progress/kendo-licensing';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const packageMetadata: PackageMetadata;
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-listbox",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-listbox",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1773401804,version:"8.0.3-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "8.0.3-develop.
|
|
13
|
+
publishDate: 1773401804,
|
|
14
|
+
version: "8.0.3-develop.3",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-listbox",
|
|
3
|
-
"version": "8.0.3-develop.
|
|
3
|
+
"version": "8.0.3-develop.3",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -9,8 +9,14 @@
|
|
|
9
9
|
"types": "./index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"import":
|
|
13
|
-
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./index.d.mts",
|
|
14
|
+
"default": "./index.mjs"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"types": "./index.d.ts",
|
|
18
|
+
"default": "./index.js"
|
|
19
|
+
}
|
|
14
20
|
},
|
|
15
21
|
"./package.json": {
|
|
16
22
|
"default": "./package.json"
|
|
@@ -19,9 +25,9 @@
|
|
|
19
25
|
"sideEffects": false,
|
|
20
26
|
"peerDependencies": {
|
|
21
27
|
"@progress/kendo-licensing": "^1.7.2",
|
|
22
|
-
"@progress/kendo-vue-buttons": "8.0.3-develop.
|
|
23
|
-
"@progress/kendo-vue-common": "8.0.3-develop.
|
|
24
|
-
"@progress/kendo-vue-intl": "8.0.3-develop.
|
|
28
|
+
"@progress/kendo-vue-buttons": "8.0.3-develop.3",
|
|
29
|
+
"@progress/kendo-vue-common": "8.0.3-develop.3",
|
|
30
|
+
"@progress/kendo-vue-intl": "8.0.3-develop.3",
|
|
25
31
|
"@progress/kendo-svg-icons": "^4.4.0",
|
|
26
32
|
"vue": "^3.0.2"
|
|
27
33
|
},
|
|
@@ -42,7 +48,7 @@
|
|
|
42
48
|
"package": {
|
|
43
49
|
"productName": "Kendo UI for Vue",
|
|
44
50
|
"productCode": "KENDOUIVUE",
|
|
45
|
-
"publishDate":
|
|
51
|
+
"publishDate": 1773401804,
|
|
46
52
|
"licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
47
53
|
}
|
|
48
54
|
},
|
package/utils.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Process the data collection/s based on the clicked ListBoxToolbar tool.
|
|
10
|
+
*
|
|
11
|
+
* @param {T[]} listBoxOneData - The first data collection.
|
|
12
|
+
* @param {T[]} listBoxTwoData - The second data collection. Pass an empty array if there is only one ListBox.
|
|
13
|
+
* @param {string} toolName - The tool that was clicked.
|
|
14
|
+
* @param {string} selectedField - The field that contains the selected information in the data object.
|
|
15
|
+
* @returns {{listBoxOneData: T[], listBoxTwoData: t[]}} - The object that contains the new data collections.
|
|
16
|
+
*/
|
|
17
|
+
export declare const processListBoxData: (listBoxOneData: Array<any>, listBoxTwoData: Array<any>, toolName: string, selectedField: string) => {
|
|
18
|
+
listBoxOneData: any[];
|
|
19
|
+
listBoxTwoData: any[];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
export declare const moveItem: (from: number, to: number, data: Array<any>) => any[];
|
|
25
|
+
/**
|
|
26
|
+
* Process the data collection/s based on the dragged and drop item.
|
|
27
|
+
*
|
|
28
|
+
* @param {T[]} listBoxOneData - The first data collection.
|
|
29
|
+
* @param {T[]} listBoxTwoData - The second data collection. Pass an empty array if there is only one ListBox.
|
|
30
|
+
* @param {any} dragItem - The item that was dragged.
|
|
31
|
+
* @param {any} dropItem - The drop target item.
|
|
32
|
+
* @param {string} valueField - The field which points to the unique value of each data item.
|
|
33
|
+
* @returns {{listBoxOneData: T[], listBoxTwoData: t[]}} - The object that contains the new data collections.
|
|
34
|
+
*/
|
|
35
|
+
export declare const processListBoxDragAndDrop: (listBoxOneData: Array<any>, listBoxTwoData: Array<any>, dragItem: any, dropItem: any, valueField: string) => {
|
|
36
|
+
listBoxOneData: any[];
|
|
37
|
+
listBoxTwoData: any[];
|
|
38
|
+
};
|