@snowpact/react-tanstack-query-table 1.9.0 → 1.10.0
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.cjs.map +1 -1
- package/dist/index.js +170 -170
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as D, jsx as f, Fragment as Xt } from "react/jsx-runtime";
|
|
2
|
-
import { useMutation as As, useQuery as Zo, keepPreviousData as
|
|
2
|
+
import { useMutation as As, useQuery as Zo, keepPreviousData as Ps } from "@tanstack/react-query";
|
|
3
3
|
import * as d from "react";
|
|
4
|
-
import Ke, { useState as ce, useEffect as mt, useRef as In, useCallback as Se, useMemo as fe, forwardRef as qo, useLayoutEffect as
|
|
4
|
+
import Ke, { useState as ce, useEffect as mt, useRef as In, useCallback as Se, useMemo as fe, forwardRef as qo, useLayoutEffect as Ts, memo as Is } from "react";
|
|
5
5
|
import * as Zt from "react-dom";
|
|
6
6
|
import Ms, { createPortal as Ns } from "react-dom";
|
|
7
7
|
import { useReactTable as _s, getFilteredRowModel as Os, getPaginationRowModel as Ds, getSortedRowModel as ks, getCoreRowModel as Fs, flexRender as wo } from "@tanstack/react-table";
|
|
@@ -116,11 +116,11 @@ const Zs = (e) => typeof e == "string" || typeof e == "number" || typeof e == "b
|
|
|
116
116
|
return { pageIndex: 0, pageSize: n };
|
|
117
117
|
}), m = Se((x) => {
|
|
118
118
|
w((I) => {
|
|
119
|
-
const
|
|
120
|
-
return i.current && (I.pageIndex !==
|
|
119
|
+
const T = typeof x == "function" ? x(I) : x;
|
|
120
|
+
return i.current && (I.pageIndex !== T.pageIndex || I.pageSize !== T.pageSize) && (se(kt, T.pageIndex > 0 ? String(T.pageIndex + 1) : null), se(
|
|
121
121
|
Mn,
|
|
122
|
-
|
|
123
|
-
)),
|
|
122
|
+
T.pageSize !== a.current ? String(T.pageSize) : null
|
|
123
|
+
)), T;
|
|
124
124
|
});
|
|
125
125
|
}, []), [v, b] = ce(() => {
|
|
126
126
|
if (e) {
|
|
@@ -131,8 +131,8 @@ const Zs = (e) => typeof e == "string" || typeof e == "number" || typeof e == "b
|
|
|
131
131
|
return {};
|
|
132
132
|
}), C = Se((x) => {
|
|
133
133
|
if (b(x), i.current) {
|
|
134
|
-
const
|
|
135
|
-
se(Ft,
|
|
134
|
+
const T = Object.keys(x).length > 0 ? tr(x) : null;
|
|
135
|
+
se(Ft, T);
|
|
136
136
|
}
|
|
137
137
|
}, []), [y, S] = ce(() => {
|
|
138
138
|
if (e) {
|
|
@@ -143,10 +143,10 @@ const Zs = (e) => typeof e == "string" || typeof e == "number" || typeof e == "b
|
|
|
143
143
|
return o ? [{ id: o, desc: r === "desc" }] : [];
|
|
144
144
|
}), R = Se((x) => {
|
|
145
145
|
S((I) => {
|
|
146
|
-
const
|
|
147
|
-
return i.current && (
|
|
146
|
+
const T = typeof x == "function" ? x(I) : x;
|
|
147
|
+
return i.current && (T.length > 0 ? (se(dt, T[0].id), se(ft, String(T[0].desc))) : (se(dt, null), se(ft, null))), T;
|
|
148
148
|
});
|
|
149
|
-
}, []),
|
|
149
|
+
}, []), P = fe(() => {
|
|
150
150
|
const x = o ? [{ id: o, desc: r === "desc" }] : [];
|
|
151
151
|
return l !== "" || s !== t || Object.keys(v).length > 0 || y.length !== x.length || y.length > 0 && x.length > 0 && (y[0].id !== x[0].id || y[0].desc !== x[0].desc);
|
|
152
152
|
}, [l, s, t, v, y, o, r]), E = Se(() => {
|
|
@@ -164,7 +164,7 @@ const Zs = (e) => typeof e == "string" || typeof e == "number" || typeof e == "b
|
|
|
164
164
|
sorting: y,
|
|
165
165
|
setSorting: R,
|
|
166
166
|
resetToDefaults: E,
|
|
167
|
-
hasActiveFilters:
|
|
167
|
+
hasActiveFilters: P
|
|
168
168
|
};
|
|
169
169
|
}, tr = (e) => {
|
|
170
170
|
const t = [];
|
|
@@ -780,7 +780,7 @@ const aa = (e, t, n, o) => {
|
|
|
780
780
|
console.warn("Failed to generate config ID from parent component:", t);
|
|
781
781
|
}
|
|
782
782
|
return `datatable-${window.location.pathname.replace(/[^a-zA-Z0-9]/g, "-")}`;
|
|
783
|
-
},
|
|
783
|
+
}, Pe = qo(
|
|
784
784
|
({
|
|
785
785
|
children: e,
|
|
786
786
|
onClick: t,
|
|
@@ -807,7 +807,7 @@ const aa = (e, t, n, o) => {
|
|
|
807
807
|
}
|
|
808
808
|
)
|
|
809
809
|
);
|
|
810
|
-
|
|
810
|
+
Pe.displayName = "Button";
|
|
811
811
|
function N(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
812
812
|
return function(r) {
|
|
813
813
|
if (e == null || e(r), n === !1 || !r.defaultPrevented)
|
|
@@ -1028,8 +1028,8 @@ function Kn(e) {
|
|
|
1028
1028
|
u.displayName = s;
|
|
1029
1029
|
const l = e + "CollectionItemSlot", p = "data-radix-collection-item", h = /* @__PURE__ */ vt(l), g = Ke.forwardRef(
|
|
1030
1030
|
(m, v) => {
|
|
1031
|
-
const { scope: b, children: C, ...y } = m, S = Ke.useRef(null), R = J(v, S),
|
|
1032
|
-
return Ke.useEffect(() => (
|
|
1031
|
+
const { scope: b, children: C, ...y } = m, S = Ke.useRef(null), R = J(v, S), P = i(l, b);
|
|
1032
|
+
return Ke.useEffect(() => (P.itemMap.set(S, { ref: S, ...y }), () => void P.itemMap.delete(S))), /* @__PURE__ */ f(h, { [p]: "", ref: R, children: C });
|
|
1033
1033
|
}
|
|
1034
1034
|
);
|
|
1035
1035
|
g.displayName = l;
|
|
@@ -1040,7 +1040,7 @@ function Kn(e) {
|
|
|
1040
1040
|
if (!C) return [];
|
|
1041
1041
|
const y = Array.from(C.querySelectorAll(`[${p}]`));
|
|
1042
1042
|
return Array.from(v.itemMap.values()).sort(
|
|
1043
|
-
(
|
|
1043
|
+
(P, E) => y.indexOf(P.ref.current) - y.indexOf(E.ref.current)
|
|
1044
1044
|
);
|
|
1045
1045
|
}, [v.collectionRef, v.itemMap]);
|
|
1046
1046
|
}
|
|
@@ -1088,11 +1088,11 @@ var Ea = "DismissableLayer", Nn = "dismissableLayer.update", Ra = "dismissableLa
|
|
|
1088
1088
|
onDismiss: s,
|
|
1089
1089
|
...c
|
|
1090
1090
|
} = e, u = d.useContext(sr), [l, p] = d.useState(null), h = (l == null ? void 0 : l.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = d.useState({}), w = J(t, (E) => p(E)), m = Array.from(u.layers), [v] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), b = m.indexOf(v), C = l ? m.indexOf(l) : -1, y = u.layersWithOutsidePointerEventsDisabled.size > 0, S = C >= b, R = Ia((E) => {
|
|
1091
|
-
const x = E.target, I = [...u.branches].some((
|
|
1091
|
+
const x = E.target, I = [...u.branches].some((T) => T.contains(x));
|
|
1092
1092
|
!S || I || (r == null || r(E), a == null || a(E), E.defaultPrevented || s == null || s());
|
|
1093
|
-
}, h),
|
|
1093
|
+
}, h), P = Ma((E) => {
|
|
1094
1094
|
const x = E.target;
|
|
1095
|
-
[...u.branches].some((
|
|
1095
|
+
[...u.branches].some((T) => T.contains(x)) || (i == null || i(E), a == null || a(E), E.defaultPrevented || s == null || s());
|
|
1096
1096
|
}, h);
|
|
1097
1097
|
return xa((E) => {
|
|
1098
1098
|
C === u.layers.size - 1 && (o == null || o(E), !E.defaultPrevented && s && (E.preventDefault(), s()));
|
|
@@ -1115,8 +1115,8 @@ var Ea = "DismissableLayer", Nn = "dismissableLayer.update", Ra = "dismissableLa
|
|
|
1115
1115
|
pointerEvents: y ? S ? "auto" : "none" : void 0,
|
|
1116
1116
|
...e.style
|
|
1117
1117
|
},
|
|
1118
|
-
onFocusCapture: N(e.onFocusCapture,
|
|
1119
|
-
onBlurCapture: N(e.onBlurCapture,
|
|
1118
|
+
onFocusCapture: N(e.onFocusCapture, P.onFocusCapture),
|
|
1119
|
+
onBlurCapture: N(e.onBlurCapture, P.onBlurCapture),
|
|
1120
1120
|
onPointerDownCapture: N(
|
|
1121
1121
|
e.onPointerDownCapture,
|
|
1122
1122
|
R.onPointerDownCapture
|
|
@@ -1126,7 +1126,7 @@ var Ea = "DismissableLayer", Nn = "dismissableLayer.update", Ra = "dismissableLa
|
|
|
1126
1126
|
}
|
|
1127
1127
|
);
|
|
1128
1128
|
Gn.displayName = Ea;
|
|
1129
|
-
var
|
|
1129
|
+
var Pa = "DismissableLayerBranch", Ta = d.forwardRef((e, t) => {
|
|
1130
1130
|
const n = d.useContext(sr), o = d.useRef(null), r = J(t, o);
|
|
1131
1131
|
return d.useEffect(() => {
|
|
1132
1132
|
const i = o.current;
|
|
@@ -1136,7 +1136,7 @@ var Ta = "DismissableLayerBranch", Pa = d.forwardRef((e, t) => {
|
|
|
1136
1136
|
};
|
|
1137
1137
|
}, [n.branches]), /* @__PURE__ */ f(K.div, { ...e, ref: r });
|
|
1138
1138
|
});
|
|
1139
|
-
|
|
1139
|
+
Ta.displayName = Pa;
|
|
1140
1140
|
function Ia(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
1141
1141
|
const n = Me(e), o = d.useRef(!1), r = d.useRef(() => {
|
|
1142
1142
|
});
|
|
@@ -1193,16 +1193,16 @@ var wn = 0;
|
|
|
1193
1193
|
function cr() {
|
|
1194
1194
|
d.useEffect(() => {
|
|
1195
1195
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
1196
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
1196
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Po()), document.body.insertAdjacentElement("beforeend", e[1] ?? Po()), wn++, () => {
|
|
1197
1197
|
wn === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), wn--;
|
|
1198
1198
|
};
|
|
1199
1199
|
}, []);
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function Po() {
|
|
1202
1202
|
const e = document.createElement("span");
|
|
1203
1203
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
1204
1204
|
}
|
|
1205
|
-
var yn = "focusScope.autoFocusOnMount", bn = "focusScope.autoFocusOnUnmount",
|
|
1205
|
+
var yn = "focusScope.autoFocusOnMount", bn = "focusScope.autoFocusOnUnmount", To = { bubbles: !1, cancelable: !0 }, Na = "FocusScope", zn = d.forwardRef((e, t) => {
|
|
1206
1206
|
const {
|
|
1207
1207
|
loop: n = !1,
|
|
1208
1208
|
trapped: o = !1,
|
|
@@ -1244,12 +1244,12 @@ var yn = "focusScope.autoFocusOnMount", bn = "focusScope.autoFocusOnUnmount", Po
|
|
|
1244
1244
|
Mo.add(g);
|
|
1245
1245
|
const m = document.activeElement;
|
|
1246
1246
|
if (!s.contains(m)) {
|
|
1247
|
-
const b = new CustomEvent(yn,
|
|
1247
|
+
const b = new CustomEvent(yn, To);
|
|
1248
1248
|
s.addEventListener(yn, u), s.dispatchEvent(b), b.defaultPrevented || (_a(La(lr(s)), { select: !0 }), document.activeElement === m && Le(s));
|
|
1249
1249
|
}
|
|
1250
1250
|
return () => {
|
|
1251
1251
|
s.removeEventListener(yn, u), setTimeout(() => {
|
|
1252
|
-
const b = new CustomEvent(bn,
|
|
1252
|
+
const b = new CustomEvent(bn, To);
|
|
1253
1253
|
s.addEventListener(bn, l), s.dispatchEvent(b), b.defaultPrevented || Le(m ?? document.body, { select: !0 }), s.removeEventListener(bn, l), Mo.remove(g);
|
|
1254
1254
|
}, 0);
|
|
1255
1255
|
};
|
|
@@ -1339,7 +1339,7 @@ function ze(e) {
|
|
|
1339
1339
|
n((o) => o ?? String(Va++));
|
|
1340
1340
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
1341
1341
|
}
|
|
1342
|
-
const Ba = ["top", "right", "bottom", "left"], $e = Math.min, pe = Math.max, Bt = Math.round,
|
|
1342
|
+
const Ba = ["top", "right", "bottom", "left"], $e = Math.min, pe = Math.max, Bt = Math.round, Pt = Math.floor, Ie = (e) => ({
|
|
1343
1343
|
x: e,
|
|
1344
1344
|
y: e
|
|
1345
1345
|
}), Wa = {
|
|
@@ -1370,11 +1370,11 @@ function Yn(e) {
|
|
|
1370
1370
|
return e === "y" ? "height" : "width";
|
|
1371
1371
|
}
|
|
1372
1372
|
const Ha = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
1373
|
-
function
|
|
1373
|
+
function Te(e) {
|
|
1374
1374
|
return Ha.has(ke(e)) ? "y" : "x";
|
|
1375
1375
|
}
|
|
1376
1376
|
function Xn(e) {
|
|
1377
|
-
return jn(
|
|
1377
|
+
return jn(Te(e));
|
|
1378
1378
|
}
|
|
1379
1379
|
function Ka(e, t, n) {
|
|
1380
1380
|
n === void 0 && (n = !1);
|
|
@@ -1450,7 +1450,7 @@ function Do(e, t, n) {
|
|
|
1450
1450
|
reference: o,
|
|
1451
1451
|
floating: r
|
|
1452
1452
|
} = e;
|
|
1453
|
-
const i =
|
|
1453
|
+
const i = Te(t), a = Xn(t), s = Yn(a), c = ke(t), u = i === "y", l = o.x + o.width / 2 - r.width / 2, p = o.y + o.height / 2 - r.height / 2, h = o[s] / 2 - r[s] / 2;
|
|
1454
1454
|
let g;
|
|
1455
1455
|
switch (c) {
|
|
1456
1456
|
case "top":
|
|
@@ -1620,10 +1620,10 @@ const Ja = (e) => ({
|
|
|
1620
1620
|
const p = ur(l), h = {
|
|
1621
1621
|
x: n,
|
|
1622
1622
|
y: o
|
|
1623
|
-
}, g = Xn(r), w = Yn(g), m = await a.getDimensions(u), v = g === "y", b = v ? "top" : "left", C = v ? "bottom" : "right", y = v ? "clientHeight" : "clientWidth", S = i.reference[w] + i.reference[g] - h[g] - i.floating[w], R = h[g] - i.reference[g],
|
|
1624
|
-
let E =
|
|
1625
|
-
(!E || !await (a.isElement == null ? void 0 : a.isElement(
|
|
1626
|
-
const x = S / 2 - R / 2, I = E / 2 - m[w] / 2 - 1,
|
|
1623
|
+
}, g = Xn(r), w = Yn(g), m = await a.getDimensions(u), v = g === "y", b = v ? "top" : "left", C = v ? "bottom" : "right", y = v ? "clientHeight" : "clientWidth", S = i.reference[w] + i.reference[g] - h[g] - i.floating[w], R = h[g] - i.reference[g], P = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(u));
|
|
1624
|
+
let E = P ? P[y] : 0;
|
|
1625
|
+
(!E || !await (a.isElement == null ? void 0 : a.isElement(P))) && (E = s.floating[y] || i.floating[w]);
|
|
1626
|
+
const x = S / 2 - R / 2, I = E / 2 - m[w] / 2 - 1, T = $e(p[b], I), k = $e(p[C], I), L = T, $ = E - m[w] - k, F = E / 2 - m[w] / 2 + x, B = _n(L, F, $), O = !c.arrow && st(r) != null && F !== B && i.reference[w] / 2 - (F < L ? T : k) - m[w] / 2 < 0, W = O ? F < L ? F - L : F - $ : 0;
|
|
1627
1627
|
return {
|
|
1628
1628
|
[g]: h[g] + W,
|
|
1629
1629
|
data: {
|
|
@@ -1660,40 +1660,40 @@ const Ja = (e) => ({
|
|
|
1660
1660
|
} = De(e, t);
|
|
1661
1661
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
1662
1662
|
return {};
|
|
1663
|
-
const b = ke(r), C =
|
|
1664
|
-
!h &&
|
|
1663
|
+
const b = ke(r), C = Te(s), y = ke(s) === s, S = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), R = h || (y || !m ? [Wt(s)] : Ga(s)), P = w !== "none";
|
|
1664
|
+
!h && P && R.push(...Xa(s, m, w, S));
|
|
1665
1665
|
const E = [s, ...R], x = await wt(t, v), I = [];
|
|
1666
|
-
let
|
|
1666
|
+
let T = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
1667
1667
|
if (l && I.push(x[b]), p) {
|
|
1668
1668
|
const F = Ka(r, a, S);
|
|
1669
1669
|
I.push(x[F[0]], x[F[1]]);
|
|
1670
1670
|
}
|
|
1671
|
-
if (
|
|
1671
|
+
if (T = [...T, {
|
|
1672
1672
|
placement: r,
|
|
1673
1673
|
overflows: I
|
|
1674
1674
|
}], !I.every((F) => F <= 0)) {
|
|
1675
1675
|
var k, L;
|
|
1676
1676
|
const F = (((k = i.flip) == null ? void 0 : k.index) || 0) + 1, B = E[F];
|
|
1677
|
-
if (B && (!(p === "alignment" ? C !==
|
|
1677
|
+
if (B && (!(p === "alignment" ? C !== Te(B) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1678
1678
|
// overflows the main axis.
|
|
1679
|
-
|
|
1679
|
+
T.every((M) => Te(M.placement) === C ? M.overflows[0] > 0 : !0)))
|
|
1680
1680
|
return {
|
|
1681
1681
|
data: {
|
|
1682
1682
|
index: F,
|
|
1683
|
-
overflows:
|
|
1683
|
+
overflows: T
|
|
1684
1684
|
},
|
|
1685
1685
|
reset: {
|
|
1686
1686
|
placement: B
|
|
1687
1687
|
}
|
|
1688
1688
|
};
|
|
1689
|
-
let O = (L =
|
|
1689
|
+
let O = (L = T.filter((W) => W.overflows[0] <= 0).sort((W, M) => W.overflows[1] - M.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
1690
1690
|
if (!O)
|
|
1691
1691
|
switch (g) {
|
|
1692
1692
|
case "bestFit": {
|
|
1693
1693
|
var $;
|
|
1694
|
-
const W = ($ =
|
|
1695
|
-
if (
|
|
1696
|
-
const A =
|
|
1694
|
+
const W = ($ = T.filter((M) => {
|
|
1695
|
+
if (P) {
|
|
1696
|
+
const A = Te(M.placement);
|
|
1697
1697
|
return A === C || // Create a bias to the `y` side axis due to horizontal
|
|
1698
1698
|
// reading directions favoring greater width.
|
|
1699
1699
|
A === "y";
|
|
@@ -1776,7 +1776,7 @@ async function tc(e, t) {
|
|
|
1776
1776
|
placement: n,
|
|
1777
1777
|
platform: o,
|
|
1778
1778
|
elements: r
|
|
1779
|
-
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), a = ke(n), s = st(n), c =
|
|
1779
|
+
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), a = ke(n), s = st(n), c = Te(n) === "y", u = dr.has(a) ? -1 : 1, l = i && c ? -1 : 1, p = De(t, e);
|
|
1780
1780
|
let {
|
|
1781
1781
|
mainAxis: h,
|
|
1782
1782
|
crossAxis: g,
|
|
@@ -1848,7 +1848,7 @@ const nc = function(e) {
|
|
|
1848
1848
|
} = De(e, t), u = {
|
|
1849
1849
|
x: n,
|
|
1850
1850
|
y: o
|
|
1851
|
-
}, l = await wt(t, c), p =
|
|
1851
|
+
}, l = await wt(t, c), p = Te(ke(r)), h = jn(p);
|
|
1852
1852
|
let g = u[h], w = u[p];
|
|
1853
1853
|
if (i) {
|
|
1854
1854
|
const v = h === "y" ? "top" : "left", b = h === "y" ? "bottom" : "right", C = g + l[v], y = g - l[b];
|
|
@@ -1893,7 +1893,7 @@ const nc = function(e) {
|
|
|
1893
1893
|
} = De(e, t), l = {
|
|
1894
1894
|
x: n,
|
|
1895
1895
|
y: o
|
|
1896
|
-
}, p =
|
|
1896
|
+
}, p = Te(r), h = jn(p);
|
|
1897
1897
|
let g = l[h], w = l[p];
|
|
1898
1898
|
const m = De(s, t), v = typeof m == "number" ? {
|
|
1899
1899
|
mainAxis: m,
|
|
@@ -1909,8 +1909,8 @@ const nc = function(e) {
|
|
|
1909
1909
|
}
|
|
1910
1910
|
if (u) {
|
|
1911
1911
|
var b, C;
|
|
1912
|
-
const y = h === "y" ? "width" : "height", S = dr.has(ke(r)), R = i.reference[p] - i.floating[y] + (S && ((b = a.offset) == null ? void 0 : b[p]) || 0) + (S ? 0 : v.crossAxis),
|
|
1913
|
-
w < R ? w = R : w >
|
|
1912
|
+
const y = h === "y" ? "width" : "height", S = dr.has(ke(r)), R = i.reference[p] - i.floating[y] + (S && ((b = a.offset) == null ? void 0 : b[p]) || 0) + (S ? 0 : v.crossAxis), P = i.reference[p] + i.reference[y] + (S ? 0 : ((C = a.offset) == null ? void 0 : C[p]) || 0) - (S ? v.crossAxis : 0);
|
|
1913
|
+
w < R ? w = R : w > P && (w = P);
|
|
1914
1914
|
}
|
|
1915
1915
|
return {
|
|
1916
1916
|
[h]: g,
|
|
@@ -1933,17 +1933,17 @@ const nc = function(e) {
|
|
|
1933
1933
|
apply: c = () => {
|
|
1934
1934
|
},
|
|
1935
1935
|
...u
|
|
1936
|
-
} = De(e, t), l = await wt(t, u), p = ke(r), h = st(r), g =
|
|
1936
|
+
} = De(e, t), l = await wt(t, u), p = ke(r), h = st(r), g = Te(r) === "y", {
|
|
1937
1937
|
width: w,
|
|
1938
1938
|
height: m
|
|
1939
1939
|
} = i.floating;
|
|
1940
1940
|
let v, b;
|
|
1941
1941
|
p === "top" || p === "bottom" ? (v = p, b = h === (await (a.isRTL == null ? void 0 : a.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (b = p, v = h === "end" ? "top" : "bottom");
|
|
1942
|
-
const C = m - l.top - l.bottom, y = w - l.left - l.right, S = $e(m - l[v], C), R = $e(w - l[b], y),
|
|
1942
|
+
const C = m - l.top - l.bottom, y = w - l.left - l.right, S = $e(m - l[v], C), R = $e(w - l[b], y), P = !t.middlewareData.shift;
|
|
1943
1943
|
let E = S, x = R;
|
|
1944
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (x = y), (o = t.middlewareData.shift) != null && o.enabled.y && (E = C),
|
|
1945
|
-
const
|
|
1946
|
-
g ? x = w - 2 * (
|
|
1944
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (x = y), (o = t.middlewareData.shift) != null && o.enabled.y && (E = C), P && !h) {
|
|
1945
|
+
const T = pe(l.left, 0), k = pe(l.right, 0), L = pe(l.top, 0), $ = pe(l.bottom, 0);
|
|
1946
|
+
g ? x = w - 2 * (T !== 0 || k !== 0 ? T + k : pe(l.left, l.right)) : E = m - 2 * (L !== 0 || $ !== 0 ? L + $ : pe(l.top, l.bottom));
|
|
1947
1947
|
}
|
|
1948
1948
|
await c({
|
|
1949
1949
|
...t,
|
|
@@ -2334,7 +2334,7 @@ function wr(e, t) {
|
|
|
2334
2334
|
o = Bo(o, t);
|
|
2335
2335
|
return o && it(o) && Cn(o) && !Zn(o) ? n : o || pc(e) || n;
|
|
2336
2336
|
}
|
|
2337
|
-
const
|
|
2337
|
+
const Pc = async function(e) {
|
|
2338
2338
|
const t = this.getOffsetParent || wr, n = this.getDimensions, o = await n(e.floating);
|
|
2339
2339
|
return {
|
|
2340
2340
|
reference: Ac(e.reference, await t(e.floating), e.strategy),
|
|
@@ -2346,7 +2346,7 @@ const Tc = async function(e) {
|
|
|
2346
2346
|
}
|
|
2347
2347
|
};
|
|
2348
2348
|
};
|
|
2349
|
-
function
|
|
2349
|
+
function Tc(e) {
|
|
2350
2350
|
return Ee(e).direction === "rtl";
|
|
2351
2351
|
}
|
|
2352
2352
|
const Ic = {
|
|
@@ -2354,12 +2354,12 @@ const Ic = {
|
|
|
2354
2354
|
getDocumentElement: _e,
|
|
2355
2355
|
getClippingRect: Ec,
|
|
2356
2356
|
getOffsetParent: wr,
|
|
2357
|
-
getElementRects:
|
|
2357
|
+
getElementRects: Pc,
|
|
2358
2358
|
getClientRects: wc,
|
|
2359
2359
|
getDimensions: Rc,
|
|
2360
2360
|
getScale: ot,
|
|
2361
2361
|
isElement: xe,
|
|
2362
|
-
isRTL:
|
|
2362
|
+
isRTL: Tc
|
|
2363
2363
|
};
|
|
2364
2364
|
function yr(e, t) {
|
|
2365
2365
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
@@ -2381,13 +2381,13 @@ function Mc(e, t) {
|
|
|
2381
2381
|
} = u;
|
|
2382
2382
|
if (s || t(), !h || !g)
|
|
2383
2383
|
return;
|
|
2384
|
-
const w =
|
|
2384
|
+
const w = Pt(p), m = Pt(r.clientWidth - (l + h)), v = Pt(r.clientHeight - (p + g)), b = Pt(l), y = {
|
|
2385
2385
|
rootMargin: -w + "px " + -m + "px " + -v + "px " + -b + "px",
|
|
2386
2386
|
threshold: pe(0, $e(1, c)) || 1
|
|
2387
2387
|
};
|
|
2388
2388
|
let S = !0;
|
|
2389
|
-
function R(
|
|
2390
|
-
const E =
|
|
2389
|
+
function R(P) {
|
|
2390
|
+
const E = P[0].intersectionRatio;
|
|
2391
2391
|
if (E !== c) {
|
|
2392
2392
|
if (!S)
|
|
2393
2393
|
return a();
|
|
@@ -2460,7 +2460,7 @@ const _c = nc, Oc = oc, Dc = Qa, kc = ic, Fc = ec, Wo = Ja, Lc = rc, $c = (e, t,
|
|
|
2460
2460
|
});
|
|
2461
2461
|
};
|
|
2462
2462
|
var Vc = typeof document < "u", Bc = function() {
|
|
2463
|
-
}, Lt = Vc ?
|
|
2463
|
+
}, Lt = Vc ? Ts : Bc;
|
|
2464
2464
|
function Ht(e, t) {
|
|
2465
2465
|
if (e === t)
|
|
2466
2466
|
return !0;
|
|
@@ -2528,18 +2528,18 @@ function Wc(e) {
|
|
|
2528
2528
|
}), [h, g] = d.useState(o);
|
|
2529
2529
|
Ht(h, o) || g(o);
|
|
2530
2530
|
const [w, m] = d.useState(null), [v, b] = d.useState(null), C = d.useCallback((M) => {
|
|
2531
|
-
M !==
|
|
2531
|
+
M !== P.current && (P.current = M, m(M));
|
|
2532
2532
|
}, []), y = d.useCallback((M) => {
|
|
2533
2533
|
M !== E.current && (E.current = M, b(M));
|
|
2534
|
-
}, []), S = i || w, R = a || v,
|
|
2535
|
-
if (!
|
|
2534
|
+
}, []), S = i || w, R = a || v, P = d.useRef(null), E = d.useRef(null), x = d.useRef(l), I = c != null, T = Sn(c), k = Sn(r), L = Sn(u), $ = d.useCallback(() => {
|
|
2535
|
+
if (!P.current || !E.current)
|
|
2536
2536
|
return;
|
|
2537
2537
|
const M = {
|
|
2538
2538
|
placement: t,
|
|
2539
2539
|
strategy: n,
|
|
2540
2540
|
middleware: h
|
|
2541
2541
|
};
|
|
2542
|
-
k.current && (M.platform = k.current), $c(
|
|
2542
|
+
k.current && (M.platform = k.current), $c(P.current, E.current, M).then((A) => {
|
|
2543
2543
|
const Y = {
|
|
2544
2544
|
...A,
|
|
2545
2545
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -2563,14 +2563,14 @@ function Wc(e) {
|
|
|
2563
2563
|
Lt(() => (F.current = !0, () => {
|
|
2564
2564
|
F.current = !1;
|
|
2565
2565
|
}), []), Lt(() => {
|
|
2566
|
-
if (S && (
|
|
2567
|
-
if (
|
|
2568
|
-
return
|
|
2566
|
+
if (S && (P.current = S), R && (E.current = R), S && R) {
|
|
2567
|
+
if (T.current)
|
|
2568
|
+
return T.current(S, R, $);
|
|
2569
2569
|
$();
|
|
2570
2570
|
}
|
|
2571
|
-
}, [S, R, $,
|
|
2571
|
+
}, [S, R, $, T, I]);
|
|
2572
2572
|
const B = d.useMemo(() => ({
|
|
2573
|
-
reference:
|
|
2573
|
+
reference: P,
|
|
2574
2574
|
floating: E,
|
|
2575
2575
|
setReference: C,
|
|
2576
2576
|
setFloating: y
|
|
@@ -2703,7 +2703,7 @@ var Rr = "PopperAnchor", Ar = d.forwardRef(
|
|
|
2703
2703
|
}
|
|
2704
2704
|
);
|
|
2705
2705
|
Ar.displayName = Rr;
|
|
2706
|
-
var eo = "PopperContent", [el, tl] = Sr(eo),
|
|
2706
|
+
var eo = "PopperContent", [el, tl] = Sr(eo), Pr = d.forwardRef(
|
|
2707
2707
|
(e, t) => {
|
|
2708
2708
|
var _, j, G, V, H, z;
|
|
2709
2709
|
const {
|
|
@@ -2721,8 +2721,8 @@ var eo = "PopperContent", [el, tl] = Sr(eo), Tr = d.forwardRef(
|
|
|
2721
2721
|
updatePositionStrategy: g = "optimized",
|
|
2722
2722
|
onPlaced: w,
|
|
2723
2723
|
...m
|
|
2724
|
-
} = e, v = xr(eo, n), [b, C] = d.useState(null), y = J(t, (te) => C(te)), [S, R] = d.useState(null),
|
|
2725
|
-
padding:
|
|
2724
|
+
} = e, v = xr(eo, n), [b, C] = d.useState(null), y = J(t, (te) => C(te)), [S, R] = d.useState(null), P = Jc(S), E = (P == null ? void 0 : P.width) ?? 0, x = (P == null ? void 0 : P.height) ?? 0, I = o + (i !== "center" ? "-" + i : ""), T = typeof l == "number" ? l : { top: 0, right: 0, bottom: 0, left: 0, ...l }, k = Array.isArray(u) ? u : [u], L = k.length > 0, $ = {
|
|
2725
|
+
padding: T,
|
|
2726
2726
|
boundary: k.filter(ol),
|
|
2727
2727
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2728
2728
|
altBoundary: L
|
|
@@ -2817,14 +2817,14 @@ var eo = "PopperContent", [el, tl] = Sr(eo), Tr = d.forwardRef(
|
|
|
2817
2817
|
);
|
|
2818
2818
|
}
|
|
2819
2819
|
);
|
|
2820
|
-
|
|
2821
|
-
var
|
|
2820
|
+
Pr.displayName = eo;
|
|
2821
|
+
var Tr = "PopperArrow", nl = {
|
|
2822
2822
|
top: "bottom",
|
|
2823
2823
|
right: "left",
|
|
2824
2824
|
bottom: "top",
|
|
2825
2825
|
left: "right"
|
|
2826
2826
|
}, Ir = d.forwardRef(function(t, n) {
|
|
2827
|
-
const { __scopePopper: o, ...r } = t, i = tl(
|
|
2827
|
+
const { __scopePopper: o, ...r } = t, i = tl(Tr, o), a = nl[i.placedSide];
|
|
2828
2828
|
return (
|
|
2829
2829
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
2830
2830
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -2868,7 +2868,7 @@ var Pr = "PopperArrow", nl = {
|
|
|
2868
2868
|
)
|
|
2869
2869
|
);
|
|
2870
2870
|
});
|
|
2871
|
-
Ir.displayName =
|
|
2871
|
+
Ir.displayName = Tr;
|
|
2872
2872
|
function ol(e) {
|
|
2873
2873
|
return e !== null;
|
|
2874
2874
|
}
|
|
@@ -2886,7 +2886,7 @@ function Mr(e) {
|
|
|
2886
2886
|
const [t, n = "center"] = e.split("-");
|
|
2887
2887
|
return [t, n];
|
|
2888
2888
|
}
|
|
2889
|
-
var Nr = Er, _r = Ar, Or =
|
|
2889
|
+
var Nr = Er, _r = Ar, Or = Pr, Dr = Ir, il = "Portal", to = d.forwardRef((e, t) => {
|
|
2890
2890
|
var s;
|
|
2891
2891
|
const { container: n, ...o } = e, [r, i] = d.useState(!1);
|
|
2892
2892
|
re(() => i(!0), []);
|
|
@@ -2917,19 +2917,19 @@ function al(e) {
|
|
|
2917
2917
|
}
|
|
2918
2918
|
});
|
|
2919
2919
|
return d.useEffect(() => {
|
|
2920
|
-
const u =
|
|
2920
|
+
const u = Tt(o.current);
|
|
2921
2921
|
i.current = s === "mounted" ? u : "none";
|
|
2922
2922
|
}, [s]), re(() => {
|
|
2923
2923
|
const u = o.current, l = r.current;
|
|
2924
2924
|
if (l !== e) {
|
|
2925
|
-
const h = i.current, g =
|
|
2925
|
+
const h = i.current, g = Tt(u);
|
|
2926
2926
|
e ? c("MOUNT") : g === "none" || (u == null ? void 0 : u.display) === "none" ? c("UNMOUNT") : c(l && h !== g ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
2927
2927
|
}
|
|
2928
2928
|
}, [e, c]), re(() => {
|
|
2929
2929
|
if (t) {
|
|
2930
2930
|
let u;
|
|
2931
2931
|
const l = t.ownerDocument.defaultView ?? window, p = (g) => {
|
|
2932
|
-
const m =
|
|
2932
|
+
const m = Tt(o.current).includes(CSS.escape(g.animationName));
|
|
2933
2933
|
if (g.target === t && m && (c("ANIMATION_END"), !r.current)) {
|
|
2934
2934
|
const v = t.style.animationFillMode;
|
|
2935
2935
|
t.style.animationFillMode = "forwards", u = l.setTimeout(() => {
|
|
@@ -2937,7 +2937,7 @@ function al(e) {
|
|
|
2937
2937
|
});
|
|
2938
2938
|
}
|
|
2939
2939
|
}, h = (g) => {
|
|
2940
|
-
g.target === t && (i.current =
|
|
2940
|
+
g.target === t && (i.current = Tt(o.current));
|
|
2941
2941
|
};
|
|
2942
2942
|
return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
|
|
2943
2943
|
l.clearTimeout(u), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
|
|
@@ -2951,7 +2951,7 @@ function al(e) {
|
|
|
2951
2951
|
}, [])
|
|
2952
2952
|
};
|
|
2953
2953
|
}
|
|
2954
|
-
function
|
|
2954
|
+
function Tt(e) {
|
|
2955
2955
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
2956
2956
|
}
|
|
2957
2957
|
function cl(e) {
|
|
@@ -2983,7 +2983,7 @@ var hl = d.forwardRef((e, t) => {
|
|
|
2983
2983
|
defaultProp: s ?? null,
|
|
2984
2984
|
onChange: c,
|
|
2985
2985
|
caller: xt
|
|
2986
|
-
}), [b, C] = d.useState(!1), y = Me(u), S = kr(n), R = d.useRef(!1), [
|
|
2986
|
+
}), [b, C] = d.useState(!1), y = Me(u), S = kr(n), R = d.useRef(!1), [P, E] = d.useState(0);
|
|
2987
2987
|
return d.useEffect(() => {
|
|
2988
2988
|
const x = h.current;
|
|
2989
2989
|
if (x)
|
|
@@ -3012,7 +3012,7 @@ var hl = d.forwardRef((e, t) => {
|
|
|
3012
3012
|
children: /* @__PURE__ */ f(
|
|
3013
3013
|
K.div,
|
|
3014
3014
|
{
|
|
3015
|
-
tabIndex: b ||
|
|
3015
|
+
tabIndex: b || P === 0 ? -1 : 0,
|
|
3016
3016
|
"data-orientation": o,
|
|
3017
3017
|
...p,
|
|
3018
3018
|
ref: g,
|
|
@@ -3023,8 +3023,8 @@ var hl = d.forwardRef((e, t) => {
|
|
|
3023
3023
|
onFocus: N(e.onFocus, (x) => {
|
|
3024
3024
|
const I = !R.current;
|
|
3025
3025
|
if (x.target === x.currentTarget && I && !b) {
|
|
3026
|
-
const
|
|
3027
|
-
if (x.currentTarget.dispatchEvent(
|
|
3026
|
+
const T = new CustomEvent(xn, ll);
|
|
3027
|
+
if (x.currentTarget.dispatchEvent(T), !T.defaultPrevented) {
|
|
3028
3028
|
const k = S().filter((O) => O.focusable), L = k.find((O) => O.active), $ = k.find((O) => O.id === m), B = [L, $, ...k].filter(
|
|
3029
3029
|
Boolean
|
|
3030
3030
|
).map((O) => O.ref.current);
|
|
@@ -3219,7 +3219,7 @@ function Rl(e, t) {
|
|
|
3219
3219
|
return n.callback = t, n.facade;
|
|
3220
3220
|
}
|
|
3221
3221
|
var Al = typeof window < "u" ? d.useLayoutEffect : d.useEffect, Ho = /* @__PURE__ */ new WeakMap();
|
|
3222
|
-
function
|
|
3222
|
+
function Pl(e, t) {
|
|
3223
3223
|
var n = Rl(null, function(o) {
|
|
3224
3224
|
return e.forEach(function(r) {
|
|
3225
3225
|
return Rn(r, o);
|
|
@@ -3238,11 +3238,11 @@ function Tl(e, t) {
|
|
|
3238
3238
|
Ho.set(n, e);
|
|
3239
3239
|
}, [e]), n;
|
|
3240
3240
|
}
|
|
3241
|
-
function
|
|
3241
|
+
function Tl(e) {
|
|
3242
3242
|
return e;
|
|
3243
3243
|
}
|
|
3244
3244
|
function Il(e, t) {
|
|
3245
|
-
t === void 0 && (t =
|
|
3245
|
+
t === void 0 && (t = Tl);
|
|
3246
3246
|
var n = [], o = !1, r = {
|
|
3247
3247
|
read: function() {
|
|
3248
3248
|
if (o)
|
|
@@ -3320,12 +3320,12 @@ var zr = Ml(), An = function() {
|
|
|
3320
3320
|
onScrollCapture: An,
|
|
3321
3321
|
onWheelCapture: An,
|
|
3322
3322
|
onTouchMoveCapture: An
|
|
3323
|
-
}), r = o[0], i = o[1], a = e.forwardProps, s = e.children, c = e.className, u = e.removeScrollBar, l = e.enabled, p = e.shards, h = e.sideCar, g = e.noRelative, w = e.noIsolation, m = e.inert, v = e.allowPinchZoom, b = e.as, C = b === void 0 ? "div" : b, y = e.gapMode, S = Kr(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = h,
|
|
3323
|
+
}), r = o[0], i = o[1], a = e.forwardProps, s = e.children, c = e.className, u = e.removeScrollBar, l = e.enabled, p = e.shards, h = e.sideCar, g = e.noRelative, w = e.noIsolation, m = e.inert, v = e.allowPinchZoom, b = e.as, C = b === void 0 ? "div" : b, y = e.gapMode, S = Kr(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = h, P = Pl([n, t]), E = Re(Re({}, S), r);
|
|
3324
3324
|
return d.createElement(
|
|
3325
3325
|
d.Fragment,
|
|
3326
3326
|
null,
|
|
3327
3327
|
l && d.createElement(R, { sideCar: zr, removeScrollBar: u, shards: p, noRelative: g, noIsolation: w, inert: m, setCallbacks: i, allowPinchZoom: !!v, lockRef: n, gapMode: y }),
|
|
3328
|
-
a ? d.cloneElement(d.Children.only(s), Re(Re({}, E), { ref:
|
|
3328
|
+
a ? d.cloneElement(d.Children.only(s), Re(Re({}, E), { ref: P })) : d.createElement(C, Re({}, E, { className: c, ref: P }), s)
|
|
3329
3329
|
);
|
|
3330
3330
|
});
|
|
3331
3331
|
sn.defaultProps = {
|
|
@@ -3386,11 +3386,11 @@ var Fl = function() {
|
|
|
3386
3386
|
top: 0,
|
|
3387
3387
|
right: 0,
|
|
3388
3388
|
gap: 0
|
|
3389
|
-
},
|
|
3389
|
+
}, Pn = function(e) {
|
|
3390
3390
|
return parseInt(e || "", 10) || 0;
|
|
3391
3391
|
}, Vl = function(e) {
|
|
3392
3392
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], r = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
3393
|
-
return [
|
|
3393
|
+
return [Pn(n), Pn(o), Pn(r)];
|
|
3394
3394
|
}, Bl = function(e) {
|
|
3395
3395
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
3396
3396
|
return $l;
|
|
@@ -3571,16 +3571,16 @@ function tu(e) {
|
|
|
3571
3571
|
var s = d.useCallback(function(m, v) {
|
|
3572
3572
|
if ("touches" in m && m.touches.length === 2 || m.type === "wheel" && m.ctrlKey)
|
|
3573
3573
|
return !a.current.allowPinchZoom;
|
|
3574
|
-
var b = _t(m), C = n.current, y = "deltaX" in m ? m.deltaX : C[0] - b[0], S = "deltaY" in m ? m.deltaY : C[1] - b[1], R,
|
|
3575
|
-
if ("touches" in m && E === "h" &&
|
|
3574
|
+
var b = _t(m), C = n.current, y = "deltaX" in m ? m.deltaX : C[0] - b[0], S = "deltaY" in m ? m.deltaY : C[1] - b[1], R, P = m.target, E = Math.abs(y) > Math.abs(S) ? "h" : "v";
|
|
3575
|
+
if ("touches" in m && E === "h" && P.type === "range")
|
|
3576
3576
|
return !1;
|
|
3577
|
-
var x = window.getSelection(), I = x && x.anchorNode,
|
|
3578
|
-
if (
|
|
3577
|
+
var x = window.getSelection(), I = x && x.anchorNode, T = I ? I === P || I.contains(P) : !1;
|
|
3578
|
+
if (T)
|
|
3579
3579
|
return !1;
|
|
3580
|
-
var k = Go(E,
|
|
3580
|
+
var k = Go(E, P);
|
|
3581
3581
|
if (!k)
|
|
3582
3582
|
return !0;
|
|
3583
|
-
if (k ? R = E : (R = E === "v" ? "h" : "v", k = Go(E,
|
|
3583
|
+
if (k ? R = E : (R = E === "v" ? "h" : "v", k = Go(E, P)), !k)
|
|
3584
3584
|
return !1;
|
|
3585
3585
|
if (!o.current && "changedTouches" in m && (y || S) && (o.current = R), !R)
|
|
3586
3586
|
return !0;
|
|
@@ -3760,11 +3760,11 @@ var we = "MenuContent", [hu, io] = qe(we), oi = d.forwardRef(
|
|
|
3760
3760
|
onDismiss: g,
|
|
3761
3761
|
disableOutsideScroll: w,
|
|
3762
3762
|
...m
|
|
3763
|
-
} = e, v = Je(we, n), b = Rt(we, n), C = an(n), y = Qr(n), S = cu(n), [R,
|
|
3763
|
+
} = e, v = Je(we, n), b = Rt(we, n), C = an(n), y = Qr(n), S = cu(n), [R, P] = d.useState(null), E = d.useRef(null), x = J(t, E, v.onContentChange), I = d.useRef(0), T = d.useRef(""), k = d.useRef(0), L = d.useRef(null), $ = d.useRef("right"), F = d.useRef(0), B = w ? no : d.Fragment, O = w ? { as: vu, allowPinchZoom: !0 } : void 0, W = (A) => {
|
|
3764
3764
|
var _, j;
|
|
3765
|
-
const Y =
|
|
3765
|
+
const Y = T.current + A, Q = S().filter((G) => !G.disabled), oe = document.activeElement, ye = (_ = Q.find((G) => G.ref.current === oe)) == null ? void 0 : _.textValue, de = Q.map((G) => G.textValue), be = Iu(de, Y, ye), ie = (j = Q.find((G) => G.textValue === be)) == null ? void 0 : j.ref.current;
|
|
3766
3766
|
(function G(V) {
|
|
3767
|
-
|
|
3767
|
+
T.current = V, window.clearTimeout(I.current), V !== "" && (I.current = window.setTimeout(() => G(""), 1e3));
|
|
3768
3768
|
})(Y), ie && setTimeout(() => ie.focus());
|
|
3769
3769
|
};
|
|
3770
3770
|
d.useEffect(() => () => window.clearTimeout(I.current), []), cr();
|
|
@@ -3776,7 +3776,7 @@ var we = "MenuContent", [hu, io] = qe(we), oi = d.forwardRef(
|
|
|
3776
3776
|
hu,
|
|
3777
3777
|
{
|
|
3778
3778
|
scope: n,
|
|
3779
|
-
searchRef:
|
|
3779
|
+
searchRef: T,
|
|
3780
3780
|
onItemEnter: d.useCallback(
|
|
3781
3781
|
(A) => {
|
|
3782
3782
|
M(A) && A.preventDefault();
|
|
@@ -3786,7 +3786,7 @@ var we = "MenuContent", [hu, io] = qe(we), oi = d.forwardRef(
|
|
|
3786
3786
|
onItemLeave: d.useCallback(
|
|
3787
3787
|
(A) => {
|
|
3788
3788
|
var Y;
|
|
3789
|
-
M(A) || ((Y = E.current) == null || Y.focus(),
|
|
3789
|
+
M(A) || ((Y = E.current) == null || Y.focus(), P(null));
|
|
3790
3790
|
},
|
|
3791
3791
|
[M]
|
|
3792
3792
|
),
|
|
@@ -3829,7 +3829,7 @@ var we = "MenuContent", [hu, io] = qe(we), oi = d.forwardRef(
|
|
|
3829
3829
|
orientation: "vertical",
|
|
3830
3830
|
loop: o,
|
|
3831
3831
|
currentTabStopId: R,
|
|
3832
|
-
onCurrentTabStopIdChange:
|
|
3832
|
+
onCurrentTabStopIdChange: P,
|
|
3833
3833
|
onEntryFocus: N(c, (A) => {
|
|
3834
3834
|
b.isUsingKeyboardRef.current || A.preventDefault();
|
|
3835
3835
|
}),
|
|
@@ -3853,10 +3853,10 @@ var we = "MenuContent", [hu, io] = qe(we), oi = d.forwardRef(
|
|
|
3853
3853
|
if (A.target !== de || !iu.includes(A.key)) return;
|
|
3854
3854
|
A.preventDefault();
|
|
3855
3855
|
const ie = S().filter((_) => !_.disabled).map((_) => _.ref.current);
|
|
3856
|
-
qr.includes(A.key) && ie.reverse(),
|
|
3856
|
+
qr.includes(A.key) && ie.reverse(), Pu(ie);
|
|
3857
3857
|
}),
|
|
3858
3858
|
onBlur: N(e.onBlur, (A) => {
|
|
3859
|
-
A.currentTarget.contains(A.target) || (window.clearTimeout(I.current),
|
|
3859
|
+
A.currentTarget.contains(A.target) || (window.clearTimeout(I.current), T.current = "");
|
|
3860
3860
|
}),
|
|
3861
3861
|
onPointerMove: N(
|
|
3862
3862
|
e.onPointerMove,
|
|
@@ -4183,17 +4183,17 @@ function Gt(e) {
|
|
|
4183
4183
|
function lo(e) {
|
|
4184
4184
|
return Gt(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
4185
4185
|
}
|
|
4186
|
-
function
|
|
4186
|
+
function Pu(e) {
|
|
4187
4187
|
const t = document.activeElement;
|
|
4188
4188
|
for (const n of e)
|
|
4189
4189
|
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
4190
4190
|
}
|
|
4191
|
-
function
|
|
4191
|
+
function Tu(e, t) {
|
|
4192
4192
|
return e.map((n, o) => e[(t + o) % e.length]);
|
|
4193
4193
|
}
|
|
4194
4194
|
function Iu(e, t, n) {
|
|
4195
4195
|
const r = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1;
|
|
4196
|
-
let a =
|
|
4196
|
+
let a = Tu(e, Math.max(i, 0));
|
|
4197
4197
|
r.length === 1 && (a = a.filter((u) => u !== n));
|
|
4198
4198
|
const c = a.find(
|
|
4199
4199
|
(u) => u.toLowerCase().startsWith(r.toLowerCase())
|
|
@@ -4329,18 +4329,18 @@ var Ju = "DropdownMenuLabel", Qu = d.forwardRef(
|
|
|
4329
4329
|
}
|
|
4330
4330
|
);
|
|
4331
4331
|
Qu.displayName = Ju;
|
|
4332
|
-
var ed = "DropdownMenuItem",
|
|
4332
|
+
var ed = "DropdownMenuItem", Pi = d.forwardRef(
|
|
4333
4333
|
(e, t) => {
|
|
4334
4334
|
const { __scopeDropdownMenu: n, ...o } = e, r = ue(n);
|
|
4335
4335
|
return /* @__PURE__ */ f($u, { ...r, ...o, ref: t });
|
|
4336
4336
|
}
|
|
4337
4337
|
);
|
|
4338
|
-
|
|
4339
|
-
var td = "DropdownMenuCheckboxItem",
|
|
4338
|
+
Pi.displayName = ed;
|
|
4339
|
+
var td = "DropdownMenuCheckboxItem", Ti = d.forwardRef((e, t) => {
|
|
4340
4340
|
const { __scopeDropdownMenu: n, ...o } = e, r = ue(n);
|
|
4341
4341
|
return /* @__PURE__ */ f(Vu, { ...r, ...o, ref: t });
|
|
4342
4342
|
});
|
|
4343
|
-
|
|
4343
|
+
Ti.displayName = td;
|
|
4344
4344
|
var nd = "DropdownMenuRadioGroup", od = d.forwardRef((e, t) => {
|
|
4345
4345
|
const { __scopeDropdownMenu: n, ...o } = e, r = ue(n);
|
|
4346
4346
|
return /* @__PURE__ */ f(Bu, { ...r, ...o, ref: t });
|
|
@@ -4393,7 +4393,7 @@ var fd = "DropdownMenuSubContent", pd = d.forwardRef((e, t) => {
|
|
|
4393
4393
|
);
|
|
4394
4394
|
});
|
|
4395
4395
|
pd.displayName = fd;
|
|
4396
|
-
var hd = Ci, md = xi, gd = Ei, vd = Ai, wd =
|
|
4396
|
+
var hd = Ci, md = xi, gd = Ei, vd = Ai, wd = Pi, yd = Ti, bd = Ii, Cd = Mi;
|
|
4397
4397
|
function Sd({ children: e, modal: t = !1 }) {
|
|
4398
4398
|
return /* @__PURE__ */ f(hd, { modal: t, children: e });
|
|
4399
4399
|
}
|
|
@@ -4437,7 +4437,7 @@ function Ad({ checked: e, onCheckedChange: t, className: n, children: o }) {
|
|
|
4437
4437
|
}
|
|
4438
4438
|
);
|
|
4439
4439
|
}
|
|
4440
|
-
function
|
|
4440
|
+
function Pd() {
|
|
4441
4441
|
return /* @__PURE__ */ f(Cd, { className: "snow-dropdown-separator" });
|
|
4442
4442
|
}
|
|
4443
4443
|
const ne = {
|
|
@@ -4446,7 +4446,7 @@ const ne = {
|
|
|
4446
4446
|
Content: Ed,
|
|
4447
4447
|
Item: Rd,
|
|
4448
4448
|
CheckboxItem: Ad,
|
|
4449
|
-
Separator:
|
|
4449
|
+
Separator: Pd
|
|
4450
4450
|
}, Ni = ({ to: e, children: t, className: n, target: o, rel: r, disabled: i }) => /* @__PURE__ */ f(
|
|
4451
4451
|
"a",
|
|
4452
4452
|
{
|
|
@@ -4460,7 +4460,7 @@ const ne = {
|
|
|
4460
4460
|
}
|
|
4461
4461
|
);
|
|
4462
4462
|
let uo = Ni;
|
|
4463
|
-
const
|
|
4463
|
+
const Td = (e) => {
|
|
4464
4464
|
uo = e;
|
|
4465
4465
|
}, Id = () => uo, Md = () => {
|
|
4466
4466
|
uo = Ni;
|
|
@@ -4498,7 +4498,7 @@ const Dd = (e) => {
|
|
|
4498
4498
|
};
|
|
4499
4499
|
let jt = !1;
|
|
4500
4500
|
const op = (e) => {
|
|
4501
|
-
jt || (kd(e.translate), e.translations && Ld(e.translations), e.styles && Nd(e.styles),
|
|
4501
|
+
jt || (kd(e.translate), e.translations && Ld(e.translations), e.styles && Nd(e.styles), Td(e.LinkComponent), jt = !0);
|
|
4502
4502
|
}, rp = () => {
|
|
4503
4503
|
jt = !1, Fd(), Md(), Od();
|
|
4504
4504
|
}, ip = () => jt;
|
|
@@ -4541,7 +4541,7 @@ function $d({ table: e }) {
|
|
|
4541
4541
|
}), xo(n.current, s);
|
|
4542
4542
|
};
|
|
4543
4543
|
return /* @__PURE__ */ D(ne.Root, { children: [
|
|
4544
|
-
/* @__PURE__ */ f(ne.Trigger, { asChild: !0, children: /* @__PURE__ */ f(
|
|
4544
|
+
/* @__PURE__ */ f(ne.Trigger, { asChild: !0, children: /* @__PURE__ */ f(Pe, { children: /* @__PURE__ */ f(yo, { className: "snow-size-4" }) }) }),
|
|
4545
4545
|
/* @__PURE__ */ D(ne.Content, { align: "end", className: "snow-w-56", children: [
|
|
4546
4546
|
/* @__PURE__ */ D("div", { className: "snow-flex snow-items-center snow-gap-2 snow-px-2 snow-py-1\\\\.5 snow-text-sm snow-font-semibold", children: [
|
|
4547
4547
|
/* @__PURE__ */ f(yo, { className: "snow-size-4" }),
|
|
@@ -4618,12 +4618,12 @@ var Hd = [" ", "Enter", "ArrowUp", "ArrowDown"], Kd = [" ", "Enter"], Ye = "Sele
|
|
|
4618
4618
|
disabled: h,
|
|
4619
4619
|
required: g,
|
|
4620
4620
|
form: w
|
|
4621
|
-
} = e, m = fn(t), [v, b] = d.useState(null), [C, y] = d.useState(null), [S, R] = d.useState(!1),
|
|
4621
|
+
} = e, m = fn(t), [v, b] = d.useState(null), [C, y] = d.useState(null), [S, R] = d.useState(!1), P = Jt(u), [E, x] = gt({
|
|
4622
4622
|
prop: o,
|
|
4623
4623
|
defaultProp: r ?? !1,
|
|
4624
4624
|
onChange: i,
|
|
4625
4625
|
caller: Ye
|
|
4626
|
-
}), [I,
|
|
4626
|
+
}), [I, T] = gt({
|
|
4627
4627
|
prop: a,
|
|
4628
4628
|
defaultProp: s,
|
|
4629
4629
|
onChange: c,
|
|
@@ -4642,10 +4642,10 @@ var Hd = [" ", "Enter", "ArrowUp", "ArrowDown"], Kd = [" ", "Enter"], Ye = "Sele
|
|
|
4642
4642
|
onValueNodeHasChildrenChange: R,
|
|
4643
4643
|
contentId: ze(),
|
|
4644
4644
|
value: I,
|
|
4645
|
-
onValueChange:
|
|
4645
|
+
onValueChange: T,
|
|
4646
4646
|
open: E,
|
|
4647
4647
|
onOpenChange: x,
|
|
4648
|
-
dir:
|
|
4648
|
+
dir: P,
|
|
4649
4649
|
triggerPointerDownPosRef: k,
|
|
4650
4650
|
disabled: h,
|
|
4651
4651
|
children: [
|
|
@@ -4674,7 +4674,7 @@ var Hd = [" ", "Enter", "ArrowUp", "ArrowDown"], Kd = [" ", "Enter"], Ye = "Sele
|
|
|
4674
4674
|
name: l,
|
|
4675
4675
|
autoComplete: p,
|
|
4676
4676
|
value: I,
|
|
4677
|
-
onChange: (O) =>
|
|
4677
|
+
onChange: (O) => T(O.target.value),
|
|
4678
4678
|
disabled: h,
|
|
4679
4679
|
form: w,
|
|
4680
4680
|
children: [
|
|
@@ -4797,7 +4797,7 @@ var Ce = 10, [Ui, We] = ut(Xe), qd = "SelectContentImpl", Jd = /* @__PURE__ */ v
|
|
|
4797
4797
|
avoidCollisions: v,
|
|
4798
4798
|
//
|
|
4799
4799
|
...b
|
|
4800
|
-
} = e, C = Be(Xe, n), [y, S] = d.useState(null), [R,
|
|
4800
|
+
} = e, C = Be(Xe, n), [y, S] = d.useState(null), [R, P] = d.useState(null), E = J(t, (_) => S(_)), [x, I] = d.useState(null), [T, k] = d.useState(
|
|
4801
4801
|
null
|
|
4802
4802
|
), L = dn(n), [$, F] = d.useState(!1), B = d.useRef(!1);
|
|
4803
4803
|
d.useEffect(() => {
|
|
@@ -4873,13 +4873,13 @@ var Ce = 10, [Ui, We] = ut(Xe), qd = "SelectContentImpl", Jd = /* @__PURE__ */ v
|
|
|
4873
4873
|
scope: n,
|
|
4874
4874
|
content: y,
|
|
4875
4875
|
viewport: R,
|
|
4876
|
-
onViewportChange:
|
|
4876
|
+
onViewportChange: P,
|
|
4877
4877
|
itemRefCallback: oe,
|
|
4878
4878
|
selectedItem: x,
|
|
4879
4879
|
onItemLeave: ye,
|
|
4880
4880
|
itemTextRefCallback: de,
|
|
4881
4881
|
focusSelectedItem: W,
|
|
4882
|
-
selectedItemText:
|
|
4882
|
+
selectedItemText: T,
|
|
4883
4883
|
position: o,
|
|
4884
4884
|
isPositioned: $,
|
|
4885
4885
|
searchRef: Y,
|
|
@@ -4949,9 +4949,9 @@ Hi.displayName = qd;
|
|
|
4949
4949
|
var Qd = "SelectItemAlignedPosition", Ki = d.forwardRef((e, t) => {
|
|
4950
4950
|
const { __scopeSelect: n, onPlaced: o, ...r } = e, i = Be(Xe, n), a = We(Xe, n), [s, c] = d.useState(null), [u, l] = d.useState(null), p = J(t, (E) => l(E)), h = dn(n), g = d.useRef(!1), w = d.useRef(!0), { viewport: m, selectedItem: v, selectedItemText: b, focusSelectedItem: C } = a, y = d.useCallback(() => {
|
|
4951
4951
|
if (i.trigger && i.valueNode && s && u && m && v && b) {
|
|
4952
|
-
const E = i.trigger.getBoundingClientRect(), x = u.getBoundingClientRect(), I = i.valueNode.getBoundingClientRect(),
|
|
4952
|
+
const E = i.trigger.getBoundingClientRect(), x = u.getBoundingClientRect(), I = i.valueNode.getBoundingClientRect(), T = b.getBoundingClientRect();
|
|
4953
4953
|
if (i.dir !== "rtl") {
|
|
4954
|
-
const H =
|
|
4954
|
+
const H = T.left - x.left, z = I.left - H, te = E.left - z, me = E.width + te, Fe = Math.max(me, x.width), Ue = window.innerWidth - Ce, He = Xo(z, [
|
|
4955
4955
|
Ce,
|
|
4956
4956
|
// Prevents the content from going off the starting edge of the
|
|
4957
4957
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -4962,7 +4962,7 @@ var Qd = "SelectItemAlignedPosition", Ki = d.forwardRef((e, t) => {
|
|
|
4962
4962
|
]);
|
|
4963
4963
|
s.style.minWidth = me + "px", s.style.left = He + "px";
|
|
4964
4964
|
} else {
|
|
4965
|
-
const H = x.right -
|
|
4965
|
+
const H = x.right - T.right, z = window.innerWidth - I.right - H, te = window.innerWidth - E.right - z, me = E.width + te, Fe = Math.max(me, x.width), Ue = window.innerWidth - Ce, He = Xo(z, [
|
|
4966
4966
|
Ce,
|
|
4967
4967
|
Math.max(Ce, Ue - Fe)
|
|
4968
4968
|
]);
|
|
@@ -5007,7 +5007,7 @@ var Qd = "SelectItemAlignedPosition", Ki = d.forwardRef((e, t) => {
|
|
|
5007
5007
|
re(() => {
|
|
5008
5008
|
u && R(window.getComputedStyle(u).zIndex);
|
|
5009
5009
|
}, [u]);
|
|
5010
|
-
const
|
|
5010
|
+
const P = d.useCallback(
|
|
5011
5011
|
(E) => {
|
|
5012
5012
|
E && w.current === !0 && (y(), C == null || C(), w.current = !1);
|
|
5013
5013
|
},
|
|
@@ -5019,7 +5019,7 @@ var Qd = "SelectItemAlignedPosition", Ki = d.forwardRef((e, t) => {
|
|
|
5019
5019
|
scope: n,
|
|
5020
5020
|
contentWrapper: s,
|
|
5021
5021
|
shouldExpandOnScrollRef: g,
|
|
5022
|
-
onScrollButtonChange:
|
|
5022
|
+
onScrollButtonChange: P,
|
|
5023
5023
|
children: /* @__PURE__ */ f(
|
|
5024
5024
|
"div",
|
|
5025
5025
|
{
|
|
@@ -5413,10 +5413,10 @@ function Af({ className: e, children: t }) {
|
|
|
5413
5413
|
/* @__PURE__ */ f(wf, { asChild: !0, children: /* @__PURE__ */ f(Ys, { className: "snow-select-icon" }) })
|
|
5414
5414
|
] });
|
|
5415
5415
|
}
|
|
5416
|
-
function
|
|
5416
|
+
function Pf({ placeholder: e }) {
|
|
5417
5417
|
return /* @__PURE__ */ f(vf, { placeholder: e });
|
|
5418
5418
|
}
|
|
5419
|
-
function
|
|
5419
|
+
function Tf({ children: e }) {
|
|
5420
5420
|
return /* @__PURE__ */ f(yf, { children: /* @__PURE__ */ f(
|
|
5421
5421
|
bf,
|
|
5422
5422
|
{
|
|
@@ -5436,14 +5436,14 @@ function If({ value: e, children: t }) {
|
|
|
5436
5436
|
const Ae = {
|
|
5437
5437
|
Root: Rf,
|
|
5438
5438
|
Trigger: Af,
|
|
5439
|
-
Value:
|
|
5440
|
-
Content:
|
|
5439
|
+
Value: Pf,
|
|
5440
|
+
Content: Tf,
|
|
5441
5441
|
Item: If
|
|
5442
5442
|
}, pn = [25, 50, 100];
|
|
5443
5443
|
function Mf({ table: e, isLoading: t }) {
|
|
5444
5444
|
return /* @__PURE__ */ f("div", { className: "snow-pagination", children: /* @__PURE__ */ D("div", { className: "snow-pagination-controls", children: [
|
|
5445
5445
|
/* @__PURE__ */ f(
|
|
5446
|
-
|
|
5446
|
+
Pe,
|
|
5447
5447
|
{
|
|
5448
5448
|
className: "snow-btn-icon-lg",
|
|
5449
5449
|
onClick: () => e.setPageIndex(0),
|
|
@@ -5452,7 +5452,7 @@ function Mf({ table: e, isLoading: t }) {
|
|
|
5452
5452
|
}
|
|
5453
5453
|
),
|
|
5454
5454
|
/* @__PURE__ */ f(
|
|
5455
|
-
|
|
5455
|
+
Pe,
|
|
5456
5456
|
{
|
|
5457
5457
|
className: "snow-btn-icon-lg",
|
|
5458
5458
|
onClick: () => e.previousPage(),
|
|
@@ -5468,7 +5468,7 @@ function Mf({ table: e, isLoading: t }) {
|
|
|
5468
5468
|
] })
|
|
5469
5469
|
] }),
|
|
5470
5470
|
/* @__PURE__ */ f(
|
|
5471
|
-
|
|
5471
|
+
Pe,
|
|
5472
5472
|
{
|
|
5473
5473
|
className: "snow-btn-icon-lg",
|
|
5474
5474
|
onClick: () => e.nextPage(),
|
|
@@ -5477,7 +5477,7 @@ function Mf({ table: e, isLoading: t }) {
|
|
|
5477
5477
|
}
|
|
5478
5478
|
),
|
|
5479
5479
|
/* @__PURE__ */ f(
|
|
5480
|
-
|
|
5480
|
+
Pe,
|
|
5481
5481
|
{
|
|
5482
5482
|
className: "snow-btn-icon-lg",
|
|
5483
5483
|
onClick: () => e.setPageIndex(e.getPageCount() - 1),
|
|
@@ -5662,7 +5662,7 @@ function Vf({ children: e, className: t }) {
|
|
|
5662
5662
|
function Bf({ value: e, children: t }) {
|
|
5663
5663
|
return /* @__PURE__ */ f(Lf, { value: e, className: "snow-tabs-trigger", children: t });
|
|
5664
5664
|
}
|
|
5665
|
-
const
|
|
5665
|
+
const Tn = {
|
|
5666
5666
|
Root: $f,
|
|
5667
5667
|
List: Vf,
|
|
5668
5668
|
Trigger: Bf
|
|
@@ -5673,7 +5673,7 @@ function Wf({ prefilters: e, activePrefilter: t, onPrefilterChange: n }) {
|
|
|
5673
5673
|
return o || e.length > 4 ? /* @__PURE__ */ D(Ae.Root, { value: t, onValueChange: n, children: [
|
|
5674
5674
|
/* @__PURE__ */ f(Ae.Trigger, { className: `snow-w-fit snow-min-w-32 ${a ? "snow-state-active" : ""}`, children: /* @__PURE__ */ f(Ae.Value, { children: (i == null ? void 0 : i.label) || r("dataTable.selectFilter") }) }),
|
|
5675
5675
|
/* @__PURE__ */ f(Ae.Content, { children: e.map((c) => /* @__PURE__ */ f(Ae.Item, { value: c.id, children: c.label }, c.id)) })
|
|
5676
|
-
] }) : /* @__PURE__ */ f(
|
|
5676
|
+
] }) : /* @__PURE__ */ f(Tn.Root, { value: t, onValueChange: n, children: /* @__PURE__ */ f(Tn.List, { className: a ? "snow-state-active" : "", children: e.map((c) => /* @__PURE__ */ f(Tn.Trigger, { value: c.id, children: c.label }, c.id)) }) });
|
|
5677
5677
|
}
|
|
5678
5678
|
const mo = qo(
|
|
5679
5679
|
({ value: e, onChange: t, onKeyDown: n, placeholder: o, className: r, type: i = "text", isActive: a, ...s }, c) => /* @__PURE__ */ f(
|
|
@@ -5743,7 +5743,7 @@ function Kf({
|
|
|
5743
5743
|
if (e.options.length === 0) return null;
|
|
5744
5744
|
const p = () => a === 0 ? e.label : a === 1 ? s[0] : a === 2 ? s.join(", ") : `${s.slice(0, 2).join(", ")} +${a - 2}`;
|
|
5745
5745
|
return /* @__PURE__ */ D(ne.Root, { children: [
|
|
5746
|
-
/* @__PURE__ */ f(ne.Trigger, { asChild: !0, children: /* @__PURE__ */ D(
|
|
5746
|
+
/* @__PURE__ */ f(ne.Trigger, { asChild: !0, children: /* @__PURE__ */ D(Pe, { className: q("snow-filter-btn snow-w-full snow-justify-between", a > 0 && "snow-state-active"), children: [
|
|
5747
5747
|
/* @__PURE__ */ D("div", { className: "snow-filter-btn-content", children: [
|
|
5748
5748
|
e.multipleSelection ? /* @__PURE__ */ f(Ks, { className: q("snow-size-4 snow-shrink-0", a > 0 && "snow-state-active-text") }) : /* @__PURE__ */ f(Hs, { className: q("snow-size-4 snow-shrink-0", a > 0 && "snow-state-active-text") }),
|
|
5749
5749
|
/* @__PURE__ */ f("span", { className: "snow-truncate", children: p() })
|
|
@@ -5817,12 +5817,12 @@ function ps({
|
|
|
5817
5817
|
enableSorting: S = !0,
|
|
5818
5818
|
// Column visibility (external props with internal fallback)
|
|
5819
5819
|
columnVisibility: R,
|
|
5820
|
-
onColumnVisibilityChange:
|
|
5820
|
+
onColumnVisibilityChange: P,
|
|
5821
5821
|
enableColumnConfiguration: E = !1,
|
|
5822
5822
|
// UI options
|
|
5823
5823
|
onRowClick: x,
|
|
5824
5824
|
activeRowId: I,
|
|
5825
|
-
displayTotalNumber:
|
|
5825
|
+
displayTotalNumber: T = !0,
|
|
5826
5826
|
enableElementLabel: k = !0,
|
|
5827
5827
|
enablePagination: L = !0,
|
|
5828
5828
|
paginationSizes: $,
|
|
@@ -5837,7 +5837,7 @@ function ps({
|
|
|
5837
5837
|
const M = lt(), [A, Y] = ce({
|
|
5838
5838
|
pageIndex: 0,
|
|
5839
5839
|
pageSize: pn[0]
|
|
5840
|
-
}), [Q, oe] = ce(""), [ye, de] = ce({}), [be, ie] = ce([]), [_, j] = ce({}), G = i ?? A, V = a ?? Y, H = c ?? Q, z = u ?? oe, te = g ?? ye, me = w ?? de, Fe = C ?? be, Ue = y ?? ie, He = R ?? _, mn =
|
|
5840
|
+
}), [Q, oe] = ce(""), [ye, de] = ce({}), [be, ie] = ce([]), [_, j] = ce({}), G = i ?? A, V = a ?? Y, H = c ?? Q, z = u ?? oe, te = g ?? ye, me = w ?? de, Fe = C ?? be, Ue = y ?? ie, He = R ?? _, mn = P ?? j, Qe = Se(
|
|
5841
5841
|
(U) => {
|
|
5842
5842
|
z(U), V((Z) => ({ ...Z, pageIndex: 0 }));
|
|
5843
5843
|
},
|
|
@@ -5889,7 +5889,7 @@ function ps({
|
|
|
5889
5889
|
}), bs = (U, Z) => {
|
|
5890
5890
|
const X = String(U), ve = { ...te };
|
|
5891
5891
|
Z.length === 0 ? delete ve[X] : ve[X] = Z, me(ve);
|
|
5892
|
-
}, Cs = l ||
|
|
5892
|
+
}, Cs = l || T || h && h.length > 0 || E, Ss = fe(() => ge ? e.length : Oe.getRowModel().rows.length, [ge, e.length, Oe, H, gn]), xs = fe(() => ge && s !== void 0 ? s : Oe.getFilteredRowModel().rows.length, [ge, s, Oe, e.length, H, gn]);
|
|
5893
5893
|
return /* @__PURE__ */ D("div", { className: q("snow-table-container snow-table-root", W), "data-testid": "datatable", children: [
|
|
5894
5894
|
o && !n && /* @__PURE__ */ f("div", { className: "snow-table-loading-overlay" }),
|
|
5895
5895
|
Cs && /* @__PURE__ */ D("div", { className: "snow-table-top-bar", children: [
|
|
@@ -5921,7 +5921,7 @@ function ps({
|
|
|
5921
5921
|
)),
|
|
5922
5922
|
E && /* @__PURE__ */ f($d, { table: Oe }),
|
|
5923
5923
|
(l || m && m.length > 0 || h && h.length > 0) && O && /* @__PURE__ */ f(
|
|
5924
|
-
|
|
5924
|
+
Pe,
|
|
5925
5925
|
{
|
|
5926
5926
|
onClick: O,
|
|
5927
5927
|
title: M("dataTable.resetFilters"),
|
|
@@ -6012,7 +6012,7 @@ function ps({
|
|
|
6012
6012
|
}
|
|
6013
6013
|
),
|
|
6014
6014
|
/* @__PURE__ */ D("div", { className: "snow-table-bottom-bar", children: [
|
|
6015
|
-
|
|
6015
|
+
T && /* @__PURE__ */ D("div", { className: "snow-table-count", "data-testid": "datatable-count", children: [
|
|
6016
6016
|
xs,
|
|
6017
6017
|
" ",
|
|
6018
6018
|
M("dataTable.elements")
|
|
@@ -6062,7 +6062,7 @@ function Yf({ item: e, actions: t, onAction: n }) {
|
|
|
6062
6062
|
},
|
|
6063
6063
|
[r, n, e]
|
|
6064
6064
|
);
|
|
6065
|
-
return /* @__PURE__ */ D("div", { className: "snow-action-cell", children: [
|
|
6065
|
+
return /* @__PURE__ */ D("div", { className: "snow-action-cell", onClick: (c) => c.stopPropagation(), children: [
|
|
6066
6066
|
r.state && /* @__PURE__ */ f(zf, { ...r.state }),
|
|
6067
6067
|
i.map((c, u) => {
|
|
6068
6068
|
const l = typeof c == "function" ? c(e) : c, p = l.icon;
|
|
@@ -6092,7 +6092,7 @@ function Yf({ item: e, actions: t, onAction: n }) {
|
|
|
6092
6092
|
);
|
|
6093
6093
|
}
|
|
6094
6094
|
return /* @__PURE__ */ D(
|
|
6095
|
-
|
|
6095
|
+
Pe,
|
|
6096
6096
|
{
|
|
6097
6097
|
className: q("snow-action-btn", l.showLabel ? "" : "snow-btn-icon", l.className),
|
|
6098
6098
|
onClick: () => s(l),
|
|
@@ -6108,7 +6108,7 @@ function Yf({ item: e, actions: t, onAction: n }) {
|
|
|
6108
6108
|
);
|
|
6109
6109
|
}),
|
|
6110
6110
|
a.length > 0 && /* @__PURE__ */ D(ne.Root, { children: [
|
|
6111
|
-
/* @__PURE__ */ f(ne.Trigger, { asChild: !0, children: /* @__PURE__ */ f(
|
|
6111
|
+
/* @__PURE__ */ f(ne.Trigger, { asChild: !0, children: /* @__PURE__ */ f(Pe, { className: "snow-btn-icon-lg", children: /* @__PURE__ */ f(js, { className: "snow-size-4" }) }) }),
|
|
6112
6112
|
/* @__PURE__ */ f(ne.Content, { align: "end", children: a.map((c, u) => {
|
|
6113
6113
|
const l = typeof c == "function" ? c(e) : c, p = l.icon;
|
|
6114
6114
|
if (l.type === "link") {
|
|
@@ -6234,7 +6234,7 @@ const Xf = Is(Yf), hs = ({
|
|
|
6234
6234
|
setColumnFilters: y,
|
|
6235
6235
|
sorting: S,
|
|
6236
6236
|
setSorting: R,
|
|
6237
|
-
resetToDefaults:
|
|
6237
|
+
resetToDefaults: P
|
|
6238
6238
|
} = er({
|
|
6239
6239
|
enabled: u,
|
|
6240
6240
|
defaultPrefilter: (k = r == null ? void 0 : r[0]) == null ? void 0 : k.id,
|
|
@@ -6244,7 +6244,7 @@ const Xf = Is(Yf), hs = ({
|
|
|
6244
6244
|
}), { data: E = [], isLoading: x } = Zo({
|
|
6245
6245
|
queryKey: e,
|
|
6246
6246
|
queryFn: () => l()
|
|
6247
|
-
}), I = fe(() => !E || !v || !i ? E : E.filter((L) => i(L, v)), [E, v, i]), { columns:
|
|
6247
|
+
}), I = fe(() => !E || !v || !i ? E : E.filter((L) => i(L, v)), [E, v, i]), { columns: T } = hs({
|
|
6248
6248
|
columnConfig: t,
|
|
6249
6249
|
actions: n,
|
|
6250
6250
|
filters: o,
|
|
@@ -6255,7 +6255,7 @@ const Xf = Is(Yf), hs = ({
|
|
|
6255
6255
|
{
|
|
6256
6256
|
mode: "client",
|
|
6257
6257
|
data: I,
|
|
6258
|
-
columns:
|
|
6258
|
+
columns: T,
|
|
6259
6259
|
isLoading: x,
|
|
6260
6260
|
pagination: h,
|
|
6261
6261
|
onPaginationChange: g,
|
|
@@ -6269,7 +6269,7 @@ const Xf = Is(Yf), hs = ({
|
|
|
6269
6269
|
onPrefilterChange: b,
|
|
6270
6270
|
sorting: S,
|
|
6271
6271
|
onSortingChange: R,
|
|
6272
|
-
onResetFilters:
|
|
6272
|
+
onResetFilters: P,
|
|
6273
6273
|
...p
|
|
6274
6274
|
}
|
|
6275
6275
|
);
|
|
@@ -6286,7 +6286,7 @@ const Xf = Is(Yf), hs = ({
|
|
|
6286
6286
|
fetchServerEndpoint: u,
|
|
6287
6287
|
...l
|
|
6288
6288
|
}) => {
|
|
6289
|
-
var x, I,
|
|
6289
|
+
var x, I, T;
|
|
6290
6290
|
const {
|
|
6291
6291
|
pagination: p,
|
|
6292
6292
|
setPagination: h,
|
|
@@ -6305,7 +6305,7 @@ const Xf = Is(Yf), hs = ({
|
|
|
6305
6305
|
defaultPageSize: s,
|
|
6306
6306
|
defaultSortBy: i,
|
|
6307
6307
|
defaultSortOrder: a
|
|
6308
|
-
}),
|
|
6308
|
+
}), P = Zo({
|
|
6309
6309
|
queryKey: [...e, "server", p, g, m, b, y],
|
|
6310
6310
|
queryFn: async () => {
|
|
6311
6311
|
var k, L;
|
|
@@ -6319,7 +6319,7 @@ const Xf = Is(Yf), hs = ({
|
|
|
6319
6319
|
sortOrder: (L = y[0]) != null && L.desc ? "DESC" : "ASC"
|
|
6320
6320
|
});
|
|
6321
6321
|
},
|
|
6322
|
-
placeholderData:
|
|
6322
|
+
placeholderData: Ps
|
|
6323
6323
|
}), { columns: E } = hs({
|
|
6324
6324
|
columnConfig: t,
|
|
6325
6325
|
actions: n,
|
|
@@ -6330,11 +6330,11 @@ const Xf = Is(Yf), hs = ({
|
|
|
6330
6330
|
ps,
|
|
6331
6331
|
{
|
|
6332
6332
|
mode: "server",
|
|
6333
|
-
data: ((I =
|
|
6333
|
+
data: ((I = P.data) == null ? void 0 : I.items) ?? [],
|
|
6334
6334
|
columns: E,
|
|
6335
|
-
isLoading:
|
|
6336
|
-
isFetching:
|
|
6337
|
-
totalCount: ((
|
|
6335
|
+
isLoading: P.isLoading,
|
|
6336
|
+
isFetching: P.isFetching,
|
|
6337
|
+
totalCount: ((T = P.data) == null ? void 0 : T.totalItemCount) ?? 0,
|
|
6338
6338
|
pagination: p,
|
|
6339
6339
|
onPaginationChange: h,
|
|
6340
6340
|
globalFilter: g,
|