@progress/kendo-react-common 9.5.0-develop.1 → 9.5.0-develop.2
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/Draggable.js +1 -1
- package/Draggable.mjs +20 -19
- package/Droppable.js +1 -1
- package/Droppable.mjs +14 -8
- package/dist/cdn/js/kendo-react-common.js +1 -1
- package/drag-n-drop/context/index.js +1 -1
- package/drag-n-drop/context/index.mjs +15 -13
- package/drag-n-drop/index.js +1 -1
- package/drag-n-drop/index.mjs +37 -20
- package/hooks/useDraggable.js +1 -1
- package/hooks/useDraggable.mjs +148 -104
- package/hooks/useDroppable.js +1 -1
- package/hooks/useDroppable.mjs +38 -38
- package/hooks/useInheritedState.js +1 -1
- package/hooks/useInheritedState.mjs +5 -5
- package/index.d.mts +39 -2
- package/index.d.ts +39 -2
- package/package.json +1 -1
package/index.d.mts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { default as default_2 } from 'prop-types';
|
|
9
9
|
import { default as default_3 } from 'react';
|
|
10
|
+
import { DragTarget } from '@progress/kendo-draggable-common';
|
|
11
|
+
import { DropTarget } from '@progress/kendo-draggable-common';
|
|
10
12
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
11
13
|
import { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
12
14
|
import * as React_2 from 'react';
|
|
@@ -1127,6 +1129,22 @@ export declare const DragAndDrop: {
|
|
|
1127
1129
|
displayName: string;
|
|
1128
1130
|
};
|
|
1129
1131
|
|
|
1132
|
+
/**
|
|
1133
|
+
* @hidden
|
|
1134
|
+
*/
|
|
1135
|
+
declare const DragAndDropContext: React_2.Context<{
|
|
1136
|
+
drag?: React_2.RefObject<DragTarget> | null | undefined;
|
|
1137
|
+
setDrag?: ((value: React_2.RefObject<DragTarget> | null) => void) | undefined;
|
|
1138
|
+
drop?: React_2.RefObject<DropTarget> | null | undefined;
|
|
1139
|
+
setDrop?: ((value: React_2.RefObject<DropTarget> | null) => void) | undefined;
|
|
1140
|
+
drags?: React_2.RefObject<DragTarget>[] | undefined;
|
|
1141
|
+
registerDrag?: ((item: React_2.RefObject<DragTarget>) => void) | undefined;
|
|
1142
|
+
deregisterDrag?: ((item: React_2.RefObject<DragTarget>) => void) | undefined;
|
|
1143
|
+
drops?: React_2.RefObject<DropTarget>[] | undefined;
|
|
1144
|
+
registerDrop?: ((item: React_2.RefObject<DropTarget>) => void) | undefined;
|
|
1145
|
+
deregisterDrop?: ((item: React_2.RefObject<DropTarget>) => void) | undefined;
|
|
1146
|
+
}>;
|
|
1147
|
+
|
|
1130
1148
|
/**
|
|
1131
1149
|
* Represents the properties of the `DragAndDrop` component.
|
|
1132
1150
|
*/
|
|
@@ -1135,6 +1153,10 @@ export declare interface DragAndDropProps {
|
|
|
1135
1153
|
* Represents the `children` of the `DragAndDrop` component. The `children` prop can be any valid React Element.
|
|
1136
1154
|
*/
|
|
1137
1155
|
children?: React_2.ReactNode;
|
|
1156
|
+
/**
|
|
1157
|
+
* Allows passing a custom context to the `DragAndDrop` component. Useful when there are multiple drag-and-drop functionalities in a single component.
|
|
1158
|
+
*/
|
|
1159
|
+
context?: typeof DragAndDropContext;
|
|
1138
1160
|
}
|
|
1139
1161
|
|
|
1140
1162
|
/**
|
|
@@ -1206,6 +1228,10 @@ export declare interface DraggableOptions {
|
|
|
1206
1228
|
scrollContainer?: React_2.RefObject<HTMLElement | null | {
|
|
1207
1229
|
element: HTMLElement | null;
|
|
1208
1230
|
}>;
|
|
1231
|
+
/**
|
|
1232
|
+
* Allows passing custom context. Use it to isolate drag and drop events in scenarios with multiple drag and drop functionalities on a single component.
|
|
1233
|
+
*/
|
|
1234
|
+
context?: typeof DragAndDropContext;
|
|
1209
1235
|
}
|
|
1210
1236
|
|
|
1211
1237
|
/**
|
|
@@ -1568,10 +1594,20 @@ export declare interface DroppableHandle {
|
|
|
1568
1594
|
element?: HTMLElement;
|
|
1569
1595
|
}
|
|
1570
1596
|
|
|
1597
|
+
/**
|
|
1598
|
+
* Represents the configuration object type of the `Droppable` component and `useDroppable` hook.
|
|
1599
|
+
*/
|
|
1600
|
+
export declare interface DroppableOptions {
|
|
1601
|
+
/**
|
|
1602
|
+
* The context to use for the droppable.
|
|
1603
|
+
*/
|
|
1604
|
+
context?: typeof DragAndDropContext;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1571
1607
|
/**
|
|
1572
1608
|
* Represents the props of the KendoReact Droppable component.
|
|
1573
1609
|
*/
|
|
1574
|
-
export declare interface DroppableProps {
|
|
1610
|
+
export declare interface DroppableProps extends DroppableOptions {
|
|
1575
1611
|
/**
|
|
1576
1612
|
* Fires when the user enters the element during drag.
|
|
1577
1613
|
*/
|
|
@@ -3843,6 +3879,7 @@ export declare function useDraggable(ref: React_2.RefObject<HTMLElement | null |
|
|
|
3843
3879
|
*
|
|
3844
3880
|
* @param ref - The `ref` of the HTML Element or React Component which will enable the `droppable` functionality.
|
|
3845
3881
|
* @param callbacks - A collection of callbacks, called by the `useDroppable` hook when a specific action occurs.
|
|
3882
|
+
* @param options - The options for the `useDroppable` hook.
|
|
3846
3883
|
*/
|
|
3847
3884
|
export declare function useDroppable(ref: React_2.RefObject<HTMLElement | null | {
|
|
3848
3885
|
element: HTMLElement | null;
|
|
@@ -3851,7 +3888,7 @@ export declare function useDroppable(ref: React_2.RefObject<HTMLElement | null |
|
|
|
3851
3888
|
onDragOver?: (event: NormalizedDragEvent) => void;
|
|
3852
3889
|
onDragLeave?: (event: NormalizedDragEvent) => void;
|
|
3853
3890
|
onDrop?: (event: NormalizedDragEvent) => void;
|
|
3854
|
-
}): void;
|
|
3891
|
+
}, options?: DroppableOptions): void;
|
|
3855
3892
|
|
|
3856
3893
|
/** @hidden */
|
|
3857
3894
|
export declare function useId(id?: string): any;
|
package/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { default as default_2 } from 'prop-types';
|
|
9
9
|
import { default as default_3 } from 'react';
|
|
10
|
+
import { DragTarget } from '@progress/kendo-draggable-common';
|
|
11
|
+
import { DropTarget } from '@progress/kendo-draggable-common';
|
|
10
12
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
11
13
|
import { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
12
14
|
import * as React_2 from 'react';
|
|
@@ -1127,6 +1129,22 @@ export declare const DragAndDrop: {
|
|
|
1127
1129
|
displayName: string;
|
|
1128
1130
|
};
|
|
1129
1131
|
|
|
1132
|
+
/**
|
|
1133
|
+
* @hidden
|
|
1134
|
+
*/
|
|
1135
|
+
declare const DragAndDropContext: React_2.Context<{
|
|
1136
|
+
drag?: React_2.RefObject<DragTarget> | null | undefined;
|
|
1137
|
+
setDrag?: ((value: React_2.RefObject<DragTarget> | null) => void) | undefined;
|
|
1138
|
+
drop?: React_2.RefObject<DropTarget> | null | undefined;
|
|
1139
|
+
setDrop?: ((value: React_2.RefObject<DropTarget> | null) => void) | undefined;
|
|
1140
|
+
drags?: React_2.RefObject<DragTarget>[] | undefined;
|
|
1141
|
+
registerDrag?: ((item: React_2.RefObject<DragTarget>) => void) | undefined;
|
|
1142
|
+
deregisterDrag?: ((item: React_2.RefObject<DragTarget>) => void) | undefined;
|
|
1143
|
+
drops?: React_2.RefObject<DropTarget>[] | undefined;
|
|
1144
|
+
registerDrop?: ((item: React_2.RefObject<DropTarget>) => void) | undefined;
|
|
1145
|
+
deregisterDrop?: ((item: React_2.RefObject<DropTarget>) => void) | undefined;
|
|
1146
|
+
}>;
|
|
1147
|
+
|
|
1130
1148
|
/**
|
|
1131
1149
|
* Represents the properties of the `DragAndDrop` component.
|
|
1132
1150
|
*/
|
|
@@ -1135,6 +1153,10 @@ export declare interface DragAndDropProps {
|
|
|
1135
1153
|
* Represents the `children` of the `DragAndDrop` component. The `children` prop can be any valid React Element.
|
|
1136
1154
|
*/
|
|
1137
1155
|
children?: React_2.ReactNode;
|
|
1156
|
+
/**
|
|
1157
|
+
* Allows passing a custom context to the `DragAndDrop` component. Useful when there are multiple drag-and-drop functionalities in a single component.
|
|
1158
|
+
*/
|
|
1159
|
+
context?: typeof DragAndDropContext;
|
|
1138
1160
|
}
|
|
1139
1161
|
|
|
1140
1162
|
/**
|
|
@@ -1206,6 +1228,10 @@ export declare interface DraggableOptions {
|
|
|
1206
1228
|
scrollContainer?: React_2.RefObject<HTMLElement | null | {
|
|
1207
1229
|
element: HTMLElement | null;
|
|
1208
1230
|
}>;
|
|
1231
|
+
/**
|
|
1232
|
+
* Allows passing custom context. Use it to isolate drag and drop events in scenarios with multiple drag and drop functionalities on a single component.
|
|
1233
|
+
*/
|
|
1234
|
+
context?: typeof DragAndDropContext;
|
|
1209
1235
|
}
|
|
1210
1236
|
|
|
1211
1237
|
/**
|
|
@@ -1568,10 +1594,20 @@ export declare interface DroppableHandle {
|
|
|
1568
1594
|
element?: HTMLElement;
|
|
1569
1595
|
}
|
|
1570
1596
|
|
|
1597
|
+
/**
|
|
1598
|
+
* Represents the configuration object type of the `Droppable` component and `useDroppable` hook.
|
|
1599
|
+
*/
|
|
1600
|
+
export declare interface DroppableOptions {
|
|
1601
|
+
/**
|
|
1602
|
+
* The context to use for the droppable.
|
|
1603
|
+
*/
|
|
1604
|
+
context?: typeof DragAndDropContext;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1571
1607
|
/**
|
|
1572
1608
|
* Represents the props of the KendoReact Droppable component.
|
|
1573
1609
|
*/
|
|
1574
|
-
export declare interface DroppableProps {
|
|
1610
|
+
export declare interface DroppableProps extends DroppableOptions {
|
|
1575
1611
|
/**
|
|
1576
1612
|
* Fires when the user enters the element during drag.
|
|
1577
1613
|
*/
|
|
@@ -3843,6 +3879,7 @@ export declare function useDraggable(ref: React_2.RefObject<HTMLElement | null |
|
|
|
3843
3879
|
*
|
|
3844
3880
|
* @param ref - The `ref` of the HTML Element or React Component which will enable the `droppable` functionality.
|
|
3845
3881
|
* @param callbacks - A collection of callbacks, called by the `useDroppable` hook when a specific action occurs.
|
|
3882
|
+
* @param options - The options for the `useDroppable` hook.
|
|
3846
3883
|
*/
|
|
3847
3884
|
export declare function useDroppable(ref: React_2.RefObject<HTMLElement | null | {
|
|
3848
3885
|
element: HTMLElement | null;
|
|
@@ -3851,7 +3888,7 @@ export declare function useDroppable(ref: React_2.RefObject<HTMLElement | null |
|
|
|
3851
3888
|
onDragOver?: (event: NormalizedDragEvent) => void;
|
|
3852
3889
|
onDragLeave?: (event: NormalizedDragEvent) => void;
|
|
3853
3890
|
onDrop?: (event: NormalizedDragEvent) => void;
|
|
3854
|
-
}): void;
|
|
3891
|
+
}, options?: DroppableOptions): void;
|
|
3855
3892
|
|
|
3856
3893
|
/** @hidden */
|
|
3857
3894
|
export declare function useId(id?: string): any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-common",
|
|
3
|
-
"version": "9.5.0-develop.
|
|
3
|
+
"version": "9.5.0-develop.2",
|
|
4
4
|
"description": "React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|