react-virtual-sortable 1.1.3 → 1.1.4
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/index.cjs.js +3 -3
- package/dist/index.esm.js +3 -3
- package/package.json +1 -1
- package/types/index.d.ts +13 -9
package/dist/index.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-virtual-sortable v1.1.
|
|
2
|
+
* react-virtual-sortable v1.1.4
|
|
3
3
|
* open source under the MIT license
|
|
4
4
|
* https://github.com/mfuu/react-virtual-sortable#readme
|
|
5
5
|
*/
|
|
@@ -1983,11 +1983,11 @@ function VirtualList(props, ref) {
|
|
|
1983
1983
|
ref: rootElRef,
|
|
1984
1984
|
style: rootElStyle,
|
|
1985
1985
|
className: className
|
|
1986
|
-
},
|
|
1986
|
+
}, props.header, React__namespace.createElement.apply(React__namespace, [wrapElTag, {
|
|
1987
1987
|
ref: wrapElRef,
|
|
1988
1988
|
style: wrapElStyle,
|
|
1989
1989
|
className: wrapClass
|
|
1990
|
-
},
|
|
1990
|
+
}, tableMode && TableSpacer(range.front, 'front')].concat(_toConsumableArray(listChildren), [tableMode && TableSpacer(range.behind, 'behind')])), props.footer);
|
|
1991
1991
|
}
|
|
1992
1992
|
var index = /*#__PURE__*/React__namespace.forwardRef(VirtualList);
|
|
1993
1993
|
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-virtual-sortable v1.1.
|
|
2
|
+
* react-virtual-sortable v1.1.4
|
|
3
3
|
* open source under the MIT license
|
|
4
4
|
* https://github.com/mfuu/react-virtual-sortable#readme
|
|
5
5
|
*/
|
|
@@ -1961,11 +1961,11 @@ function VirtualList(props, ref) {
|
|
|
1961
1961
|
ref: rootElRef,
|
|
1962
1962
|
style: rootElStyle,
|
|
1963
1963
|
className: className
|
|
1964
|
-
},
|
|
1964
|
+
}, props.header, React.createElement.apply(React, [wrapElTag, {
|
|
1965
1965
|
ref: wrapElRef,
|
|
1966
1966
|
style: wrapElStyle,
|
|
1967
1967
|
className: wrapClass
|
|
1968
|
-
},
|
|
1968
|
+
}, tableMode && TableSpacer(range.front, 'front')].concat(_toConsumableArray(listChildren), [tableMode && TableSpacer(range.behind, 'behind')])), props.footer);
|
|
1969
1969
|
}
|
|
1970
1970
|
var index = /*#__PURE__*/React.forwardRef(VirtualList);
|
|
1971
1971
|
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -14,9 +14,20 @@ interface ScrollEvent {
|
|
|
14
14
|
offset: number;
|
|
15
15
|
direction: DIRECTION;
|
|
16
16
|
}
|
|
17
|
+
interface DragEvent$1<T> {
|
|
18
|
+
key: T;
|
|
19
|
+
index: number;
|
|
20
|
+
event: SortableEvent;
|
|
21
|
+
}
|
|
22
|
+
interface DropEvent$1<T> {
|
|
23
|
+
key: T;
|
|
24
|
+
event: SortableEvent;
|
|
25
|
+
changed: boolean;
|
|
26
|
+
oldIndex: number;
|
|
27
|
+
newIndex: number;
|
|
28
|
+
}
|
|
17
29
|
|
|
18
30
|
type KeyValueType = string | number;
|
|
19
|
-
type EventType = 'onTop' | 'onBottom' | 'onScroll' | 'onDrag' | 'onDrop' | 'onRangeChange';
|
|
20
31
|
type RenderFunc<T> = (item: T, index: number, key: KeyValueType) => React.ReactElement;
|
|
21
32
|
interface DragEvent<T> {
|
|
22
33
|
key: KeyValueType;
|
|
@@ -91,13 +102,6 @@ interface VirtualListHandle {
|
|
|
91
102
|
scrollToOffset: (offset: number) => void;
|
|
92
103
|
scrollToBottom: () => void;
|
|
93
104
|
}
|
|
94
|
-
interface ListItemProps {
|
|
95
|
-
dataKey: KeyValueType;
|
|
96
|
-
dragging: KeyValueType;
|
|
97
|
-
horizontal: boolean;
|
|
98
|
-
children: React.ReactElement;
|
|
99
|
-
onSizeChange: (key: KeyValueType, size: number) => void;
|
|
100
|
-
}
|
|
101
105
|
|
|
102
106
|
declare function VirtualList<T>(props: VirtualListProps<T>, ref: React.ForwardedRef<VirtualListHandle>): React.ReactElement<{
|
|
103
107
|
ref: React.MutableRefObject<HTMLElement | undefined>;
|
|
@@ -108,4 +112,4 @@ declare const _default: <T>(props: VirtualListProps<T> & {
|
|
|
108
112
|
ref?: React.ForwardedRef<VirtualListHandle> | undefined;
|
|
109
113
|
}) => ReturnType<typeof VirtualList>;
|
|
110
114
|
|
|
111
|
-
export { DragEvent, DropEvent
|
|
115
|
+
export { DragEvent$1 as DragEvent, DropEvent$1 as DropEvent, Range, ScrollEvent, VirtualListHandle, _default as default };
|