@os-design/drag-sort 1.0.31 → 1.0.33
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/dist/DragAndDrop.js +6 -6
- package/dist/Draggable.js +3 -3
- package/dist/Droppable.js +4 -4
- package/dist/index.js +6 -6
- package/dist/utils/getNodeRect.js +2 -3
- package/dist/utils/useDragEffect.js +8 -8
- package/dist/utils/useInitScrollOffset.js +1 -1
- package/dist/utils/useMoveNode.js +1 -1
- package/dist/utils/useTargetList.js +1 -1
- package/package.json +11 -11
package/dist/DragAndDrop.js
CHANGED
|
@@ -4,12 +4,12 @@ import useDrag from '@os-design/use-drag';
|
|
|
4
4
|
import useMemoObject from '@os-design/use-memo-object';
|
|
5
5
|
import usePreventDefaultEvent from '@os-design/use-prevent-default-event';
|
|
6
6
|
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
7
|
-
import ListStore from
|
|
8
|
-
import { DragAndDropContext } from
|
|
9
|
-
import useDragEffect from
|
|
10
|
-
import useGeneratedId from
|
|
11
|
-
import useInitRect from
|
|
12
|
-
import useTransitionStyle from
|
|
7
|
+
import ListStore from "./utils/ListStore.js";
|
|
8
|
+
import { DragAndDropContext } from "./utils/useDragAndDrop.js";
|
|
9
|
+
import useDragEffect from "./utils/useDragEffect.js";
|
|
10
|
+
import useGeneratedId from "./utils/useGeneratedId.js";
|
|
11
|
+
import useInitRect from "./utils/useInitRect.js";
|
|
12
|
+
import useTransitionStyle from "./utils/useTransitionStyle.js";
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
/**
|
|
15
15
|
* The container containing one or more lists with draggable nodes.
|
package/dist/Draggable.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import useMemoObject from '@os-design/use-memo-object';
|
|
2
2
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import useAppendClassName from
|
|
4
|
-
import useDragAndDrop from
|
|
5
|
-
import useDroppable from
|
|
3
|
+
import useAppendClassName from "./utils/useAppendClassName.js";
|
|
4
|
+
import useDragAndDrop from "./utils/useDragAndDrop.js";
|
|
5
|
+
import useDroppable from "./utils/useDroppable.js";
|
|
6
6
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
const Draggable = ({
|
|
8
8
|
index,
|
package/dist/Droppable.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import useMemoObject from '@os-design/use-memo-object';
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
3
|
-
import NodeList from
|
|
4
|
-
import useDragAndDrop from
|
|
5
|
-
import { DroppableContext } from
|
|
6
|
-
import useGeneratedId from
|
|
3
|
+
import NodeList from "./utils/NodeList.js";
|
|
4
|
+
import useDragAndDrop from "./utils/useDragAndDrop.js";
|
|
5
|
+
import { DroppableContext } from "./utils/useDroppable.js";
|
|
6
|
+
import useGeneratedId from "./utils/useGeneratedId.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const Droppable = ({
|
|
9
9
|
renderDraggedNode,
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as DragAndDrop } from
|
|
2
|
-
export { default as Droppable } from
|
|
3
|
-
export { default as Draggable } from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export { default as DragAndDrop } from "./DragAndDrop.js";
|
|
2
|
+
export { default as Droppable } from "./Droppable.js";
|
|
3
|
+
export { default as Draggable } from "./Draggable.js";
|
|
4
|
+
export * from "./DragAndDrop.js";
|
|
5
|
+
export * from "./Droppable.js";
|
|
6
|
+
export * from "./Draggable.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import getElementOffset from
|
|
2
|
-
import getElementScroll from
|
|
3
|
-
|
|
1
|
+
import getElementOffset from "./getElementOffset.js";
|
|
2
|
+
import getElementScroll from "./getElementScroll.js";
|
|
4
3
|
/**
|
|
5
4
|
* Computes the bounds of the existing node without considering transforms.
|
|
6
5
|
*/
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import useEvent from '@os-design/use-event';
|
|
2
2
|
import useThrottle from '@os-design/use-throttle';
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
4
|
-
import getElementScroll from
|
|
5
|
-
import getNodeRect from
|
|
6
|
-
import useBlankNode from
|
|
7
|
-
import useGetNodeStyle from
|
|
8
|
-
import useInitRect from
|
|
9
|
-
import useInitScrollOffset from
|
|
10
|
-
import useMoveNode from
|
|
11
|
-
import useTargetList from
|
|
4
|
+
import getElementScroll from "./getElementScroll.js";
|
|
5
|
+
import getNodeRect from "./getNodeRect.js";
|
|
6
|
+
import useBlankNode from "./useBlankNode.js";
|
|
7
|
+
import useGetNodeStyle from "./useGetNodeStyle.js";
|
|
8
|
+
import useInitRect from "./useInitRect.js";
|
|
9
|
+
import useInitScrollOffset from "./useInitScrollOffset.js";
|
|
10
|
+
import useMoveNode from "./useMoveNode.js";
|
|
11
|
+
import useTargetList from "./useTargetList.js";
|
|
12
12
|
const HIDDEN_NODE_STYLE = {
|
|
13
13
|
opacity: 0,
|
|
14
14
|
pointerEvents: 'none'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import getElementScroll from
|
|
2
|
+
import getElementScroll from "./getElementScroll.js";
|
|
3
3
|
const useInitScrollOffset = ref => useMemo(() => {
|
|
4
4
|
if (!ref || !ref.current) return null;
|
|
5
5
|
const scrollOffset = getElementScroll(ref.current);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import useThrottle from '@os-design/use-throttle';
|
|
2
2
|
import { useCallback, useMemo, useState } from 'react';
|
|
3
|
-
import useScrollEventByPoint from
|
|
3
|
+
import useScrollEventByPoint from "./useScrollEventByPoint.js";
|
|
4
4
|
const useTargetList = (position, listStoreRef) => {
|
|
5
5
|
const [number, setNumber] = useState(0);
|
|
6
6
|
const targetList = useMemo(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@os-design/drag-sort",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.33",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"repository": "git@gitlab.com:os-team/libs/os-design.git",
|
|
6
6
|
"type": "module",
|
|
@@ -29,22 +29,22 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@os-design/portal": "^1.0.
|
|
33
|
-
"@os-design/use-auto-scroll": "^1.0.
|
|
34
|
-
"@os-design/use-drag": "^1.0.
|
|
35
|
-
"@os-design/use-event": "^1.0.
|
|
36
|
-
"@os-design/use-memo-object": "^1.0.
|
|
37
|
-
"@os-design/use-prevent-default-event": "^1.0.
|
|
38
|
-
"@os-design/use-throttle": "^1.0.
|
|
32
|
+
"@os-design/portal": "^1.0.20",
|
|
33
|
+
"@os-design/use-auto-scroll": "^1.0.24",
|
|
34
|
+
"@os-design/use-drag": "^1.0.22",
|
|
35
|
+
"@os-design/use-event": "^1.0.25",
|
|
36
|
+
"@os-design/use-memo-object": "^1.0.20",
|
|
37
|
+
"@os-design/use-prevent-default-event": "^1.0.22",
|
|
38
|
+
"@os-design/use-throttle": "^1.0.24"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@os-design/omit-emotion-props": "^1.0.
|
|
42
|
-
"@os-design/use-size": "^1.0.
|
|
41
|
+
"@os-design/omit-emotion-props": "^1.0.22",
|
|
42
|
+
"@os-design/use-size": "^1.0.26",
|
|
43
43
|
"react-window": "^1.8.10"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=18",
|
|
47
47
|
"react-dom": ">=18"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "53c233a23d50ce2f7d9bc3ae9c96d9142e14b7ac"
|
|
50
50
|
}
|