@progress/kendo-react-listbox 13.3.0-develop.9 → 13.4.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/ListBox.d.ts +28 -0
- package/ListBox.js +1 -1
- package/ListBox.mjs +8 -8
- package/ListBoxToolbar.d.ts +24 -0
- package/ListBoxToolbar.js +1 -1
- package/ListBoxToolbar.mjs +10 -10
- package/dist/cdn/js/kendo-react-listbox.js +1 -1
- package/index.d.mts +10 -424
- package/index.d.ts +10 -424
- package/interfaces/Enums.d.ts +17 -0
- package/interfaces/ListBoxEvents.d.ts +75 -0
- package/interfaces/ListBoxProps.d.ts +215 -0
- package/interfaces/ListBoxToolBarProps.d.ts +55 -0
- package/messages/index.d.ts +47 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.mjs +12 -0
- package/package.json +11 -5
- package/utils.d.ts +38 -0
|
@@ -0,0 +1,215 @@
|
|
|
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 { ComponentType } from 'react';
|
|
9
|
+
import { ListBoxItemClickEvent, ListBoxKeyDownEvent, ListBoxDragEvent, ListBoxDragLeaveEvent, ListBoxItemSelectEvent, ListBoxItemNavigateEvent } from './ListBoxEvents.js';
|
|
10
|
+
import { toolbarPosition } from './Enums.js';
|
|
11
|
+
/**
|
|
12
|
+
* Represents the props of the [KendoReact ListBox component](https://www.telerik.com/kendo-react-ui/components/listbox).
|
|
13
|
+
*/
|
|
14
|
+
export interface ListBoxProps {
|
|
15
|
+
/**
|
|
16
|
+
* Sets a `class` of the ListBox container.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```jsx
|
|
20
|
+
* <ListBox className="custom-class" />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Sets an `id` of the ListBox container.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```jsx
|
|
29
|
+
* <ListBox id="listbox-id" />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
id?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Configures the `size` of the ListBox.
|
|
35
|
+
*
|
|
36
|
+
* The available options are:
|
|
37
|
+
* - small
|
|
38
|
+
* - medium
|
|
39
|
+
* - large
|
|
40
|
+
*
|
|
41
|
+
* @default undefined (theme-controlled)
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```jsx
|
|
45
|
+
* <ListBox size="large" />
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
size?: 'small' | 'medium' | 'large';
|
|
49
|
+
/**
|
|
50
|
+
* Specifies the styles which are set to the ListBox container.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```jsx
|
|
54
|
+
* <ListBox style={{ width: '300px' }} />
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
style?: React.CSSProperties;
|
|
58
|
+
/**
|
|
59
|
+
* Sets the data of the ListBox.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```jsx
|
|
63
|
+
* <ListBox data={[{ text: 'Item 1' }, { text: 'Item 2' }]} />
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
data: Array<any>;
|
|
67
|
+
/**
|
|
68
|
+
* Makes the items of the ListBox draggable.
|
|
69
|
+
*
|
|
70
|
+
* @default true
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```jsx
|
|
74
|
+
* <ListBox draggable={false} />
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
draggable?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Sets the selected field of the ListBox. Based on the value of this field, an item is selected or not.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```jsx
|
|
83
|
+
* <ListBox selectedField="isSelected" />
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
selectedField?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Sets the data item field that represents the item text. If the data contains only primitive values, do not define it.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```jsx
|
|
92
|
+
* <ListBox textField="name" />
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
textField: string;
|
|
96
|
+
/**
|
|
97
|
+
* The field that is used during form submission. Defaults to the `textField` if not set.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```jsx
|
|
101
|
+
* <ListBox valueField="id" />
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
valueField?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Sets the position of the toolbar of the ListBox if one is set. The ListBox may have no toolbar.
|
|
107
|
+
*
|
|
108
|
+
* The possible values are:
|
|
109
|
+
* - `top`
|
|
110
|
+
* - `bottom`
|
|
111
|
+
* - `left`
|
|
112
|
+
* - `right` (Default)
|
|
113
|
+
* - `none`
|
|
114
|
+
*
|
|
115
|
+
* @default 'right'
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```jsx
|
|
119
|
+
* <ListBox toolbarPosition="top" />
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
toolbarPosition?: toolbarPosition | string;
|
|
123
|
+
/**
|
|
124
|
+
* Renders a toolbar component next to the ListBox.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```jsx
|
|
128
|
+
* <ListBox toolbar={CustomToolbar} />
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
toolbar?: null | ComponentType<any>;
|
|
132
|
+
/**
|
|
133
|
+
* Defines the component that will be rendered for each item of the data collection.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```jsx
|
|
137
|
+
* const CustomItem = (props) => <div>{props.text}</div>;
|
|
138
|
+
*
|
|
139
|
+
* <ListBox item={CustomItem} />
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
item?: React.ComponentType<any>;
|
|
143
|
+
/**
|
|
144
|
+
* Fires when an item from the ListBox is clicked. Contains the clicked item.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```jsx
|
|
148
|
+
* <ListBox onItemClick={(event) => console.log(event.item)} />
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
onItemClick?: (event: ListBoxItemClickEvent) => void;
|
|
152
|
+
/**
|
|
153
|
+
* Fires when an item from the ListBox is selected. Contains the selected item.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```jsx
|
|
157
|
+
* <ListBox onItemSelect={(event) => console.log(event.item)} />
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
onItemSelect?: (event: ListBoxItemSelectEvent) => void;
|
|
161
|
+
/**
|
|
162
|
+
* Fires on keydown over the ListBox list items. You can use it to add extra keyboard navigation options.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```jsx
|
|
166
|
+
* <ListBox onKeyDown={(event) => console.log(event.keyCode)} />
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
onKeyDown?: (event: ListBoxKeyDownEvent) => void;
|
|
170
|
+
/**
|
|
171
|
+
* Fires when the user starts to drag an item from the ListBox. The event contains information about the item that is being dragged.
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```jsx
|
|
175
|
+
* <ListBox onDragStart={(event) => console.log(event.item)} />
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
onDragStart?: (event: ListBoxDragEvent) => void;
|
|
179
|
+
/**
|
|
180
|
+
* Fires when the user drags over an item from the ListBox. The event contains information about the item that is dragged over.
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```jsx
|
|
184
|
+
* <ListBox onDragOver={(event) => console.log(event.item)} />
|
|
185
|
+
* ```
|
|
186
|
+
*/
|
|
187
|
+
onDragOver?: (event: ListBoxDragEvent) => void;
|
|
188
|
+
/**
|
|
189
|
+
* Fires when the user drops an item. The event contains information about the drop target item.
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```jsx
|
|
193
|
+
* <ListBox onDrop={(event) => console.log(event.item)} />
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
onDrop?: (event: ListBoxDragEvent) => void;
|
|
197
|
+
/**
|
|
198
|
+
* Fires when a dragged element or text selection leaves the ListBox element.
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```jsx
|
|
202
|
+
* <ListBox onDragLeave={(event) => console.log(event.item)} />
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
onDragLeave?: (event: ListBoxDragLeaveEvent) => void;
|
|
206
|
+
/**
|
|
207
|
+
* Fires when a keyboard navigation action is triggered.
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* ```jsx
|
|
211
|
+
* <ListBox onKeyboardNavigate={(event) => console.log(event.item)} />
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
onKeyboardNavigate?: (event: ListBoxItemNavigateEvent) => void;
|
|
215
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.js';
|
|
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
|
+
* Configures the `size` of the buttons inside the ListBoxToolbar.
|
|
24
|
+
*
|
|
25
|
+
* The available options are:
|
|
26
|
+
* - small
|
|
27
|
+
* - medium
|
|
28
|
+
* - large
|
|
29
|
+
* - null—Does not set a size `className`.
|
|
30
|
+
*
|
|
31
|
+
* @default `medium`
|
|
32
|
+
*/
|
|
33
|
+
size?: 'small' | 'medium' | 'large';
|
|
34
|
+
/**
|
|
35
|
+
* The data of the main ListBox.
|
|
36
|
+
*/
|
|
37
|
+
data: Array<any>;
|
|
38
|
+
/**
|
|
39
|
+
* The data of the connected ListBox.
|
|
40
|
+
*/
|
|
41
|
+
dataConnected: Array<any>;
|
|
42
|
+
/**
|
|
43
|
+
* Set the selected field of the ListBoxToolbar.
|
|
44
|
+
* Based on that value of that field the ListBoxToolbar will determine which actions are allowed and which disabled.
|
|
45
|
+
*/
|
|
46
|
+
selectedField?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Fires when one of the ListBoxToolbar tools is clicked.
|
|
49
|
+
*/
|
|
50
|
+
onToolClick?: (event: ListBoxToolbarClickEvent) => void;
|
|
51
|
+
/**
|
|
52
|
+
* @hidden
|
|
53
|
+
*/
|
|
54
|
+
dir?: string;
|
|
55
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @hidden
|
|
3
|
+
*/
|
|
4
|
+
export const packageMetadata = Object.freeze({
|
|
5
|
+
name: '@progress/kendo-react-listbox',
|
|
6
|
+
productName: 'KendoReact',
|
|
7
|
+
productCode: 'KENDOUIREACT',
|
|
8
|
+
productCodes: ['KENDOUIREACT'],
|
|
9
|
+
publishDate: 1607357111,
|
|
10
|
+
version: '13.4.0-develop.1',
|
|
11
|
+
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
12
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-listbox",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.4.0-develop.1",
|
|
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",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
|
-
"@progress/kendo-react-buttons": "13.
|
|
30
|
-
"@progress/kendo-react-common": "13.
|
|
31
|
-
"@progress/kendo-react-intl": "13.
|
|
29
|
+
"@progress/kendo-react-buttons": "13.4.0-develop.1",
|
|
30
|
+
"@progress/kendo-react-common": "13.4.0-develop.1",
|
|
31
|
+
"@progress/kendo-react-intl": "13.4.0-develop.1",
|
|
32
32
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
33
33
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
34
34
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -52,7 +52,13 @@
|
|
|
52
52
|
],
|
|
53
53
|
"@progress": {
|
|
54
54
|
"friendlyName": "ListBox",
|
|
55
|
-
"framework": "KendoReact"
|
|
55
|
+
"framework": "KendoReact",
|
|
56
|
+
"package": {
|
|
57
|
+
"productName": "KendoReact",
|
|
58
|
+
"productCode": "KENDOUIREACT",
|
|
59
|
+
"publishDate": 1770219172,
|
|
60
|
+
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
61
|
+
}
|
|
56
62
|
},
|
|
57
63
|
"publishConfig": {
|
|
58
64
|
"access": "public"
|
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
|
+
* Processes the data collections 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: any[] | undefined, listBoxTwoData: any[] | undefined, 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
|
+
* Processes the data collections based on the dragged and dropped 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: any[] | undefined, listBoxTwoData: any[] | undefined, dragItem: any, dropItem: any, valueField: string) => {
|
|
36
|
+
listBoxOneData: any[];
|
|
37
|
+
listBoxTwoData: any[];
|
|
38
|
+
};
|