@mdspl/mds-shared-ui 1.3.1 → 1.3.3
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 +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +146 -161
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as Wt from "react";
|
|
2
|
-
import oe, { useLayoutEffect as $o, useEffect as
|
|
3
|
-
import { Menu as yt, Checkbox as Re, IconButton as we, Portal as rt, Table as ae, HStack as fe, Box as he, Select as te, Pagination as
|
|
2
|
+
import oe, { useLayoutEffect as $o, useEffect as V, useRef as q, useMemo as U, useCallback as ee, useState as B, createContext as nt, memo as Ar, useReducer as Ao, useContext as He, forwardRef as On, createElement as wn } from "react";
|
|
3
|
+
import { Menu as yt, Checkbox as Re, IconButton as we, Portal as rt, Table as ae, HStack as fe, Box as he, Select as te, Pagination as Vt, createListCollection as kr, Text as Q, ButtonGroup as ko, Skeleton as zo, Spinner as zr, Combobox as Te, useListCollection as Lo, Span as No, Popover as Ae, Group as Lr, Input as Xt, InputAddon as Nr, Grid as Pr, Button as Ie, Field as Me, InputGroup as Po, CloseButton as wt, Slider as St, VStack as gt, Drawer as ke, Tabs as Kt, Dialog as J, Stack as Yt, Flex as ln, PinInput as Jt } from "@chakra-ui/react";
|
|
4
4
|
import { unstable_batchedUpdates as Mt, createPortal as Fo, flushSync as Wo } from "react-dom";
|
|
5
5
|
function Zt(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
8
|
var Ot = { exports: {} }, ht = {};
|
|
9
9
|
var qn;
|
|
10
|
-
function
|
|
10
|
+
function Vo() {
|
|
11
11
|
if (qn) return ht;
|
|
12
12
|
qn = 1;
|
|
13
13
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
@@ -30,7 +30,7 @@ function Yo() {
|
|
|
30
30
|
}
|
|
31
31
|
var ft = {};
|
|
32
32
|
var Xn;
|
|
33
|
-
function
|
|
33
|
+
function Yo() {
|
|
34
34
|
return Xn || (Xn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
35
35
|
function e(v) {
|
|
36
36
|
if (v == null) return null;
|
|
@@ -107,7 +107,7 @@ function Vo() {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
function o() {
|
|
110
|
-
var v =
|
|
110
|
+
var v = Y.A;
|
|
111
111
|
return v === null ? null : v.getOwner();
|
|
112
112
|
}
|
|
113
113
|
function s() {
|
|
@@ -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"), R = /* @__PURE__ */ Symbol.for("react.strict_mode"), E = /* @__PURE__ */ Symbol.for("react.profiler"), j = /* @__PURE__ */ Symbol.for("react.consumer"), T = /* @__PURE__ */ Symbol.for("react.context"), I = /* @__PURE__ */ Symbol.for("react.forward_ref"), _ = /* @__PURE__ */ Symbol.for("react.suspense"), k = /* @__PURE__ */ Symbol.for("react.suspense_list"), $ = /* @__PURE__ */ Symbol.for("react.memo"), F = /* @__PURE__ */ Symbol.for("react.lazy"), P = /* @__PURE__ */ Symbol.for("react.activity"), A = /* @__PURE__ */ Symbol.for("react.client.reference"),
|
|
228
|
+
var g = oe, f = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), x = /* @__PURE__ */ Symbol.for("react.fragment"), R = /* @__PURE__ */ Symbol.for("react.strict_mode"), E = /* @__PURE__ */ Symbol.for("react.profiler"), j = /* @__PURE__ */ Symbol.for("react.consumer"), T = /* @__PURE__ */ Symbol.for("react.context"), I = /* @__PURE__ */ Symbol.for("react.forward_ref"), _ = /* @__PURE__ */ Symbol.for("react.suspense"), k = /* @__PURE__ */ Symbol.for("react.suspense_list"), $ = /* @__PURE__ */ Symbol.for("react.memo"), F = /* @__PURE__ */ Symbol.for("react.lazy"), P = /* @__PURE__ */ Symbol.for("react.activity"), A = /* @__PURE__ */ Symbol.for("react.client.reference"), Y = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, K = Object.prototype.hasOwnProperty, D = Array.isArray, y = console.createTask ? console.createTask : function() {
|
|
229
229
|
return null;
|
|
230
230
|
};
|
|
231
231
|
g = {
|
|
@@ -238,7 +238,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
238
238
|
s
|
|
239
239
|
)(), M = y(r(s)), z = {};
|
|
240
240
|
ft.Fragment = x, ft.jsx = function(v, O, L) {
|
|
241
|
-
var N = 1e4 >
|
|
241
|
+
var N = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
242
242
|
return h(
|
|
243
243
|
v,
|
|
244
244
|
O,
|
|
@@ -248,7 +248,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
N ? y(r(v)) : M
|
|
249
249
|
);
|
|
250
250
|
}, ft.jsxs = function(v, O, L) {
|
|
251
|
-
var N = 1e4 >
|
|
251
|
+
var N = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
252
252
|
return h(
|
|
253
253
|
v,
|
|
254
254
|
O,
|
|
@@ -262,7 +262,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
262
262
|
}
|
|
263
263
|
var Kn;
|
|
264
264
|
function Ho() {
|
|
265
|
-
return Kn || (Kn = 1, process.env.NODE_ENV === "production" ? Ot.exports =
|
|
265
|
+
return Kn || (Kn = 1, process.env.NODE_ENV === "production" ? Ot.exports = Vo() : Ot.exports = Yo()), Ot.exports;
|
|
266
266
|
}
|
|
267
267
|
var l = Ho();
|
|
268
268
|
function Bo() {
|
|
@@ -304,7 +304,7 @@ function Fr(e) {
|
|
|
304
304
|
function st(e) {
|
|
305
305
|
return e ? ot(e) ? e.document : _n(e) ? Tn(e) ? e : Ct(e) || Fr(e) ? e.ownerDocument : document : document : document;
|
|
306
306
|
}
|
|
307
|
-
const $e = Qt ? $o :
|
|
307
|
+
const $e = Qt ? $o : V;
|
|
308
308
|
function In(e) {
|
|
309
309
|
const t = q(e);
|
|
310
310
|
return $e(() => {
|
|
@@ -353,7 +353,7 @@ function Ht(e) {
|
|
|
353
353
|
}
|
|
354
354
|
function Sn(e) {
|
|
355
355
|
const t = q();
|
|
356
|
-
return
|
|
356
|
+
return V(() => {
|
|
357
357
|
t.current = e;
|
|
358
358
|
}, [e]), t.current;
|
|
359
359
|
}
|
|
@@ -522,10 +522,10 @@ function Qo() {
|
|
|
522
522
|
announcement: e
|
|
523
523
|
};
|
|
524
524
|
}
|
|
525
|
-
const
|
|
525
|
+
const Vr = /* @__PURE__ */ nt(null);
|
|
526
526
|
function es(e) {
|
|
527
|
-
const t = He(
|
|
528
|
-
|
|
527
|
+
const t = He(Vr);
|
|
528
|
+
V(() => {
|
|
529
529
|
if (!t)
|
|
530
530
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
531
531
|
return t(e);
|
|
@@ -589,7 +589,7 @@ function os(e) {
|
|
|
589
589
|
announce: s,
|
|
590
590
|
announcement: i
|
|
591
591
|
} = Qo(), a = jt("DndLiveRegion"), [c, u] = B(!1);
|
|
592
|
-
if (
|
|
592
|
+
if (V(() => {
|
|
593
593
|
u(!0);
|
|
594
594
|
}, []), es(U(() => ({
|
|
595
595
|
onDragStart(d) {
|
|
@@ -719,7 +719,7 @@ function Zn(e, t, n) {
|
|
|
719
719
|
y: n + e.height * 0.5
|
|
720
720
|
};
|
|
721
721
|
}
|
|
722
|
-
const
|
|
722
|
+
const Yr = (e) => {
|
|
723
723
|
let {
|
|
724
724
|
collisionRect: t,
|
|
725
725
|
droppableRects: n,
|
|
@@ -1212,29 +1212,29 @@ class Zr {
|
|
|
1212
1212
|
y: Math.min(x === G.Down ? k.bottom - k.height / 2 : k.bottom, Math.max(x === G.Down ? k.top : k.top + k.height / 2, d.y))
|
|
1213
1213
|
}, F = x === G.Right && !E || x === G.Left && !j, P = x === G.Down && !T || x === G.Up && !R;
|
|
1214
1214
|
if (F && $.x !== d.x) {
|
|
1215
|
-
const A = m.scrollLeft + p.x,
|
|
1216
|
-
if (
|
|
1215
|
+
const A = m.scrollLeft + p.x, Y = x === G.Right && A <= I.x || x === G.Left && A >= _.x;
|
|
1216
|
+
if (Y && !p.y) {
|
|
1217
1217
|
m.scrollTo({
|
|
1218
1218
|
left: A,
|
|
1219
1219
|
behavior: a
|
|
1220
1220
|
});
|
|
1221
1221
|
return;
|
|
1222
1222
|
}
|
|
1223
|
-
|
|
1223
|
+
Y ? g.x = m.scrollLeft - A : g.x = x === G.Right ? m.scrollLeft - I.x : m.scrollLeft - _.x, g.x && m.scrollBy({
|
|
1224
1224
|
left: -g.x,
|
|
1225
1225
|
behavior: a
|
|
1226
1226
|
});
|
|
1227
1227
|
break;
|
|
1228
1228
|
} else if (P && $.y !== d.y) {
|
|
1229
|
-
const A = m.scrollTop + p.y,
|
|
1230
|
-
if (
|
|
1229
|
+
const A = m.scrollTop + p.y, Y = x === G.Down && A <= I.y || x === G.Up && A >= _.y;
|
|
1230
|
+
if (Y && !p.x) {
|
|
1231
1231
|
m.scrollTo({
|
|
1232
1232
|
top: A,
|
|
1233
1233
|
behavior: a
|
|
1234
1234
|
});
|
|
1235
1235
|
return;
|
|
1236
1236
|
}
|
|
1237
|
-
|
|
1237
|
+
Y ? g.y = m.scrollTop - A : g.y = x === G.Down ? m.scrollTop - I.y : m.scrollTop - _.y, g.y && m.scrollBy({
|
|
1238
1238
|
top: -g.y,
|
|
1239
1239
|
behavior: a
|
|
1240
1240
|
});
|
|
@@ -1561,7 +1561,7 @@ function zs(e) {
|
|
|
1561
1561
|
const k = x.current.x * R.current.x, $ = x.current.y * R.current.y;
|
|
1562
1562
|
_.scrollBy(k, $);
|
|
1563
1563
|
}, []), I = U(() => a === Gt.TreeOrder ? [...u].reverse() : u, [a, u]);
|
|
1564
|
-
|
|
1564
|
+
V(
|
|
1565
1565
|
() => {
|
|
1566
1566
|
if (!s || !u.length || !E) {
|
|
1567
1567
|
m();
|
|
@@ -1706,21 +1706,21 @@ function Ws(e, t) {
|
|
|
1706
1706
|
}
|
|
1707
1707
|
return R;
|
|
1708
1708
|
}, [e, s, n, d, c]);
|
|
1709
|
-
return
|
|
1709
|
+
return V(() => {
|
|
1710
1710
|
h.current = e;
|
|
1711
|
-
}, [e]),
|
|
1711
|
+
}, [e]), V(
|
|
1712
1712
|
() => {
|
|
1713
1713
|
d || g();
|
|
1714
1714
|
},
|
|
1715
1715
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1716
1716
|
[n, d]
|
|
1717
|
-
),
|
|
1717
|
+
), V(
|
|
1718
1718
|
() => {
|
|
1719
1719
|
s && s.length > 0 && i(null);
|
|
1720
1720
|
},
|
|
1721
1721
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1722
1722
|
[JSON.stringify(s)]
|
|
1723
|
-
),
|
|
1723
|
+
), V(
|
|
1724
1724
|
() => {
|
|
1725
1725
|
d || typeof a != "number" || f.current !== null || (f.current = setTimeout(() => {
|
|
1726
1726
|
g(), f.current = null;
|
|
@@ -1747,10 +1747,10 @@ function Ws(e, t) {
|
|
|
1747
1747
|
function Qr(e, t) {
|
|
1748
1748
|
return Dt((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function Vs(e, t) {
|
|
1751
1751
|
return Qr(e, t);
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1753
|
+
function Ys(e) {
|
|
1754
1754
|
let {
|
|
1755
1755
|
callback: t,
|
|
1756
1756
|
disabled: n
|
|
@@ -1763,7 +1763,7 @@ function Vs(e) {
|
|
|
1763
1763
|
} = window;
|
|
1764
1764
|
return new s(r);
|
|
1765
1765
|
}, [r, n]);
|
|
1766
|
-
return
|
|
1766
|
+
return V(() => () => o?.disconnect(), [o]), o;
|
|
1767
1767
|
}
|
|
1768
1768
|
function en(e) {
|
|
1769
1769
|
let {
|
|
@@ -1782,7 +1782,7 @@ function en(e) {
|
|
|
1782
1782
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1783
1783
|
[n]
|
|
1784
1784
|
);
|
|
1785
|
-
return
|
|
1785
|
+
return V(() => () => o?.disconnect(), [o]), o;
|
|
1786
1786
|
}
|
|
1787
1787
|
function Hs(e) {
|
|
1788
1788
|
return new kn(it(e), e);
|
|
@@ -1802,7 +1802,7 @@ function or(e, t, n) {
|
|
|
1802
1802
|
return JSON.stringify(c) === JSON.stringify(h) ? c : h;
|
|
1803
1803
|
});
|
|
1804
1804
|
}
|
|
1805
|
-
const i =
|
|
1805
|
+
const i = Ys({
|
|
1806
1806
|
callback(c) {
|
|
1807
1807
|
if (e)
|
|
1808
1808
|
for (const u of c) {
|
|
@@ -1833,7 +1833,7 @@ function Bs(e) {
|
|
|
1833
1833
|
const sr = [];
|
|
1834
1834
|
function Us(e) {
|
|
1835
1835
|
const t = q(e), n = Dt((r) => e ? r && r !== sr && e && t.current && e.parentNode === t.current.parentNode ? r : An(e) : sr, [e]);
|
|
1836
|
-
return
|
|
1836
|
+
return V(() => {
|
|
1837
1837
|
t.current = e;
|
|
1838
1838
|
}, [e]), n;
|
|
1839
1839
|
}
|
|
@@ -1842,7 +1842,7 @@ function Gs(e) {
|
|
|
1842
1842
|
const i = un(s.target);
|
|
1843
1843
|
i && n((a) => a ? (a.set(i, Dn(i)), new Map(a)) : null);
|
|
1844
1844
|
}, []);
|
|
1845
|
-
return
|
|
1845
|
+
return V(() => {
|
|
1846
1846
|
const s = r.current;
|
|
1847
1847
|
if (e !== s) {
|
|
1848
1848
|
i(s);
|
|
@@ -1868,19 +1868,19 @@ function Gs(e) {
|
|
|
1868
1868
|
function ir(e, t) {
|
|
1869
1869
|
t === void 0 && (t = []);
|
|
1870
1870
|
const n = q(null);
|
|
1871
|
-
return
|
|
1871
|
+
return V(
|
|
1872
1872
|
() => {
|
|
1873
1873
|
n.current = null;
|
|
1874
1874
|
},
|
|
1875
1875
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1876
1876
|
t
|
|
1877
|
-
),
|
|
1877
|
+
), V(() => {
|
|
1878
1878
|
const r = e !== Ee;
|
|
1879
1879
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
1880
1880
|
}, [e]), n.current ? Bt(e, n.current) : Ee;
|
|
1881
1881
|
}
|
|
1882
1882
|
function qs(e) {
|
|
1883
|
-
|
|
1883
|
+
V(
|
|
1884
1884
|
() => {
|
|
1885
1885
|
if (!Qt)
|
|
1886
1886
|
return;
|
|
@@ -2172,7 +2172,7 @@ function si(e) {
|
|
|
2172
2172
|
activatorEvent: r,
|
|
2173
2173
|
draggableNodes: o
|
|
2174
2174
|
} = He(tn), s = Sn(r), i = Sn(n?.id);
|
|
2175
|
-
return
|
|
2175
|
+
return V(() => {
|
|
2176
2176
|
if (!t && !r && s && i != null) {
|
|
2177
2177
|
if (!$n(s) || document.activeElement === s.target)
|
|
2178
2178
|
return;
|
|
@@ -2268,10 +2268,10 @@ const no = /* @__PURE__ */ nt({
|
|
|
2268
2268
|
scaleX: 1,
|
|
2269
2269
|
scaleY: 1
|
|
2270
2270
|
});
|
|
2271
|
-
var
|
|
2271
|
+
var Ye;
|
|
2272
2272
|
(function(e) {
|
|
2273
2273
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
2274
|
-
})(
|
|
2274
|
+
})(Ye || (Ye = {}));
|
|
2275
2275
|
const ro = /* @__PURE__ */ Ar(function(t) {
|
|
2276
2276
|
var n, r, o, s;
|
|
2277
2277
|
let {
|
|
@@ -2285,7 +2285,7 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2285
2285
|
modifiers: g,
|
|
2286
2286
|
...f
|
|
2287
2287
|
} = t;
|
|
2288
|
-
const m = Ao(oi, void 0, ri), [x, R] = m, [E, j] = ts(), [T, I] = B(
|
|
2288
|
+
const m = Ao(oi, void 0, ri), [x, R] = m, [E, j] = ts(), [T, I] = B(Ye.Uninitialized), _ = T === Ye.Initialized, {
|
|
2289
2289
|
draggable: {
|
|
2290
2290
|
active: k,
|
|
2291
2291
|
nodes: $,
|
|
@@ -2294,7 +2294,7 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2294
2294
|
droppable: {
|
|
2295
2295
|
containers: P
|
|
2296
2296
|
}
|
|
2297
|
-
} = x, A = k != null ? $.get(k) : null,
|
|
2297
|
+
} = x, A = k != null ? $.get(k) : null, Y = q({
|
|
2298
2298
|
initial: null,
|
|
2299
2299
|
translated: null
|
|
2300
2300
|
}), K = U(() => {
|
|
@@ -2303,7 +2303,7 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2303
2303
|
id: k,
|
|
2304
2304
|
// It's possible for the active node to unmount while dragging
|
|
2305
2305
|
data: (de = A?.data) != null ? de : ei,
|
|
2306
|
-
rect:
|
|
2306
|
+
rect: Y
|
|
2307
2307
|
} : null;
|
|
2308
2308
|
}, [k, A]), D = q(null), [y, w] = B(null), [C, S] = B(null), M = xt(f, Object.values(f)), z = jt("DndDescribedBy", i), v = U(() => P.getEnabled(), [P]), O = ai(p), {
|
|
2309
2309
|
droppableRects: L,
|
|
@@ -2313,7 +2313,7 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2313
2313
|
dragging: _,
|
|
2314
2314
|
dependencies: [F.x, F.y],
|
|
2315
2315
|
config: O.droppable
|
|
2316
|
-
}), X = Ps($, k), H = U(() => C ? Cn(C) : null, [C]), ne = Io(), re =
|
|
2316
|
+
}), X = Ps($, k), H = U(() => C ? Cn(C) : null, [C]), ne = Io(), re = Vs(X, O.draggable.measure);
|
|
2317
2317
|
li({
|
|
2318
2318
|
activeNode: k != null ? $.get(k) : null,
|
|
2319
2319
|
config: ne.layoutShiftCompensation,
|
|
@@ -2353,12 +2353,12 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2353
2353
|
scrollableAncestors: Ne,
|
|
2354
2354
|
scrollableAncestorRects: Et,
|
|
2355
2355
|
windowRect: on
|
|
2356
|
-
}),
|
|
2356
|
+
}), Vn = H ? et(H, F) : null, Yn = Gs(Ne), jo = ir(Yn), Eo = ir(Yn, [W]), Xe = et(Rt, jo), Ke = qe ? ps(qe, Rt) : null, lt = K && Ke ? d({
|
|
2357
2357
|
active: K,
|
|
2358
2358
|
collisionRect: Ke,
|
|
2359
2359
|
droppableRects: L,
|
|
2360
2360
|
droppableContainers: v,
|
|
2361
|
-
pointerCoordinates:
|
|
2361
|
+
pointerCoordinates: Vn
|
|
2362
2362
|
}) : null, Hn = us(lt, "id"), [Pe, Bn] = B(null), Ro = Fn ? Rt : et(Rt, Eo), Mo = fs(Ro, (s = Pe?.rect) != null ? s : null, W), sn = q(null), Un = ee(
|
|
2363
2363
|
(de, xe) => {
|
|
2364
2364
|
let {
|
|
@@ -2396,15 +2396,15 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2396
2396
|
return;
|
|
2397
2397
|
const {
|
|
2398
2398
|
onDragPending: ut
|
|
2399
|
-
} = M.current,
|
|
2399
|
+
} = M.current, Ve = {
|
|
2400
2400
|
id: le,
|
|
2401
2401
|
constraint: We,
|
|
2402
2402
|
initialCoordinates: _e,
|
|
2403
2403
|
offset: Le
|
|
2404
2404
|
};
|
|
2405
|
-
ut?.(
|
|
2405
|
+
ut?.(Ve), E({
|
|
2406
2406
|
type: "onDragPending",
|
|
2407
|
-
event:
|
|
2407
|
+
event: Ve
|
|
2408
2408
|
});
|
|
2409
2409
|
},
|
|
2410
2410
|
onStart(le) {
|
|
@@ -2421,11 +2421,11 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2421
2421
|
active: {
|
|
2422
2422
|
id: We,
|
|
2423
2423
|
data: _e.data,
|
|
2424
|
-
rect:
|
|
2424
|
+
rect: Y
|
|
2425
2425
|
}
|
|
2426
2426
|
};
|
|
2427
2427
|
Mt(() => {
|
|
2428
|
-
Le?.(ct), I(
|
|
2428
|
+
Le?.(ct), I(Ye.Initializing), R({
|
|
2429
2429
|
type: se.DragStart,
|
|
2430
2430
|
initialCoordinates: le,
|
|
2431
2431
|
active: We
|
|
@@ -2453,29 +2453,29 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2453
2453
|
over: ct,
|
|
2454
2454
|
scrollAdjustedTranslate: ut
|
|
2455
2455
|
} = ue.current;
|
|
2456
|
-
let
|
|
2456
|
+
let Ve = null;
|
|
2457
2457
|
if (_e && ut) {
|
|
2458
2458
|
const {
|
|
2459
2459
|
cancelDrop: dt
|
|
2460
2460
|
} = M.current;
|
|
2461
|
-
|
|
2461
|
+
Ve = {
|
|
2462
2462
|
activatorEvent: ye,
|
|
2463
2463
|
active: _e,
|
|
2464
2464
|
collisions: Le,
|
|
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(Ve)) && (le = se.DragCancel);
|
|
2468
2468
|
}
|
|
2469
2469
|
D.current = null, Mt(() => {
|
|
2470
2470
|
R({
|
|
2471
2471
|
type: le
|
|
2472
|
-
}), I(
|
|
2472
|
+
}), I(Ye.Uninitialized), Bn(null), w(null), S(null), sn.current = null;
|
|
2473
2473
|
const dt = le === se.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2474
|
-
if (
|
|
2474
|
+
if (Ve) {
|
|
2475
2475
|
const an = M.current[dt];
|
|
2476
|
-
an?.(
|
|
2476
|
+
an?.(Ve), E({
|
|
2477
2477
|
type: dt,
|
|
2478
|
-
event:
|
|
2478
|
+
event: Ve
|
|
2479
2479
|
});
|
|
2480
2480
|
}
|
|
2481
2481
|
});
|
|
@@ -2501,8 +2501,8 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2501
2501
|
}, D.current = Fe, Un(be, xe));
|
|
2502
2502
|
}, [$, Un]), Gn = Fs(h, Oo);
|
|
2503
2503
|
qs(h), $e(() => {
|
|
2504
|
-
W && T ===
|
|
2505
|
-
}, [W, T]),
|
|
2504
|
+
W && T === Ye.Initializing && I(Ye.Initialized);
|
|
2505
|
+
}, [W, T]), V(
|
|
2506
2506
|
() => {
|
|
2507
2507
|
const {
|
|
2508
2508
|
onDragMove: de
|
|
@@ -2533,7 +2533,7 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2533
2533
|
},
|
|
2534
2534
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2535
2535
|
[Xe.x, Xe.y]
|
|
2536
|
-
),
|
|
2536
|
+
), V(
|
|
2537
2537
|
() => {
|
|
2538
2538
|
const {
|
|
2539
2539
|
active: de,
|
|
@@ -2585,7 +2585,7 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2585
2585
|
over: Pe,
|
|
2586
2586
|
scrollableAncestors: Ne,
|
|
2587
2587
|
scrollAdjustedTranslate: Xe
|
|
2588
|
-
},
|
|
2588
|
+
}, Y.current = {
|
|
2589
2589
|
initial: qe,
|
|
2590
2590
|
translated: Ke
|
|
2591
2591
|
};
|
|
@@ -2593,7 +2593,7 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2593
2593
|
...ne,
|
|
2594
2594
|
delta: F,
|
|
2595
2595
|
draggingRect: Ke,
|
|
2596
|
-
pointerCoordinates:
|
|
2596
|
+
pointerCoordinates: Vn,
|
|
2597
2597
|
scrollableAncestors: Ne,
|
|
2598
2598
|
scrollableAncestorRects: Et
|
|
2599
2599
|
});
|
|
@@ -2628,7 +2628,7 @@ const ro = /* @__PURE__ */ Ar(function(t) {
|
|
|
2628
2628
|
over: Pe,
|
|
2629
2629
|
measureDroppableContainers: N
|
|
2630
2630
|
}), [C, Gn, K, W, R, z, $, Pe, N]);
|
|
2631
|
-
return oe.createElement(
|
|
2631
|
+
return oe.createElement(Vr.Provider, {
|
|
2632
2632
|
value: j
|
|
2633
2633
|
}, oe.createElement(tn.Provider, {
|
|
2634
2634
|
value: To
|
|
@@ -2753,9 +2753,9 @@ function pi(e) {
|
|
|
2753
2753
|
}), T = ee(($, F) => {
|
|
2754
2754
|
j && (F && (j.unobserve(F), d.current = !1), $ && j.observe($));
|
|
2755
2755
|
}, [j]), [I, _] = Ht(T), k = xt(t);
|
|
2756
|
-
return
|
|
2756
|
+
return V(() => {
|
|
2757
2757
|
!j || !I.current || (j.disconnect(), d.current = !1, j.observe(I.current));
|
|
2758
|
-
}, [I, j]),
|
|
2758
|
+
}, [I, j]), V(
|
|
2759
2759
|
() => (a({
|
|
2760
2760
|
type: se.RegisterDroppable,
|
|
2761
2761
|
element: {
|
|
@@ -2773,7 +2773,7 @@ function pi(e) {
|
|
|
2773
2773
|
})),
|
|
2774
2774
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2775
2775
|
[r]
|
|
2776
|
-
),
|
|
2776
|
+
), V(() => {
|
|
2777
2777
|
n !== h.current.disabled && (a({
|
|
2778
2778
|
type: se.SetDroppableDisabled,
|
|
2779
2779
|
id: r,
|
|
@@ -2947,7 +2947,7 @@ function ao(e) {
|
|
|
2947
2947
|
} = hi(), d = jt(so, n), p = a.rect !== null, g = U(() => r.map((_) => typeof _ == "object" && "id" in _ ? _.id : _), [r]), f = i != null, m = i ? g.indexOf(i.id) : -1, x = u ? g.indexOf(u.id) : -1, R = q(g), E = !vi(g, R.current), j = x !== -1 && m === -1 || E, T = xi(s);
|
|
2948
2948
|
$e(() => {
|
|
2949
2949
|
E && f && h(g);
|
|
2950
|
-
}, [E, g, f, h]),
|
|
2950
|
+
}, [E, g, f, h]), V(() => {
|
|
2951
2951
|
R.current = g;
|
|
2952
2952
|
}, [g]);
|
|
2953
2953
|
const I = U(
|
|
@@ -3024,7 +3024,7 @@ function Mi(e) {
|
|
|
3024
3024
|
}
|
|
3025
3025
|
}
|
|
3026
3026
|
n !== a.current && (a.current = n);
|
|
3027
|
-
}, [t, n, r, o]),
|
|
3027
|
+
}, [t, n, r, o]), V(() => {
|
|
3028
3028
|
s && i(null);
|
|
3029
3029
|
}, [s]), s;
|
|
3030
3030
|
}
|
|
@@ -3072,7 +3072,7 @@ function co(e) {
|
|
|
3072
3072
|
}
|
|
3073
3073
|
}), {
|
|
3074
3074
|
active: A,
|
|
3075
|
-
activatorEvent:
|
|
3075
|
+
activatorEvent: Y,
|
|
3076
3076
|
activeNodeRect: K,
|
|
3077
3077
|
attributes: D,
|
|
3078
3078
|
setNodeRef: y,
|
|
@@ -3124,9 +3124,9 @@ function co(e) {
|
|
|
3124
3124
|
node: $,
|
|
3125
3125
|
rect: k
|
|
3126
3126
|
});
|
|
3127
|
-
return
|
|
3127
|
+
return V(() => {
|
|
3128
3128
|
O && W.current.newIndex !== ne && (W.current.newIndex = ne), d !== W.current.containerId && (W.current.containerId = d), h !== W.current.items && (W.current.items = h);
|
|
3129
|
-
}, [O, ne, d, h]),
|
|
3129
|
+
}, [O, ne, d, h]), V(() => {
|
|
3130
3130
|
if (re === W.current.activeId)
|
|
3131
3131
|
return;
|
|
3132
3132
|
if (re != null && W.current.activeId == null) {
|
|
@@ -3167,7 +3167,7 @@ function co(e) {
|
|
|
3167
3167
|
pe && W.current.newIndex === T
|
|
3168
3168
|
)
|
|
3169
3169
|
return Ei;
|
|
3170
|
-
if (!(N && !$n(
|
|
3170
|
+
if (!(N && !$n(Y) || !u) && (O || ue))
|
|
3171
3171
|
return tt.Transition.toString({
|
|
3172
3172
|
...u,
|
|
3173
3173
|
property: lo
|
|
@@ -3474,7 +3474,7 @@ class Wi {
|
|
|
3474
3474
|
}
|
|
3475
3475
|
}
|
|
3476
3476
|
function at(e, t = (r) => r, n = {}) {
|
|
3477
|
-
const r = n.equal ??
|
|
3477
|
+
const r = n.equal ?? Vi;
|
|
3478
3478
|
return ki.useSyncExternalStoreWithSelector(
|
|
3479
3479
|
e.subscribe,
|
|
3480
3480
|
() => e.state,
|
|
@@ -3483,7 +3483,7 @@ function at(e, t = (r) => r, n = {}) {
|
|
|
3483
3483
|
r
|
|
3484
3484
|
);
|
|
3485
3485
|
}
|
|
3486
|
-
function
|
|
3486
|
+
function Vi(e, t) {
|
|
3487
3487
|
if (Object.is(e, t))
|
|
3488
3488
|
return !0;
|
|
3489
3489
|
if (typeof e != "object" || e === null || typeof t != "object" || t === null)
|
|
@@ -3555,7 +3555,7 @@ function vr(e, t) {
|
|
|
3555
3555
|
throw new Error("Unexpected undefined");
|
|
3556
3556
|
return e;
|
|
3557
3557
|
}
|
|
3558
|
-
const
|
|
3558
|
+
const Yi = (e, t) => Math.abs(e - t) < 1.01, Hi = (e, t, n) => {
|
|
3559
3559
|
let r;
|
|
3560
3560
|
return function(...o) {
|
|
3561
3561
|
e.clearTimeout(r), r = e.setTimeout(() => t.apply(this, o), n);
|
|
@@ -3983,7 +3983,7 @@ class Ji {
|
|
|
3983
3983
|
console.warn("Failed to get offset for index:", n);
|
|
3984
3984
|
return;
|
|
3985
3985
|
}
|
|
3986
|
-
|
|
3986
|
+
Yi(m[0], f) || c(p);
|
|
3987
3987
|
};
|
|
3988
3988
|
this.isDynamicMode() ? this.targetWindow.requestAnimationFrame(g) : g();
|
|
3989
3989
|
});
|
|
@@ -4388,8 +4388,8 @@ function b(e) {
|
|
|
4388
4388
|
);
|
|
4389
4389
|
});
|
|
4390
4390
|
}
|
|
4391
|
-
const za = b(yt.Trigger), La = b(yt.Positioner), Na = b(yt.Content), Pa = b(yt.Item), Fa = b(Re.Label), Wa = b(Re.HiddenInput),
|
|
4392
|
-
function
|
|
4391
|
+
const za = b(yt.Trigger), La = b(yt.Positioner), Na = b(yt.Content), Pa = b(yt.Item), Fa = b(Re.Label), Wa = b(Re.HiddenInput), Va = b(Re.Control);
|
|
4392
|
+
function Ya({ 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(za, { asChild: !0, children: /* @__PURE__ */ l.jsx(we, { "aria-label": "Toggle columns", variant: "ghost", ml: "1", size: "xs", children: /* @__PURE__ */ l.jsx($a, { size: 18 }) }) }),
|
|
@@ -4397,7 +4397,7 @@ function Va({ visibility: e }) {
|
|
|
4397
4397
|
const r = !!e[n.id];
|
|
4398
4398
|
return /* @__PURE__ */ l.jsx(Pa, { value: n.id, closeOnSelect: !1, children: /* @__PURE__ */ l.jsxs(Re.Root, { checked: r, onCheckedChange: () => sa(n.id), children: [
|
|
4399
4399
|
/* @__PURE__ */ l.jsx(Wa, {}),
|
|
4400
|
-
/* @__PURE__ */ l.jsx(
|
|
4400
|
+
/* @__PURE__ */ l.jsx(Va, {}),
|
|
4401
4401
|
/* @__PURE__ */ l.jsx(Fa, { children: n.label })
|
|
4402
4402
|
] }) }, n.id);
|
|
4403
4403
|
}) }) }) })
|
|
@@ -4481,7 +4481,7 @@ function Ba() {
|
|
|
4481
4481
|
},
|
|
4482
4482
|
children: /* @__PURE__ */ l.jsx(ae.Row, { height: "28px", children: s.map((i) => {
|
|
4483
4483
|
if (i.id === je)
|
|
4484
|
-
return /* @__PURE__ */ l.jsx(ae.ColumnHeader, { bg: "gray.100", w: 100, children: /* @__PURE__ */ l.jsx(
|
|
4484
|
+
return /* @__PURE__ */ l.jsx(ae.ColumnHeader, { bg: "gray.100", w: 100, children: /* @__PURE__ */ l.jsx(Ya, { visibility: t }) }, i.id);
|
|
4485
4485
|
const a = i.type !== "actions" && i.type !== "visibility", c = r === i.id;
|
|
4486
4486
|
return /* @__PURE__ */ l.jsx(
|
|
4487
4487
|
Ha,
|
|
@@ -4513,7 +4513,7 @@ function Ba() {
|
|
|
4513
4513
|
}
|
|
4514
4514
|
);
|
|
4515
4515
|
}
|
|
4516
|
-
const Ua = [10, 20, 50, 100], Ga = b(te.Positioner), qa = b(te.Content), Xa = b(te.Item), Ka = b(
|
|
4516
|
+
const Ua = [10, 20, 50, 100], Ga = b(te.Positioner), qa = b(te.Content), Xa = b(te.Item), Ka = b(Vt.PrevTrigger), Ja = b(Vt.NextTrigger), Za = b(te.HiddenSelect), Qa = b(te.Control), el = b(te.Trigger), tl = b(te.ValueText), nl = b(te.IndicatorGroup), rl = b(te.Indicator);
|
|
4517
4517
|
function ol({
|
|
4518
4518
|
totalCount: e,
|
|
4519
4519
|
pageSize: t,
|
|
@@ -4559,7 +4559,7 @@ function ol({
|
|
|
4559
4559
|
] })
|
|
4560
4560
|
] }),
|
|
4561
4561
|
/* @__PURE__ */ l.jsx(
|
|
4562
|
-
|
|
4562
|
+
Vt.Root,
|
|
4563
4563
|
{
|
|
4564
4564
|
count: e,
|
|
4565
4565
|
pageSize: t,
|
|
@@ -4569,7 +4569,7 @@ function ol({
|
|
|
4569
4569
|
children: /* @__PURE__ */ l.jsxs(ko, { size: "sm", variant: "ghost", children: [
|
|
4570
4570
|
/* @__PURE__ */ l.jsx(Ka, { asChild: !0, children: /* @__PURE__ */ l.jsx(we, { "aria-label": "Previous page", children: /* @__PURE__ */ l.jsx(xa, { size: 18 }) }) }),
|
|
4571
4571
|
/* @__PURE__ */ l.jsx(
|
|
4572
|
-
|
|
4572
|
+
Vt.Items,
|
|
4573
4573
|
{
|
|
4574
4574
|
render: (c) => /* @__PURE__ */ l.jsx(
|
|
4575
4575
|
we,
|
|
@@ -4670,7 +4670,7 @@ function cl(e, t, n) {
|
|
|
4670
4670
|
};
|
|
4671
4671
|
return [...e].sort((s, i) => o(s, i, n));
|
|
4672
4672
|
}
|
|
4673
|
-
function
|
|
4673
|
+
function Vu({
|
|
4674
4674
|
tableId: e,
|
|
4675
4675
|
data: t = [],
|
|
4676
4676
|
headers: n = [],
|
|
@@ -4693,9 +4693,9 @@ function Yu({
|
|
|
4693
4693
|
// Default false, but we auto-detect below
|
|
4694
4694
|
}) {
|
|
4695
4695
|
const j = q(null);
|
|
4696
|
-
|
|
4696
|
+
V(() => {
|
|
4697
4697
|
na(e);
|
|
4698
|
-
}, [e]),
|
|
4698
|
+
}, [e]), V(() => {
|
|
4699
4699
|
ta(t, n, x);
|
|
4700
4700
|
}, [t, n, x]);
|
|
4701
4701
|
const { sortColumn: T, sortDirection: I, data: _, columnOrder: k } = at(ge), $ = U(
|
|
@@ -4716,7 +4716,7 @@ function Yu({
|
|
|
4716
4716
|
const O = $.findIndex((N) => N.id === z.id), L = $.findIndex((N) => N.id === v.id);
|
|
4717
4717
|
ra(nn($, O, L));
|
|
4718
4718
|
}, w = r && !s, C = s && !r, S = !r && !s && A.length === 0;
|
|
4719
|
-
return /* @__PURE__ */ l.jsx(ro, { collisionDetection:
|
|
4719
|
+
return /* @__PURE__ */ l.jsx(ro, { collisionDetection: Yr, onDragEnd: y, children: /* @__PURE__ */ l.jsx(
|
|
4720
4720
|
ao,
|
|
4721
4721
|
{
|
|
4722
4722
|
items: $.map((M) => M.id),
|
|
@@ -4894,12 +4894,12 @@ function Ol({
|
|
|
4894
4894
|
itemToValue: i
|
|
4895
4895
|
}), A = U(() => {
|
|
4896
4896
|
if (!_) return $;
|
|
4897
|
-
const
|
|
4898
|
-
return $.filter((K) => s(K).toLowerCase().includes(
|
|
4897
|
+
const Y = _.toLowerCase();
|
|
4898
|
+
return $.filter((K) => s(K).toLowerCase().includes(Y));
|
|
4899
4899
|
}, [o, _, s]);
|
|
4900
|
-
return
|
|
4900
|
+
return V(() => {
|
|
4901
4901
|
P(A);
|
|
4902
|
-
}, [A, P]),
|
|
4902
|
+
}, [A, P]), V(() => {
|
|
4903
4903
|
c && k(s(c));
|
|
4904
4904
|
}, [c, s]), /* @__PURE__ */ l.jsxs(
|
|
4905
4905
|
wl,
|
|
@@ -4909,12 +4909,12 @@ function Ol({
|
|
|
4909
4909
|
variant: r,
|
|
4910
4910
|
collection: F,
|
|
4911
4911
|
placeholder: p,
|
|
4912
|
-
onInputValueChange: (
|
|
4913
|
-
f?.(
|
|
4912
|
+
onInputValueChange: (Y) => {
|
|
4913
|
+
f?.(Y.inputValue), k(Y.inputValue);
|
|
4914
4914
|
},
|
|
4915
4915
|
value: c ? [i(c)] : [],
|
|
4916
|
-
onValueChange: (
|
|
4917
|
-
const K =
|
|
4916
|
+
onValueChange: (Y) => {
|
|
4917
|
+
const K = Y.value?.[0];
|
|
4918
4918
|
if (!K) return;
|
|
4919
4919
|
const D = F.items.find((y) => i(y) === K);
|
|
4920
4920
|
D && m?.(D);
|
|
@@ -4934,10 +4934,10 @@ function Ol({
|
|
|
4934
4934
|
u ? /* @__PURE__ */ l.jsxs(fe, { p: "2", children: [
|
|
4935
4935
|
/* @__PURE__ */ l.jsx(zr, { size: "xs", borderWidth: "1px" }),
|
|
4936
4936
|
/* @__PURE__ */ l.jsx(No, { children: "Loading..." })
|
|
4937
|
-
] }) : h ? /* @__PURE__ */ l.jsx(Q, { p: "2", color: "red.500", fontSize: "sm", children: d || "Something went wrong" }) : F.items.map((
|
|
4938
|
-
a(
|
|
4937
|
+
] }) : h ? /* @__PURE__ */ l.jsx(Q, { p: "2", color: "red.500", fontSize: "sm", children: d || "Something went wrong" }) : F.items.map((Y) => /* @__PURE__ */ l.jsxs(Te.Item, { item: Y, ...I, children: [
|
|
4938
|
+
a(Y),
|
|
4939
4939
|
/* @__PURE__ */ l.jsx(Te.ItemIndicator, {})
|
|
4940
|
-
] }, i(
|
|
4940
|
+
] }, i(Y))),
|
|
4941
4941
|
g && !h && !u && /* @__PURE__ */ l.jsx(Q, { p: "2", color: "fg.muted", fontSize: "sm", children: g })
|
|
4942
4942
|
] }) })
|
|
4943
4943
|
]
|
|
@@ -4966,7 +4966,7 @@ function kl({
|
|
|
4966
4966
|
startDate: e,
|
|
4967
4967
|
endDate: t,
|
|
4968
4968
|
onChange: n,
|
|
4969
|
-
width: r = "
|
|
4969
|
+
width: r = "100%",
|
|
4970
4970
|
showLabel: o = !0,
|
|
4971
4971
|
label: s = "Select date range",
|
|
4972
4972
|
visible: i = !0
|
|
@@ -4974,7 +4974,7 @@ function kl({
|
|
|
4974
4974
|
const [a, c] = B(!1), [u, h] = B(e || /* @__PURE__ */ new Date()), [d, p] = B(null), [g, f] = B(Be(e)), [m, x] = B(Be(t)), R = (D, y) => D && y ? `${Ue(D)} to ${Ue(y)}` : D ? `${Ue(D)}` : "", [E, j] = B(
|
|
4975
4975
|
R(Be(e), Be(t))
|
|
4976
4976
|
), T = e?.getTime(), I = t?.getTime();
|
|
4977
|
-
|
|
4977
|
+
V(() => {
|
|
4978
4978
|
const D = Be(e), y = Be(t);
|
|
4979
4979
|
f(D), x(y), j(R(D, y)), D && h(new Date(D.getFullYear(), D.getMonth(), 1));
|
|
4980
4980
|
}, [T, I]);
|
|
@@ -4996,7 +4996,7 @@ function kl({
|
|
|
4996
4996
|
const S = w < C ? w : C, M = w < C ? C : w;
|
|
4997
4997
|
f(S), x(M), n(S, M), h(S);
|
|
4998
4998
|
} else w && !y.toLowerCase().includes("to") ? (f(w), x(null), n(w, null)) : y.trim() || (f(null), x(null), n(null, null));
|
|
4999
|
-
},
|
|
4999
|
+
}, Y = (D) => {
|
|
5000
5000
|
if (D.key !== "Enter") return;
|
|
5001
5001
|
const { start: y, end: w } = Dr(E);
|
|
5002
5002
|
if (y && !w && !E.toLowerCase().includes("to")) {
|
|
@@ -5013,7 +5013,7 @@ function kl({
|
|
|
5013
5013
|
}, K = (D) => {
|
|
5014
5014
|
D && (D.preventDefault(), D.stopPropagation()), f(null), x(null), j(""), n(null, null);
|
|
5015
5015
|
};
|
|
5016
|
-
return /* @__PURE__ */ l.jsxs(he, { width: r, onKeyDown:
|
|
5016
|
+
return /* @__PURE__ */ l.jsxs(he, { width: r, onKeyDown: Y, children: [
|
|
5017
5017
|
o && !i && /* @__PURE__ */ l.jsx(Q, { fontSize: "xs", color: "fg.muted", mb: 1, fontWeight: "medium", children: s }),
|
|
5018
5018
|
/* @__PURE__ */ l.jsxs(
|
|
5019
5019
|
_l,
|
|
@@ -5163,7 +5163,7 @@ function Wl(e) {
|
|
|
5163
5163
|
const c = new Date(a, i, s);
|
|
5164
5164
|
return c.getDate() === s && c.getMonth() === i ? c : null;
|
|
5165
5165
|
}
|
|
5166
|
-
function
|
|
5166
|
+
function Vl({
|
|
5167
5167
|
value: e,
|
|
5168
5168
|
onChange: t,
|
|
5169
5169
|
width: n = "220px",
|
|
@@ -5171,7 +5171,7 @@ function Yl({
|
|
|
5171
5171
|
label: o = "Select date"
|
|
5172
5172
|
}) {
|
|
5173
5173
|
const [s, i] = B(!1), [a, c] = B(e || /* @__PURE__ */ new Date()), [u, h] = B(jr(e));
|
|
5174
|
-
|
|
5174
|
+
V(() => {
|
|
5175
5175
|
h(jr(e));
|
|
5176
5176
|
}, [e]);
|
|
5177
5177
|
const d = new Date(a.getFullYear(), a.getMonth() + 1, 0).getDate(), p = new Date(a.getFullYear(), a.getMonth(), 1).getDay(), g = () => {
|
|
@@ -5316,7 +5316,7 @@ function Yl({
|
|
|
5316
5316
|
)
|
|
5317
5317
|
] });
|
|
5318
5318
|
}
|
|
5319
|
-
const
|
|
5319
|
+
const Yl = b(Me.Root), Hl = b(Me.Label), Bl = b(Me.HelperText), Ul = b(Me.ErrorText), Er = ({
|
|
5320
5320
|
icon: e,
|
|
5321
5321
|
value: t,
|
|
5322
5322
|
onChange: n,
|
|
@@ -5334,7 +5334,7 @@ const Vl = b(Me.Root), Hl = b(Me.Label), Bl = b(Me.HelperText), Ul = b(Me.ErrorT
|
|
|
5334
5334
|
min: f = 0,
|
|
5335
5335
|
max: m = 100,
|
|
5336
5336
|
step: x = 1
|
|
5337
|
-
}) => /* @__PURE__ */ l.jsxs(
|
|
5337
|
+
}) => /* @__PURE__ */ l.jsxs(Yl, { width: i, children: [
|
|
5338
5338
|
p && /* @__PURE__ */ l.jsx(Hl, { children: a }),
|
|
5339
5339
|
/* @__PURE__ */ l.jsx(Po, { startElement: e, children: /* @__PURE__ */ l.jsx(
|
|
5340
5340
|
Xt,
|
|
@@ -5539,31 +5539,15 @@ const Vl = b(Me.Root), Hl = b(Me.Label), Bl = b(Me.HelperText), Ul = b(Me.ErrorT
|
|
|
5539
5539
|
}
|
|
5540
5540
|
);
|
|
5541
5541
|
case "date":
|
|
5542
|
-
return (
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
value: e.value,
|
|
5551
|
-
onChange: e.onChange,
|
|
5552
|
-
visible: t,
|
|
5553
|
-
label: e.label
|
|
5554
|
-
}
|
|
5555
|
-
)
|
|
5542
|
+
return /* @__PURE__ */ l.jsx(
|
|
5543
|
+
Vl,
|
|
5544
|
+
{
|
|
5545
|
+
value: e.value,
|
|
5546
|
+
onChange: e.onChange,
|
|
5547
|
+
visible: t,
|
|
5548
|
+
label: e.label
|
|
5549
|
+
}
|
|
5556
5550
|
);
|
|
5557
|
-
// case 'date-range':
|
|
5558
|
-
// return (
|
|
5559
|
-
// <MDSDateRangePicker
|
|
5560
|
-
// startDate={filter.startDate ? new Date(filter.startDate) : undefined}
|
|
5561
|
-
// endDate={filter.endDate ? new Date(filter.endDate) : undefined}
|
|
5562
|
-
// onChange={filter.onChange as (v: string | Date | null | undefined) => void}
|
|
5563
|
-
// visible={drawerOpen}
|
|
5564
|
-
// label={filter.label}
|
|
5565
|
-
// />
|
|
5566
|
-
// );
|
|
5567
5551
|
case "date-range":
|
|
5568
5552
|
const n = e.value, r = n?.startDate || e.startDate, o = n?.endDate || e.endDate;
|
|
5569
5553
|
return /* @__PURE__ */ l.jsx(
|
|
@@ -5606,7 +5590,7 @@ const Vl = b(Me.Root), Hl = b(Me.Label), Bl = b(Me.HelperText), Ul = b(Me.ErrorT
|
|
|
5606
5590
|
onOpenChange: h
|
|
5607
5591
|
}) => {
|
|
5608
5592
|
const [d, p] = B([]);
|
|
5609
|
-
|
|
5593
|
+
V(() => {
|
|
5610
5594
|
const f = () => {
|
|
5611
5595
|
p(Pn(s));
|
|
5612
5596
|
};
|
|
@@ -5671,7 +5655,7 @@ const Vl = b(Me.Root), Hl = b(Me.Label), Bl = b(Me.HelperText), Ul = b(Me.ErrorT
|
|
|
5671
5655
|
ro,
|
|
5672
5656
|
{
|
|
5673
5657
|
sensors: is(ss(Ln)),
|
|
5674
|
-
collisionDetection:
|
|
5658
|
+
collisionDetection: Yr,
|
|
5675
5659
|
onDragEnd: ({ active: f, over: m }) => {
|
|
5676
5660
|
if (!m || f.id === m.id) return;
|
|
5677
5661
|
const x = o.findIndex((j) => j.id === f.id), R = o.findIndex((j) => j.id === m.id), E = nn(o, x, R);
|
|
@@ -5748,7 +5732,7 @@ const Vl = b(Me.Root), Hl = b(Me.Label), Bl = b(Me.HelperText), Ul = b(Me.ErrorT
|
|
|
5748
5732
|
] }) })
|
|
5749
5733
|
] })
|
|
5750
5734
|
] }) });
|
|
5751
|
-
},
|
|
5735
|
+
}, Yu = ({
|
|
5752
5736
|
title: e,
|
|
5753
5737
|
filters: t,
|
|
5754
5738
|
onVisibilityChange: n,
|
|
@@ -5839,7 +5823,7 @@ const Vl = b(Me.Root), Hl = b(Me.Label), Bl = b(Me.HelperText), Ul = b(Me.ErrorT
|
|
|
5839
5823
|
s
|
|
5840
5824
|
] })
|
|
5841
5825
|
}
|
|
5842
|
-
), Ac = b(J.Root), kc = b(J.Backdrop), zc = b(J.Positioner), Lc = b(J.Content), Nc = b(J.Header), Pc = b(J.Body), Fc = b(J.Footer), Wc = b(J.Title),
|
|
5826
|
+
), Ac = b(J.Root), kc = b(J.Backdrop), zc = b(J.Positioner), Lc = b(J.Content), Nc = b(J.Header), Pc = b(J.Body), Fc = b(J.Footer), Wc = b(J.Title), Vc = b(J.CloseTrigger);
|
|
5843
5827
|
function Gu({
|
|
5844
5828
|
open: e,
|
|
5845
5829
|
onClose: t,
|
|
@@ -5856,7 +5840,7 @@ function Gu({
|
|
|
5856
5840
|
/* @__PURE__ */ l.jsx(kc, {}),
|
|
5857
5841
|
/* @__PURE__ */ l.jsx(zc, { children: /* @__PURE__ */ l.jsxs(Lc, { maxW: "480px", children: [
|
|
5858
5842
|
/* @__PURE__ */ l.jsx(Nc, { borderBottom: "1px solid", borderColor: "gray.200", children: /* @__PURE__ */ l.jsx(Wc, { children: r }) }),
|
|
5859
|
-
/* @__PURE__ */ l.jsx(Pc, { p: 6, children: /* @__PURE__ */ l.jsxs(
|
|
5843
|
+
/* @__PURE__ */ l.jsx(Pc, { p: 6, children: /* @__PURE__ */ l.jsxs(Yt, { gap: 4, align: "center", textAlign: "center", children: [
|
|
5860
5844
|
/* @__PURE__ */ l.jsx(he, { color: "orange.500", children: a ?? /* @__PURE__ */ l.jsx(xo, { size: 40 }) }),
|
|
5861
5845
|
/* @__PURE__ */ l.jsx(Q, { fontSize: "sm", color: "gray.600", children: o })
|
|
5862
5846
|
] }) }),
|
|
@@ -5884,11 +5868,11 @@ function Gu({
|
|
|
5884
5868
|
]
|
|
5885
5869
|
}
|
|
5886
5870
|
),
|
|
5887
|
-
/* @__PURE__ */ l.jsx(
|
|
5871
|
+
/* @__PURE__ */ l.jsx(Vc, { asChild: !0, children: /* @__PURE__ */ l.jsx(wt, { size: "sm" }) })
|
|
5888
5872
|
] }) })
|
|
5889
5873
|
] }) });
|
|
5890
5874
|
}
|
|
5891
|
-
const
|
|
5875
|
+
const Yc = b(J.Root), Hc = b(J.Backdrop), Bc = b(J.Positioner), Uc = b(J.Content), Gc = b(J.Header), qc = b(J.Body), Xc = b(J.Footer), Kc = b(J.Title), Jc = b(J.CloseTrigger);
|
|
5892
5876
|
function qu({
|
|
5893
5877
|
open: e,
|
|
5894
5878
|
onClose: t,
|
|
@@ -5901,7 +5885,7 @@ function qu({
|
|
|
5901
5885
|
}) {
|
|
5902
5886
|
const [c, u] = B(""), h = c === s;
|
|
5903
5887
|
return /* @__PURE__ */ l.jsx(
|
|
5904
|
-
|
|
5888
|
+
Yc,
|
|
5905
5889
|
{
|
|
5906
5890
|
open: e,
|
|
5907
5891
|
placement: "center",
|
|
@@ -5919,8 +5903,8 @@ function qu({
|
|
|
5919
5903
|
style: {
|
|
5920
5904
|
padding: "16px"
|
|
5921
5905
|
},
|
|
5922
|
-
children: /* @__PURE__ */ l.jsxs(
|
|
5923
|
-
/* @__PURE__ */ l.jsx(he, { border: "1px solid", borderColor: "red.200", bg: "red.50", borderRadius: "md", p: 4, children: /* @__PURE__ */ l.jsxs(
|
|
5906
|
+
children: /* @__PURE__ */ l.jsxs(Yt, { gap: 4, borderRadius: "md", p: 4, bg: "white", children: [
|
|
5907
|
+
/* @__PURE__ */ l.jsx(he, { 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: [
|
|
5924
5908
|
/* @__PURE__ */ l.jsx(he, { color: "red.600", mt: "2px", children: /* @__PURE__ */ l.jsx(xo, { size: 20 }) }),
|
|
5925
5909
|
/* @__PURE__ */ l.jsxs(he, { children: [
|
|
5926
5910
|
/* @__PURE__ */ l.jsx(Q, { fontWeight: "semibold", color: "red.700", children: "Are you sure?" }),
|
|
@@ -6157,7 +6141,7 @@ function yu() {
|
|
|
6157
6141
|
} }, I = "en", _ = {};
|
|
6158
6142
|
_[I] = E;
|
|
6159
6143
|
var k = "$isDayjsObject", $ = function(D) {
|
|
6160
|
-
return D instanceof
|
|
6144
|
+
return D instanceof Y || !(!D || !D[k]);
|
|
6161
6145
|
}, F = function D(y, w, C) {
|
|
6162
6146
|
var S;
|
|
6163
6147
|
if (!y) return I;
|
|
@@ -6174,12 +6158,12 @@ function yu() {
|
|
|
6174
6158
|
}, P = function(D, y) {
|
|
6175
6159
|
if ($(D)) return D.clone();
|
|
6176
6160
|
var w = typeof y == "object" ? y : {};
|
|
6177
|
-
return w.date = D, w.args = arguments, new
|
|
6161
|
+
return w.date = D, w.args = arguments, new Y(w);
|
|
6178
6162
|
}, A = T;
|
|
6179
6163
|
A.l = F, A.i = $, A.w = function(D, y) {
|
|
6180
6164
|
return P(D, { locale: y.$L, utc: y.$u, x: y.$x, $offset: y.$offset });
|
|
6181
6165
|
};
|
|
6182
|
-
var
|
|
6166
|
+
var Y = (function() {
|
|
6183
6167
|
function D(w) {
|
|
6184
6168
|
this.$L = F(w.locale, null, !0), this.parse(w), this.$x = this.$x || w.x || {}, this[k] = !0;
|
|
6185
6169
|
}
|
|
@@ -6394,13 +6378,13 @@ function yu() {
|
|
|
6394
6378
|
}, y.toString = function() {
|
|
6395
6379
|
return this.$d.toUTCString();
|
|
6396
6380
|
}, D;
|
|
6397
|
-
})(), K =
|
|
6381
|
+
})(), K = Y.prototype;
|
|
6398
6382
|
return P.prototype = K, [["$ms", s], ["$s", i], ["$m", a], ["$H", c], ["$W", u], ["$M", d], ["$y", g], ["$D", f]].forEach((function(D) {
|
|
6399
6383
|
K[D[1]] = function(y) {
|
|
6400
6384
|
return this.$g(y, D[0], D[1]);
|
|
6401
6385
|
};
|
|
6402
6386
|
})), P.extend = function(D, y) {
|
|
6403
|
-
return D.$i || (D(y,
|
|
6387
|
+
return D.$i || (D(y, Y, P), D.$i = !0), P;
|
|
6404
6388
|
}, P.locale = F, P.isDayjs = $, P.unix = function(D) {
|
|
6405
6389
|
return P(1e3 * D);
|
|
6406
6390
|
}, P.en = _[I], P.Ls = _, P.p = {}, P;
|
|
@@ -6570,7 +6554,7 @@ function Zu({
|
|
|
6570
6554
|
timeFontWeight: d = "400",
|
|
6571
6555
|
showTime: p = !0
|
|
6572
6556
|
}) {
|
|
6573
|
-
return /* @__PURE__ */ l.jsxs(
|
|
6557
|
+
return /* @__PURE__ */ l.jsxs(Yt, { gap: 0.5, align: s, children: [
|
|
6574
6558
|
/* @__PURE__ */ l.jsx(Q, { fontSize: a, fontWeight: c, color: i, children: Tr({
|
|
6575
6559
|
value: e,
|
|
6576
6560
|
variant: t,
|
|
@@ -6674,7 +6658,7 @@ function Qu({
|
|
|
6674
6658
|
}
|
|
6675
6659
|
function ed(e) {
|
|
6676
6660
|
const t = Do(), [n, r] = B(t.getRaw(e)?.value);
|
|
6677
|
-
return
|
|
6661
|
+
return V(() => {
|
|
6678
6662
|
let o = !0;
|
|
6679
6663
|
t.getKey(e).then((i) => {
|
|
6680
6664
|
o && r(i);
|
|
@@ -6689,7 +6673,7 @@ function ed(e) {
|
|
|
6689
6673
|
}
|
|
6690
6674
|
function td(e) {
|
|
6691
6675
|
const t = Do(), [n, r] = B({});
|
|
6692
|
-
return
|
|
6676
|
+
return V(() => {
|
|
6693
6677
|
let o = !0;
|
|
6694
6678
|
t.getMultiKey(e).then((i) => {
|
|
6695
6679
|
o && r(i);
|
|
@@ -6736,21 +6720,22 @@ function od(e = {}) {
|
|
|
6736
6720
|
};
|
|
6737
6721
|
}
|
|
6738
6722
|
function sd(e = {}) {
|
|
6739
|
-
const { initialValue: t = "", delay: n = 300 } = e, [
|
|
6740
|
-
|
|
6741
|
-
}, []),
|
|
6742
|
-
|
|
6723
|
+
const { initialValue: t = "", delay: n = 300, len: r = 3 } = e, [o, s] = B(t), a = o.length === 0 || o.length >= r ? o : "", c = zu(a, n), u = ee((d) => {
|
|
6724
|
+
s(d);
|
|
6725
|
+
}, []), h = ee(() => {
|
|
6726
|
+
s(t);
|
|
6743
6727
|
}, [t]);
|
|
6744
6728
|
return {
|
|
6745
|
-
search:
|
|
6746
|
-
debouncedSearch:
|
|
6747
|
-
onSearchChange:
|
|
6748
|
-
reset:
|
|
6729
|
+
search: o,
|
|
6730
|
+
debouncedSearch: c,
|
|
6731
|
+
onSearchChange: u,
|
|
6732
|
+
reset: h,
|
|
6733
|
+
len: r
|
|
6749
6734
|
};
|
|
6750
6735
|
}
|
|
6751
6736
|
function zu(e, t = 300) {
|
|
6752
6737
|
const [n, r] = B(e);
|
|
6753
|
-
return
|
|
6738
|
+
return V(() => {
|
|
6754
6739
|
const o = setTimeout(() => {
|
|
6755
6740
|
r(e);
|
|
6756
6741
|
}, t);
|
|
@@ -6759,15 +6744,15 @@ function zu(e, t = 300) {
|
|
|
6759
6744
|
}
|
|
6760
6745
|
export {
|
|
6761
6746
|
Qe as ACTIONS_COLUMN_ID,
|
|
6762
|
-
|
|
6763
|
-
|
|
6747
|
+
Vu as DataTable,
|
|
6748
|
+
Yu as Filters,
|
|
6764
6749
|
Ir as HttpOptionsApi,
|
|
6765
6750
|
Uu as MDSButton,
|
|
6766
6751
|
yl as MDSCheckbox,
|
|
6767
6752
|
Ol as MDSCombobox,
|
|
6768
6753
|
Gu as MDSConfirmActionDialog,
|
|
6769
6754
|
qu as MDSConfirmDeleteDialog,
|
|
6770
|
-
|
|
6755
|
+
Vl as MDSDatePicker,
|
|
6771
6756
|
kl as MDSDateRangePicker,
|
|
6772
6757
|
Xu as MDSDialogAction,
|
|
6773
6758
|
Qc as MDSDialogActions,
|