fluid-dnd 2.5.1 → 2.6.1
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/{HandlerPublisher-CRu7xI9p.js → HandlerPublisher-CGKPF_jz.js} +1 -1
- package/dist/{HandlerPublisher-CrUNmzg-.cjs → HandlerPublisher-DBjTX_j6.cjs} +1 -1
- package/dist/core/dragAndDrop.js +4 -3
- package/dist/core/events/dragAndDrop/dragAndDrop.js +8 -1
- package/dist/core/events/insert.js +1 -1
- package/dist/core/index.d.ts +16 -0
- package/dist/core/positioning/usePositioning.js +3 -3
- package/dist/core/utils/GetStyles.d.ts +1 -1
- package/dist/core/utils/GetStyles.js +5 -5
- package/dist/{index-CJpjY7r7.js → index-B_TA81tq.js} +271 -263
- package/dist/index-rI7KLmXk.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{insert--mO_a1mv.js → insert-BXGi8i8T.js} +9 -9
- package/dist/insert-Be2OwrVW.cjs +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.mjs +3 -3
- package/dist/{remove-C4YcWK2S.js → remove-Dg1WsaSC.js} +1 -1
- package/dist/{remove-dSzXNYxs.cjs → remove-FDZxr31Z.cjs} +1 -1
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.mjs +3 -3
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.mjs +3 -3
- package/package.json +1 -1
- package/dist/index-BOqB07mI.cjs +0 -1
- package/dist/insert-CEcy9QNd.cjs +0 -1
@@ -1,13 +1,13 @@
|
|
1
1
|
var Ne = Object.defineProperty;
|
2
2
|
var $e = (t, e, n) => e in t ? Ne(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
3
3
|
var X = (t, e, n) => $e(t, typeof e != "symbol" ? e + "" : e, n);
|
4
|
-
const Y = "horizontal", q = "vertical", H = "draggable", Vt = "droppable",
|
4
|
+
const Y = "horizontal", q = "vertical", H = "draggable", Vt = "droppable", Mt = "handler-class", Lt = "dragging", Yt = "dragging-handler-class", Xt = "dropping", ce = "grabbing", Ge = "grab", Kn = "disable-transition", K = (t, e) => t.classList.contains(e), dt = (t, e, n = !1) => {
|
5
5
|
t.classList.toggle(e, n);
|
6
6
|
}, rt = (t, e) => {
|
7
7
|
t.classList.add(e);
|
8
8
|
}, Ut = (t, e) => {
|
9
9
|
t.classList.remove(e);
|
10
|
-
}, Ve = (t, e) => Et(e).every((n) =>
|
10
|
+
}, Ve = (t, e) => Et(e).every((n) => K(t, n)), at = (t) => `.${Et(t).join(".")}`, Ye = (t, e) => {
|
11
11
|
const n = Et(e);
|
12
12
|
t.classList.add(...n);
|
13
13
|
}, Et = (t) => ((t == null ? void 0 : t.split(" ")) ?? []).filter((e) => e), Xe = () => {
|
@@ -19,7 +19,7 @@ const Y = "horizontal", q = "vertical", H = "draggable", Vt = "droppable", xt =
|
|
19
19
|
x: n.m41,
|
20
20
|
y: n.m42
|
21
21
|
};
|
22
|
-
}, ie = (t, e) => t.x1 > e.x1 ? ie(e, t) : t.x2 < e.x1 ? 0 : t.x2 >= e.x2 ? t.x2 - t.x1 : t.x2 - e.x1,
|
22
|
+
}, ie = (t, e) => t.x1 > e.x1 ? ie(e, t) : t.x2 < e.x1 ? 0 : t.x2 >= e.x2 ? t.x2 - t.x1 : t.x2 - e.x1, St = (t, e) => !He(t, e), He = (t, e) => {
|
23
23
|
const { intersectionX: n, intersectionY: s, rect1: o, rect2: r } = ae(t, e);
|
24
24
|
return s >= Math.min(o.height, r.height) / 2 && n >= Math.min(o.width, r.width) / 2;
|
25
25
|
}, qe = (t, e) => !ze(t, e), ze = (t, e) => {
|
@@ -34,7 +34,7 @@ const Y = "horizontal", q = "vertical", H = "draggable", Vt = "droppable", xt =
|
|
34
34
|
intersectionY: o
|
35
35
|
};
|
36
36
|
}, Jt = (t, e, n) => {
|
37
|
-
const { before: s, distance: o } =
|
37
|
+
const { before: s, distance: o } = F(n);
|
38
38
|
return ie(
|
39
39
|
{
|
40
40
|
x1: t[s],
|
@@ -45,46 +45,46 @@ const Y = "horizontal", q = "vertical", H = "draggable", Vt = "droppable", xt =
|
|
45
45
|
x2: e[s] + e[o]
|
46
46
|
}
|
47
47
|
);
|
48
|
-
},
|
48
|
+
}, Tt = (t, e) => t ? qt(getComputedStyle(t)[e]) : 0, Kt = (t) => {
|
49
49
|
const { scrollLeft: e, scrollTop: n } = t;
|
50
50
|
return { scrollLeft: e, scrollTop: n };
|
51
51
|
}, w = (t) => t.getBoundingClientRect(), z = (t, e) => {
|
52
|
-
const { distance: n } =
|
52
|
+
const { distance: n } = F(t);
|
53
53
|
return [e[n], n];
|
54
|
-
},
|
55
|
-
const { axis: n } =
|
54
|
+
}, Pt = (t, e) => {
|
55
|
+
const { axis: n } = F(t);
|
56
56
|
return e[n];
|
57
57
|
}, lt = (t, e) => {
|
58
|
-
const { borderBeforeWidth: n } =
|
59
|
-
return
|
60
|
-
},
|
61
|
-
const { beforeMargin: n } =
|
62
|
-
return
|
58
|
+
const { borderBeforeWidth: n } = F(t);
|
59
|
+
return Tt(e, n);
|
60
|
+
}, Ot = (t, e) => {
|
61
|
+
const { beforeMargin: n } = F(t);
|
62
|
+
return Tt(e, n);
|
63
63
|
}, le = (t, e) => {
|
64
|
-
const { beforeMargin: n } =
|
65
|
-
return
|
66
|
-
},
|
67
|
-
const { afterMargin: n } =
|
68
|
-
return
|
64
|
+
const { beforeMargin: n } = F(t);
|
65
|
+
return Tt(e, n);
|
66
|
+
}, Dt = (t, e) => {
|
67
|
+
const { afterMargin: n } = F(t);
|
68
|
+
return Tt(e, n);
|
69
69
|
}, j = (t, e) => {
|
70
|
-
const { before: n } =
|
70
|
+
const { before: n } = F(t);
|
71
71
|
return e[n];
|
72
|
-
},
|
73
|
-
const { scrollElement: n } =
|
72
|
+
}, vt = (t, e) => {
|
73
|
+
const { scrollElement: n } = F(t);
|
74
74
|
return [e[n], n];
|
75
75
|
}, ct = (t, e) => {
|
76
|
-
const { scroll: n } =
|
76
|
+
const { scroll: n } = F(t);
|
77
77
|
return e[n];
|
78
78
|
}, je = (t, e) => {
|
79
|
-
const { inner: n } =
|
79
|
+
const { inner: n } = F(t);
|
80
80
|
return e[n];
|
81
81
|
}, zt = (t, e) => {
|
82
|
-
const { page: n } =
|
82
|
+
const { page: n } = F(t);
|
83
83
|
return e[n];
|
84
84
|
}, ue = (t, e) => {
|
85
|
-
const { offset: n } =
|
85
|
+
const { offset: n } = F(t);
|
86
86
|
return e[n];
|
87
|
-
},
|
87
|
+
}, F = (t) => {
|
88
88
|
const e = t == Y;
|
89
89
|
return {
|
90
90
|
beforeMargin: e ? "marginLeft" : "marginTop",
|
@@ -104,15 +104,15 @@ const Y = "horizontal", q = "vertical", H = "draggable", Vt = "droppable", xt =
|
|
104
104
|
paddingBefore: e ? "paddingLeft" : "paddingTop",
|
105
105
|
getRect: w
|
106
106
|
};
|
107
|
-
}, Nt = (t, e) => ke(t, e), Qn = (t) => [...t.children].filter((n) =>
|
108
|
-
const n = [...e.children].filter((o) =>
|
107
|
+
}, Nt = (t, e) => ke(t, e), Qn = (t) => [...t.children].filter((n) => K(n, H)), ke = (t, e) => {
|
108
|
+
const n = [...e.children].filter((o) => K(o, H) && !o.isEqualNode(t)).toReversed(), s = [...e.children].findLastIndex(
|
109
109
|
(o) => o.isEqualNode(t)
|
110
110
|
);
|
111
111
|
return [n, s, e];
|
112
112
|
}, Ze = (t) => {
|
113
113
|
let e = t.parentElement;
|
114
114
|
for (; e; ) {
|
115
|
-
if (window.getComputedStyle(e).
|
115
|
+
if (window.getComputedStyle(e).translate !== "none")
|
116
116
|
return e;
|
117
117
|
e = e.parentElement;
|
118
118
|
}
|
@@ -120,10 +120,10 @@ const Y = "horizontal", q = "vertical", H = "draggable", Vt = "droppable", xt =
|
|
120
120
|
}, ge = (t, e) => {
|
121
121
|
const n = Ze(t);
|
122
122
|
return n ? j(e, w(n)) + lt(e, n) : 0;
|
123
|
-
}, P = (t, e) => t == null ? void 0 : t.isSameNode(e), Ue = (t) => t && getComputedStyle(t).transform !== "none", fe = "startDrag",
|
123
|
+
}, P = (t, e) => t == null ? void 0 : t.isSameNode(e), Ue = (t) => t && getComputedStyle(t).transform !== "none", fe = "startDrag", wt = "drag", pe = "startDrop", st = "temp-child", he = "cubic-bezier(0.2, 0, 0, 1)", Bt = { height: 0, width: 0 }, mt = (t) => window.TouchEvent && t instanceof TouchEvent, Q = (t) => t instanceof HTMLElement, de = (t) => t instanceof MouseEvent, Je = ["onmouseup", "onmousedown", "onmousemove"], Ke = (t, e) => {
|
124
124
|
t.style.height = `${e.height}px`, t.style.width = `${e.width}px`;
|
125
|
-
}, it = (t, e =
|
126
|
-
!t || !
|
125
|
+
}, it = (t, e = Bt) => {
|
126
|
+
!t || !Q(t) || (e.width == 0 && e.height == 0 ? t.style.transform = "" : t.style.transform = `translate(${e.width}px,${e.height}px)`);
|
127
127
|
}, Qe = (t, e, n, s) => {
|
128
128
|
t[e] = (o) => {
|
129
129
|
if (o.defaultPrevented)
|
@@ -163,30 +163,30 @@ const Y = "horizontal", q = "vertical", H = "draggable", Vt = "droppable", xt =
|
|
163
163
|
const e = sn(t);
|
164
164
|
if (!e)
|
165
165
|
return en(t);
|
166
|
-
const [n, s] = nn(t, e), { clientX: o, clientY: r, pageX: i, pageY: a, screenX: f, screenY:
|
166
|
+
const [n, s] = nn(t, e), { clientX: o, clientY: r, pageX: i, pageY: a, screenX: f, screenY: g, target: d } = e;
|
167
167
|
return {
|
168
168
|
clientX: o,
|
169
169
|
clientY: r,
|
170
170
|
pageX: i,
|
171
171
|
pageY: a,
|
172
172
|
screenX: f,
|
173
|
-
screenY:
|
173
|
+
screenY: g,
|
174
174
|
target: d,
|
175
175
|
offsetX: n,
|
176
176
|
offsetY: s
|
177
177
|
};
|
178
178
|
}, sn = (t) => {
|
179
|
-
if (
|
179
|
+
if (mt(t))
|
180
180
|
return t.touches[0] ?? t.changedTouches[0];
|
181
181
|
if (de(t))
|
182
182
|
return t;
|
183
183
|
}, on = (t, e, n, s) => {
|
184
184
|
const o = w(s);
|
185
185
|
return zt(n, t) - ct(n, e) - j(n, o) - lt(n, s);
|
186
|
-
},
|
187
|
-
|
186
|
+
}, Rt = (t, e, n = "ease-out", s = "transform") => {
|
187
|
+
Q(t) && (t.style.transitionDuration = `${e}ms`, t.style.transitionTimingFunction = `${n}`, t.style.transitionProperty = `${s}`);
|
188
188
|
}, me = (t, e, n) => {
|
189
|
-
!t || !
|
189
|
+
!t || !Q(t) || (t[e] = () => {
|
190
190
|
n();
|
191
191
|
});
|
192
192
|
}, rn = (t) => {
|
@@ -218,17 +218,17 @@ const Y = "horizontal", q = "vertical", H = "draggable", Vt = "droppable", xt =
|
|
218
218
|
s != null && un(t, `--${n}`, s);
|
219
219
|
}
|
220
220
|
}, un = (t, e, n) => t && t.style.setProperty(e, n), _t = (t) => {
|
221
|
-
|
221
|
+
Q(t) && (t.style.transition = "", t.style.transform = "");
|
222
222
|
}, gn = (t, e, n) => {
|
223
223
|
n != 0 && (e === "vertical" ? t.scrollBy(0, n) : t.scrollBy(n, 0));
|
224
224
|
}, fn = (t) => {
|
225
225
|
let e = 0.5;
|
226
|
-
const n = 0.03, s = (i, a, f,
|
227
|
-
const [d] = z(i, w(t)), h = w(a), x = j(i, f) - j(i, h) +
|
228
|
-
let
|
226
|
+
const n = 0.03, s = (i, a, f, g) => {
|
227
|
+
const [d] = z(i, w(t)), h = w(a), x = j(i, f) - j(i, h) + Pt(i, g), [R] = z(i, h), b = R - d, C = x / b, v = d / b, A = 0.25, E = 0.2, M = 0.8;
|
228
|
+
let I = 0;
|
229
229
|
const W = qe(t, a);
|
230
|
-
!W && C <
|
231
|
-
const $ = A * d *
|
230
|
+
!W && C < E && C > -v ? I = o(C < 0 ? 0 : C, E) : !W && C > M && C < 1 + v && (I = r(C, M));
|
231
|
+
const $ = A * d * I;
|
232
232
|
e = Math.sign($) * Math.min(Math.abs($), Math.abs(e) + n), gn(a, i, e);
|
233
233
|
}, o = (i, a) => Math.pow(i / a, 1 / 3) - 1, r = (i, a) => Math.pow(1 / (1 - a) * (i - a), 3);
|
234
234
|
return [s];
|
@@ -239,21 +239,21 @@ const Y = "horizontal", q = "vertical", H = "draggable", Vt = "droppable", xt =
|
|
239
239
|
}, a = (h) => {
|
240
240
|
t.style.top = `${h.top}px`, t.style.left = `${h.left}px`;
|
241
241
|
}, f = (h, x, R, b) => {
|
242
|
-
const C = (
|
243
|
-
const M = zt(
|
244
|
-
if (Z >=
|
245
|
-
const
|
246
|
-
return E
|
242
|
+
const C = (E) => {
|
243
|
+
const M = zt(E, R), I = ct(E, window), W = je(E, window), [$] = z(E, w(h)), k = lt(E, h), U = Ot(E, h), Z = M - ue(E, n), tt = ge(h, E);
|
244
|
+
if (Z >= I - $ / 2 && Z <= I + W) {
|
245
|
+
const u = De(E, x), p = Z - j(E, s) - k - U - I - tt - u;
|
246
|
+
return v(E), p;
|
247
247
|
}
|
248
|
-
return
|
249
|
-
},
|
250
|
-
h &&
|
251
|
-
}, A = (
|
252
|
-
const { axis: M } =
|
253
|
-
o[M] = C(
|
248
|
+
return Pt(E, o);
|
249
|
+
}, v = (E) => {
|
250
|
+
h && K(h, Lt) && E === b && r(b, x, s, o);
|
251
|
+
}, A = (E) => {
|
252
|
+
const { axis: M } = F(E);
|
253
|
+
o[M] = C(E), i(g());
|
254
254
|
};
|
255
255
|
A(Y), A(q);
|
256
|
-
},
|
256
|
+
}, g = () => {
|
257
257
|
let h = o;
|
258
258
|
for (const x of e)
|
259
259
|
h = x(h, t);
|
@@ -263,16 +263,16 @@ const Y = "horizontal", q = "vertical", H = "draggable", Vt = "droppable", xt =
|
|
263
263
|
const [R, b] = Sn(h, x, t);
|
264
264
|
s = R, a(s), n = b;
|
265
265
|
}];
|
266
|
-
},
|
266
|
+
}, At = (t, e, n) => j(t, w(e)) - j(t, w(n)) - lt(t, n), hn = (t, e) => {
|
267
267
|
let { offsetX: n, offsetY: s, target: o } = t, r = dn(o, e);
|
268
268
|
const i = o;
|
269
|
-
return i && r && !P(i, r) && (n +=
|
269
|
+
return i && r && !P(i, r) && (n += At(Y, i, r), s += At(q, i, r)), r && e != o && (n += At(Y, r, e), s += At(q, r, e)), { offsetX: n, offsetY: s };
|
270
270
|
}, dn = (t, e) => {
|
271
|
-
const n = t == null ? void 0 : t.closest(`.${
|
271
|
+
const n = t == null ? void 0 : t.closest(`.${Mt}`);
|
272
272
|
return n && P(e, n) ? t : n;
|
273
273
|
}, Qt = (t, e, n, s) => {
|
274
274
|
const o = ge(n, t), r = n.parentElement, i = De(t, r);
|
275
|
-
return zt(t, e) - ue(t, s) -
|
275
|
+
return zt(t, e) - ue(t, s) - Ot(t, n) - lt(t, n) - ct(t, window) - o - i;
|
276
276
|
}, De = (t, e) => e && mn(e) ? j(t, w(e)) : 0, mn = (t) => {
|
277
277
|
let e = t;
|
278
278
|
for (; e; ) {
|
@@ -327,20 +327,20 @@ const Ht = (t) => t.length == 0 ? 0 : qt(t.replace("px", "")), Dn = (t, e) => {
|
|
327
327
|
return r * (o / 100);
|
328
328
|
}
|
329
329
|
return Ht(n);
|
330
|
-
},
|
330
|
+
}, vn = (t, e) => {
|
331
331
|
if (!(t instanceof Element)) return [0, !1];
|
332
332
|
const n = Dn(t, e), s = getComputedStyle(t).display, o = n > 0 || s === "flex";
|
333
333
|
return [n, o];
|
334
|
-
},
|
334
|
+
}, En = (t) => {
|
335
335
|
const { top: e, left: n } = getComputedStyle(t);
|
336
336
|
return [Ht(e), Ht(n)];
|
337
337
|
}, jt = (t, e) => {
|
338
|
-
const { gap: n } =
|
339
|
-
return
|
338
|
+
const { gap: n } = F(e);
|
339
|
+
return vn(t, n);
|
340
340
|
}, Tn = (t, e) => {
|
341
341
|
const [n, s] = jt(t, e);
|
342
342
|
return s ? n : 0;
|
343
|
-
},
|
343
|
+
}, ve = (t, e, n, s = () => !0) => {
|
344
344
|
const o = new MutationObserver((r) => {
|
345
345
|
if (r = r.filter(s), r.length > 0) {
|
346
346
|
const i = r[0];
|
@@ -348,20 +348,20 @@ const Ht = (t) => t.length == 0 ? 0 : qt(t.replace("px", "")), Dn = (t, e) => {
|
|
348
348
|
}
|
349
349
|
});
|
350
350
|
return o.observe(e, n), o;
|
351
|
-
}, te = (t) =>
|
352
|
-
function
|
351
|
+
}, te = (t) => Q(t) ? t.classList.contains(st) : !1;
|
352
|
+
function xt(t, e, n, s, o = t.previousElementSibling, r = t.nextElementSibling) {
|
353
353
|
let { height: i, width: a } = Cn(
|
354
354
|
n,
|
355
355
|
t,
|
356
356
|
o,
|
357
357
|
r
|
358
358
|
);
|
359
|
-
return
|
359
|
+
return St(t, s) && e == wt && (i = 0, a = 0), { height: i, width: a };
|
360
360
|
}
|
361
361
|
const Cn = (t, e, n, s) => {
|
362
|
-
const o =
|
362
|
+
const o = Dt(t, e), r = Ot(t, e), i = Ot(t, s), [a, f] = jt(e.parentElement, t), [g] = z(t, w(e));
|
363
363
|
if (f)
|
364
|
-
return ee(
|
364
|
+
return ee(g, r, o, a, 0, t);
|
365
365
|
const [d, h, x] = yn(
|
366
366
|
n,
|
367
367
|
i,
|
@@ -369,17 +369,17 @@ const Cn = (t, e, n, s) => {
|
|
369
369
|
r,
|
370
370
|
t
|
371
371
|
);
|
372
|
-
return ee(
|
372
|
+
return ee(g, h, d, 0, x, t);
|
373
373
|
}, yn = (t, e, n, s, o) => {
|
374
374
|
const r = Math.max(e, n);
|
375
375
|
let i = s, a = e;
|
376
376
|
if (t) {
|
377
|
-
const f =
|
377
|
+
const f = Dt(o, t);
|
378
378
|
i = Math.max(f, s), a = Math.max(a, f);
|
379
379
|
}
|
380
380
|
return [r, i, a];
|
381
|
-
}, ee = (t, e, n, s, o, r) => bn(r, t + e + n + s - o), bn = (t, e) => t == Y ? { width: e, height: 0 } : { width: 0, height: e }, An = "startDrag",
|
382
|
-
let s =
|
381
|
+
}, ee = (t, e, n, s, o, r) => bn(r, t + e + n + s - o), bn = (t, e) => t == Y ? { width: e, height: 0 } : { width: 0, height: e }, An = "startDrag", Ee = "cubic-bezier(0.2, 0, 0, 1)", Te = 50, Ce = "width, min-width, height", xn = (t, e, n) => {
|
382
|
+
let s = xt(e, An, n, t);
|
383
383
|
const o = Tn(t, n), [, r] = z(n, s);
|
384
384
|
s[r] -= o;
|
385
385
|
const [i, a] = Mn(n, e);
|
@@ -387,32 +387,32 @@ const Cn = (t, e, n, s) => {
|
|
387
387
|
}, Mn = (t, e) => {
|
388
388
|
const n = t == Y ? q : Y;
|
389
389
|
return z(n, w(e));
|
390
|
-
}, ut = (t, e =
|
390
|
+
}, ut = (t, e = Bt) => {
|
391
391
|
Ke(t, e), t.style.minWidth = `${e.width}px`;
|
392
392
|
}, On = (t, e, n) => (s) => {
|
393
393
|
e.contains(t) && (ut(t, n), s.disconnect());
|
394
394
|
}, ye = (t, e) => {
|
395
|
-
const { scrollDistance: n, clientDistance: s } =
|
395
|
+
const { scrollDistance: n, clientDistance: s } = F(e);
|
396
396
|
return t[n] - t[s];
|
397
397
|
}, wn = (t, e, n) => {
|
398
|
-
const [s] =
|
398
|
+
const [s] = vt(t, n);
|
399
399
|
return s / ye(e, t);
|
400
400
|
}, Bn = (t, e, n, s) => {
|
401
401
|
if (!s)
|
402
402
|
return;
|
403
|
-
const { direction: o } = e, r = wn(o, t, n) > 0.99, [, i] =
|
403
|
+
const { direction: o } = e, r = wn(o, t, n) > 0.99, [, i] = vt(o, t);
|
404
404
|
r && (t[i] = ye(t, o));
|
405
405
|
}, be = (t, e, n, s) => {
|
406
406
|
const { droppable: o, config: r, scroll: i } = n, { direction: a, animationDuration: f } = r;
|
407
407
|
if (Bn(o, r, i, e), o.querySelector(`.${st}`) || !t)
|
408
408
|
return;
|
409
|
-
var
|
409
|
+
var g = t.tagName == "LI" ? "DIV" : t.tagName, d = document.createElement(g);
|
410
410
|
rt(d, st), ut(d);
|
411
411
|
const h = xn(o, t, a);
|
412
|
-
return
|
412
|
+
return Rt(
|
413
413
|
d,
|
414
414
|
f,
|
415
|
-
|
415
|
+
Ee,
|
416
416
|
Ce
|
417
417
|
), [d, h, o];
|
418
418
|
}, ne = (t, e, n, s, o) => {
|
@@ -424,7 +424,7 @@ const Cn = (t, e, n, s) => {
|
|
424
424
|
if (!r)
|
425
425
|
return;
|
426
426
|
const [i, a, f] = r;
|
427
|
-
P(e, f) && ut(i, a),
|
427
|
+
P(e, f) && ut(i, a), ve(On(i, f, a), f, {
|
428
428
|
childList: !0,
|
429
429
|
subtree: !0
|
430
430
|
}), f.appendChild(i);
|
@@ -436,7 +436,7 @@ const Cn = (t, e, n, s) => {
|
|
436
436
|
i.appendChild(o), Ln(o, r);
|
437
437
|
}, Ln = (t, e) => requestAnimationFrame(() => {
|
438
438
|
ut(t, e), requestAnimationFrame(() => {
|
439
|
-
|
439
|
+
Rt(t, 0, Ee, Ce);
|
440
440
|
});
|
441
441
|
}), Pn = (t, e, n, s, o = !0) => {
|
442
442
|
if (n) {
|
@@ -448,8 +448,8 @@ const Cn = (t, e, n, s) => {
|
|
448
448
|
if (P(e, a) || !o && P(t, a))
|
449
449
|
return;
|
450
450
|
ut(i), setTimeout(() => {
|
451
|
-
var
|
452
|
-
(
|
451
|
+
var g;
|
452
|
+
(g = i.parentNode) == null || g.removeChild(i);
|
453
453
|
}, s + Te);
|
454
454
|
});
|
455
455
|
}
|
@@ -466,10 +466,10 @@ const Cn = (t, e, n, s) => {
|
|
466
466
|
return {
|
467
467
|
...n,
|
468
468
|
onDragEnd: (f) => {
|
469
|
-
const { index:
|
470
|
-
r({ index:
|
469
|
+
const { index: g, value: d } = f;
|
470
|
+
r({ index: g, value: e(d, s) });
|
471
471
|
},
|
472
|
-
onInsertEvent: (f,
|
472
|
+
onInsertEvent: (f, g) => o(f, e(g, s), !0)
|
473
473
|
};
|
474
474
|
};
|
475
475
|
class Fn {
|
@@ -502,10 +502,10 @@ class Fn {
|
|
502
502
|
return !this.groupClass || !s ? void 0 : s.closest(at(this.groupClass));
|
503
503
|
}
|
504
504
|
isOutsideOfAllDroppables(e) {
|
505
|
-
return (this.groupClass ? Array.from(document.querySelectorAll(at(this.groupClass))) : [this.parent]).every((s) =>
|
505
|
+
return (this.groupClass ? Array.from(document.querySelectorAll(at(this.groupClass))) : [this.parent]).every((s) => St(e, s));
|
506
506
|
}
|
507
507
|
isNotInsideAnotherDroppable(e, n) {
|
508
|
-
return !
|
508
|
+
return !St(e, n) || this.isOutsideOfAllDroppables(e);
|
509
509
|
}
|
510
510
|
onScrollEvent() {
|
511
511
|
this.dragEvent();
|
@@ -529,7 +529,7 @@ class Fn {
|
|
529
529
|
getCurrentConfig(e) {
|
530
530
|
var o, r;
|
531
531
|
const n = this.draggableElement, s = this.getCurrent(n, e);
|
532
|
-
return this.current && this.isNotInsideAnotherDroppable(n, (o = this.current) == null ? void 0 : o.droppable) && !this.droppableIfInsideCurrent(s, (r = this.current) == null ? void 0 : r.droppable) ? this.current : s ? (
|
532
|
+
return this.current && this.isNotInsideAnotherDroppable(n, (o = this.current) == null ? void 0 : o.droppable) && !this.droppableIfInsideCurrent(s, (r = this.current) == null ? void 0 : r.droppable) ? this.current : s ? (Q(s) && !s.onscroll && this.setOnScroll(s), this.getConfigFrom(s)) : this.getConfigFrom(this.parent);
|
533
533
|
}
|
534
534
|
updateConfig(e) {
|
535
535
|
const n = this.current;
|
@@ -541,18 +541,18 @@ class Fn {
|
|
541
541
|
}
|
542
542
|
}
|
543
543
|
const se = (t, e) => {
|
544
|
-
const { paddingBefore: n } =
|
544
|
+
const { paddingBefore: n } = F(t), s = lt(t, e), o = Tt(e, n), r = Pt(t, w(e));
|
545
545
|
return s + o + r;
|
546
546
|
}, In = (t, e) => {
|
547
|
-
const [n, s] =
|
547
|
+
const [n, s] = En(e), o = se(q, t);
|
548
548
|
return [se(Y, t) - s, o - n];
|
549
549
|
};
|
550
550
|
function Nn(t, e, n, s, o, r, i, a, f) {
|
551
|
-
let
|
551
|
+
let g = 0, d = 0;
|
552
552
|
const h = !!(n < 0 && f);
|
553
553
|
if (n === s && !h)
|
554
554
|
return oe(
|
555
|
-
{ height:
|
555
|
+
{ height: g, width: d },
|
556
556
|
t,
|
557
557
|
o,
|
558
558
|
i,
|
@@ -566,9 +566,9 @@ function Nn(t, e, n, s, o, r, i, a, f) {
|
|
566
566
|
);
|
567
567
|
if (h) {
|
568
568
|
const [p, m] = In(a, f);
|
569
|
-
|
569
|
+
g += m, d += p;
|
570
570
|
}
|
571
|
-
const [
|
571
|
+
const [v, A] = jt(a, t), [E, M, I] = Xn(
|
572
572
|
x,
|
573
573
|
R == null ? void 0 : R.previousElementSibling,
|
574
574
|
C,
|
@@ -577,7 +577,7 @@ function Nn(t, e, n, s, o, r, i, a, f) {
|
|
577
577
|
t
|
578
578
|
), [W, $, k] = Yn(
|
579
579
|
b,
|
580
|
-
|
580
|
+
v,
|
581
581
|
A,
|
582
582
|
t
|
583
583
|
), U = Gn(
|
@@ -585,11 +585,11 @@ function Nn(t, e, n, s, o, r, i, a, f) {
|
|
585
585
|
W,
|
586
586
|
k,
|
587
587
|
M,
|
588
|
-
|
589
|
-
|
590
|
-
), [Z] =
|
591
|
-
return t === q ?
|
592
|
-
{ height:
|
588
|
+
E,
|
589
|
+
v
|
590
|
+
), [Z] = vt(t, a), tt = h ? Z : $n(a, r, t), u = (C ? U - I : I - U) - tt;
|
591
|
+
return t === q ? g += u : t === Y && (d += u), oe(
|
592
|
+
{ height: g, width: d },
|
593
593
|
t,
|
594
594
|
o,
|
595
595
|
i,
|
@@ -597,23 +597,23 @@ function Nn(t, e, n, s, o, r, i, a, f) {
|
|
597
597
|
);
|
598
598
|
}
|
599
599
|
const $n = (t, e, n) => {
|
600
|
-
const [s] =
|
600
|
+
const [s] = vt(n, t), [o] = vt(n, e);
|
601
601
|
return s - o;
|
602
602
|
}, Gn = (t, e, n, s, o, r) => {
|
603
603
|
const i = Math.max(e, o);
|
604
604
|
return Math.max(n, s) + t + i + r;
|
605
605
|
}, Vn = (t, e, n, s) => {
|
606
606
|
const o = e < n, [r, i] = [e, n].toSorted((d, h) => d - h), a = t[e] ?? s, f = t[n];
|
607
|
-
let
|
608
|
-
return r < 0 && s && (
|
607
|
+
let g = o ? t.slice(r + 1, i + 1) : t.slice(r, i);
|
608
|
+
return r < 0 && s && (g = t.slice(r + 1, i)), [a, f, g, o];
|
609
609
|
}, Yn = (t, e, n, s) => {
|
610
610
|
if (t.length == 0)
|
611
611
|
return [0, 0, 0];
|
612
|
-
const o =
|
612
|
+
const o = Dt(s, t[0]);
|
613
613
|
let r = 0, i = -o;
|
614
614
|
for (const [a, f] of t.entries()) {
|
615
|
-
const [
|
616
|
-
n && (r += d), n && a > 0 ? r += e : r = Math.max(r, d), i += r +
|
615
|
+
const [g] = z(s, w(f)), d = le(s, f);
|
616
|
+
n && (r += d), n && a > 0 ? r += e : r = Math.max(r, d), i += r + g, r = Dt(s, f);
|
617
617
|
}
|
618
618
|
return [o, i, r];
|
619
619
|
}, oe = (t, e, n, s, o) => {
|
@@ -631,36 +631,36 @@ const $n = (t, e, n) => {
|
|
631
631
|
}, Wn = (t, e, n, s, o) => {
|
632
632
|
if (n)
|
633
633
|
return [0, 0, 0];
|
634
|
-
const r =
|
634
|
+
const r = Dt(o, s ? null : t), i = le(o, e);
|
635
635
|
let a = Math.max(r, i);
|
636
636
|
return [r, i, a];
|
637
637
|
}, _n = (t, e, n) => {
|
638
|
-
const { handlerSelector: s, animationDuration: o } = t, r = (
|
639
|
-
n(), i(
|
638
|
+
const { handlerSelector: s, animationDuration: o } = t, r = (g) => {
|
639
|
+
n(), i(g, !1), _t(g), g.style.top = "", g.style.left = "", Se(g, {
|
640
640
|
fixedHeight: "",
|
641
641
|
fixedWidth: ""
|
642
642
|
});
|
643
|
-
}, i = (
|
644
|
-
|
645
|
-
}, a = (
|
643
|
+
}, i = (g, d) => {
|
644
|
+
dt(g, Lt, d), a(d, g), e.toggleGrabClass(!d);
|
645
|
+
}, a = (g, d) => {
|
646
646
|
const h = d.querySelector(s);
|
647
|
-
|
647
|
+
dt(document.body, ce, g), dt(h || d, Yt, g);
|
648
648
|
};
|
649
|
-
return [r, i, (
|
650
|
-
|
649
|
+
return [r, i, (g, d) => {
|
650
|
+
Rt(g, o, he), it(g, d);
|
651
651
|
}];
|
652
652
|
}, Hn = 50;
|
653
653
|
function qn(t, e, n, s, o, r) {
|
654
654
|
let i = e;
|
655
|
-
const { onRemoveAtEvent: a, animationDuration: f, draggingClass:
|
656
|
-
const O =
|
657
|
-
C(
|
658
|
-
}, b = (
|
655
|
+
const { onRemoveAtEvent: a, animationDuration: f, draggingClass: g } = t, [d, h, x] = _n(t, o, r), R = (u, p, m, y) => {
|
656
|
+
const O = xt(u, p, y.direction, m);
|
657
|
+
C(u, p, O, m, y);
|
658
|
+
}, b = (u, p, m, y, O) => {
|
659
659
|
if (!m)
|
660
660
|
return;
|
661
|
-
const { droppable: T, scroll: B, config: L } = m, S =
|
662
|
-
|
663
|
-
|
661
|
+
const { droppable: T, scroll: B, config: L } = m, S = xt(u, p, L.direction, T);
|
662
|
+
E(
|
663
|
+
u,
|
664
664
|
p,
|
665
665
|
S,
|
666
666
|
y,
|
@@ -669,99 +669,105 @@ function qn(t, e, n, s, o, r) {
|
|
669
669
|
L,
|
670
670
|
O
|
671
671
|
);
|
672
|
-
}, C = (
|
673
|
-
const [T] = Nt(
|
674
|
-
|
675
|
-
|
676
|
-
|
672
|
+
}, C = (u, p, m, y, O) => {
|
673
|
+
const [T] = Nt(u, y), B = St(u, y), { direction: L, onDragOver: S } = O;
|
674
|
+
S({
|
675
|
+
element: u,
|
676
|
+
index: e,
|
677
|
+
targetIndex: i,
|
678
|
+
value: t.onGetValue(e),
|
679
|
+
droppable: y
|
680
|
+
}), T.length == 0 && A(m, 1, L, T);
|
681
|
+
for (const [G, N] of T.entries()) {
|
682
|
+
if (!K(N, H))
|
677
683
|
continue;
|
678
|
-
const
|
679
|
-
if (!B &&
|
680
|
-
m =
|
684
|
+
const J = v(L, u, N, m);
|
685
|
+
if (!B && J)
|
686
|
+
m = J;
|
681
687
|
else if (!B)
|
682
688
|
continue;
|
683
|
-
const
|
684
|
-
A(m,
|
689
|
+
const gt = T.length - G;
|
690
|
+
A(m, gt, L, T), p === fe ? it(N, m) : p === wt && x(N, m);
|
685
691
|
}
|
686
|
-
},
|
687
|
-
const O = w(p), T = w(m), B = j(
|
688
|
-
return B >
|
689
|
-
}, A = (
|
690
|
-
const O = y.filter((B) =>
|
692
|
+
}, v = (u, p, m, y) => {
|
693
|
+
const O = w(p), T = w(m), B = j(u, O), L = j(u, T), [S] = z(u, T), G = L + S / 2, N = Pt(u, _e(m)), J = G - N;
|
694
|
+
return B > J ? Bt : y;
|
695
|
+
}, A = (u, p, m, y) => {
|
696
|
+
const O = y.filter((B) => K(B, H)).length, [T] = z(m, u);
|
691
697
|
T == 0 ? i = Math.max(i, p) : i = Math.min(i, p - 1), i = Math.min(i, O);
|
692
|
-
},
|
693
|
-
const [S,
|
694
|
-
|
695
|
-
const [
|
696
|
-
|
697
|
-
F,
|
698
|
+
}, E = (u, p, m, y, O, T, B, L) => {
|
699
|
+
const [S, G] = Nt(u, O), N = S.toReversed(), J = G === -1 ? N.length : G;
|
700
|
+
N.splice(J, 0, u);
|
701
|
+
const [gt, Ct, ft] = M(
|
702
|
+
u,
|
698
703
|
G,
|
704
|
+
N,
|
699
705
|
O
|
700
706
|
);
|
701
|
-
m =
|
702
|
-
|
707
|
+
m = xt(
|
708
|
+
u,
|
703
709
|
p,
|
704
710
|
B.direction,
|
705
711
|
n,
|
706
|
-
|
707
|
-
|
712
|
+
gt,
|
713
|
+
Ct
|
708
714
|
);
|
709
|
-
const Ft = Xe(),
|
715
|
+
const Ft = Xe(), yt = Nn(
|
710
716
|
B.direction,
|
717
|
+
N,
|
711
718
|
G,
|
712
|
-
|
713
|
-
gt,
|
719
|
+
ft,
|
714
720
|
Ft,
|
715
721
|
T,
|
716
722
|
y,
|
717
723
|
O,
|
718
|
-
|
724
|
+
u
|
719
725
|
);
|
720
|
-
S.length == 0 &&
|
721
|
-
for (const [It,
|
722
|
-
let
|
723
|
-
|
726
|
+
S.length == 0 && I(void 0, m, u, yt);
|
727
|
+
for (const [It, pt] of S.toReversed().entries()) {
|
728
|
+
let bt = m;
|
729
|
+
ft - 1 >= It && (bt = Bt), p === pe && !K(pt, st) && I(pt, bt, u, yt);
|
724
730
|
}
|
725
|
-
W(
|
726
|
-
}, M = (
|
727
|
-
const T =
|
728
|
-
return [
|
729
|
-
},
|
730
|
-
it(
|
731
|
-
}, W = (
|
731
|
+
W(ft, u, B, O, L);
|
732
|
+
}, M = (u, p, m, y) => {
|
733
|
+
const T = St(u, y) ? p : i, B = () => p < T ? [T, T + 1] : p > T ? [T - 1, T] : [T - 1, T + 1], [L, S] = B(), G = m[L] ?? null, N = m[S] ?? null;
|
734
|
+
return [G, N, T];
|
735
|
+
}, I = (u, p, m, y) => {
|
736
|
+
it(u, p), it(m, y);
|
737
|
+
}, W = (u, p, m, y, O) => {
|
732
738
|
const { onInsertEvent: T, onDragEnd: B } = m;
|
733
739
|
rt(p, Xt), U(p, n, y, () => {
|
734
740
|
if (Ut(p, Xt), O != null) {
|
735
741
|
const L = a(O, !0);
|
736
|
-
L != null && (T(
|
742
|
+
L != null && (T(u, L, !0), B({ value: L, index: u })), k(p), $();
|
737
743
|
}
|
738
744
|
});
|
739
745
|
}, $ = () => {
|
740
746
|
if (s) {
|
741
|
-
var
|
747
|
+
var u = document.querySelectorAll(
|
742
748
|
`${at(s)} > .${H}`
|
743
749
|
);
|
744
|
-
for (const p of
|
750
|
+
for (const p of u)
|
745
751
|
_t(p);
|
746
752
|
}
|
747
|
-
}, k = (
|
753
|
+
}, k = (u) => {
|
748
754
|
setTimeout(() => {
|
749
|
-
Ut(
|
755
|
+
Ut(u, g);
|
750
756
|
}, Hn);
|
751
|
-
}, U = (
|
757
|
+
}, U = (u, p, m, y) => {
|
752
758
|
setTimeout(() => {
|
753
|
-
y && y(), Z(p, m),
|
759
|
+
y && y(), Z(p, m), tt(m), d(u), et(u, p), et(u, m);
|
754
760
|
}, f);
|
755
|
-
}, Z = (
|
756
|
-
P(
|
757
|
-
},
|
758
|
-
if (!P(n,
|
761
|
+
}, Z = (u, p) => {
|
762
|
+
P(u, p) ? Gt(u, f) : (Gt(u, f, !0), Gt(p, f));
|
763
|
+
}, tt = (u) => {
|
764
|
+
if (!P(n, u)) {
|
759
765
|
var [p] = n.querySelectorAll(`.${st}`);
|
760
|
-
p &&
|
766
|
+
p && Q(p) && (p.style.height = "0px", p.style.width = "0px");
|
761
767
|
}
|
762
|
-
},
|
763
|
-
const [m] = Nt(
|
764
|
-
for (const y of [...m,
|
768
|
+
}, et = (u, p) => {
|
769
|
+
const [m] = Nt(u, p);
|
770
|
+
for (const y of [...m, u])
|
765
771
|
_t(y);
|
766
772
|
};
|
767
773
|
return [R, b, h];
|
@@ -773,17 +779,17 @@ function zn(t, e, n, s, o) {
|
|
773
779
|
isDraggable: i,
|
774
780
|
droppableGroup: a,
|
775
781
|
animationDuration: f,
|
776
|
-
draggingClass:
|
782
|
+
draggingClass: g,
|
777
783
|
droppableClass: d,
|
778
784
|
onDragStart: h,
|
779
785
|
delayBeforeTouchMoveEvent: x,
|
780
786
|
coordinateTransform: R
|
781
787
|
} = n, b = Et(a).map((c) => `droppable-group-${c}`).join(" ");
|
782
|
-
let C = 0,
|
788
|
+
let C = 0, v = {
|
783
789
|
scrollX: 0,
|
784
790
|
scrollY: 0
|
785
|
-
}, A = { pageX: 0, pageY: 0 },
|
786
|
-
const [
|
791
|
+
}, A = { pageX: 0, pageY: 0 }, E, M;
|
792
|
+
const [I, W] = pn(
|
787
793
|
t,
|
788
794
|
R
|
789
795
|
), $ = () => {
|
@@ -795,26 +801,26 @@ function zn(t, e, n, s, o) {
|
|
795
801
|
b,
|
796
802
|
o,
|
797
803
|
$
|
798
|
-
),
|
804
|
+
), tt = () => {
|
799
805
|
rt(t, H);
|
800
|
-
},
|
801
|
-
rt(c,
|
802
|
-
},
|
806
|
+
}, et = (c) => {
|
807
|
+
rt(c, Mt), o.addSubscriber(c);
|
808
|
+
}, u = () => {
|
803
809
|
if (i(t)) {
|
804
810
|
const c = t.querySelector(r);
|
805
|
-
|
811
|
+
et(c || t);
|
806
812
|
}
|
807
813
|
}, p = () => {
|
808
|
-
|
814
|
+
u(), tt();
|
809
815
|
}, m = (c) => {
|
810
|
-
const l = c == null ? void 0 : c.querySelector(`.${
|
811
|
-
return l && D &&
|
816
|
+
const l = c == null ? void 0 : c.querySelector(`.${Mt}`), D = l == null ? void 0 : l.parentElement;
|
817
|
+
return l && D && K(D, Vt) && !P(s, D) ? null : l;
|
812
818
|
}, y = (c) => {
|
813
819
|
const l = m(c) ?? c;
|
814
|
-
l && i(c) && ($t(l, re,
|
820
|
+
l && i(c) && ($t(l, re, pt("mousemove", "mouseup")), $t(
|
815
821
|
l,
|
816
822
|
"ontouchstart",
|
817
|
-
|
823
|
+
pt("touchmove", "touchend"),
|
818
824
|
(D) => {
|
819
825
|
const V = D.touches[0];
|
820
826
|
M = {
|
@@ -822,7 +828,7 @@ function zn(t, e, n, s, o) {
|
|
822
828
|
y: V.clientY
|
823
829
|
};
|
824
830
|
}
|
825
|
-
), O(l)), P(c, l) || $t(c, re,
|
831
|
+
), O(l)), P(c, l) || $t(c, re, bt), rt(s, Vt);
|
826
832
|
}, O = (c) => {
|
827
833
|
const l = c.querySelectorAll("img");
|
828
834
|
Array.from(l).forEach((D) => {
|
@@ -832,7 +838,7 @@ function zn(t, e, n, s, o) {
|
|
832
838
|
if (A.pageX == 0 && A.pageY == 0 || !S.current)
|
833
839
|
return;
|
834
840
|
const { droppable: c, config: l } = S.current;
|
835
|
-
|
841
|
+
I(t, c, A, l.direction), k(t, wt, c, l);
|
836
842
|
}, B = (c) => {
|
837
843
|
const l = c.querySelectorAll(`.${H}`);
|
838
844
|
for (const D of l)
|
@@ -840,7 +846,7 @@ function zn(t, e, n, s, o) {
|
|
840
846
|
}, L = (c, l) => {
|
841
847
|
l && C == 2 && !P(c == null ? void 0 : c.droppable, l.droppable) && (k(
|
842
848
|
t,
|
843
|
-
|
849
|
+
wt,
|
844
850
|
l.droppable,
|
845
851
|
l.config
|
846
852
|
), B(l.droppable));
|
@@ -851,7 +857,7 @@ function zn(t, e, n, s, o) {
|
|
851
857
|
T,
|
852
858
|
L,
|
853
859
|
n.mapFrom
|
854
|
-
),
|
860
|
+
), G = (c) => {
|
855
861
|
if (!S.current)
|
856
862
|
return;
|
857
863
|
const l = b ? Array.from(document.querySelectorAll(at(b))) : [s];
|
@@ -860,11 +866,11 @@ function zn(t, e, n, s, o) {
|
|
860
866
|
d,
|
861
867
|
!c && P(D, S.current.droppable)
|
862
868
|
);
|
863
|
-
},
|
869
|
+
}, N = (c, l = !1) => {
|
864
870
|
S.updateConfig(c);
|
865
871
|
const D = S.isOutside(c);
|
866
|
-
|
867
|
-
},
|
872
|
+
G(D), C === 1 && !l ? Zt(c) : C === 2 && (J(D), Oe(c));
|
873
|
+
}, J = (c = !0) => {
|
868
874
|
if (!S.current)
|
869
875
|
return;
|
870
876
|
const { droppable: l } = S.current;
|
@@ -874,55 +880,55 @@ function zn(t, e, n, s, o) {
|
|
874
880
|
C == 1,
|
875
881
|
S.current
|
876
882
|
);
|
877
|
-
},
|
878
|
-
if (
|
883
|
+
}, gt = (c) => {
|
884
|
+
if (mt(c) && M && C == 1) {
|
879
885
|
const l = c.touches[0], D = Math.abs(l.clientX - M.x), V = Math.abs(l.clientY - M.y);
|
880
886
|
if (Math.abs(D) > 5 && Math.abs(V) > 5)
|
881
|
-
return clearTimeout(
|
887
|
+
return clearTimeout(E), !1;
|
882
888
|
}
|
883
889
|
return !0;
|
884
|
-
},
|
885
|
-
clearTimeout(
|
890
|
+
}, Ct = (c) => {
|
891
|
+
clearTimeout(E);
|
886
892
|
const l = Wt(c);
|
887
|
-
if (
|
893
|
+
if (mt(c) && c.cancelable && C == 2 && c.preventDefault(), mt(c) && !c.cancelable || !gt(c)) {
|
888
894
|
kt("touchmove", c);
|
889
895
|
return;
|
890
896
|
}
|
891
|
-
|
892
|
-
},
|
893
|
-
c == "touchmove" ?
|
897
|
+
N(l, mt(c));
|
898
|
+
}, ft = (c, l) => {
|
899
|
+
c == "touchmove" ? E = setTimeout(() => {
|
894
900
|
l();
|
895
901
|
}, x) : l();
|
896
902
|
}, Ft = (c, l) => {
|
897
|
-
const { clientX: D, clientY: V } = c, nt = document.elementFromPoint(D, V),
|
898
|
-
return
|
899
|
-
},
|
903
|
+
const { clientX: D, clientY: V } = c, nt = document.elementFromPoint(D, V), ht = nt == null ? void 0 : nt.closest(`.${H}`);
|
904
|
+
return ht && P(l, ht);
|
905
|
+
}, yt = (c) => {
|
900
906
|
const l = n.onGetValue(e);
|
901
907
|
return { index: e, element: c, value: l };
|
902
908
|
}, It = (c) => {
|
903
|
-
S.updateConfig(c),
|
904
|
-
},
|
909
|
+
S.updateConfig(c), G(S.isOutside(c)), Zt(c);
|
910
|
+
}, pt = (c, l) => (D) => {
|
905
911
|
if (!Ft(D, t))
|
906
912
|
return;
|
907
913
|
ot.updateScrolls(s, b);
|
908
914
|
const { scrollX: V, scrollY: nt } = window;
|
909
|
-
if (
|
915
|
+
if (v = { scrollX: V, scrollY: nt }, C === 0) {
|
910
916
|
C = 1;
|
911
|
-
const
|
912
|
-
|
917
|
+
const ht = yt(t);
|
918
|
+
ht && h(ht), ft(c, () => {
|
913
919
|
c == "touchmove" && It(D);
|
914
|
-
}), document.addEventListener(c,
|
920
|
+
}), document.addEventListener(c, Ct, {
|
915
921
|
passive: !1
|
916
922
|
}), we(s), document.addEventListener(l, Ae(c), {
|
917
923
|
once: !0
|
918
924
|
});
|
919
925
|
}
|
920
|
-
},
|
926
|
+
}, bt = (c) => S.updateConfig(c), Ae = (c) => (l) => {
|
921
927
|
kt(c, l);
|
922
928
|
}, kt = (c, l) => {
|
923
|
-
|
929
|
+
G(!0);
|
924
930
|
const D = Wt(l);
|
925
|
-
Le(S.isOutside(D)), clearTimeout(
|
931
|
+
Le(S.isOutside(D)), clearTimeout(E), document.removeEventListener(c, Ct), S.updateConfig(D);
|
926
932
|
const V = S.getCurrentConfig(D);
|
927
933
|
if (V) {
|
928
934
|
const { droppable: nt } = V;
|
@@ -936,7 +942,7 @@ function zn(t, e, n, s, o) {
|
|
936
942
|
document.querySelectorAll(at(b))
|
937
943
|
);
|
938
944
|
for (const D of l)
|
939
|
-
|
945
|
+
Q(D) && (D.onscroll = null);
|
940
946
|
}, Zt = (c) => {
|
941
947
|
S.current && ne(
|
942
948
|
t,
|
@@ -959,28 +965,28 @@ function zn(t, e, n, s, o) {
|
|
959
965
|
$();
|
960
966
|
return;
|
961
967
|
}
|
962
|
-
C = 3, Pe(t), t.classList.contains(
|
968
|
+
C = 3, Pe(t), t.classList.contains(Lt) && U(
|
963
969
|
t,
|
964
970
|
pe,
|
965
971
|
c ? S.initial : S.current,
|
966
|
-
|
972
|
+
v,
|
967
973
|
e
|
968
974
|
);
|
969
975
|
}, Pe = (c) => {
|
970
|
-
|
976
|
+
Rt(c, f, he), it(c);
|
971
977
|
}, Re = (c) => {
|
972
978
|
const { height: l, width: D } = w(c);
|
973
979
|
Se(c, {
|
974
980
|
fixedHeight: `${l}px`,
|
975
981
|
fixedWidth: `${D}px`
|
976
|
-
}), Z(c, !0),
|
982
|
+
}), Z(c, !0), dt(c, g, !0), c.style.transition = "";
|
977
983
|
}, Fe = (c) => {
|
978
|
-
import("./remove-
|
984
|
+
import("./remove-Dg1WsaSC.js").then((l) => {
|
979
985
|
const [D] = l.default(n, s, o, $);
|
980
986
|
S.initial && D(e, c, t, S.initial);
|
981
987
|
});
|
982
988
|
}, Ie = (c, l) => {
|
983
|
-
(c === e || c === n.onGetLegth() && e === c - 1) && import("./insert
|
989
|
+
(c === e || c === n.onGetLegth() && e === c - 1) && import("./insert-BXGi8i8T.js").then((D) => {
|
984
990
|
const [V] = D.default(
|
985
991
|
n,
|
986
992
|
s,
|
@@ -1003,11 +1009,11 @@ const jn = (t, e) => {
|
|
1003
1009
|
}, kn = () => {
|
1004
1010
|
an(document.body, [
|
1005
1011
|
`.${H}{touch-action:manipulation;user-select:none;box-sizing:border-box!important;-webkit-user-select:none;}`,
|
1006
|
-
`.${
|
1012
|
+
`.${Mt}{pointer-events:auto!important;}`,
|
1007
1013
|
`.${Ge}{cursor:grab;}`,
|
1008
1014
|
".temp-child{touch-action:none;pointer-events:none;box-sizing:border-box!important;}",
|
1009
1015
|
".droppable{box-sizing:border-box!important;}",
|
1010
|
-
`.${
|
1016
|
+
`.${Lt}{position:fixed;z-index:5000;width:var(--fixedWidth)!important;height:var(--fixedHeight)!important;}`,
|
1011
1017
|
`.${Yt}{pointer-events:none!important;}`,
|
1012
1018
|
`.${Xt}{pointer-events:none!important;}`,
|
1013
1019
|
`.${ce}{cursor:grabbing;}`,
|
@@ -1020,10 +1026,10 @@ function Zn(t, e, n, s = "index") {
|
|
1020
1026
|
const { droppableGroup: a } = t;
|
1021
1027
|
if (!n)
|
1022
1028
|
return [r, i];
|
1023
|
-
const f = Et(a).map((
|
1029
|
+
const f = Et(a).map((g) => `droppable-group-${g}`).join(" ");
|
1024
1030
|
kn(), jn(f, n);
|
1025
|
-
for (const
|
1026
|
-
const d =
|
1031
|
+
for (const g of n.children) {
|
1032
|
+
const d = g.getAttribute(o), h = We(d), x = g;
|
1027
1033
|
if (x && h >= 0) {
|
1028
1034
|
const [R, b] = zn(
|
1029
1035
|
x,
|
@@ -1038,7 +1044,7 @@ function Zn(t, e, n, s = "index") {
|
|
1038
1044
|
return [r, i];
|
1039
1045
|
}
|
1040
1046
|
const Un = (t, e) => {
|
1041
|
-
const n = (a, f) => t.removeAtEvent(a, f), s = (a, f,
|
1047
|
+
const n = (a, f) => t.removeAtEvent(a, f), s = (a, f, g) => t.insertEvent(a, f, g), o = () => t.getLength(), r = (a) => t.getValue(a), i = (a) => a;
|
1042
1048
|
return {
|
1043
1049
|
direction: (e == null ? void 0 : e.direction) ?? q,
|
1044
1050
|
handlerSelector: (e == null ? void 0 : e.handlerSelector) ?? H,
|
@@ -1049,6 +1055,8 @@ const Un = (t, e) => {
|
|
1049
1055
|
}),
|
1050
1056
|
onDragEnd: (e == null ? void 0 : e.onDragEnd) ?? (() => {
|
1051
1057
|
}),
|
1058
|
+
onDragOver: (e == null ? void 0 : e.onDragOver) ?? (() => {
|
1059
|
+
}),
|
1052
1060
|
droppableGroup: e == null ? void 0 : e.droppableGroup,
|
1053
1061
|
onRemoveAtEvent: n,
|
1054
1062
|
onInsertEvent: s,
|
@@ -1066,43 +1074,43 @@ const Un = (t, e) => {
|
|
1066
1074
|
};
|
1067
1075
|
function es(t, e, n, s = "index") {
|
1068
1076
|
let o = [], r = [], i;
|
1069
|
-
const a = Un(t, n), f = (
|
1077
|
+
const a = Un(t, n), f = (v) => {
|
1070
1078
|
for (const A of o)
|
1071
|
-
A(
|
1072
|
-
},
|
1079
|
+
A(v);
|
1080
|
+
}, g = (v, A) => {
|
1073
1081
|
if (a.onGetLegth() === 0)
|
1074
|
-
t.insertToListEmpty(a,
|
1082
|
+
t.insertToListEmpty(a, v, A);
|
1075
1083
|
else
|
1076
1084
|
for (const M of r)
|
1077
|
-
M(
|
1078
|
-
}, d = (
|
1079
|
-
const [A,
|
1085
|
+
M(v, A);
|
1086
|
+
}, d = (v) => {
|
1087
|
+
const [A, E] = Zn(
|
1080
1088
|
a,
|
1081
1089
|
e,
|
1082
|
-
|
1090
|
+
v,
|
1083
1091
|
s
|
1084
1092
|
);
|
1085
|
-
o = A, r =
|
1086
|
-
}, h = (
|
1087
|
-
const A =
|
1088
|
-
return A.length > 0 ||
|
1089
|
-
}, x = (
|
1090
|
-
i =
|
1093
|
+
o = A, r = E;
|
1094
|
+
}, h = (v) => {
|
1095
|
+
const A = Array.from(v.addedNodes ?? []).values().filter((M) => !te(M)).toArray(), E = Array.from(v.removedNodes ?? []).values().filter((M) => !te(M)).toArray();
|
1096
|
+
return A.length > 0 || E.length > 0;
|
1097
|
+
}, x = (v) => {
|
1098
|
+
i = ve(
|
1091
1099
|
() => {
|
1092
|
-
d(
|
1100
|
+
d(v);
|
1093
1101
|
},
|
1094
|
-
|
1102
|
+
v,
|
1095
1103
|
{ childList: !0 },
|
1096
1104
|
h
|
1097
1105
|
);
|
1098
|
-
}, R = (
|
1099
|
-
rt(
|
1100
|
-
}, b = (
|
1101
|
-
ot.addConfig(
|
1106
|
+
}, R = (v) => {
|
1107
|
+
rt(v, Vt);
|
1108
|
+
}, b = (v) => {
|
1109
|
+
ot.addConfig(v, a);
|
1102
1110
|
};
|
1103
|
-
return [f,
|
1104
|
-
if (
|
1105
|
-
return R(
|
1111
|
+
return [f, g, (v) => {
|
1112
|
+
if (v)
|
1113
|
+
return R(v), b(v), x(v), d(v), ot.removeObsoleteConfigs(), i;
|
1106
1114
|
}];
|
1107
1115
|
}
|
1108
1116
|
export {
|
@@ -1110,21 +1118,21 @@ export {
|
|
1110
1118
|
Ge as G,
|
1111
1119
|
rt as a,
|
1112
1120
|
ne as b,
|
1113
|
-
|
1121
|
+
xt as c,
|
1114
1122
|
he as d,
|
1115
1123
|
Gt as e,
|
1116
1124
|
_t as f,
|
1117
1125
|
Nt as g,
|
1118
1126
|
Qn as h,
|
1119
|
-
|
1127
|
+
K as i,
|
1120
1128
|
ts as j,
|
1121
1129
|
Kn as k,
|
1122
1130
|
te as l,
|
1123
1131
|
it as m,
|
1124
1132
|
es as n,
|
1125
|
-
|
1133
|
+
ve as o,
|
1126
1134
|
Ut as r,
|
1127
|
-
|
1128
|
-
|
1135
|
+
Rt as s,
|
1136
|
+
dt as t,
|
1129
1137
|
_n as u
|
1130
1138
|
};
|