@blofin/blofin-ui 0.7.46-beta.7 → 0.7.46-beta.9
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-b2defffb.js → ProTable-68b5ea04.js} +358 -358
- package/dist/ProTable.es.js +2 -2
- package/dist/{index-2ec61202.js → index-004e393d.js} +2 -2
- package/dist/{index-a6d9ebf0.js → index-04758577.js} +2 -2
- package/dist/{index-56fc7254.js → index-05b8bfbb.js} +2 -2
- package/dist/{index-fa8bac01.js → index-0bae237c.js} +3 -3
- package/dist/{index-48fd6ee8.js → index-0f3b7877.js} +3 -3
- package/dist/{index-aa036036.js → index-1183456c.js} +2 -2
- package/dist/{index-cae1c474.js → index-12fa3d91.js} +2 -2
- package/dist/{index-824d0040.js → index-132f639e.js} +3 -3
- package/dist/{index-82143974.js → index-133e8356.js} +3 -3
- package/dist/{index-56c106c5.js → index-19e8eb30.js} +2 -2
- package/dist/{index-46e2305b.js → index-1c52fcbb.js} +2 -2
- package/dist/{index-08a031e6.js → index-1e0e6274.js} +2 -2
- package/dist/{index-264087d9.js → index-1e5e7a1a.js} +2 -2
- package/dist/{index-7aa0be27.js → index-1e607211.js} +2 -2
- package/dist/{index-253bb3d0.js → index-1e7643ab.js} +3 -3
- package/dist/{index-249f1ddd.js → index-1e7f6b5d.js} +2 -2
- package/dist/{index-8a20442c.js → index-20c62929.js} +2 -2
- package/dist/{index-a011a539.js → index-2e22b8cf.js} +2 -2
- package/dist/{index-7099d19f.js → index-363af956.js} +2 -2
- package/dist/{index-383de4a4.js → index-380581a2.js} +2 -2
- package/dist/{index-5c3ae320.js → index-38409c48.js} +3 -3
- package/dist/{index-b33e71a4.js → index-39860b94.js} +2 -2
- package/dist/{index-649a18c6.js → index-416ada66.js} +3 -3
- package/dist/{index-f7cf342f.js → index-41e8a44f.js} +1 -1
- package/dist/{index-a7b29b5f.js → index-42104bfe.js} +2 -2
- package/dist/{index-9456f163.js → index-424828a9.js} +2 -2
- package/dist/{index-92ebc0b3.js → index-454e6849.js} +2 -2
- package/dist/{index-d80d0539.js → index-4666c90c.js} +2 -2
- package/dist/{index-146f365a.js → index-466da4b5.js} +2 -2
- package/dist/{index-746aee8c.js → index-47d96756.js} +2 -2
- package/dist/{index-6513b327.js → index-4e363b41.js} +2 -2
- package/dist/{index-97ee8d78.js → index-504b0c47.js} +2 -2
- package/dist/{index-4f9a4312.js → index-526ba8fe.js} +3 -3
- package/dist/{index-5457324d.js → index-531787e9.js} +2 -2
- package/dist/{index-f0bfebcf.js → index-56c25faf.js} +2 -2
- package/dist/{index-2881d797.js → index-59f24d9e.js} +3 -3
- package/dist/{index-af2fdd10.js → index-5c4fcd86.js} +2 -2
- package/dist/{index-66d71769.js → index-5df0aa76.js} +2 -2
- package/dist/{index-d4231cce.js → index-5edbe948.js} +2 -2
- package/dist/{index-0590c1ae.js → index-609238d0.js} +2 -2
- package/dist/{index-f9116936.js → index-6448181d.js} +2 -2
- package/dist/{index-c0c26186.js → index-664b1a60.js} +2 -2
- package/dist/{index-061ed081.js → index-691d7ee4.js} +3 -3
- package/dist/{index-f2410964.js → index-69ac4d29.js} +2 -2
- package/dist/{index-72a0ce80.js → index-6c1c205a.js} +2 -2
- package/dist/{index-239f56a0.js → index-6f91b4fc.js} +2 -2
- package/dist/{index-9c97f5e5.js → index-75fa93e8.js} +2 -2
- package/dist/{index-97bc9b5a.js → index-789a79e1.js} +2 -2
- package/dist/{index-e4a74c94.js → index-79c54caa.js} +2 -2
- package/dist/{index-eaf32072.js → index-813abaec.js} +2 -2
- package/dist/{index-bd237f22.js → index-817e0dcc.js} +2 -2
- package/dist/{index-2b4c3f01.js → index-839dc4c3.js} +2 -2
- package/dist/{index-361e08e1.js → index-88f04ad3.js} +2 -2
- package/dist/{index-7a33b1fd.js → index-91cdce03.js} +84 -84
- package/dist/{index-df7d80d1.js → index-9214dcad.js} +2 -2
- package/dist/{index-d0dcda88.js → index-968235db.js} +2 -2
- package/dist/{index-5bca828b.js → index-971461b1.js} +1 -1
- package/dist/{index-8fdc7345.js → index-9aba7353.js} +2 -2
- package/dist/{index-1e3d32f6.js → index-9e3c85e2.js} +3 -3
- package/dist/{index-ad36bfaf.js → index-9f7cddfa.js} +2 -2
- package/dist/{index-f344eda3.js → index-a105eb31.js} +2 -2
- package/dist/{index-80e148f1.js → index-a25407f7.js} +4 -4
- package/dist/{index-3d2d3a5d.js → index-a53bfe6f.js} +2 -2
- package/dist/{index-88769569.js → index-a53e6352.js} +2 -2
- package/dist/{index-1ad7bb6d.js → index-a53f23ef.js} +2 -2
- package/dist/{index-e53959ce.js → index-a7653a59.js} +3 -3
- package/dist/{index-b6041218.js → index-af2e5b81.js} +2 -2
- package/dist/{index-27cdee5f.js → index-b1845004.js} +4 -4
- package/dist/{index-1d1bfe69.js → index-b71a81f1.js} +2 -2
- package/dist/{index-aa182014.js → index-bd42d5cd.js} +2 -2
- package/dist/{index-0950c0b4.js → index-be54ea97.js} +2 -2
- package/dist/{index-1dd8cee5.js → index-c51e15ea.js} +2 -2
- package/dist/{index-7fc8ba37.js → index-c5dea39f.js} +2 -2
- package/dist/{index-00b2e6f6.js → index-c7764bbc.js} +2 -2
- package/dist/{index-1166f97a.js → index-ca13aa37.js} +3 -3
- package/dist/{index-1a42d8c8.js → index-cf76c249.js} +2 -2
- package/dist/{index-2c59b6c1.js → index-d294dfce.js} +3 -3
- package/dist/{index-a6d0a98a.js → index-d2d110b4.js} +2 -2
- package/dist/{index-20ebd2c4.js → index-dbc7ec0a.js} +2 -2
- package/dist/{index-5f0330ed.js → index-e882a838.js} +2 -2
- package/dist/{index-1920996a.js → index-f0862e39.js} +2 -2
- package/dist/{index-b4ab6abf.js → index-f2e9c630.js} +1 -1
- package/dist/{index-4531c56c.js → index-f80cb5aa.js} +3 -3
- package/dist/{index-832d52e1.js → index-f8ec79ff.js} +2 -2
- package/dist/{index-46931b47.js → index-f8ecbcf3.js} +2 -2
- package/dist/{index-05ca0d3e.js → index-f9cf1f69.js} +2 -2
- package/dist/{index-9072b096.js → index-fa4050b8.js} +2 -2
- package/dist/{index-f9a8c2a7.js → index-ffdf38f4.js} +2 -2
- package/dist/index.es.js +2 -2
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { j as z } from "./jsx-runtime-82a9ddf6.js";
|
|
2
2
|
import * as Ce from "react";
|
|
3
|
-
import q, { useLayoutEffect as Fn, useEffect as M, useRef as L, useMemo as O, useCallback as
|
|
4
|
-
import { c as
|
|
3
|
+
import q, { useLayoutEffect as Fn, useEffect as M, useRef as L, useMemo as O, useCallback as K, useState as ee, createContext as Je, memo as $n, useReducer as Hn, useContext as Ee } from "react";
|
|
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
6
|
var V = /* @__PURE__ */ ((e) => (e.default = "default", e.desc = "desc", e.asc = "asc", e))(V || {});
|
|
7
|
-
const Yn =
|
|
7
|
+
const Yn = W("bu-w-full bu-rounded-lg", {
|
|
8
8
|
variants: {
|
|
9
9
|
theme: {
|
|
10
10
|
light: "bu-bg-light-background",
|
|
11
11
|
dark: "bu-bg-dark-background"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
}), Kn =
|
|
14
|
+
}), Kn = W("bu-w-full bu-border-collapse"), Un = W("bu-sticky bu-top-0 bu-z-[100]", {
|
|
15
15
|
variants: {
|
|
16
16
|
theme: {
|
|
17
17
|
light: "bu-bg-light-background",
|
|
18
18
|
dark: "bu-bg-dark-background"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
}), rn =
|
|
21
|
+
}), rn = W(
|
|
22
22
|
"bu-relative bu-z-[999] bu-h-[25px] bu-select-none bu-border-b bu-px-[4px] bu-text-left bu-text-[12px] bu-font-medium bu-transition-all bu-duration-300",
|
|
23
23
|
{
|
|
24
24
|
variants: {
|
|
@@ -32,28 +32,28 @@ const Yn = $("bu-w-full bu-rounded-lg", {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
), on =
|
|
35
|
+
), on = W("bu-sticky bu-left-0 bu-top-0 bu-z-[1000]", {
|
|
36
36
|
variants: {
|
|
37
37
|
theme: {
|
|
38
38
|
light: "bu-bg-light-background",
|
|
39
39
|
dark: "bu-bg-dark-background"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
}), sn =
|
|
42
|
+
}), sn = W("bu-sticky bu-right-0 bu-top-0 bu-z-[1000]", {
|
|
43
43
|
variants: {
|
|
44
44
|
theme: {
|
|
45
45
|
light: "bu-bg-light-background",
|
|
46
46
|
dark: "bu-bg-dark-background"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
}), Vn =
|
|
49
|
+
}), Vn = W("bu-cursor-pointer", {
|
|
50
50
|
variants: {
|
|
51
51
|
theme: {
|
|
52
52
|
light: "hover:bu-bg-light-hover-fill-primary",
|
|
53
53
|
dark: "hover:bu-bg-dark-hover-fill-primary"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
}), qn =
|
|
56
|
+
}), qn = W(
|
|
57
57
|
"bu-pointer-events-auto bu-opacity-0 bu-transition-opacity bu-duration-200 group-hover:bu-opacity-100",
|
|
58
58
|
{
|
|
59
59
|
variants: {
|
|
@@ -63,14 +63,14 @@ const Yn = $("bu-w-full bu-rounded-lg", {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
), an =
|
|
66
|
+
), an = W("bu-z-[1002] !bu-cursor-grabbing bu-opacity-60 bu-shadow-lg", {
|
|
67
67
|
variants: {
|
|
68
68
|
theme: {
|
|
69
69
|
light: "bu-bg-light-background",
|
|
70
70
|
dark: "bu-bg-dark-background"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
}), Gn =
|
|
73
|
+
}), Gn = W("bu-ml-2 bu-inline-flex bu-flex-col bu-align-middle"), Jn = W(
|
|
74
74
|
"bu-h-0 bu-w-0 bu-border-l-4 bu-border-r-4 bu-border-transparent",
|
|
75
75
|
{
|
|
76
76
|
variants: {
|
|
@@ -88,42 +88,42 @@ const Yn = $("bu-w-full bu-rounded-lg", {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
), _n =
|
|
91
|
+
), _n = W("", {
|
|
92
92
|
variants: {
|
|
93
93
|
theme: {
|
|
94
94
|
light: "bu-bg-light-background",
|
|
95
95
|
dark: "bu-bg-dark-background"
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
}), Zn =
|
|
98
|
+
}), Zn = W("bu-group bu-border-b bu-transition-colors bu-duration-200", {
|
|
99
99
|
variants: {
|
|
100
100
|
theme: {
|
|
101
101
|
light: "bu-hover:bu-bg-light-fill-primary bu-border-light-line-primary",
|
|
102
102
|
dark: "bu-hover:bu-bg-dark-fill-primary bu-border-dark-line-primary"
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
}), ln =
|
|
105
|
+
}), ln = W("bu-h-[60px] bu-border-b bu-px-[4px] bu-text-[12px]", {
|
|
106
106
|
variants: {
|
|
107
107
|
theme: {
|
|
108
108
|
light: "bu-border-light-line-primary bu-text-light-label group-hover:bu-bg-light-fill-primary",
|
|
109
109
|
dark: "bu-border-dark-line-primary bu-text-dark-label group-hover:bu-bg-dark-fill-primary"
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
}), cn =
|
|
112
|
+
}), cn = W("bu-sticky bu-left-0", {
|
|
113
113
|
variants: {
|
|
114
114
|
theme: {
|
|
115
115
|
light: "bu-bg-light-background group-hover:bu-bg-light-fill-primary",
|
|
116
116
|
dark: "bu-bg-dark-background group-hover:bu-bg-dark-fill-primary"
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
}), un =
|
|
119
|
+
}), un = W("bu-sticky bu-right-0", {
|
|
120
120
|
variants: {
|
|
121
121
|
theme: {
|
|
122
122
|
light: "bu-bg-light-background group-hover:bu-bg-light-fill-primary",
|
|
123
123
|
dark: "bu-bg-dark-background group-hover:bu-bg-dark-fill-primary"
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
}), Qn =
|
|
126
|
+
}), Qn = W("bu-px-5 bu-py-10 bu-text-center", {
|
|
127
127
|
variants: {
|
|
128
128
|
theme: {
|
|
129
129
|
light: "bu-text-light-label-60",
|
|
@@ -206,16 +206,16 @@ function kt(e) {
|
|
|
206
206
|
const t = L(e);
|
|
207
207
|
return fe(() => {
|
|
208
208
|
t.current = e;
|
|
209
|
-
}),
|
|
209
|
+
}), K(function() {
|
|
210
210
|
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
211
211
|
r[o] = arguments[o];
|
|
212
212
|
return t.current == null ? void 0 : t.current(...r);
|
|
213
213
|
}, []);
|
|
214
214
|
}
|
|
215
215
|
function or() {
|
|
216
|
-
const e = L(null), t =
|
|
216
|
+
const e = L(null), t = K((r, o) => {
|
|
217
217
|
e.current = setInterval(r, o);
|
|
218
|
-
}, []), n =
|
|
218
|
+
}, []), n = K(() => {
|
|
219
219
|
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
220
220
|
}, []);
|
|
221
221
|
return [t, n];
|
|
@@ -239,7 +239,7 @@ function Ze(e, t) {
|
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
241
|
function at(e) {
|
|
242
|
-
const t = kt(e), n = L(null), r =
|
|
242
|
+
const t = kt(e), n = L(null), r = K(
|
|
243
243
|
(o) => {
|
|
244
244
|
o !== n.current && (t == null || t(o, n.current)), n.current = o;
|
|
245
245
|
},
|
|
@@ -413,7 +413,7 @@ function ur(e) {
|
|
|
413
413
|
function dr() {
|
|
414
414
|
const [e, t] = ee("");
|
|
415
415
|
return {
|
|
416
|
-
announce:
|
|
416
|
+
announce: K((r) => {
|
|
417
417
|
r != null && t(r);
|
|
418
418
|
}, []),
|
|
419
419
|
announcement: e
|
|
@@ -429,8 +429,8 @@ function fr(e) {
|
|
|
429
429
|
}, [e, t]);
|
|
430
430
|
}
|
|
431
431
|
function hr() {
|
|
432
|
-
const [e] = ee(() => /* @__PURE__ */ new Set()), t =
|
|
433
|
-
return [
|
|
432
|
+
const [e] = ee(() => /* @__PURE__ */ new Set()), t = K((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
433
|
+
return [K((r) => {
|
|
434
434
|
let {
|
|
435
435
|
type: o,
|
|
436
436
|
event: i
|
|
@@ -548,10 +548,10 @@ function vr(e) {
|
|
|
548
548
|
}));
|
|
549
549
|
return n ? Xn(u, n) : u;
|
|
550
550
|
}
|
|
551
|
-
var
|
|
551
|
+
var F;
|
|
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
|
+
})(F || (F = {}));
|
|
555
555
|
function ct() {
|
|
556
556
|
}
|
|
557
557
|
function Kt(e, t) {
|
|
@@ -830,10 +830,10 @@ function Dt(e) {
|
|
|
830
830
|
y: pn(e)
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
var
|
|
833
|
+
var $;
|
|
834
834
|
(function(e) {
|
|
835
835
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
836
|
-
})(
|
|
836
|
+
})($ || ($ = {}));
|
|
837
837
|
function yn(e) {
|
|
838
838
|
return !dt || !e ? !1 : e === document.scrollingElement;
|
|
839
839
|
}
|
|
@@ -887,7 +887,7 @@ 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 !d && i <= t.top + g.height ? (f.y =
|
|
890
|
+
return !d && i <= t.top + g.height ? (f.y = $.Backward, v.y = r * Math.abs((t.top + g.height - i) / g.height)) : !u && l >= t.bottom - g.height && (f.y = $.Forward, v.y = r * Math.abs((t.bottom - g.height - l) / g.height)), !h && a >= t.right - g.width ? (f.x = $.Forward, v.x = r * Math.abs((t.right - g.width - a) / g.width)) : !c && s <= t.left + g.width && (f.x = $.Backward, v.x = r * Math.abs((t.left + g.width - s) / g.width)), {
|
|
891
891
|
direction: f,
|
|
892
892
|
speed: v
|
|
893
893
|
};
|
|
@@ -981,7 +981,7 @@ class Ye {
|
|
|
981
981
|
(o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function Hr(e) {
|
|
985
985
|
const {
|
|
986
986
|
EventTarget: t
|
|
987
987
|
} = G(e);
|
|
@@ -998,38 +998,38 @@ var re;
|
|
|
998
998
|
function qt(e) {
|
|
999
999
|
e.preventDefault();
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1001
|
+
function Wr(e) {
|
|
1002
1002
|
e.stopPropagation();
|
|
1003
1003
|
}
|
|
1004
|
-
var
|
|
1004
|
+
var I;
|
|
1005
1005
|
(function(e) {
|
|
1006
1006
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
1007
|
-
})(
|
|
1007
|
+
})(I || (I = {}));
|
|
1008
1008
|
const mn = {
|
|
1009
|
-
start: [
|
|
1010
|
-
cancel: [
|
|
1011
|
-
end: [
|
|
1009
|
+
start: [I.Space, I.Enter],
|
|
1010
|
+
cancel: [I.Esc],
|
|
1011
|
+
end: [I.Space, I.Enter, I.Tab]
|
|
1012
1012
|
}, Xr = (e, t) => {
|
|
1013
1013
|
let {
|
|
1014
1014
|
currentCoordinates: n
|
|
1015
1015
|
} = t;
|
|
1016
1016
|
switch (e.code) {
|
|
1017
|
-
case
|
|
1017
|
+
case I.Right:
|
|
1018
1018
|
return {
|
|
1019
1019
|
...n,
|
|
1020
1020
|
x: n.x + 25
|
|
1021
1021
|
};
|
|
1022
|
-
case
|
|
1022
|
+
case I.Left:
|
|
1023
1023
|
return {
|
|
1024
1024
|
...n,
|
|
1025
1025
|
x: n.x - 25
|
|
1026
1026
|
};
|
|
1027
|
-
case
|
|
1027
|
+
case I.Down:
|
|
1028
1028
|
return {
|
|
1029
1029
|
...n,
|
|
1030
1030
|
y: n.y + 25
|
|
1031
1031
|
};
|
|
1032
|
-
case
|
|
1032
|
+
case I.Up:
|
|
1033
1033
|
return {
|
|
1034
1034
|
...n,
|
|
1035
1035
|
y: n.y - 25
|
|
@@ -1098,40 +1098,40 @@ class Ot {
|
|
|
1098
1098
|
} = r.current;
|
|
1099
1099
|
for (const g of v) {
|
|
1100
1100
|
const b = t.code, {
|
|
1101
|
-
isTop:
|
|
1101
|
+
isTop: x,
|
|
1102
1102
|
isRight: p,
|
|
1103
|
-
isLeft:
|
|
1104
|
-
isBottom:
|
|
1105
|
-
maxScroll:
|
|
1106
|
-
minScroll:
|
|
1107
|
-
} = xn(g),
|
|
1108
|
-
x: Math.min(b ===
|
|
1109
|
-
y: Math.min(b ===
|
|
1110
|
-
},
|
|
1111
|
-
if (
|
|
1112
|
-
const
|
|
1113
|
-
if (
|
|
1103
|
+
isLeft: y,
|
|
1104
|
+
isBottom: R,
|
|
1105
|
+
maxScroll: S,
|
|
1106
|
+
minScroll: E
|
|
1107
|
+
} = xn(g), m = jr(g), w = {
|
|
1108
|
+
x: Math.min(b === I.Right ? m.right - m.width / 2 : m.right, Math.max(b === I.Right ? m.left : m.left + m.width / 2, c.x)),
|
|
1109
|
+
y: Math.min(b === I.Down ? m.bottom - m.height / 2 : m.bottom, Math.max(b === I.Down ? m.top : m.top + m.height / 2, c.y))
|
|
1110
|
+
}, D = b === I.Right && !p || b === I.Left && !y, N = b === I.Down && !R || b === I.Up && !x;
|
|
1111
|
+
if (D && w.x !== c.x) {
|
|
1112
|
+
const C = g.scrollLeft + h.x, P = b === I.Right && C <= S.x || b === I.Left && C >= E.x;
|
|
1113
|
+
if (P && !h.y) {
|
|
1114
1114
|
g.scrollTo({
|
|
1115
|
-
left:
|
|
1115
|
+
left: C,
|
|
1116
1116
|
behavior: a
|
|
1117
1117
|
});
|
|
1118
1118
|
return;
|
|
1119
1119
|
}
|
|
1120
|
-
|
|
1120
|
+
P ? f.x = g.scrollLeft - C : f.x = b === I.Right ? g.scrollLeft - S.x : g.scrollLeft - E.x, f.x && g.scrollBy({
|
|
1121
1121
|
left: -f.x,
|
|
1122
1122
|
behavior: a
|
|
1123
1123
|
});
|
|
1124
1124
|
break;
|
|
1125
|
-
} else if (N &&
|
|
1126
|
-
const
|
|
1127
|
-
if (
|
|
1125
|
+
} else if (N && w.y !== c.y) {
|
|
1126
|
+
const C = g.scrollTop + h.y, P = b === I.Down && C <= S.y || b === I.Up && C >= E.y;
|
|
1127
|
+
if (P && !h.x) {
|
|
1128
1128
|
g.scrollTo({
|
|
1129
|
-
top:
|
|
1129
|
+
top: C,
|
|
1130
1130
|
behavior: a
|
|
1131
1131
|
});
|
|
1132
1132
|
return;
|
|
1133
1133
|
}
|
|
1134
|
-
|
|
1134
|
+
P ? f.y = g.scrollTop - C : f.y = b === I.Down ? g.scrollTop - S.y : g.scrollTop - E.y, f.y && g.scrollBy({
|
|
1135
1135
|
top: -f.y,
|
|
1136
1136
|
behavior: a
|
|
1137
1137
|
});
|
|
@@ -1194,7 +1194,7 @@ function Jt(e) {
|
|
|
1194
1194
|
class Mt {
|
|
1195
1195
|
constructor(t, n, r) {
|
|
1196
1196
|
var o;
|
|
1197
|
-
r === void 0 && (r =
|
|
1197
|
+
r === void 0 && (r = Hr(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
|
|
1198
1198
|
const {
|
|
1199
1199
|
event: i
|
|
1200
1200
|
} = t, {
|
|
@@ -1248,7 +1248,7 @@ class Mt {
|
|
|
1248
1248
|
} = this, {
|
|
1249
1249
|
onStart: n
|
|
1250
1250
|
} = this.props;
|
|
1251
|
-
t && (this.activated = !0, this.documentListeners.add(re.Click,
|
|
1251
|
+
t && (this.activated = !0, this.documentListeners.add(re.Click, Wr, {
|
|
1252
1252
|
capture: !0
|
|
1253
1253
|
}), this.removeTextSelection(), this.documentListeners.add(re.SelectionChange, this.removeTextSelection), n(t));
|
|
1254
1254
|
}
|
|
@@ -1296,7 +1296,7 @@ class Mt {
|
|
|
1296
1296
|
this.detach(), this.activated || t(this.props.active), n();
|
|
1297
1297
|
}
|
|
1298
1298
|
handleKeydown(t) {
|
|
1299
|
-
t.code ===
|
|
1299
|
+
t.code === I.Esc && this.handleCancel();
|
|
1300
1300
|
}
|
|
1301
1301
|
removeTextSelection() {
|
|
1302
1302
|
var t;
|
|
@@ -1436,7 +1436,7 @@ function qr(e) {
|
|
|
1436
1436
|
}), [v, g] = or(), b = L({
|
|
1437
1437
|
x: 0,
|
|
1438
1438
|
y: 0
|
|
1439
|
-
}),
|
|
1439
|
+
}), x = L({
|
|
1440
1440
|
x: 0,
|
|
1441
1441
|
y: 0
|
|
1442
1442
|
}), p = O(() => {
|
|
@@ -1451,40 +1451,40 @@ function qr(e) {
|
|
|
1451
1451
|
case Ke.DraggableRect:
|
|
1452
1452
|
return o;
|
|
1453
1453
|
}
|
|
1454
|
-
}, [n, o, l]),
|
|
1455
|
-
const
|
|
1456
|
-
if (!
|
|
1454
|
+
}, [n, o, l]), y = L(null), R = K(() => {
|
|
1455
|
+
const E = y.current;
|
|
1456
|
+
if (!E)
|
|
1457
1457
|
return;
|
|
1458
|
-
const
|
|
1459
|
-
|
|
1460
|
-
}, []),
|
|
1458
|
+
const m = b.current.x * x.current.x, w = b.current.y * x.current.y;
|
|
1459
|
+
E.scrollBy(m, w);
|
|
1460
|
+
}, []), S = O(() => a === ut.TreeOrder ? [...d].reverse() : d, [a, d]);
|
|
1461
1461
|
M(
|
|
1462
1462
|
() => {
|
|
1463
1463
|
if (!i || !d.length || !p) {
|
|
1464
1464
|
g();
|
|
1465
1465
|
return;
|
|
1466
1466
|
}
|
|
1467
|
-
for (const
|
|
1468
|
-
if ((r == null ? void 0 : r(
|
|
1467
|
+
for (const E of S) {
|
|
1468
|
+
if ((r == null ? void 0 : r(E)) === !1)
|
|
1469
1469
|
continue;
|
|
1470
|
-
const
|
|
1471
|
-
if (!
|
|
1470
|
+
const m = d.indexOf(E), w = u[m];
|
|
1471
|
+
if (!w)
|
|
1472
1472
|
continue;
|
|
1473
1473
|
const {
|
|
1474
|
-
direction:
|
|
1474
|
+
direction: D,
|
|
1475
1475
|
speed: N
|
|
1476
|
-
} = zr(
|
|
1477
|
-
for (const
|
|
1478
|
-
f[
|
|
1476
|
+
} = zr(E, w, p, t, h);
|
|
1477
|
+
for (const C of ["x", "y"])
|
|
1478
|
+
f[C][D[C]] || (N[C] = 0, D[C] = 0);
|
|
1479
1479
|
if (N.x > 0 || N.y > 0) {
|
|
1480
|
-
g(),
|
|
1480
|
+
g(), y.current = E, v(R, s), b.current = N, x.current = D;
|
|
1481
1481
|
return;
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
1484
|
b.current = {
|
|
1485
1485
|
x: 0,
|
|
1486
1486
|
y: 0
|
|
1487
|
-
},
|
|
1487
|
+
}, x.current = {
|
|
1488
1488
|
x: 0,
|
|
1489
1489
|
y: 0
|
|
1490
1490
|
}, g();
|
|
@@ -1492,7 +1492,7 @@ function qr(e) {
|
|
|
1492
1492
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1493
1493
|
[
|
|
1494
1494
|
t,
|
|
1495
|
-
|
|
1495
|
+
R,
|
|
1496
1496
|
r,
|
|
1497
1497
|
g,
|
|
1498
1498
|
i,
|
|
@@ -1503,7 +1503,7 @@ function qr(e) {
|
|
|
1503
1503
|
JSON.stringify(f),
|
|
1504
1504
|
v,
|
|
1505
1505
|
d,
|
|
1506
|
-
|
|
1506
|
+
S,
|
|
1507
1507
|
u,
|
|
1508
1508
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1509
1509
|
JSON.stringify(h)
|
|
@@ -1512,12 +1512,12 @@ function qr(e) {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
const Gr = {
|
|
1514
1514
|
x: {
|
|
1515
|
-
[
|
|
1516
|
-
[
|
|
1515
|
+
[$.Backward]: !1,
|
|
1516
|
+
[$.Forward]: !1
|
|
1517
1517
|
},
|
|
1518
1518
|
y: {
|
|
1519
|
-
[
|
|
1520
|
-
[
|
|
1519
|
+
[$.Backward]: !1,
|
|
1520
|
+
[$.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
|
+
[$.Backward]: o.x[$.Backward] || i.x === -1,
|
|
1539
|
+
[$.Forward]: o.x[$.Forward] || i.x === 1
|
|
1540
1540
|
},
|
|
1541
1541
|
y: {
|
|
1542
|
-
[
|
|
1543
|
-
[
|
|
1542
|
+
[$.Backward]: o.y[$.Backward] || i.y === -1,
|
|
1543
|
+
[$.Forward]: o.y[$.Forward] || i.y === 1
|
|
1544
1544
|
}
|
|
1545
1545
|
};
|
|
1546
1546
|
}, [n, t, r]);
|
|
@@ -1582,26 +1582,26 @@ function Qr(e, t) {
|
|
|
1582
1582
|
frequency: a,
|
|
1583
1583
|
measure: l,
|
|
1584
1584
|
strategy: d
|
|
1585
|
-
} = o, u = L(e), c = b(), h = Ve(c), f =
|
|
1586
|
-
|
|
1587
|
-
}, [h]), v = L(null), g = Ze((
|
|
1585
|
+
} = o, u = L(e), c = b(), h = Ve(c), f = K(function(x) {
|
|
1586
|
+
x === void 0 && (x = []), !h.current && s((p) => p === null ? x : p.concat(x.filter((y) => !p.includes(y))));
|
|
1587
|
+
}, [h]), v = L(null), g = Ze((x) => {
|
|
1588
1588
|
if (c && !n)
|
|
1589
1589
|
return _t;
|
|
1590
|
-
if (!
|
|
1590
|
+
if (!x || x === _t || u.current !== e || i != null) {
|
|
1591
1591
|
const p = /* @__PURE__ */ new Map();
|
|
1592
|
-
for (let
|
|
1593
|
-
if (!
|
|
1592
|
+
for (let y of e) {
|
|
1593
|
+
if (!y)
|
|
1594
1594
|
continue;
|
|
1595
|
-
if (i && i.length > 0 && !i.includes(
|
|
1596
|
-
p.set(
|
|
1595
|
+
if (i && i.length > 0 && !i.includes(y.id) && y.rect.current) {
|
|
1596
|
+
p.set(y.id, y.rect.current);
|
|
1597
1597
|
continue;
|
|
1598
1598
|
}
|
|
1599
|
-
const
|
|
1600
|
-
|
|
1599
|
+
const R = y.node.current, S = R ? new Nt(l(R), R) : null;
|
|
1600
|
+
y.rect.current = S, S && p.set(y.id, S);
|
|
1601
1601
|
}
|
|
1602
1602
|
return p;
|
|
1603
1603
|
}
|
|
1604
|
-
return
|
|
1604
|
+
return x;
|
|
1605
1605
|
}, [e, i, n, c, l]);
|
|
1606
1606
|
return M(() => {
|
|
1607
1607
|
u.current = e;
|
|
@@ -1735,7 +1735,7 @@ function oo(e) {
|
|
|
1735
1735
|
}, [e]), n;
|
|
1736
1736
|
}
|
|
1737
1737
|
function io(e) {
|
|
1738
|
-
const [t, n] = ee(null), r = L(e), o =
|
|
1738
|
+
const [t, n] = ee(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
|
}, []);
|
|
@@ -1842,7 +1842,7 @@ function uo(e) {
|
|
|
1842
1842
|
let {
|
|
1843
1843
|
measure: t
|
|
1844
1844
|
} = e;
|
|
1845
|
-
const [n, r] = ee(null), o =
|
|
1845
|
+
const [n, r] = ee(null), o = K((d) => {
|
|
1846
1846
|
for (const {
|
|
1847
1847
|
target: u
|
|
1848
1848
|
} of d)
|
|
@@ -1859,7 +1859,7 @@ function uo(e) {
|
|
|
1859
1859
|
}
|
|
1860
1860
|
}, [t]), i = ft({
|
|
1861
1861
|
callback: o
|
|
1862
|
-
}), s =
|
|
1862
|
+
}), s = K((d) => {
|
|
1863
1863
|
const u = co(d);
|
|
1864
1864
|
i == null || i.disconnect(), u && (i == null || i.observe(u)), r(u ? t(u) : null);
|
|
1865
1865
|
}, [t, i]), [a, l] = at(s);
|
|
@@ -1969,7 +1969,7 @@ function vo() {
|
|
|
1969
1969
|
}
|
|
1970
1970
|
function po(e, t) {
|
|
1971
1971
|
switch (t.type) {
|
|
1972
|
-
case
|
|
1972
|
+
case F.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 F.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 F.DragEnd:
|
|
1993
|
+
case F.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 F.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 F.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 F.UnregisterDroppable: {
|
|
2044
2044
|
const {
|
|
2045
2045
|
id: n,
|
|
2046
2046
|
key: r
|
|
@@ -2182,49 +2182,49 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2182
2182
|
modifiers: f,
|
|
2183
2183
|
...v
|
|
2184
2184
|
} = t;
|
|
2185
|
-
const g =
|
|
2185
|
+
const g = Hn(po, void 0, vo), [b, x] = g, [p, y] = hr(), [R, S] = ee(De.Uninitialized), E = R === De.Initialized, {
|
|
2186
2186
|
draggable: {
|
|
2187
|
-
active:
|
|
2188
|
-
nodes:
|
|
2189
|
-
translate:
|
|
2187
|
+
active: m,
|
|
2188
|
+
nodes: w,
|
|
2189
|
+
translate: D
|
|
2190
2190
|
},
|
|
2191
2191
|
droppable: {
|
|
2192
2192
|
containers: N
|
|
2193
2193
|
}
|
|
2194
|
-
} = b,
|
|
2194
|
+
} = b, C = m != null ? w.get(m) : null, P = L({
|
|
2195
2195
|
initial: null,
|
|
2196
2196
|
translated: null
|
|
2197
|
-
}),
|
|
2198
|
-
var
|
|
2199
|
-
return
|
|
2200
|
-
id:
|
|
2197
|
+
}), j = O(() => {
|
|
2198
|
+
var Y;
|
|
2199
|
+
return m != null ? {
|
|
2200
|
+
id: m,
|
|
2201
2201
|
// It's possible for the active node to unmount while dragging
|
|
2202
|
-
data: (
|
|
2203
|
-
rect:
|
|
2202
|
+
data: (Y = C == null ? void 0 : C.data) != null ? Y : ho,
|
|
2203
|
+
rect: P
|
|
2204
2204
|
} : null;
|
|
2205
|
-
}, [
|
|
2205
|
+
}, [m, C]), T = L(null), [J, U] = ee(null), [k, se] = ee(null), B = Ve(v, Object.values(v)), ae = Qe("DndDescribedBy", s), le = O(() => N.getEnabled(), [N]), X = wo(h), {
|
|
2206
2206
|
droppableRects: he,
|
|
2207
2207
|
measureDroppableContainers: Re,
|
|
2208
2208
|
measuringScheduled: Be
|
|
2209
2209
|
} = Qr(le, {
|
|
2210
|
-
dragging:
|
|
2211
|
-
dependencies: [
|
|
2212
|
-
config:
|
|
2213
|
-
}), te = _r(
|
|
2210
|
+
dragging: E,
|
|
2211
|
+
dependencies: [D.x, D.y],
|
|
2212
|
+
config: X.droppable
|
|
2213
|
+
}), te = _r(w, m), et = O(() => k ? St(k) : null, [k]), pe = Bn(), ge = eo(te, X.draggable.measure);
|
|
2214
2214
|
mo({
|
|
2215
|
-
activeNode:
|
|
2215
|
+
activeNode: m != null ? w.get(m) : null,
|
|
2216
2216
|
config: pe.layoutShiftCompensation,
|
|
2217
2217
|
initialRect: ge,
|
|
2218
|
-
measure:
|
|
2218
|
+
measure: X.draggable.measure
|
|
2219
2219
|
});
|
|
2220
|
-
const A = Zt(te,
|
|
2220
|
+
const A = Zt(te, X.draggable.measure, ge), Fe = Zt(te ? te.parentElement : null), ce = L({
|
|
2221
2221
|
activatorEvent: null,
|
|
2222
2222
|
active: null,
|
|
2223
2223
|
activeNode: te,
|
|
2224
2224
|
collisionRect: null,
|
|
2225
2225
|
collisions: null,
|
|
2226
2226
|
droppableRects: he,
|
|
2227
|
-
draggableNodes:
|
|
2227
|
+
draggableNodes: w,
|
|
2228
2228
|
draggingNode: null,
|
|
2229
2229
|
draggingNodeRect: null,
|
|
2230
2230
|
droppableContainers: N,
|
|
@@ -2232,16 +2232,16 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2232
2232
|
scrollableAncestors: [],
|
|
2233
2233
|
scrollAdjustedTranslate: null
|
|
2234
2234
|
}), Ie = N.getNodeFor((n = ce.current.over) == null ? void 0 : n.id), be = uo({
|
|
2235
|
-
measure:
|
|
2236
|
-
}), ke = (r = be.nodeRef.current) != null ? r : te, Te =
|
|
2235
|
+
measure: X.dragOverlay.measure
|
|
2236
|
+
}), ke = (r = be.nodeRef.current) != null ? r : te, Te = E ? (o = be.rect) != null ? o : A : null, jt = !!(be.nodeRef.current && be.rect), Pt = ro(jt ? null : A), gt = Dn(ke ? G(ke) : null), ye = oo(E ? Ie ?? te : null), tt = lo(ye), nt = xo(f, {
|
|
2237
2237
|
transform: {
|
|
2238
|
-
x:
|
|
2239
|
-
y:
|
|
2238
|
+
x: D.x - Pt.x,
|
|
2239
|
+
y: D.y - Pt.y,
|
|
2240
2240
|
scaleX: 1,
|
|
2241
2241
|
scaleY: 1
|
|
2242
2242
|
},
|
|
2243
2243
|
activatorEvent: k,
|
|
2244
|
-
active:
|
|
2244
|
+
active: j,
|
|
2245
2245
|
activeNodeRect: A,
|
|
2246
2246
|
containerNodeRect: Fe,
|
|
2247
2247
|
draggingNodeRect: Te,
|
|
@@ -2250,24 +2250,24 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2250
2250
|
scrollableAncestors: ye,
|
|
2251
2251
|
scrollableAncestorRects: tt,
|
|
2252
2252
|
windowRect: gt
|
|
2253
|
-
}), Bt = et ? Le(et,
|
|
2254
|
-
active:
|
|
2253
|
+
}), Bt = et ? Le(et, D) : null, Ft = io(ye), Nn = en(Ft), On = en(Ft, [A]), Ae = Le(nt, Nn), Ne = Te ? Ir(Te, nt) : null, $e = j && Ne ? c({
|
|
2254
|
+
active: j,
|
|
2255
2255
|
collisionRect: Ne,
|
|
2256
2256
|
droppableRects: he,
|
|
2257
2257
|
droppableContainers: le,
|
|
2258
2258
|
pointerCoordinates: Bt
|
|
2259
|
-
}) : null, $t = mr($e, "id"), [xe,
|
|
2260
|
-
(
|
|
2259
|
+
}) : null, $t = mr($e, "id"), [xe, Ht] = ee(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, _) => {
|
|
2261
2261
|
let {
|
|
2262
2262
|
sensor: Z,
|
|
2263
2263
|
options: we
|
|
2264
2264
|
} = _;
|
|
2265
2265
|
if (T.current == null)
|
|
2266
2266
|
return;
|
|
2267
|
-
const ne =
|
|
2267
|
+
const ne = w.get(T.current);
|
|
2268
2268
|
if (!ne)
|
|
2269
2269
|
return;
|
|
2270
|
-
const Q =
|
|
2270
|
+
const Q = Y.nativeEvent, ue = new Z({
|
|
2271
2271
|
active: T.current,
|
|
2272
2272
|
activeNode: ne,
|
|
2273
2273
|
event: Q,
|
|
@@ -2275,101 +2275,101 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
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
|
|
2277
2277
|
context: ce,
|
|
2278
|
-
onAbort(
|
|
2279
|
-
if (!
|
|
2278
|
+
onAbort(H) {
|
|
2279
|
+
if (!w.get(H))
|
|
2280
2280
|
return;
|
|
2281
2281
|
const {
|
|
2282
2282
|
onDragAbort: de
|
|
2283
|
-
} =
|
|
2284
|
-
id:
|
|
2283
|
+
} = B.current, ve = {
|
|
2284
|
+
id: H
|
|
2285
2285
|
};
|
|
2286
2286
|
de == null || de(ve), p({
|
|
2287
2287
|
type: "onDragAbort",
|
|
2288
2288
|
event: ve
|
|
2289
2289
|
});
|
|
2290
2290
|
},
|
|
2291
|
-
onPending(
|
|
2292
|
-
if (!
|
|
2291
|
+
onPending(H, me, de, ve) {
|
|
2292
|
+
if (!w.get(H))
|
|
2293
2293
|
return;
|
|
2294
2294
|
const {
|
|
2295
|
-
onDragPending:
|
|
2296
|
-
} =
|
|
2297
|
-
id:
|
|
2295
|
+
onDragPending: We
|
|
2296
|
+
} = B.current, Se = {
|
|
2297
|
+
id: H,
|
|
2298
2298
|
constraint: me,
|
|
2299
2299
|
initialCoordinates: de,
|
|
2300
2300
|
offset: ve
|
|
2301
2301
|
};
|
|
2302
|
-
|
|
2302
|
+
We == null || We(Se), p({
|
|
2303
2303
|
type: "onDragPending",
|
|
2304
2304
|
event: Se
|
|
2305
2305
|
});
|
|
2306
2306
|
},
|
|
2307
|
-
onStart(
|
|
2307
|
+
onStart(H) {
|
|
2308
2308
|
const me = T.current;
|
|
2309
2309
|
if (me == null)
|
|
2310
2310
|
return;
|
|
2311
|
-
const de =
|
|
2311
|
+
const de = w.get(me);
|
|
2312
2312
|
if (!de)
|
|
2313
2313
|
return;
|
|
2314
2314
|
const {
|
|
2315
2315
|
onDragStart: ve
|
|
2316
|
-
} =
|
|
2316
|
+
} = B.current, He = {
|
|
2317
2317
|
activatorEvent: Q,
|
|
2318
2318
|
active: {
|
|
2319
2319
|
id: me,
|
|
2320
2320
|
data: de.data,
|
|
2321
|
-
rect:
|
|
2321
|
+
rect: P
|
|
2322
2322
|
}
|
|
2323
2323
|
};
|
|
2324
2324
|
rt(() => {
|
|
2325
|
-
ve == null || ve(
|
|
2326
|
-
type:
|
|
2327
|
-
initialCoordinates:
|
|
2325
|
+
ve == null || ve(He), S(De.Initializing), x({
|
|
2326
|
+
type: F.DragStart,
|
|
2327
|
+
initialCoordinates: H,
|
|
2328
2328
|
active: me
|
|
2329
2329
|
}), p({
|
|
2330
2330
|
type: "onDragStart",
|
|
2331
|
-
event:
|
|
2331
|
+
event: He
|
|
2332
2332
|
}), U(bt.current), se(Q);
|
|
2333
2333
|
});
|
|
2334
2334
|
},
|
|
2335
|
-
onMove(
|
|
2336
|
-
|
|
2337
|
-
type:
|
|
2338
|
-
coordinates:
|
|
2335
|
+
onMove(H) {
|
|
2336
|
+
x({
|
|
2337
|
+
type: F.DragMove,
|
|
2338
|
+
coordinates: H
|
|
2339
2339
|
});
|
|
2340
2340
|
},
|
|
2341
|
-
onEnd: Oe(
|
|
2342
|
-
onCancel: Oe(
|
|
2341
|
+
onEnd: Oe(F.DragEnd),
|
|
2342
|
+
onCancel: Oe(F.DragCancel)
|
|
2343
2343
|
});
|
|
2344
2344
|
bt.current = ue;
|
|
2345
|
-
function Oe(
|
|
2345
|
+
function Oe(H) {
|
|
2346
2346
|
return async function() {
|
|
2347
2347
|
const {
|
|
2348
2348
|
active: de,
|
|
2349
2349
|
collisions: ve,
|
|
2350
|
-
over:
|
|
2351
|
-
scrollAdjustedTranslate:
|
|
2350
|
+
over: He,
|
|
2351
|
+
scrollAdjustedTranslate: We
|
|
2352
2352
|
} = ce.current;
|
|
2353
2353
|
let Se = null;
|
|
2354
|
-
if (de &&
|
|
2354
|
+
if (de && We) {
|
|
2355
2355
|
const {
|
|
2356
2356
|
cancelDrop: Xe
|
|
2357
|
-
} =
|
|
2357
|
+
} = B.current;
|
|
2358
2358
|
Se = {
|
|
2359
2359
|
activatorEvent: Q,
|
|
2360
2360
|
active: de,
|
|
2361
2361
|
collisions: ve,
|
|
2362
|
-
delta:
|
|
2363
|
-
over:
|
|
2364
|
-
},
|
|
2362
|
+
delta: We,
|
|
2363
|
+
over: He
|
|
2364
|
+
}, H === F.DragEnd && typeof Xe == "function" && await Promise.resolve(Xe(Se)) && (H = F.DragCancel);
|
|
2365
2365
|
}
|
|
2366
2366
|
T.current = null, rt(() => {
|
|
2367
|
-
|
|
2368
|
-
type:
|
|
2369
|
-
}),
|
|
2370
|
-
const Xe =
|
|
2367
|
+
x({
|
|
2368
|
+
type: H
|
|
2369
|
+
}), S(De.Uninitialized), Ht(null), U(null), se(null), bt.current = null;
|
|
2370
|
+
const Xe = H === F.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2371
2371
|
if (Se) {
|
|
2372
|
-
const vt =
|
|
2372
|
+
const vt = B.current[Xe];
|
|
2373
2373
|
vt == null || vt(Se), p({
|
|
2374
2374
|
type: Xe,
|
|
2375
2375
|
event: Se
|
|
@@ -2380,9 +2380,9 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2380
2380
|
}
|
|
2381
2381
|
},
|
|
2382
2382
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2383
|
-
[
|
|
2384
|
-
), zn =
|
|
2385
|
-
const ne = Z.nativeEvent, Q =
|
|
2383
|
+
[w]
|
|
2384
|
+
), zn = K((Y, _) => (Z, we) => {
|
|
2385
|
+
const ne = Z.nativeEvent, Q = w.get(we);
|
|
2386
2386
|
if (
|
|
2387
2387
|
// Another sensor is already instantiating
|
|
2388
2388
|
T.current !== null || // No active draggable
|
|
@@ -2393,17 +2393,17 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2393
2393
|
const ue = {
|
|
2394
2394
|
active: Q
|
|
2395
2395
|
};
|
|
2396
|
-
|
|
2396
|
+
Y(Z, _.options, ue) === !0 && (ne.dndKit = {
|
|
2397
2397
|
capturedBy: _.sensor
|
|
2398
|
-
}, T.current = we,
|
|
2399
|
-
}, [
|
|
2398
|
+
}, T.current = we, Wt(Z, _));
|
|
2399
|
+
}, [w, Wt]), Xt = Zr(u, zn);
|
|
2400
2400
|
so(u), fe(() => {
|
|
2401
|
-
A &&
|
|
2402
|
-
}, [A,
|
|
2401
|
+
A && R === De.Initializing && S(De.Initialized);
|
|
2402
|
+
}, [A, R]), M(
|
|
2403
2403
|
() => {
|
|
2404
2404
|
const {
|
|
2405
|
-
onDragMove:
|
|
2406
|
-
} =
|
|
2405
|
+
onDragMove: Y
|
|
2406
|
+
} = B.current, {
|
|
2407
2407
|
active: _,
|
|
2408
2408
|
activatorEvent: Z,
|
|
2409
2409
|
collisions: we,
|
|
@@ -2422,7 +2422,7 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2422
2422
|
over: ne
|
|
2423
2423
|
};
|
|
2424
2424
|
rt(() => {
|
|
2425
|
-
|
|
2425
|
+
Y == null || Y(Q), p({
|
|
2426
2426
|
type: "onDragMove",
|
|
2427
2427
|
event: Q
|
|
2428
2428
|
});
|
|
@@ -2433,23 +2433,23 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2433
2433
|
), M(
|
|
2434
2434
|
() => {
|
|
2435
2435
|
const {
|
|
2436
|
-
active:
|
|
2436
|
+
active: Y,
|
|
2437
2437
|
activatorEvent: _,
|
|
2438
2438
|
collisions: Z,
|
|
2439
2439
|
droppableContainers: we,
|
|
2440
2440
|
scrollAdjustedTranslate: ne
|
|
2441
2441
|
} = ce.current;
|
|
2442
|
-
if (!
|
|
2442
|
+
if (!Y || T.current == null || !_ || !ne)
|
|
2443
2443
|
return;
|
|
2444
2444
|
const {
|
|
2445
2445
|
onDragOver: Q
|
|
2446
|
-
} =
|
|
2446
|
+
} = B.current, ue = we.get($t), 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
|
-
} : null,
|
|
2452
|
-
active:
|
|
2451
|
+
} : null, H = {
|
|
2452
|
+
active: Y,
|
|
2453
2453
|
activatorEvent: _,
|
|
2454
2454
|
collisions: Z,
|
|
2455
2455
|
delta: {
|
|
@@ -2459,9 +2459,9 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2459
2459
|
over: Oe
|
|
2460
2460
|
};
|
|
2461
2461
|
rt(() => {
|
|
2462
|
-
|
|
2462
|
+
Ht(Oe), Q == null || Q(H), p({
|
|
2463
2463
|
type: "onDragOver",
|
|
2464
|
-
event:
|
|
2464
|
+
event: H
|
|
2465
2465
|
});
|
|
2466
2466
|
});
|
|
2467
2467
|
},
|
|
@@ -2470,63 +2470,63 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2470
2470
|
), fe(() => {
|
|
2471
2471
|
ce.current = {
|
|
2472
2472
|
activatorEvent: k,
|
|
2473
|
-
active:
|
|
2473
|
+
active: j,
|
|
2474
2474
|
activeNode: te,
|
|
2475
2475
|
collisionRect: Ne,
|
|
2476
2476
|
collisions: $e,
|
|
2477
2477
|
droppableRects: he,
|
|
2478
|
-
draggableNodes:
|
|
2478
|
+
draggableNodes: w,
|
|
2479
2479
|
draggingNode: ke,
|
|
2480
2480
|
draggingNodeRect: Te,
|
|
2481
2481
|
droppableContainers: N,
|
|
2482
2482
|
over: xe,
|
|
2483
2483
|
scrollableAncestors: ye,
|
|
2484
2484
|
scrollAdjustedTranslate: Ae
|
|
2485
|
-
},
|
|
2485
|
+
}, P.current = {
|
|
2486
2486
|
initial: Te,
|
|
2487
2487
|
translated: Ne
|
|
2488
2488
|
};
|
|
2489
|
-
}, [
|
|
2489
|
+
}, [j, te, $e, Ne, w, ke, Te, he, N, xe, ye, Ae]), qr({
|
|
2490
2490
|
...pe,
|
|
2491
|
-
delta:
|
|
2491
|
+
delta: D,
|
|
2492
2492
|
draggingRect: Ne,
|
|
2493
2493
|
pointerCoordinates: Bt,
|
|
2494
2494
|
scrollableAncestors: ye,
|
|
2495
2495
|
scrollableAncestorRects: tt
|
|
2496
2496
|
});
|
|
2497
2497
|
const jn = O(() => ({
|
|
2498
|
-
active:
|
|
2498
|
+
active: j,
|
|
2499
2499
|
activeNode: te,
|
|
2500
2500
|
activeNodeRect: A,
|
|
2501
2501
|
activatorEvent: k,
|
|
2502
2502
|
collisions: $e,
|
|
2503
2503
|
containerNodeRect: Fe,
|
|
2504
2504
|
dragOverlay: be,
|
|
2505
|
-
draggableNodes:
|
|
2505
|
+
draggableNodes: w,
|
|
2506
2506
|
droppableContainers: N,
|
|
2507
2507
|
droppableRects: he,
|
|
2508
2508
|
over: xe,
|
|
2509
2509
|
measureDroppableContainers: Re,
|
|
2510
2510
|
scrollableAncestors: ye,
|
|
2511
2511
|
scrollableAncestorRects: tt,
|
|
2512
|
-
measuringConfiguration:
|
|
2512
|
+
measuringConfiguration: X,
|
|
2513
2513
|
measuringScheduled: Be,
|
|
2514
2514
|
windowRect: gt
|
|
2515
|
-
}), [
|
|
2515
|
+
}), [j, te, A, k, $e, Fe, be, w, N, he, xe, Re, ye, tt, X, Be, gt]), Pn = O(() => ({
|
|
2516
2516
|
activatorEvent: k,
|
|
2517
2517
|
activators: Xt,
|
|
2518
|
-
active:
|
|
2518
|
+
active: j,
|
|
2519
2519
|
activeNodeRect: A,
|
|
2520
2520
|
ariaDescribedById: {
|
|
2521
2521
|
draggable: ae
|
|
2522
2522
|
},
|
|
2523
|
-
dispatch:
|
|
2524
|
-
draggableNodes:
|
|
2523
|
+
dispatch: x,
|
|
2524
|
+
draggableNodes: w,
|
|
2525
2525
|
over: xe,
|
|
2526
2526
|
measureDroppableContainers: Re
|
|
2527
|
-
}), [k, Xt,
|
|
2527
|
+
}), [k, Xt, j, A, x, ae, w, xe, Re]);
|
|
2528
2528
|
return q.createElement(hn.Provider, {
|
|
2529
|
-
value:
|
|
2529
|
+
value: y
|
|
2530
2530
|
}, q.createElement(ht.Provider, {
|
|
2531
2531
|
value: Pn
|
|
2532
2532
|
}, q.createElement(Cn.Provider, {
|
|
@@ -2540,7 +2540,7 @@ const So = /* @__PURE__ */ $n(function(t) {
|
|
|
2540
2540
|
hiddenTextDescribedById: ae
|
|
2541
2541
|
}));
|
|
2542
2542
|
function Bn() {
|
|
2543
|
-
const
|
|
2543
|
+
const Y = (J == null ? void 0 : J.autoScrollEnabled) === !1, _ = typeof l == "object" ? l.enabled === !1 : l === !1, Z = E && !Y && !_;
|
|
2544
2544
|
return typeof l == "object" ? {
|
|
2545
2545
|
...l,
|
|
2546
2546
|
enabled: Z
|
|
@@ -2568,22 +2568,22 @@ function Ro(e) {
|
|
|
2568
2568
|
role: f = nn,
|
|
2569
2569
|
roleDescription: v = "draggable",
|
|
2570
2570
|
tabIndex: g = 0
|
|
2571
|
-
} = o ?? {}, b = (l == null ? void 0 : l.id) === t,
|
|
2571
|
+
} = o ?? {}, b = (l == null ? void 0 : l.id) === t, x = Ee(b ? Rn : Do), [p, y] = at(), [R, S] = at(), E = ao(s, t), m = Ve(n);
|
|
2572
2572
|
fe(
|
|
2573
2573
|
() => (c.set(t, {
|
|
2574
2574
|
id: t,
|
|
2575
2575
|
key: i,
|
|
2576
2576
|
node: p,
|
|
2577
|
-
activatorNode:
|
|
2578
|
-
data:
|
|
2577
|
+
activatorNode: R,
|
|
2578
|
+
data: m
|
|
2579
2579
|
}), () => {
|
|
2580
|
-
const
|
|
2581
|
-
|
|
2580
|
+
const D = c.get(t);
|
|
2581
|
+
D && D.key === i && c.delete(t);
|
|
2582
2582
|
}),
|
|
2583
2583
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2584
2584
|
[c, t]
|
|
2585
2585
|
);
|
|
2586
|
-
const
|
|
2586
|
+
const w = O(() => ({
|
|
2587
2587
|
role: f,
|
|
2588
2588
|
tabIndex: g,
|
|
2589
2589
|
"aria-disabled": r,
|
|
@@ -2595,14 +2595,14 @@ function Ro(e) {
|
|
|
2595
2595
|
active: l,
|
|
2596
2596
|
activatorEvent: a,
|
|
2597
2597
|
activeNodeRect: d,
|
|
2598
|
-
attributes:
|
|
2598
|
+
attributes: w,
|
|
2599
2599
|
isDragging: b,
|
|
2600
|
-
listeners: r ? void 0 :
|
|
2600
|
+
listeners: r ? void 0 : E,
|
|
2601
2601
|
node: p,
|
|
2602
2602
|
over: h,
|
|
2603
|
-
setNodeRef:
|
|
2604
|
-
setActivatorNodeRef:
|
|
2605
|
-
transform:
|
|
2603
|
+
setNodeRef: y,
|
|
2604
|
+
setActivatorNodeRef: S,
|
|
2605
|
+
transform: x
|
|
2606
2606
|
};
|
|
2607
2607
|
}
|
|
2608
2608
|
function Eo() {
|
|
@@ -2632,39 +2632,39 @@ function To(e) {
|
|
|
2632
2632
|
} = {
|
|
2633
2633
|
...ko,
|
|
2634
2634
|
...o
|
|
2635
|
-
},
|
|
2635
|
+
}, x = Ve(g ?? r), p = K(
|
|
2636
2636
|
() => {
|
|
2637
2637
|
if (!c.current) {
|
|
2638
2638
|
c.current = !0;
|
|
2639
2639
|
return;
|
|
2640
2640
|
}
|
|
2641
2641
|
f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
2642
|
-
d(Array.isArray(
|
|
2642
|
+
d(Array.isArray(x.current) ? x.current : [x.current]), f.current = null;
|
|
2643
2643
|
}, b);
|
|
2644
2644
|
},
|
|
2645
2645
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2646
2646
|
[b]
|
|
2647
|
-
),
|
|
2647
|
+
), y = ft({
|
|
2648
2648
|
callback: p,
|
|
2649
2649
|
disabled: v || !s
|
|
2650
|
-
}),
|
|
2651
|
-
|
|
2652
|
-
}, [
|
|
2650
|
+
}), R = K((w, D) => {
|
|
2651
|
+
y && (D && (y.unobserve(D), c.current = !1), w && y.observe(w));
|
|
2652
|
+
}, [y]), [S, E] = at(R), m = Ve(t);
|
|
2653
2653
|
return M(() => {
|
|
2654
|
-
!
|
|
2655
|
-
}, [
|
|
2654
|
+
!y || !S.current || (y.disconnect(), c.current = !1, y.observe(S.current));
|
|
2655
|
+
}, [S, y]), M(
|
|
2656
2656
|
() => (a({
|
|
2657
|
-
type:
|
|
2657
|
+
type: F.RegisterDroppable,
|
|
2658
2658
|
element: {
|
|
2659
2659
|
id: r,
|
|
2660
2660
|
key: i,
|
|
2661
2661
|
disabled: n,
|
|
2662
|
-
node:
|
|
2662
|
+
node: S,
|
|
2663
2663
|
rect: h,
|
|
2664
|
-
data:
|
|
2664
|
+
data: m
|
|
2665
2665
|
}
|
|
2666
2666
|
}), () => a({
|
|
2667
|
-
type:
|
|
2667
|
+
type: F.UnregisterDroppable,
|
|
2668
2668
|
key: i,
|
|
2669
2669
|
id: r
|
|
2670
2670
|
})),
|
|
@@ -2672,7 +2672,7 @@ function To(e) {
|
|
|
2672
2672
|
[r]
|
|
2673
2673
|
), M(() => {
|
|
2674
2674
|
n !== u.current.disabled && (a({
|
|
2675
|
-
type:
|
|
2675
|
+
type: F.SetDroppableDisabled,
|
|
2676
2676
|
id: r,
|
|
2677
2677
|
key: i,
|
|
2678
2678
|
disabled: n
|
|
@@ -2681,9 +2681,9 @@ function To(e) {
|
|
|
2681
2681
|
active: s,
|
|
2682
2682
|
rect: h,
|
|
2683
2683
|
isOver: (l == null ? void 0 : l.id) === r,
|
|
2684
|
-
node:
|
|
2684
|
+
node: S,
|
|
2685
2685
|
over: l,
|
|
2686
|
-
setNodeRef:
|
|
2686
|
+
setNodeRef: E
|
|
2687
2687
|
};
|
|
2688
2688
|
}
|
|
2689
2689
|
function zt(e, t, n) {
|
|
@@ -2799,18 +2799,18 @@ function zo(e) {
|
|
|
2799
2799
|
droppableRects: l,
|
|
2800
2800
|
over: d,
|
|
2801
2801
|
measureDroppableContainers: u
|
|
2802
|
-
} = Eo(), c = Qe(In, n), h = a.rect !== null, f = O(() => r.map((
|
|
2802
|
+
} = Eo(), c = Qe(In, n), h = a.rect !== null, f = O(() => r.map((E) => typeof E == "object" && "id" in E ? E.id : E), [r]), v = s != null, g = s ? f.indexOf(s.id) : -1, b = d ? f.indexOf(d.id) : -1, x = L(f), p = !No(f, x.current), y = b !== -1 && g === -1 || p, R = Oo(i);
|
|
2803
2803
|
fe(() => {
|
|
2804
2804
|
p && v && u(f);
|
|
2805
2805
|
}, [p, f, v, u]), M(() => {
|
|
2806
|
-
|
|
2806
|
+
x.current = f;
|
|
2807
2807
|
}, [f]);
|
|
2808
|
-
const
|
|
2808
|
+
const S = O(
|
|
2809
2809
|
() => ({
|
|
2810
2810
|
activeIndex: g,
|
|
2811
2811
|
containerId: c,
|
|
2812
|
-
disabled:
|
|
2813
|
-
disableTransforms:
|
|
2812
|
+
disabled: R,
|
|
2813
|
+
disableTransforms: y,
|
|
2814
2814
|
items: f,
|
|
2815
2815
|
overIndex: b,
|
|
2816
2816
|
useDragOverlay: h,
|
|
@@ -2818,10 +2818,10 @@ function zo(e) {
|
|
|
2818
2818
|
strategy: o
|
|
2819
2819
|
}),
|
|
2820
2820
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2821
|
-
[g, c,
|
|
2821
|
+
[g, c, R.draggable, R.droppable, y, f, b, l, h, o]
|
|
2822
2822
|
);
|
|
2823
2823
|
return q.createElement(kn.Provider, {
|
|
2824
|
-
value:
|
|
2824
|
+
value: S
|
|
2825
2825
|
}, t);
|
|
2826
2826
|
}
|
|
2827
2827
|
const jo = (e) => {
|
|
@@ -2883,7 +2883,7 @@ function $o(e) {
|
|
|
2883
2883
|
i && s(null);
|
|
2884
2884
|
}, [i]), i;
|
|
2885
2885
|
}
|
|
2886
|
-
function
|
|
2886
|
+
function Ho(e) {
|
|
2887
2887
|
let {
|
|
2888
2888
|
animateLayoutChanges: t = Tn,
|
|
2889
2889
|
attributes: n,
|
|
@@ -2903,70 +2903,70 @@ function Wo(e) {
|
|
|
2903
2903
|
disableTransforms: v,
|
|
2904
2904
|
sortedRects: g,
|
|
2905
2905
|
overIndex: b,
|
|
2906
|
-
useDragOverlay:
|
|
2906
|
+
useDragOverlay: x,
|
|
2907
2907
|
strategy: p
|
|
2908
|
-
} = Ee(kn),
|
|
2908
|
+
} = Ee(kn), y = Wo(r, f), R = u.indexOf(s), S = O(() => ({
|
|
2909
2909
|
sortable: {
|
|
2910
2910
|
containerId: c,
|
|
2911
|
-
index:
|
|
2911
|
+
index: R,
|
|
2912
2912
|
items: u
|
|
2913
2913
|
},
|
|
2914
2914
|
...o
|
|
2915
|
-
}), [c, o,
|
|
2916
|
-
rect:
|
|
2917
|
-
node:
|
|
2918
|
-
isOver:
|
|
2915
|
+
}), [c, o, R, u]), E = O(() => u.slice(u.indexOf(s)), [u, s]), {
|
|
2916
|
+
rect: m,
|
|
2917
|
+
node: w,
|
|
2918
|
+
isOver: D,
|
|
2919
2919
|
setNodeRef: N
|
|
2920
2920
|
} = To({
|
|
2921
2921
|
id: s,
|
|
2922
|
-
data:
|
|
2923
|
-
disabled:
|
|
2922
|
+
data: S,
|
|
2923
|
+
disabled: y.droppable,
|
|
2924
2924
|
resizeObserverConfig: {
|
|
2925
|
-
updateMeasurementsFor:
|
|
2925
|
+
updateMeasurementsFor: E,
|
|
2926
2926
|
...l
|
|
2927
2927
|
}
|
|
2928
2928
|
}), {
|
|
2929
|
-
active:
|
|
2930
|
-
activatorEvent:
|
|
2931
|
-
activeNodeRect:
|
|
2929
|
+
active: C,
|
|
2930
|
+
activatorEvent: P,
|
|
2931
|
+
activeNodeRect: j,
|
|
2932
2932
|
attributes: T,
|
|
2933
2933
|
setNodeRef: J,
|
|
2934
2934
|
listeners: U,
|
|
2935
2935
|
isDragging: k,
|
|
2936
2936
|
over: se,
|
|
2937
|
-
setActivatorNodeRef:
|
|
2937
|
+
setActivatorNodeRef: B,
|
|
2938
2938
|
transform: ae
|
|
2939
2939
|
} = Ro({
|
|
2940
2940
|
id: s,
|
|
2941
|
-
data:
|
|
2941
|
+
data: S,
|
|
2942
2942
|
attributes: {
|
|
2943
2943
|
...Fo,
|
|
2944
2944
|
...n
|
|
2945
2945
|
},
|
|
2946
|
-
disabled:
|
|
2947
|
-
}), le = rr(N, J),
|
|
2946
|
+
disabled: y.draggable
|
|
2947
|
+
}), le = rr(N, J), X = !!C, he = X && !v && ot(h) && ot(b), Re = !x && k, Be = Re && he ? ae : null, et = he ? Be ?? (a ?? p)({
|
|
2948
2948
|
rects: g,
|
|
2949
|
-
activeNodeRect:
|
|
2949
|
+
activeNodeRect: j,
|
|
2950
2950
|
activeIndex: h,
|
|
2951
2951
|
overIndex: b,
|
|
2952
|
-
index:
|
|
2952
|
+
index: R
|
|
2953
2953
|
}) : null, pe = ot(h) && ot(b) ? i({
|
|
2954
2954
|
id: s,
|
|
2955
2955
|
items: u,
|
|
2956
2956
|
activeIndex: h,
|
|
2957
2957
|
overIndex: b
|
|
2958
|
-
}) :
|
|
2958
|
+
}) : R, ge = C == null ? void 0 : C.id, A = L({
|
|
2959
2959
|
activeId: ge,
|
|
2960
2960
|
items: u,
|
|
2961
2961
|
newIndex: pe,
|
|
2962
2962
|
containerId: c
|
|
2963
2963
|
}), Fe = u !== A.current.items, ce = t({
|
|
2964
|
-
active:
|
|
2964
|
+
active: C,
|
|
2965
2965
|
containerId: c,
|
|
2966
2966
|
isDragging: k,
|
|
2967
|
-
isSorting:
|
|
2967
|
+
isSorting: X,
|
|
2968
2968
|
id: s,
|
|
2969
|
-
index:
|
|
2969
|
+
index: R,
|
|
2970
2970
|
items: u,
|
|
2971
2971
|
newIndex: A.current.newIndex,
|
|
2972
2972
|
previousItems: A.current.items,
|
|
@@ -2975,13 +2975,13 @@ function Wo(e) {
|
|
|
2975
2975
|
wasDragging: A.current.activeId != null
|
|
2976
2976
|
}), Ie = $o({
|
|
2977
2977
|
disabled: !ce,
|
|
2978
|
-
index:
|
|
2979
|
-
node:
|
|
2980
|
-
rect:
|
|
2978
|
+
index: R,
|
|
2979
|
+
node: w,
|
|
2980
|
+
rect: m
|
|
2981
2981
|
});
|
|
2982
2982
|
return M(() => {
|
|
2983
|
-
|
|
2984
|
-
}, [
|
|
2983
|
+
X && A.current.newIndex !== pe && (A.current.newIndex = pe), c !== A.current.containerId && (A.current.containerId = c), u !== A.current.items && (A.current.items = u);
|
|
2984
|
+
}, [X, pe, c, u]), M(() => {
|
|
2985
2985
|
if (ge === A.current.activeId)
|
|
2986
2986
|
return;
|
|
2987
2987
|
if (ge != null && A.current.activeId == null) {
|
|
@@ -2993,23 +2993,23 @@ function Wo(e) {
|
|
|
2993
2993
|
}, 50);
|
|
2994
2994
|
return () => clearTimeout(ke);
|
|
2995
2995
|
}, [ge]), {
|
|
2996
|
-
active:
|
|
2996
|
+
active: C,
|
|
2997
2997
|
activeIndex: h,
|
|
2998
2998
|
attributes: T,
|
|
2999
|
-
data:
|
|
3000
|
-
rect:
|
|
3001
|
-
index:
|
|
2999
|
+
data: S,
|
|
3000
|
+
rect: m,
|
|
3001
|
+
index: R,
|
|
3002
3002
|
newIndex: pe,
|
|
3003
3003
|
items: u,
|
|
3004
|
-
isOver:
|
|
3005
|
-
isSorting:
|
|
3004
|
+
isOver: D,
|
|
3005
|
+
isSorting: X,
|
|
3006
3006
|
isDragging: k,
|
|
3007
3007
|
listeners: U,
|
|
3008
|
-
node:
|
|
3008
|
+
node: w,
|
|
3009
3009
|
overIndex: b,
|
|
3010
3010
|
over: se,
|
|
3011
3011
|
setNodeRef: le,
|
|
3012
|
-
setActivatorNodeRef:
|
|
3012
|
+
setActivatorNodeRef: B,
|
|
3013
3013
|
setDroppableNodeRef: N,
|
|
3014
3014
|
setDraggableNodeRef: J,
|
|
3015
3015
|
transform: Ie ?? et,
|
|
@@ -3019,17 +3019,17 @@ function Wo(e) {
|
|
|
3019
3019
|
if (
|
|
3020
3020
|
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
3021
3021
|
Ie || // Or to prevent items jumping to back to their "new" position when items change
|
|
3022
|
-
Fe && A.current.newIndex ===
|
|
3022
|
+
Fe && A.current.newIndex === R
|
|
3023
3023
|
)
|
|
3024
3024
|
return Bo;
|
|
3025
|
-
if (!(Re && !Tt(
|
|
3025
|
+
if (!(Re && !Tt(P) || !d) && (X || ce))
|
|
3026
3026
|
return qe.Transition.toString({
|
|
3027
3027
|
...d,
|
|
3028
3028
|
property: An
|
|
3029
3029
|
});
|
|
3030
3030
|
}
|
|
3031
3031
|
}
|
|
3032
|
-
function
|
|
3032
|
+
function Wo(e, t) {
|
|
3033
3033
|
var n, r;
|
|
3034
3034
|
return typeof e == "boolean" ? {
|
|
3035
3035
|
draggable: e,
|
|
@@ -3040,7 +3040,7 @@ function Ho(e, t) {
|
|
|
3040
3040
|
droppable: (r = e == null ? void 0 : e.droppable) != null ? r : t.droppable
|
|
3041
3041
|
};
|
|
3042
3042
|
}
|
|
3043
|
-
|
|
3043
|
+
I.Down, I.Right, I.Up, I.Left;
|
|
3044
3044
|
const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
3045
3045
|
"svg",
|
|
3046
3046
|
{
|
|
@@ -3066,17 +3066,17 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3066
3066
|
dragHandleIcon: a,
|
|
3067
3067
|
theme: l = "light"
|
|
3068
3068
|
}) => {
|
|
3069
|
-
const d = Ce.useRef(null), [u, c] = Ce.useState(null), h = (
|
|
3070
|
-
const { isSorting:
|
|
3071
|
-
return
|
|
3069
|
+
const d = Ce.useRef(null), [u, c] = Ce.useState(null), h = (D) => {
|
|
3070
|
+
const { isSorting: N, wasDragging: C } = D;
|
|
3071
|
+
return N || C ? Tn(D) : !0;
|
|
3072
3072
|
}, {
|
|
3073
3073
|
attributes: f,
|
|
3074
3074
|
listeners: v,
|
|
3075
3075
|
setNodeRef: g,
|
|
3076
3076
|
transform: b,
|
|
3077
|
-
transition:
|
|
3077
|
+
transition: x,
|
|
3078
3078
|
isDragging: p
|
|
3079
|
-
} =
|
|
3079
|
+
} = Ho({
|
|
3080
3080
|
id: e.key || `col-${t}`,
|
|
3081
3081
|
disabled: !s || !!e.fixed,
|
|
3082
3082
|
animateLayoutChanges: h,
|
|
@@ -3084,49 +3084,49 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3084
3084
|
duration: 250,
|
|
3085
3085
|
easing: "cubic-bezier(0.25, 1, 0.5, 1)"
|
|
3086
3086
|
}
|
|
3087
|
-
}),
|
|
3088
|
-
(
|
|
3089
|
-
d.current =
|
|
3087
|
+
}), y = Ce.useCallback(
|
|
3088
|
+
(D) => {
|
|
3089
|
+
d.current = D, g(D);
|
|
3090
3090
|
},
|
|
3091
3091
|
[g]
|
|
3092
3092
|
);
|
|
3093
3093
|
Ce.useEffect(() => {
|
|
3094
3094
|
if (p && d.current) {
|
|
3095
|
-
const
|
|
3096
|
-
c(
|
|
3095
|
+
const D = d.current.getBoundingClientRect().width;
|
|
3096
|
+
c(D);
|
|
3097
3097
|
} else
|
|
3098
3098
|
p || c(null);
|
|
3099
3099
|
}, [p]);
|
|
3100
|
-
const
|
|
3101
|
-
const
|
|
3102
|
-
let
|
|
3103
|
-
e.fixed ?
|
|
3104
|
-
const
|
|
3100
|
+
const R = () => {
|
|
3101
|
+
const D = p && u ? `${u}px` : e.width || "auto";
|
|
3102
|
+
let N = "auto";
|
|
3103
|
+
e.fixed ? N = p ? 1001 : 1e3 : p && (N = 100);
|
|
3104
|
+
const C = {
|
|
3105
3105
|
transform: b ? qe.Translate.toString(b) : void 0,
|
|
3106
|
-
transition:
|
|
3106
|
+
transition: x || "transform 250ms cubic-bezier(0.25, 1, 0.5, 1)",
|
|
3107
3107
|
willChange: "transform",
|
|
3108
|
-
width:
|
|
3108
|
+
width: D,
|
|
3109
3109
|
textAlign: oe.getTextAlign(e.align),
|
|
3110
3110
|
opacity: p ? 0.5 : 1,
|
|
3111
3111
|
// cursor 由 className 控制,不在 inline style 中设置
|
|
3112
|
-
zIndex:
|
|
3112
|
+
zIndex: N,
|
|
3113
3113
|
whiteSpace: "nowrap",
|
|
3114
3114
|
overflow: "hidden",
|
|
3115
3115
|
textOverflow: "ellipsis"
|
|
3116
3116
|
};
|
|
3117
|
-
if (p && u && (
|
|
3118
|
-
let
|
|
3119
|
-
for (let
|
|
3120
|
-
n[
|
|
3121
|
-
|
|
3117
|
+
if (p && u && (C.minWidth = `${u}px`, C.maxWidth = `${u}px`), e.fixed === "left") {
|
|
3118
|
+
let P = 0;
|
|
3119
|
+
for (let j = 0; j < t; j++)
|
|
3120
|
+
n[j].fixed === "left" && (P += parseInt(n[j].width || "150"));
|
|
3121
|
+
C.left = `${P}px`;
|
|
3122
3122
|
} else if (e.fixed === "right") {
|
|
3123
|
-
let
|
|
3124
|
-
for (let
|
|
3125
|
-
n[
|
|
3126
|
-
|
|
3123
|
+
let P = 0;
|
|
3124
|
+
for (let j = t + 1; j < n.length; j++)
|
|
3125
|
+
n[j].fixed === "right" && (P += parseInt(n[j].width || "150"));
|
|
3126
|
+
C.right = `${P}px`;
|
|
3127
3127
|
}
|
|
3128
|
-
return
|
|
3129
|
-
},
|
|
3128
|
+
return C;
|
|
3129
|
+
}, S = Me(
|
|
3130
3130
|
"bu-group",
|
|
3131
3131
|
oe.getThClasses({
|
|
3132
3132
|
theme: l,
|
|
@@ -3135,15 +3135,18 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3135
3135
|
isDragging: p,
|
|
3136
3136
|
draggable: s
|
|
3137
3137
|
})
|
|
3138
|
-
),
|
|
3138
|
+
), E = s && !e.fixed, m = e.filter && e.key, w = (D) => {
|
|
3139
|
+
m && (D.target.closest(".drag-handle-icon") || o(e));
|
|
3140
|
+
};
|
|
3139
3141
|
return /* @__PURE__ */ z.jsx(
|
|
3140
3142
|
"th",
|
|
3141
3143
|
{
|
|
3142
|
-
ref:
|
|
3143
|
-
className:
|
|
3144
|
-
style:
|
|
3144
|
+
ref: y,
|
|
3145
|
+
className: S,
|
|
3146
|
+
style: R(),
|
|
3145
3147
|
...f,
|
|
3146
3148
|
...v,
|
|
3149
|
+
onClick: w,
|
|
3147
3150
|
children: /* @__PURE__ */ z.jsxs(
|
|
3148
3151
|
"div",
|
|
3149
3152
|
{
|
|
@@ -3152,18 +3155,19 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3152
3155
|
children: [
|
|
3153
3156
|
/* @__PURE__ */ z.jsxs("div", { className: "bu-flex bu-items-center", children: [
|
|
3154
3157
|
e.renderHeader ? e.renderHeader([]) : e.title,
|
|
3155
|
-
i(e
|
|
3158
|
+
i(e),
|
|
3156
3159
|
e.renderEndIcon ? e.renderEndIcon() : null
|
|
3157
3160
|
] }),
|
|
3158
|
-
|
|
3161
|
+
E && /* @__PURE__ */ z.jsx(
|
|
3159
3162
|
"span",
|
|
3160
3163
|
{
|
|
3161
|
-
|
|
3164
|
+
"data-drag-handle": !0,
|
|
3165
|
+
className: `${Me(
|
|
3162
3166
|
oe.dragHandle({
|
|
3163
3167
|
theme: l
|
|
3164
3168
|
}),
|
|
3165
3169
|
"group-hover:bu-opacity-100"
|
|
3166
|
-
)
|
|
3170
|
+
)} drag-handle-icon`,
|
|
3167
3171
|
style: {
|
|
3168
3172
|
display: "flex",
|
|
3169
3173
|
alignItems: "center",
|
|
@@ -3189,20 +3193,17 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3189
3193
|
theme: l = "light"
|
|
3190
3194
|
} = e, d = (c) => {
|
|
3191
3195
|
c.filter && c.key && r(c.key, c.type);
|
|
3192
|
-
}, u = (c
|
|
3196
|
+
}, u = (c) => {
|
|
3193
3197
|
if (!c.filter || !c.key)
|
|
3194
3198
|
return null;
|
|
3195
|
-
const
|
|
3199
|
+
const h = n[c.key] || V.default, f = l === "dark" ? "#EBECF5" : "#0A0A0A", v = "#F80", g = h !== V.default;
|
|
3196
3200
|
return /* @__PURE__ */ z.jsx(
|
|
3197
3201
|
"span",
|
|
3198
3202
|
{
|
|
3199
3203
|
className: Me(
|
|
3200
3204
|
"bu-inline-flex bu-align-middle bu-transition-opacity bu-duration-200",
|
|
3201
|
-
"bu-ml-[4px]
|
|
3205
|
+
"bu-ml-[4px]"
|
|
3202
3206
|
),
|
|
3203
|
-
onClick: (w) => {
|
|
3204
|
-
w.stopPropagation(), h(c);
|
|
3205
|
-
},
|
|
3206
3207
|
children: /* @__PURE__ */ z.jsxs(
|
|
3207
3208
|
"svg",
|
|
3208
3209
|
{
|
|
@@ -3213,23 +3214,23 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3213
3214
|
fill: "none",
|
|
3214
3215
|
className: Me(
|
|
3215
3216
|
"bu-transition-opacity bu-duration-200",
|
|
3216
|
-
|
|
3217
|
+
g ? "bu-opacity-100" : "bu-opacity-0 group-hover:bu-opacity-100"
|
|
3217
3218
|
),
|
|
3218
3219
|
children: [
|
|
3219
3220
|
/* @__PURE__ */ z.jsx(
|
|
3220
3221
|
"path",
|
|
3221
3222
|
{
|
|
3222
3223
|
d: "M5.4847 3.04301V4.10942H0.151367V3.04301L2.81803 0.376343L5.4847 3.04301Z",
|
|
3223
|
-
fill:
|
|
3224
|
-
fillOpacity:
|
|
3224
|
+
fill: h === V.asc ? v : f,
|
|
3225
|
+
fillOpacity: h === V.asc ? "1" : "0.2"
|
|
3225
3226
|
}
|
|
3226
3227
|
),
|
|
3227
3228
|
/* @__PURE__ */ z.jsx(
|
|
3228
3229
|
"path",
|
|
3229
3230
|
{
|
|
3230
3231
|
d: "M5.4847 5.89067V6.95707L2.81803 9.62374L0.151367 6.95707V5.89067H5.4847Z",
|
|
3231
|
-
fill:
|
|
3232
|
-
fillOpacity:
|
|
3232
|
+
fill: h === V.desc ? v : f,
|
|
3233
|
+
fillOpacity: h === V.desc ? "1" : "0.2"
|
|
3233
3234
|
}
|
|
3234
3235
|
)
|
|
3235
3236
|
]
|
|
@@ -3325,7 +3326,7 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3325
3326
|
dragHandleIcon: h,
|
|
3326
3327
|
maxHeight: f,
|
|
3327
3328
|
rowIdPrefix: v
|
|
3328
|
-
} = e, { theme: g } =
|
|
3329
|
+
} = e, { theme: g } = Wn(), [b, x] = Ce.useState(t), [p, y] = Ce.useState({}), [R, S] = Ce.useState(null), E = pr(
|
|
3329
3330
|
Kt(Lt, {
|
|
3330
3331
|
activationConstraint: {
|
|
3331
3332
|
distance: 8
|
|
@@ -3335,36 +3336,36 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3335
3336
|
Kt(Ot)
|
|
3336
3337
|
);
|
|
3337
3338
|
Ce.useEffect(() => {
|
|
3338
|
-
|
|
3339
|
+
x(t);
|
|
3339
3340
|
}, [t]);
|
|
3340
|
-
const
|
|
3341
|
+
const m = (T, J) => {
|
|
3341
3342
|
const U = p[T] || V.default;
|
|
3342
3343
|
let k;
|
|
3343
3344
|
U === V.default ? k = V.desc : U === V.desc ? k = V.asc : k = V.default;
|
|
3344
3345
|
const se = J || "single";
|
|
3345
|
-
let
|
|
3346
|
-
if (se === "single" ?
|
|
3346
|
+
let B;
|
|
3347
|
+
if (se === "single" ? B = { [T]: k } : (B = { ...p, [T]: k }, k === V.default && delete B[T]), y(B), l)
|
|
3347
3348
|
if (se === "single")
|
|
3348
3349
|
l({ sortKey: T, sort: k });
|
|
3349
3350
|
else {
|
|
3350
|
-
const ae = Object.entries(
|
|
3351
|
+
const ae = Object.entries(B).map(([le, X]) => ({
|
|
3351
3352
|
sortKey: le,
|
|
3352
|
-
sort:
|
|
3353
|
+
sort: X
|
|
3353
3354
|
}));
|
|
3354
3355
|
l(ae);
|
|
3355
3356
|
}
|
|
3356
|
-
},
|
|
3357
|
-
|
|
3358
|
-
},
|
|
3357
|
+
}, w = (T) => {
|
|
3358
|
+
S(T.active.id);
|
|
3359
|
+
}, D = (T) => {
|
|
3359
3360
|
const { active: J, over: U } = T;
|
|
3360
|
-
|
|
3361
|
-
const se = k.findIndex((le) => le.key === J.id),
|
|
3362
|
-
if (se === -1 ||
|
|
3361
|
+
S(null), !(!U || J.id === U.id) && x((k) => {
|
|
3362
|
+
const se = k.findIndex((le) => le.key === J.id), B = k.findIndex((le) => le.key === U.id);
|
|
3363
|
+
if (se === -1 || B === -1 || k[B].fixed)
|
|
3363
3364
|
return k;
|
|
3364
|
-
const ae = zt(k, se,
|
|
3365
|
+
const ae = zt(k, se, B);
|
|
3365
3366
|
return c && c(ae), ae;
|
|
3366
3367
|
});
|
|
3367
|
-
}, N = b.filter((T) => !T.fixed && T.key).map((T) => T.key),
|
|
3368
|
+
}, N = b.filter((T) => !T.fixed && T.key).map((T) => T.key), P = (() => {
|
|
3368
3369
|
const T = b.reduce((J, U) => {
|
|
3369
3370
|
if (U.width) {
|
|
3370
3371
|
const k = parseInt(U.width);
|
|
@@ -3373,7 +3374,7 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3373
3374
|
return J + 150;
|
|
3374
3375
|
}, 0);
|
|
3375
3376
|
return T > 0 ? `${T}px` : void 0;
|
|
3376
|
-
})(),
|
|
3377
|
+
})(), j = () => /* @__PURE__ */ z.jsx(
|
|
3377
3378
|
"div",
|
|
3378
3379
|
{
|
|
3379
3380
|
className: oe.container({ theme: g }),
|
|
@@ -3384,8 +3385,7 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3384
3385
|
className: oe.table(),
|
|
3385
3386
|
style: {
|
|
3386
3387
|
tableLayout: d,
|
|
3387
|
-
|
|
3388
|
-
minWidth: d === "fixed" ? Y : void 0
|
|
3388
|
+
minWidth: d === "fixed" ? P : void 0
|
|
3389
3389
|
},
|
|
3390
3390
|
children: [
|
|
3391
3391
|
/* @__PURE__ */ z.jsx(
|
|
@@ -3393,8 +3393,8 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3393
3393
|
{
|
|
3394
3394
|
columns: b,
|
|
3395
3395
|
sortStates: p,
|
|
3396
|
-
onSort:
|
|
3397
|
-
activeId: u ?
|
|
3396
|
+
onSort: m,
|
|
3397
|
+
activeId: u ? R : null,
|
|
3398
3398
|
theadClass: o,
|
|
3399
3399
|
draggable: u,
|
|
3400
3400
|
dragHandleIcon: h,
|
|
@@ -3421,21 +3421,21 @@ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
|
|
|
3421
3421
|
return u ? /* @__PURE__ */ z.jsx(
|
|
3422
3422
|
So,
|
|
3423
3423
|
{
|
|
3424
|
-
sensors:
|
|
3424
|
+
sensors: E,
|
|
3425
3425
|
collisionDetection: Sr,
|
|
3426
|
-
onDragStart:
|
|
3427
|
-
onDragEnd:
|
|
3426
|
+
onDragStart: w,
|
|
3427
|
+
onDragEnd: D,
|
|
3428
3428
|
modifiers: [Vo],
|
|
3429
3429
|
children: /* @__PURE__ */ z.jsx(
|
|
3430
3430
|
zo,
|
|
3431
3431
|
{
|
|
3432
3432
|
items: N,
|
|
3433
3433
|
strategy: Mo,
|
|
3434
|
-
children:
|
|
3434
|
+
children: j()
|
|
3435
3435
|
}
|
|
3436
3436
|
)
|
|
3437
3437
|
}
|
|
3438
|
-
) :
|
|
3438
|
+
) : j();
|
|
3439
3439
|
};
|
|
3440
3440
|
export {
|
|
3441
3441
|
Zo as P,
|