@progress/kendo-react-sortable 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/Sortable.d.ts +223 -0
- package/dist/cdn/js/kendo-react-sortable.js +1 -1
- package/events/BaseEvent.d.ts +16 -0
- package/events/PreventableEvent.d.ts +25 -0
- package/events/SortableOnDragEndEvent.d.ts +34 -0
- package/events/SortableOnDragOverEvent.d.ts +34 -0
- package/events/SortableOnDragStartEvent.d.ts +31 -0
- package/events/SortableOnNavigateEvent.d.ts +34 -0
- package/index.d.mts +9 -541
- package/index.d.ts +9 -541
- package/interfaces/SortableDefaultProps.d.ts +35 -0
- package/interfaces/SortableEmptyItemUIProps.d.ts +16 -0
- package/interfaces/SortableItemUIProps.d.ts +44 -0
- package/interfaces/SortableProps.d.ts +127 -0
- package/messages/index.d.ts +17 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +10 -16
- package/package.json +4 -4
- package/utils/utils.d.ts +36 -0
package/index.d.mts
CHANGED
|
@@ -5,544 +5,12 @@
|
|
|
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
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
declare interface BaseEvent<T extends React.Component> {
|
|
20
|
-
/**
|
|
21
|
-
* An event target.
|
|
22
|
-
*/
|
|
23
|
-
target: T;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @hidden
|
|
28
|
-
*/
|
|
29
|
-
declare abstract class PreventableEvent {
|
|
30
|
-
private prevented;
|
|
31
|
-
/**
|
|
32
|
-
* Prevents the default action for a specified event.
|
|
33
|
-
* In this way, the source component suppresses the built-in behavior that follows the event.
|
|
34
|
-
*/
|
|
35
|
-
preventDefault(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Returns `true` if the event was prevented by any of its subscribers.
|
|
38
|
-
*
|
|
39
|
-
* @returns - Returns `true` if the default action was prevented.
|
|
40
|
-
* Otherwise, returns `false`.
|
|
41
|
-
*/
|
|
42
|
-
isDefaultPrevented(): boolean;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export declare class Sortable extends React_2.Component<SortableProps, SortableState> {
|
|
46
|
-
/**
|
|
47
|
-
* @hidden
|
|
48
|
-
*/
|
|
49
|
-
static defaultProps: SortableDefaultProps;
|
|
50
|
-
/**
|
|
51
|
-
* @hidden
|
|
52
|
-
*/
|
|
53
|
-
static propTypes: {
|
|
54
|
-
idField: default_2.Validator<string>;
|
|
55
|
-
disabledField: default_2.Requireable<string>;
|
|
56
|
-
data: default_2.Validator<any[]>;
|
|
57
|
-
tabIndex: default_2.Requireable<number>;
|
|
58
|
-
navigation: default_2.Requireable<boolean>;
|
|
59
|
-
animation: default_2.Requireable<boolean>;
|
|
60
|
-
itemsWrapUI: default_2.Requireable<any>;
|
|
61
|
-
itemUI: default_2.Validator<(...args: any[]) => any>;
|
|
62
|
-
emptyItemUI: default_2.Requireable<(...args: any[]) => any>;
|
|
63
|
-
style: default_2.Requireable<object>;
|
|
64
|
-
className: default_2.Requireable<string>;
|
|
65
|
-
onDragStart: default_2.Requireable<(...args: any[]) => any>;
|
|
66
|
-
onDragOver: default_2.Requireable<(...args: any[]) => any>;
|
|
67
|
-
onDragEnd: default_2.Requireable<(...args: any[]) => any>;
|
|
68
|
-
onNavigate: default_2.Requireable<(...args: any[]) => any>;
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* @hidden
|
|
72
|
-
*/
|
|
73
|
-
state: {
|
|
74
|
-
clientX: number;
|
|
75
|
-
clientY: number;
|
|
76
|
-
isDragging: boolean;
|
|
77
|
-
activeId: string;
|
|
78
|
-
dragCueWidth: number;
|
|
79
|
-
dragCueHeight: number;
|
|
80
|
-
};
|
|
81
|
-
private isRtl;
|
|
82
|
-
private get container();
|
|
83
|
-
private itemRefsMap;
|
|
84
|
-
private oldSizesMap;
|
|
85
|
-
private animatingItemMap;
|
|
86
|
-
private draggableRef;
|
|
87
|
-
private offsetParent;
|
|
88
|
-
private isUnmounted;
|
|
89
|
-
private focusActiveId;
|
|
90
|
-
private isKeyboardNavigated;
|
|
91
|
-
private isDragPrevented;
|
|
92
|
-
private navigation?;
|
|
93
|
-
private readonly showLicenseWatermark;
|
|
94
|
-
private readonly licenseMessage?;
|
|
95
|
-
constructor(props: SortableProps);
|
|
96
|
-
/**
|
|
97
|
-
* @hidden
|
|
98
|
-
*/
|
|
99
|
-
getSnapshotBeforeUpdate(): null;
|
|
100
|
-
/**
|
|
101
|
-
* @hidden
|
|
102
|
-
*/
|
|
103
|
-
componentDidUpdate(previousProps: SortableProps): void;
|
|
104
|
-
/**
|
|
105
|
-
* @hidden
|
|
106
|
-
*/
|
|
107
|
-
componentDidMount(): void;
|
|
108
|
-
/**
|
|
109
|
-
* @hidden
|
|
110
|
-
*/
|
|
111
|
-
componentWillUnmount(): void;
|
|
112
|
-
/**
|
|
113
|
-
* @hidden
|
|
114
|
-
*/
|
|
115
|
-
windowTimeout: (id: any) => void;
|
|
116
|
-
/**
|
|
117
|
-
* @hidden
|
|
118
|
-
*/
|
|
119
|
-
swapItems: (newState: object[], source: number, destination: number) => number;
|
|
120
|
-
/**
|
|
121
|
-
* @hidden
|
|
122
|
-
*/
|
|
123
|
-
generateNewState: (prevIndex: number, nextIndex: number) => object[];
|
|
124
|
-
/**
|
|
125
|
-
* @hidden
|
|
126
|
-
*/
|
|
127
|
-
closestSortableItem: (target: HTMLElement | null) => {
|
|
128
|
-
element: HTMLElement | null;
|
|
129
|
-
id: string;
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* @hidden
|
|
133
|
-
*/
|
|
134
|
-
isSortable: (target: HTMLElement) => boolean;
|
|
135
|
-
/**
|
|
136
|
-
* @hidden
|
|
137
|
-
*/
|
|
138
|
-
closestSortable: (target: HTMLElement | null) => HTMLElement | null;
|
|
139
|
-
/**
|
|
140
|
-
* @hidden
|
|
141
|
-
*/
|
|
142
|
-
isSameSortable: (element: HTMLElement) => boolean;
|
|
143
|
-
/**
|
|
144
|
-
* @hidden
|
|
145
|
-
*/
|
|
146
|
-
idComparer: (id1: any, id2: any) => boolean;
|
|
147
|
-
/**
|
|
148
|
-
* @hidden
|
|
149
|
-
*/
|
|
150
|
-
findItem: (id: string) => object | undefined;
|
|
151
|
-
/**
|
|
152
|
-
* @hidden
|
|
153
|
-
*/
|
|
154
|
-
findIndex: (id: string) => number;
|
|
155
|
-
/**
|
|
156
|
-
* @hidden
|
|
157
|
-
*/
|
|
158
|
-
isItemDisabled: (item: any) => boolean;
|
|
159
|
-
/**
|
|
160
|
-
* @hidden
|
|
161
|
-
*/
|
|
162
|
-
shouldResetActive: () => boolean;
|
|
163
|
-
/**
|
|
164
|
-
* @hidden
|
|
165
|
-
*/
|
|
166
|
-
parentOffset(): any;
|
|
167
|
-
/**
|
|
168
|
-
* @hidden
|
|
169
|
-
*/
|
|
170
|
-
widgetTarget: (target: any) => boolean;
|
|
171
|
-
/**
|
|
172
|
-
* @hidden
|
|
173
|
-
*/
|
|
174
|
-
allowDrag: (target: HTMLElement) => boolean;
|
|
175
|
-
/**
|
|
176
|
-
* @hidden
|
|
177
|
-
*/
|
|
178
|
-
onDragStart: (eventData: DraggableDragStartEvent) => void;
|
|
179
|
-
/**
|
|
180
|
-
* @hidden
|
|
181
|
-
*/
|
|
182
|
-
onDragOver: (eventData: DraggableDragEvent) => void;
|
|
183
|
-
/**
|
|
184
|
-
* @hidden
|
|
185
|
-
*/
|
|
186
|
-
onDragEnd: (eventData: DraggableReleaseEvent) => void;
|
|
187
|
-
/**
|
|
188
|
-
* @hidden
|
|
189
|
-
*/
|
|
190
|
-
shouldReorder: (draggerOverElement: HTMLElement | null, clientX: number, clientY: number) => boolean | null;
|
|
191
|
-
/**
|
|
192
|
-
* @hidden
|
|
193
|
-
*/
|
|
194
|
-
thresholdRect: (draggerOverElement: HTMLElement | null) => {
|
|
195
|
-
top: number;
|
|
196
|
-
left: number;
|
|
197
|
-
bottom: number;
|
|
198
|
-
right: number;
|
|
199
|
-
} | null;
|
|
200
|
-
/**
|
|
201
|
-
* @hidden
|
|
202
|
-
*/
|
|
203
|
-
onItemBlur: () => void;
|
|
204
|
-
/**
|
|
205
|
-
* @hidden
|
|
206
|
-
*/
|
|
207
|
-
onItemFocus: (event: React_2.FocusEvent<HTMLDivElement>) => void;
|
|
208
|
-
/**
|
|
209
|
-
* @hidden
|
|
210
|
-
*/
|
|
211
|
-
resetState: (resetActive?: boolean) => void;
|
|
212
|
-
/**
|
|
213
|
-
* @hidden
|
|
214
|
-
*/
|
|
215
|
-
renderData: () => JSX.Element[];
|
|
216
|
-
/**
|
|
217
|
-
* @hidden
|
|
218
|
-
*/
|
|
219
|
-
renderNoData: () => JSX.Element | undefined;
|
|
220
|
-
/**
|
|
221
|
-
* @hidden
|
|
222
|
-
*/
|
|
223
|
-
renderDragCue: () => JSX.Element | undefined;
|
|
224
|
-
/**
|
|
225
|
-
* @hidden
|
|
226
|
-
*/
|
|
227
|
-
refAssign: (element: any, id: any) => void;
|
|
228
|
-
/**
|
|
229
|
-
* @hidden
|
|
230
|
-
*/
|
|
231
|
-
draggableRefAssign: (ref: any) => void;
|
|
232
|
-
/**
|
|
233
|
-
* @hidden
|
|
234
|
-
*/
|
|
235
|
-
onKeyDown: (event: React_2.KeyboardEvent<HTMLDivElement>) => void;
|
|
236
|
-
/**
|
|
237
|
-
* @hidden
|
|
238
|
-
*/
|
|
239
|
-
handleNext: (t: HTMLElement, nav: Navigation, ev: React_2.KeyboardEvent<HTMLElement>) => void;
|
|
240
|
-
handlePrev: (t: HTMLElement, nav: Navigation, ev: React_2.KeyboardEvent<HTMLElement>) => void;
|
|
241
|
-
moveItem: (t: HTMLElement, nav: Navigation, ev: React_2.KeyboardEvent<HTMLElement>, direction: 'next' | 'prev') => void;
|
|
242
|
-
render(): JSX.Element;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* @hidden
|
|
247
|
-
*/
|
|
248
|
-
declare interface SortableDefaultProps {
|
|
249
|
-
/**
|
|
250
|
-
* Specifies the tab index of the Sortable items.
|
|
251
|
-
*/
|
|
252
|
-
tabIndex?: number;
|
|
253
|
-
/**
|
|
254
|
-
* Enables or disables the [keyboard navigation](https://www.telerik.com/kendo-react-ui/components/sortable/keyboard-navigation).
|
|
255
|
-
* Defaults to `true`.
|
|
256
|
-
*
|
|
257
|
-
* @default true
|
|
258
|
-
*/
|
|
259
|
-
navigation?: boolean;
|
|
260
|
-
/**
|
|
261
|
-
* Enables or disables the reorder animation of the Sortable items.
|
|
262
|
-
* defaults to `true`.
|
|
263
|
-
*
|
|
264
|
-
* @default true
|
|
265
|
-
*/
|
|
266
|
-
animation?: boolean;
|
|
267
|
-
/**
|
|
268
|
-
* The component that is rendered when no data is available.
|
|
269
|
-
*/
|
|
270
|
-
emptyItemUI?: React.ComponentType<SortableEmptyItemUIProps>;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Represents the props of the UI component that is rendered when no data is available.
|
|
275
|
-
*/
|
|
276
|
-
export declare interface SortableEmptyItemUIProps {
|
|
277
|
-
/**
|
|
278
|
-
* The `noData` localization message.
|
|
279
|
-
*/
|
|
280
|
-
message: string;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* Represents the props of the Sortable item UI component.
|
|
285
|
-
*/
|
|
286
|
-
export declare interface SortableItemUIProps {
|
|
287
|
-
/**
|
|
288
|
-
* The data object that represents the current Sortable item.
|
|
289
|
-
*/
|
|
290
|
-
dataItem: any;
|
|
291
|
-
/**
|
|
292
|
-
* The flag which describes that an item is disabled.
|
|
293
|
-
*/
|
|
294
|
-
isDisabled: boolean;
|
|
295
|
-
/**
|
|
296
|
-
* The flag which describes that an item is active.
|
|
297
|
-
*/
|
|
298
|
-
isActive: boolean;
|
|
299
|
-
/**
|
|
300
|
-
* The flag which describes that an item is dragged.
|
|
301
|
-
*/
|
|
302
|
-
isDragged: boolean;
|
|
303
|
-
/**
|
|
304
|
-
* The flag which describes that an item is rendered inside the drag cue.
|
|
305
|
-
*/
|
|
306
|
-
isDragCue: boolean;
|
|
307
|
-
/**
|
|
308
|
-
* The callback function that has to be passed to the `ref` property of the first child element.
|
|
309
|
-
*/
|
|
310
|
-
forwardRef?: (element: HTMLElement) => void;
|
|
311
|
-
/**
|
|
312
|
-
* The atributes that have to be passed to the first child element.
|
|
313
|
-
*/
|
|
314
|
-
attributes?: any;
|
|
315
|
-
/**
|
|
316
|
-
* The CSS styles that have to be passed to the first child element.
|
|
317
|
-
*/
|
|
318
|
-
style: React.CSSProperties;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* The `SortableOnDragEndEvent` event.
|
|
323
|
-
*/
|
|
324
|
-
export declare class SortableOnDragEndEvent implements BaseEvent<Sortable> {
|
|
325
|
-
/**
|
|
326
|
-
* The Sortable component.
|
|
327
|
-
*/
|
|
328
|
-
target: Sortable;
|
|
329
|
-
/**
|
|
330
|
-
* The previous index of the dragged item.
|
|
331
|
-
*/
|
|
332
|
-
prevIndex: number;
|
|
333
|
-
/**
|
|
334
|
-
* The new index of the dragged item.
|
|
335
|
-
*/
|
|
336
|
-
nextIndex: number;
|
|
337
|
-
/**
|
|
338
|
-
* The new state of the Sortable data.
|
|
339
|
-
*/
|
|
340
|
-
newState: Array<object>;
|
|
341
|
-
/**
|
|
342
|
-
* @hidden
|
|
343
|
-
*/
|
|
344
|
-
constructor(target: Sortable, prevIndex: number, nextIndex: number, newState: Array<object>);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* The `SortableOnDragOverEvent` event.
|
|
349
|
-
*/
|
|
350
|
-
export declare class SortableOnDragOverEvent implements BaseEvent<Sortable> {
|
|
351
|
-
/**
|
|
352
|
-
* The Sortable component.
|
|
353
|
-
*/
|
|
354
|
-
target: Sortable;
|
|
355
|
-
/**
|
|
356
|
-
* The previous index of the dragged item.
|
|
357
|
-
*/
|
|
358
|
-
prevIndex: number;
|
|
359
|
-
/**
|
|
360
|
-
* The new index of the dragged item.
|
|
361
|
-
*/
|
|
362
|
-
nextIndex: number;
|
|
363
|
-
/**
|
|
364
|
-
* The new state of the Sortable data.
|
|
365
|
-
*/
|
|
366
|
-
newState: Array<object>;
|
|
367
|
-
/**
|
|
368
|
-
* @hidden
|
|
369
|
-
*/
|
|
370
|
-
constructor(target: Sortable, prevIndex: number, nextIndex: number, newState: Array<object>);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* The `SortableOnDragStartEvent` event.
|
|
375
|
-
*/
|
|
376
|
-
export declare class SortableOnDragStartEvent extends PreventableEvent implements BaseEvent<Sortable> {
|
|
377
|
-
/**
|
|
378
|
-
* The Sortable component.
|
|
379
|
-
*/
|
|
380
|
-
target: Sortable;
|
|
381
|
-
/**
|
|
382
|
-
* The target element.
|
|
383
|
-
*/
|
|
384
|
-
element: HTMLElement;
|
|
385
|
-
/**
|
|
386
|
-
* The previous index of the dragged item.
|
|
387
|
-
*/
|
|
388
|
-
prevIndex: number;
|
|
389
|
-
/**
|
|
390
|
-
* @hidden
|
|
391
|
-
*/
|
|
392
|
-
constructor(target: Sortable, prevIndex: number, element: HTMLElement);
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* The `SortableOnNavigateEvent` event.
|
|
397
|
-
*/
|
|
398
|
-
export declare class SortableOnNavigateEvent implements BaseEvent<Sortable> {
|
|
399
|
-
/**
|
|
400
|
-
* The Sortable component.
|
|
401
|
-
*/
|
|
402
|
-
target: Sortable;
|
|
403
|
-
/**
|
|
404
|
-
* The previous index of the dragged item.
|
|
405
|
-
*/
|
|
406
|
-
prevIndex: number;
|
|
407
|
-
/**
|
|
408
|
-
* The new index of the dragged item.
|
|
409
|
-
*/
|
|
410
|
-
nextIndex: number;
|
|
411
|
-
/**
|
|
412
|
-
* The new state of the Sortable data.
|
|
413
|
-
*/
|
|
414
|
-
newState: Array<object>;
|
|
415
|
-
/**
|
|
416
|
-
* @hidden
|
|
417
|
-
*/
|
|
418
|
-
constructor(target: Sortable, prevIndex: number, nextIndex: number, newState: Array<object>);
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Represents the props of the [KendoReact Sortable component](https://www.telerik.com/kendo-react-ui/components/sortable).
|
|
423
|
-
*/
|
|
424
|
-
export declare interface SortableProps extends SortableDefaultProps {
|
|
425
|
-
/**
|
|
426
|
-
* (Required) The Sortable items UI.
|
|
427
|
-
*
|
|
428
|
-
* @example
|
|
429
|
-
* ```jsx
|
|
430
|
-
* const ItemUI = (props) => <div>{props.dataItem.text}</div>;
|
|
431
|
-
* <Sortable itemUI={ItemUI} />
|
|
432
|
-
* ```
|
|
433
|
-
*/
|
|
434
|
-
itemUI: React.ComponentType<SortableItemUIProps>;
|
|
435
|
-
/**
|
|
436
|
-
* @hidden
|
|
437
|
-
*
|
|
438
|
-
* Use it to override the sortable items container component.
|
|
439
|
-
*
|
|
440
|
-
* @default 'div'
|
|
441
|
-
*/
|
|
442
|
-
itemsWrapUI?: React.ForwardRefExoticComponent<any>;
|
|
443
|
-
/**
|
|
444
|
-
* (Required) The field which uniquely identifies the Sortable items.
|
|
445
|
-
*
|
|
446
|
-
* @example
|
|
447
|
-
* ```jsx
|
|
448
|
-
* <Sortable idField="id" />
|
|
449
|
-
* ```
|
|
450
|
-
*/
|
|
451
|
-
idField: string;
|
|
452
|
-
/**
|
|
453
|
-
* The field which enables or disables an item.
|
|
454
|
-
*
|
|
455
|
-
* @example
|
|
456
|
-
* ```jsx
|
|
457
|
-
* <Sortable disabledField="isDisabled" />
|
|
458
|
-
* ```
|
|
459
|
-
*/
|
|
460
|
-
disabledField?: string;
|
|
461
|
-
/**
|
|
462
|
-
* (Required) The data items of the Sortable.
|
|
463
|
-
*
|
|
464
|
-
* @example
|
|
465
|
-
* ```jsx
|
|
466
|
-
* <Sortable data={[{ id: 1, text: 'Item 1' }, { id: 2, text: 'Item 2' }]} />
|
|
467
|
-
* ```
|
|
468
|
-
*/
|
|
469
|
-
data: Array<object>;
|
|
470
|
-
/**
|
|
471
|
-
* Defines the CSS styles which are applied to the Sortable element.
|
|
472
|
-
*
|
|
473
|
-
* @example
|
|
474
|
-
* ```jsx
|
|
475
|
-
* <Sortable style={{ border: '1px solid black' }} />
|
|
476
|
-
* ```
|
|
477
|
-
*/
|
|
478
|
-
style?: React.CSSProperties;
|
|
479
|
-
/**
|
|
480
|
-
* Defines the CSS class which is applied to the Sortable element.
|
|
481
|
-
*
|
|
482
|
-
* @example
|
|
483
|
-
* ```jsx
|
|
484
|
-
* <Sortable className="custom-sortable" />
|
|
485
|
-
* ```
|
|
486
|
-
*/
|
|
487
|
-
className?: string;
|
|
488
|
-
/**
|
|
489
|
-
* Fires when the user starts dragging an item. This event is preventable.
|
|
490
|
-
*
|
|
491
|
-
* @example
|
|
492
|
-
* ```jsx
|
|
493
|
-
* <Sortable onDragStart={(event) => console.log(event)} />
|
|
494
|
-
* ```
|
|
495
|
-
*/
|
|
496
|
-
onDragStart?: (event: SortableOnDragStartEvent) => void;
|
|
497
|
-
/**
|
|
498
|
-
* Fires when the user is dragging an item over another Sortable item.
|
|
499
|
-
*
|
|
500
|
-
* @example
|
|
501
|
-
* ```jsx
|
|
502
|
-
* <Sortable onDragOver={(event) => console.log(event)} />
|
|
503
|
-
* ```
|
|
504
|
-
*/
|
|
505
|
-
onDragOver?: (event: SortableOnDragOverEvent) => void;
|
|
506
|
-
/**
|
|
507
|
-
* Fires when the user stops dragging an item.
|
|
508
|
-
*
|
|
509
|
-
* @example
|
|
510
|
-
* ```jsx
|
|
511
|
-
* <Sortable onDragEnd={(event) => console.log(event)} />
|
|
512
|
-
* ```
|
|
513
|
-
*/
|
|
514
|
-
onDragEnd?: (event: SortableOnDragEndEvent) => void;
|
|
515
|
-
/**
|
|
516
|
-
* Fires when the user navigates within the Sortable by using the keyboard.
|
|
517
|
-
*
|
|
518
|
-
* @example
|
|
519
|
-
* ```jsx
|
|
520
|
-
* <Sortable onNavigate={(event) => console.log(event)} />
|
|
521
|
-
* ```
|
|
522
|
-
*/
|
|
523
|
-
onNavigate?: (event: SortableOnNavigateEvent) => void;
|
|
524
|
-
/**
|
|
525
|
-
* If set to `true`, the user can use dedicated shortcuts to interact with the Sortable.
|
|
526
|
-
* By default, navigation is disabled.
|
|
527
|
-
*
|
|
528
|
-
* @example
|
|
529
|
-
* ```jsx
|
|
530
|
-
* <Sortable navigatable={true} />
|
|
531
|
-
* ```
|
|
532
|
-
*/
|
|
533
|
-
navigatable?: boolean;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* @hidden
|
|
538
|
-
*/
|
|
539
|
-
declare interface SortableState {
|
|
540
|
-
clientX: number;
|
|
541
|
-
clientY: number;
|
|
542
|
-
isDragging: boolean;
|
|
543
|
-
activeId: string;
|
|
544
|
-
dragCueWidth: number;
|
|
545
|
-
dragCueHeight: number;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
export { }
|
|
8
|
+
import { Sortable } from './Sortable.js';
|
|
9
|
+
import { SortableOnDragStartEvent } from './events/SortableOnDragStartEvent.js';
|
|
10
|
+
import { SortableOnDragOverEvent } from './events/SortableOnDragOverEvent.js';
|
|
11
|
+
import { SortableOnDragEndEvent } from './events/SortableOnDragEndEvent.js';
|
|
12
|
+
import { SortableProps } from './interfaces/SortableProps.js';
|
|
13
|
+
import { SortableItemUIProps } from './interfaces/SortableItemUIProps.js';
|
|
14
|
+
import { SortableEmptyItemUIProps } from './interfaces/SortableEmptyItemUIProps.js';
|
|
15
|
+
import { SortableOnNavigateEvent } from './events/SortableOnNavigateEvent.js';
|
|
16
|
+
export { Sortable, SortableProps, SortableItemUIProps, SortableEmptyItemUIProps, SortableOnDragStartEvent, SortableOnDragOverEvent, SortableOnDragEndEvent, SortableOnNavigateEvent };
|