@blofin/blofin-ui 0.7.46 → 0.7.48
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/{ProTable-a018c4f3.js → ProTable-079d6c86.js} +268 -270
- package/dist/ProTable.es.js +2 -2
- package/dist/blofin.css +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +4 -0
- package/dist/components/Checkbox/styles.d.ts +3 -15
- package/dist/components/Sortable/index.d.ts +1 -0
- package/dist/{index-4b911c6e.js → index-01467052.js} +2 -2
- package/dist/{index-ea293b70.js → index-03b62071.js} +2 -2
- package/dist/{index-858a8ffe.js → index-0424dda7.js} +2 -2
- package/dist/{index-cd77755c.js → index-04d50676.js} +4 -4
- package/dist/{index-6c8cf83d.js → index-064f0dba.js} +2 -2
- package/dist/{index-1c4022e0.js → index-07ee0ac1.js} +2 -2
- package/dist/{index-1a643b89.js → index-0a02d4f8.js} +2 -2
- package/dist/{index-2734849b.js → index-0b3cdcd6.js} +1 -1
- package/dist/{index-2c7fb184.js → index-0c42484f.js} +2 -2
- package/dist/{index-f531cc96.js → index-0dbc40fa.js} +2 -2
- package/dist/{index-342d1802.js → index-0e49c47d.js} +2 -2
- package/dist/{index-ed5b4205.js → index-0f923838.js} +2 -2
- package/dist/{index-ce06faef.js → index-1081f5a6.js} +2 -2
- package/dist/{index-307c207d.js → index-11ec244f.js} +3 -3
- package/dist/{index-8fb21b4c.js → index-19064b11.js} +2 -2
- package/dist/{index-cfd2e3f9.js → index-1a9b4635.js} +2 -2
- package/dist/{index-6b37c670.js → index-1b13a249.js} +2 -2
- package/dist/{index-f6815ad6.js → index-248f28ec.js} +2 -2
- package/dist/{index-7540e09c.js → index-25ca4aec.js} +3 -3
- package/dist/{index-05a39648.js → index-286394d7.js} +2 -2
- package/dist/{index-13dd92d2.js → index-2c13e2e5.js} +2 -2
- package/dist/{index-ef8bfaaf.js → index-2edcb6b5.js} +2 -2
- package/dist/{index-45f05f0e.js → index-3359ed67.js} +1 -1
- package/dist/{index-d976435a.js → index-351fb22d.js} +2 -2
- package/dist/{index-198ff1ed.js → index-3c30e402.js} +2 -2
- package/dist/{index-39c6de05.js → index-3f088085.js} +3 -3
- package/dist/{index-8d5906d1.js → index-402ce232.js} +2 -2
- package/dist/{index-d0a75781.js → index-4228f1b6.js} +2 -2
- package/dist/{index-9a99f999.js → index-4483af53.js} +3 -3
- package/dist/{index-1f7ce739.js → index-4530e5a4.js} +2 -2
- package/dist/{index-30e84067.js → index-49b92bf8.js} +3 -3
- package/dist/{index-284d3a0b.js → index-4bd1cb2e.js} +2 -2
- package/dist/{index-4791c48f.js → index-4d860a7d.js} +2 -2
- package/dist/{index-32acbd81.js → index-50904447.js} +2 -2
- package/dist/{index-43b08d56.js → index-51f7f973.js} +2 -2
- package/dist/{index-5ed66bee.js → index-52807a3e.js} +2 -2
- package/dist/{index-01bcd525.js → index-58542054.js} +2 -2
- package/dist/{index-850436bd.js → index-60c84e99.js} +2 -2
- package/dist/{index-42a66939.js → index-60f41fb8.js} +2 -2
- package/dist/{index-1e9ae8be.js → index-665925cb.js} +3 -3
- package/dist/{index-5aea07c2.js → index-678aef80.js} +3 -3
- package/dist/{index-f671b6f0.js → index-68bd7f30.js} +1 -1
- package/dist/{index-f3cad480.js → index-6a633c82.js} +3 -3
- package/dist/{index-ceaebbe7.js → index-6c6db45f.js} +3 -3
- package/dist/{index-31c7c322.js → index-6f4f7353.js} +2 -2
- package/dist/{index-7ad32786.js → index-751bcd9c.js} +2 -2
- package/dist/{index-c4ae1aab.js → index-76634968.js} +2 -2
- package/dist/{index-80a816cd.js → index-7a3e89dc.js} +3 -3
- package/dist/{index-d6dbb71c.js → index-7a896bf2.js} +2 -2
- package/dist/{index-f653391d.js → index-7b8cd666.js} +2 -2
- package/dist/{index-c158677d.js → index-7c245a2d.js} +2 -2
- package/dist/{index-9c039997.js → index-7cd21f2f.js} +2 -2
- package/dist/{index-b881ea04.js → index-7e1ed206.js} +3 -3
- package/dist/{index-f3be2e4a.js → index-7f39b0c5.js} +2 -2
- package/dist/{index-80bbc984.js → index-7fd6655f.js} +3 -3
- package/dist/{index-3b3080fd.js → index-82f4d3f0.js} +2 -2
- package/dist/{index-c2073b90.js → index-88fa617f.js} +2 -2
- package/dist/{index-45bb4ed7.js → index-8f492222.js} +2 -2
- package/dist/{index-88c2d612.js → index-8fe78205.js} +3 -3
- package/dist/{index-5d090023.js → index-910eceb9.js} +2 -2
- package/dist/{index-6f0ddbd0.js → index-9627bfc0.js} +2 -2
- package/dist/{index-fb20421f.js → index-992dc29d.js} +2 -2
- package/dist/{index-5e1d327b.js → index-9c080243.js} +2 -2
- package/dist/{index-229d1eba.js → index-a3b4bd36.js} +2 -2
- package/dist/{index-e5400bfb.js → index-a50662c5.js} +2 -2
- package/dist/{index-a5ec6b6b.js → index-a635f590.js} +3 -3
- package/dist/{index-04d96746.js → index-a9a034ca.js} +2 -2
- package/dist/{index-d965c515.js → index-abccff8c.js} +2 -2
- package/dist/{index-a8db0cfd.js → index-ad236600.js} +2 -2
- package/dist/{index-bd7a0e32.js → index-ad3a3939.js} +2 -2
- package/dist/{index-a2ccffa7.js → index-af327f8f.js} +4 -4
- package/dist/{index-d6bcc388.js → index-af6b6b7f.js} +3 -3
- package/dist/{index-0789da8f.js → index-b65374fc.js} +2 -2
- package/dist/{index-4538df53.js → index-b9a32a80.js} +2 -2
- package/dist/{index-2d35bf3b.js → index-bd1ad7ec.js} +2 -2
- package/dist/{index-af196788.js → index-c022a205.js} +2 -2
- package/dist/{index-5b5af887.js → index-c184f57d.js} +2 -2
- package/dist/{index-98e07789.js → index-c3bdd0f8.js} +2 -2
- package/dist/{index-f37db876.js → index-c574e356.js} +2 -2
- package/dist/{index-81c7bc47.js → index-cdf954f9.js} +2 -2
- package/dist/{index-57247252.js → index-d15ea84c.js} +2 -2
- package/dist/{index-66cdb868.js → index-d25bcafa.js} +2 -2
- package/dist/{index-8f4dd7e8.js → index-daeaa3fd.js} +2 -2
- package/dist/{index-4b72c93c.js → index-db54ace4.js} +2 -2
- package/dist/{index-bab534cd.js → index-de81c907.js} +2 -2
- package/dist/{index-c1bccaf4.js → index-e46d48b8.js} +2 -2
- package/dist/{index-805c09f6.js → index-e7d752fb.js} +3141 -3162
- package/dist/{index-31f880a4.js → index-f22bb522.js} +2 -2
- package/dist/index.es.js +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as z } from "./jsx-runtime-82a9ddf6.js";
|
|
2
2
|
import * as Ce from "react";
|
|
3
|
-
import
|
|
3
|
+
import V, { useLayoutEffect as $n, useEffect as M, useRef as L, useMemo as O, useCallback as K, useState as Q, createContext as Je, memo as Fn, useReducer as Hn, useContext as Ie } from "react";
|
|
4
4
|
import { c as W, a as Me, u as Wn } from "./index-6ffbeca8.js";
|
|
5
5
|
import { unstable_batchedUpdates as rt, createPortal as Xn } from "react-dom";
|
|
6
|
-
var
|
|
6
|
+
var ne = /* @__PURE__ */ ((e) => (e.default = "default", e.desc = "desc", e.asc = "asc", e))(ne || {});
|
|
7
7
|
const Yn = W("bu-w-full bu-rounded-lg", {
|
|
8
8
|
variants: {
|
|
9
9
|
theme: {
|
|
@@ -182,26 +182,26 @@ function ze(e) {
|
|
|
182
182
|
function It(e) {
|
|
183
183
|
return "nodeType" in e;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function q(e) {
|
|
186
186
|
var t, n;
|
|
187
187
|
return e ? ze(e) ? e : It(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
|
|
188
188
|
}
|
|
189
189
|
function Et(e) {
|
|
190
190
|
const {
|
|
191
191
|
Document: t
|
|
192
|
-
} =
|
|
192
|
+
} = q(e);
|
|
193
193
|
return e instanceof t;
|
|
194
194
|
}
|
|
195
195
|
function _e(e) {
|
|
196
|
-
return ze(e) ? !1 : e instanceof
|
|
196
|
+
return ze(e) ? !1 : e instanceof q(e).HTMLElement;
|
|
197
197
|
}
|
|
198
198
|
function dn(e) {
|
|
199
|
-
return e instanceof
|
|
199
|
+
return e instanceof q(e).SVGElement;
|
|
200
200
|
}
|
|
201
201
|
function je(e) {
|
|
202
202
|
return e ? ze(e) ? e.document : It(e) ? Et(e) ? e : _e(e) || dn(e) ? e.ownerDocument : document : document : document;
|
|
203
203
|
}
|
|
204
|
-
const fe = dt ?
|
|
204
|
+
const fe = dt ? $n : M;
|
|
205
205
|
function kt(e) {
|
|
206
206
|
const t = L(e);
|
|
207
207
|
return fe(() => {
|
|
@@ -288,7 +288,7 @@ function Tt(e) {
|
|
|
288
288
|
return !1;
|
|
289
289
|
const {
|
|
290
290
|
KeyboardEvent: t
|
|
291
|
-
} =
|
|
291
|
+
} = q(e.target);
|
|
292
292
|
return t && e instanceof t;
|
|
293
293
|
}
|
|
294
294
|
function sr(e) {
|
|
@@ -296,7 +296,7 @@ function sr(e) {
|
|
|
296
296
|
return !1;
|
|
297
297
|
const {
|
|
298
298
|
TouchEvent: t
|
|
299
|
-
} =
|
|
299
|
+
} = q(e.target);
|
|
300
300
|
return t && e instanceof t;
|
|
301
301
|
}
|
|
302
302
|
function St(e) {
|
|
@@ -377,7 +377,7 @@ function cr(e) {
|
|
|
377
377
|
id: t,
|
|
378
378
|
value: n
|
|
379
379
|
} = e;
|
|
380
|
-
return
|
|
380
|
+
return V.createElement("div", {
|
|
381
381
|
id: t,
|
|
382
382
|
style: lr
|
|
383
383
|
}, n);
|
|
@@ -402,7 +402,7 @@ function ur(e) {
|
|
|
402
402
|
clipPath: "inset(100%)",
|
|
403
403
|
whiteSpace: "nowrap"
|
|
404
404
|
};
|
|
405
|
-
return
|
|
405
|
+
return V.createElement("div", {
|
|
406
406
|
id: t,
|
|
407
407
|
style: o,
|
|
408
408
|
role: "status",
|
|
@@ -411,7 +411,7 @@ function ur(e) {
|
|
|
411
411
|
}, n);
|
|
412
412
|
}
|
|
413
413
|
function dr() {
|
|
414
|
-
const [e, t] =
|
|
414
|
+
const [e, t] = Q("");
|
|
415
415
|
return {
|
|
416
416
|
announce: K((r) => {
|
|
417
417
|
r != null && t(r);
|
|
@@ -429,7 +429,7 @@ function fr(e) {
|
|
|
429
429
|
}, [e, t]);
|
|
430
430
|
}
|
|
431
431
|
function hr() {
|
|
432
|
-
const [e] =
|
|
432
|
+
const [e] = Q(() => /* @__PURE__ */ new Set()), t = K((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
433
433
|
return [K((r) => {
|
|
434
434
|
let {
|
|
435
435
|
type: o,
|
|
@@ -485,73 +485,73 @@ function vr(e) {
|
|
|
485
485
|
const {
|
|
486
486
|
announce: i,
|
|
487
487
|
announcement: s
|
|
488
|
-
} = dr(), a = Qe("DndLiveRegion"), [l, u] =
|
|
488
|
+
} = dr(), a = Qe("DndLiveRegion"), [l, u] = Q(!1);
|
|
489
489
|
if (M(() => {
|
|
490
490
|
u(!0);
|
|
491
491
|
}, []), fr(O(() => ({
|
|
492
492
|
onDragStart(d) {
|
|
493
493
|
let {
|
|
494
|
-
active:
|
|
494
|
+
active: f
|
|
495
495
|
} = d;
|
|
496
496
|
i(t.onDragStart({
|
|
497
|
-
active:
|
|
497
|
+
active: f
|
|
498
498
|
}));
|
|
499
499
|
},
|
|
500
500
|
onDragMove(d) {
|
|
501
501
|
let {
|
|
502
|
-
active:
|
|
503
|
-
over:
|
|
502
|
+
active: f,
|
|
503
|
+
over: h
|
|
504
504
|
} = d;
|
|
505
505
|
t.onDragMove && i(t.onDragMove({
|
|
506
|
-
active:
|
|
507
|
-
over:
|
|
506
|
+
active: f,
|
|
507
|
+
over: h
|
|
508
508
|
}));
|
|
509
509
|
},
|
|
510
510
|
onDragOver(d) {
|
|
511
511
|
let {
|
|
512
|
-
active:
|
|
513
|
-
over:
|
|
512
|
+
active: f,
|
|
513
|
+
over: h
|
|
514
514
|
} = d;
|
|
515
515
|
i(t.onDragOver({
|
|
516
|
-
active:
|
|
517
|
-
over:
|
|
516
|
+
active: f,
|
|
517
|
+
over: h
|
|
518
518
|
}));
|
|
519
519
|
},
|
|
520
520
|
onDragEnd(d) {
|
|
521
521
|
let {
|
|
522
|
-
active:
|
|
523
|
-
over:
|
|
522
|
+
active: f,
|
|
523
|
+
over: h
|
|
524
524
|
} = d;
|
|
525
525
|
i(t.onDragEnd({
|
|
526
|
-
active:
|
|
527
|
-
over:
|
|
526
|
+
active: f,
|
|
527
|
+
over: h
|
|
528
528
|
}));
|
|
529
529
|
},
|
|
530
530
|
onDragCancel(d) {
|
|
531
531
|
let {
|
|
532
|
-
active:
|
|
533
|
-
over:
|
|
532
|
+
active: f,
|
|
533
|
+
over: h
|
|
534
534
|
} = d;
|
|
535
535
|
i(t.onDragCancel({
|
|
536
|
-
active:
|
|
537
|
-
over:
|
|
536
|
+
active: f,
|
|
537
|
+
over: h
|
|
538
538
|
}));
|
|
539
539
|
}
|
|
540
540
|
}), [i, t])), !l)
|
|
541
541
|
return null;
|
|
542
|
-
const c =
|
|
542
|
+
const c = V.createElement(V.Fragment, null, V.createElement(cr, {
|
|
543
543
|
id: r,
|
|
544
544
|
value: o.draggable
|
|
545
|
-
}),
|
|
545
|
+
}), V.createElement(ur, {
|
|
546
546
|
id: a,
|
|
547
547
|
announcement: s
|
|
548
548
|
}));
|
|
549
549
|
return n ? Xn(c, n) : c;
|
|
550
550
|
}
|
|
551
|
-
var
|
|
551
|
+
var $;
|
|
552
552
|
(function(e) {
|
|
553
553
|
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
554
|
-
})(
|
|
554
|
+
})($ || ($ = {}));
|
|
555
555
|
function ct() {
|
|
556
556
|
}
|
|
557
557
|
function Kt(e, t) {
|
|
@@ -750,7 +750,7 @@ function Pe(e, t) {
|
|
|
750
750
|
const {
|
|
751
751
|
transform: u,
|
|
752
752
|
transformOrigin: c
|
|
753
|
-
} =
|
|
753
|
+
} = q(e).getComputedStyle(e);
|
|
754
754
|
u && (n = Tr(n, u, c));
|
|
755
755
|
}
|
|
756
756
|
const {
|
|
@@ -787,10 +787,10 @@ function Nr(e) {
|
|
|
787
787
|
};
|
|
788
788
|
}
|
|
789
789
|
function Or(e, t) {
|
|
790
|
-
return t === void 0 && (t =
|
|
790
|
+
return t === void 0 && (t = q(e).getComputedStyle(e)), t.position === "fixed";
|
|
791
791
|
}
|
|
792
792
|
function Mr(e, t) {
|
|
793
|
-
t === void 0 && (t =
|
|
793
|
+
t === void 0 && (t = q(e).getComputedStyle(e));
|
|
794
794
|
const n = /(auto|scroll|overlay)/;
|
|
795
795
|
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
796
796
|
const i = t[o];
|
|
@@ -806,7 +806,7 @@ function At(e, t) {
|
|
|
806
806
|
return n.push(o.scrollingElement), n;
|
|
807
807
|
if (!_e(o) || dn(o) || n.includes(o))
|
|
808
808
|
return n;
|
|
809
|
-
const i =
|
|
809
|
+
const i = q(e).getComputedStyle(o);
|
|
810
810
|
return o !== e && Mr(o, i) && n.push(o), Or(o, i) ? n : r(o.parentNode);
|
|
811
811
|
}
|
|
812
812
|
return e ? r(e) : n;
|
|
@@ -830,10 +830,10 @@ function Dt(e) {
|
|
|
830
830
|
y: pn(e)
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
var
|
|
833
|
+
var F;
|
|
834
834
|
(function(e) {
|
|
835
835
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
836
|
-
})(
|
|
836
|
+
})(F || (F = {}));
|
|
837
837
|
function yn(e) {
|
|
838
838
|
return !dt || !e ? !1 : e === document.scrollingElement;
|
|
839
839
|
}
|
|
@@ -876,8 +876,8 @@ function zr(e, t, n, r, o) {
|
|
|
876
876
|
isTop: u,
|
|
877
877
|
isBottom: c,
|
|
878
878
|
isLeft: d,
|
|
879
|
-
isRight:
|
|
880
|
-
} = xn(e),
|
|
879
|
+
isRight: f
|
|
880
|
+
} = xn(e), h = {
|
|
881
881
|
x: 0,
|
|
882
882
|
y: 0
|
|
883
883
|
}, v = {
|
|
@@ -887,8 +887,8 @@ function zr(e, t, n, r, o) {
|
|
|
887
887
|
height: t.height * o.y,
|
|
888
888
|
width: t.width * o.x
|
|
889
889
|
};
|
|
890
|
-
return !u && i <= t.top + g.height ? (
|
|
891
|
-
direction:
|
|
890
|
+
return !u && i <= t.top + g.height ? (h.y = F.Backward, v.y = r * Math.abs((t.top + g.height - i) / g.height)) : !c && l >= t.bottom - g.height && (h.y = F.Forward, v.y = r * Math.abs((t.bottom - g.height - l) / g.height)), !f && a >= t.right - g.width ? (h.x = F.Forward, v.x = r * Math.abs((t.right - g.width - a) / g.width)) : !d && s <= t.left + g.width && (h.x = F.Backward, v.x = r * Math.abs((t.left + g.width - s) / g.width)), {
|
|
891
|
+
direction: h,
|
|
892
892
|
speed: v
|
|
893
893
|
};
|
|
894
894
|
}
|
|
@@ -931,7 +931,7 @@ function Pr(e) {
|
|
|
931
931
|
function Br(e) {
|
|
932
932
|
return e.reduce((t, n) => t + pn(n), 0);
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function $r(e, t) {
|
|
935
935
|
if (t === void 0 && (t = Pe), !e)
|
|
936
936
|
return;
|
|
937
937
|
const {
|
|
@@ -945,7 +945,7 @@ function Fr(e, t) {
|
|
|
945
945
|
inline: "center"
|
|
946
946
|
});
|
|
947
947
|
}
|
|
948
|
-
const
|
|
948
|
+
const Fr = [["x", ["left", "right"], Pr], ["y", ["top", "bottom"], Br]];
|
|
949
949
|
class Nt {
|
|
950
950
|
constructor(t, n) {
|
|
951
951
|
this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
|
|
@@ -953,7 +953,7 @@ class Nt {
|
|
|
953
953
|
this.rect = {
|
|
954
954
|
...t
|
|
955
955
|
}, this.width = t.width, this.height = t.height;
|
|
956
|
-
for (const [i, s, a] of
|
|
956
|
+
for (const [i, s, a] of Fr)
|
|
957
957
|
for (const l of s)
|
|
958
958
|
Object.defineProperty(this, l, {
|
|
959
959
|
get: () => {
|
|
@@ -984,7 +984,7 @@ class Ye {
|
|
|
984
984
|
function Hr(e) {
|
|
985
985
|
const {
|
|
986
986
|
EventTarget: t
|
|
987
|
-
} =
|
|
987
|
+
} = q(e);
|
|
988
988
|
return e instanceof t ? e : je(e);
|
|
989
989
|
}
|
|
990
990
|
function xt(e, t) {
|
|
@@ -1044,7 +1044,7 @@ class Ot {
|
|
|
1044
1044
|
target: n
|
|
1045
1045
|
}
|
|
1046
1046
|
} = t;
|
|
1047
|
-
this.props = t, this.listeners = new Ye(je(n)), this.windowListeners = new Ye(
|
|
1047
|
+
this.props = t, this.listeners = new Ye(je(n)), this.windowListeners = new Ye(q(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
1048
1048
|
}
|
|
1049
1049
|
attach() {
|
|
1050
1050
|
this.handleStart(), this.windowListeners.add(re.Resize, this.handleCancel), this.windowListeners.add(re.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(re.Keydown, this.handleKeyDown));
|
|
@@ -1054,7 +1054,7 @@ class Ot {
|
|
|
1054
1054
|
activeNode: t,
|
|
1055
1055
|
onStart: n
|
|
1056
1056
|
} = this.props, r = t.node.current;
|
|
1057
|
-
r &&
|
|
1057
|
+
r && $r(r), n(ie);
|
|
1058
1058
|
}
|
|
1059
1059
|
handleKeyDown(t) {
|
|
1060
1060
|
if (Tt(t)) {
|
|
@@ -1090,7 +1090,7 @@ class Ot {
|
|
|
1090
1090
|
currentCoordinates: c
|
|
1091
1091
|
});
|
|
1092
1092
|
if (d) {
|
|
1093
|
-
const
|
|
1093
|
+
const f = lt(d, c), h = {
|
|
1094
1094
|
x: 0,
|
|
1095
1095
|
y: 0
|
|
1096
1096
|
}, {
|
|
@@ -1109,36 +1109,36 @@ class Ot {
|
|
|
1109
1109
|
y: Math.min(b === E.Down ? m.bottom - m.height / 2 : m.bottom, Math.max(b === E.Down ? m.top : m.top + m.height / 2, d.y))
|
|
1110
1110
|
}, D = b === E.Right && !p || b === E.Left && !y, N = b === E.Down && !R || b === E.Up && !x;
|
|
1111
1111
|
if (D && w.x !== d.x) {
|
|
1112
|
-
const C = g.scrollLeft +
|
|
1113
|
-
if (P && !
|
|
1112
|
+
const C = g.scrollLeft + f.x, P = b === E.Right && C <= S.x || b === E.Left && C >= I.x;
|
|
1113
|
+
if (P && !f.y) {
|
|
1114
1114
|
g.scrollTo({
|
|
1115
1115
|
left: C,
|
|
1116
1116
|
behavior: a
|
|
1117
1117
|
});
|
|
1118
1118
|
return;
|
|
1119
1119
|
}
|
|
1120
|
-
P ?
|
|
1121
|
-
left: -
|
|
1120
|
+
P ? h.x = g.scrollLeft - C : h.x = b === E.Right ? g.scrollLeft - S.x : g.scrollLeft - I.x, h.x && g.scrollBy({
|
|
1121
|
+
left: -h.x,
|
|
1122
1122
|
behavior: a
|
|
1123
1123
|
});
|
|
1124
1124
|
break;
|
|
1125
1125
|
} else if (N && w.y !== d.y) {
|
|
1126
|
-
const C = g.scrollTop +
|
|
1127
|
-
if (P && !
|
|
1126
|
+
const C = g.scrollTop + f.y, P = b === E.Down && C <= S.y || b === E.Up && C >= I.y;
|
|
1127
|
+
if (P && !f.x) {
|
|
1128
1128
|
g.scrollTo({
|
|
1129
1129
|
top: C,
|
|
1130
1130
|
behavior: a
|
|
1131
1131
|
});
|
|
1132
1132
|
return;
|
|
1133
1133
|
}
|
|
1134
|
-
P ?
|
|
1135
|
-
top: -
|
|
1134
|
+
P ? h.y = g.scrollTop - C : h.y = b === E.Down ? g.scrollTop - S.y : g.scrollTop - I.y, h.y && g.scrollBy({
|
|
1135
|
+
top: -h.y,
|
|
1136
1136
|
behavior: a
|
|
1137
1137
|
});
|
|
1138
1138
|
break;
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
|
-
this.handleMove(t, Le(lt(d, this.referenceCoordinates),
|
|
1141
|
+
this.handleMove(t, Le(lt(d, this.referenceCoordinates), h));
|
|
1142
1142
|
}
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
@@ -1200,7 +1200,7 @@ class Mt {
|
|
|
1200
1200
|
} = t, {
|
|
1201
1201
|
target: s
|
|
1202
1202
|
} = i;
|
|
1203
|
-
this.props = t, this.events = n, this.document = je(s), this.documentListeners = new Ye(this.document), this.listeners = new Ye(r), this.windowListeners = new Ye(
|
|
1203
|
+
this.props = t, this.events = n, this.document = je(s), this.documentListeners = new Ye(this.document), this.listeners = new Ye(r), this.windowListeners = new Ye(q(s)), this.initialCoordinates = (o = St(i)) != null ? o : ie, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
|
|
1204
1204
|
}
|
|
1205
1205
|
attach() {
|
|
1206
1206
|
const {
|
|
@@ -1428,9 +1428,9 @@ function qr(e) {
|
|
|
1428
1428
|
scrollableAncestors: u,
|
|
1429
1429
|
scrollableAncestorRects: c,
|
|
1430
1430
|
delta: d,
|
|
1431
|
-
threshold:
|
|
1431
|
+
threshold: f
|
|
1432
1432
|
} = e;
|
|
1433
|
-
const
|
|
1433
|
+
const h = Jr({
|
|
1434
1434
|
delta: d,
|
|
1435
1435
|
disabled: !i
|
|
1436
1436
|
}), [v, g] = or(), b = L({
|
|
@@ -1473,9 +1473,9 @@ function qr(e) {
|
|
|
1473
1473
|
const {
|
|
1474
1474
|
direction: D,
|
|
1475
1475
|
speed: N
|
|
1476
|
-
} = zr(I, w, p, t,
|
|
1476
|
+
} = zr(I, w, p, t, f);
|
|
1477
1477
|
for (const C of ["x", "y"])
|
|
1478
|
-
|
|
1478
|
+
h[C][D[C]] || (N[C] = 0, D[C] = 0);
|
|
1479
1479
|
if (N.x > 0 || N.y > 0) {
|
|
1480
1480
|
g(), y.current = I, v(R, s), b.current = N, x.current = D;
|
|
1481
1481
|
return;
|
|
@@ -1500,24 +1500,24 @@ function qr(e) {
|
|
|
1500
1500
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1501
1501
|
JSON.stringify(p),
|
|
1502
1502
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1503
|
-
JSON.stringify(
|
|
1503
|
+
JSON.stringify(h),
|
|
1504
1504
|
v,
|
|
1505
1505
|
u,
|
|
1506
1506
|
S,
|
|
1507
1507
|
c,
|
|
1508
1508
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1509
|
-
JSON.stringify(
|
|
1509
|
+
JSON.stringify(f)
|
|
1510
1510
|
]
|
|
1511
1511
|
);
|
|
1512
1512
|
}
|
|
1513
1513
|
const Gr = {
|
|
1514
1514
|
x: {
|
|
1515
|
-
[
|
|
1516
|
-
[
|
|
1515
|
+
[F.Backward]: !1,
|
|
1516
|
+
[F.Forward]: !1
|
|
1517
1517
|
},
|
|
1518
1518
|
y: {
|
|
1519
|
-
[
|
|
1520
|
-
[
|
|
1519
|
+
[F.Backward]: !1,
|
|
1520
|
+
[F.Forward]: !1
|
|
1521
1521
|
}
|
|
1522
1522
|
};
|
|
1523
1523
|
function Jr(e) {
|
|
@@ -1535,12 +1535,12 @@ function Jr(e) {
|
|
|
1535
1535
|
};
|
|
1536
1536
|
return {
|
|
1537
1537
|
x: {
|
|
1538
|
-
[
|
|
1539
|
-
[
|
|
1538
|
+
[F.Backward]: o.x[F.Backward] || i.x === -1,
|
|
1539
|
+
[F.Forward]: o.x[F.Forward] || i.x === 1
|
|
1540
1540
|
},
|
|
1541
1541
|
y: {
|
|
1542
|
-
[
|
|
1543
|
-
[
|
|
1542
|
+
[F.Backward]: o.y[F.Backward] || i.y === -1,
|
|
1543
|
+
[F.Forward]: o.y[F.Forward] || i.y === 1
|
|
1544
1544
|
}
|
|
1545
1545
|
};
|
|
1546
1546
|
}, [n, t, r]);
|
|
@@ -1578,13 +1578,13 @@ function Qr(e, t) {
|
|
|
1578
1578
|
dependencies: r,
|
|
1579
1579
|
config: o
|
|
1580
1580
|
} = t;
|
|
1581
|
-
const [i, s] =
|
|
1581
|
+
const [i, s] = Q(null), {
|
|
1582
1582
|
frequency: a,
|
|
1583
1583
|
measure: l,
|
|
1584
1584
|
strategy: u
|
|
1585
|
-
} = o, c = L(e), d = b(),
|
|
1586
|
-
x === void 0 && (x = []), !
|
|
1587
|
-
}, [
|
|
1585
|
+
} = o, c = L(e), d = b(), f = Ve(d), h = K(function(x) {
|
|
1586
|
+
x === void 0 && (x = []), !f.current && s((p) => p === null ? x : p.concat(x.filter((y) => !p.includes(y))));
|
|
1587
|
+
}, [f]), v = L(null), g = Ze((x) => {
|
|
1588
1588
|
if (d && !n)
|
|
1589
1589
|
return _t;
|
|
1590
1590
|
if (!x || x === _t || c.current !== e || i != null) {
|
|
@@ -1607,7 +1607,7 @@ function Qr(e, t) {
|
|
|
1607
1607
|
c.current = e;
|
|
1608
1608
|
}, [e]), M(
|
|
1609
1609
|
() => {
|
|
1610
|
-
d ||
|
|
1610
|
+
d || h();
|
|
1611
1611
|
},
|
|
1612
1612
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1613
1613
|
[n, d]
|
|
@@ -1620,14 +1620,14 @@ function Qr(e, t) {
|
|
|
1620
1620
|
), M(
|
|
1621
1621
|
() => {
|
|
1622
1622
|
d || typeof a != "number" || v.current !== null || (v.current = setTimeout(() => {
|
|
1623
|
-
|
|
1623
|
+
h(), v.current = null;
|
|
1624
1624
|
}, a));
|
|
1625
1625
|
},
|
|
1626
1626
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1627
|
-
[a, d,
|
|
1627
|
+
[a, d, h, ...r]
|
|
1628
1628
|
), {
|
|
1629
1629
|
droppableRects: g,
|
|
1630
|
-
measureDroppableContainers:
|
|
1630
|
+
measureDroppableContainers: h,
|
|
1631
1631
|
measuringScheduled: i != null
|
|
1632
1632
|
};
|
|
1633
1633
|
function b() {
|
|
@@ -1686,7 +1686,7 @@ function no(e) {
|
|
|
1686
1686
|
}
|
|
1687
1687
|
function Zt(e, t, n) {
|
|
1688
1688
|
t === void 0 && (t = no);
|
|
1689
|
-
const [r, o] =
|
|
1689
|
+
const [r, o] = Q(null);
|
|
1690
1690
|
function i() {
|
|
1691
1691
|
o((l) => {
|
|
1692
1692
|
if (!e)
|
|
@@ -1735,7 +1735,7 @@ function oo(e) {
|
|
|
1735
1735
|
}, [e]), n;
|
|
1736
1736
|
}
|
|
1737
1737
|
function io(e) {
|
|
1738
|
-
const [t, n] =
|
|
1738
|
+
const [t, n] = Q(null), r = L(e), o = K((i) => {
|
|
1739
1739
|
const s = yt(i.target);
|
|
1740
1740
|
s && n((a) => a ? (a.set(s, Dt(s)), new Map(a)) : null);
|
|
1741
1741
|
}, []);
|
|
@@ -1819,7 +1819,7 @@ function Dn(e) {
|
|
|
1819
1819
|
const tn = [];
|
|
1820
1820
|
function lo(e, t) {
|
|
1821
1821
|
t === void 0 && (t = Pe);
|
|
1822
|
-
const [n] = e, r = Dn(n ?
|
|
1822
|
+
const [n] = e, r = Dn(n ? q(n) : null), [o, i] = Q(tn);
|
|
1823
1823
|
function s() {
|
|
1824
1824
|
i(() => e.length ? e.map((l) => yn(l) ? r : new Nt(t(l), l)) : tn);
|
|
1825
1825
|
}
|
|
@@ -1842,18 +1842,18 @@ function uo(e) {
|
|
|
1842
1842
|
let {
|
|
1843
1843
|
measure: t
|
|
1844
1844
|
} = e;
|
|
1845
|
-
const [n, r] =
|
|
1845
|
+
const [n, r] = Q(null), o = K((u) => {
|
|
1846
1846
|
for (const {
|
|
1847
1847
|
target: c
|
|
1848
1848
|
} of u)
|
|
1849
1849
|
if (_e(c)) {
|
|
1850
1850
|
r((d) => {
|
|
1851
|
-
const
|
|
1851
|
+
const f = t(c);
|
|
1852
1852
|
return d ? {
|
|
1853
1853
|
...d,
|
|
1854
|
-
width:
|
|
1855
|
-
height:
|
|
1856
|
-
} :
|
|
1854
|
+
width: f.width,
|
|
1855
|
+
height: f.height
|
|
1856
|
+
} : f;
|
|
1857
1857
|
});
|
|
1858
1858
|
break;
|
|
1859
1859
|
}
|
|
@@ -1969,7 +1969,7 @@ function vo() {
|
|
|
1969
1969
|
}
|
|
1970
1970
|
function po(e, t) {
|
|
1971
1971
|
switch (t.type) {
|
|
1972
|
-
case
|
|
1972
|
+
case $.DragStart:
|
|
1973
1973
|
return {
|
|
1974
1974
|
...e,
|
|
1975
1975
|
draggable: {
|
|
@@ -1978,7 +1978,7 @@ function po(e, t) {
|
|
|
1978
1978
|
active: t.active
|
|
1979
1979
|
}
|
|
1980
1980
|
};
|
|
1981
|
-
case
|
|
1981
|
+
case $.DragMove:
|
|
1982
1982
|
return e.draggable.active == null ? e : {
|
|
1983
1983
|
...e,
|
|
1984
1984
|
draggable: {
|
|
@@ -1989,8 +1989,8 @@ function po(e, t) {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
1991
|
};
|
|
1992
|
-
case
|
|
1993
|
-
case
|
|
1992
|
+
case $.DragEnd:
|
|
1993
|
+
case $.DragCancel:
|
|
1994
1994
|
return {
|
|
1995
1995
|
...e,
|
|
1996
1996
|
draggable: {
|
|
@@ -2006,7 +2006,7 @@ function po(e, t) {
|
|
|
2006
2006
|
}
|
|
2007
2007
|
}
|
|
2008
2008
|
};
|
|
2009
|
-
case
|
|
2009
|
+
case $.RegisterDroppable: {
|
|
2010
2010
|
const {
|
|
2011
2011
|
element: n
|
|
2012
2012
|
} = t, {
|
|
@@ -2020,7 +2020,7 @@ function po(e, t) {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
};
|
|
2022
2022
|
}
|
|
2023
|
-
case
|
|
2023
|
+
case $.SetDroppableDisabled: {
|
|
2024
2024
|
const {
|
|
2025
2025
|
id: n,
|
|
2026
2026
|
key: r,
|
|
@@ -2040,7 +2040,7 @@ function po(e, t) {
|
|
|
2040
2040
|
}
|
|
2041
2041
|
};
|
|
2042
2042
|
}
|
|
2043
|
-
case
|
|
2043
|
+
case $.UnregisterDroppable: {
|
|
2044
2044
|
const {
|
|
2045
2045
|
id: n,
|
|
2046
2046
|
key: r
|
|
@@ -2152,8 +2152,8 @@ function mo(e) {
|
|
|
2152
2152
|
return;
|
|
2153
2153
|
const c = n(u), d = gn(c, r);
|
|
2154
2154
|
if (s || (d.x = 0), a || (d.y = 0), i.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
|
|
2155
|
-
const
|
|
2156
|
-
|
|
2155
|
+
const f = bn(u);
|
|
2156
|
+
f && f.scrollBy({
|
|
2157
2157
|
top: d.y,
|
|
2158
2158
|
left: d.x
|
|
2159
2159
|
});
|
|
@@ -2169,7 +2169,7 @@ var De;
|
|
|
2169
2169
|
(function(e) {
|
|
2170
2170
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
2171
2171
|
})(De || (De = {}));
|
|
2172
|
-
const So = /* @__PURE__ */
|
|
2172
|
+
const So = /* @__PURE__ */ Fn(function(t) {
|
|
2173
2173
|
var n, r, o, i;
|
|
2174
2174
|
let {
|
|
2175
2175
|
id: s,
|
|
@@ -2178,11 +2178,11 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2178
2178
|
children: u,
|
|
2179
2179
|
sensors: c = fo,
|
|
2180
2180
|
collisionDetection: d = Cr,
|
|
2181
|
-
measuring:
|
|
2182
|
-
modifiers:
|
|
2181
|
+
measuring: f,
|
|
2182
|
+
modifiers: h,
|
|
2183
2183
|
...v
|
|
2184
2184
|
} = t;
|
|
2185
|
-
const g = Hn(po, void 0, vo), [b, x] = g, [p, y] = hr(), [R, S] =
|
|
2185
|
+
const g = Hn(po, void 0, vo), [b, x] = g, [p, y] = hr(), [R, S] = Q(De.Uninitialized), I = R === De.Initialized, {
|
|
2186
2186
|
draggable: {
|
|
2187
2187
|
active: m,
|
|
2188
2188
|
nodes: w,
|
|
@@ -2202,7 +2202,7 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2202
2202
|
data: (Y = C == null ? void 0 : C.data) != null ? Y : ho,
|
|
2203
2203
|
rect: P
|
|
2204
2204
|
} : null;
|
|
2205
|
-
}, [m, C]), T = L(null), [
|
|
2205
|
+
}, [m, C]), T = L(null), [G, U] = Q(null), [k, se] = Q(null), B = Ve(v, Object.values(v)), ae = Qe("DndDescribedBy", s), le = O(() => N.getEnabled(), [N]), X = wo(f), {
|
|
2206
2206
|
droppableRects: he,
|
|
2207
2207
|
measureDroppableContainers: Re,
|
|
2208
2208
|
measuringScheduled: Be
|
|
@@ -2210,17 +2210,17 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2210
2210
|
dragging: I,
|
|
2211
2211
|
dependencies: [D.x, D.y],
|
|
2212
2212
|
config: X.droppable
|
|
2213
|
-
}),
|
|
2213
|
+
}), ee = _r(w, m), et = O(() => k ? St(k) : null, [k]), pe = Bn(), ge = eo(ee, X.draggable.measure);
|
|
2214
2214
|
mo({
|
|
2215
2215
|
activeNode: m != null ? w.get(m) : null,
|
|
2216
2216
|
config: pe.layoutShiftCompensation,
|
|
2217
2217
|
initialRect: ge,
|
|
2218
2218
|
measure: X.draggable.measure
|
|
2219
2219
|
});
|
|
2220
|
-
const A = Zt(
|
|
2220
|
+
const A = Zt(ee, X.draggable.measure, ge), $e = Zt(ee ? ee.parentElement : null), ce = L({
|
|
2221
2221
|
activatorEvent: null,
|
|
2222
2222
|
active: null,
|
|
2223
|
-
activeNode:
|
|
2223
|
+
activeNode: ee,
|
|
2224
2224
|
collisionRect: null,
|
|
2225
2225
|
collisions: null,
|
|
2226
2226
|
droppableRects: he,
|
|
@@ -2233,7 +2233,7 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2233
2233
|
scrollAdjustedTranslate: null
|
|
2234
2234
|
}), Ee = N.getNodeFor((n = ce.current.over) == null ? void 0 : n.id), be = uo({
|
|
2235
2235
|
measure: X.dragOverlay.measure
|
|
2236
|
-
}), ke = (r = be.nodeRef.current) != null ? r :
|
|
2236
|
+
}), ke = (r = be.nodeRef.current) != null ? r : ee, Te = I ? (o = be.rect) != null ? o : A : null, jt = !!(be.nodeRef.current && be.rect), Pt = ro(jt ? null : A), gt = Dn(ke ? q(ke) : null), ye = oo(I ? Ee ?? ee : null), tt = lo(ye), nt = xo(h, {
|
|
2237
2237
|
transform: {
|
|
2238
2238
|
x: D.x - Pt.x,
|
|
2239
2239
|
y: D.y - Pt.y,
|
|
@@ -2243,34 +2243,34 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2243
2243
|
activatorEvent: k,
|
|
2244
2244
|
active: j,
|
|
2245
2245
|
activeNodeRect: A,
|
|
2246
|
-
containerNodeRect:
|
|
2246
|
+
containerNodeRect: $e,
|
|
2247
2247
|
draggingNodeRect: Te,
|
|
2248
2248
|
over: ce.current.over,
|
|
2249
2249
|
overlayNodeRect: be.rect,
|
|
2250
2250
|
scrollableAncestors: ye,
|
|
2251
2251
|
scrollableAncestorRects: tt,
|
|
2252
2252
|
windowRect: gt
|
|
2253
|
-
}), Bt = et ? Le(et, D) : null,
|
|
2253
|
+
}), Bt = et ? Le(et, D) : null, $t = io(ye), Nn = en($t), On = en($t, [A]), Ae = Le(nt, Nn), Ne = Te ? Er(Te, nt) : null, Fe = j && Ne ? d({
|
|
2254
2254
|
active: j,
|
|
2255
2255
|
collisionRect: Ne,
|
|
2256
2256
|
droppableRects: he,
|
|
2257
2257
|
droppableContainers: le,
|
|
2258
2258
|
pointerCoordinates: Bt
|
|
2259
|
-
}) : null,
|
|
2260
|
-
(Y,
|
|
2259
|
+
}) : null, Ft = mr(Fe, "id"), [xe, Ht] = Q(null), Mn = jt ? nt : Le(nt, On), Ln = Rr(Mn, (i = xe == null ? void 0 : xe.rect) != null ? i : null, A), bt = L(null), Wt = K(
|
|
2260
|
+
(Y, J) => {
|
|
2261
2261
|
let {
|
|
2262
|
-
sensor:
|
|
2262
|
+
sensor: _,
|
|
2263
2263
|
options: we
|
|
2264
|
-
} =
|
|
2264
|
+
} = J;
|
|
2265
2265
|
if (T.current == null)
|
|
2266
2266
|
return;
|
|
2267
|
-
const
|
|
2268
|
-
if (!
|
|
2267
|
+
const te = w.get(T.current);
|
|
2268
|
+
if (!te)
|
|
2269
2269
|
return;
|
|
2270
|
-
const
|
|
2270
|
+
const Z = Y.nativeEvent, ue = new _({
|
|
2271
2271
|
active: T.current,
|
|
2272
|
-
activeNode:
|
|
2273
|
-
event:
|
|
2272
|
+
activeNode: te,
|
|
2273
|
+
event: Z,
|
|
2274
2274
|
options: we,
|
|
2275
2275
|
// Sensors need to be instantiated with refs for arguments that change over time
|
|
2276
2276
|
// otherwise they are frozen in time with the stale arguments
|
|
@@ -2314,7 +2314,7 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2314
2314
|
const {
|
|
2315
2315
|
onDragStart: ve
|
|
2316
2316
|
} = B.current, He = {
|
|
2317
|
-
activatorEvent:
|
|
2317
|
+
activatorEvent: Z,
|
|
2318
2318
|
active: {
|
|
2319
2319
|
id: me,
|
|
2320
2320
|
data: de.data,
|
|
@@ -2323,23 +2323,23 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2323
2323
|
};
|
|
2324
2324
|
rt(() => {
|
|
2325
2325
|
ve == null || ve(He), S(De.Initializing), x({
|
|
2326
|
-
type:
|
|
2326
|
+
type: $.DragStart,
|
|
2327
2327
|
initialCoordinates: H,
|
|
2328
2328
|
active: me
|
|
2329
2329
|
}), p({
|
|
2330
2330
|
type: "onDragStart",
|
|
2331
2331
|
event: He
|
|
2332
|
-
}), U(bt.current), se(
|
|
2332
|
+
}), U(bt.current), se(Z);
|
|
2333
2333
|
});
|
|
2334
2334
|
},
|
|
2335
2335
|
onMove(H) {
|
|
2336
2336
|
x({
|
|
2337
|
-
type:
|
|
2337
|
+
type: $.DragMove,
|
|
2338
2338
|
coordinates: H
|
|
2339
2339
|
});
|
|
2340
2340
|
},
|
|
2341
|
-
onEnd: Oe(
|
|
2342
|
-
onCancel: Oe(
|
|
2341
|
+
onEnd: Oe($.DragEnd),
|
|
2342
|
+
onCancel: Oe($.DragCancel)
|
|
2343
2343
|
});
|
|
2344
2344
|
bt.current = ue;
|
|
2345
2345
|
function Oe(H) {
|
|
@@ -2356,18 +2356,18 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2356
2356
|
cancelDrop: Xe
|
|
2357
2357
|
} = B.current;
|
|
2358
2358
|
Se = {
|
|
2359
|
-
activatorEvent:
|
|
2359
|
+
activatorEvent: Z,
|
|
2360
2360
|
active: de,
|
|
2361
2361
|
collisions: ve,
|
|
2362
2362
|
delta: We,
|
|
2363
2363
|
over: He
|
|
2364
|
-
}, H ===
|
|
2364
|
+
}, H === $.DragEnd && typeof Xe == "function" && await Promise.resolve(Xe(Se)) && (H = $.DragCancel);
|
|
2365
2365
|
}
|
|
2366
2366
|
T.current = null, rt(() => {
|
|
2367
2367
|
x({
|
|
2368
2368
|
type: H
|
|
2369
2369
|
}), S(De.Uninitialized), Ht(null), U(null), se(null), bt.current = null;
|
|
2370
|
-
const Xe = H ===
|
|
2370
|
+
const Xe = H === $.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2371
2371
|
if (Se) {
|
|
2372
2372
|
const vt = B.current[Xe];
|
|
2373
2373
|
vt == null || vt(Se), p({
|
|
@@ -2381,21 +2381,21 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2381
2381
|
},
|
|
2382
2382
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2383
2383
|
[w]
|
|
2384
|
-
), zn = K((Y,
|
|
2385
|
-
const
|
|
2384
|
+
), zn = K((Y, J) => (_, we) => {
|
|
2385
|
+
const te = _.nativeEvent, Z = w.get(we);
|
|
2386
2386
|
if (
|
|
2387
2387
|
// Another sensor is already instantiating
|
|
2388
2388
|
T.current !== null || // No active draggable
|
|
2389
|
-
!
|
|
2390
|
-
|
|
2389
|
+
!Z || // Event has already been captured
|
|
2390
|
+
te.dndKit || te.defaultPrevented
|
|
2391
2391
|
)
|
|
2392
2392
|
return;
|
|
2393
2393
|
const ue = {
|
|
2394
|
-
active:
|
|
2394
|
+
active: Z
|
|
2395
2395
|
};
|
|
2396
|
-
Y(
|
|
2397
|
-
capturedBy:
|
|
2398
|
-
}, T.current = we, Wt(
|
|
2396
|
+
Y(_, J.options, ue) === !0 && (te.dndKit = {
|
|
2397
|
+
capturedBy: J.sensor
|
|
2398
|
+
}, T.current = we, Wt(_, J));
|
|
2399
2399
|
}, [w, Wt]), Xt = Zr(c, zn);
|
|
2400
2400
|
so(c), fe(() => {
|
|
2401
2401
|
A && R === De.Initializing && S(De.Initialized);
|
|
@@ -2404,27 +2404,27 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2404
2404
|
const {
|
|
2405
2405
|
onDragMove: Y
|
|
2406
2406
|
} = B.current, {
|
|
2407
|
-
active:
|
|
2408
|
-
activatorEvent:
|
|
2407
|
+
active: J,
|
|
2408
|
+
activatorEvent: _,
|
|
2409
2409
|
collisions: we,
|
|
2410
|
-
over:
|
|
2410
|
+
over: te
|
|
2411
2411
|
} = ce.current;
|
|
2412
|
-
if (!
|
|
2412
|
+
if (!J || !_)
|
|
2413
2413
|
return;
|
|
2414
|
-
const
|
|
2415
|
-
active:
|
|
2416
|
-
activatorEvent:
|
|
2414
|
+
const Z = {
|
|
2415
|
+
active: J,
|
|
2416
|
+
activatorEvent: _,
|
|
2417
2417
|
collisions: we,
|
|
2418
2418
|
delta: {
|
|
2419
2419
|
x: Ae.x,
|
|
2420
2420
|
y: Ae.y
|
|
2421
2421
|
},
|
|
2422
|
-
over:
|
|
2422
|
+
over: te
|
|
2423
2423
|
};
|
|
2424
2424
|
rt(() => {
|
|
2425
|
-
Y == null || Y(
|
|
2425
|
+
Y == null || Y(Z), p({
|
|
2426
2426
|
type: "onDragMove",
|
|
2427
|
-
event:
|
|
2427
|
+
event: Z
|
|
2428
2428
|
});
|
|
2429
2429
|
});
|
|
2430
2430
|
},
|
|
@@ -2434,46 +2434,46 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2434
2434
|
() => {
|
|
2435
2435
|
const {
|
|
2436
2436
|
active: Y,
|
|
2437
|
-
activatorEvent:
|
|
2438
|
-
collisions:
|
|
2437
|
+
activatorEvent: J,
|
|
2438
|
+
collisions: _,
|
|
2439
2439
|
droppableContainers: we,
|
|
2440
|
-
scrollAdjustedTranslate:
|
|
2440
|
+
scrollAdjustedTranslate: te
|
|
2441
2441
|
} = ce.current;
|
|
2442
|
-
if (!Y || T.current == null || !
|
|
2442
|
+
if (!Y || T.current == null || !J || !te)
|
|
2443
2443
|
return;
|
|
2444
2444
|
const {
|
|
2445
|
-
onDragOver:
|
|
2446
|
-
} = B.current, ue = we.get(
|
|
2445
|
+
onDragOver: Z
|
|
2446
|
+
} = B.current, ue = we.get(Ft), Oe = ue && ue.rect.current ? {
|
|
2447
2447
|
id: ue.id,
|
|
2448
2448
|
rect: ue.rect.current,
|
|
2449
2449
|
data: ue.data,
|
|
2450
2450
|
disabled: ue.disabled
|
|
2451
2451
|
} : null, H = {
|
|
2452
2452
|
active: Y,
|
|
2453
|
-
activatorEvent:
|
|
2454
|
-
collisions:
|
|
2453
|
+
activatorEvent: J,
|
|
2454
|
+
collisions: _,
|
|
2455
2455
|
delta: {
|
|
2456
|
-
x:
|
|
2457
|
-
y:
|
|
2456
|
+
x: te.x,
|
|
2457
|
+
y: te.y
|
|
2458
2458
|
},
|
|
2459
2459
|
over: Oe
|
|
2460
2460
|
};
|
|
2461
2461
|
rt(() => {
|
|
2462
|
-
Ht(Oe),
|
|
2462
|
+
Ht(Oe), Z == null || Z(H), p({
|
|
2463
2463
|
type: "onDragOver",
|
|
2464
2464
|
event: H
|
|
2465
2465
|
});
|
|
2466
2466
|
});
|
|
2467
2467
|
},
|
|
2468
2468
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2469
|
-
[
|
|
2469
|
+
[Ft]
|
|
2470
2470
|
), fe(() => {
|
|
2471
2471
|
ce.current = {
|
|
2472
2472
|
activatorEvent: k,
|
|
2473
2473
|
active: j,
|
|
2474
|
-
activeNode:
|
|
2474
|
+
activeNode: ee,
|
|
2475
2475
|
collisionRect: Ne,
|
|
2476
|
-
collisions:
|
|
2476
|
+
collisions: Fe,
|
|
2477
2477
|
droppableRects: he,
|
|
2478
2478
|
draggableNodes: w,
|
|
2479
2479
|
draggingNode: ke,
|
|
@@ -2486,7 +2486,7 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2486
2486
|
initial: Te,
|
|
2487
2487
|
translated: Ne
|
|
2488
2488
|
};
|
|
2489
|
-
}, [j,
|
|
2489
|
+
}, [j, ee, Fe, Ne, w, ke, Te, he, N, xe, ye, Ae]), qr({
|
|
2490
2490
|
...pe,
|
|
2491
2491
|
delta: D,
|
|
2492
2492
|
draggingRect: Ne,
|
|
@@ -2496,11 +2496,11 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2496
2496
|
});
|
|
2497
2497
|
const jn = O(() => ({
|
|
2498
2498
|
active: j,
|
|
2499
|
-
activeNode:
|
|
2499
|
+
activeNode: ee,
|
|
2500
2500
|
activeNodeRect: A,
|
|
2501
2501
|
activatorEvent: k,
|
|
2502
|
-
collisions:
|
|
2503
|
-
containerNodeRect:
|
|
2502
|
+
collisions: Fe,
|
|
2503
|
+
containerNodeRect: $e,
|
|
2504
2504
|
dragOverlay: be,
|
|
2505
2505
|
draggableNodes: w,
|
|
2506
2506
|
droppableContainers: N,
|
|
@@ -2512,7 +2512,7 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2512
2512
|
measuringConfiguration: X,
|
|
2513
2513
|
measuringScheduled: Be,
|
|
2514
2514
|
windowRect: gt
|
|
2515
|
-
}), [j,
|
|
2515
|
+
}), [j, ee, A, k, Fe, $e, be, w, N, he, xe, Re, ye, tt, X, Be, gt]), Pn = O(() => ({
|
|
2516
2516
|
activatorEvent: k,
|
|
2517
2517
|
activators: Xt,
|
|
2518
2518
|
active: j,
|
|
@@ -2525,27 +2525,27 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2525
2525
|
over: xe,
|
|
2526
2526
|
measureDroppableContainers: Re
|
|
2527
2527
|
}), [k, Xt, j, A, x, ae, w, xe, Re]);
|
|
2528
|
-
return
|
|
2528
|
+
return V.createElement(hn.Provider, {
|
|
2529
2529
|
value: y
|
|
2530
|
-
},
|
|
2530
|
+
}, V.createElement(ht.Provider, {
|
|
2531
2531
|
value: Pn
|
|
2532
|
-
},
|
|
2532
|
+
}, V.createElement(Cn.Provider, {
|
|
2533
2533
|
value: jn
|
|
2534
|
-
},
|
|
2534
|
+
}, V.createElement(Rn.Provider, {
|
|
2535
2535
|
value: Ln
|
|
2536
|
-
}, u)),
|
|
2536
|
+
}, u)), V.createElement(yo, {
|
|
2537
2537
|
disabled: (a == null ? void 0 : a.restoreFocus) === !1
|
|
2538
|
-
})),
|
|
2538
|
+
})), V.createElement(vr, {
|
|
2539
2539
|
...a,
|
|
2540
2540
|
hiddenTextDescribedById: ae
|
|
2541
2541
|
}));
|
|
2542
2542
|
function Bn() {
|
|
2543
|
-
const Y = (
|
|
2543
|
+
const Y = (G == null ? void 0 : G.autoScrollEnabled) === !1, J = typeof l == "object" ? l.enabled === !1 : l === !1, _ = I && !Y && !J;
|
|
2544
2544
|
return typeof l == "object" ? {
|
|
2545
2545
|
...l,
|
|
2546
|
-
enabled:
|
|
2546
|
+
enabled: _
|
|
2547
2547
|
} : {
|
|
2548
|
-
enabled:
|
|
2548
|
+
enabled: _
|
|
2549
2549
|
};
|
|
2550
2550
|
}
|
|
2551
2551
|
}), Do = /* @__PURE__ */ Je(null), nn = "button", Co = "Draggable";
|
|
@@ -2563,9 +2563,9 @@ function Ro(e) {
|
|
|
2563
2563
|
activeNodeRect: u,
|
|
2564
2564
|
ariaDescribedById: c,
|
|
2565
2565
|
draggableNodes: d,
|
|
2566
|
-
over:
|
|
2566
|
+
over: f
|
|
2567
2567
|
} = Ie(ht), {
|
|
2568
|
-
role:
|
|
2568
|
+
role: h = nn,
|
|
2569
2569
|
roleDescription: v = "draggable",
|
|
2570
2570
|
tabIndex: g = 0
|
|
2571
2571
|
} = o ?? {}, b = (l == null ? void 0 : l.id) === t, x = Ie(b ? Rn : Do), [p, y] = at(), [R, S] = at(), I = ao(s, t), m = Ve(n);
|
|
@@ -2584,13 +2584,13 @@ function Ro(e) {
|
|
|
2584
2584
|
[d, t]
|
|
2585
2585
|
);
|
|
2586
2586
|
const w = O(() => ({
|
|
2587
|
-
role:
|
|
2587
|
+
role: h,
|
|
2588
2588
|
tabIndex: g,
|
|
2589
2589
|
"aria-disabled": r,
|
|
2590
|
-
"aria-pressed": b &&
|
|
2590
|
+
"aria-pressed": b && h === nn ? !0 : void 0,
|
|
2591
2591
|
"aria-roledescription": v,
|
|
2592
2592
|
"aria-describedby": c.draggable
|
|
2593
|
-
}), [r,
|
|
2593
|
+
}), [r, h, g, b, v, c.draggable]);
|
|
2594
2594
|
return {
|
|
2595
2595
|
active: l,
|
|
2596
2596
|
activatorEvent: a,
|
|
@@ -2599,7 +2599,7 @@ function Ro(e) {
|
|
|
2599
2599
|
isDragging: b,
|
|
2600
2600
|
listeners: r ? void 0 : I,
|
|
2601
2601
|
node: p,
|
|
2602
|
-
over:
|
|
2602
|
+
over: f,
|
|
2603
2603
|
setNodeRef: y,
|
|
2604
2604
|
setActivatorNodeRef: S,
|
|
2605
2605
|
transform: x
|
|
@@ -2625,7 +2625,7 @@ function To(e) {
|
|
|
2625
2625
|
measureDroppableContainers: u
|
|
2626
2626
|
} = Ie(ht), c = L({
|
|
2627
2627
|
disabled: n
|
|
2628
|
-
}), d = L(!1),
|
|
2628
|
+
}), d = L(!1), f = L(null), h = L(null), {
|
|
2629
2629
|
disabled: v,
|
|
2630
2630
|
updateMeasurementsFor: g,
|
|
2631
2631
|
timeout: b
|
|
@@ -2638,8 +2638,8 @@ function To(e) {
|
|
|
2638
2638
|
d.current = !0;
|
|
2639
2639
|
return;
|
|
2640
2640
|
}
|
|
2641
|
-
|
|
2642
|
-
u(Array.isArray(x.current) ? x.current : [x.current]),
|
|
2641
|
+
h.current != null && clearTimeout(h.current), h.current = setTimeout(() => {
|
|
2642
|
+
u(Array.isArray(x.current) ? x.current : [x.current]), h.current = null;
|
|
2643
2643
|
}, b);
|
|
2644
2644
|
},
|
|
2645
2645
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -2654,17 +2654,17 @@ function To(e) {
|
|
|
2654
2654
|
!y || !S.current || (y.disconnect(), d.current = !1, y.observe(S.current));
|
|
2655
2655
|
}, [S, y]), M(
|
|
2656
2656
|
() => (a({
|
|
2657
|
-
type:
|
|
2657
|
+
type: $.RegisterDroppable,
|
|
2658
2658
|
element: {
|
|
2659
2659
|
id: r,
|
|
2660
2660
|
key: i,
|
|
2661
2661
|
disabled: n,
|
|
2662
2662
|
node: S,
|
|
2663
|
-
rect:
|
|
2663
|
+
rect: f,
|
|
2664
2664
|
data: m
|
|
2665
2665
|
}
|
|
2666
2666
|
}), () => a({
|
|
2667
|
-
type:
|
|
2667
|
+
type: $.UnregisterDroppable,
|
|
2668
2668
|
key: i,
|
|
2669
2669
|
id: r
|
|
2670
2670
|
})),
|
|
@@ -2672,14 +2672,14 @@ function To(e) {
|
|
|
2672
2672
|
[r]
|
|
2673
2673
|
), M(() => {
|
|
2674
2674
|
n !== c.current.disabled && (a({
|
|
2675
|
-
type:
|
|
2675
|
+
type: $.SetDroppableDisabled,
|
|
2676
2676
|
id: r,
|
|
2677
2677
|
key: i,
|
|
2678
2678
|
disabled: n
|
|
2679
2679
|
}), c.current.disabled = n);
|
|
2680
2680
|
}, [r, i, n, a]), {
|
|
2681
2681
|
active: s,
|
|
2682
|
-
rect:
|
|
2682
|
+
rect: f,
|
|
2683
2683
|
isOver: (l == null ? void 0 : l.id) === r,
|
|
2684
2684
|
node: S,
|
|
2685
2685
|
over: l,
|
|
@@ -2771,7 +2771,7 @@ const In = (e) => {
|
|
|
2771
2771
|
scaleX: a.width / s.width,
|
|
2772
2772
|
scaleY: a.height / s.height
|
|
2773
2773
|
};
|
|
2774
|
-
}, En = "Sortable", kn = /* @__PURE__ */
|
|
2774
|
+
}, En = "Sortable", kn = /* @__PURE__ */ V.createContext({
|
|
2775
2775
|
activeIndex: -1,
|
|
2776
2776
|
containerId: En,
|
|
2777
2777
|
disableTransforms: !1,
|
|
@@ -2799,28 +2799,28 @@ function zo(e) {
|
|
|
2799
2799
|
droppableRects: l,
|
|
2800
2800
|
over: u,
|
|
2801
2801
|
measureDroppableContainers: c
|
|
2802
|
-
} = Io(), d = Qe(En, n),
|
|
2802
|
+
} = Io(), d = Qe(En, n), f = a.rect !== null, h = O(() => r.map((I) => typeof I == "object" && "id" in I ? I.id : I), [r]), v = s != null, g = s ? h.indexOf(s.id) : -1, b = u ? h.indexOf(u.id) : -1, x = L(h), p = !No(h, x.current), y = b !== -1 && g === -1 || p, R = Oo(i);
|
|
2803
2803
|
fe(() => {
|
|
2804
|
-
p && v && c(
|
|
2805
|
-
}, [p,
|
|
2806
|
-
x.current =
|
|
2807
|
-
}, [
|
|
2804
|
+
p && v && c(h);
|
|
2805
|
+
}, [p, h, v, c]), M(() => {
|
|
2806
|
+
x.current = h;
|
|
2807
|
+
}, [h]);
|
|
2808
2808
|
const S = O(
|
|
2809
2809
|
() => ({
|
|
2810
2810
|
activeIndex: g,
|
|
2811
2811
|
containerId: d,
|
|
2812
2812
|
disabled: R,
|
|
2813
2813
|
disableTransforms: y,
|
|
2814
|
-
items:
|
|
2814
|
+
items: h,
|
|
2815
2815
|
overIndex: b,
|
|
2816
|
-
useDragOverlay:
|
|
2817
|
-
sortedRects: Ao(
|
|
2816
|
+
useDragOverlay: f,
|
|
2817
|
+
sortedRects: Ao(h, l),
|
|
2818
2818
|
strategy: o
|
|
2819
2819
|
}),
|
|
2820
2820
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2821
|
-
[g, d, R.draggable, R.droppable, y,
|
|
2821
|
+
[g, d, R.draggable, R.droppable, y, h, b, l, f, o]
|
|
2822
2822
|
);
|
|
2823
|
-
return
|
|
2823
|
+
return V.createElement(kn.Provider, {
|
|
2824
2824
|
value: S
|
|
2825
2825
|
}, t);
|
|
2826
2826
|
}
|
|
@@ -2852,17 +2852,17 @@ const jo = (e) => {
|
|
|
2852
2852
|
property: An,
|
|
2853
2853
|
duration: 0,
|
|
2854
2854
|
easing: "linear"
|
|
2855
|
-
}),
|
|
2855
|
+
}), $o = {
|
|
2856
2856
|
roleDescription: "sortable"
|
|
2857
2857
|
};
|
|
2858
|
-
function
|
|
2858
|
+
function Fo(e) {
|
|
2859
2859
|
let {
|
|
2860
2860
|
disabled: t,
|
|
2861
2861
|
index: n,
|
|
2862
2862
|
node: r,
|
|
2863
2863
|
rect: o
|
|
2864
2864
|
} = e;
|
|
2865
|
-
const [i, s] =
|
|
2865
|
+
const [i, s] = Q(null), a = L(n);
|
|
2866
2866
|
return fe(() => {
|
|
2867
2867
|
if (!t && n !== a.current && r.current) {
|
|
2868
2868
|
const l = o.current;
|
|
@@ -2898,14 +2898,14 @@ function Ho(e) {
|
|
|
2898
2898
|
const {
|
|
2899
2899
|
items: c,
|
|
2900
2900
|
containerId: d,
|
|
2901
|
-
activeIndex:
|
|
2902
|
-
disabled:
|
|
2901
|
+
activeIndex: f,
|
|
2902
|
+
disabled: h,
|
|
2903
2903
|
disableTransforms: v,
|
|
2904
2904
|
sortedRects: g,
|
|
2905
2905
|
overIndex: b,
|
|
2906
2906
|
useDragOverlay: x,
|
|
2907
2907
|
strategy: p
|
|
2908
|
-
} = Ie(kn), y = Wo(r,
|
|
2908
|
+
} = Ie(kn), y = Wo(r, h), R = c.indexOf(s), S = O(() => ({
|
|
2909
2909
|
sortable: {
|
|
2910
2910
|
containerId: d,
|
|
2911
2911
|
index: R,
|
|
@@ -2930,7 +2930,7 @@ function Ho(e) {
|
|
|
2930
2930
|
activatorEvent: P,
|
|
2931
2931
|
activeNodeRect: j,
|
|
2932
2932
|
attributes: T,
|
|
2933
|
-
setNodeRef:
|
|
2933
|
+
setNodeRef: G,
|
|
2934
2934
|
listeners: U,
|
|
2935
2935
|
isDragging: k,
|
|
2936
2936
|
over: se,
|
|
@@ -2940,27 +2940,27 @@ function Ho(e) {
|
|
|
2940
2940
|
id: s,
|
|
2941
2941
|
data: S,
|
|
2942
2942
|
attributes: {
|
|
2943
|
-
|
|
2943
|
+
...$o,
|
|
2944
2944
|
...n
|
|
2945
2945
|
},
|
|
2946
2946
|
disabled: y.draggable
|
|
2947
|
-
}), le = rr(N,
|
|
2947
|
+
}), le = rr(N, G), X = !!C, he = X && !v && ot(f) && ot(b), Re = !x && k, Be = Re && he ? ae : null, et = he ? Be ?? (a ?? p)({
|
|
2948
2948
|
rects: g,
|
|
2949
2949
|
activeNodeRect: j,
|
|
2950
|
-
activeIndex:
|
|
2950
|
+
activeIndex: f,
|
|
2951
2951
|
overIndex: b,
|
|
2952
2952
|
index: R
|
|
2953
|
-
}) : null, pe = ot(
|
|
2953
|
+
}) : null, pe = ot(f) && ot(b) ? i({
|
|
2954
2954
|
id: s,
|
|
2955
2955
|
items: c,
|
|
2956
|
-
activeIndex:
|
|
2956
|
+
activeIndex: f,
|
|
2957
2957
|
overIndex: b
|
|
2958
2958
|
}) : R, ge = C == null ? void 0 : C.id, A = L({
|
|
2959
2959
|
activeId: ge,
|
|
2960
2960
|
items: c,
|
|
2961
2961
|
newIndex: pe,
|
|
2962
2962
|
containerId: d
|
|
2963
|
-
}),
|
|
2963
|
+
}), $e = c !== A.current.items, ce = t({
|
|
2964
2964
|
active: C,
|
|
2965
2965
|
containerId: d,
|
|
2966
2966
|
isDragging: k,
|
|
@@ -2973,7 +2973,7 @@ function Ho(e) {
|
|
|
2973
2973
|
previousContainerId: A.current.containerId,
|
|
2974
2974
|
transition: u,
|
|
2975
2975
|
wasDragging: A.current.activeId != null
|
|
2976
|
-
}), Ee =
|
|
2976
|
+
}), Ee = Fo({
|
|
2977
2977
|
disabled: !ce,
|
|
2978
2978
|
index: R,
|
|
2979
2979
|
node: w,
|
|
@@ -2994,7 +2994,7 @@ function Ho(e) {
|
|
|
2994
2994
|
return () => clearTimeout(ke);
|
|
2995
2995
|
}, [ge]), {
|
|
2996
2996
|
active: C,
|
|
2997
|
-
activeIndex:
|
|
2997
|
+
activeIndex: f,
|
|
2998
2998
|
attributes: T,
|
|
2999
2999
|
data: S,
|
|
3000
3000
|
rect: m,
|
|
@@ -3011,7 +3011,7 @@ function Ho(e) {
|
|
|
3011
3011
|
setNodeRef: le,
|
|
3012
3012
|
setActivatorNodeRef: B,
|
|
3013
3013
|
setDroppableNodeRef: N,
|
|
3014
|
-
setDraggableNodeRef:
|
|
3014
|
+
setDraggableNodeRef: G,
|
|
3015
3015
|
transform: Ee ?? et,
|
|
3016
3016
|
transition: be()
|
|
3017
3017
|
};
|
|
@@ -3019,7 +3019,7 @@ function Ho(e) {
|
|
|
3019
3019
|
if (
|
|
3020
3020
|
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
3021
3021
|
Ee || // Or to prevent items jumping to back to their "new" position when items change
|
|
3022
|
-
|
|
3022
|
+
$e && A.current.newIndex === R
|
|
3023
3023
|
)
|
|
3024
3024
|
return Bo;
|
|
3025
3025
|
if (!(Re && !Tt(P) || !u) && (X || ce))
|
|
@@ -3066,11 +3066,11 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3066
3066
|
dragHandleIcon: a,
|
|
3067
3067
|
theme: l = "light"
|
|
3068
3068
|
}) => {
|
|
3069
|
-
const u = Ce.useRef(null), [c, d] = Ce.useState(null),
|
|
3069
|
+
const u = Ce.useRef(null), [c, d] = Ce.useState(null), f = (D) => {
|
|
3070
3070
|
const { isSorting: N, wasDragging: C } = D;
|
|
3071
3071
|
return N || C ? Tn(D) : !0;
|
|
3072
3072
|
}, {
|
|
3073
|
-
attributes:
|
|
3073
|
+
attributes: h,
|
|
3074
3074
|
listeners: v,
|
|
3075
3075
|
setNodeRef: g,
|
|
3076
3076
|
transform: b,
|
|
@@ -3079,7 +3079,7 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3079
3079
|
} = Ho({
|
|
3080
3080
|
id: e.key || `col-${t}`,
|
|
3081
3081
|
disabled: !s || !!e.fixed,
|
|
3082
|
-
animateLayoutChanges:
|
|
3082
|
+
animateLayoutChanges: f,
|
|
3083
3083
|
transition: {
|
|
3084
3084
|
duration: 250,
|
|
3085
3085
|
easing: "cubic-bezier(0.25, 1, 0.5, 1)"
|
|
@@ -3144,7 +3144,7 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3144
3144
|
ref: y,
|
|
3145
3145
|
className: S,
|
|
3146
3146
|
style: R(),
|
|
3147
|
-
...
|
|
3147
|
+
...h,
|
|
3148
3148
|
...v,
|
|
3149
3149
|
onClick: w,
|
|
3150
3150
|
children: /* @__PURE__ */ z.jsxs(
|
|
@@ -3192,12 +3192,12 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3192
3192
|
dragHandleIcon: a,
|
|
3193
3193
|
theme: l = "light",
|
|
3194
3194
|
rowIdPrefix: u
|
|
3195
|
-
} = e, c = (
|
|
3196
|
-
|
|
3197
|
-
}, d = (
|
|
3198
|
-
if (!
|
|
3195
|
+
} = e, c = (f) => {
|
|
3196
|
+
f.filter && f.key && r(f.key, f.type);
|
|
3197
|
+
}, d = (f) => {
|
|
3198
|
+
if (!f.filter || !f.key)
|
|
3199
3199
|
return null;
|
|
3200
|
-
const
|
|
3200
|
+
const h = n[f.key] || ne.default, v = l === "dark" ? "rgba(235, 236, 245, 0.20)" : "rgba(10, 10, 10, 0.20)", g = l === "dark" ? "rgba(235, 236, 245, 0.60)" : "rgba(10, 10, 10, 0.60)", b = h !== ne.default;
|
|
3201
3201
|
return /* @__PURE__ */ z.jsx(
|
|
3202
3202
|
"span",
|
|
3203
3203
|
{
|
|
@@ -3222,16 +3222,14 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3222
3222
|
"path",
|
|
3223
3223
|
{
|
|
3224
3224
|
d: "M5.4847 3.04301V4.10942H0.151367V3.04301L2.81803 0.376343L5.4847 3.04301Z",
|
|
3225
|
-
fill:
|
|
3226
|
-
fillOpacity: f === V.asc ? "1" : "0.2"
|
|
3225
|
+
fill: h === ne.asc ? g : v
|
|
3227
3226
|
}
|
|
3228
3227
|
),
|
|
3229
3228
|
/* @__PURE__ */ z.jsx(
|
|
3230
3229
|
"path",
|
|
3231
3230
|
{
|
|
3232
3231
|
d: "M5.4847 5.89067V6.95707L2.81803 9.62374L0.151367 6.95707V5.89067H5.4847Z",
|
|
3233
|
-
fill:
|
|
3234
|
-
fillOpacity: f === V.desc ? "1" : "0.2"
|
|
3232
|
+
fill: h === ne.desc ? g : v
|
|
3235
3233
|
}
|
|
3236
3234
|
)
|
|
3237
3235
|
]
|
|
@@ -3240,63 +3238,63 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3240
3238
|
}
|
|
3241
3239
|
);
|
|
3242
3240
|
};
|
|
3243
|
-
return /* @__PURE__ */ z.jsx("thead", { className: Me(oe.thead({ theme: l }), i), children: /* @__PURE__ */ z.jsx("tr", { id: u ? `${u}-thead` : "", children: t.map((
|
|
3241
|
+
return /* @__PURE__ */ z.jsx("thead", { className: Me(oe.thead({ theme: l }), i), children: /* @__PURE__ */ z.jsx("tr", { id: u ? `${u}-thead` : "", children: t.map((f, h) => /* @__PURE__ */ z.jsx(
|
|
3244
3242
|
Yo,
|
|
3245
3243
|
{
|
|
3246
|
-
column:
|
|
3247
|
-
index:
|
|
3244
|
+
column: f,
|
|
3245
|
+
index: h,
|
|
3248
3246
|
columns: t,
|
|
3249
|
-
sortState:
|
|
3247
|
+
sortState: f.key ? n[f.key] : void 0,
|
|
3250
3248
|
onSort: c,
|
|
3251
3249
|
renderSortIcon: d,
|
|
3252
|
-
isDragging:
|
|
3250
|
+
isDragging: f.key === o,
|
|
3253
3251
|
draggable: s,
|
|
3254
3252
|
dragHandleIcon: a,
|
|
3255
3253
|
theme: l
|
|
3256
3254
|
},
|
|
3257
|
-
|
|
3255
|
+
f.key || h
|
|
3258
3256
|
)) }) });
|
|
3259
3257
|
}, Uo = (e) => {
|
|
3260
3258
|
const { columns: t, data: n, rowKey: r, tdClass: o, tbodyClass: i, theme: s = "light" } = e, a = (c, d) => {
|
|
3261
|
-
const
|
|
3259
|
+
const f = {
|
|
3262
3260
|
textAlign: oe.getTextAlign(c.align)
|
|
3263
3261
|
};
|
|
3264
3262
|
if (c.fixed === "left") {
|
|
3265
|
-
let
|
|
3263
|
+
let h = 0;
|
|
3266
3264
|
for (let v = 0; v < d; v++)
|
|
3267
|
-
t[v].fixed === "left" && (
|
|
3268
|
-
|
|
3265
|
+
t[v].fixed === "left" && (h += parseInt(t[v].width || "150"));
|
|
3266
|
+
f.left = `${h}px`;
|
|
3269
3267
|
} else if (c.fixed === "right") {
|
|
3270
|
-
let
|
|
3268
|
+
let h = 0;
|
|
3271
3269
|
for (let v = d + 1; v < t.length; v++)
|
|
3272
|
-
t[v].fixed === "right" && (
|
|
3273
|
-
|
|
3270
|
+
t[v].fixed === "right" && (h += parseInt(t[v].width || "150"));
|
|
3271
|
+
f.right = `${h}px`;
|
|
3274
3272
|
}
|
|
3275
|
-
return
|
|
3276
|
-
}, l = (c, d,
|
|
3273
|
+
return f;
|
|
3274
|
+
}, l = (c, d, f) => c.render ? c.render(d, f) : c.key ? d[c.key] : null, u = (c, d, f) => {
|
|
3277
3275
|
if (c.onCell)
|
|
3278
|
-
return c.onCell(d,
|
|
3276
|
+
return c.onCell(d, f);
|
|
3279
3277
|
};
|
|
3280
3278
|
return /* @__PURE__ */ z.jsx("tbody", { className: Me(oe.tbody({ theme: s }), i), children: n.map((c, d) => /* @__PURE__ */ z.jsx(
|
|
3281
3279
|
"tr",
|
|
3282
3280
|
{
|
|
3283
3281
|
id: e.rowIdPrefix ? `${e.rowIdPrefix}-${d}` : "",
|
|
3284
3282
|
className: oe.tr({ theme: s }),
|
|
3285
|
-
children: t.map((
|
|
3286
|
-
const v = u(
|
|
3283
|
+
children: t.map((f, h) => {
|
|
3284
|
+
const v = u(f, c, d);
|
|
3287
3285
|
return v === 0 ? null : /* @__PURE__ */ z.jsx(
|
|
3288
3286
|
"td",
|
|
3289
3287
|
{
|
|
3290
3288
|
className: oe.getTdClasses({
|
|
3291
3289
|
theme: s,
|
|
3292
|
-
fixed:
|
|
3290
|
+
fixed: f.fixed,
|
|
3293
3291
|
customClass: o
|
|
3294
3292
|
}),
|
|
3295
|
-
style: a(
|
|
3293
|
+
style: a(f, h),
|
|
3296
3294
|
colSpan: v,
|
|
3297
|
-
children: l(
|
|
3295
|
+
children: l(f, c, d)
|
|
3298
3296
|
},
|
|
3299
|
-
|
|
3297
|
+
f.key || h
|
|
3300
3298
|
);
|
|
3301
3299
|
})
|
|
3302
3300
|
},
|
|
@@ -3324,8 +3322,8 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3324
3322
|
draggable: c = !1,
|
|
3325
3323
|
// 默认不启用拖拽
|
|
3326
3324
|
onColumnsChange: d,
|
|
3327
|
-
dragHandleIcon:
|
|
3328
|
-
maxHeight:
|
|
3325
|
+
dragHandleIcon: f,
|
|
3326
|
+
maxHeight: h,
|
|
3329
3327
|
rowIdPrefix: v
|
|
3330
3328
|
} = e, { theme: g } = Wn(), [b, x] = Ce.useState(t), [p, y] = Ce.useState({}), [R, S] = Ce.useState(null), I = pr(
|
|
3331
3329
|
Kt(Lt, {
|
|
@@ -3339,13 +3337,13 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3339
3337
|
Ce.useEffect(() => {
|
|
3340
3338
|
x(t);
|
|
3341
3339
|
}, [t]);
|
|
3342
|
-
const m = (T,
|
|
3343
|
-
const U = p[T] ||
|
|
3340
|
+
const m = (T, G) => {
|
|
3341
|
+
const U = p[T] || ne.default;
|
|
3344
3342
|
let k;
|
|
3345
|
-
U ===
|
|
3346
|
-
const se =
|
|
3343
|
+
U === ne.default ? k = ne.desc : U === ne.desc ? k = ne.asc : k = ne.default;
|
|
3344
|
+
const se = G || "single";
|
|
3347
3345
|
let B;
|
|
3348
|
-
if (se === "single" ? B = { [T]: k } : (B = { ...p, [T]: k }, k ===
|
|
3346
|
+
if (se === "single" ? B = { [T]: k } : (B = { ...p, [T]: k }, k === ne.default && delete B[T]), y(B), l)
|
|
3349
3347
|
if (se === "single")
|
|
3350
3348
|
l({ sortKey: T, sort: k });
|
|
3351
3349
|
else {
|
|
@@ -3358,28 +3356,28 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3358
3356
|
}, w = (T) => {
|
|
3359
3357
|
S(T.active.id);
|
|
3360
3358
|
}, D = (T) => {
|
|
3361
|
-
const { active:
|
|
3362
|
-
S(null), !(!U ||
|
|
3363
|
-
const se = k.findIndex((le) => le.key ===
|
|
3359
|
+
const { active: G, over: U } = T;
|
|
3360
|
+
S(null), !(!U || G.id === U.id) && x((k) => {
|
|
3361
|
+
const se = k.findIndex((le) => le.key === G.id), B = k.findIndex((le) => le.key === U.id);
|
|
3364
3362
|
if (se === -1 || B === -1 || k[B].fixed)
|
|
3365
3363
|
return k;
|
|
3366
3364
|
const ae = zt(k, se, B);
|
|
3367
3365
|
return d && d(ae), ae;
|
|
3368
3366
|
});
|
|
3369
3367
|
}, N = b.filter((T) => !T.fixed && T.key).map((T) => T.key), P = (() => {
|
|
3370
|
-
const T = b.reduce((
|
|
3368
|
+
const T = b.reduce((G, U) => {
|
|
3371
3369
|
if (U.width) {
|
|
3372
3370
|
const k = parseInt(U.width);
|
|
3373
|
-
return
|
|
3371
|
+
return G + (isNaN(k) ? 150 : k);
|
|
3374
3372
|
}
|
|
3375
|
-
return
|
|
3373
|
+
return G + 150;
|
|
3376
3374
|
}, 0);
|
|
3377
3375
|
return T > 0 ? `${T}px` : void 0;
|
|
3378
3376
|
})(), j = () => /* @__PURE__ */ z.jsx(
|
|
3379
3377
|
"div",
|
|
3380
3378
|
{
|
|
3381
3379
|
className: oe.container({ theme: g }),
|
|
3382
|
-
style:
|
|
3380
|
+
style: h ? { maxHeight: h, overflowX: "auto", overflowY: "auto" } : { overflowX: "auto" },
|
|
3383
3381
|
children: n.length > 0 ? /* @__PURE__ */ z.jsxs(
|
|
3384
3382
|
"table",
|
|
3385
3383
|
{
|
|
@@ -3398,7 +3396,7 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3398
3396
|
activeId: c ? R : null,
|
|
3399
3397
|
theadClass: o,
|
|
3400
3398
|
draggable: c,
|
|
3401
|
-
dragHandleIcon:
|
|
3399
|
+
dragHandleIcon: f,
|
|
3402
3400
|
theme: g,
|
|
3403
3401
|
rowIdPrefix: v
|
|
3404
3402
|
}
|
|
@@ -3441,5 +3439,5 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3441
3439
|
};
|
|
3442
3440
|
export {
|
|
3443
3441
|
Zo as P,
|
|
3444
|
-
|
|
3442
|
+
ne as S
|
|
3445
3443
|
};
|