@mdspl/mds-shared-ui 1.3.4 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +1 -2
- package/dist/index.js +746 -733
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Wt from "react";
|
|
2
|
-
import oe, { useLayoutEffect as $o, useEffect as V, useRef as G, useMemo as
|
|
3
|
-
import { Menu as yt, Checkbox as
|
|
2
|
+
import oe, { useLayoutEffect as $o, useEffect as V, useRef as G, useMemo as B, useCallback as Q, useState as H, createContext as rt, memo as kr, useReducer as Ao, useContext as Ye, forwardRef as On, createElement as wn } from "react";
|
|
3
|
+
import { Menu as yt, Checkbox as Re, IconButton as we, Portal as Ge, Table as ae, HStack as fe, Box as ue, Select as ee, Pagination as Vt, createListCollection as _n, Text as X, ButtonGroup as ko, Skeleton as zo, Spinner as zr, Combobox as He, Popover as $e, Group as Lr, Input as Xt, InputAddon as Nr, Grid as Pr, Button as Te, Field as Me, InputGroup as Lo, CloseButton as wt, Slider as St, VStack as gt, Drawer as Ae, Tabs as Kt, Dialog as K, Stack as Yt, Flex as ln, PinInput as Jt } from "@chakra-ui/react";
|
|
4
4
|
import { unstable_batchedUpdates as Mt, createPortal as No, flushSync as Po } from "react-dom";
|
|
5
5
|
function Zt(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -40,11 +40,11 @@ function Wo() {
|
|
|
40
40
|
switch (v) {
|
|
41
41
|
case x:
|
|
42
42
|
return "Fragment";
|
|
43
|
-
case
|
|
43
|
+
case E:
|
|
44
44
|
return "Profiler";
|
|
45
|
-
case
|
|
45
|
+
case D:
|
|
46
46
|
return "StrictMode";
|
|
47
|
-
case
|
|
47
|
+
case T:
|
|
48
48
|
return "Suspense";
|
|
49
49
|
case k:
|
|
50
50
|
return "SuspenseList";
|
|
@@ -57,9 +57,9 @@ function Wo() {
|
|
|
57
57
|
), v.$$typeof) {
|
|
58
58
|
case m:
|
|
59
59
|
return "Portal";
|
|
60
|
-
case
|
|
60
|
+
case _:
|
|
61
61
|
return v.displayName || "Context";
|
|
62
|
-
case
|
|
62
|
+
case j:
|
|
63
63
|
return (v._context.displayName || "Context") + ".Consumer";
|
|
64
64
|
case I:
|
|
65
65
|
var O = v.render;
|
|
@@ -138,7 +138,7 @@ function Wo() {
|
|
|
138
138
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
139
139
|
)), v = this.props.ref, v !== void 0 ? v : null;
|
|
140
140
|
}
|
|
141
|
-
function u(v, O, L, N,
|
|
141
|
+
function u(v, O, L, N, J, q) {
|
|
142
142
|
var Y = L.ref;
|
|
143
143
|
return v = {
|
|
144
144
|
$$typeof: f,
|
|
@@ -163,7 +163,7 @@ function Wo() {
|
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
166
|
+
value: J
|
|
167
167
|
}), Object.defineProperty(v, "_debugTask", {
|
|
168
168
|
configurable: !1,
|
|
169
169
|
enumerable: !1,
|
|
@@ -171,11 +171,11 @@ function Wo() {
|
|
|
171
171
|
value: q
|
|
172
172
|
}), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
|
|
173
173
|
}
|
|
174
|
-
function h(v, O, L, N,
|
|
174
|
+
function h(v, O, L, N, J, q) {
|
|
175
175
|
var Y = O.children;
|
|
176
176
|
if (Y !== void 0)
|
|
177
177
|
if (N)
|
|
178
|
-
if (
|
|
178
|
+
if (R(Y)) {
|
|
179
179
|
for (N = 0; N < Y.length; N++)
|
|
180
180
|
d(Y[N]);
|
|
181
181
|
Object.freeze && Object.freeze(Y);
|
|
@@ -215,7 +215,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
215
215
|
Y,
|
|
216
216
|
L,
|
|
217
217
|
o(),
|
|
218
|
-
|
|
218
|
+
J,
|
|
219
219
|
q
|
|
220
220
|
);
|
|
221
221
|
}
|
|
@@ -225,7 +225,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
225
225
|
function p(v) {
|
|
226
226
|
return typeof v == "object" && v !== null && v.$$typeof === f;
|
|
227
227
|
}
|
|
228
|
-
var g = oe, f = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), x = /* @__PURE__ */ Symbol.for("react.fragment"),
|
|
228
|
+
var g = oe, f = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), x = /* @__PURE__ */ Symbol.for("react.fragment"), D = /* @__PURE__ */ Symbol.for("react.strict_mode"), E = /* @__PURE__ */ Symbol.for("react.profiler"), j = /* @__PURE__ */ Symbol.for("react.consumer"), _ = /* @__PURE__ */ Symbol.for("react.context"), I = /* @__PURE__ */ Symbol.for("react.forward_ref"), T = /* @__PURE__ */ Symbol.for("react.suspense"), k = /* @__PURE__ */ Symbol.for("react.suspense_list"), $ = /* @__PURE__ */ Symbol.for("react.memo"), W = /* @__PURE__ */ Symbol.for("react.lazy"), P = /* @__PURE__ */ Symbol.for("react.activity"), A = /* @__PURE__ */ Symbol.for("react.client.reference"), Z = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, te = Object.prototype.hasOwnProperty, R = Array.isArray, y = console.createTask ? console.createTask : function() {
|
|
229
229
|
return null;
|
|
230
230
|
};
|
|
231
231
|
g = {
|
|
@@ -268,7 +268,7 @@ var l = Vo();
|
|
|
268
268
|
function Yo() {
|
|
269
269
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
270
270
|
t[n] = arguments[n];
|
|
271
|
-
return
|
|
271
|
+
return B(
|
|
272
272
|
() => (r) => {
|
|
273
273
|
t.forEach((o) => o(r));
|
|
274
274
|
},
|
|
@@ -304,10 +304,10 @@ function Fr(e) {
|
|
|
304
304
|
function st(e) {
|
|
305
305
|
return e ? ot(e) ? e.document : Tn(e) ? In(e) ? e : Ct(e) || Fr(e) ? e.ownerDocument : document : document : document;
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const Ie = Qt ? $o : V;
|
|
308
308
|
function $n(e) {
|
|
309
309
|
const t = G(e);
|
|
310
|
-
return
|
|
310
|
+
return Ie(() => {
|
|
311
311
|
t.current = e;
|
|
312
312
|
}), Q(function() {
|
|
313
313
|
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
@@ -326,13 +326,13 @@ function Ho() {
|
|
|
326
326
|
function xt(e, t) {
|
|
327
327
|
t === void 0 && (t = [e]);
|
|
328
328
|
const n = G(e);
|
|
329
|
-
return
|
|
329
|
+
return Ie(() => {
|
|
330
330
|
n.current !== e && (n.current = e);
|
|
331
331
|
}, t), n;
|
|
332
332
|
}
|
|
333
333
|
function Dt(e, t) {
|
|
334
334
|
const n = G();
|
|
335
|
-
return
|
|
335
|
+
return B(
|
|
336
336
|
() => {
|
|
337
337
|
const r = e(n.current);
|
|
338
338
|
return n.current = r, r;
|
|
@@ -359,7 +359,7 @@ function Sn(e) {
|
|
|
359
359
|
}
|
|
360
360
|
let cn = {};
|
|
361
361
|
function jt(e, t) {
|
|
362
|
-
return
|
|
362
|
+
return B(() => {
|
|
363
363
|
if (t)
|
|
364
364
|
return t;
|
|
365
365
|
const n = cn[e] == null ? 0 : cn[e] + 1;
|
|
@@ -524,7 +524,7 @@ function Jo() {
|
|
|
524
524
|
}
|
|
525
525
|
const Vr = /* @__PURE__ */ rt(null);
|
|
526
526
|
function Zo(e) {
|
|
527
|
-
const t =
|
|
527
|
+
const t = Ye(Vr);
|
|
528
528
|
V(() => {
|
|
529
529
|
if (!t)
|
|
530
530
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
@@ -591,7 +591,7 @@ function ns(e) {
|
|
|
591
591
|
} = Jo(), i = jt("DndLiveRegion"), [c, u] = H(!1);
|
|
592
592
|
if (V(() => {
|
|
593
593
|
u(!0);
|
|
594
|
-
}, []), Zo(
|
|
594
|
+
}, []), Zo(B(() => ({
|
|
595
595
|
onDragStart(d) {
|
|
596
596
|
let {
|
|
597
597
|
active: p
|
|
@@ -658,7 +658,7 @@ var se;
|
|
|
658
658
|
function Ut() {
|
|
659
659
|
}
|
|
660
660
|
function rs(e, t) {
|
|
661
|
-
return
|
|
661
|
+
return B(
|
|
662
662
|
() => ({
|
|
663
663
|
sensor: e,
|
|
664
664
|
options: {}
|
|
@@ -670,13 +670,13 @@ function rs(e, t) {
|
|
|
670
670
|
function os() {
|
|
671
671
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
672
672
|
t[n] = arguments[n];
|
|
673
|
-
return
|
|
673
|
+
return B(
|
|
674
674
|
() => [...t].filter((r) => r != null),
|
|
675
675
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
676
676
|
[...t]
|
|
677
677
|
);
|
|
678
678
|
}
|
|
679
|
-
const
|
|
679
|
+
const Ee = /* @__PURE__ */ Object.freeze({
|
|
680
680
|
x: 0,
|
|
681
681
|
y: 0
|
|
682
682
|
});
|
|
@@ -786,7 +786,7 @@ function Hr(e, t) {
|
|
|
786
786
|
return e && t ? {
|
|
787
787
|
x: e.left - t.left,
|
|
788
788
|
y: e.top - t.top
|
|
789
|
-
} :
|
|
789
|
+
} : Ee;
|
|
790
790
|
}
|
|
791
791
|
function hs(e) {
|
|
792
792
|
return function(n) {
|
|
@@ -1026,7 +1026,7 @@ function Ss(e) {
|
|
|
1026
1026
|
};
|
|
1027
1027
|
}
|
|
1028
1028
|
function Kr(e) {
|
|
1029
|
-
return e.reduce((t, n) => tt(t, Dn(n)),
|
|
1029
|
+
return e.reduce((t, n) => tt(t, Dn(n)), Ee);
|
|
1030
1030
|
}
|
|
1031
1031
|
function Cs(e) {
|
|
1032
1032
|
return e.reduce((t, n) => t + Ur(n), 0);
|
|
@@ -1094,45 +1094,45 @@ function dn(e, t) {
|
|
|
1094
1094
|
const n = Math.abs(e.x), r = Math.abs(e.y);
|
|
1095
1095
|
return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
|
|
1096
1096
|
}
|
|
1097
|
-
var
|
|
1097
|
+
var Ce;
|
|
1098
1098
|
(function(e) {
|
|
1099
1099
|
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
1100
|
-
})(
|
|
1100
|
+
})(Ce || (Ce = {}));
|
|
1101
1101
|
function tr(e) {
|
|
1102
1102
|
e.preventDefault();
|
|
1103
1103
|
}
|
|
1104
1104
|
function Ms(e) {
|
|
1105
1105
|
e.stopPropagation();
|
|
1106
1106
|
}
|
|
1107
|
-
var
|
|
1107
|
+
var U;
|
|
1108
1108
|
(function(e) {
|
|
1109
1109
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
1110
|
-
})(
|
|
1110
|
+
})(U || (U = {}));
|
|
1111
1111
|
const Jr = {
|
|
1112
|
-
start: [
|
|
1113
|
-
cancel: [
|
|
1114
|
-
end: [
|
|
1112
|
+
start: [U.Space, U.Enter],
|
|
1113
|
+
cancel: [U.Esc],
|
|
1114
|
+
end: [U.Space, U.Enter, U.Tab]
|
|
1115
1115
|
}, Os = (e, t) => {
|
|
1116
1116
|
let {
|
|
1117
1117
|
currentCoordinates: n
|
|
1118
1118
|
} = t;
|
|
1119
1119
|
switch (e.code) {
|
|
1120
|
-
case
|
|
1120
|
+
case U.Right:
|
|
1121
1121
|
return {
|
|
1122
1122
|
...n,
|
|
1123
1123
|
x: n.x + 25
|
|
1124
1124
|
};
|
|
1125
|
-
case
|
|
1125
|
+
case U.Left:
|
|
1126
1126
|
return {
|
|
1127
1127
|
...n,
|
|
1128
1128
|
x: n.x - 25
|
|
1129
1129
|
};
|
|
1130
|
-
case
|
|
1130
|
+
case U.Down:
|
|
1131
1131
|
return {
|
|
1132
1132
|
...n,
|
|
1133
1133
|
y: n.y + 25
|
|
1134
1134
|
};
|
|
1135
|
-
case
|
|
1135
|
+
case U.Up:
|
|
1136
1136
|
return {
|
|
1137
1137
|
...n,
|
|
1138
1138
|
y: n.y - 25
|
|
@@ -1150,14 +1150,14 @@ class Zr {
|
|
|
1150
1150
|
this.props = t, this.listeners = new pt(st(n)), this.windowListeners = new pt(me(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
1151
1151
|
}
|
|
1152
1152
|
attach() {
|
|
1153
|
-
this.handleStart(), this.windowListeners.add(
|
|
1153
|
+
this.handleStart(), this.windowListeners.add(Ce.Resize, this.handleCancel), this.windowListeners.add(Ce.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(Ce.Keydown, this.handleKeyDown));
|
|
1154
1154
|
}
|
|
1155
1155
|
handleStart() {
|
|
1156
1156
|
const {
|
|
1157
1157
|
activeNode: t,
|
|
1158
1158
|
onStart: n
|
|
1159
1159
|
} = this.props, r = t.node.current;
|
|
1160
|
-
r && js(r), n(
|
|
1160
|
+
r && js(r), n(Ee);
|
|
1161
1161
|
}
|
|
1162
1162
|
handleKeyDown(t) {
|
|
1163
1163
|
if (An(t)) {
|
|
@@ -1185,7 +1185,7 @@ class Zr {
|
|
|
1185
1185
|
} = r.current, h = u ? {
|
|
1186
1186
|
x: u.left,
|
|
1187
1187
|
y: u.top
|
|
1188
|
-
} :
|
|
1188
|
+
} : Ee;
|
|
1189
1189
|
this.referenceCoordinates || (this.referenceCoordinates = h);
|
|
1190
1190
|
const d = a(t, {
|
|
1191
1191
|
active: n,
|
|
@@ -1201,18 +1201,18 @@ class Zr {
|
|
|
1201
1201
|
} = r.current;
|
|
1202
1202
|
for (const m of f) {
|
|
1203
1203
|
const x = t.code, {
|
|
1204
|
-
isTop:
|
|
1205
|
-
isRight:
|
|
1206
|
-
isLeft:
|
|
1207
|
-
isBottom:
|
|
1204
|
+
isTop: D,
|
|
1205
|
+
isRight: E,
|
|
1206
|
+
isLeft: j,
|
|
1207
|
+
isBottom: _,
|
|
1208
1208
|
maxScroll: I,
|
|
1209
|
-
minScroll:
|
|
1209
|
+
minScroll: T
|
|
1210
1210
|
} = Xr(m), k = Ss(m), $ = {
|
|
1211
|
-
x: Math.min(x ===
|
|
1212
|
-
y: Math.min(x ===
|
|
1213
|
-
}, W = x ===
|
|
1211
|
+
x: Math.min(x === U.Right ? k.right - k.width / 2 : k.right, Math.max(x === U.Right ? k.left : k.left + k.width / 2, d.x)),
|
|
1212
|
+
y: Math.min(x === U.Down ? k.bottom - k.height / 2 : k.bottom, Math.max(x === U.Down ? k.top : k.top + k.height / 2, d.y))
|
|
1213
|
+
}, W = x === U.Right && !E || x === U.Left && !j, P = x === U.Down && !_ || x === U.Up && !D;
|
|
1214
1214
|
if (W && $.x !== d.x) {
|
|
1215
|
-
const A = m.scrollLeft + p.x, Z = x ===
|
|
1215
|
+
const A = m.scrollLeft + p.x, Z = x === U.Right && A <= I.x || x === U.Left && A >= T.x;
|
|
1216
1216
|
if (Z && !p.y) {
|
|
1217
1217
|
m.scrollTo({
|
|
1218
1218
|
left: A,
|
|
@@ -1220,13 +1220,13 @@ class Zr {
|
|
|
1220
1220
|
});
|
|
1221
1221
|
return;
|
|
1222
1222
|
}
|
|
1223
|
-
Z ? g.x = m.scrollLeft - A : g.x = x ===
|
|
1223
|
+
Z ? g.x = m.scrollLeft - A : g.x = x === U.Right ? m.scrollLeft - I.x : m.scrollLeft - T.x, g.x && m.scrollBy({
|
|
1224
1224
|
left: -g.x,
|
|
1225
1225
|
behavior: i
|
|
1226
1226
|
});
|
|
1227
1227
|
break;
|
|
1228
1228
|
} else if (P && $.y !== d.y) {
|
|
1229
|
-
const A = m.scrollTop + p.y, Z = x ===
|
|
1229
|
+
const A = m.scrollTop + p.y, Z = x === U.Down && A <= I.y || x === U.Up && A >= T.y;
|
|
1230
1230
|
if (Z && !p.x) {
|
|
1231
1231
|
m.scrollTo({
|
|
1232
1232
|
top: A,
|
|
@@ -1234,7 +1234,7 @@ class Zr {
|
|
|
1234
1234
|
});
|
|
1235
1235
|
return;
|
|
1236
1236
|
}
|
|
1237
|
-
Z ? g.y = m.scrollTop - A : g.y = x ===
|
|
1237
|
+
Z ? g.y = m.scrollTop - A : g.y = x === U.Down ? m.scrollTop - I.y : m.scrollTop - T.y, g.y && m.scrollBy({
|
|
1238
1238
|
top: -g.y,
|
|
1239
1239
|
behavior: i
|
|
1240
1240
|
});
|
|
@@ -1303,7 +1303,7 @@ class Ln {
|
|
|
1303
1303
|
} = t, {
|
|
1304
1304
|
target: a
|
|
1305
1305
|
} = s;
|
|
1306
|
-
this.props = t, this.events = n, this.document = st(a), this.documentListeners = new pt(this.document), this.listeners = new pt(r), this.windowListeners = new pt(me(a)), this.initialCoordinates = (o = Cn(s)) != null ? o :
|
|
1306
|
+
this.props = t, this.events = n, this.document = st(a), this.documentListeners = new pt(this.document), this.listeners = new pt(r), this.windowListeners = new pt(me(a)), this.initialCoordinates = (o = Cn(s)) != null ? o : Ee, 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();
|
|
1307
1307
|
}
|
|
1308
1308
|
attach() {
|
|
1309
1309
|
const {
|
|
@@ -1317,7 +1317,7 @@ class Ln {
|
|
|
1317
1317
|
} = this;
|
|
1318
1318
|
if (this.listeners.add(t.move.name, this.handleMove, {
|
|
1319
1319
|
passive: !1
|
|
1320
|
-
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(
|
|
1320
|
+
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(Ce.Resize, this.handleCancel), this.windowListeners.add(Ce.DragStart, tr), this.windowListeners.add(Ce.VisibilityChange, this.handleCancel), this.windowListeners.add(Ce.ContextMenu, tr), this.documentListeners.add(Ce.Keydown, this.handleKeydown), n) {
|
|
1321
1321
|
if (r != null && r({
|
|
1322
1322
|
event: this.props.event,
|
|
1323
1323
|
activeNode: this.props.activeNode,
|
|
@@ -1351,9 +1351,9 @@ class Ln {
|
|
|
1351
1351
|
} = this, {
|
|
1352
1352
|
onStart: n
|
|
1353
1353
|
} = this.props;
|
|
1354
|
-
t && (this.activated = !0, this.documentListeners.add(
|
|
1354
|
+
t && (this.activated = !0, this.documentListeners.add(Ce.Click, Ms, {
|
|
1355
1355
|
capture: !0
|
|
1356
|
-
}), this.removeTextSelection(), this.documentListeners.add(
|
|
1356
|
+
}), this.removeTextSelection(), this.documentListeners.add(Ce.SelectionChange, this.removeTextSelection), n(t));
|
|
1357
1357
|
}
|
|
1358
1358
|
handleMove(t) {
|
|
1359
1359
|
var n;
|
|
@@ -1369,7 +1369,7 @@ class Ln {
|
|
|
1369
1369
|
} = s;
|
|
1370
1370
|
if (!o)
|
|
1371
1371
|
return;
|
|
1372
|
-
const c = (n = Cn(t)) != null ? n :
|
|
1372
|
+
const c = (n = Cn(t)) != null ? n : Ee, u = Bt(o, c);
|
|
1373
1373
|
if (!r && i) {
|
|
1374
1374
|
if (nr(i)) {
|
|
1375
1375
|
if (i.tolerance != null && dn(u, i.tolerance))
|
|
@@ -1399,7 +1399,7 @@ class Ln {
|
|
|
1399
1399
|
this.detach(), this.activated || t(this.props.active), n();
|
|
1400
1400
|
}
|
|
1401
1401
|
handleKeydown(t) {
|
|
1402
|
-
t.code ===
|
|
1402
|
+
t.code === U.Esc && this.handleCancel();
|
|
1403
1403
|
}
|
|
1404
1404
|
removeTextSelection() {
|
|
1405
1405
|
var t;
|
|
@@ -1539,10 +1539,10 @@ function As(e) {
|
|
|
1539
1539
|
}), [f, m] = Ho(), x = G({
|
|
1540
1540
|
x: 0,
|
|
1541
1541
|
y: 0
|
|
1542
|
-
}),
|
|
1542
|
+
}), D = G({
|
|
1543
1543
|
x: 0,
|
|
1544
1544
|
y: 0
|
|
1545
|
-
}),
|
|
1545
|
+
}), E = B(() => {
|
|
1546
1546
|
switch (n) {
|
|
1547
1547
|
case mt.Pointer:
|
|
1548
1548
|
return c ? {
|
|
@@ -1554,40 +1554,40 @@ function As(e) {
|
|
|
1554
1554
|
case mt.DraggableRect:
|
|
1555
1555
|
return o;
|
|
1556
1556
|
}
|
|
1557
|
-
}, [n, o, c]),
|
|
1558
|
-
const
|
|
1559
|
-
if (!
|
|
1557
|
+
}, [n, o, c]), j = G(null), _ = Q(() => {
|
|
1558
|
+
const T = j.current;
|
|
1559
|
+
if (!T)
|
|
1560
1560
|
return;
|
|
1561
|
-
const k = x.current.x *
|
|
1562
|
-
|
|
1563
|
-
}, []), I =
|
|
1561
|
+
const k = x.current.x * D.current.x, $ = x.current.y * D.current.y;
|
|
1562
|
+
T.scrollBy(k, $);
|
|
1563
|
+
}, []), I = B(() => i === Gt.TreeOrder ? [...u].reverse() : u, [i, u]);
|
|
1564
1564
|
V(
|
|
1565
1565
|
() => {
|
|
1566
|
-
if (!s || !u.length || !
|
|
1566
|
+
if (!s || !u.length || !E) {
|
|
1567
1567
|
m();
|
|
1568
1568
|
return;
|
|
1569
1569
|
}
|
|
1570
|
-
for (const
|
|
1571
|
-
if (r?.(
|
|
1570
|
+
for (const T of I) {
|
|
1571
|
+
if (r?.(T) === !1)
|
|
1572
1572
|
continue;
|
|
1573
|
-
const k = u.indexOf(
|
|
1573
|
+
const k = u.indexOf(T), $ = h[k];
|
|
1574
1574
|
if (!$)
|
|
1575
1575
|
continue;
|
|
1576
1576
|
const {
|
|
1577
1577
|
direction: W,
|
|
1578
1578
|
speed: P
|
|
1579
|
-
} = ws(
|
|
1579
|
+
} = ws(T, $, E, t, p);
|
|
1580
1580
|
for (const A of ["x", "y"])
|
|
1581
1581
|
g[A][W[A]] || (P[A] = 0, W[A] = 0);
|
|
1582
1582
|
if (P.x > 0 || P.y > 0) {
|
|
1583
|
-
m(),
|
|
1583
|
+
m(), j.current = T, f(_, a), x.current = P, D.current = W;
|
|
1584
1584
|
return;
|
|
1585
1585
|
}
|
|
1586
1586
|
}
|
|
1587
1587
|
x.current = {
|
|
1588
1588
|
x: 0,
|
|
1589
1589
|
y: 0
|
|
1590
|
-
},
|
|
1590
|
+
}, D.current = {
|
|
1591
1591
|
x: 0,
|
|
1592
1592
|
y: 0
|
|
1593
1593
|
}, m();
|
|
@@ -1595,13 +1595,13 @@ function As(e) {
|
|
|
1595
1595
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1596
1596
|
[
|
|
1597
1597
|
t,
|
|
1598
|
-
|
|
1598
|
+
_,
|
|
1599
1599
|
r,
|
|
1600
1600
|
m,
|
|
1601
1601
|
s,
|
|
1602
1602
|
a,
|
|
1603
1603
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1604
|
-
JSON.stringify(
|
|
1604
|
+
JSON.stringify(E),
|
|
1605
1605
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1606
1606
|
JSON.stringify(g),
|
|
1607
1607
|
f,
|
|
@@ -1656,7 +1656,7 @@ function Ls(e, t) {
|
|
|
1656
1656
|
}, [r, t]);
|
|
1657
1657
|
}
|
|
1658
1658
|
function Ns(e, t) {
|
|
1659
|
-
return
|
|
1659
|
+
return B(() => e.reduce((n, r) => {
|
|
1660
1660
|
const {
|
|
1661
1661
|
sensor: o
|
|
1662
1662
|
} = r, s = o.activators.map((a) => ({
|
|
@@ -1685,26 +1685,26 @@ function Ps(e, t) {
|
|
|
1685
1685
|
frequency: i,
|
|
1686
1686
|
measure: c,
|
|
1687
1687
|
strategy: u
|
|
1688
|
-
} = o, h = G(e), d = x(), p = xt(d), g = Q(function(
|
|
1689
|
-
|
|
1690
|
-
}, [p]), f = G(null), m = Dt((
|
|
1688
|
+
} = o, h = G(e), d = x(), p = xt(d), g = Q(function(D) {
|
|
1689
|
+
D === void 0 && (D = []), !p.current && a((E) => E === null ? D : E.concat(D.filter((j) => !E.includes(j))));
|
|
1690
|
+
}, [p]), f = G(null), m = Dt((D) => {
|
|
1691
1691
|
if (d && !n)
|
|
1692
1692
|
return or;
|
|
1693
|
-
if (!
|
|
1694
|
-
const
|
|
1695
|
-
for (let
|
|
1696
|
-
if (!
|
|
1693
|
+
if (!D || D === or || h.current !== e || s != null) {
|
|
1694
|
+
const E = /* @__PURE__ */ new Map();
|
|
1695
|
+
for (let j of e) {
|
|
1696
|
+
if (!j)
|
|
1697
1697
|
continue;
|
|
1698
|
-
if (s && s.length > 0 && !s.includes(
|
|
1699
|
-
|
|
1698
|
+
if (s && s.length > 0 && !s.includes(j.id) && j.rect.current) {
|
|
1699
|
+
E.set(j.id, j.rect.current);
|
|
1700
1700
|
continue;
|
|
1701
1701
|
}
|
|
1702
|
-
const
|
|
1703
|
-
|
|
1702
|
+
const _ = j.node.current, I = _ ? new zn(c(_), _) : null;
|
|
1703
|
+
j.rect.current = I, I && E.set(j.id, I);
|
|
1704
1704
|
}
|
|
1705
|
-
return
|
|
1705
|
+
return E;
|
|
1706
1706
|
}
|
|
1707
|
-
return
|
|
1707
|
+
return D;
|
|
1708
1708
|
}, [e, s, n, d, c]);
|
|
1709
1709
|
return V(() => {
|
|
1710
1710
|
h.current = e;
|
|
@@ -1755,7 +1755,7 @@ function Ws(e) {
|
|
|
1755
1755
|
callback: t,
|
|
1756
1756
|
disabled: n
|
|
1757
1757
|
} = e;
|
|
1758
|
-
const r = $n(t), o =
|
|
1758
|
+
const r = $n(t), o = B(() => {
|
|
1759
1759
|
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
1760
1760
|
return;
|
|
1761
1761
|
const {
|
|
@@ -1770,7 +1770,7 @@ function en(e) {
|
|
|
1770
1770
|
callback: t,
|
|
1771
1771
|
disabled: n
|
|
1772
1772
|
} = e;
|
|
1773
|
-
const r = $n(t), o =
|
|
1773
|
+
const r = $n(t), o = B(
|
|
1774
1774
|
() => {
|
|
1775
1775
|
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
1776
1776
|
return;
|
|
@@ -1819,7 +1819,7 @@ function sr(e, t, n) {
|
|
|
1819
1819
|
}), i = en({
|
|
1820
1820
|
callback: s
|
|
1821
1821
|
});
|
|
1822
|
-
return
|
|
1822
|
+
return Ie(() => {
|
|
1823
1823
|
s(), e ? (i?.observe(e), a?.observe(document.body, {
|
|
1824
1824
|
childList: !0,
|
|
1825
1825
|
subtree: !0
|
|
@@ -1863,7 +1863,7 @@ function Bs(e) {
|
|
|
1863
1863
|
u?.removeEventListener("scroll", o);
|
|
1864
1864
|
});
|
|
1865
1865
|
}
|
|
1866
|
-
}, [o, e]),
|
|
1866
|
+
}, [o, e]), B(() => e.length ? t ? Array.from(t.values()).reduce((s, a) => tt(s, a), Ee) : Kr(e) : Ee, [e, t]);
|
|
1867
1867
|
}
|
|
1868
1868
|
function ar(e, t) {
|
|
1869
1869
|
t === void 0 && (t = []);
|
|
@@ -1875,9 +1875,9 @@ function ar(e, t) {
|
|
|
1875
1875
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1876
1876
|
t
|
|
1877
1877
|
), V(() => {
|
|
1878
|
-
const r = e !==
|
|
1878
|
+
const r = e !== Ee;
|
|
1879
1879
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
1880
|
-
}, [e]), n.current ? Bt(e, n.current) :
|
|
1880
|
+
}, [e]), n.current ? Bt(e, n.current) : Ee;
|
|
1881
1881
|
}
|
|
1882
1882
|
function Us(e) {
|
|
1883
1883
|
V(
|
|
@@ -1906,7 +1906,7 @@ function Us(e) {
|
|
|
1906
1906
|
);
|
|
1907
1907
|
}
|
|
1908
1908
|
function Gs(e, t) {
|
|
1909
|
-
return
|
|
1909
|
+
return B(() => e.reduce((n, r) => {
|
|
1910
1910
|
let {
|
|
1911
1911
|
eventName: o,
|
|
1912
1912
|
handler: s
|
|
@@ -1917,7 +1917,7 @@ function Gs(e, t) {
|
|
|
1917
1917
|
}, {}), [e, t]);
|
|
1918
1918
|
}
|
|
1919
1919
|
function eo(e) {
|
|
1920
|
-
return
|
|
1920
|
+
return B(() => e ? vs(e) : null, [e]);
|
|
1921
1921
|
}
|
|
1922
1922
|
const lr = [];
|
|
1923
1923
|
function qs(e, t) {
|
|
@@ -1929,7 +1929,7 @@ function qs(e, t) {
|
|
|
1929
1929
|
const i = en({
|
|
1930
1930
|
callback: a
|
|
1931
1931
|
});
|
|
1932
|
-
return
|
|
1932
|
+
return Ie(() => {
|
|
1933
1933
|
i?.disconnect(), a(), e.forEach((c) => i?.observe(c));
|
|
1934
1934
|
}, [e]), o;
|
|
1935
1935
|
}
|
|
@@ -1966,7 +1966,7 @@ function Ks(e) {
|
|
|
1966
1966
|
const h = Xs(u);
|
|
1967
1967
|
s?.disconnect(), h && s?.observe(h), r(h ? t(h) : null);
|
|
1968
1968
|
}, [t, s]), [i, c] = Ht(a);
|
|
1969
|
-
return
|
|
1969
|
+
return B(() => ({
|
|
1970
1970
|
nodeRef: i,
|
|
1971
1971
|
rect: n,
|
|
1972
1972
|
setRef: c
|
|
@@ -2171,7 +2171,7 @@ function ri(e) {
|
|
|
2171
2171
|
active: n,
|
|
2172
2172
|
activatorEvent: r,
|
|
2173
2173
|
draggableNodes: o
|
|
2174
|
-
} =
|
|
2174
|
+
} = Ye(tn), s = Sn(r), a = Sn(n?.id);
|
|
2175
2175
|
return V(() => {
|
|
2176
2176
|
if (!t && !r && s && a != null) {
|
|
2177
2177
|
if (!An(s) || document.activeElement === s.target)
|
|
@@ -2210,7 +2210,7 @@ function oi(e, t) {
|
|
|
2210
2210
|
}), n) : n;
|
|
2211
2211
|
}
|
|
2212
2212
|
function si(e) {
|
|
2213
|
-
return
|
|
2213
|
+
return B(
|
|
2214
2214
|
() => ({
|
|
2215
2215
|
draggable: {
|
|
2216
2216
|
...zt.draggable,
|
|
@@ -2243,7 +2243,7 @@ function ii(e) {
|
|
|
2243
2243
|
x: o,
|
|
2244
2244
|
y: o
|
|
2245
2245
|
} : o;
|
|
2246
|
-
|
|
2246
|
+
Ie(() => {
|
|
2247
2247
|
if (!a && !i || !t) {
|
|
2248
2248
|
s.current = !1;
|
|
2249
2249
|
return;
|
|
@@ -2264,14 +2264,14 @@ function ii(e) {
|
|
|
2264
2264
|
}, [t, a, i, r, n]);
|
|
2265
2265
|
}
|
|
2266
2266
|
const no = /* @__PURE__ */ rt({
|
|
2267
|
-
...
|
|
2267
|
+
...Ee,
|
|
2268
2268
|
scaleX: 1,
|
|
2269
2269
|
scaleY: 1
|
|
2270
2270
|
});
|
|
2271
|
-
var
|
|
2271
|
+
var Ve;
|
|
2272
2272
|
(function(e) {
|
|
2273
2273
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
2274
|
-
})(
|
|
2274
|
+
})(Ve || (Ve = {}));
|
|
2275
2275
|
const ro = /* @__PURE__ */ kr(function(t) {
|
|
2276
2276
|
var n, r, o, s;
|
|
2277
2277
|
let {
|
|
@@ -2285,7 +2285,7 @@ const ro = /* @__PURE__ */ kr(function(t) {
|
|
|
2285
2285
|
modifiers: g,
|
|
2286
2286
|
...f
|
|
2287
2287
|
} = t;
|
|
2288
|
-
const m = Ao(ni, void 0, ti), [x,
|
|
2288
|
+
const m = Ao(ni, void 0, ti), [x, D] = m, [E, j] = Qo(), [_, I] = H(Ve.Uninitialized), T = _ === Ve.Initialized, {
|
|
2289
2289
|
draggable: {
|
|
2290
2290
|
active: k,
|
|
2291
2291
|
nodes: $,
|
|
@@ -2297,30 +2297,30 @@ const ro = /* @__PURE__ */ kr(function(t) {
|
|
|
2297
2297
|
} = x, A = k != null ? $.get(k) : null, Z = G({
|
|
2298
2298
|
initial: null,
|
|
2299
2299
|
translated: null
|
|
2300
|
-
}), te =
|
|
2301
|
-
var
|
|
2300
|
+
}), te = B(() => {
|
|
2301
|
+
var he;
|
|
2302
2302
|
return k != null ? {
|
|
2303
2303
|
id: k,
|
|
2304
2304
|
// It's possible for the active node to unmount while dragging
|
|
2305
|
-
data: (
|
|
2305
|
+
data: (he = A?.data) != null ? he : Zs,
|
|
2306
2306
|
rect: Z
|
|
2307
2307
|
} : null;
|
|
2308
|
-
}, [k, A]),
|
|
2308
|
+
}, [k, A]), R = G(null), [y, w] = H(null), [C, S] = H(null), M = xt(f, Object.values(f)), z = jt("DndDescribedBy", a), v = B(() => P.getEnabled(), [P]), O = si(p), {
|
|
2309
2309
|
droppableRects: L,
|
|
2310
2310
|
measureDroppableContainers: N,
|
|
2311
|
-
measuringScheduled:
|
|
2311
|
+
measuringScheduled: J
|
|
2312
2312
|
} = Ps(v, {
|
|
2313
|
-
dragging:
|
|
2313
|
+
dragging: T,
|
|
2314
2314
|
dependencies: [W.x, W.y],
|
|
2315
2315
|
config: O.droppable
|
|
2316
|
-
}), q = Ls($, k), Y =
|
|
2316
|
+
}), q = Ls($, k), Y = B(() => C ? Cn(C) : null, [C]), ne = Io(), re = Fs(q, O.draggable.measure);
|
|
2317
2317
|
ii({
|
|
2318
2318
|
activeNode: k != null ? $.get(k) : null,
|
|
2319
2319
|
config: ne.layoutShiftCompensation,
|
|
2320
2320
|
initialRect: re,
|
|
2321
2321
|
measure: O.draggable.measure
|
|
2322
2322
|
});
|
|
2323
|
-
const F = sr(q, O.draggable.measure, re), pe = sr(q ? q.parentElement : null),
|
|
2323
|
+
const F = sr(q, O.draggable.measure, re), pe = sr(q ? q.parentElement : null), de = G({
|
|
2324
2324
|
activatorEvent: null,
|
|
2325
2325
|
active: null,
|
|
2326
2326
|
activeNode: q,
|
|
@@ -2334,9 +2334,9 @@ const ro = /* @__PURE__ */ kr(function(t) {
|
|
|
2334
2334
|
over: null,
|
|
2335
2335
|
scrollableAncestors: [],
|
|
2336
2336
|
scrollAdjustedTranslate: null
|
|
2337
|
-
}),
|
|
2337
|
+
}), De = P.getNodeFor((n = de.current.over) == null ? void 0 : n.id), ke = Ks({
|
|
2338
2338
|
measure: O.dragOverlay.measure
|
|
2339
|
-
}), qe = (r =
|
|
2339
|
+
}), qe = (r = ke.nodeRef.current) != null ? r : q, Xe = T ? (o = ke.rect) != null ? o : F : null, Wn = !!(ke.nodeRef.current && ke.rect), Vn = Ys(Wn ? null : F), on = eo(qe ? me(qe) : null), Le = Hs(T ? De ?? q : null), Et = qs(Le), Rt = oi(g, {
|
|
2340
2340
|
transform: {
|
|
2341
2341
|
x: W.x - Vn.x,
|
|
2342
2342
|
y: W.y - Vn.y,
|
|
@@ -2348,95 +2348,95 @@ const ro = /* @__PURE__ */ kr(function(t) {
|
|
|
2348
2348
|
activeNodeRect: F,
|
|
2349
2349
|
containerNodeRect: pe,
|
|
2350
2350
|
draggingNodeRect: Xe,
|
|
2351
|
-
over:
|
|
2352
|
-
overlayNodeRect:
|
|
2353
|
-
scrollableAncestors:
|
|
2351
|
+
over: de.current.over,
|
|
2352
|
+
overlayNodeRect: ke.rect,
|
|
2353
|
+
scrollableAncestors: Le,
|
|
2354
2354
|
scrollableAncestorRects: Et,
|
|
2355
2355
|
windowRect: on
|
|
2356
|
-
}), Yn = Y ? tt(Y, W) : null, Hn = Bs(
|
|
2356
|
+
}), Yn = Y ? tt(Y, W) : null, Hn = Bs(Le), jo = ar(Hn), Eo = ar(Hn, [F]), Ke = tt(Rt, jo), Je = Xe ? fs(Xe, Rt) : null, lt = te && Je ? d({
|
|
2357
2357
|
active: te,
|
|
2358
2358
|
collisionRect: Je,
|
|
2359
2359
|
droppableRects: L,
|
|
2360
2360
|
droppableContainers: v,
|
|
2361
2361
|
pointerCoordinates: Yn
|
|
2362
|
-
}) : null, Bn = ls(lt, "id"), [
|
|
2363
|
-
(
|
|
2362
|
+
}) : null, Bn = ls(lt, "id"), [Ne, Un] = H(null), Ro = Wn ? Rt : tt(Rt, Eo), Mo = ds(Ro, (s = Ne?.rect) != null ? s : null, F), sn = G(null), Gn = Q(
|
|
2363
|
+
(he, xe) => {
|
|
2364
2364
|
let {
|
|
2365
2365
|
sensor: be,
|
|
2366
|
-
options:
|
|
2366
|
+
options: Pe
|
|
2367
2367
|
} = xe;
|
|
2368
|
-
if (
|
|
2368
|
+
if (R.current == null)
|
|
2369
2369
|
return;
|
|
2370
|
-
const
|
|
2371
|
-
if (!
|
|
2370
|
+
const Se = $.get(R.current);
|
|
2371
|
+
if (!Se)
|
|
2372
2372
|
return;
|
|
2373
|
-
const ye =
|
|
2374
|
-
active:
|
|
2375
|
-
activeNode:
|
|
2373
|
+
const ye = he.nativeEvent, Oe = new be({
|
|
2374
|
+
active: R.current,
|
|
2375
|
+
activeNode: Se,
|
|
2376
2376
|
event: ye,
|
|
2377
|
-
options:
|
|
2377
|
+
options: Pe,
|
|
2378
2378
|
// Sensors need to be instantiated with refs for arguments that change over time
|
|
2379
2379
|
// otherwise they are frozen in time with the stale arguments
|
|
2380
|
-
context:
|
|
2380
|
+
context: de,
|
|
2381
2381
|
onAbort(le) {
|
|
2382
2382
|
if (!$.get(le))
|
|
2383
2383
|
return;
|
|
2384
2384
|
const {
|
|
2385
|
-
onDragAbort:
|
|
2386
|
-
} = M.current,
|
|
2385
|
+
onDragAbort: _e
|
|
2386
|
+
} = M.current, ze = {
|
|
2387
2387
|
id: le
|
|
2388
2388
|
};
|
|
2389
|
-
|
|
2389
|
+
_e?.(ze), E({
|
|
2390
2390
|
type: "onDragAbort",
|
|
2391
|
-
event:
|
|
2391
|
+
event: ze
|
|
2392
2392
|
});
|
|
2393
2393
|
},
|
|
2394
|
-
onPending(le,
|
|
2394
|
+
onPending(le, Fe, _e, ze) {
|
|
2395
2395
|
if (!$.get(le))
|
|
2396
2396
|
return;
|
|
2397
2397
|
const {
|
|
2398
2398
|
onDragPending: ut
|
|
2399
|
-
} = M.current,
|
|
2399
|
+
} = M.current, We = {
|
|
2400
2400
|
id: le,
|
|
2401
|
-
constraint:
|
|
2402
|
-
initialCoordinates:
|
|
2403
|
-
offset:
|
|
2401
|
+
constraint: Fe,
|
|
2402
|
+
initialCoordinates: _e,
|
|
2403
|
+
offset: ze
|
|
2404
2404
|
};
|
|
2405
|
-
ut?.(
|
|
2405
|
+
ut?.(We), E({
|
|
2406
2406
|
type: "onDragPending",
|
|
2407
|
-
event:
|
|
2407
|
+
event: We
|
|
2408
2408
|
});
|
|
2409
2409
|
},
|
|
2410
2410
|
onStart(le) {
|
|
2411
|
-
const
|
|
2412
|
-
if (
|
|
2411
|
+
const Fe = R.current;
|
|
2412
|
+
if (Fe == null)
|
|
2413
2413
|
return;
|
|
2414
|
-
const
|
|
2415
|
-
if (!
|
|
2414
|
+
const _e = $.get(Fe);
|
|
2415
|
+
if (!_e)
|
|
2416
2416
|
return;
|
|
2417
2417
|
const {
|
|
2418
|
-
onDragStart:
|
|
2418
|
+
onDragStart: ze
|
|
2419
2419
|
} = M.current, ct = {
|
|
2420
2420
|
activatorEvent: ye,
|
|
2421
2421
|
active: {
|
|
2422
|
-
id:
|
|
2423
|
-
data:
|
|
2422
|
+
id: Fe,
|
|
2423
|
+
data: _e.data,
|
|
2424
2424
|
rect: Z
|
|
2425
2425
|
}
|
|
2426
2426
|
};
|
|
2427
2427
|
Mt(() => {
|
|
2428
|
-
|
|
2428
|
+
ze?.(ct), I(Ve.Initializing), D({
|
|
2429
2429
|
type: se.DragStart,
|
|
2430
2430
|
initialCoordinates: le,
|
|
2431
|
-
active:
|
|
2432
|
-
}),
|
|
2431
|
+
active: Fe
|
|
2432
|
+
}), E({
|
|
2433
2433
|
type: "onDragStart",
|
|
2434
2434
|
event: ct
|
|
2435
2435
|
}), w(sn.current), S(ye);
|
|
2436
2436
|
});
|
|
2437
2437
|
},
|
|
2438
2438
|
onMove(le) {
|
|
2439
|
-
|
|
2439
|
+
D({
|
|
2440
2440
|
type: se.DragMove,
|
|
2441
2441
|
coordinates: le
|
|
2442
2442
|
});
|
|
@@ -2444,38 +2444,38 @@ const ro = /* @__PURE__ */ kr(function(t) {
|
|
|
2444
2444
|
onEnd: Ze(se.DragEnd),
|
|
2445
2445
|
onCancel: Ze(se.DragCancel)
|
|
2446
2446
|
});
|
|
2447
|
-
sn.current =
|
|
2447
|
+
sn.current = Oe;
|
|
2448
2448
|
function Ze(le) {
|
|
2449
2449
|
return async function() {
|
|
2450
2450
|
const {
|
|
2451
|
-
active:
|
|
2452
|
-
collisions:
|
|
2451
|
+
active: _e,
|
|
2452
|
+
collisions: ze,
|
|
2453
2453
|
over: ct,
|
|
2454
2454
|
scrollAdjustedTranslate: ut
|
|
2455
|
-
} =
|
|
2456
|
-
let
|
|
2457
|
-
if (
|
|
2455
|
+
} = de.current;
|
|
2456
|
+
let We = null;
|
|
2457
|
+
if (_e && ut) {
|
|
2458
2458
|
const {
|
|
2459
2459
|
cancelDrop: dt
|
|
2460
2460
|
} = M.current;
|
|
2461
|
-
|
|
2461
|
+
We = {
|
|
2462
2462
|
activatorEvent: ye,
|
|
2463
|
-
active:
|
|
2464
|
-
collisions:
|
|
2463
|
+
active: _e,
|
|
2464
|
+
collisions: ze,
|
|
2465
2465
|
delta: ut,
|
|
2466
2466
|
over: ct
|
|
2467
|
-
}, le === se.DragEnd && typeof dt == "function" && await Promise.resolve(dt(
|
|
2467
|
+
}, le === se.DragEnd && typeof dt == "function" && await Promise.resolve(dt(We)) && (le = se.DragCancel);
|
|
2468
2468
|
}
|
|
2469
|
-
|
|
2470
|
-
|
|
2469
|
+
R.current = null, Mt(() => {
|
|
2470
|
+
D({
|
|
2471
2471
|
type: le
|
|
2472
|
-
}), I(
|
|
2472
|
+
}), I(Ve.Uninitialized), Un(null), w(null), S(null), sn.current = null;
|
|
2473
2473
|
const dt = le === se.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2474
|
-
if (
|
|
2474
|
+
if (We) {
|
|
2475
2475
|
const an = M.current[dt];
|
|
2476
|
-
an?.(
|
|
2476
|
+
an?.(We), E({
|
|
2477
2477
|
type: dt,
|
|
2478
|
-
event:
|
|
2478
|
+
event: We
|
|
2479
2479
|
});
|
|
2480
2480
|
}
|
|
2481
2481
|
});
|
|
@@ -2484,48 +2484,48 @@ const ro = /* @__PURE__ */ kr(function(t) {
|
|
|
2484
2484
|
},
|
|
2485
2485
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2486
2486
|
[$]
|
|
2487
|
-
), Oo = Q((
|
|
2488
|
-
const
|
|
2487
|
+
), Oo = Q((he, xe) => (be, Pe) => {
|
|
2488
|
+
const Se = be.nativeEvent, ye = $.get(Pe);
|
|
2489
2489
|
if (
|
|
2490
2490
|
// Another sensor is already instantiating
|
|
2491
|
-
|
|
2491
|
+
R.current !== null || // No active draggable
|
|
2492
2492
|
!ye || // Event has already been captured
|
|
2493
|
-
|
|
2493
|
+
Se.dndKit || Se.defaultPrevented
|
|
2494
2494
|
)
|
|
2495
2495
|
return;
|
|
2496
|
-
const
|
|
2496
|
+
const Oe = {
|
|
2497
2497
|
active: ye
|
|
2498
2498
|
};
|
|
2499
|
-
|
|
2499
|
+
he(be, xe.options, Oe) === !0 && (Se.dndKit = {
|
|
2500
2500
|
capturedBy: xe.sensor
|
|
2501
|
-
},
|
|
2501
|
+
}, R.current = Pe, Gn(be, xe));
|
|
2502
2502
|
}, [$, Gn]), qn = Ns(h, Oo);
|
|
2503
|
-
Us(h),
|
|
2504
|
-
F &&
|
|
2505
|
-
}, [F,
|
|
2503
|
+
Us(h), Ie(() => {
|
|
2504
|
+
F && _ === Ve.Initializing && I(Ve.Initialized);
|
|
2505
|
+
}, [F, _]), V(
|
|
2506
2506
|
() => {
|
|
2507
2507
|
const {
|
|
2508
|
-
onDragMove:
|
|
2508
|
+
onDragMove: he
|
|
2509
2509
|
} = M.current, {
|
|
2510
2510
|
active: xe,
|
|
2511
2511
|
activatorEvent: be,
|
|
2512
|
-
collisions:
|
|
2513
|
-
over:
|
|
2514
|
-
} =
|
|
2512
|
+
collisions: Pe,
|
|
2513
|
+
over: Se
|
|
2514
|
+
} = de.current;
|
|
2515
2515
|
if (!xe || !be)
|
|
2516
2516
|
return;
|
|
2517
2517
|
const ye = {
|
|
2518
2518
|
active: xe,
|
|
2519
2519
|
activatorEvent: be,
|
|
2520
|
-
collisions:
|
|
2520
|
+
collisions: Pe,
|
|
2521
2521
|
delta: {
|
|
2522
2522
|
x: Ke.x,
|
|
2523
2523
|
y: Ke.y
|
|
2524
2524
|
},
|
|
2525
|
-
over:
|
|
2525
|
+
over: Se
|
|
2526
2526
|
};
|
|
2527
2527
|
Mt(() => {
|
|
2528
|
-
|
|
2528
|
+
he?.(ye), E({
|
|
2529
2529
|
type: "onDragMove",
|
|
2530
2530
|
event: ye
|
|
2531
2531
|
});
|
|
@@ -2536,33 +2536,33 @@ const ro = /* @__PURE__ */ kr(function(t) {
|
|
|
2536
2536
|
), V(
|
|
2537
2537
|
() => {
|
|
2538
2538
|
const {
|
|
2539
|
-
active:
|
|
2539
|
+
active: he,
|
|
2540
2540
|
activatorEvent: xe,
|
|
2541
2541
|
collisions: be,
|
|
2542
|
-
droppableContainers:
|
|
2543
|
-
scrollAdjustedTranslate:
|
|
2544
|
-
} =
|
|
2545
|
-
if (!
|
|
2542
|
+
droppableContainers: Pe,
|
|
2543
|
+
scrollAdjustedTranslate: Se
|
|
2544
|
+
} = de.current;
|
|
2545
|
+
if (!he || R.current == null || !xe || !Se)
|
|
2546
2546
|
return;
|
|
2547
2547
|
const {
|
|
2548
2548
|
onDragOver: ye
|
|
2549
|
-
} = M.current,
|
|
2550
|
-
id:
|
|
2551
|
-
rect:
|
|
2552
|
-
data:
|
|
2553
|
-
disabled:
|
|
2549
|
+
} = M.current, Oe = Pe.get(Bn), Ze = Oe && Oe.rect.current ? {
|
|
2550
|
+
id: Oe.id,
|
|
2551
|
+
rect: Oe.rect.current,
|
|
2552
|
+
data: Oe.data,
|
|
2553
|
+
disabled: Oe.disabled
|
|
2554
2554
|
} : null, le = {
|
|
2555
|
-
active:
|
|
2555
|
+
active: he,
|
|
2556
2556
|
activatorEvent: xe,
|
|
2557
2557
|
collisions: be,
|
|
2558
2558
|
delta: {
|
|
2559
|
-
x:
|
|
2560
|
-
y:
|
|
2559
|
+
x: Se.x,
|
|
2560
|
+
y: Se.y
|
|
2561
2561
|
},
|
|
2562
2562
|
over: Ze
|
|
2563
2563
|
};
|
|
2564
2564
|
Mt(() => {
|
|
2565
|
-
Un(Ze), ye?.(le),
|
|
2565
|
+
Un(Ze), ye?.(le), E({
|
|
2566
2566
|
type: "onDragOver",
|
|
2567
2567
|
event: le
|
|
2568
2568
|
});
|
|
@@ -2570,8 +2570,8 @@ const ro = /* @__PURE__ */ kr(function(t) {
|
|
|
2570
2570
|
},
|
|
2571
2571
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2572
2572
|
[Bn]
|
|
2573
|
-
),
|
|
2574
|
-
|
|
2573
|
+
), Ie(() => {
|
|
2574
|
+
de.current = {
|
|
2575
2575
|
activatorEvent: C,
|
|
2576
2576
|
active: te,
|
|
2577
2577
|
activeNode: q,
|
|
@@ -2582,40 +2582,40 @@ const ro = /* @__PURE__ */ kr(function(t) {
|
|
|
2582
2582
|
draggingNode: qe,
|
|
2583
2583
|
draggingNodeRect: Xe,
|
|
2584
2584
|
droppableContainers: P,
|
|
2585
|
-
over:
|
|
2586
|
-
scrollableAncestors:
|
|
2585
|
+
over: Ne,
|
|
2586
|
+
scrollableAncestors: Le,
|
|
2587
2587
|
scrollAdjustedTranslate: Ke
|
|
2588
2588
|
}, Z.current = {
|
|
2589
2589
|
initial: Xe,
|
|
2590
2590
|
translated: Je
|
|
2591
2591
|
};
|
|
2592
|
-
}, [te, q, lt, Je, $, qe, Xe, L, P,
|
|
2592
|
+
}, [te, q, lt, Je, $, qe, Xe, L, P, Ne, Le, Ke]), As({
|
|
2593
2593
|
...ne,
|
|
2594
2594
|
delta: W,
|
|
2595
2595
|
draggingRect: Je,
|
|
2596
2596
|
pointerCoordinates: Yn,
|
|
2597
|
-
scrollableAncestors:
|
|
2597
|
+
scrollableAncestors: Le,
|
|
2598
2598
|
scrollableAncestorRects: Et
|
|
2599
2599
|
});
|
|
2600
|
-
const _o =
|
|
2600
|
+
const _o = B(() => ({
|
|
2601
2601
|
active: te,
|
|
2602
2602
|
activeNode: q,
|
|
2603
2603
|
activeNodeRect: F,
|
|
2604
2604
|
activatorEvent: C,
|
|
2605
2605
|
collisions: lt,
|
|
2606
2606
|
containerNodeRect: pe,
|
|
2607
|
-
dragOverlay:
|
|
2607
|
+
dragOverlay: ke,
|
|
2608
2608
|
draggableNodes: $,
|
|
2609
2609
|
droppableContainers: P,
|
|
2610
2610
|
droppableRects: L,
|
|
2611
|
-
over:
|
|
2611
|
+
over: Ne,
|
|
2612
2612
|
measureDroppableContainers: N,
|
|
2613
|
-
scrollableAncestors:
|
|
2613
|
+
scrollableAncestors: Le,
|
|
2614
2614
|
scrollableAncestorRects: Et,
|
|
2615
2615
|
measuringConfiguration: O,
|
|
2616
|
-
measuringScheduled:
|
|
2616
|
+
measuringScheduled: J,
|
|
2617
2617
|
windowRect: on
|
|
2618
|
-
}), [te, q, F, C, lt, pe,
|
|
2618
|
+
}), [te, q, F, C, lt, pe, ke, $, P, L, Ne, N, Le, Et, O, J, on]), To = B(() => ({
|
|
2619
2619
|
activatorEvent: C,
|
|
2620
2620
|
activators: qn,
|
|
2621
2621
|
active: te,
|
|
@@ -2623,13 +2623,13 @@ const ro = /* @__PURE__ */ kr(function(t) {
|
|
|
2623
2623
|
ariaDescribedById: {
|
|
2624
2624
|
draggable: z
|
|
2625
2625
|
},
|
|
2626
|
-
dispatch:
|
|
2626
|
+
dispatch: D,
|
|
2627
2627
|
draggableNodes: $,
|
|
2628
|
-
over:
|
|
2628
|
+
over: Ne,
|
|
2629
2629
|
measureDroppableContainers: N
|
|
2630
|
-
}), [C, qn, te, F,
|
|
2630
|
+
}), [C, qn, te, F, D, z, $, Ne, N]);
|
|
2631
2631
|
return oe.createElement(Vr.Provider, {
|
|
2632
|
-
value:
|
|
2632
|
+
value: j
|
|
2633
2633
|
}, oe.createElement(tn.Provider, {
|
|
2634
2634
|
value: To
|
|
2635
2635
|
}, oe.createElement(to.Provider, {
|
|
@@ -2643,7 +2643,7 @@ const ro = /* @__PURE__ */ kr(function(t) {
|
|
|
2643
2643
|
hiddenTextDescribedById: z
|
|
2644
2644
|
}));
|
|
2645
2645
|
function Io() {
|
|
2646
|
-
const
|
|
2646
|
+
const he = y?.autoScrollEnabled === !1, xe = typeof c == "object" ? c.enabled === !1 : c === !1, be = T && !he && !xe;
|
|
2647
2647
|
return typeof c == "object" ? {
|
|
2648
2648
|
...c,
|
|
2649
2649
|
enabled: be
|
|
@@ -2667,17 +2667,17 @@ function ci(e) {
|
|
|
2667
2667
|
ariaDescribedById: h,
|
|
2668
2668
|
draggableNodes: d,
|
|
2669
2669
|
over: p
|
|
2670
|
-
} =
|
|
2670
|
+
} = Ye(tn), {
|
|
2671
2671
|
role: g = cr,
|
|
2672
2672
|
roleDescription: f = "draggable",
|
|
2673
2673
|
tabIndex: m = 0
|
|
2674
|
-
} = o ?? {}, x = c?.id === t,
|
|
2675
|
-
|
|
2674
|
+
} = o ?? {}, x = c?.id === t, D = Ye(x ? no : ai), [E, j] = Ht(), [_, I] = Ht(), T = Gs(a, t), k = xt(n);
|
|
2675
|
+
Ie(
|
|
2676
2676
|
() => (d.set(t, {
|
|
2677
2677
|
id: t,
|
|
2678
2678
|
key: s,
|
|
2679
|
-
node:
|
|
2680
|
-
activatorNode:
|
|
2679
|
+
node: E,
|
|
2680
|
+
activatorNode: _,
|
|
2681
2681
|
data: k
|
|
2682
2682
|
}), () => {
|
|
2683
2683
|
const W = d.get(t);
|
|
@@ -2686,7 +2686,7 @@ function ci(e) {
|
|
|
2686
2686
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2687
2687
|
[d, t]
|
|
2688
2688
|
);
|
|
2689
|
-
const $ =
|
|
2689
|
+
const $ = B(() => ({
|
|
2690
2690
|
role: g,
|
|
2691
2691
|
tabIndex: m,
|
|
2692
2692
|
"aria-disabled": r,
|
|
@@ -2700,16 +2700,16 @@ function ci(e) {
|
|
|
2700
2700
|
activeNodeRect: u,
|
|
2701
2701
|
attributes: $,
|
|
2702
2702
|
isDragging: x,
|
|
2703
|
-
listeners: r ? void 0 :
|
|
2704
|
-
node:
|
|
2703
|
+
listeners: r ? void 0 : T,
|
|
2704
|
+
node: E,
|
|
2705
2705
|
over: p,
|
|
2706
|
-
setNodeRef:
|
|
2706
|
+
setNodeRef: j,
|
|
2707
2707
|
setActivatorNodeRef: I,
|
|
2708
|
-
transform:
|
|
2708
|
+
transform: D
|
|
2709
2709
|
};
|
|
2710
2710
|
}
|
|
2711
2711
|
function ui() {
|
|
2712
|
-
return
|
|
2712
|
+
return Ye(to);
|
|
2713
2713
|
}
|
|
2714
2714
|
const di = "Droppable", hi = {
|
|
2715
2715
|
timeout: 25
|
|
@@ -2726,7 +2726,7 @@ function fi(e) {
|
|
|
2726
2726
|
dispatch: i,
|
|
2727
2727
|
over: c,
|
|
2728
2728
|
measureDroppableContainers: u
|
|
2729
|
-
} =
|
|
2729
|
+
} = Ye(tn), h = G({
|
|
2730
2730
|
disabled: n
|
|
2731
2731
|
}), d = G(!1), p = G(null), g = G(null), {
|
|
2732
2732
|
disabled: f,
|
|
@@ -2735,27 +2735,27 @@ function fi(e) {
|
|
|
2735
2735
|
} = {
|
|
2736
2736
|
...hi,
|
|
2737
2737
|
...o
|
|
2738
|
-
},
|
|
2738
|
+
}, D = xt(m ?? r), E = Q(
|
|
2739
2739
|
() => {
|
|
2740
2740
|
if (!d.current) {
|
|
2741
2741
|
d.current = !0;
|
|
2742
2742
|
return;
|
|
2743
2743
|
}
|
|
2744
2744
|
g.current != null && clearTimeout(g.current), g.current = setTimeout(() => {
|
|
2745
|
-
u(Array.isArray(
|
|
2745
|
+
u(Array.isArray(D.current) ? D.current : [D.current]), g.current = null;
|
|
2746
2746
|
}, x);
|
|
2747
2747
|
},
|
|
2748
2748
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2749
2749
|
[x]
|
|
2750
|
-
),
|
|
2751
|
-
callback:
|
|
2750
|
+
), j = en({
|
|
2751
|
+
callback: E,
|
|
2752
2752
|
disabled: f || !a
|
|
2753
|
-
}),
|
|
2754
|
-
|
|
2755
|
-
}, [
|
|
2753
|
+
}), _ = Q(($, W) => {
|
|
2754
|
+
j && (W && (j.unobserve(W), d.current = !1), $ && j.observe($));
|
|
2755
|
+
}, [j]), [I, T] = Ht(_), k = xt(t);
|
|
2756
2756
|
return V(() => {
|
|
2757
|
-
!
|
|
2758
|
-
}, [I,
|
|
2757
|
+
!j || !I.current || (j.disconnect(), d.current = !1, j.observe(I.current));
|
|
2758
|
+
}, [I, j]), V(
|
|
2759
2759
|
() => (i({
|
|
2760
2760
|
type: se.RegisterDroppable,
|
|
2761
2761
|
element: {
|
|
@@ -2786,7 +2786,7 @@ function fi(e) {
|
|
|
2786
2786
|
isOver: c?.id === r,
|
|
2787
2787
|
node: I,
|
|
2788
2788
|
over: c,
|
|
2789
|
-
setNodeRef:
|
|
2789
|
+
setNodeRef: T
|
|
2790
2790
|
};
|
|
2791
2791
|
}
|
|
2792
2792
|
function nn(e, t, n) {
|
|
@@ -2944,18 +2944,18 @@ function ao(e) {
|
|
|
2944
2944
|
droppableRects: c,
|
|
2945
2945
|
over: u,
|
|
2946
2946
|
measureDroppableContainers: h
|
|
2947
|
-
} = ui(), d = jt(so, n), p = i.rect !== null, g =
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
}, [
|
|
2951
|
-
|
|
2947
|
+
} = ui(), d = jt(so, n), p = i.rect !== null, g = B(() => r.map((T) => typeof T == "object" && "id" in T ? T.id : T), [r]), f = a != null, m = a ? g.indexOf(a.id) : -1, x = u ? g.indexOf(u.id) : -1, D = G(g), E = !pi(g, D.current), j = x !== -1 && m === -1 || E, _ = mi(s);
|
|
2948
|
+
Ie(() => {
|
|
2949
|
+
E && f && h(g);
|
|
2950
|
+
}, [E, g, f, h]), V(() => {
|
|
2951
|
+
D.current = g;
|
|
2952
2952
|
}, [g]);
|
|
2953
|
-
const I =
|
|
2953
|
+
const I = B(
|
|
2954
2954
|
() => ({
|
|
2955
2955
|
activeIndex: m,
|
|
2956
2956
|
containerId: d,
|
|
2957
|
-
disabled:
|
|
2958
|
-
disableTransforms:
|
|
2957
|
+
disabled: _,
|
|
2958
|
+
disableTransforms: j,
|
|
2959
2959
|
items: g,
|
|
2960
2960
|
overIndex: x,
|
|
2961
2961
|
useDragOverlay: p,
|
|
@@ -2963,7 +2963,7 @@ function ao(e) {
|
|
|
2963
2963
|
strategy: o
|
|
2964
2964
|
}),
|
|
2965
2965
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2966
|
-
[m, d,
|
|
2966
|
+
[m, d, _.draggable, _.droppable, j, g, x, c, p, o]
|
|
2967
2967
|
);
|
|
2968
2968
|
return oe.createElement(io.Provider, {
|
|
2969
2969
|
value: I
|
|
@@ -3008,7 +3008,7 @@ function Ei(e) {
|
|
|
3008
3008
|
rect: o
|
|
3009
3009
|
} = e;
|
|
3010
3010
|
const [s, a] = H(null), i = G(n);
|
|
3011
|
-
return
|
|
3011
|
+
return Ie(() => {
|
|
3012
3012
|
if (!t && n !== i.current && r.current) {
|
|
3013
3013
|
const c = o.current;
|
|
3014
3014
|
if (c) {
|
|
@@ -3048,16 +3048,16 @@ function co(e) {
|
|
|
3048
3048
|
disableTransforms: f,
|
|
3049
3049
|
sortedRects: m,
|
|
3050
3050
|
overIndex: x,
|
|
3051
|
-
useDragOverlay:
|
|
3052
|
-
strategy:
|
|
3053
|
-
} =
|
|
3051
|
+
useDragOverlay: D,
|
|
3052
|
+
strategy: E
|
|
3053
|
+
} = Ye(io), j = Ri(r, g), _ = h.indexOf(a), I = B(() => ({
|
|
3054
3054
|
sortable: {
|
|
3055
3055
|
containerId: d,
|
|
3056
|
-
index:
|
|
3056
|
+
index: _,
|
|
3057
3057
|
items: h
|
|
3058
3058
|
},
|
|
3059
3059
|
...o
|
|
3060
|
-
}), [d, o,
|
|
3060
|
+
}), [d, o, _, h]), T = B(() => h.slice(h.indexOf(a)), [h, a]), {
|
|
3061
3061
|
rect: k,
|
|
3062
3062
|
node: $,
|
|
3063
3063
|
isOver: W,
|
|
@@ -3065,16 +3065,16 @@ function co(e) {
|
|
|
3065
3065
|
} = fi({
|
|
3066
3066
|
id: a,
|
|
3067
3067
|
data: I,
|
|
3068
|
-
disabled:
|
|
3068
|
+
disabled: j.droppable,
|
|
3069
3069
|
resizeObserverConfig: {
|
|
3070
|
-
updateMeasurementsFor:
|
|
3070
|
+
updateMeasurementsFor: T,
|
|
3071
3071
|
...c
|
|
3072
3072
|
}
|
|
3073
3073
|
}), {
|
|
3074
3074
|
active: A,
|
|
3075
3075
|
activatorEvent: Z,
|
|
3076
3076
|
activeNodeRect: te,
|
|
3077
|
-
attributes:
|
|
3077
|
+
attributes: R,
|
|
3078
3078
|
setNodeRef: y,
|
|
3079
3079
|
listeners: w,
|
|
3080
3080
|
isDragging: C,
|
|
@@ -3088,39 +3088,39 @@ function co(e) {
|
|
|
3088
3088
|
...ji,
|
|
3089
3089
|
...n
|
|
3090
3090
|
},
|
|
3091
|
-
disabled:
|
|
3092
|
-
}), v = Yo(P, y), O = !!A, L = O && !f && _t(p) && _t(x), N = !
|
|
3091
|
+
disabled: j.draggable
|
|
3092
|
+
}), v = Yo(P, y), O = !!A, L = O && !f && _t(p) && _t(x), N = !D && C, J = N && L ? z : null, Y = L ? J ?? (i ?? E)({
|
|
3093
3093
|
rects: m,
|
|
3094
3094
|
activeNodeRect: te,
|
|
3095
3095
|
activeIndex: p,
|
|
3096
3096
|
overIndex: x,
|
|
3097
|
-
index:
|
|
3097
|
+
index: _
|
|
3098
3098
|
}) : null, ne = _t(p) && _t(x) ? s({
|
|
3099
3099
|
id: a,
|
|
3100
3100
|
items: h,
|
|
3101
3101
|
activeIndex: p,
|
|
3102
3102
|
overIndex: x
|
|
3103
|
-
}) :
|
|
3103
|
+
}) : _, re = A?.id, F = G({
|
|
3104
3104
|
activeId: re,
|
|
3105
3105
|
items: h,
|
|
3106
3106
|
newIndex: ne,
|
|
3107
3107
|
containerId: d
|
|
3108
|
-
}), pe = h !== F.current.items,
|
|
3108
|
+
}), pe = h !== F.current.items, de = t({
|
|
3109
3109
|
active: A,
|
|
3110
3110
|
containerId: d,
|
|
3111
3111
|
isDragging: C,
|
|
3112
3112
|
isSorting: O,
|
|
3113
3113
|
id: a,
|
|
3114
|
-
index:
|
|
3114
|
+
index: _,
|
|
3115
3115
|
items: h,
|
|
3116
3116
|
newIndex: F.current.newIndex,
|
|
3117
3117
|
previousItems: F.current.items,
|
|
3118
3118
|
previousContainerId: F.current.containerId,
|
|
3119
3119
|
transition: u,
|
|
3120
3120
|
wasDragging: F.current.activeId != null
|
|
3121
|
-
}),
|
|
3122
|
-
disabled: !
|
|
3123
|
-
index:
|
|
3121
|
+
}), De = Ei({
|
|
3122
|
+
disabled: !de,
|
|
3123
|
+
index: _,
|
|
3124
3124
|
node: $,
|
|
3125
3125
|
rect: k
|
|
3126
3126
|
});
|
|
@@ -3140,10 +3140,10 @@ function co(e) {
|
|
|
3140
3140
|
}, [re]), {
|
|
3141
3141
|
active: A,
|
|
3142
3142
|
activeIndex: p,
|
|
3143
|
-
attributes:
|
|
3143
|
+
attributes: R,
|
|
3144
3144
|
data: I,
|
|
3145
3145
|
rect: k,
|
|
3146
|
-
index:
|
|
3146
|
+
index: _,
|
|
3147
3147
|
newIndex: ne,
|
|
3148
3148
|
items: h,
|
|
3149
3149
|
isOver: W,
|
|
@@ -3157,17 +3157,17 @@ function co(e) {
|
|
|
3157
3157
|
setActivatorNodeRef: M,
|
|
3158
3158
|
setDroppableNodeRef: P,
|
|
3159
3159
|
setDraggableNodeRef: y,
|
|
3160
|
-
transform:
|
|
3161
|
-
transition:
|
|
3160
|
+
transform: De ?? Y,
|
|
3161
|
+
transition: ke()
|
|
3162
3162
|
};
|
|
3163
|
-
function
|
|
3163
|
+
function ke() {
|
|
3164
3164
|
if (
|
|
3165
3165
|
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
3166
|
-
|
|
3167
|
-
pe && F.current.newIndex ===
|
|
3166
|
+
De || // Or to prevent items jumping to back to their "new" position when items change
|
|
3167
|
+
pe && F.current.newIndex === _
|
|
3168
3168
|
)
|
|
3169
3169
|
return Di;
|
|
3170
|
-
if (!(N && !An(Z) || !u) && (O ||
|
|
3170
|
+
if (!(N && !An(Z) || !u) && (O || de))
|
|
3171
3171
|
return nt.Transition.toString({
|
|
3172
3172
|
...u,
|
|
3173
3173
|
property: lo
|
|
@@ -3185,7 +3185,7 @@ function Ri(e, t) {
|
|
|
3185
3185
|
droppable: (r = e?.droppable) != null ? r : t.droppable
|
|
3186
3186
|
};
|
|
3187
3187
|
}
|
|
3188
|
-
|
|
3188
|
+
U.Down, U.Right, U.Up, U.Left;
|
|
3189
3189
|
var $t = { exports: {} }, fn = {}, At = { exports: {} }, gn = {};
|
|
3190
3190
|
var ur;
|
|
3191
3191
|
function Mi() {
|
|
@@ -3249,16 +3249,16 @@ function Oi() {
|
|
|
3249
3249
|
x = a({
|
|
3250
3250
|
inst: { value: m, getSnapshot: f }
|
|
3251
3251
|
});
|
|
3252
|
-
var
|
|
3252
|
+
var D = x[0].inst, E = x[1];
|
|
3253
3253
|
return c(
|
|
3254
3254
|
function() {
|
|
3255
|
-
|
|
3255
|
+
D.value = m, D.getSnapshot = f, n(D) && E({ inst: D });
|
|
3256
3256
|
},
|
|
3257
3257
|
[g, m, f]
|
|
3258
3258
|
), i(
|
|
3259
3259
|
function() {
|
|
3260
|
-
return n(
|
|
3261
|
-
n(
|
|
3260
|
+
return n(D) && E({ inst: D }), g(function() {
|
|
3261
|
+
n(D) && E({ inst: D });
|
|
3262
3262
|
});
|
|
3263
3263
|
},
|
|
3264
3264
|
[g]
|
|
@@ -3303,26 +3303,26 @@ function _i() {
|
|
|
3303
3303
|
} else m = f.current;
|
|
3304
3304
|
f = i(
|
|
3305
3305
|
function() {
|
|
3306
|
-
function
|
|
3307
|
-
if (!
|
|
3308
|
-
if (
|
|
3306
|
+
function D(T) {
|
|
3307
|
+
if (!E) {
|
|
3308
|
+
if (E = !0, j = T, T = p(T), g !== void 0 && m.hasValue) {
|
|
3309
3309
|
var k = m.value;
|
|
3310
|
-
if (g(k,
|
|
3311
|
-
return
|
|
3310
|
+
if (g(k, T))
|
|
3311
|
+
return _ = k;
|
|
3312
3312
|
}
|
|
3313
|
-
return
|
|
3313
|
+
return _ = T;
|
|
3314
3314
|
}
|
|
3315
|
-
if (k =
|
|
3316
|
-
var $ = p(
|
|
3317
|
-
return g !== void 0 && g(k, $) ? (
|
|
3315
|
+
if (k = _, r(j, T)) return k;
|
|
3316
|
+
var $ = p(T);
|
|
3317
|
+
return g !== void 0 && g(k, $) ? (j = T, k) : (j = T, _ = $);
|
|
3318
3318
|
}
|
|
3319
|
-
var
|
|
3319
|
+
var E = !1, j, _, I = d === void 0 ? null : d;
|
|
3320
3320
|
return [
|
|
3321
3321
|
function() {
|
|
3322
|
-
return
|
|
3322
|
+
return D(h());
|
|
3323
3323
|
},
|
|
3324
3324
|
I === null ? void 0 : function() {
|
|
3325
|
-
return
|
|
3325
|
+
return D(I());
|
|
3326
3326
|
}
|
|
3327
3327
|
];
|
|
3328
3328
|
},
|
|
@@ -3354,27 +3354,27 @@ function Ti() {
|
|
|
3354
3354
|
} else m = f.current;
|
|
3355
3355
|
f = i(
|
|
3356
3356
|
function() {
|
|
3357
|
-
function
|
|
3358
|
-
if (!
|
|
3359
|
-
if (
|
|
3357
|
+
function D(T) {
|
|
3358
|
+
if (!E) {
|
|
3359
|
+
if (E = !0, j = T, T = p(T), g !== void 0 && m.hasValue) {
|
|
3360
3360
|
var k = m.value;
|
|
3361
|
-
if (g(k,
|
|
3362
|
-
return
|
|
3361
|
+
if (g(k, T))
|
|
3362
|
+
return _ = k;
|
|
3363
3363
|
}
|
|
3364
|
-
return
|
|
3364
|
+
return _ = T;
|
|
3365
3365
|
}
|
|
3366
|
-
if (k =
|
|
3366
|
+
if (k = _, r(j, T))
|
|
3367
3367
|
return k;
|
|
3368
|
-
var $ = p(
|
|
3369
|
-
return g !== void 0 && g(k, $) ? (
|
|
3368
|
+
var $ = p(T);
|
|
3369
|
+
return g !== void 0 && g(k, $) ? (j = T, k) : (j = T, _ = $);
|
|
3370
3370
|
}
|
|
3371
|
-
var
|
|
3371
|
+
var E = !1, j, _, I = d === void 0 ? null : d;
|
|
3372
3372
|
return [
|
|
3373
3373
|
function() {
|
|
3374
|
-
return
|
|
3374
|
+
return D(h());
|
|
3375
3375
|
},
|
|
3376
3376
|
I === null ? void 0 : function() {
|
|
3377
|
-
return
|
|
3377
|
+
return D(I());
|
|
3378
3378
|
}
|
|
3379
3379
|
];
|
|
3380
3380
|
},
|
|
@@ -3527,13 +3527,13 @@ function Qe(e, t, n) {
|
|
|
3527
3527
|
r = d;
|
|
3528
3528
|
let g;
|
|
3529
3529
|
if (n.key && ((c = n.debug) != null && c.call(n)) && (g = Date.now()), o = t(...d), n.key && ((u = n.debug) != null && u.call(n))) {
|
|
3530
|
-
const f = Math.round((Date.now() - h) * 100) / 100, m = Math.round((Date.now() - g) * 100) / 100, x = m / 16,
|
|
3531
|
-
for (
|
|
3532
|
-
|
|
3533
|
-
return
|
|
3530
|
+
const f = Math.round((Date.now() - h) * 100) / 100, m = Math.round((Date.now() - g) * 100) / 100, x = m / 16, D = (E, j) => {
|
|
3531
|
+
for (E = String(E); E.length < j; )
|
|
3532
|
+
E = " " + E;
|
|
3533
|
+
return E;
|
|
3534
3534
|
};
|
|
3535
3535
|
console.info(
|
|
3536
|
-
`%c⏱ ${
|
|
3536
|
+
`%c⏱ ${D(m, 5)} /${D(f, 5)} ms`,
|
|
3537
3537
|
`
|
|
3538
3538
|
font-size: .6rem;
|
|
3539
3539
|
font-weight: bold;
|
|
@@ -3807,18 +3807,18 @@ class Xi {
|
|
|
3807
3807
|
let m, x;
|
|
3808
3808
|
if (f !== void 0 && this.options.lanes > 1) {
|
|
3809
3809
|
m = f;
|
|
3810
|
-
const
|
|
3810
|
+
const _ = d[m], I = _ !== void 0 ? h[_] : void 0;
|
|
3811
3811
|
x = I ? I.end + this.options.gap : r + o;
|
|
3812
3812
|
} else {
|
|
3813
|
-
const
|
|
3814
|
-
x =
|
|
3813
|
+
const _ = this.options.lanes === 1 ? h[p - 1] : this.getFurthestMeasurement(h, p);
|
|
3814
|
+
x = _ ? _.end + this.options.gap : r + o, m = _ ? _.lane : p % this.options.lanes, this.options.lanes > 1 && this.laneAssignments.set(p, m);
|
|
3815
3815
|
}
|
|
3816
|
-
const
|
|
3816
|
+
const D = c.get(g), E = typeof D == "number" ? D : this.options.estimateSize(p), j = x + E;
|
|
3817
3817
|
h[p] = {
|
|
3818
3818
|
index: p,
|
|
3819
3819
|
start: x,
|
|
3820
|
-
size:
|
|
3821
|
-
end:
|
|
3820
|
+
size: E,
|
|
3821
|
+
end: j,
|
|
3822
3822
|
key: g,
|
|
3823
3823
|
lane: m
|
|
3824
3824
|
}, d[m] = p;
|
|
@@ -4103,7 +4103,7 @@ function Zi(e) {
|
|
|
4103
4103
|
...e
|
|
4104
4104
|
});
|
|
4105
4105
|
}
|
|
4106
|
-
const et = "__actions__",
|
|
4106
|
+
const et = "__actions__", je = "__visibility__", Nu = "__serial_number__", ge = new Pi({
|
|
4107
4107
|
tableId: "",
|
|
4108
4108
|
sortColumn: null,
|
|
4109
4109
|
sortDirection: null,
|
|
@@ -4127,28 +4127,28 @@ function Qi(e, t, n = !0) {
|
|
|
4127
4127
|
...c.map((f) => a.find((m) => m.id === f)).filter(Boolean),
|
|
4128
4128
|
...a.filter((f) => !c.includes(f.id))
|
|
4129
4129
|
];
|
|
4130
|
-
n ? u.some((m) => m.id ===
|
|
4130
|
+
n ? u.some((m) => m.id === je) || (u = [
|
|
4131
4131
|
...u,
|
|
4132
4132
|
{
|
|
4133
4133
|
type: "visibility",
|
|
4134
|
-
id:
|
|
4134
|
+
id: je,
|
|
4135
4135
|
label: "",
|
|
4136
4136
|
minWidth: 20
|
|
4137
4137
|
}
|
|
4138
|
-
]) : u = u.filter((f) => f.id !==
|
|
4138
|
+
]) : u = u.filter((f) => f.id !== je);
|
|
4139
4139
|
const h = JSON.parse(
|
|
4140
4140
|
localStorage.getItem(Mn(i)) || "{}"
|
|
4141
4141
|
), d = {};
|
|
4142
4142
|
if (n) {
|
|
4143
4143
|
for (const f of u)
|
|
4144
|
-
f.id ===
|
|
4144
|
+
f.id === je || f.id === et ? d[f.id] = !0 : d[f.id] = h[f.id] ?? !0;
|
|
4145
4145
|
localStorage.setItem(Mn(i), JSON.stringify(d));
|
|
4146
4146
|
}
|
|
4147
4147
|
const p = JSON.parse(
|
|
4148
4148
|
localStorage.getItem(Pn(i)) || "{}"
|
|
4149
4149
|
), g = { ...p };
|
|
4150
4150
|
u.forEach((f) => {
|
|
4151
|
-
f.id !==
|
|
4151
|
+
f.id !== je && f.id !== et && !(f.id in p) && (g[f.id] = typeof f.minWidth == "number" ? f.minWidth : o);
|
|
4152
4152
|
}), ge.setState((f) => ({
|
|
4153
4153
|
...f,
|
|
4154
4154
|
data: e,
|
|
@@ -4156,7 +4156,7 @@ function Qi(e, t, n = !0) {
|
|
|
4156
4156
|
visibility: d,
|
|
4157
4157
|
columnWidths: g,
|
|
4158
4158
|
enableColumnVisibility: n,
|
|
4159
|
-
sortableColumns: u.filter((m) => m.id !==
|
|
4159
|
+
sortableColumns: u.filter((m) => m.id !== je).map((m) => ({
|
|
4160
4160
|
id: m.id,
|
|
4161
4161
|
label: m.label,
|
|
4162
4162
|
sortable: m.id !== et,
|
|
@@ -4172,7 +4172,7 @@ function ea(e) {
|
|
|
4172
4172
|
sortDirection: "asc"
|
|
4173
4173
|
}));
|
|
4174
4174
|
}
|
|
4175
|
-
function
|
|
4175
|
+
function Pu(e, t) {
|
|
4176
4176
|
ge.setState((n) => {
|
|
4177
4177
|
const r = typeof n.columnOrder.find((s) => s.id === e)?.minWidth == "number" ? n.columnOrder.find((s) => s.id === e)?.minWidth : 50, o = {
|
|
4178
4178
|
...n.columnWidths,
|
|
@@ -4388,14 +4388,14 @@ function b(e) {
|
|
|
4388
4388
|
);
|
|
4389
4389
|
});
|
|
4390
4390
|
}
|
|
4391
|
-
const Aa = b(yt.Trigger), ka = b(yt.Positioner), za = b(yt.Content), La = b(yt.Item), Na = b(
|
|
4391
|
+
const Aa = b(yt.Trigger), ka = b(yt.Positioner), za = b(yt.Content), La = b(yt.Item), Na = b(Re.Label), Pa = b(Re.HiddenInput), Fa = b(Re.Control);
|
|
4392
4392
|
function Wa({ visibility: e }) {
|
|
4393
4393
|
const { sortableColumns: t } = at(ge);
|
|
4394
4394
|
return /* @__PURE__ */ l.jsxs(yt.Root, { closeOnSelect: !1, children: [
|
|
4395
4395
|
/* @__PURE__ */ l.jsx(Aa, { asChild: !0, children: /* @__PURE__ */ l.jsx(we, { "aria-label": "Toggle columns", variant: "ghost", ml: "1", size: "xs", children: /* @__PURE__ */ l.jsx(Ta, { size: 18 }) }) }),
|
|
4396
4396
|
/* @__PURE__ */ l.jsx(Ge, { children: /* @__PURE__ */ l.jsx(ka, { children: /* @__PURE__ */ l.jsx(za, { minW: "220px", children: t.map((n) => {
|
|
4397
4397
|
const r = !!e[n.id];
|
|
4398
|
-
return /* @__PURE__ */ l.jsx(La, { value: n.id, closeOnSelect: !1, children: /* @__PURE__ */ l.jsxs(
|
|
4398
|
+
return /* @__PURE__ */ l.jsx(La, { value: n.id, closeOnSelect: !1, children: /* @__PURE__ */ l.jsxs(Re.Root, { checked: r, onCheckedChange: () => ra(n.id), children: [
|
|
4399
4399
|
/* @__PURE__ */ l.jsx(Pa, {}),
|
|
4400
4400
|
/* @__PURE__ */ l.jsx(Fa, {}),
|
|
4401
4401
|
/* @__PURE__ */ l.jsx(Na, { children: n.label })
|
|
@@ -4412,9 +4412,9 @@ function Va({
|
|
|
4412
4412
|
backgroundColor: s,
|
|
4413
4413
|
minW: a
|
|
4414
4414
|
}) {
|
|
4415
|
-
const { columnWidths: i } = at(ge), d = `${i[e] ?? 100}px`, p = G(0), g = G(0), { setNodeRef: f, attributes: m, listeners: x, transform:
|
|
4416
|
-
|
|
4417
|
-
const k =
|
|
4415
|
+
const { columnWidths: i } = at(ge), d = `${i[e] ?? 100}px`, p = G(0), g = G(0), { setNodeRef: f, attributes: m, listeners: x, transform: D, transition: E } = co({ id: e }), j = (T) => {
|
|
4416
|
+
T.stopPropagation(), p.current = T.clientX;
|
|
4417
|
+
const k = T.currentTarget.closest("th");
|
|
4418
4418
|
g.current = k?.getBoundingClientRect().width || i[e] || 180;
|
|
4419
4419
|
const $ = (P) => {
|
|
4420
4420
|
let A = g.current + (P.clientX - p.current);
|
|
@@ -4423,7 +4423,7 @@ function Va({
|
|
|
4423
4423
|
document.removeEventListener("mousemove", $), document.removeEventListener("mouseup", W);
|
|
4424
4424
|
};
|
|
4425
4425
|
document.addEventListener("mousemove", $), document.addEventListener("mouseup", W);
|
|
4426
|
-
}, [
|
|
4426
|
+
}, [_, I] = H(!1);
|
|
4427
4427
|
return /* @__PURE__ */ l.jsx(
|
|
4428
4428
|
ae.ColumnHeader,
|
|
4429
4429
|
{
|
|
@@ -4433,8 +4433,8 @@ function Va({
|
|
|
4433
4433
|
width: d,
|
|
4434
4434
|
minWidth: a || "20px",
|
|
4435
4435
|
style: {
|
|
4436
|
-
transform: nt.Transform.toString(
|
|
4437
|
-
transition:
|
|
4436
|
+
transform: nt.Transform.toString(D),
|
|
4437
|
+
transition: E,
|
|
4438
4438
|
cursor: r,
|
|
4439
4439
|
borderRight: o,
|
|
4440
4440
|
boxSizing: "border-box"
|
|
@@ -4445,7 +4445,7 @@ function Va({
|
|
|
4445
4445
|
/* @__PURE__ */ l.jsx("span", { ...x, children: /* @__PURE__ */ l.jsx(vo, { size: 12, style: { cursor: "grab" } }) }),
|
|
4446
4446
|
t,
|
|
4447
4447
|
/* @__PURE__ */ l.jsx(
|
|
4448
|
-
|
|
4448
|
+
ue,
|
|
4449
4449
|
{
|
|
4450
4450
|
position: "absolute",
|
|
4451
4451
|
right: 0,
|
|
@@ -4453,14 +4453,14 @@ function Va({
|
|
|
4453
4453
|
h: "100%",
|
|
4454
4454
|
w: "10px",
|
|
4455
4455
|
cursor: "col-resize",
|
|
4456
|
-
onMouseDown:
|
|
4456
|
+
onMouseDown: j,
|
|
4457
4457
|
onMouseEnter: () => I(!0),
|
|
4458
4458
|
onMouseLeave: () => I(!1),
|
|
4459
4459
|
display: "flex",
|
|
4460
4460
|
alignItems: "center",
|
|
4461
4461
|
justifyContent: "center",
|
|
4462
4462
|
zIndex: 2,
|
|
4463
|
-
children:
|
|
4463
|
+
children: _ && /* @__PURE__ */ l.jsx(da, { size: 14, style: { pointerEvents: "none", opacity: 0.8 } })
|
|
4464
4464
|
}
|
|
4465
4465
|
)
|
|
4466
4466
|
] })
|
|
@@ -4468,7 +4468,7 @@ function Va({
|
|
|
4468
4468
|
);
|
|
4469
4469
|
}
|
|
4470
4470
|
function Ya() {
|
|
4471
|
-
const { columnOrder: e, visibility: t, enableColumnVisibility: n, sortColumn: r, sortDirection: o } = at(ge), s = e.filter((a) => !n && a.id ===
|
|
4471
|
+
const { columnOrder: e, visibility: t, enableColumnVisibility: n, sortColumn: r, sortDirection: o } = at(ge), s = e.filter((a) => !n && a.id === je ? !1 : a.id === je || a.id === et ? !0 : t[a.id] !== !1).sort((a, i) => a.id === je ? 1 : i.id === je ? -1 : 0);
|
|
4472
4472
|
return /* @__PURE__ */ l.jsx(
|
|
4473
4473
|
ae.Header,
|
|
4474
4474
|
{
|
|
@@ -4480,7 +4480,7 @@ function Ya() {
|
|
|
4480
4480
|
backgroundColor: "white"
|
|
4481
4481
|
},
|
|
4482
4482
|
children: /* @__PURE__ */ l.jsx(ae.Row, { height: "28px", children: s.map((a) => {
|
|
4483
|
-
if (a.id ===
|
|
4483
|
+
if (a.id === je)
|
|
4484
4484
|
return /* @__PURE__ */ l.jsx(ae.ColumnHeader, { bg: "gray.100", w: 100, children: /* @__PURE__ */ l.jsx(Wa, { visibility: t }) }, a.id);
|
|
4485
4485
|
const i = a.type !== "actions" && a.type !== "visibility", c = r === a.id;
|
|
4486
4486
|
return /* @__PURE__ */ l.jsx(
|
|
@@ -4529,9 +4529,9 @@ function nl({
|
|
|
4529
4529
|
value: String(c)
|
|
4530
4530
|
}))
|
|
4531
4531
|
});
|
|
4532
|
-
return /* @__PURE__ */ l.jsx(
|
|
4532
|
+
return /* @__PURE__ */ l.jsx(ue, { width: "100%", children: /* @__PURE__ */ l.jsxs(fe, { justify: "space-between", mx: "auto", flexWrap: "wrap", children: [
|
|
4533
4533
|
/* @__PURE__ */ l.jsxs(fe, { children: [
|
|
4534
|
-
/* @__PURE__ */ l.jsx(
|
|
4534
|
+
/* @__PURE__ */ l.jsx(X, { fontSize: "sm", color: "gray.600", _dark: { color: "gray.400" }, children: "Rows per page:" }),
|
|
4535
4535
|
/* @__PURE__ */ l.jsxs(
|
|
4536
4536
|
ee.Root,
|
|
4537
4537
|
{
|
|
@@ -4553,7 +4553,7 @@ function nl({
|
|
|
4553
4553
|
]
|
|
4554
4554
|
}
|
|
4555
4555
|
),
|
|
4556
|
-
/* @__PURE__ */ l.jsxs(
|
|
4556
|
+
/* @__PURE__ */ l.jsxs(X, { fontSize: "sm", color: "gray.600", _dark: { color: "gray.400" }, children: [
|
|
4557
4557
|
"of ",
|
|
4558
4558
|
e
|
|
4559
4559
|
] })
|
|
@@ -4670,7 +4670,7 @@ function al(e, t, n) {
|
|
|
4670
4670
|
};
|
|
4671
4671
|
return [...e].sort((s, a) => o(s, a, n));
|
|
4672
4672
|
}
|
|
4673
|
-
function
|
|
4673
|
+
function Fu({
|
|
4674
4674
|
tableId: e,
|
|
4675
4675
|
data: t = [],
|
|
4676
4676
|
headers: n = [],
|
|
@@ -4688,26 +4688,26 @@ function Wu({
|
|
|
4688
4688
|
onRowSelect: f,
|
|
4689
4689
|
onRowSelectEvent: m = "left",
|
|
4690
4690
|
enableColumnVisibility: x = !0,
|
|
4691
|
-
dataType:
|
|
4692
|
-
manualPagination:
|
|
4691
|
+
dataType: D = "pagination",
|
|
4692
|
+
manualPagination: E = !1
|
|
4693
4693
|
// Default false, but we auto-detect below
|
|
4694
4694
|
}) {
|
|
4695
|
-
const
|
|
4695
|
+
const j = G(null);
|
|
4696
4696
|
V(() => {
|
|
4697
4697
|
ea(e);
|
|
4698
4698
|
}, [e]), V(() => {
|
|
4699
4699
|
Qi(t, n, x);
|
|
4700
4700
|
}, [t, n, x]);
|
|
4701
|
-
const { sortColumn:
|
|
4701
|
+
const { sortColumn: _, sortDirection: I, data: T, columnOrder: k } = at(ge), $ = B(
|
|
4702
4702
|
() => k.length ? k : n,
|
|
4703
4703
|
[k, n]
|
|
4704
|
-
), W =
|
|
4705
|
-
if (!
|
|
4706
|
-
const M = $.find((z) => z.id ===
|
|
4707
|
-
return al(
|
|
4708
|
-
}, [
|
|
4704
|
+
), W = B(() => {
|
|
4705
|
+
if (!_ || !I) return T;
|
|
4706
|
+
const M = $.find((z) => z.id === _);
|
|
4707
|
+
return al(T, M, I);
|
|
4708
|
+
}, [T, _, I, $]), P = (Math.max(1, i) - 1) * c, A = B(() => D === "infinite" || E || p > W.length || i > 1 && W.length > 0 && W.length <= c ? W : W.slice(P, P + c), [W, P, c, D, i, p, E]), te = d === "sm" ? 45 : d === "md" ? 56 : 64, R = Zi({
|
|
4709
4709
|
count: A.length,
|
|
4710
|
-
getScrollElement: () =>
|
|
4710
|
+
getScrollElement: () => j.current,
|
|
4711
4711
|
estimateSize: () => te,
|
|
4712
4712
|
overscan: 25
|
|
4713
4713
|
}), y = (M) => {
|
|
@@ -4721,11 +4721,11 @@ function Wu({
|
|
|
4721
4721
|
{
|
|
4722
4722
|
items: $.map((M) => M.id),
|
|
4723
4723
|
strategy: vi,
|
|
4724
|
-
children: /* @__PURE__ */ l.jsxs(
|
|
4724
|
+
children: /* @__PURE__ */ l.jsxs(ue, { flex: "1", minH: 0, display: "flex", flexDirection: "column", p: 2, children: [
|
|
4725
4725
|
/* @__PURE__ */ l.jsxs(
|
|
4726
|
-
|
|
4726
|
+
ue,
|
|
4727
4727
|
{
|
|
4728
|
-
ref:
|
|
4728
|
+
ref: j,
|
|
4729
4729
|
flex: "1",
|
|
4730
4730
|
minH: 0,
|
|
4731
4731
|
position: "relative",
|
|
@@ -4736,7 +4736,7 @@ function Wu({
|
|
|
4736
4736
|
},
|
|
4737
4737
|
children: [
|
|
4738
4738
|
w && /* @__PURE__ */ l.jsx(
|
|
4739
|
-
|
|
4739
|
+
ue,
|
|
4740
4740
|
{
|
|
4741
4741
|
position: "absolute",
|
|
4742
4742
|
inset: 0,
|
|
@@ -4778,7 +4778,7 @@ function Wu({
|
|
|
4778
4778
|
{
|
|
4779
4779
|
data: A,
|
|
4780
4780
|
columns: $,
|
|
4781
|
-
rowVirtualizer:
|
|
4781
|
+
rowVirtualizer: R,
|
|
4782
4782
|
onRowSelect: f,
|
|
4783
4783
|
onRowSelectEvent: m,
|
|
4784
4784
|
rowHeight: te
|
|
@@ -4790,14 +4790,14 @@ function Wu({
|
|
|
4790
4790
|
]
|
|
4791
4791
|
}
|
|
4792
4792
|
),
|
|
4793
|
-
|
|
4793
|
+
D === "pagination" && /* @__PURE__ */ l.jsx(ue, { mt: 0.5, children: /* @__PURE__ */ l.jsx(
|
|
4794
4794
|
nl,
|
|
4795
4795
|
{
|
|
4796
4796
|
totalCount: p,
|
|
4797
4797
|
pageSize: c,
|
|
4798
4798
|
currentPage: i,
|
|
4799
4799
|
onPageChange: (M) => {
|
|
4800
|
-
|
|
4800
|
+
j.current && (j.current.scrollTop = 0), u?.(M);
|
|
4801
4801
|
},
|
|
4802
4802
|
onPageSizeChange: (M) => {
|
|
4803
4803
|
h?.(M), i > 1 && u?.(1);
|
|
@@ -4805,7 +4805,7 @@ function Wu({
|
|
|
4805
4805
|
pageSizeOptions: g
|
|
4806
4806
|
}
|
|
4807
4807
|
) }),
|
|
4808
|
-
|
|
4808
|
+
D === "infinite" && /* @__PURE__ */ l.jsxs(ue, { mt: 2, px: 2, fontSize: "sm", color: "gray.500", children: [
|
|
4809
4809
|
"Showing ",
|
|
4810
4810
|
A.length,
|
|
4811
4811
|
" rows"
|
|
@@ -4841,7 +4841,7 @@ function hl(e, t, n) {
|
|
|
4841
4841
|
function fl(e, t, n) {
|
|
4842
4842
|
return Dr.randomUUID && !e ? Dr.randomUUID() : hl(e);
|
|
4843
4843
|
}
|
|
4844
|
-
const gl = b(
|
|
4844
|
+
const gl = b(Re.Root), pl = b(Re.HiddenInput), ml = b(Re.Control), vl = b(Re.Label), xl = ({
|
|
4845
4845
|
value: e,
|
|
4846
4846
|
onChange: t,
|
|
4847
4847
|
size: n = "sm",
|
|
@@ -4862,66 +4862,79 @@ const gl = b(Me.Root), pl = b(Me.HiddenInput), ml = b(Me.Control), vl = b(Me.Lab
|
|
|
4862
4862
|
}
|
|
4863
4863
|
),
|
|
4864
4864
|
r && /* @__PURE__ */ l.jsx(vl, { children: r })
|
|
4865
|
-
] }), bl = b(
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
const Sl = b(Se.Positioner), Cl = b(Se.Content);
|
|
4869
|
-
b(Se.Empty);
|
|
4870
|
-
const Dl = b(Se.Item);
|
|
4871
|
-
b(Se.ItemIndicator);
|
|
4872
|
-
const jl = b(Se.Label), El = b(Se.Control), Rl = b(Se.ItemText);
|
|
4873
|
-
function Ml({
|
|
4874
|
-
label: e,
|
|
4865
|
+
] }), bl = b(He.Root), yl = b(He.Input), wl = b(He.Trigger), Sl = b(He.Control), Cl = b(He.Content), Dl = b(He.Positioner), jl = b(He.Item), El = b(He.ItemText);
|
|
4866
|
+
function Rl({
|
|
4867
|
+
label: e = "Select Option",
|
|
4875
4868
|
size: t = "sm",
|
|
4876
|
-
width: n = "
|
|
4877
|
-
// Set a default width so it doesn't shrink to 0
|
|
4869
|
+
width: n = "200px",
|
|
4878
4870
|
items: r = [],
|
|
4879
|
-
itemToString: o,
|
|
4880
|
-
itemToValue: s,
|
|
4881
|
-
renderItem: a,
|
|
4871
|
+
itemToString: o = (p) => p?.label || "",
|
|
4872
|
+
itemToValue: s = (p) => p?.value || "",
|
|
4873
|
+
renderItem: a = (p) => p?.label || "",
|
|
4882
4874
|
value: i,
|
|
4883
4875
|
loading: c,
|
|
4884
|
-
placeholder: u,
|
|
4876
|
+
placeholder: u = "Search...",
|
|
4885
4877
|
onSelect: h,
|
|
4886
4878
|
visible: d = !0
|
|
4887
4879
|
}) {
|
|
4888
|
-
const [p, g] = H("")
|
|
4880
|
+
const [p, g] = H(""), f = B(() => [
|
|
4881
|
+
{ label: "Option 1", value: "1" },
|
|
4882
|
+
{ label: "Option 2", value: "2" },
|
|
4883
|
+
{ label: "Option 3", value: "3" }
|
|
4884
|
+
], []), m = r && r.length > 0 ? r : f;
|
|
4889
4885
|
V(() => {
|
|
4890
4886
|
g(i ? o(i) : "");
|
|
4891
4887
|
}, [i, o]);
|
|
4892
|
-
const
|
|
4893
|
-
items:
|
|
4888
|
+
const x = B(() => _n({
|
|
4889
|
+
items: m,
|
|
4894
4890
|
itemToString: o,
|
|
4895
4891
|
itemToValue: s
|
|
4896
|
-
}), [
|
|
4897
|
-
return d ? /* @__PURE__ */ l.jsxs(
|
|
4892
|
+
}), [m, o, s]);
|
|
4893
|
+
return d ? /* @__PURE__ */ l.jsx(ue, { minW: n, children: /* @__PURE__ */ l.jsxs(
|
|
4898
4894
|
bl,
|
|
4899
4895
|
{
|
|
4900
|
-
width:
|
|
4896
|
+
width: "100%",
|
|
4901
4897
|
size: t,
|
|
4902
|
-
collection:
|
|
4898
|
+
collection: x,
|
|
4903
4899
|
inputValue: p,
|
|
4904
|
-
onInputValueChange: (
|
|
4900
|
+
onInputValueChange: (D) => g(D.inputValue),
|
|
4905
4901
|
value: i ? [s(i)] : [],
|
|
4906
|
-
onValueChange: (
|
|
4907
|
-
const
|
|
4908
|
-
|
|
4902
|
+
onValueChange: (D) => {
|
|
4903
|
+
const E = D.value[0], j = m.find((_) => s(_) === E);
|
|
4904
|
+
j && h?.(j);
|
|
4909
4905
|
},
|
|
4910
4906
|
children: [
|
|
4911
|
-
e && /* @__PURE__ */ l.jsx(
|
|
4912
|
-
/* @__PURE__ */ l.jsxs(
|
|
4913
|
-
/* @__PURE__ */ l.jsx(
|
|
4907
|
+
e && /* @__PURE__ */ l.jsx(X, { fontSize: "xs", fontWeight: "medium", mb: "1", color: "gray.600", children: e }),
|
|
4908
|
+
/* @__PURE__ */ l.jsxs(Sl, { children: [
|
|
4909
|
+
/* @__PURE__ */ l.jsx(
|
|
4910
|
+
yl,
|
|
4911
|
+
{
|
|
4912
|
+
placeholder: u,
|
|
4913
|
+
bg: "white",
|
|
4914
|
+
px: 2
|
|
4915
|
+
}
|
|
4916
|
+
),
|
|
4914
4917
|
/* @__PURE__ */ l.jsx(wl, {})
|
|
4915
4918
|
] }),
|
|
4916
|
-
/* @__PURE__ */ l.jsx(Ge, { children: /* @__PURE__ */ l.jsx(
|
|
4919
|
+
/* @__PURE__ */ l.jsx(Ge, { children: /* @__PURE__ */ l.jsx(Dl, { zIndex: "max", children: /* @__PURE__ */ l.jsx(Cl, { bg: "white", boxShadow: "md", py: 1, borderRadius: "md", minW: "200px", children: c ? /* @__PURE__ */ l.jsxs(fe, { p: "3", justify: "center", children: [
|
|
4917
4920
|
/* @__PURE__ */ l.jsx(zr, { size: "xs" }),
|
|
4918
|
-
/* @__PURE__ */ l.jsx(
|
|
4919
|
-
] }) :
|
|
4921
|
+
/* @__PURE__ */ l.jsx(X, { fontSize: "sm", children: "Loading..." })
|
|
4922
|
+
] }) : m.length === 0 ? /* @__PURE__ */ l.jsx(X, { p: "3", fontSize: "sm", color: "gray.500", children: "No results found" }) : x.items.map((D) => /* @__PURE__ */ l.jsx(
|
|
4923
|
+
jl,
|
|
4924
|
+
{
|
|
4925
|
+
item: D,
|
|
4926
|
+
px: 2,
|
|
4927
|
+
py: 1.5,
|
|
4928
|
+
_hover: { bg: "blue.50", cursor: "pointer" },
|
|
4929
|
+
children: /* @__PURE__ */ l.jsx(El, { children: a(D) })
|
|
4930
|
+
},
|
|
4931
|
+
s(D)
|
|
4932
|
+
)) }) }) })
|
|
4920
4933
|
]
|
|
4921
4934
|
}
|
|
4922
|
-
) : null;
|
|
4935
|
+
) }) : null;
|
|
4923
4936
|
}
|
|
4924
|
-
const
|
|
4937
|
+
const Ml = b($e.Root), Ol = b($e.Content), _l = b($e.Arrow), Tl = b($e.Trigger), Il = b($e.Positioner), Be = (e) => e ? new Date(e.getFullYear(), e.getMonth(), e.getDate()) : null;
|
|
4925
4938
|
function Ue(e) {
|
|
4926
4939
|
if (!e) return "";
|
|
4927
4940
|
const t = String(e.getDate()).padStart(2, "0"), n = String(e.getMonth() + 1).padStart(2, "0"), r = e.getFullYear();
|
|
@@ -4939,7 +4952,7 @@ function jr(e) {
|
|
|
4939
4952
|
}, s = o(n), a = o(r);
|
|
4940
4953
|
return { start: s, end: a };
|
|
4941
4954
|
}
|
|
4942
|
-
function
|
|
4955
|
+
function $l({
|
|
4943
4956
|
startDate: e,
|
|
4944
4957
|
endDate: t,
|
|
4945
4958
|
onChange: n,
|
|
@@ -4948,38 +4961,38 @@ function Al({
|
|
|
4948
4961
|
label: s = "Select date range",
|
|
4949
4962
|
visible: a = !0
|
|
4950
4963
|
}) {
|
|
4951
|
-
const [i, c] = H(!1), [u, h] = H(e || /* @__PURE__ */ new Date()), [d, p] = H(null), [g, f] = H(Be(e)), [m, x] = H(Be(t)),
|
|
4952
|
-
|
|
4953
|
-
),
|
|
4964
|
+
const [i, c] = H(!1), [u, h] = H(e || /* @__PURE__ */ new Date()), [d, p] = H(null), [g, f] = H(Be(e)), [m, x] = H(Be(t)), D = (R, y) => R && y ? `${Ue(R)} to ${Ue(y)}` : R ? `${Ue(R)}` : "", [E, j] = H(
|
|
4965
|
+
D(Be(e), Be(t))
|
|
4966
|
+
), _ = e?.getTime(), I = t?.getTime();
|
|
4954
4967
|
V(() => {
|
|
4955
|
-
const
|
|
4956
|
-
f(
|
|
4957
|
-
}, [
|
|
4958
|
-
const
|
|
4959
|
-
const y = new Date(u.getFullYear(), u.getMonth(),
|
|
4968
|
+
const R = Be(e), y = Be(t);
|
|
4969
|
+
f(R), x(y), j(D(R, y)), R && h(new Date(R.getFullYear(), R.getMonth(), 1));
|
|
4970
|
+
}, [_, I]);
|
|
4971
|
+
const T = new Date(u.getFullYear(), u.getMonth() + 1, 0).getDate(), k = new Date(u.getFullYear(), u.getMonth(), 1).getDay(), $ = () => h(new Date(u.getFullYear(), u.getMonth() - 1, 1)), W = () => h(new Date(u.getFullYear(), u.getMonth() + 1, 1)), P = (R) => {
|
|
4972
|
+
const y = new Date(u.getFullYear(), u.getMonth(), R);
|
|
4960
4973
|
if (!g || g && m) {
|
|
4961
|
-
f(y), x(null), n(y, null),
|
|
4974
|
+
f(y), x(null), n(y, null), j(Ue(y));
|
|
4962
4975
|
return;
|
|
4963
4976
|
}
|
|
4964
4977
|
if (g && !m) {
|
|
4965
4978
|
const w = y < g ? y : g, C = y < g ? g : y;
|
|
4966
|
-
f(w), x(C), n(w, C),
|
|
4979
|
+
f(w), x(C), n(w, C), j(`${Ue(w)} to ${Ue(C)}`), c(!1);
|
|
4967
4980
|
}
|
|
4968
|
-
}, A = (
|
|
4969
|
-
const y =
|
|
4970
|
-
|
|
4981
|
+
}, A = (R) => {
|
|
4982
|
+
const y = R.target.value;
|
|
4983
|
+
j(y);
|
|
4971
4984
|
const { start: w, end: C } = jr(y);
|
|
4972
4985
|
if (w && C) {
|
|
4973
4986
|
const S = w < C ? w : C, M = w < C ? C : w;
|
|
4974
4987
|
f(S), x(M), n(S, M), h(S);
|
|
4975
4988
|
} else w && !y.toLowerCase().includes("to") ? (f(w), x(null), n(w, null)) : y.trim() || (f(null), x(null), n(null, null));
|
|
4976
|
-
}, Z = (
|
|
4977
|
-
if (
|
|
4978
|
-
const { start: y, end: w } = jr(
|
|
4979
|
-
if (y && !w && !
|
|
4989
|
+
}, Z = (R) => {
|
|
4990
|
+
if (R.key !== "Enter") return;
|
|
4991
|
+
const { start: y, end: w } = jr(E);
|
|
4992
|
+
if (y && !w && !E.toLowerCase().includes("to")) {
|
|
4980
4993
|
const C = `${Ue(y)} to `;
|
|
4981
|
-
|
|
4982
|
-
|
|
4994
|
+
j(C), f(y), x(null), n(y, null), requestAnimationFrame(() => {
|
|
4995
|
+
R.target.setSelectionRange(C.length, C.length);
|
|
4983
4996
|
});
|
|
4984
4997
|
return;
|
|
4985
4998
|
}
|
|
@@ -4987,16 +5000,16 @@ function Al({
|
|
|
4987
5000
|
const C = y < w ? y : w, S = y < w ? w : y;
|
|
4988
5001
|
f(C), x(S), n(C, S), c(!1);
|
|
4989
5002
|
}
|
|
4990
|
-
}, te = (
|
|
4991
|
-
|
|
5003
|
+
}, te = (R) => {
|
|
5004
|
+
R && (R.preventDefault(), R.stopPropagation()), f(null), x(null), j(""), n(null, null);
|
|
4992
5005
|
};
|
|
4993
|
-
return /* @__PURE__ */ l.jsxs(
|
|
4994
|
-
o && !a && /* @__PURE__ */ l.jsx(
|
|
5006
|
+
return /* @__PURE__ */ l.jsxs(ue, { width: r, onKeyDown: Z, children: [
|
|
5007
|
+
o && !a && /* @__PURE__ */ l.jsx(X, { fontSize: "xs", color: "fg.muted", mb: 1, fontWeight: "medium", children: s }),
|
|
4995
5008
|
/* @__PURE__ */ l.jsxs(
|
|
4996
|
-
|
|
5009
|
+
Ml,
|
|
4997
5010
|
{
|
|
4998
5011
|
open: i,
|
|
4999
|
-
onOpenChange: (
|
|
5012
|
+
onOpenChange: (R) => c(R.open),
|
|
5000
5013
|
positioning: { placement: "bottom-start", gutter: 4 },
|
|
5001
5014
|
children: [
|
|
5002
5015
|
/* @__PURE__ */ l.jsxs(Lr, { attached: !0, w: "full", position: "relative", children: [
|
|
@@ -5004,13 +5017,13 @@ function Al({
|
|
|
5004
5017
|
Xt,
|
|
5005
5018
|
{
|
|
5006
5019
|
placeholder: "DD-MM-YYYY to DD-MM-YYYY",
|
|
5007
|
-
value:
|
|
5020
|
+
value: E,
|
|
5008
5021
|
onChange: A,
|
|
5009
5022
|
size: "sm",
|
|
5010
5023
|
autoComplete: "off"
|
|
5011
5024
|
}
|
|
5012
5025
|
),
|
|
5013
|
-
|
|
5026
|
+
E && /* @__PURE__ */ l.jsx(
|
|
5014
5027
|
we,
|
|
5015
5028
|
{
|
|
5016
5029
|
size: "xs",
|
|
@@ -5026,7 +5039,7 @@ function Al({
|
|
|
5026
5039
|
children: /* @__PURE__ */ l.jsx(bo, { size: 14 })
|
|
5027
5040
|
}
|
|
5028
5041
|
),
|
|
5029
|
-
/* @__PURE__ */ l.jsx(
|
|
5042
|
+
/* @__PURE__ */ l.jsx(Tl, { asChild: !0, children: /* @__PURE__ */ l.jsx(
|
|
5030
5043
|
Nr,
|
|
5031
5044
|
{
|
|
5032
5045
|
cursor: "pointer",
|
|
@@ -5037,8 +5050,8 @@ function Al({
|
|
|
5037
5050
|
}
|
|
5038
5051
|
) })
|
|
5039
5052
|
] }),
|
|
5040
|
-
/* @__PURE__ */ l.jsx(
|
|
5041
|
-
|
|
5053
|
+
/* @__PURE__ */ l.jsx(Il, { children: /* @__PURE__ */ l.jsxs(
|
|
5054
|
+
Ol,
|
|
5042
5055
|
{
|
|
5043
5056
|
width: "300px",
|
|
5044
5057
|
p: 4,
|
|
@@ -5047,7 +5060,7 @@ function Al({
|
|
|
5047
5060
|
borderRadius: "md",
|
|
5048
5061
|
outline: "none",
|
|
5049
5062
|
children: [
|
|
5050
|
-
/* @__PURE__ */ l.jsx(
|
|
5063
|
+
/* @__PURE__ */ l.jsx(_l, {}),
|
|
5051
5064
|
/* @__PURE__ */ l.jsxs(fe, { justify: "space-between", mb: 4, children: [
|
|
5052
5065
|
/* @__PURE__ */ l.jsx(
|
|
5053
5066
|
we,
|
|
@@ -5060,7 +5073,7 @@ function Al({
|
|
|
5060
5073
|
children: "‹"
|
|
5061
5074
|
}
|
|
5062
5075
|
),
|
|
5063
|
-
/* @__PURE__ */ l.jsx(
|
|
5076
|
+
/* @__PURE__ */ l.jsx(X, { fontWeight: "bold", fontSize: "sm", children: u.toLocaleString("default", {
|
|
5064
5077
|
month: "long",
|
|
5065
5078
|
year: "numeric"
|
|
5066
5079
|
}) }),
|
|
@@ -5077,9 +5090,9 @@ function Al({
|
|
|
5077
5090
|
)
|
|
5078
5091
|
] }),
|
|
5079
5092
|
/* @__PURE__ */ l.jsxs(Pr, { templateColumns: "repeat(7, 1fr)", gap: 1, textAlign: "center", children: [
|
|
5080
|
-
["S", "M", "T", "W", "T", "F", "S"].map((
|
|
5081
|
-
Array(k).fill(null).map((
|
|
5082
|
-
Array.from({ length:
|
|
5093
|
+
["S", "M", "T", "W", "T", "F", "S"].map((R, y) => /* @__PURE__ */ l.jsx(X, { fontSize: "xs", fontWeight: "bold", color: "fg.subtle", py: 1, children: R }, `${R}-${y}`)),
|
|
5094
|
+
Array(k).fill(null).map((R, y) => /* @__PURE__ */ l.jsx(ue, {}, `empty-${y}`)),
|
|
5095
|
+
Array.from({ length: T }, (R, y) => {
|
|
5083
5096
|
const w = y + 1, C = new Date(u.getFullYear(), u.getMonth(), w);
|
|
5084
5097
|
let S = g, M = m;
|
|
5085
5098
|
const z = Be(d);
|
|
@@ -5092,14 +5105,14 @@ function Al({
|
|
|
5092
5105
|
}
|
|
5093
5106
|
}
|
|
5094
5107
|
const v = S && C.getTime() === S.getTime(), O = M && C.getTime() === M.getTime(), L = S && M && C > S && C < M;
|
|
5095
|
-
let N = "gray",
|
|
5096
|
-
(v || O) && (
|
|
5108
|
+
let N = "gray", J = "ghost";
|
|
5109
|
+
(v || O) && (J = "solid", N = "blue");
|
|
5097
5110
|
let q = "md";
|
|
5098
5111
|
return L && (q = "0"), v && M && (q = O ? "md" : "md 0 0 md"), O && S && (q = v ? "md" : "0 md md 0"), /* @__PURE__ */ l.jsx(
|
|
5099
|
-
|
|
5112
|
+
Te,
|
|
5100
5113
|
{
|
|
5101
5114
|
size: "xs",
|
|
5102
|
-
variant:
|
|
5115
|
+
variant: J,
|
|
5103
5116
|
colorPalette: N,
|
|
5104
5117
|
onClick: () => P(w),
|
|
5105
5118
|
onMouseEnter: () => p(C),
|
|
@@ -5117,7 +5130,7 @@ function Al({
|
|
|
5117
5130
|
);
|
|
5118
5131
|
})
|
|
5119
5132
|
] }),
|
|
5120
|
-
/* @__PURE__ */ l.jsx(
|
|
5133
|
+
/* @__PURE__ */ l.jsx(X, { fontSize: "10px", color: "fg.muted", mt: 3, textAlign: "center", children: "Select Start Date then End Date" })
|
|
5121
5134
|
]
|
|
5122
5135
|
}
|
|
5123
5136
|
) })
|
|
@@ -5126,13 +5139,13 @@ function Al({
|
|
|
5126
5139
|
)
|
|
5127
5140
|
] });
|
|
5128
5141
|
}
|
|
5129
|
-
const
|
|
5142
|
+
const Al = b($e.Root), kl = b($e.Content), zl = b($e.Arrow), Ll = b($e.Trigger), Nl = b($e.Positioner);
|
|
5130
5143
|
function Er(e) {
|
|
5131
5144
|
if (!e) return "";
|
|
5132
5145
|
const t = String(e.getDate()).padStart(2, "0"), n = String(e.getMonth() + 1).padStart(2, "0"), r = e.getFullYear();
|
|
5133
5146
|
return `${t}-${n}-${r}`;
|
|
5134
5147
|
}
|
|
5135
|
-
function
|
|
5148
|
+
function Pl(e) {
|
|
5136
5149
|
const t = e.split("-");
|
|
5137
5150
|
if (t.length !== 3) return null;
|
|
5138
5151
|
const [n, r, o] = t, s = parseInt(n), a = parseInt(r) - 1, i = parseInt(o);
|
|
@@ -5140,7 +5153,7 @@ function Fl(e) {
|
|
|
5140
5153
|
const c = new Date(i, a, s);
|
|
5141
5154
|
return c.getDate() === s && c.getMonth() === a ? c : null;
|
|
5142
5155
|
}
|
|
5143
|
-
function
|
|
5156
|
+
function Fl({
|
|
5144
5157
|
value: e,
|
|
5145
5158
|
onChange: t,
|
|
5146
5159
|
width: n = "220px",
|
|
@@ -5155,12 +5168,12 @@ function Wl({
|
|
|
5155
5168
|
c(new Date(i.getFullYear(), i.getMonth() - 1, 1));
|
|
5156
5169
|
}, f = () => {
|
|
5157
5170
|
c(new Date(i.getFullYear(), i.getMonth() + 1, 1));
|
|
5158
|
-
}, m = (
|
|
5159
|
-
const
|
|
5160
|
-
t(
|
|
5161
|
-
}, x = (
|
|
5171
|
+
}, m = (E) => {
|
|
5172
|
+
const j = new Date(i.getFullYear(), i.getMonth(), E);
|
|
5173
|
+
t(j), a(!1);
|
|
5174
|
+
}, x = (E) => {
|
|
5162
5175
|
if (s)
|
|
5163
|
-
switch (
|
|
5176
|
+
switch (E.key) {
|
|
5164
5177
|
case "ArrowLeft":
|
|
5165
5178
|
g();
|
|
5166
5179
|
break;
|
|
@@ -5171,16 +5184,16 @@ function Wl({
|
|
|
5171
5184
|
a(!1);
|
|
5172
5185
|
break;
|
|
5173
5186
|
}
|
|
5174
|
-
},
|
|
5187
|
+
}, D = () => {
|
|
5175
5188
|
h(""), t(null);
|
|
5176
5189
|
};
|
|
5177
|
-
return /* @__PURE__ */ l.jsxs(
|
|
5178
|
-
!r && /* @__PURE__ */ l.jsx(
|
|
5190
|
+
return /* @__PURE__ */ l.jsxs(ue, { width: n, onKeyDown: x, children: [
|
|
5191
|
+
!r && /* @__PURE__ */ l.jsx(X, { fontSize: "xs", color: "fg.muted", mb: 1, fontWeight: "medium", children: o }),
|
|
5179
5192
|
/* @__PURE__ */ l.jsxs(
|
|
5180
|
-
|
|
5193
|
+
Al,
|
|
5181
5194
|
{
|
|
5182
5195
|
open: s,
|
|
5183
|
-
onOpenChange: (
|
|
5196
|
+
onOpenChange: (E) => a(E.open),
|
|
5184
5197
|
positioning: { placement: "bottom-start", gutter: 4 },
|
|
5185
5198
|
children: [
|
|
5186
5199
|
/* @__PURE__ */ l.jsxs(Lr, { attached: !0, w: "full", position: "relative", children: [
|
|
@@ -5190,7 +5203,7 @@ function Wl({
|
|
|
5190
5203
|
size: "xs",
|
|
5191
5204
|
variant: "ghost",
|
|
5192
5205
|
"aria-label": "Clear date",
|
|
5193
|
-
onClick:
|
|
5206
|
+
onClick: D,
|
|
5194
5207
|
position: "absolute",
|
|
5195
5208
|
right: "32px",
|
|
5196
5209
|
top: "50%",
|
|
@@ -5204,17 +5217,17 @@ function Wl({
|
|
|
5204
5217
|
{
|
|
5205
5218
|
placeholder: "DD-MM-YYYY",
|
|
5206
5219
|
value: u,
|
|
5207
|
-
onChange: (
|
|
5208
|
-
const
|
|
5209
|
-
h(
|
|
5210
|
-
const
|
|
5211
|
-
|
|
5220
|
+
onChange: (E) => {
|
|
5221
|
+
const j = E.target.value;
|
|
5222
|
+
h(j);
|
|
5223
|
+
const _ = Pl(j);
|
|
5224
|
+
_ && (t(_), c(_));
|
|
5212
5225
|
},
|
|
5213
5226
|
size: "sm",
|
|
5214
5227
|
autoComplete: "off"
|
|
5215
5228
|
}
|
|
5216
5229
|
),
|
|
5217
|
-
/* @__PURE__ */ l.jsx(
|
|
5230
|
+
/* @__PURE__ */ l.jsx(Ll, { asChild: !0, children: /* @__PURE__ */ l.jsx(
|
|
5218
5231
|
Nr,
|
|
5219
5232
|
{
|
|
5220
5233
|
cursor: "pointer",
|
|
@@ -5225,8 +5238,8 @@ function Wl({
|
|
|
5225
5238
|
}
|
|
5226
5239
|
) })
|
|
5227
5240
|
] }),
|
|
5228
|
-
/* @__PURE__ */ l.jsx(
|
|
5229
|
-
|
|
5241
|
+
/* @__PURE__ */ l.jsx(Nl, { children: /* @__PURE__ */ l.jsxs(
|
|
5242
|
+
kl,
|
|
5230
5243
|
{
|
|
5231
5244
|
width: "300px",
|
|
5232
5245
|
p: 4,
|
|
@@ -5235,7 +5248,7 @@ function Wl({
|
|
|
5235
5248
|
borderRadius: "md",
|
|
5236
5249
|
outline: "none",
|
|
5237
5250
|
children: [
|
|
5238
|
-
/* @__PURE__ */ l.jsx(
|
|
5251
|
+
/* @__PURE__ */ l.jsx(zl, {}),
|
|
5239
5252
|
/* @__PURE__ */ l.jsxs(fe, { justify: "space-between", mb: 4, children: [
|
|
5240
5253
|
/* @__PURE__ */ l.jsx(
|
|
5241
5254
|
we,
|
|
@@ -5247,7 +5260,7 @@ function Wl({
|
|
|
5247
5260
|
children: "‹"
|
|
5248
5261
|
}
|
|
5249
5262
|
),
|
|
5250
|
-
/* @__PURE__ */ l.jsx(
|
|
5263
|
+
/* @__PURE__ */ l.jsx(X, { fontWeight: "bold", fontSize: "sm", children: i.toLocaleString("default", {
|
|
5251
5264
|
month: "long",
|
|
5252
5265
|
year: "numeric"
|
|
5253
5266
|
}) }),
|
|
@@ -5263,28 +5276,28 @@ function Wl({
|
|
|
5263
5276
|
)
|
|
5264
5277
|
] }),
|
|
5265
5278
|
/* @__PURE__ */ l.jsxs(Pr, { templateColumns: "repeat(7, 1fr)", gap: 1, textAlign: "center", children: [
|
|
5266
|
-
["S", "M", "T", "W", "T", "F", "S"].map((
|
|
5267
|
-
Array(p).fill(null).map((
|
|
5268
|
-
Array.from({ length: d }, (
|
|
5269
|
-
const
|
|
5279
|
+
["S", "M", "T", "W", "T", "F", "S"].map((E, j) => /* @__PURE__ */ l.jsx(X, { fontSize: "xs", fontWeight: "bold", color: "fg.subtle", py: 1, children: E }, `${E}-${j}`)),
|
|
5280
|
+
Array(p).fill(null).map((E, j) => /* @__PURE__ */ l.jsx(ue, {}, `empty-${j}`)),
|
|
5281
|
+
Array.from({ length: d }, (E, j) => {
|
|
5282
|
+
const _ = j + 1, I = e && e.getDate() === _ && e.getMonth() === i.getMonth() && e.getFullYear() === i.getFullYear();
|
|
5270
5283
|
return /* @__PURE__ */ l.jsx(
|
|
5271
|
-
|
|
5284
|
+
Te,
|
|
5272
5285
|
{
|
|
5273
5286
|
size: "xs",
|
|
5274
5287
|
variant: I ? "solid" : "ghost",
|
|
5275
5288
|
colorPalette: I ? "blue" : "gray",
|
|
5276
|
-
onClick: () => m(
|
|
5289
|
+
onClick: () => m(_),
|
|
5277
5290
|
minW: "32px",
|
|
5278
5291
|
h: "32px",
|
|
5279
5292
|
fontSize: "xs",
|
|
5280
5293
|
borderRadius: "md",
|
|
5281
|
-
children:
|
|
5294
|
+
children: _
|
|
5282
5295
|
},
|
|
5283
|
-
|
|
5296
|
+
_
|
|
5284
5297
|
);
|
|
5285
5298
|
})
|
|
5286
5299
|
] }),
|
|
5287
|
-
/* @__PURE__ */ l.jsx(
|
|
5300
|
+
/* @__PURE__ */ l.jsx(X, { fontSize: "10px", color: "fg.muted", mt: 3, textAlign: "center", children: "Use Arrow Keys to change months • Esc to close" })
|
|
5288
5301
|
]
|
|
5289
5302
|
}
|
|
5290
5303
|
) })
|
|
@@ -5293,7 +5306,7 @@ function Wl({
|
|
|
5293
5306
|
)
|
|
5294
5307
|
] });
|
|
5295
5308
|
}
|
|
5296
|
-
const
|
|
5309
|
+
const Wl = b(Me.Root), Vl = b(Me.Label), Yl = b(Me.HelperText), Hl = b(Me.ErrorText), Rr = ({
|
|
5297
5310
|
icon: e,
|
|
5298
5311
|
value: t,
|
|
5299
5312
|
onChange: n,
|
|
@@ -5311,13 +5324,13 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5311
5324
|
min: f = 0,
|
|
5312
5325
|
max: m = 100,
|
|
5313
5326
|
step: x = 1
|
|
5314
|
-
}) => /* @__PURE__ */ l.jsxs(
|
|
5315
|
-
p && /* @__PURE__ */ l.jsx(
|
|
5327
|
+
}) => /* @__PURE__ */ l.jsxs(Wl, { width: a, children: [
|
|
5328
|
+
p && /* @__PURE__ */ l.jsx(Vl, { children: i }),
|
|
5316
5329
|
/* @__PURE__ */ l.jsx(Lo, { startElement: e, children: /* @__PURE__ */ l.jsx(
|
|
5317
5330
|
Xt,
|
|
5318
5331
|
{
|
|
5319
5332
|
value: t,
|
|
5320
|
-
onChange: (
|
|
5333
|
+
onChange: (D) => n?.(D.target.value),
|
|
5321
5334
|
placeholder: r,
|
|
5322
5335
|
size: o,
|
|
5323
5336
|
type: g,
|
|
@@ -5329,9 +5342,9 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5329
5342
|
step: x
|
|
5330
5343
|
}
|
|
5331
5344
|
) }),
|
|
5332
|
-
d && /* @__PURE__ */ l.jsx(
|
|
5333
|
-
c && /* @__PURE__ */ l.jsx(
|
|
5334
|
-
] }),
|
|
5345
|
+
d && /* @__PURE__ */ l.jsx(Hl, { fontSize: "xs", children: d }),
|
|
5346
|
+
c && /* @__PURE__ */ l.jsx(Yl, { fontSize: "xs", children: c })
|
|
5347
|
+
] }), Bl = b(Me.Root), Ul = b(Me.HelperText), Gl = b(Me.ErrorText), ql = b(ee.Root), Xl = b(ee.Label), Kl = b(ee.Control), Jl = b(ee.Trigger), Zl = b(ee.ValueText), Ql = b(ee.IndicatorGroup), ec = b(ee.Indicator), tc = b(ee.Content), nc = b(ee.Item), rc = b(ee.ItemIndicator), oc = b(ee.HiddenSelect), sc = b(ee.Positioner), ic = ({
|
|
5335
5348
|
options: e = [],
|
|
5336
5349
|
label: t,
|
|
5337
5350
|
value: n,
|
|
@@ -5346,14 +5359,14 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5346
5359
|
errorText: d,
|
|
5347
5360
|
visible: p
|
|
5348
5361
|
}) => {
|
|
5349
|
-
const g =
|
|
5362
|
+
const g = B(() => _n({
|
|
5350
5363
|
items: e
|
|
5351
5364
|
}), [e]), f = e.find((x) => x.value === n), m = (x) => {
|
|
5352
5365
|
x.preventDefault(), x.stopPropagation(), r?.(void 0);
|
|
5353
5366
|
};
|
|
5354
|
-
return /* @__PURE__ */ l.jsxs(
|
|
5367
|
+
return /* @__PURE__ */ l.jsxs(Bl, { disabled: u, required: h, children: [
|
|
5355
5368
|
/* @__PURE__ */ l.jsxs(
|
|
5356
|
-
|
|
5369
|
+
ql,
|
|
5357
5370
|
{
|
|
5358
5371
|
collection: g,
|
|
5359
5372
|
variant: i,
|
|
@@ -5364,11 +5377,11 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5364
5377
|
r?.(x.value[0]);
|
|
5365
5378
|
},
|
|
5366
5379
|
children: [
|
|
5367
|
-
/* @__PURE__ */ l.jsx(
|
|
5368
|
-
p && /* @__PURE__ */ l.jsx(
|
|
5369
|
-
/* @__PURE__ */ l.jsxs(
|
|
5370
|
-
/* @__PURE__ */ l.jsx(
|
|
5371
|
-
/* @__PURE__ */ l.jsxs(
|
|
5380
|
+
/* @__PURE__ */ l.jsx(oc, {}),
|
|
5381
|
+
p && /* @__PURE__ */ l.jsx(Xl, { children: t }),
|
|
5382
|
+
/* @__PURE__ */ l.jsxs(Kl, { children: [
|
|
5383
|
+
/* @__PURE__ */ l.jsx(Jl, { children: /* @__PURE__ */ l.jsx(Zl, { placeholder: o, children: f?.displayValue ?? f?.label }) }),
|
|
5384
|
+
/* @__PURE__ */ l.jsxs(Ql, { children: [
|
|
5372
5385
|
n && !u && // 4. Wrap CloseButton to ensure it has its own layer
|
|
5373
5386
|
/* @__PURE__ */ l.jsx(
|
|
5374
5387
|
"div",
|
|
@@ -5389,20 +5402,20 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5389
5402
|
)
|
|
5390
5403
|
}
|
|
5391
5404
|
),
|
|
5392
|
-
/* @__PURE__ */ l.jsx(
|
|
5405
|
+
/* @__PURE__ */ l.jsx(ec, {})
|
|
5393
5406
|
] })
|
|
5394
5407
|
] }),
|
|
5395
|
-
/* @__PURE__ */ l.jsx(
|
|
5408
|
+
/* @__PURE__ */ l.jsx(sc, { children: /* @__PURE__ */ l.jsx(tc, { children: g.items.map((x, D) => /* @__PURE__ */ l.jsxs(nc, { item: x, children: [
|
|
5396
5409
|
x.label,
|
|
5397
|
-
/* @__PURE__ */ l.jsx(
|
|
5398
|
-
] },
|
|
5410
|
+
/* @__PURE__ */ l.jsx(rc, {})
|
|
5411
|
+
] }, D)) }) })
|
|
5399
5412
|
]
|
|
5400
5413
|
}
|
|
5401
5414
|
),
|
|
5402
|
-
c && /* @__PURE__ */ l.jsx(
|
|
5403
|
-
d && /* @__PURE__ */ l.jsx(
|
|
5415
|
+
c && /* @__PURE__ */ l.jsx(Ul, { children: c }),
|
|
5416
|
+
d && /* @__PURE__ */ l.jsx(Gl, { children: d })
|
|
5404
5417
|
] });
|
|
5405
|
-
},
|
|
5418
|
+
}, ac = "FILTER_PRESETS_", yo = (e) => `${ac}${e}`, Fn = (e) => {
|
|
5406
5419
|
if (typeof window > "u") return [];
|
|
5407
5420
|
const t = localStorage.getItem(yo(e));
|
|
5408
5421
|
try {
|
|
@@ -5412,13 +5425,13 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5412
5425
|
}
|
|
5413
5426
|
}, wo = (e, t) => {
|
|
5414
5427
|
typeof window > "u" || (localStorage.setItem(yo(e), JSON.stringify(t)), window.dispatchEvent(new Event("storage_updated")));
|
|
5415
|
-
},
|
|
5428
|
+
}, lc = (e, t) => {
|
|
5416
5429
|
const n = Fn(e);
|
|
5417
5430
|
wo(e, [t, ...n]);
|
|
5418
|
-
},
|
|
5431
|
+
}, cc = (e, t) => {
|
|
5419
5432
|
const n = Fn(e).filter((r) => r.id !== t);
|
|
5420
5433
|
wo(e, n);
|
|
5421
|
-
},
|
|
5434
|
+
}, uc = b(Re.Root), dc = b(Re.HiddenInput), hc = b(Re.Control), fc = b(St.Root), gc = b(St.Track), pc = b(St.Range), mc = b(St.Thumbs), vc = b(St.Control), xc = ({ filter: e, onVisibilityChange: t, onSizeChange: n }) => {
|
|
5422
5435
|
const { attributes: r, listeners: o, setNodeRef: s, transform: a, transition: i } = co({
|
|
5423
5436
|
id: e.id
|
|
5424
5437
|
}), c = {
|
|
@@ -5440,36 +5453,36 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5440
5453
|
children: [
|
|
5441
5454
|
/* @__PURE__ */ l.jsxs(fe, { ...r, ...o, cursor: "grab", userSelect: "none", gap: 2, children: [
|
|
5442
5455
|
/* @__PURE__ */ l.jsx(vo, { size: 16 }),
|
|
5443
|
-
/* @__PURE__ */ l.jsx(
|
|
5456
|
+
/* @__PURE__ */ l.jsx(X, { fontWeight: "bold", fontSize: "sm", children: e.label || e.id })
|
|
5444
5457
|
] }),
|
|
5445
5458
|
/* @__PURE__ */ l.jsxs(fe, { justify: "space-between", children: [
|
|
5446
|
-
/* @__PURE__ */ l.jsx(
|
|
5459
|
+
/* @__PURE__ */ l.jsx(X, { fontSize: "sm", children: "Visible" }),
|
|
5447
5460
|
/* @__PURE__ */ l.jsxs(
|
|
5448
|
-
|
|
5461
|
+
uc,
|
|
5449
5462
|
{
|
|
5450
5463
|
checked: e.visible,
|
|
5451
5464
|
size: "sm",
|
|
5452
5465
|
onCheckedChange: (u) => t?.(e.id, !!u.checked),
|
|
5453
5466
|
children: [
|
|
5454
|
-
/* @__PURE__ */ l.jsx(
|
|
5455
|
-
/* @__PURE__ */ l.jsx(
|
|
5467
|
+
/* @__PURE__ */ l.jsx(dc, {}),
|
|
5468
|
+
/* @__PURE__ */ l.jsx(hc, {})
|
|
5456
5469
|
]
|
|
5457
5470
|
}
|
|
5458
5471
|
)
|
|
5459
5472
|
] }),
|
|
5460
5473
|
/* @__PURE__ */ l.jsxs(gt, { align: "stretch", gap: 1, children: [
|
|
5461
|
-
/* @__PURE__ */ l.jsx(
|
|
5474
|
+
/* @__PURE__ */ l.jsx(X, { fontSize: "sm", children: "Size" }),
|
|
5462
5475
|
/* @__PURE__ */ l.jsx(
|
|
5463
|
-
|
|
5476
|
+
fc,
|
|
5464
5477
|
{
|
|
5465
5478
|
min: 1,
|
|
5466
5479
|
max: 5,
|
|
5467
5480
|
step: 0.5,
|
|
5468
5481
|
value: [e.size ?? 1],
|
|
5469
5482
|
onValueChange: (u) => n?.(e.id, u.value[0]),
|
|
5470
|
-
children: /* @__PURE__ */ l.jsxs(
|
|
5471
|
-
/* @__PURE__ */ l.jsx(
|
|
5472
|
-
/* @__PURE__ */ l.jsx(
|
|
5483
|
+
children: /* @__PURE__ */ l.jsxs(vc, { children: [
|
|
5484
|
+
/* @__PURE__ */ l.jsx(gc, { children: /* @__PURE__ */ l.jsx(pc, {}) }),
|
|
5485
|
+
/* @__PURE__ */ l.jsx(mc, {})
|
|
5473
5486
|
] })
|
|
5474
5487
|
}
|
|
5475
5488
|
)
|
|
@@ -5477,7 +5490,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5477
5490
|
]
|
|
5478
5491
|
}
|
|
5479
5492
|
);
|
|
5480
|
-
},
|
|
5493
|
+
}, bc = b(Ae.Root), yc = b(Ae.Trigger), wc = b(Ae.Backdrop), Sc = b(Ae.Positioner), Cc = b(Ae.Content), Dc = b(Ae.Header), jc = b(Ae.Title), Ec = b(Ae.Body), Rc = b(Ae.Footer), Mc = b(Ae.CloseTrigger), Oc = b(Kt.Root), _c = b(Kt.List), bn = b(Kt.Trigger), yn = b(Kt.Content), So = (e, t) => {
|
|
5481
5494
|
if (e.customComponent)
|
|
5482
5495
|
return e.customComponent;
|
|
5483
5496
|
switch (e.type) {
|
|
@@ -5505,7 +5518,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5505
5518
|
);
|
|
5506
5519
|
case "select":
|
|
5507
5520
|
return /* @__PURE__ */ l.jsx(
|
|
5508
|
-
|
|
5521
|
+
ic,
|
|
5509
5522
|
{
|
|
5510
5523
|
label: e.label,
|
|
5511
5524
|
value: e.value,
|
|
@@ -5517,7 +5530,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5517
5530
|
);
|
|
5518
5531
|
case "date":
|
|
5519
5532
|
return /* @__PURE__ */ l.jsx(
|
|
5520
|
-
|
|
5533
|
+
Fl,
|
|
5521
5534
|
{
|
|
5522
5535
|
value: e.value,
|
|
5523
5536
|
onChange: e.onChange,
|
|
@@ -5528,7 +5541,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5528
5541
|
case "date-range":
|
|
5529
5542
|
const n = e.value, r = n?.startDate || e.startDate, o = n?.endDate || e.endDate;
|
|
5530
5543
|
return /* @__PURE__ */ l.jsx(
|
|
5531
|
-
|
|
5544
|
+
$l,
|
|
5532
5545
|
{
|
|
5533
5546
|
startDate: r ? new Date(r) : void 0,
|
|
5534
5547
|
endDate: o ? new Date(o) : void 0,
|
|
@@ -5542,7 +5555,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5542
5555
|
// Inside renderFilter function
|
|
5543
5556
|
case "combobox":
|
|
5544
5557
|
return /* @__PURE__ */ l.jsx(
|
|
5545
|
-
|
|
5558
|
+
Rl,
|
|
5546
5559
|
{
|
|
5547
5560
|
label: e.label,
|
|
5548
5561
|
value: e.value,
|
|
@@ -5552,7 +5565,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5552
5565
|
onSelect: (s) => {
|
|
5553
5566
|
e.onChange?.(s);
|
|
5554
5567
|
},
|
|
5555
|
-
renderItem: (s) => /* @__PURE__ */ l.jsx(
|
|
5568
|
+
renderItem: (s) => /* @__PURE__ */ l.jsx(X, { fontSize: "sm", children: s.label }),
|
|
5556
5569
|
placeholder: e.placeholder || "Search...",
|
|
5557
5570
|
visible: t
|
|
5558
5571
|
}
|
|
@@ -5560,7 +5573,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5560
5573
|
default:
|
|
5561
5574
|
return null;
|
|
5562
5575
|
}
|
|
5563
|
-
},
|
|
5576
|
+
}, Tc = ({
|
|
5564
5577
|
filterDrawerSize: e = "sm",
|
|
5565
5578
|
onVisibilityChange: t,
|
|
5566
5579
|
onSizeChange: n,
|
|
@@ -5586,27 +5599,27 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5586
5599
|
const f = prompt("Preset name?");
|
|
5587
5600
|
if (!f) return;
|
|
5588
5601
|
const m = o.reduce(
|
|
5589
|
-
(x,
|
|
5602
|
+
(x, D) => (x[D.id] = D.value, x),
|
|
5590
5603
|
{}
|
|
5591
5604
|
);
|
|
5592
|
-
|
|
5605
|
+
lc(s, {
|
|
5593
5606
|
id: fl(),
|
|
5594
5607
|
name: f,
|
|
5595
5608
|
date: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5596
5609
|
values: m
|
|
5597
5610
|
});
|
|
5598
5611
|
};
|
|
5599
|
-
return /* @__PURE__ */ l.jsx(fe, { wrap: "wrap", children: /* @__PURE__ */ l.jsxs(
|
|
5600
|
-
/* @__PURE__ */ l.jsx(
|
|
5612
|
+
return /* @__PURE__ */ l.jsx(fe, { wrap: "wrap", children: /* @__PURE__ */ l.jsxs(bc, { size: e, open: u, onOpenChange: h, children: [
|
|
5613
|
+
/* @__PURE__ */ l.jsx(yc, { asChild: !0, children: /* @__PURE__ */ l.jsxs(we, { "aria-label": "Open filters", variant: "outline", size: "xs", ml: 2, p: 2, children: [
|
|
5601
5614
|
/* @__PURE__ */ l.jsx(Sa, { size: 16 }),
|
|
5602
5615
|
"Filters"
|
|
5603
5616
|
] }) }),
|
|
5604
5617
|
/* @__PURE__ */ l.jsxs(Ge, { children: [
|
|
5605
|
-
/* @__PURE__ */ l.jsx(
|
|
5606
|
-
/* @__PURE__ */ l.jsx(
|
|
5607
|
-
/* @__PURE__ */ l.jsx(
|
|
5608
|
-
/* @__PURE__ */ l.jsx(
|
|
5609
|
-
/* @__PURE__ */ l.jsxs(
|
|
5618
|
+
/* @__PURE__ */ l.jsx(wc, {}),
|
|
5619
|
+
/* @__PURE__ */ l.jsx(Sc, { children: /* @__PURE__ */ l.jsxs(Cc, { children: [
|
|
5620
|
+
/* @__PURE__ */ l.jsx(Dc, { children: /* @__PURE__ */ l.jsx(jc, { children: "Filters" }) }),
|
|
5621
|
+
/* @__PURE__ */ l.jsx(Ec, { overflowY: "auto", pt: 1, children: /* @__PURE__ */ l.jsxs(Oc, { defaultValue: "view", children: [
|
|
5622
|
+
/* @__PURE__ */ l.jsxs(_c, { mb: 4, children: [
|
|
5610
5623
|
/* @__PURE__ */ l.jsxs(bn, { value: "view", children: [
|
|
5611
5624
|
/* @__PURE__ */ l.jsx(ja, { size: 16 }),
|
|
5612
5625
|
"Edit"
|
|
@@ -5642,8 +5655,8 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5642
5655
|
collisionDetection: Yr,
|
|
5643
5656
|
onDragEnd: ({ active: f, over: m }) => {
|
|
5644
5657
|
if (!m || f.id === m.id) return;
|
|
5645
|
-
const x = o.findIndex((
|
|
5646
|
-
c?.(
|
|
5658
|
+
const x = o.findIndex((j) => j.id === f.id), D = o.findIndex((j) => j.id === m.id), E = nn(o, x, D);
|
|
5659
|
+
c?.(E);
|
|
5647
5660
|
},
|
|
5648
5661
|
children: /* @__PURE__ */ l.jsx(
|
|
5649
5662
|
ao,
|
|
@@ -5651,7 +5664,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5651
5664
|
items: o.map((f) => f.id),
|
|
5652
5665
|
strategy: bi,
|
|
5653
5666
|
children: o.map((f) => /* @__PURE__ */ l.jsx(
|
|
5654
|
-
|
|
5667
|
+
xc,
|
|
5655
5668
|
{
|
|
5656
5669
|
filter: f,
|
|
5657
5670
|
onVisibilityChange: t,
|
|
@@ -5664,7 +5677,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5664
5677
|
}
|
|
5665
5678
|
) }),
|
|
5666
5679
|
/* @__PURE__ */ l.jsx(yn, { value: "presets", children: /* @__PURE__ */ l.jsxs(gt, { align: "stretch", mb: 3, children: [
|
|
5667
|
-
d.length === 0 && /* @__PURE__ */ l.jsx(
|
|
5680
|
+
d.length === 0 && /* @__PURE__ */ l.jsx(X, { fontSize: "xs", color: "gray.500", children: "No presets saved yet." }),
|
|
5668
5681
|
d.map((f) => /* @__PURE__ */ l.jsxs(
|
|
5669
5682
|
fe,
|
|
5670
5683
|
{
|
|
@@ -5675,12 +5688,12 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5675
5688
|
p: 2,
|
|
5676
5689
|
children: [
|
|
5677
5690
|
/* @__PURE__ */ l.jsxs(gt, { align: "start", gap: 0, children: [
|
|
5678
|
-
/* @__PURE__ */ l.jsx(
|
|
5679
|
-
/* @__PURE__ */ l.jsx(
|
|
5691
|
+
/* @__PURE__ */ l.jsx(X, { fontWeight: "bold", fontSize: "sm", children: f.name }),
|
|
5692
|
+
/* @__PURE__ */ l.jsx(X, { fontSize: "xs", color: "gray.500", children: new Date(f.date).toLocaleDateString() })
|
|
5680
5693
|
] }),
|
|
5681
5694
|
/* @__PURE__ */ l.jsxs(fe, { children: [
|
|
5682
5695
|
/* @__PURE__ */ l.jsx(
|
|
5683
|
-
|
|
5696
|
+
Te,
|
|
5684
5697
|
{
|
|
5685
5698
|
size: "xs",
|
|
5686
5699
|
variant: "ghost",
|
|
@@ -5700,7 +5713,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5700
5713
|
size: "xs",
|
|
5701
5714
|
"aria-label": "Delete preset",
|
|
5702
5715
|
variant: "ghost",
|
|
5703
|
-
onClick: () =>
|
|
5716
|
+
onClick: () => cc(s, f.id),
|
|
5704
5717
|
children: /* @__PURE__ */ l.jsx(ya, { size: 14 })
|
|
5705
5718
|
}
|
|
5706
5719
|
)
|
|
@@ -5709,14 +5722,14 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5709
5722
|
},
|
|
5710
5723
|
f.id
|
|
5711
5724
|
)),
|
|
5712
|
-
/* @__PURE__ */ l.jsx(
|
|
5725
|
+
/* @__PURE__ */ l.jsx(Te, { size: "sm", colorScheme: "blue", onClick: g, children: "Save Current Filters" })
|
|
5713
5726
|
] }) })
|
|
5714
5727
|
] }) }),
|
|
5715
|
-
/* @__PURE__ */ l.jsx(
|
|
5728
|
+
/* @__PURE__ */ l.jsx(Rc, { justify: "space-between", children: /* @__PURE__ */ l.jsx(Mc, { asChild: !0, children: /* @__PURE__ */ l.jsx(wt, {}) }) })
|
|
5716
5729
|
] }) })
|
|
5717
5730
|
] })
|
|
5718
5731
|
] }) });
|
|
5719
|
-
},
|
|
5732
|
+
}, Wu = ({
|
|
5720
5733
|
title: e,
|
|
5721
5734
|
filters: t,
|
|
5722
5735
|
onVisibilityChange: n,
|
|
@@ -5743,7 +5756,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5743
5756
|
g.id
|
|
5744
5757
|
)),
|
|
5745
5758
|
/* @__PURE__ */ l.jsx(
|
|
5746
|
-
|
|
5759
|
+
Tc,
|
|
5747
5760
|
{
|
|
5748
5761
|
filterDrawerSize: h,
|
|
5749
5762
|
onVisibilityChange: n,
|
|
@@ -5763,15 +5776,15 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5763
5776
|
)
|
|
5764
5777
|
] })
|
|
5765
5778
|
] });
|
|
5766
|
-
},
|
|
5779
|
+
}, Vu = (e, t) => {
|
|
5767
5780
|
localStorage.setItem(`FILTER_ORDER_${e}`, JSON.stringify(t));
|
|
5768
|
-
},
|
|
5781
|
+
}, Yu = (e) => {
|
|
5769
5782
|
try {
|
|
5770
5783
|
return JSON.parse(localStorage.getItem(`FILTER_ORDER_${e}`) || "[]");
|
|
5771
5784
|
} catch {
|
|
5772
5785
|
return [];
|
|
5773
5786
|
}
|
|
5774
|
-
},
|
|
5787
|
+
}, Hu = ({
|
|
5775
5788
|
onClick: e,
|
|
5776
5789
|
size: t = "xs",
|
|
5777
5790
|
variant: n = "solid",
|
|
@@ -5787,7 +5800,7 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5787
5800
|
textColor: p = "white",
|
|
5788
5801
|
borderColor: g
|
|
5789
5802
|
}) => /* @__PURE__ */ l.jsx(
|
|
5790
|
-
|
|
5803
|
+
Te,
|
|
5791
5804
|
{
|
|
5792
5805
|
onClick: e,
|
|
5793
5806
|
size: t,
|
|
@@ -5806,8 +5819,8 @@ const Vl = b(Oe.Root), Yl = b(Oe.Label), Hl = b(Oe.HelperText), Bl = b(Oe.ErrorT
|
|
|
5806
5819
|
s
|
|
5807
5820
|
] })
|
|
5808
5821
|
}
|
|
5809
|
-
),
|
|
5810
|
-
function
|
|
5822
|
+
), Ic = b(K.Root), $c = b(K.Backdrop), Ac = b(K.Positioner), kc = b(K.Content), zc = b(K.Header), Lc = b(K.Body), Nc = b(K.Footer), Pc = b(K.Title), Fc = b(K.CloseTrigger);
|
|
5823
|
+
function Bu({
|
|
5811
5824
|
open: e,
|
|
5812
5825
|
onClose: t,
|
|
5813
5826
|
onConfirm: n,
|
|
@@ -5819,25 +5832,25 @@ function Uu({
|
|
|
5819
5832
|
isLoading: c = !1,
|
|
5820
5833
|
confirmButtonColorScheme: u = "#4169e1"
|
|
5821
5834
|
}) {
|
|
5822
|
-
return /* @__PURE__ */ l.jsx(
|
|
5823
|
-
/* @__PURE__ */ l.jsx(
|
|
5824
|
-
/* @__PURE__ */ l.jsx(
|
|
5825
|
-
/* @__PURE__ */ l.jsx(
|
|
5826
|
-
/* @__PURE__ */ l.jsx(
|
|
5827
|
-
/* @__PURE__ */ l.jsx(
|
|
5828
|
-
/* @__PURE__ */ l.jsx(
|
|
5835
|
+
return /* @__PURE__ */ l.jsx(Ic, { open: e, placement: "center", onOpenChange: (h) => !h.open && t(), children: /* @__PURE__ */ l.jsxs(Ge, { children: [
|
|
5836
|
+
/* @__PURE__ */ l.jsx($c, {}),
|
|
5837
|
+
/* @__PURE__ */ l.jsx(Ac, { children: /* @__PURE__ */ l.jsxs(kc, { maxW: "480px", children: [
|
|
5838
|
+
/* @__PURE__ */ l.jsx(zc, { borderBottom: "1px solid", borderColor: "gray.200", children: /* @__PURE__ */ l.jsx(Pc, { children: r }) }),
|
|
5839
|
+
/* @__PURE__ */ l.jsx(Lc, { p: 6, children: /* @__PURE__ */ l.jsxs(Yt, { gap: 4, align: "center", textAlign: "center", children: [
|
|
5840
|
+
/* @__PURE__ */ l.jsx(ue, { color: "orange.500", children: i ?? /* @__PURE__ */ l.jsx(xo, { size: 40 }) }),
|
|
5841
|
+
/* @__PURE__ */ l.jsx(X, { fontSize: "sm", color: "gray.600", children: o })
|
|
5829
5842
|
] }) }),
|
|
5830
5843
|
/* @__PURE__ */ l.jsxs(
|
|
5831
|
-
|
|
5844
|
+
Nc,
|
|
5832
5845
|
{
|
|
5833
5846
|
justifyContent: "flex-end",
|
|
5834
5847
|
gap: 2,
|
|
5835
5848
|
borderTop: "1px solid",
|
|
5836
5849
|
borderColor: "gray.200",
|
|
5837
5850
|
children: [
|
|
5838
|
-
/* @__PURE__ */ l.jsx(
|
|
5851
|
+
/* @__PURE__ */ l.jsx(Te, { variant: "outline", size: "sm", onClick: t, children: a }),
|
|
5839
5852
|
/* @__PURE__ */ l.jsx(
|
|
5840
|
-
|
|
5853
|
+
Te,
|
|
5841
5854
|
{
|
|
5842
5855
|
size: "sm",
|
|
5843
5856
|
style: {
|
|
@@ -5851,12 +5864,12 @@ function Uu({
|
|
|
5851
5864
|
]
|
|
5852
5865
|
}
|
|
5853
5866
|
),
|
|
5854
|
-
/* @__PURE__ */ l.jsx(
|
|
5867
|
+
/* @__PURE__ */ l.jsx(Fc, { asChild: !0, children: /* @__PURE__ */ l.jsx(wt, { size: "sm" }) })
|
|
5855
5868
|
] }) })
|
|
5856
5869
|
] }) });
|
|
5857
5870
|
}
|
|
5858
|
-
const
|
|
5859
|
-
function
|
|
5871
|
+
const Wc = b(K.Root), Vc = b(K.Backdrop), Yc = b(K.Positioner), Hc = b(K.Content), Bc = b(K.Header), Uc = b(K.Body), Gc = b(K.Footer), qc = b(K.Title), Xc = b(K.CloseTrigger);
|
|
5872
|
+
function Uu({
|
|
5860
5873
|
open: e,
|
|
5861
5874
|
onClose: t,
|
|
5862
5875
|
onConfirm: n,
|
|
@@ -5868,7 +5881,7 @@ function Gu({
|
|
|
5868
5881
|
}) {
|
|
5869
5882
|
const [c, u] = H(""), h = c === s;
|
|
5870
5883
|
return /* @__PURE__ */ l.jsx(
|
|
5871
|
-
|
|
5884
|
+
Wc,
|
|
5872
5885
|
{
|
|
5873
5886
|
open: e,
|
|
5874
5887
|
placement: "center",
|
|
@@ -5876,31 +5889,31 @@ function Gu({
|
|
|
5876
5889
|
!d.open && t(), u("");
|
|
5877
5890
|
},
|
|
5878
5891
|
children: /* @__PURE__ */ l.jsxs(Ge, { children: [
|
|
5879
|
-
/* @__PURE__ */ l.jsx(
|
|
5880
|
-
/* @__PURE__ */ l.jsx(
|
|
5881
|
-
/* @__PURE__ */ l.jsx(
|
|
5892
|
+
/* @__PURE__ */ l.jsx(Vc, {}),
|
|
5893
|
+
/* @__PURE__ */ l.jsx(Yc, { children: /* @__PURE__ */ l.jsxs(Hc, { maxW: "550px", children: [
|
|
5894
|
+
/* @__PURE__ */ l.jsx(Bc, { borderBottom: "1px solid", borderColor: "#d3d3d3", children: /* @__PURE__ */ l.jsx(qc, { color: "red.600", children: r }) }),
|
|
5882
5895
|
/* @__PURE__ */ l.jsx(
|
|
5883
|
-
|
|
5896
|
+
Uc,
|
|
5884
5897
|
{
|
|
5885
5898
|
p: 2,
|
|
5886
5899
|
style: {
|
|
5887
5900
|
padding: "16px"
|
|
5888
5901
|
},
|
|
5889
5902
|
children: /* @__PURE__ */ l.jsxs(Yt, { gap: 4, borderRadius: "md", p: 4, bg: "white", children: [
|
|
5890
|
-
/* @__PURE__ */ l.jsx(
|
|
5891
|
-
/* @__PURE__ */ l.jsx(
|
|
5892
|
-
/* @__PURE__ */ l.jsxs(
|
|
5893
|
-
/* @__PURE__ */ l.jsx(
|
|
5894
|
-
/* @__PURE__ */ l.jsxs(
|
|
5903
|
+
/* @__PURE__ */ l.jsx(ue, { border: "1px solid", borderColor: "red.200", bg: "red.50", borderRadius: "md", p: 4, children: /* @__PURE__ */ l.jsxs(Yt, { direction: "row", gap: 3, align: "flex-start", children: [
|
|
5904
|
+
/* @__PURE__ */ l.jsx(ue, { color: "red.600", mt: "2px", children: /* @__PURE__ */ l.jsx(xo, { size: 20 }) }),
|
|
5905
|
+
/* @__PURE__ */ l.jsxs(ue, { children: [
|
|
5906
|
+
/* @__PURE__ */ l.jsx(X, { fontWeight: "semibold", color: "red.700", children: "Are you sure?" }),
|
|
5907
|
+
/* @__PURE__ */ l.jsxs(X, { fontSize: "sm", color: "red.600", children: [
|
|
5895
5908
|
"All the data of ",
|
|
5896
5909
|
/* @__PURE__ */ l.jsx("b", { children: o }),
|
|
5897
5910
|
" will permanently be deleted."
|
|
5898
5911
|
] })
|
|
5899
5912
|
] })
|
|
5900
5913
|
] }) }),
|
|
5901
|
-
/* @__PURE__ */ l.jsx(
|
|
5902
|
-
/* @__PURE__ */ l.jsxs(
|
|
5903
|
-
/* @__PURE__ */ l.jsxs(
|
|
5914
|
+
/* @__PURE__ */ l.jsx(X, { fontSize: "sm", color: "gray.600", children: "You can’t undo this action afterwards." }),
|
|
5915
|
+
/* @__PURE__ */ l.jsxs(ue, { children: [
|
|
5916
|
+
/* @__PURE__ */ l.jsxs(X, { fontSize: "sm", mb: 2, children: [
|
|
5904
5917
|
"Type ",
|
|
5905
5918
|
/* @__PURE__ */ l.jsx("b", { children: s }),
|
|
5906
5919
|
" to continue"
|
|
@@ -5919,7 +5932,7 @@ function Gu({
|
|
|
5919
5932
|
}
|
|
5920
5933
|
),
|
|
5921
5934
|
/* @__PURE__ */ l.jsxs(
|
|
5922
|
-
|
|
5935
|
+
Gc,
|
|
5923
5936
|
{
|
|
5924
5937
|
justifyContent: "flex-end",
|
|
5925
5938
|
gap: 2,
|
|
@@ -5927,7 +5940,7 @@ function Gu({
|
|
|
5927
5940
|
borderColor: "#d3d3d3",
|
|
5928
5941
|
children: [
|
|
5929
5942
|
/* @__PURE__ */ l.jsx(
|
|
5930
|
-
|
|
5943
|
+
Te,
|
|
5931
5944
|
{
|
|
5932
5945
|
variant: "outline",
|
|
5933
5946
|
size: "sm",
|
|
@@ -5938,7 +5951,7 @@ function Gu({
|
|
|
5938
5951
|
}
|
|
5939
5952
|
),
|
|
5940
5953
|
/* @__PURE__ */ l.jsx(
|
|
5941
|
-
|
|
5954
|
+
Te,
|
|
5942
5955
|
{
|
|
5943
5956
|
size: "sm",
|
|
5944
5957
|
disabled: !h,
|
|
@@ -5953,20 +5966,20 @@ function Gu({
|
|
|
5953
5966
|
]
|
|
5954
5967
|
}
|
|
5955
5968
|
),
|
|
5956
|
-
/* @__PURE__ */ l.jsx(
|
|
5969
|
+
/* @__PURE__ */ l.jsx(Xc, { asChild: !0, children: /* @__PURE__ */ l.jsx(wt, { size: "sm" }) })
|
|
5957
5970
|
] }) })
|
|
5958
5971
|
] })
|
|
5959
5972
|
}
|
|
5960
5973
|
);
|
|
5961
5974
|
}
|
|
5962
|
-
const
|
|
5963
|
-
function
|
|
5975
|
+
const Kc = ({ children: e }) => /* @__PURE__ */ l.jsx(l.Fragment, { children: e }), Jc = ({ children: e }) => /* @__PURE__ */ l.jsx(l.Fragment, { children: e }), Gu = Te, Zc = b(K.Root), Qc = b(K.Backdrop), eu = b(K.Positioner), tu = b(K.Content), nu = b(K.Header), ru = b(K.Body), ou = b(K.Footer), su = b(K.Title), iu = b(K.CloseTrigger);
|
|
5976
|
+
function au(e) {
|
|
5964
5977
|
let t = null, n = null;
|
|
5965
5978
|
return oe.Children.forEach(e, (r) => {
|
|
5966
|
-
oe.isValidElement(r) && (r.type ===
|
|
5979
|
+
oe.isValidElement(r) && (r.type === Kc && (t = r.props.children), r.type === Jc && (n = r.props.children));
|
|
5967
5980
|
}), { body: t, actions: n };
|
|
5968
5981
|
}
|
|
5969
|
-
const
|
|
5982
|
+
const qu = ({
|
|
5970
5983
|
open: e,
|
|
5971
5984
|
onClose: t,
|
|
5972
5985
|
title: n,
|
|
@@ -5976,17 +5989,17 @@ const Xu = ({
|
|
|
5976
5989
|
refetch: a,
|
|
5977
5990
|
loading: i = !1
|
|
5978
5991
|
}) => {
|
|
5979
|
-
const { body: c, actions: u } =
|
|
5992
|
+
const { body: c, actions: u } = au(r);
|
|
5980
5993
|
return /* @__PURE__ */ l.jsx(
|
|
5981
|
-
|
|
5994
|
+
Zc,
|
|
5982
5995
|
{
|
|
5983
5996
|
open: e,
|
|
5984
5997
|
onOpenChange: (h) => !h.open && t(),
|
|
5985
5998
|
placement: s ?? "center",
|
|
5986
5999
|
children: /* @__PURE__ */ l.jsxs(Ge, { children: [
|
|
5987
|
-
/* @__PURE__ */ l.jsx(
|
|
5988
|
-
/* @__PURE__ */ l.jsx(
|
|
5989
|
-
|
|
6000
|
+
/* @__PURE__ */ l.jsx(Qc, { bg: "blackAlpha.400" }),
|
|
6001
|
+
/* @__PURE__ */ l.jsx(eu, { children: /* @__PURE__ */ l.jsxs(
|
|
6002
|
+
tu,
|
|
5990
6003
|
{
|
|
5991
6004
|
w: o ?? "560px",
|
|
5992
6005
|
maxW: o ?? "560px",
|
|
@@ -5995,7 +6008,7 @@ const Xu = ({
|
|
|
5995
6008
|
boxShadow: "lg",
|
|
5996
6009
|
children: [
|
|
5997
6010
|
/* @__PURE__ */ l.jsx(
|
|
5998
|
-
|
|
6011
|
+
nu,
|
|
5999
6012
|
{
|
|
6000
6013
|
px: "20px",
|
|
6001
6014
|
py: "16px",
|
|
@@ -6003,15 +6016,15 @@ const Xu = ({
|
|
|
6003
6016
|
borderBottom: "1px solid",
|
|
6004
6017
|
borderColor: "gray.200",
|
|
6005
6018
|
children: /* @__PURE__ */ l.jsxs(ln, { align: "center", justify: "space-between", children: [
|
|
6006
|
-
/* @__PURE__ */ l.jsx(
|
|
6007
|
-
/* @__PURE__ */ l.jsx(
|
|
6008
|
-
a && /* @__PURE__ */ l.jsx(
|
|
6019
|
+
/* @__PURE__ */ l.jsx(su, { fontSize: "16px", fontWeight: "600", children: n }),
|
|
6020
|
+
/* @__PURE__ */ l.jsx(iu, { asChild: !0, children: /* @__PURE__ */ l.jsx(wt, { size: "sm" }) }),
|
|
6021
|
+
a && /* @__PURE__ */ l.jsx(mu, { label: "Refresh", refetch: a, isLoading: i })
|
|
6009
6022
|
] })
|
|
6010
6023
|
}
|
|
6011
6024
|
),
|
|
6012
|
-
c && /* @__PURE__ */ l.jsx(
|
|
6025
|
+
c && /* @__PURE__ */ l.jsx(ru, { px: "20px", py: "16px", bg: "#F8FAFC", type: "submit", children: /* @__PURE__ */ l.jsx(ln, { direction: "column", gap: "16px", children: c }) }),
|
|
6013
6026
|
u && /* @__PURE__ */ l.jsx(
|
|
6014
|
-
|
|
6027
|
+
ou,
|
|
6015
6028
|
{
|
|
6016
6029
|
px: "20px",
|
|
6017
6030
|
py: "16px",
|
|
@@ -6027,7 +6040,7 @@ const Xu = ({
|
|
|
6027
6040
|
] })
|
|
6028
6041
|
}
|
|
6029
6042
|
);
|
|
6030
|
-
},
|
|
6043
|
+
}, lu = b(Me.Root), cu = b(Me.Label), uu = b(Me.HelperText), du = b(Me.ErrorText), hu = b(Jt.Input), fu = b(Jt.Control), gu = b(Jt.HiddenInput), pu = b(Jt.Root), Xu = ({
|
|
6031
6044
|
value: e,
|
|
6032
6045
|
onChange: t,
|
|
6033
6046
|
length: n = 4,
|
|
@@ -6040,29 +6053,29 @@ const Xu = ({
|
|
|
6040
6053
|
visible: u = !0
|
|
6041
6054
|
}) => {
|
|
6042
6055
|
const h = Array.from({ length: n }).map((d, p) => e?.[p] ?? "");
|
|
6043
|
-
return /* @__PURE__ */ l.jsxs(
|
|
6044
|
-
u && s && /* @__PURE__ */ l.jsxs(
|
|
6056
|
+
return /* @__PURE__ */ l.jsxs(lu, { children: [
|
|
6057
|
+
u && s && /* @__PURE__ */ l.jsxs(cu, { children: [
|
|
6045
6058
|
s,
|
|
6046
6059
|
c && " *"
|
|
6047
6060
|
] }),
|
|
6048
6061
|
/* @__PURE__ */ l.jsxs(
|
|
6049
|
-
|
|
6062
|
+
pu,
|
|
6050
6063
|
{
|
|
6051
6064
|
value: h,
|
|
6052
6065
|
onValueChange: (d) => t?.(d.value.join("")),
|
|
6053
6066
|
disabled: o,
|
|
6054
6067
|
size: r,
|
|
6055
6068
|
children: [
|
|
6056
|
-
/* @__PURE__ */ l.jsx(
|
|
6057
|
-
/* @__PURE__ */ l.jsx(
|
|
6069
|
+
/* @__PURE__ */ l.jsx(gu, {}),
|
|
6070
|
+
/* @__PURE__ */ l.jsx(fu, { children: /* @__PURE__ */ l.jsx(fe, { children: Array.from({ length: n }).map((d, p) => /* @__PURE__ */ l.jsx(hu, { index: p }, p)) }) })
|
|
6058
6071
|
]
|
|
6059
6072
|
}
|
|
6060
6073
|
),
|
|
6061
|
-
i && /* @__PURE__ */ l.jsx(
|
|
6062
|
-
a && !i && /* @__PURE__ */ l.jsx(
|
|
6074
|
+
i && /* @__PURE__ */ l.jsx(du, { fontSize: "xs", children: i }),
|
|
6075
|
+
a && !i && /* @__PURE__ */ l.jsx(uu, { fontSize: "xs", children: a })
|
|
6063
6076
|
] });
|
|
6064
6077
|
};
|
|
6065
|
-
function
|
|
6078
|
+
function mu({
|
|
6066
6079
|
refetch: e,
|
|
6067
6080
|
isLoading: t = !1,
|
|
6068
6081
|
label: n = "Refresh"
|
|
@@ -6096,61 +6109,61 @@ function vu({
|
|
|
6096
6109
|
}
|
|
6097
6110
|
);
|
|
6098
6111
|
}
|
|
6099
|
-
var Lt = { exports: {} },
|
|
6100
|
-
function
|
|
6112
|
+
var Lt = { exports: {} }, vu = Lt.exports, Mr;
|
|
6113
|
+
function xu() {
|
|
6101
6114
|
return Mr || (Mr = 1, (function(e, t) {
|
|
6102
6115
|
(function(n, r) {
|
|
6103
6116
|
e.exports = r();
|
|
6104
|
-
})(
|
|
6105
|
-
var n = 1e3, r = 6e4, o = 36e5, s = "millisecond", a = "second", i = "minute", c = "hour", u = "day", h = "week", d = "month", p = "quarter", g = "year", f = "date", m = "Invalid Date", x = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,
|
|
6106
|
-
var y = ["th", "st", "nd", "rd"], w =
|
|
6107
|
-
return "[" +
|
|
6108
|
-
} },
|
|
6109
|
-
var C = String(
|
|
6110
|
-
return !C || C.length >= y ?
|
|
6111
|
-
},
|
|
6112
|
-
var y = -
|
|
6113
|
-
return (y <= 0 ? "+" : "-") +
|
|
6114
|
-
}, m: function
|
|
6115
|
-
if (y.date() < w.date()) return -
|
|
6117
|
+
})(vu, (function() {
|
|
6118
|
+
var n = 1e3, r = 6e4, o = 36e5, s = "millisecond", a = "second", i = "minute", c = "hour", u = "day", h = "week", d = "month", p = "quarter", g = "year", f = "date", m = "Invalid Date", x = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, D = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, E = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(R) {
|
|
6119
|
+
var y = ["th", "st", "nd", "rd"], w = R % 100;
|
|
6120
|
+
return "[" + R + (y[(w - 20) % 10] || y[w] || y[0]) + "]";
|
|
6121
|
+
} }, j = function(R, y, w) {
|
|
6122
|
+
var C = String(R);
|
|
6123
|
+
return !C || C.length >= y ? R : "" + Array(y + 1 - C.length).join(w) + R;
|
|
6124
|
+
}, _ = { s: j, z: function(R) {
|
|
6125
|
+
var y = -R.utcOffset(), w = Math.abs(y), C = Math.floor(w / 60), S = w % 60;
|
|
6126
|
+
return (y <= 0 ? "+" : "-") + j(C, 2, "0") + ":" + j(S, 2, "0");
|
|
6127
|
+
}, m: function R(y, w) {
|
|
6128
|
+
if (y.date() < w.date()) return -R(w, y);
|
|
6116
6129
|
var C = 12 * (w.year() - y.year()) + (w.month() - y.month()), S = y.clone().add(C, d), M = w - S < 0, z = y.clone().add(C + (M ? -1 : 1), d);
|
|
6117
6130
|
return +(-(C + (w - S) / (M ? S - z : z - S)) || 0);
|
|
6118
|
-
}, a: function(
|
|
6119
|
-
return
|
|
6120
|
-
}, p: function(
|
|
6121
|
-
return { M: d, y: g, w: h, d: u, D: f, h: c, m: i, s: a, ms: s, Q: p }[
|
|
6122
|
-
}, u: function(
|
|
6123
|
-
return
|
|
6124
|
-
} }, I = "en",
|
|
6125
|
-
|
|
6126
|
-
var k = "$isDayjsObject", $ = function(
|
|
6127
|
-
return
|
|
6128
|
-
}, W = function
|
|
6131
|
+
}, a: function(R) {
|
|
6132
|
+
return R < 0 ? Math.ceil(R) || 0 : Math.floor(R);
|
|
6133
|
+
}, p: function(R) {
|
|
6134
|
+
return { M: d, y: g, w: h, d: u, D: f, h: c, m: i, s: a, ms: s, Q: p }[R] || String(R || "").toLowerCase().replace(/s$/, "");
|
|
6135
|
+
}, u: function(R) {
|
|
6136
|
+
return R === void 0;
|
|
6137
|
+
} }, I = "en", T = {};
|
|
6138
|
+
T[I] = E;
|
|
6139
|
+
var k = "$isDayjsObject", $ = function(R) {
|
|
6140
|
+
return R instanceof Z || !(!R || !R[k]);
|
|
6141
|
+
}, W = function R(y, w, C) {
|
|
6129
6142
|
var S;
|
|
6130
6143
|
if (!y) return I;
|
|
6131
6144
|
if (typeof y == "string") {
|
|
6132
6145
|
var M = y.toLowerCase();
|
|
6133
|
-
|
|
6146
|
+
T[M] && (S = M), w && (T[M] = w, S = M);
|
|
6134
6147
|
var z = y.split("-");
|
|
6135
|
-
if (!S && z.length > 1) return
|
|
6148
|
+
if (!S && z.length > 1) return R(z[0]);
|
|
6136
6149
|
} else {
|
|
6137
6150
|
var v = y.name;
|
|
6138
|
-
|
|
6151
|
+
T[v] = y, S = v;
|
|
6139
6152
|
}
|
|
6140
6153
|
return !C && S && (I = S), S || !C && I;
|
|
6141
|
-
}, P = function(
|
|
6142
|
-
if ($(
|
|
6154
|
+
}, P = function(R, y) {
|
|
6155
|
+
if ($(R)) return R.clone();
|
|
6143
6156
|
var w = typeof y == "object" ? y : {};
|
|
6144
|
-
return w.date =
|
|
6145
|
-
}, A =
|
|
6146
|
-
A.l = W, A.i = $, A.w = function(
|
|
6147
|
-
return P(
|
|
6157
|
+
return w.date = R, w.args = arguments, new Z(w);
|
|
6158
|
+
}, A = _;
|
|
6159
|
+
A.l = W, A.i = $, A.w = function(R, y) {
|
|
6160
|
+
return P(R, { locale: y.$L, utc: y.$u, x: y.$x, $offset: y.$offset });
|
|
6148
6161
|
};
|
|
6149
6162
|
var Z = (function() {
|
|
6150
|
-
function
|
|
6163
|
+
function R(w) {
|
|
6151
6164
|
this.$L = W(w.locale, null, !0), this.parse(w), this.$x = this.$x || w.x || {}, this[k] = !0;
|
|
6152
6165
|
}
|
|
6153
|
-
var y =
|
|
6166
|
+
var y = R.prototype;
|
|
6154
6167
|
return y.parse = function(w) {
|
|
6155
6168
|
this.$d = (function(C) {
|
|
6156
6169
|
var S = C.date, M = C.utc;
|
|
@@ -6192,7 +6205,7 @@ function bu() {
|
|
|
6192
6205
|
return M ? pe : pe.endOf(u);
|
|
6193
6206
|
}, O = function(re, F) {
|
|
6194
6207
|
return A.w(S.toDate()[re].apply(S.toDate("s"), (M ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(F)), S);
|
|
6195
|
-
}, L = this.$W, N = this.$M,
|
|
6208
|
+
}, L = this.$W, N = this.$M, J = this.$D, q = "set" + (this.$u ? "UTC" : "");
|
|
6196
6209
|
switch (z) {
|
|
6197
6210
|
case g:
|
|
6198
6211
|
return M ? v(1, 0) : v(31, 11);
|
|
@@ -6200,7 +6213,7 @@ function bu() {
|
|
|
6200
6213
|
return M ? v(1, N) : v(0, N + 1);
|
|
6201
6214
|
case h:
|
|
6202
6215
|
var Y = this.$locale().weekStart || 0, ne = (L < Y ? L + 7 : L) - Y;
|
|
6203
|
-
return v(M ?
|
|
6216
|
+
return v(M ? J - ne : J + (6 - ne), N);
|
|
6204
6217
|
case u:
|
|
6205
6218
|
case f:
|
|
6206
6219
|
return O(q + "Hours", 0);
|
|
@@ -6230,8 +6243,8 @@ function bu() {
|
|
|
6230
6243
|
var S, M = this;
|
|
6231
6244
|
w = Number(w);
|
|
6232
6245
|
var z = A.p(C), v = function(N) {
|
|
6233
|
-
var
|
|
6234
|
-
return A.w(
|
|
6246
|
+
var J = P(M);
|
|
6247
|
+
return A.w(J.date(J.date() + Math.round(N * w)), M);
|
|
6235
6248
|
};
|
|
6236
6249
|
if (z === d) return this.set(d, this.$M + w);
|
|
6237
6250
|
if (z === g) return this.set(g, this.$y + w);
|
|
@@ -6244,17 +6257,17 @@ function bu() {
|
|
|
6244
6257
|
}, y.format = function(w) {
|
|
6245
6258
|
var C = this, S = this.$locale();
|
|
6246
6259
|
if (!this.isValid()) return S.invalidDate || m;
|
|
6247
|
-
var M = w || "YYYY-MM-DDTHH:mm:ssZ", z = A.z(this), v = this.$H, O = this.$m, L = this.$M, N = S.weekdays,
|
|
6248
|
-
return F && (F[pe] || F(C, M)) ||
|
|
6260
|
+
var M = w || "YYYY-MM-DDTHH:mm:ssZ", z = A.z(this), v = this.$H, O = this.$m, L = this.$M, N = S.weekdays, J = S.months, q = S.meridiem, Y = function(F, pe, de, De) {
|
|
6261
|
+
return F && (F[pe] || F(C, M)) || de[pe].slice(0, De);
|
|
6249
6262
|
}, ne = function(F) {
|
|
6250
6263
|
return A.s(v % 12 || 12, F, "0");
|
|
6251
|
-
}, re = q || function(F, pe,
|
|
6252
|
-
var
|
|
6253
|
-
return
|
|
6264
|
+
}, re = q || function(F, pe, de) {
|
|
6265
|
+
var De = F < 12 ? "AM" : "PM";
|
|
6266
|
+
return de ? De.toLowerCase() : De;
|
|
6254
6267
|
};
|
|
6255
|
-
return M.replace(
|
|
6256
|
-
return pe || (function(
|
|
6257
|
-
switch (
|
|
6268
|
+
return M.replace(D, (function(F, pe) {
|
|
6269
|
+
return pe || (function(de) {
|
|
6270
|
+
switch (de) {
|
|
6258
6271
|
case "YY":
|
|
6259
6272
|
return String(C.$y).slice(-2);
|
|
6260
6273
|
case "YYYY":
|
|
@@ -6264,9 +6277,9 @@ function bu() {
|
|
|
6264
6277
|
case "MM":
|
|
6265
6278
|
return A.s(L + 1, 2, "0");
|
|
6266
6279
|
case "MMM":
|
|
6267
|
-
return Y(S.monthsShort, L,
|
|
6280
|
+
return Y(S.monthsShort, L, J, 3);
|
|
6268
6281
|
case "MMMM":
|
|
6269
|
-
return Y(
|
|
6282
|
+
return Y(J, L);
|
|
6270
6283
|
case "D":
|
|
6271
6284
|
return C.$D;
|
|
6272
6285
|
case "DD":
|
|
@@ -6310,18 +6323,18 @@ function bu() {
|
|
|
6310
6323
|
}, y.utcOffset = function() {
|
|
6311
6324
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
6312
6325
|
}, y.diff = function(w, C, S) {
|
|
6313
|
-
var M, z = this, v = A.p(C), O = P(w), L = (O.utcOffset() - this.utcOffset()) * r, N = this - O,
|
|
6326
|
+
var M, z = this, v = A.p(C), O = P(w), L = (O.utcOffset() - this.utcOffset()) * r, N = this - O, J = function() {
|
|
6314
6327
|
return A.m(z, O);
|
|
6315
6328
|
};
|
|
6316
6329
|
switch (v) {
|
|
6317
6330
|
case g:
|
|
6318
|
-
M =
|
|
6331
|
+
M = J() / 12;
|
|
6319
6332
|
break;
|
|
6320
6333
|
case d:
|
|
6321
|
-
M =
|
|
6334
|
+
M = J();
|
|
6322
6335
|
break;
|
|
6323
6336
|
case p:
|
|
6324
|
-
M =
|
|
6337
|
+
M = J() / 3;
|
|
6325
6338
|
break;
|
|
6326
6339
|
case h:
|
|
6327
6340
|
M = (N - L) / 6048e5;
|
|
@@ -6345,7 +6358,7 @@ function bu() {
|
|
|
6345
6358
|
}, y.daysInMonth = function() {
|
|
6346
6359
|
return this.endOf(d).$D;
|
|
6347
6360
|
}, y.$locale = function() {
|
|
6348
|
-
return
|
|
6361
|
+
return T[this.$L];
|
|
6349
6362
|
}, y.locale = function(w, C) {
|
|
6350
6363
|
if (!w) return this.$L;
|
|
6351
6364
|
var S = this.clone(), M = W(w, C, !0);
|
|
@@ -6360,28 +6373,28 @@ function bu() {
|
|
|
6360
6373
|
return this.$d.toISOString();
|
|
6361
6374
|
}, y.toString = function() {
|
|
6362
6375
|
return this.$d.toUTCString();
|
|
6363
|
-
},
|
|
6376
|
+
}, R;
|
|
6364
6377
|
})(), te = Z.prototype;
|
|
6365
|
-
return P.prototype = te, [["$ms", s], ["$s", a], ["$m", i], ["$H", c], ["$W", u], ["$M", d], ["$y", g], ["$D", f]].forEach((function(
|
|
6366
|
-
te[
|
|
6367
|
-
return this.$g(y,
|
|
6378
|
+
return P.prototype = te, [["$ms", s], ["$s", a], ["$m", i], ["$H", c], ["$W", u], ["$M", d], ["$y", g], ["$D", f]].forEach((function(R) {
|
|
6379
|
+
te[R[1]] = function(y) {
|
|
6380
|
+
return this.$g(y, R[0], R[1]);
|
|
6368
6381
|
};
|
|
6369
|
-
})), P.extend = function(
|
|
6370
|
-
return
|
|
6371
|
-
}, P.locale = W, P.isDayjs = $, P.unix = function(
|
|
6372
|
-
return P(1e3 *
|
|
6373
|
-
}, P.en =
|
|
6382
|
+
})), P.extend = function(R, y) {
|
|
6383
|
+
return R.$i || (R(y, Z, P), R.$i = !0), P;
|
|
6384
|
+
}, P.locale = W, P.isDayjs = $, P.unix = function(R) {
|
|
6385
|
+
return P(1e3 * R);
|
|
6386
|
+
}, P.en = T[I], P.Ls = T, P.p = {}, P;
|
|
6374
6387
|
}));
|
|
6375
6388
|
})(Lt)), Lt.exports;
|
|
6376
6389
|
}
|
|
6377
|
-
var
|
|
6378
|
-
const rn = /* @__PURE__ */ Zt(
|
|
6379
|
-
var Nt = { exports: {} },
|
|
6380
|
-
function
|
|
6390
|
+
var bu = xu();
|
|
6391
|
+
const rn = /* @__PURE__ */ Zt(bu);
|
|
6392
|
+
var Nt = { exports: {} }, yu = Nt.exports, Or;
|
|
6393
|
+
function wu() {
|
|
6381
6394
|
return Or || (Or = 1, (function(e, t) {
|
|
6382
6395
|
(function(n, r) {
|
|
6383
6396
|
e.exports = r();
|
|
6384
|
-
})(
|
|
6397
|
+
})(yu, (function() {
|
|
6385
6398
|
return function(n, r, o) {
|
|
6386
6399
|
n = n || {};
|
|
6387
6400
|
var s = r.prototype, a = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
|
|
@@ -6389,19 +6402,19 @@ function Su() {
|
|
|
6389
6402
|
return s.fromToBase(u, h, d, p);
|
|
6390
6403
|
}
|
|
6391
6404
|
o.en.relativeTime = a, s.fromToBase = function(u, h, d, p, g) {
|
|
6392
|
-
for (var f, m, x,
|
|
6393
|
-
var I =
|
|
6405
|
+
for (var f, m, x, D = d.$locale().relativeTime || a, E = n.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], j = E.length, _ = 0; _ < j; _ += 1) {
|
|
6406
|
+
var I = E[_];
|
|
6394
6407
|
I.d && (f = p ? o(u).diff(d, I.d, !0) : d.diff(u, I.d, !0));
|
|
6395
|
-
var
|
|
6396
|
-
if (x = f > 0,
|
|
6397
|
-
|
|
6398
|
-
var k =
|
|
6399
|
-
g && (
|
|
6408
|
+
var T = (n.rounding || Math.round)(Math.abs(f));
|
|
6409
|
+
if (x = f > 0, T <= I.r || !I.r) {
|
|
6410
|
+
T <= 1 && _ > 0 && (I = E[_ - 1]);
|
|
6411
|
+
var k = D[I.l];
|
|
6412
|
+
g && (T = g("" + T)), m = typeof k == "string" ? k.replace("%d", T) : k(T, h, I.l, x);
|
|
6400
6413
|
break;
|
|
6401
6414
|
}
|
|
6402
6415
|
}
|
|
6403
6416
|
if (h) return m;
|
|
6404
|
-
var $ = x ?
|
|
6417
|
+
var $ = x ? D.future : D.past;
|
|
6405
6418
|
return typeof $ == "function" ? $(m) : $.replace("%s", m);
|
|
6406
6419
|
}, s.to = function(u, h) {
|
|
6407
6420
|
return i(u, h, this, !0);
|
|
@@ -6420,14 +6433,14 @@ function Su() {
|
|
|
6420
6433
|
}));
|
|
6421
6434
|
})(Nt)), Nt.exports;
|
|
6422
6435
|
}
|
|
6423
|
-
var
|
|
6424
|
-
const
|
|
6425
|
-
var Pt = { exports: {} },
|
|
6426
|
-
function
|
|
6436
|
+
var Su = wu();
|
|
6437
|
+
const Cu = /* @__PURE__ */ Zt(Su);
|
|
6438
|
+
var Pt = { exports: {} }, Du = Pt.exports, _r;
|
|
6439
|
+
function ju() {
|
|
6427
6440
|
return _r || (_r = 1, (function(e, t) {
|
|
6428
6441
|
(function(n, r) {
|
|
6429
6442
|
e.exports = r();
|
|
6430
|
-
})(
|
|
6443
|
+
})(Du, (function() {
|
|
6431
6444
|
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
|
|
6432
6445
|
return function(r, o, s) {
|
|
6433
6446
|
var a = o.prototype, i = a.format;
|
|
@@ -6436,8 +6449,8 @@ function Eu() {
|
|
|
6436
6449
|
var u = this.$locale().formats, h = (function(d, p) {
|
|
6437
6450
|
return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(g, f, m) {
|
|
6438
6451
|
var x = m && m.toUpperCase();
|
|
6439
|
-
return f || p[m] || n[m] || p[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(
|
|
6440
|
-
return
|
|
6452
|
+
return f || p[m] || n[m] || p[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(D, E, j) {
|
|
6453
|
+
return E || j.slice(1);
|
|
6441
6454
|
}));
|
|
6442
6455
|
}));
|
|
6443
6456
|
})(c, u === void 0 ? {} : u);
|
|
@@ -6447,14 +6460,14 @@ function Eu() {
|
|
|
6447
6460
|
}));
|
|
6448
6461
|
})(Pt)), Pt.exports;
|
|
6449
6462
|
}
|
|
6450
|
-
var
|
|
6451
|
-
const
|
|
6452
|
-
var Ft = { exports: {} },
|
|
6453
|
-
function
|
|
6463
|
+
var Eu = ju();
|
|
6464
|
+
const Ru = /* @__PURE__ */ Zt(Eu);
|
|
6465
|
+
var Ft = { exports: {} }, Mu = Ft.exports, Tr;
|
|
6466
|
+
function Ou() {
|
|
6454
6467
|
return Tr || (Tr = 1, (function(e, t) {
|
|
6455
6468
|
(function(n, r) {
|
|
6456
6469
|
e.exports = r();
|
|
6457
|
-
})(
|
|
6470
|
+
})(Mu, (function() {
|
|
6458
6471
|
return function(n, r) {
|
|
6459
6472
|
var o = r.prototype, s = o.format;
|
|
6460
6473
|
o.format = function(a) {
|
|
@@ -6499,12 +6512,12 @@ function _u() {
|
|
|
6499
6512
|
}));
|
|
6500
6513
|
})(Ft)), Ft.exports;
|
|
6501
6514
|
}
|
|
6502
|
-
var
|
|
6503
|
-
const
|
|
6504
|
-
rn.extend(
|
|
6505
|
-
rn.extend(
|
|
6506
|
-
rn.extend(
|
|
6507
|
-
const
|
|
6515
|
+
var _u = Ou();
|
|
6516
|
+
const Tu = /* @__PURE__ */ Zt(_u);
|
|
6517
|
+
rn.extend(Cu);
|
|
6518
|
+
rn.extend(Ru);
|
|
6519
|
+
rn.extend(Tu);
|
|
6520
|
+
const Iu = {
|
|
6508
6521
|
date: "DD MMM YYYY",
|
|
6509
6522
|
time: "hh:mm A",
|
|
6510
6523
|
dateTime: "DD MMM YYYY, hh:mm A",
|
|
@@ -6520,9 +6533,9 @@ function Ir({
|
|
|
6520
6533
|
}) {
|
|
6521
6534
|
if (!e) return r;
|
|
6522
6535
|
const o = rn(e);
|
|
6523
|
-
return o.isValid() ? t === "relative" ? o.fromNow() : o.format(n ??
|
|
6536
|
+
return o.isValid() ? t === "relative" ? o.fromNow() : o.format(n ?? Iu[t]) : r;
|
|
6524
6537
|
}
|
|
6525
|
-
function
|
|
6538
|
+
function Ku({
|
|
6526
6539
|
value: e,
|
|
6527
6540
|
dateVariant: t = "date",
|
|
6528
6541
|
timeVariant: n = "time",
|
|
@@ -6538,19 +6551,19 @@ function Ju({
|
|
|
6538
6551
|
showTime: p = !0
|
|
6539
6552
|
}) {
|
|
6540
6553
|
return /* @__PURE__ */ l.jsxs(Yt, { gap: 0.5, align: s, children: [
|
|
6541
|
-
/* @__PURE__ */ l.jsx(
|
|
6554
|
+
/* @__PURE__ */ l.jsx(X, { fontSize: i, fontWeight: c, color: a, children: Ir({
|
|
6542
6555
|
value: e,
|
|
6543
6556
|
variant: t,
|
|
6544
6557
|
format: r
|
|
6545
6558
|
}) }),
|
|
6546
|
-
p && /* @__PURE__ */ l.jsx(
|
|
6559
|
+
p && /* @__PURE__ */ l.jsx(X, { fontSize: h, fontWeight: d, color: u, children: Ir({
|
|
6547
6560
|
value: e,
|
|
6548
6561
|
variant: n,
|
|
6549
6562
|
format: o
|
|
6550
6563
|
}) })
|
|
6551
6564
|
] });
|
|
6552
6565
|
}
|
|
6553
|
-
class
|
|
6566
|
+
class $u {
|
|
6554
6567
|
state = /* @__PURE__ */ new Map();
|
|
6555
6568
|
listeners = /* @__PURE__ */ new Map();
|
|
6556
6569
|
get(t) {
|
|
@@ -6587,7 +6600,7 @@ class Ar {
|
|
|
6587
6600
|
constructor(t) {
|
|
6588
6601
|
this.api = t;
|
|
6589
6602
|
}
|
|
6590
|
-
store = new
|
|
6603
|
+
store = new $u();
|
|
6591
6604
|
inflight = /* @__PURE__ */ new Map();
|
|
6592
6605
|
getRaw(t) {
|
|
6593
6606
|
return this.store.get(t);
|
|
@@ -6627,19 +6640,19 @@ class Ar {
|
|
|
6627
6640
|
}
|
|
6628
6641
|
const Co = rt(null);
|
|
6629
6642
|
function Do() {
|
|
6630
|
-
const e =
|
|
6643
|
+
const e = Ye(Co);
|
|
6631
6644
|
if (!e)
|
|
6632
6645
|
throw new Error("OptionsProvider is missing. Wrap your app with <OptionsProvider />");
|
|
6633
6646
|
return e;
|
|
6634
6647
|
}
|
|
6635
|
-
function
|
|
6648
|
+
function Ju({
|
|
6636
6649
|
client: { apiUrl: e },
|
|
6637
6650
|
children: t
|
|
6638
6651
|
}) {
|
|
6639
6652
|
const n = G(new Ar(new $r(e)));
|
|
6640
6653
|
return n.current || (n.current = new Ar(new $r(e))), /* @__PURE__ */ l.jsx(Co.Provider, { value: n.current, children: t });
|
|
6641
6654
|
}
|
|
6642
|
-
function
|
|
6655
|
+
function Zu(e) {
|
|
6643
6656
|
const t = Do(), [n, r] = H(t.getRaw(e)?.value);
|
|
6644
6657
|
return V(() => {
|
|
6645
6658
|
let o = !0;
|
|
@@ -6654,7 +6667,7 @@ function Qu(e) {
|
|
|
6654
6667
|
};
|
|
6655
6668
|
}, [e, t]), n;
|
|
6656
6669
|
}
|
|
6657
|
-
function
|
|
6670
|
+
function Qu(e) {
|
|
6658
6671
|
const t = Do(), [n, r] = H({});
|
|
6659
6672
|
return V(() => {
|
|
6660
6673
|
let o = !0;
|
|
@@ -6674,13 +6687,13 @@ function ed(e) {
|
|
|
6674
6687
|
};
|
|
6675
6688
|
}, [e.join("|"), t]), n;
|
|
6676
6689
|
}
|
|
6677
|
-
async function
|
|
6690
|
+
async function ed(e, t) {
|
|
6678
6691
|
return e.getKey(t);
|
|
6679
6692
|
}
|
|
6680
|
-
async function
|
|
6693
|
+
async function td(e, t) {
|
|
6681
6694
|
await e.getMultiKey(t);
|
|
6682
6695
|
}
|
|
6683
|
-
function
|
|
6696
|
+
function nd(e = {}) {
|
|
6684
6697
|
const { initialPage: t = 1, initialLimit: n = 20 } = e, [r, o] = H(t), [s, a] = H(n), i = Q((p) => {
|
|
6685
6698
|
o(Math.max(1, p));
|
|
6686
6699
|
}, []), c = Q((p) => {
|
|
@@ -6702,8 +6715,8 @@ function rd(e = {}) {
|
|
|
6702
6715
|
reset: d
|
|
6703
6716
|
};
|
|
6704
6717
|
}
|
|
6705
|
-
function
|
|
6706
|
-
const { initialValue: t = "", delay: n = 300, len: r = 3 } = e, [o, s] = H(t), i = o.length === 0 || o.length >= r ? o : "", c =
|
|
6718
|
+
function rd(e = {}) {
|
|
6719
|
+
const { initialValue: t = "", delay: n = 300, len: r = 3 } = e, [o, s] = H(t), i = o.length === 0 || o.length >= r ? o : "", c = Au(i, n), u = Q((d) => {
|
|
6707
6720
|
s(d);
|
|
6708
6721
|
}, []), h = Q(() => {
|
|
6709
6722
|
s(t);
|
|
@@ -6716,7 +6729,7 @@ function od(e = {}) {
|
|
|
6716
6729
|
len: r
|
|
6717
6730
|
};
|
|
6718
6731
|
}
|
|
6719
|
-
function
|
|
6732
|
+
function Au(e, t = 300) {
|
|
6720
6733
|
const [n, r] = H(e);
|
|
6721
6734
|
return V(() => {
|
|
6722
6735
|
const o = setTimeout(() => {
|
|
@@ -6727,48 +6740,48 @@ function ku(e, t = 300) {
|
|
|
6727
6740
|
}
|
|
6728
6741
|
export {
|
|
6729
6742
|
et as ACTIONS_COLUMN_ID,
|
|
6730
|
-
|
|
6731
|
-
|
|
6743
|
+
Fu as DataTable,
|
|
6744
|
+
Wu as Filters,
|
|
6732
6745
|
$r as HttpOptionsApi,
|
|
6733
|
-
|
|
6746
|
+
Hu as MDSButton,
|
|
6734
6747
|
xl as MDSCheckbox,
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6748
|
+
Rl as MDSCombobox,
|
|
6749
|
+
Bu as MDSConfirmActionDialog,
|
|
6750
|
+
Uu as MDSConfirmDeleteDialog,
|
|
6751
|
+
Fl as MDSDatePicker,
|
|
6752
|
+
$l as MDSDateRangePicker,
|
|
6753
|
+
Gu as MDSDialogAction,
|
|
6754
|
+
Jc as MDSDialogActions,
|
|
6755
|
+
Kc as MDSDialogBody,
|
|
6756
|
+
qu as MDSDialogWrapper,
|
|
6744
6757
|
Rr as MDSInput,
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6758
|
+
Xu as MDSPinInput,
|
|
6759
|
+
mu as MDSRefreshButton,
|
|
6760
|
+
ic as MDSSelectBox,
|
|
6748
6761
|
Ar as OptionsClientImpl,
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6762
|
+
Ju as OptionsProvider,
|
|
6763
|
+
$u as OptionsStore,
|
|
6764
|
+
mu as RefreshButton,
|
|
6765
|
+
Nu as SERIAL_NUMBER_COLUMN_ID,
|
|
6766
|
+
Ku as StackedDateTime,
|
|
6767
|
+
je as VISIBILITY_COLUMN_ID,
|
|
6768
|
+
lc as addPreset,
|
|
6769
|
+
cc as deletePreset,
|
|
6757
6770
|
Ir as formatDateTime,
|
|
6758
6771
|
Pn as getColumnWidthKey,
|
|
6759
|
-
|
|
6772
|
+
ed as getOption,
|
|
6760
6773
|
Fn as getPresets,
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6774
|
+
Yu as loadOrder,
|
|
6775
|
+
td as prefetchOptions,
|
|
6776
|
+
Vu as saveOrder,
|
|
6764
6777
|
wo as savePresets,
|
|
6765
|
-
|
|
6778
|
+
Pu as setColumnWidth,
|
|
6766
6779
|
Qi as setData,
|
|
6767
6780
|
ea as setTableId,
|
|
6768
6781
|
ge as tableStore,
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6782
|
+
rd as useDebouncedSearch,
|
|
6783
|
+
Zu as useOption,
|
|
6784
|
+
Qu as useOptions,
|
|
6785
|
+
nd as usePagination,
|
|
6773
6786
|
b as withChildren
|
|
6774
6787
|
};
|