@progress/kendo-react-common 16.2.0-develop.15 → 16.2.0-develop.17
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/cdn/js/kendo-react-common.js +1 -1
- package/drag-n-drop/context/index.d.ts +2 -0
- package/drag-n-drop/context/index.js +1 -1
- package/drag-n-drop/context/index.mjs +4 -2
- package/drag-n-drop/index.js +1 -1
- package/drag-n-drop/index.mjs +43 -39
- package/hooks/useDraggable.js +1 -1
- package/hooks/useDraggable.mjs +171 -155
- package/package.json +1 -1
package/hooks/useDraggable.mjs
CHANGED
|
@@ -7,159 +7,165 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
|
-
import { dispatchDragAndDrop as
|
|
11
|
-
import { noop as
|
|
12
|
-
import { useInheritedState as
|
|
13
|
-
import { DragAndDropContext as
|
|
14
|
-
import { useIsomorphicLayoutEffect as
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
const { onPress:
|
|
10
|
+
import { dispatchDragAndDrop as Ke, getScrollableParent as Me, autoScroll as Qe } from "@progress/kendo-draggable-common";
|
|
11
|
+
import { noop as p } from "../noop.mjs";
|
|
12
|
+
import { useInheritedState as Ie } from "./useInheritedState.mjs";
|
|
13
|
+
import { DragAndDropContext as Ze } from "../drag-n-drop/context/index.mjs";
|
|
14
|
+
import { useIsomorphicLayoutEffect as et } from "./use-isomorphic-layout-effect.mjs";
|
|
15
|
+
const tt = 2e3, nt = 16;
|
|
16
|
+
function lt(s, He, Xe = {}) {
|
|
17
|
+
const { onPress: re = p, onRelease: oe = p, onDragStart: ce = p, onDrag: se = p, onDragEnd: ue = p } = He, {
|
|
18
18
|
hint: d = null,
|
|
19
|
-
mouseOnly:
|
|
20
|
-
autoTouchAction:
|
|
21
|
-
pressHoldDelay:
|
|
19
|
+
mouseOnly: H = !1,
|
|
20
|
+
autoTouchAction: X = !0,
|
|
21
|
+
pressHoldDelay: Y = 0,
|
|
22
22
|
autoScroll: c = !0,
|
|
23
|
-
scrollContainer:
|
|
24
|
-
context:
|
|
25
|
-
} =
|
|
26
|
-
drop:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
scrollContainer: m = null,
|
|
24
|
+
context: Ye = Ze
|
|
25
|
+
} = Xe, [f, Ae] = t.useState(!1), [D, Ue] = t.useState(!1), {
|
|
26
|
+
drop: _e,
|
|
27
|
+
dropRef: A,
|
|
28
|
+
setDrop: je,
|
|
29
|
+
drag: Be,
|
|
30
|
+
dragRef: U,
|
|
31
|
+
setDrag: Ne,
|
|
32
|
+
drops: L,
|
|
33
|
+
drags: w,
|
|
32
34
|
registerDrag: P,
|
|
33
|
-
deregisterDrag:
|
|
34
|
-
} = t.useContext(
|
|
35
|
+
deregisterDrag: O
|
|
36
|
+
} = t.useContext(Ye), [le] = Ie([_e, je]), [ae, T] = Ie([Be, Ne]), R = t.useRef({ x: 0, y: 0 }), _ = t.useRef(void 0), M = t.useRef(!1), ie = t.useRef(void 0), h = t.useRef(void 0), S = t.useRef(!1), C = t.useRef(null), i = t.useRef(void 0), g = t.useRef(!1), u = t.useRef(null), l = t.useRef(null), j = t.useRef(!1), B = t.useRef({ x: 0, y: 0 }), N = t.useRef({ x: 0, y: 0 }), x = t.useRef({ x: 0, y: 0 }), V = t.useRef({ x: 0, y: 0 }), F = t.useRef({ x: 0, y: 0 }), W = t.useRef({ x: 0, y: 0 }), Ve = !!(typeof window != "undefined" && window.PointerEvent), I = !H && Ve, b = !X && Y > 0, a = t.useCallback(
|
|
35
37
|
() => s.current && s.current.element ? s.current.element : s.current,
|
|
36
38
|
[s]
|
|
37
|
-
),
|
|
39
|
+
), Fe = t.useCallback(
|
|
38
40
|
() => d && d.current && d.current.element ? d.current.element : d ? d.current : null,
|
|
39
41
|
[d]
|
|
40
|
-
),
|
|
41
|
-
() =>
|
|
42
|
-
[
|
|
43
|
-
),
|
|
42
|
+
), fe = t.useCallback(
|
|
43
|
+
() => m && m.current && m.current.element ? m.current.element : m ? m.current : null,
|
|
44
|
+
[m]
|
|
45
|
+
), de = t.useCallback(() => {
|
|
44
46
|
if (typeof c == "object" && c.boundaryElementRef && c.boundaryElementRef.current) {
|
|
45
47
|
const e = c.boundaryElementRef.current;
|
|
46
48
|
return typeof e == "object" && "element" in e ? e.element : e;
|
|
47
49
|
}
|
|
48
|
-
return
|
|
50
|
+
return l.current;
|
|
49
51
|
}, [c]), v = t.useRef(null);
|
|
50
52
|
t.useImperativeHandle(v, () => ({
|
|
51
53
|
get element() {
|
|
52
54
|
return a();
|
|
53
55
|
},
|
|
54
56
|
get hint() {
|
|
55
|
-
return
|
|
57
|
+
return Fe();
|
|
56
58
|
},
|
|
57
|
-
onPress:
|
|
58
|
-
onDragStart:
|
|
59
|
-
onDrag:
|
|
60
|
-
onDragEnd:
|
|
61
|
-
onRelease:
|
|
59
|
+
onPress: We,
|
|
60
|
+
onDragStart: ze,
|
|
61
|
+
onDrag: Ge,
|
|
62
|
+
onDragEnd: $e,
|
|
63
|
+
onRelease: qe,
|
|
62
64
|
data: s.current
|
|
63
65
|
}));
|
|
64
|
-
const
|
|
66
|
+
const E = t.useCallback(() => {
|
|
65
67
|
const e = a();
|
|
66
68
|
return e && e.ownerDocument || document;
|
|
67
|
-
}, [a]),
|
|
68
|
-
const e =
|
|
69
|
+
}, [a]), y = t.useCallback(() => {
|
|
70
|
+
const e = E();
|
|
69
71
|
return e && e.defaultView || window;
|
|
70
|
-
}, [
|
|
72
|
+
}, [E]), me = t.useCallback(
|
|
71
73
|
() => ({
|
|
72
74
|
get drag() {
|
|
73
|
-
|
|
75
|
+
const e = U ? U.current : ae;
|
|
76
|
+
return e ? e.current : null;
|
|
74
77
|
},
|
|
75
78
|
get drop() {
|
|
76
|
-
|
|
79
|
+
const e = A ? A.current : le;
|
|
80
|
+
return e ? e.current : null;
|
|
77
81
|
},
|
|
78
82
|
get drags() {
|
|
79
|
-
return (
|
|
83
|
+
return (w != null ? w : []).map((e) => e.current);
|
|
80
84
|
},
|
|
81
85
|
get drops() {
|
|
82
|
-
return (
|
|
86
|
+
return (L != null ? L : []).map((e) => e.current);
|
|
83
87
|
},
|
|
84
|
-
pressed: !!
|
|
85
|
-
ignoreMouse:
|
|
86
|
-
scrollOffset:
|
|
87
|
-
offset:
|
|
88
|
-
pageOffset:
|
|
89
|
-
initialScrollOffset:
|
|
88
|
+
pressed: !!f,
|
|
89
|
+
ignoreMouse: M.current,
|
|
90
|
+
scrollOffset: F.current,
|
|
91
|
+
offset: B.current,
|
|
92
|
+
pageOffset: N.current,
|
|
93
|
+
initialScrollOffset: W.current,
|
|
90
94
|
clientOffset: x.current,
|
|
91
|
-
initialClientOffset:
|
|
92
|
-
velocity:
|
|
95
|
+
initialClientOffset: V.current,
|
|
96
|
+
velocity: R.current,
|
|
93
97
|
autoScroll: !!(typeof c == "object" ? c.enabled !== !1 : c),
|
|
94
|
-
scrollableParent:
|
|
98
|
+
scrollableParent: de(),
|
|
95
99
|
autoScrollDirection: typeof c == "object" ? c.direction : { horizontal: !0, vertical: !0 },
|
|
96
|
-
isScrolling:
|
|
100
|
+
isScrolling: D
|
|
97
101
|
}),
|
|
98
102
|
[
|
|
103
|
+
ae,
|
|
104
|
+
U,
|
|
105
|
+
le,
|
|
99
106
|
A,
|
|
100
|
-
Y,
|
|
101
|
-
D,
|
|
102
107
|
w,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
U,
|
|
107
|
-
B,
|
|
108
|
+
L,
|
|
109
|
+
f,
|
|
110
|
+
M,
|
|
108
111
|
F,
|
|
109
|
-
|
|
112
|
+
B,
|
|
110
113
|
N,
|
|
111
|
-
|
|
114
|
+
W,
|
|
115
|
+
x,
|
|
116
|
+
V,
|
|
117
|
+
R,
|
|
112
118
|
c,
|
|
113
|
-
|
|
114
|
-
|
|
119
|
+
D,
|
|
120
|
+
de
|
|
115
121
|
]
|
|
116
|
-
),
|
|
117
|
-
|
|
122
|
+
), he = t.useCallback((e) => {
|
|
123
|
+
Ae(e);
|
|
118
124
|
}, []), pe = t.useCallback((e) => {
|
|
119
|
-
|
|
125
|
+
Ue(e);
|
|
120
126
|
}, []), Ce = t.useCallback((e) => {
|
|
121
|
-
|
|
127
|
+
R.current = e;
|
|
122
128
|
}, []), ge = t.useCallback((e) => {
|
|
123
|
-
|
|
129
|
+
B.current = e;
|
|
124
130
|
}, []), be = t.useCallback((e) => {
|
|
125
131
|
x.current = e;
|
|
126
132
|
}, []), ve = t.useCallback((e) => {
|
|
127
|
-
B.current = e;
|
|
128
|
-
}, []), Ee = t.useCallback((e) => {
|
|
129
133
|
N.current = e;
|
|
130
|
-
}, []),
|
|
134
|
+
}, []), Ee = t.useCallback((e) => {
|
|
131
135
|
V.current = e;
|
|
132
|
-
}, []),
|
|
136
|
+
}, []), ye = t.useCallback((e) => {
|
|
133
137
|
F.current = e;
|
|
134
|
-
}, []),
|
|
138
|
+
}, []), ke = t.useCallback((e) => {
|
|
139
|
+
W.current = e;
|
|
140
|
+
}, []), We = t.useCallback(
|
|
135
141
|
(e) => {
|
|
136
|
-
|
|
142
|
+
re(e);
|
|
137
143
|
},
|
|
138
|
-
[
|
|
139
|
-
),
|
|
144
|
+
[re]
|
|
145
|
+
), qe = t.useCallback(
|
|
140
146
|
(e) => {
|
|
141
|
-
|
|
147
|
+
oe(e);
|
|
142
148
|
},
|
|
143
|
-
[
|
|
144
|
-
),
|
|
149
|
+
[oe]
|
|
150
|
+
), ze = t.useCallback(
|
|
145
151
|
(e) => {
|
|
146
|
-
|
|
152
|
+
T(v, { target: s.current, event: e }), ce(e);
|
|
147
153
|
},
|
|
148
|
-
[
|
|
149
|
-
),
|
|
154
|
+
[T, s, ce]
|
|
155
|
+
), Ge = t.useCallback(
|
|
150
156
|
(e) => {
|
|
151
|
-
|
|
157
|
+
se(e);
|
|
152
158
|
},
|
|
153
|
-
[
|
|
154
|
-
),
|
|
159
|
+
[se]
|
|
160
|
+
), $e = t.useCallback(
|
|
155
161
|
(e) => {
|
|
156
|
-
j.current || (
|
|
162
|
+
j.current || (T(null, { target: s.current, event: e }), ue(e));
|
|
157
163
|
},
|
|
158
|
-
[ue,
|
|
164
|
+
[ue, T, s]
|
|
159
165
|
), r = t.useCallback(
|
|
160
166
|
(e) => {
|
|
161
|
-
v.current &&
|
|
162
|
-
|
|
167
|
+
v.current && Ke(
|
|
168
|
+
me(),
|
|
163
169
|
{ event: e, payload: v.current },
|
|
164
170
|
{
|
|
165
171
|
onVelocityChange: Ce,
|
|
@@ -169,33 +175,33 @@ function ot(s, Re, Oe = {}) {
|
|
|
169
175
|
onInitialClientOffsetChange: Ee,
|
|
170
176
|
onScrollOffsetChange: ye,
|
|
171
177
|
onInitialScrollOffsetChange: ke,
|
|
172
|
-
onIsPressedChange:
|
|
178
|
+
onIsPressedChange: he,
|
|
173
179
|
onIsScrollingChange: pe
|
|
174
180
|
}
|
|
175
181
|
);
|
|
176
182
|
},
|
|
177
183
|
[
|
|
178
|
-
|
|
184
|
+
me,
|
|
179
185
|
Ce,
|
|
180
186
|
ge,
|
|
181
187
|
ve,
|
|
182
188
|
be,
|
|
183
189
|
Ee,
|
|
184
190
|
ke,
|
|
185
|
-
|
|
191
|
+
he,
|
|
186
192
|
ye,
|
|
187
193
|
pe
|
|
188
194
|
]
|
|
189
|
-
),
|
|
190
|
-
h.current && (window.clearTimeout(h.current), h.current = void 0), S.current = !1, C.current = null, i.current = void 0, g.current = !1,
|
|
191
|
-
}, []),
|
|
195
|
+
), k = t.useCallback(() => {
|
|
196
|
+
h.current && (window.clearTimeout(h.current), h.current = void 0), S.current = !1, C.current = null, i.current = void 0, g.current = !1, u.current = null;
|
|
197
|
+
}, []), Re = t.useCallback(
|
|
192
198
|
(e) => b && e.pointerType === "touch" && e.pointerId === i.current,
|
|
193
199
|
[b]
|
|
194
|
-
),
|
|
195
|
-
|
|
196
|
-
}, []),
|
|
200
|
+
), q = t.useCallback((e, n) => {
|
|
201
|
+
l.current && (l.current.scrollTop += e.y - n.y, l.current.scrollLeft += e.x - n.x);
|
|
202
|
+
}, []), Se = t.useCallback(
|
|
197
203
|
(e) => {
|
|
198
|
-
i.current = e.pointerId, C.current = { x: e.clientX, y: e.clientY },
|
|
204
|
+
i.current = e.pointerId, C.current = { x: e.clientX, y: e.clientY }, u.current = { x: e.clientX, y: e.clientY };
|
|
199
205
|
const n = a();
|
|
200
206
|
h.current = window.setTimeout(() => {
|
|
201
207
|
S.current = !0, g.current = !1;
|
|
@@ -203,62 +209,62 @@ function ot(s, Re, Oe = {}) {
|
|
|
203
209
|
n && i.current !== void 0 && n.setPointerCapture(i.current);
|
|
204
210
|
} catch {
|
|
205
211
|
}
|
|
206
|
-
},
|
|
212
|
+
}, Y);
|
|
207
213
|
},
|
|
208
|
-
[a,
|
|
209
|
-
),
|
|
214
|
+
[a, Y]
|
|
215
|
+
), z = t.useCallback(
|
|
210
216
|
(e) => {
|
|
211
217
|
if (!e.isPrimary) {
|
|
212
218
|
r(e);
|
|
213
219
|
return;
|
|
214
220
|
}
|
|
215
|
-
|
|
221
|
+
k(), b && e.pointerType === "touch" ? Se(e) : S.current = !0, r(e);
|
|
216
222
|
},
|
|
217
|
-
[r, b,
|
|
218
|
-
),
|
|
223
|
+
[r, b, k, Se]
|
|
224
|
+
), G = t.useCallback(
|
|
219
225
|
(e) => {
|
|
220
|
-
if (
|
|
226
|
+
if (Re(e)) {
|
|
221
227
|
if (!S.current && C.current) {
|
|
222
228
|
if (g.current) {
|
|
223
|
-
|
|
229
|
+
u.current && q(u.current, { x: e.clientX, y: e.clientY }), u.current = { x: e.clientX, y: e.clientY };
|
|
224
230
|
return;
|
|
225
231
|
}
|
|
226
232
|
const n = Math.abs(e.clientX - C.current.x), o = Math.abs(e.clientY - C.current.y);
|
|
227
|
-
if (Math.hypot(n, o) >
|
|
228
|
-
g.current = !0,
|
|
233
|
+
if (Math.hypot(n, o) > nt) {
|
|
234
|
+
g.current = !0, q(C.current, { x: e.clientX, y: e.clientY }), u.current = { x: e.clientX, y: e.clientY };
|
|
229
235
|
return;
|
|
230
236
|
}
|
|
231
237
|
return;
|
|
232
238
|
}
|
|
233
239
|
if (S.current) {
|
|
234
|
-
if (
|
|
240
|
+
if (u.current && Math.round(e.clientX) === Math.round(u.current.x) && Math.round(e.clientY) === Math.round(u.current.y))
|
|
235
241
|
return;
|
|
236
|
-
|
|
242
|
+
u.current = { x: e.clientX, y: e.clientY };
|
|
237
243
|
}
|
|
238
244
|
}
|
|
239
245
|
r(e);
|
|
240
246
|
},
|
|
241
|
-
[r,
|
|
242
|
-
),
|
|
247
|
+
[r, Re, q]
|
|
248
|
+
), $ = t.useCallback(
|
|
243
249
|
(e) => {
|
|
244
|
-
(i.current === void 0 || e.pointerId === i.current) &&
|
|
250
|
+
(i.current === void 0 || e.pointerId === i.current) && k(), r(e);
|
|
245
251
|
},
|
|
246
|
-
[r,
|
|
247
|
-
),
|
|
252
|
+
[r, k]
|
|
253
|
+
), xe = t.useCallback(
|
|
248
254
|
(e) => {
|
|
249
255
|
if (i.current !== void 0 && e.pointerId !== i.current) {
|
|
250
256
|
r(e);
|
|
251
257
|
return;
|
|
252
258
|
}
|
|
253
259
|
const n = g.current;
|
|
254
|
-
if (
|
|
260
|
+
if (k(), n) {
|
|
255
261
|
const o = new PointerEvent("pointercancel", e);
|
|
256
262
|
r(o);
|
|
257
263
|
return;
|
|
258
264
|
}
|
|
259
265
|
r(e);
|
|
260
266
|
},
|
|
261
|
-
[r,
|
|
267
|
+
[r, k]
|
|
262
268
|
), J = t.useCallback(
|
|
263
269
|
(e) => {
|
|
264
270
|
r(e);
|
|
@@ -269,94 +275,104 @@ function ot(s, Re, Oe = {}) {
|
|
|
269
275
|
r(e);
|
|
270
276
|
},
|
|
271
277
|
[r]
|
|
272
|
-
),
|
|
278
|
+
), De = t.useCallback(
|
|
273
279
|
(e) => {
|
|
274
280
|
r(e);
|
|
275
281
|
},
|
|
276
282
|
[r]
|
|
277
|
-
),
|
|
283
|
+
), Le = t.useRef(xe), we = t.useRef(De);
|
|
284
|
+
Le.current = xe, we.current = De;
|
|
285
|
+
const Q = t.useCallback(
|
|
278
286
|
(e) => {
|
|
279
287
|
e.preventDefault(), r(e);
|
|
280
288
|
},
|
|
281
289
|
[r]
|
|
282
|
-
),
|
|
290
|
+
), Z = t.useCallback(
|
|
283
291
|
(e) => {
|
|
284
292
|
e.preventDefault(), r(e);
|
|
285
293
|
},
|
|
286
294
|
[r]
|
|
287
|
-
),
|
|
295
|
+
), ee = t.useCallback(
|
|
288
296
|
(e) => {
|
|
289
297
|
e.preventDefault(), r(e);
|
|
290
298
|
},
|
|
291
299
|
[r]
|
|
292
|
-
),
|
|
300
|
+
), te = t.useCallback(
|
|
293
301
|
(e) => {
|
|
294
302
|
if (e.touches.length === 0 && e.changedTouches.length === 1) {
|
|
295
|
-
const n =
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
},
|
|
303
|
+
const n = y();
|
|
304
|
+
M.current = !0, ie.current = n.setTimeout(() => {
|
|
305
|
+
M.current = !1;
|
|
306
|
+
}, tt);
|
|
299
307
|
}
|
|
300
308
|
r(e);
|
|
301
309
|
},
|
|
302
|
-
[r,
|
|
303
|
-
),
|
|
310
|
+
[r, y]
|
|
311
|
+
), ne = t.useCallback(
|
|
304
312
|
(e) => {
|
|
305
313
|
g.current || r(e);
|
|
306
314
|
},
|
|
307
315
|
[r]
|
|
308
|
-
),
|
|
316
|
+
), Pe = t.useCallback(() => {
|
|
309
317
|
const e = a();
|
|
310
|
-
if (e && (
|
|
318
|
+
if (e && (X || b)) {
|
|
311
319
|
const n = e.style.touchAction;
|
|
312
320
|
return e.style.touchAction = "none", () => {
|
|
313
321
|
e.style.touchAction = n;
|
|
314
322
|
};
|
|
315
323
|
}
|
|
316
|
-
}, [a,
|
|
317
|
-
|
|
318
|
-
}), [
|
|
319
|
-
const e =
|
|
320
|
-
return
|
|
321
|
-
|
|
324
|
+
}, [a, X, b]), Oe = t.useCallback(() => (P == null || P(v), () => {
|
|
325
|
+
O == null || O(v);
|
|
326
|
+
}), [O, P]), Je = () => {
|
|
327
|
+
const e = y(), n = a(), o = E();
|
|
328
|
+
return I ? (n && (l.current = Me(n), l.current && l.current.addEventListener("scroll", ne, { passive: !0 }), n.addEventListener("pointerdown", z, { passive: !0 })), f && (o.addEventListener("pointermove", G), o.addEventListener("contextmenu", Q), o.addEventListener("pointercancel", $, { passive: !0 }))) : (e.addEventListener("touchmove", p, { capture: !1, passive: !1 }), n && (n.addEventListener("mousedown", J, { passive: !0 }), H || (n.addEventListener("touchstart", Z, { passive: !0 }), f && (n.addEventListener("touchmove", ee, { passive: !0 }), n.addEventListener("touchend", te, { passive: !0 })))), f && o.addEventListener("mousemove", K, { passive: !0 })), () => {
|
|
329
|
+
l.current && l.current.removeEventListener("scroll", ne), n && (n.removeEventListener("pointerdown", z), n.removeEventListener("mousedown", J), n.removeEventListener("touchstart", Z), n.removeEventListener("touchmove", ee), n.removeEventListener("touchend", te)), o.removeEventListener("pointermove", G), o.removeEventListener("contextmenu", Q), o.removeEventListener("pointercancel", $), o.removeEventListener("mousemove", K), e.removeEventListener("touchmove", p), e.clearTimeout(ie.current);
|
|
322
330
|
};
|
|
323
331
|
};
|
|
324
332
|
t.useEffect(() => {
|
|
325
|
-
const e =
|
|
326
|
-
if (
|
|
327
|
-
const n =
|
|
333
|
+
const e = y();
|
|
334
|
+
if (D) {
|
|
335
|
+
const n = fe() || l.current || Me(
|
|
328
336
|
document.elementFromPoint(x.current.x, x.current.y)
|
|
329
337
|
);
|
|
330
338
|
e.clearInterval(_.current), _.current = e.setInterval(() => {
|
|
331
|
-
|
|
339
|
+
Qe(n, { x: R.current.x, y: R.current.y });
|
|
332
340
|
}, 50);
|
|
333
341
|
}
|
|
334
342
|
return () => {
|
|
335
343
|
e.clearInterval(_.current);
|
|
336
344
|
};
|
|
337
|
-
}, [a,
|
|
338
|
-
|
|
339
|
-
|
|
345
|
+
}, [a, fe, y, D]), t.useEffect(Pe, [Pe]), t.useEffect(() => {
|
|
346
|
+
if (!f)
|
|
347
|
+
return;
|
|
348
|
+
const e = E();
|
|
349
|
+
if (I) {
|
|
350
|
+
const o = (Te) => Le.current(Te);
|
|
351
|
+
return e.addEventListener("pointerup", o, !0), () => e.removeEventListener("pointerup", o, !0);
|
|
352
|
+
}
|
|
353
|
+
const n = (o) => we.current(o);
|
|
354
|
+
return e.addEventListener("mouseup", n, { passive: !0 }), () => e.removeEventListener("mouseup", n);
|
|
355
|
+
}, [E, I, f]), t.useEffect(Je, [
|
|
356
|
+
f,
|
|
357
|
+
y,
|
|
340
358
|
a,
|
|
359
|
+
E,
|
|
360
|
+
H,
|
|
341
361
|
I,
|
|
342
|
-
|
|
343
|
-
ie,
|
|
344
|
-
Z,
|
|
362
|
+
Q,
|
|
345
363
|
J,
|
|
346
364
|
K,
|
|
347
|
-
Q,
|
|
348
|
-
G,
|
|
349
|
-
q,
|
|
350
|
-
z,
|
|
351
365
|
$,
|
|
352
|
-
|
|
366
|
+
z,
|
|
367
|
+
G,
|
|
353
368
|
te,
|
|
354
369
|
ee,
|
|
355
|
-
|
|
370
|
+
Z,
|
|
371
|
+
ne
|
|
356
372
|
]), t.useEffect(() => (j.current = !1, () => {
|
|
357
373
|
j.current = !0, h.current && (window.clearTimeout(h.current), h.current = void 0);
|
|
358
|
-
}), []),
|
|
374
|
+
}), []), et(Oe, [Oe]);
|
|
359
375
|
}
|
|
360
376
|
export {
|
|
361
|
-
|
|
377
|
+
lt as useDraggable
|
|
362
378
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-common",
|
|
3
|
-
"version": "16.2.0-develop.
|
|
3
|
+
"version": "16.2.0-develop.17",
|
|
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",
|