@elliemae/ds-drag-and-drop 2.3.0-alpha.4 → 2.3.0-alpha.6
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/{cjs → dist/cjs}/hierarchy/customCollisionDetection.js +0 -0
- package/{cjs → dist/cjs}/hierarchy/customCollisionDetection.js.map +0 -0
- package/{cjs → dist/cjs}/hierarchy/getHierarchyKeyboardCoordinates.js +0 -0
- package/{cjs → dist/cjs}/hierarchy/getHierarchyKeyboardCoordinates.js.map +0 -0
- package/{cjs → dist/cjs}/hierarchy/index.js +0 -0
- package/{cjs → dist/cjs}/hierarchy/index.js.map +0 -0
- package/{cjs → dist/cjs}/hierarchy/types.js +0 -0
- package/{cjs → dist/cjs}/hierarchy/types.js.map +0 -0
- package/{cjs → dist/cjs}/hierarchy/useHierarchyActionHandlers.js +0 -0
- package/{cjs → dist/cjs}/hierarchy/useHierarchyActionHandlers.js.map +0 -0
- package/{cjs → dist/cjs}/hierarchy/useHierarchyAnnouncements.js +0 -0
- package/{cjs → dist/cjs}/hierarchy/useHierarchyAnnouncements.js.map +0 -0
- package/{cjs → dist/cjs}/hierarchy/useHierarchyDndkitConfig.js +0 -0
- package/{cjs → dist/cjs}/hierarchy/useHierarchyDndkitConfig.js.map +0 -0
- package/{cjs → dist/cjs}/hierarchy/useHierarchyPreviewHandlers.js +0 -0
- package/{cjs → dist/cjs}/hierarchy/useHierarchyPreviewHandlers.js.map +0 -0
- package/{cjs → dist/cjs}/index.js +0 -0
- package/{cjs → dist/cjs}/index.js.map +0 -0
- package/{cjs → dist/cjs}/tree/constants.js +0 -0
- package/{cjs → dist/cjs}/tree/constants.js.map +0 -0
- package/{cjs → dist/cjs}/tree/customCollisionDetection.js +0 -0
- package/{cjs → dist/cjs}/tree/customCollisionDetection.js.map +0 -0
- package/{cjs → dist/cjs}/tree/getTreeKeyboardCoordinates.js +0 -0
- package/{cjs → dist/cjs}/tree/getTreeKeyboardCoordinates.js.map +0 -0
- package/{cjs → dist/cjs}/tree/index.js +0 -0
- package/{cjs → dist/cjs}/tree/index.js.map +0 -0
- package/{cjs → dist/cjs}/tree/types.js +0 -0
- package/{cjs → dist/cjs}/tree/types.js.map +0 -0
- package/{cjs → dist/cjs}/tree/useTreeActionHandlers.js +0 -0
- package/{cjs → dist/cjs}/tree/useTreeActionHandlers.js.map +0 -0
- package/{cjs → dist/cjs}/tree/useTreeAnnouncements.js +0 -0
- package/{cjs → dist/cjs}/tree/useTreeAnnouncements.js.map +0 -0
- package/{cjs → dist/cjs}/tree/useTreeDndkitConfig.js +0 -0
- package/{cjs → dist/cjs}/tree/useTreeDndkitConfig.js.map +0 -0
- package/{cjs → dist/cjs}/tree/useTreePreviewHandlers.js +0 -0
- package/{cjs → dist/cjs}/tree/useTreePreviewHandlers.js.map +0 -0
- package/{cjs → dist/cjs}/tree/utilities.js +0 -0
- package/{cjs → dist/cjs}/tree/utilities.js.map +0 -0
- package/{esm → dist/esm}/hierarchy/customCollisionDetection.js +0 -0
- package/{esm → dist/esm}/hierarchy/customCollisionDetection.js.map +0 -0
- package/{esm → dist/esm}/hierarchy/getHierarchyKeyboardCoordinates.js +0 -0
- package/{esm → dist/esm}/hierarchy/getHierarchyKeyboardCoordinates.js.map +0 -0
- package/{esm → dist/esm}/hierarchy/index.js +0 -0
- package/{esm → dist/esm}/hierarchy/index.js.map +0 -0
- package/{esm → dist/esm}/hierarchy/types.js +0 -0
- package/{esm → dist/esm}/hierarchy/types.js.map +0 -0
- package/{esm → dist/esm}/hierarchy/useHierarchyActionHandlers.js +0 -0
- package/{esm → dist/esm}/hierarchy/useHierarchyActionHandlers.js.map +0 -0
- package/{esm → dist/esm}/hierarchy/useHierarchyAnnouncements.js +0 -0
- package/{esm → dist/esm}/hierarchy/useHierarchyAnnouncements.js.map +0 -0
- package/{esm → dist/esm}/hierarchy/useHierarchyDndkitConfig.js +0 -0
- package/{esm → dist/esm}/hierarchy/useHierarchyDndkitConfig.js.map +0 -0
- package/{esm → dist/esm}/hierarchy/useHierarchyPreviewHandlers.js +0 -0
- package/{esm → dist/esm}/hierarchy/useHierarchyPreviewHandlers.js.map +0 -0
- package/{esm → dist/esm}/index.js +0 -0
- package/{esm → dist/esm}/index.js.map +0 -0
- package/{esm → dist/esm}/tree/constants.js +0 -0
- package/{esm → dist/esm}/tree/constants.js.map +0 -0
- package/{esm → dist/esm}/tree/customCollisionDetection.js +0 -0
- package/{esm → dist/esm}/tree/customCollisionDetection.js.map +0 -0
- package/{esm → dist/esm}/tree/getTreeKeyboardCoordinates.js +0 -0
- package/{esm → dist/esm}/tree/getTreeKeyboardCoordinates.js.map +0 -0
- package/{esm → dist/esm}/tree/index.js +0 -0
- package/{esm → dist/esm}/tree/index.js.map +0 -0
- package/{esm → dist/esm}/tree/types.js +0 -0
- package/{esm → dist/esm}/tree/types.js.map +0 -0
- package/{esm → dist/esm}/tree/useTreeActionHandlers.js +0 -0
- package/{esm → dist/esm}/tree/useTreeActionHandlers.js.map +0 -0
- package/{esm → dist/esm}/tree/useTreeAnnouncements.js +0 -0
- package/{esm → dist/esm}/tree/useTreeAnnouncements.js.map +0 -0
- package/{esm → dist/esm}/tree/useTreeDndkitConfig.js +0 -0
- package/{esm → dist/esm}/tree/useTreeDndkitConfig.js.map +0 -0
- package/{esm → dist/esm}/tree/useTreePreviewHandlers.js +0 -0
- package/{esm → dist/esm}/tree/useTreePreviewHandlers.js.map +0 -0
- package/{esm → dist/esm}/tree/utilities.js +0 -0
- package/{esm → dist/esm}/tree/utilities.js.map +0 -0
- package/package.json +55 -53
- package/types/hierarchy/customCollisionDetection.d.ts +0 -3
- package/types/hierarchy/getHierarchyKeyboardCoordinates.d.ts +0 -3
- package/types/hierarchy/index.d.ts +0 -1
- package/types/hierarchy/types.d.ts +0 -80
- package/types/hierarchy/useHierarchyActionHandlers.d.ts +0 -1
- package/types/hierarchy/useHierarchyAnnouncements.d.ts +0 -3
- package/types/hierarchy/useHierarchyDndkitConfig.d.ts +0 -2
- package/types/hierarchy/useHierarchyPreviewHandlers.d.ts +0 -2
- package/types/index.d.ts +0 -2
- package/types/tree/constants.d.ts +0 -6
- package/types/tree/customCollisionDetection.d.ts +0 -4
- package/types/tree/getTreeKeyboardCoordinates.d.ts +0 -3
- package/types/tree/index.d.ts +0 -1
- package/types/tree/types.d.ts +0 -102
- package/types/tree/useTreeActionHandlers.d.ts +0 -2
- package/types/tree/useTreeAnnouncements.d.ts +0 -4
- package/types/tree/useTreeDndkitConfig.d.ts +0 -2
- package/types/tree/useTreePreviewHandlers.d.ts +0 -2
- package/types/tree/utilities.d.ts +0 -7
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,87 +1,90 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-drag-and-drop",
|
|
3
|
-
"version": "2.3.0-alpha.
|
|
3
|
+
"version": "2.3.0-alpha.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Drag And Drop",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"module": "./dist/esm/index.js",
|
|
10
|
+
"main": "./dist/cjs/index.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
9
12
|
"exports": {
|
|
10
13
|
".": {
|
|
11
|
-
"import": "./esm/index.js",
|
|
12
|
-
"require": "./cjs/index.js"
|
|
14
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"require": "./dist/cjs/index.js"
|
|
13
16
|
},
|
|
14
17
|
"./tree/utilities": {
|
|
15
|
-
"import": "./esm/tree/utilities.js",
|
|
16
|
-
"require": "./cjs/tree/utilities.js"
|
|
18
|
+
"import": "./dist/esm/tree/utilities.js",
|
|
19
|
+
"require": "./dist/cjs/tree/utilities.js"
|
|
17
20
|
},
|
|
18
21
|
"./tree/useTreePreviewHandlers": {
|
|
19
|
-
"import": "./esm/tree/useTreePreviewHandlers.js",
|
|
20
|
-
"require": "./cjs/tree/useTreePreviewHandlers.js"
|
|
22
|
+
"import": "./dist/esm/tree/useTreePreviewHandlers.js",
|
|
23
|
+
"require": "./dist/cjs/tree/useTreePreviewHandlers.js"
|
|
21
24
|
},
|
|
22
25
|
"./tree/useTreeDndkitConfig": {
|
|
23
|
-
"import": "./esm/tree/useTreeDndkitConfig.js",
|
|
24
|
-
"require": "./cjs/tree/useTreeDndkitConfig.js"
|
|
26
|
+
"import": "./dist/esm/tree/useTreeDndkitConfig.js",
|
|
27
|
+
"require": "./dist/cjs/tree/useTreeDndkitConfig.js"
|
|
25
28
|
},
|
|
26
29
|
"./tree/useTreeAnnouncements": {
|
|
27
|
-
"import": "./esm/tree/useTreeAnnouncements.js",
|
|
28
|
-
"require": "./cjs/tree/useTreeAnnouncements.js"
|
|
30
|
+
"import": "./dist/esm/tree/useTreeAnnouncements.js",
|
|
31
|
+
"require": "./dist/cjs/tree/useTreeAnnouncements.js"
|
|
29
32
|
},
|
|
30
33
|
"./tree/useTreeActionHandlers": {
|
|
31
|
-
"import": "./esm/tree/useTreeActionHandlers.js",
|
|
32
|
-
"require": "./cjs/tree/useTreeActionHandlers.js"
|
|
34
|
+
"import": "./dist/esm/tree/useTreeActionHandlers.js",
|
|
35
|
+
"require": "./dist/cjs/tree/useTreeActionHandlers.js"
|
|
33
36
|
},
|
|
34
37
|
"./tree/types": {
|
|
35
|
-
"import": "./esm/tree/types.js",
|
|
36
|
-
"require": "./cjs/tree/types.js"
|
|
38
|
+
"import": "./dist/esm/tree/types.js",
|
|
39
|
+
"require": "./dist/cjs/tree/types.js"
|
|
37
40
|
},
|
|
38
41
|
"./tree": {
|
|
39
|
-
"import": "./esm/tree/index.js",
|
|
40
|
-
"require": "./cjs/tree/index.js"
|
|
42
|
+
"import": "./dist/esm/tree/index.js",
|
|
43
|
+
"require": "./dist/cjs/tree/index.js"
|
|
41
44
|
},
|
|
42
45
|
"./tree/getTreeKeyboardCoordinates": {
|
|
43
|
-
"import": "./esm/tree/getTreeKeyboardCoordinates.js",
|
|
44
|
-
"require": "./cjs/tree/getTreeKeyboardCoordinates.js"
|
|
46
|
+
"import": "./dist/esm/tree/getTreeKeyboardCoordinates.js",
|
|
47
|
+
"require": "./dist/cjs/tree/getTreeKeyboardCoordinates.js"
|
|
45
48
|
},
|
|
46
49
|
"./tree/customCollisionDetection": {
|
|
47
|
-
"import": "./esm/tree/customCollisionDetection.js",
|
|
48
|
-
"require": "./cjs/tree/customCollisionDetection.js"
|
|
50
|
+
"import": "./dist/esm/tree/customCollisionDetection.js",
|
|
51
|
+
"require": "./dist/cjs/tree/customCollisionDetection.js"
|
|
49
52
|
},
|
|
50
53
|
"./tree/constants": {
|
|
51
|
-
"import": "./esm/tree/constants.js",
|
|
52
|
-
"require": "./cjs/tree/constants.js"
|
|
54
|
+
"import": "./dist/esm/tree/constants.js",
|
|
55
|
+
"require": "./dist/cjs/tree/constants.js"
|
|
53
56
|
},
|
|
54
57
|
"./hierarchy/useHierarchyPreviewHandlers": {
|
|
55
|
-
"import": "./esm/hierarchy/useHierarchyPreviewHandlers.js",
|
|
56
|
-
"require": "./cjs/hierarchy/useHierarchyPreviewHandlers.js"
|
|
58
|
+
"import": "./dist/esm/hierarchy/useHierarchyPreviewHandlers.js",
|
|
59
|
+
"require": "./dist/cjs/hierarchy/useHierarchyPreviewHandlers.js"
|
|
57
60
|
},
|
|
58
61
|
"./hierarchy/useHierarchyDndkitConfig": {
|
|
59
|
-
"import": "./esm/hierarchy/useHierarchyDndkitConfig.js",
|
|
60
|
-
"require": "./cjs/hierarchy/useHierarchyDndkitConfig.js"
|
|
62
|
+
"import": "./dist/esm/hierarchy/useHierarchyDndkitConfig.js",
|
|
63
|
+
"require": "./dist/cjs/hierarchy/useHierarchyDndkitConfig.js"
|
|
61
64
|
},
|
|
62
65
|
"./hierarchy/useHierarchyAnnouncements": {
|
|
63
|
-
"import": "./esm/hierarchy/useHierarchyAnnouncements.js",
|
|
64
|
-
"require": "./cjs/hierarchy/useHierarchyAnnouncements.js"
|
|
66
|
+
"import": "./dist/esm/hierarchy/useHierarchyAnnouncements.js",
|
|
67
|
+
"require": "./dist/cjs/hierarchy/useHierarchyAnnouncements.js"
|
|
65
68
|
},
|
|
66
69
|
"./hierarchy/useHierarchyActionHandlers": {
|
|
67
|
-
"import": "./esm/hierarchy/useHierarchyActionHandlers.js",
|
|
68
|
-
"require": "./cjs/hierarchy/useHierarchyActionHandlers.js"
|
|
70
|
+
"import": "./dist/esm/hierarchy/useHierarchyActionHandlers.js",
|
|
71
|
+
"require": "./dist/cjs/hierarchy/useHierarchyActionHandlers.js"
|
|
69
72
|
},
|
|
70
73
|
"./hierarchy/types": {
|
|
71
|
-
"import": "./esm/hierarchy/types.js",
|
|
72
|
-
"require": "./cjs/hierarchy/types.js"
|
|
74
|
+
"import": "./dist/esm/hierarchy/types.js",
|
|
75
|
+
"require": "./dist/cjs/hierarchy/types.js"
|
|
73
76
|
},
|
|
74
77
|
"./hierarchy": {
|
|
75
|
-
"import": "./esm/hierarchy/index.js",
|
|
76
|
-
"require": "./cjs/hierarchy/index.js"
|
|
78
|
+
"import": "./dist/esm/hierarchy/index.js",
|
|
79
|
+
"require": "./dist/cjs/hierarchy/index.js"
|
|
77
80
|
},
|
|
78
81
|
"./hierarchy/getHierarchyKeyboardCoordinates": {
|
|
79
|
-
"import": "./esm/hierarchy/getHierarchyKeyboardCoordinates.js",
|
|
80
|
-
"require": "./cjs/hierarchy/getHierarchyKeyboardCoordinates.js"
|
|
82
|
+
"import": "./dist/esm/hierarchy/getHierarchyKeyboardCoordinates.js",
|
|
83
|
+
"require": "./dist/cjs/hierarchy/getHierarchyKeyboardCoordinates.js"
|
|
81
84
|
},
|
|
82
85
|
"./hierarchy/customCollisionDetection": {
|
|
83
|
-
"import": "./esm/hierarchy/customCollisionDetection.js",
|
|
84
|
-
"require": "./cjs/hierarchy/customCollisionDetection.js"
|
|
86
|
+
"import": "./dist/esm/hierarchy/customCollisionDetection.js",
|
|
87
|
+
"require": "./dist/cjs/hierarchy/customCollisionDetection.js"
|
|
85
88
|
}
|
|
86
89
|
},
|
|
87
90
|
"sideEffects": [
|
|
@@ -93,18 +96,12 @@
|
|
|
93
96
|
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
94
97
|
},
|
|
95
98
|
"engines": {
|
|
96
|
-
"
|
|
97
|
-
"node": ">=
|
|
99
|
+
"pnpm": ">=6",
|
|
100
|
+
"node": ">=16"
|
|
98
101
|
},
|
|
99
102
|
"author": "ICE MT",
|
|
100
|
-
"scripts": {
|
|
101
|
-
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
102
|
-
"prebuild": "exit 0",
|
|
103
|
-
"predev": "exit 0",
|
|
104
|
-
"build": "node ../../scripts/build/build.js"
|
|
105
|
-
},
|
|
106
103
|
"dependencies": {
|
|
107
|
-
"@dnd-kit/core": "~4.0.
|
|
104
|
+
"@dnd-kit/core": "~4.0.3",
|
|
108
105
|
"@dnd-kit/sortable": "~5.0.0",
|
|
109
106
|
"react-desc": "~4.1.3"
|
|
110
107
|
},
|
|
@@ -119,7 +116,12 @@
|
|
|
119
116
|
},
|
|
120
117
|
"publishConfig": {
|
|
121
118
|
"access": "public",
|
|
122
|
-
"
|
|
123
|
-
|
|
119
|
+
"typeSafety": false
|
|
120
|
+
},
|
|
121
|
+
"scripts": {
|
|
122
|
+
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
123
|
+
"prebuild": "exit 0",
|
|
124
|
+
"predev": "exit 0",
|
|
125
|
+
"build": "node ../../scripts/build/build.js"
|
|
124
126
|
}
|
|
125
127
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './useHierarchyDndkitConfig';
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import type { Active, Announcements, CollisionDetection, DragEndEvent, DragMoveEvent, DragOverEvent, DragStartEvent, MeasuringConfiguration, Modifier, Over, SensorDescriptor, SensorOptions } from '@dnd-kit/core';
|
|
2
|
-
import { DroppableContainers } from '@dnd-kit/core/dist/store';
|
|
3
|
-
import { Coordinates, DragCancelEvent, ViewRect } from '@dnd-kit/core/dist/types';
|
|
4
|
-
import { MutableRefObject } from 'react';
|
|
5
|
-
export declare type Item = {
|
|
6
|
-
id: string;
|
|
7
|
-
depth: number;
|
|
8
|
-
parentId: string;
|
|
9
|
-
index: number;
|
|
10
|
-
};
|
|
11
|
-
export declare type DndContextPropsType = {
|
|
12
|
-
announcements: Announcements;
|
|
13
|
-
modifiers: Modifier[];
|
|
14
|
-
sensors: SensorDescriptor<SensorOptions>[];
|
|
15
|
-
measuring: Partial<MeasuringConfiguration>;
|
|
16
|
-
collisionDetection: CollisionDetection;
|
|
17
|
-
onDragStart: (e: DragStartEvent) => void;
|
|
18
|
-
onDragMove: (e: DragMoveEvent) => void;
|
|
19
|
-
onDragOver: (e: DragOverEvent) => void;
|
|
20
|
-
onDragEnd: (e: DragEndEvent) => void;
|
|
21
|
-
onDragCancel: (e: DragCancelEvent) => void;
|
|
22
|
-
};
|
|
23
|
-
export declare type useHierarchyPreviewHandlersReturn = {
|
|
24
|
-
handlePreviewDragStart: (e: DragStartEvent) => void;
|
|
25
|
-
handlePreviewDragMove: (e: DragMoveEvent) => void;
|
|
26
|
-
handlePreviewDragEnd: (e: DragEndEvent) => void;
|
|
27
|
-
handlePreviewDragCancel: (e: DragCancelEvent) => void;
|
|
28
|
-
};
|
|
29
|
-
export declare type useHierarchyPreviewHandlersArgs = {
|
|
30
|
-
setActiveId: React.Dispatch<React.SetStateAction<string>>;
|
|
31
|
-
onPreviewResetState: () => void;
|
|
32
|
-
onPreviewDragStart: () => void;
|
|
33
|
-
};
|
|
34
|
-
export declare type useHierarchyActionHandlersArgs = useHierarchyPreviewHandlersReturn & {
|
|
35
|
-
dndItems: Item[];
|
|
36
|
-
onReorder: (movedItem: Item, indexes: {
|
|
37
|
-
targetIndex: number;
|
|
38
|
-
fromIndex: number;
|
|
39
|
-
}) => void;
|
|
40
|
-
};
|
|
41
|
-
export declare type useHierarchyActionHandlersReturn = {
|
|
42
|
-
onDragStart: (e: DragStartEvent) => void;
|
|
43
|
-
onDragMove: (e: DragMoveEvent) => void;
|
|
44
|
-
onDragOver: (e: DragOverEvent) => void;
|
|
45
|
-
onDragEnd: (e: DragEndEvent) => void;
|
|
46
|
-
onDragCancel: (e: DragCancelEvent) => void;
|
|
47
|
-
};
|
|
48
|
-
export declare type useHierarchyDndkitConfigArgs = {
|
|
49
|
-
indentationWidth?: number;
|
|
50
|
-
dragOverlayDataTestid: string;
|
|
51
|
-
flattenedItems: [Item, unknown][];
|
|
52
|
-
isHorizontalDnD?: boolean;
|
|
53
|
-
onReorder: (movedItem: Item, indexes: {
|
|
54
|
-
targetIndex: number;
|
|
55
|
-
fromIndex: number;
|
|
56
|
-
}) => void;
|
|
57
|
-
onPreviewResetState: () => void;
|
|
58
|
-
onPreviewDragStart: () => void;
|
|
59
|
-
};
|
|
60
|
-
export declare type useHierarchyDndkitConfigType = (args: useHierarchyDndkitConfigArgs) => useHierarchyDndkitConfigReturn;
|
|
61
|
-
export declare type useHierarchyDndkitConfigReturn = {
|
|
62
|
-
dndContextProps: DndContextPropsType;
|
|
63
|
-
activeId: string | null;
|
|
64
|
-
overId: string | null;
|
|
65
|
-
activeIndex: number | undefined;
|
|
66
|
-
};
|
|
67
|
-
export declare type GetKeyboardCoordinatesArgs = {
|
|
68
|
-
items: Item[];
|
|
69
|
-
active: Active | null;
|
|
70
|
-
over: Over | null;
|
|
71
|
-
event: KeyboardEvent;
|
|
72
|
-
currentCoordinates: Coordinates;
|
|
73
|
-
droppableContainers: DroppableContainers;
|
|
74
|
-
collisionRect: ViewRect;
|
|
75
|
-
dragOverlayDataTestid: string;
|
|
76
|
-
};
|
|
77
|
-
export declare type SensorContext = MutableRefObject<{
|
|
78
|
-
items: Item[];
|
|
79
|
-
offset?: number;
|
|
80
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useHierarchyActionHandlers: ({ handlePreviewDragStart, handlePreviewDragMove, handlePreviewDragEnd, handlePreviewDragCancel, onReorder, dndItems, }: UseHierarchyActionHandlersArgs) => UseHierarchyActionHandlersReturn;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { useHierarchyPreviewHandlersReturn, useHierarchyPreviewHandlersArgs } from './types';
|
|
2
|
-
export declare const useHierarchyPreviewHandlers: ({ setActiveId, onPreviewResetState, onPreviewDragStart, }: useHierarchyPreviewHandlersArgs) => useHierarchyPreviewHandlersReturn;
|
package/types/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CollisionDetection } from '@dnd-kit/core';
|
|
2
|
-
import { DropIndicatorPosition } from './constants';
|
|
3
|
-
import { Item } from './types';
|
|
4
|
-
export declare const customCollisionDetection: (activeId: string, visibleItemsDictionary: Record<string, Item>, setDropIndicatorPosition: React.Dispatch<React.SetStateAction<DropIndicatorPosition>>, maxDragAndDropLevel: number, lastPosition: string, setLastPosition: React.Dispatch<React.SetStateAction<string>>) => CollisionDetection;
|
package/types/tree/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './useTreeDndkitConfig';
|
package/types/tree/types.d.ts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { Active, Announcements, CollisionDetection, DragCancelEvent, DragEndEvent, DragMoveEvent, DragOverEvent, DragStartEvent, DroppableContainers, MeasuringConfiguration, Modifier, Over, ViewRect } from '@dnd-kit/core';
|
|
2
|
-
import type { SensorDescriptor, SensorOptions } from '@dnd-kit/core/dist/sensors';
|
|
3
|
-
import type { SortingStrategy } from '@dnd-kit/sortable';
|
|
4
|
-
import { Coordinates } from '@dnd-kit/core/dist/types';
|
|
5
|
-
import React, { MutableRefObject } from 'react';
|
|
6
|
-
import { DropIndicatorPosition } from './constants';
|
|
7
|
-
export declare type Item<T = unknown> = {
|
|
8
|
-
uid: string;
|
|
9
|
-
depth: number;
|
|
10
|
-
parentId: string | null;
|
|
11
|
-
realIndex: number;
|
|
12
|
-
childrenCount: number;
|
|
13
|
-
original: T;
|
|
14
|
-
};
|
|
15
|
-
export declare type DndContextPropsType = {
|
|
16
|
-
announcements: Announcements;
|
|
17
|
-
modifiers: Modifier[];
|
|
18
|
-
sensors: SensorDescriptor<SensorOptions>[];
|
|
19
|
-
measuring: Partial<MeasuringConfiguration>;
|
|
20
|
-
collisionDetection: CollisionDetection;
|
|
21
|
-
onDragStart: (e: DragStartEvent) => void;
|
|
22
|
-
onDragMove: (e: DragMoveEvent) => void;
|
|
23
|
-
onDragOver: (e: DragOverEvent) => void;
|
|
24
|
-
onDragEnd: (e: DragEndEvent) => void;
|
|
25
|
-
onDragCancel: (e: DragCancelEvent) => void;
|
|
26
|
-
};
|
|
27
|
-
export declare type SortableContextPropsType = {
|
|
28
|
-
items: string[];
|
|
29
|
-
strategy: SortingStrategy;
|
|
30
|
-
};
|
|
31
|
-
export declare type UseTreePreviewHandlersReturn = {
|
|
32
|
-
handlePreviewDragStart: (e: DragStartEvent) => void;
|
|
33
|
-
handlePreviewDragMove: (e: DragMoveEvent) => void;
|
|
34
|
-
handlePreviewDragOver: (e: DragOverEvent) => void;
|
|
35
|
-
handlePreviewDragEnd: (e: DragEndEvent) => void;
|
|
36
|
-
handlePreviewDragCancel: (e: DragCancelEvent) => void;
|
|
37
|
-
};
|
|
38
|
-
export declare type UseTreePreviewHandlersArgs = {
|
|
39
|
-
setOverId: React.Dispatch<React.SetStateAction<string>>;
|
|
40
|
-
setActiveId: React.Dispatch<React.SetStateAction<string>>;
|
|
41
|
-
setDropIndicatorPosition: React.Dispatch<React.SetStateAction<DropIndicatorPosition>>;
|
|
42
|
-
};
|
|
43
|
-
export declare type UseTreeActionHandlersArgs<T = unknown> = UseTreePreviewHandlersReturn & {
|
|
44
|
-
dropIndicatorPosition: DropIndicatorPosition;
|
|
45
|
-
flattenedItems: Item[];
|
|
46
|
-
projected: {
|
|
47
|
-
depth: number;
|
|
48
|
-
parentId: string;
|
|
49
|
-
} | null;
|
|
50
|
-
onReorder: <S = T>(newData: Item<S>[], indexes: {
|
|
51
|
-
targetIndex: number;
|
|
52
|
-
fromIndex: number;
|
|
53
|
-
}, considerExpanding: string) => void;
|
|
54
|
-
isDropValid: boolean;
|
|
55
|
-
};
|
|
56
|
-
export declare type UseTreeActionHandlersReturn = {
|
|
57
|
-
onDragStart: (e: DragStartEvent) => void;
|
|
58
|
-
onDragMove: (e: DragMoveEvent) => void;
|
|
59
|
-
onDragOver: (e: DragOverEvent) => void;
|
|
60
|
-
onDragEnd: (e: DragEndEvent) => void;
|
|
61
|
-
onDragCancel: (e: DragCancelEvent) => void;
|
|
62
|
-
};
|
|
63
|
-
export declare type UseTreeDndkitConfigArgs<T> = {
|
|
64
|
-
flattenedItems: Item[];
|
|
65
|
-
visibleItems: Item[];
|
|
66
|
-
isHorizontalDnD?: boolean;
|
|
67
|
-
isExpandable: boolean;
|
|
68
|
-
onReorder: <S = T>(newData: Item<S>[], indexes: {
|
|
69
|
-
targetIndex: number;
|
|
70
|
-
fromIndex: number;
|
|
71
|
-
}, considerExpanding: string) => void;
|
|
72
|
-
getIsDropValid: <S = T>(active: Item<S>, over: Item<S>, dropIndicatorPosition: 'none' | 'before' | 'after' | 'inside') => boolean;
|
|
73
|
-
maxDragAndDropLevel: number;
|
|
74
|
-
};
|
|
75
|
-
export declare type UseTreeDndkitConfigReturn = {
|
|
76
|
-
dndContextProps: DndContextPropsType;
|
|
77
|
-
sortableContextProps: SortableContextPropsType;
|
|
78
|
-
activeId: string;
|
|
79
|
-
activeIndex: number;
|
|
80
|
-
overId: string;
|
|
81
|
-
depth: number;
|
|
82
|
-
dropIndicatorPosition: DropIndicatorPosition;
|
|
83
|
-
isDropValid: boolean;
|
|
84
|
-
visibleItems: Item[];
|
|
85
|
-
};
|
|
86
|
-
export declare type UseTreeDndkitConfigType = <T = unknown>(args: UseTreeDndkitConfigArgs<T>) => UseTreeDndkitConfigReturn;
|
|
87
|
-
export declare type GetKeyboardCoordinatesArgs = {
|
|
88
|
-
items: Item[];
|
|
89
|
-
active: Active;
|
|
90
|
-
over: Over;
|
|
91
|
-
event: KeyboardEvent;
|
|
92
|
-
currentCoordinates: Coordinates;
|
|
93
|
-
droppableContainers: DroppableContainers;
|
|
94
|
-
collisionRect: ViewRect;
|
|
95
|
-
dropIndicatorPosition: DropIndicatorPosition;
|
|
96
|
-
maxDragAndDropLevel: number;
|
|
97
|
-
};
|
|
98
|
-
export declare type SensorContext = MutableRefObject<{
|
|
99
|
-
items: Item[];
|
|
100
|
-
dropIndicatorPosition: DropIndicatorPosition;
|
|
101
|
-
setDropIndicatorPosition: React.Dispatch<React.SetStateAction<DropIndicatorPosition>>;
|
|
102
|
-
}>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { UseTreeActionHandlersReturn, UseTreeActionHandlersArgs } from './types';
|
|
2
|
-
export declare const useTreeActionHandlers: ({ handlePreviewDragStart, handlePreviewDragMove, handlePreviewDragOver, handlePreviewDragEnd, handlePreviewDragCancel, onReorder, flattenedItems, projected, dropIndicatorPosition, isDropValid, }: UseTreeActionHandlersArgs) => UseTreeActionHandlersReturn;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Announcements } from '@dnd-kit/core';
|
|
2
|
-
import { DropIndicatorPosition } from './constants';
|
|
3
|
-
import { Item } from './types';
|
|
4
|
-
export declare const useTreeAnnouncements: (visibleItemsDictionary: Record<string, Item>, dropIndicatorPosition: DropIndicatorPosition) => Announcements;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DropIndicatorPosition } from './constants';
|
|
2
|
-
import { Item } from './types';
|
|
3
|
-
export declare const getProjection: (items: Item[], visibleItemsDictionary: Record<string, Item>, overId: string, dropIndicatorPosition: DropIndicatorPosition, isExpandable: boolean) => {
|
|
4
|
-
depth: number;
|
|
5
|
-
parentId: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const removeChildrenOf: (items: Item[], id: string) => Item[];
|