chordia-ui 3.3.2 → 3.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/README.md +4 -0
- package/dist/SmallButton.cjs.js +1 -1
- package/dist/SmallButton.cjs.js.map +1 -1
- package/dist/SmallButton.es.js +170 -162
- package/dist/SmallButton.es.js.map +1 -1
- package/dist/components/chat.cjs.js +8 -8
- package/dist/components/chat.cjs.js.map +1 -1
- package/dist/components/chat.es.js +329 -335
- package/dist/components/chat.es.js.map +1 -1
- package/dist/components/data.cjs.js +1 -1
- package/dist/components/data.cjs.js.map +1 -1
- package/dist/components/data.es.js +83 -80
- package/dist/components/data.es.js.map +1 -1
- package/dist/components/layout.cjs.js +1 -1
- package/dist/components/layout.cjs.js.map +1 -1
- package/dist/components/layout.es.js +3 -1
- package/dist/components/layout.es.js.map +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.es2.js +4 -4
- package/dist/index.es2.js.map +1 -1
- package/dist/pages/interactionDetails.cjs.js +2 -2
- package/dist/pages/interactionDetails.cjs.js.map +1 -1
- package/dist/pages/interactionDetails.es.js +117 -123
- package/dist/pages/interactionDetails.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/ChatHistoryPanel.jsx +3 -3
- package/src/components/chat/ChatInterface.jsx +14 -14
- package/src/components/common/MessageThread.jsx +19 -19
- package/src/components/data/DataTable.jsx +18 -15
- package/src/components/layout/SplitPane.jsx +2 -0
- package/src/components/login/LoginPage.jsx +4 -4
- package/src/components/primitives/SmallButton.jsx +14 -6
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as l, jsx as o, Fragment as je } from "react/jsx-runtime";
|
|
2
|
-
import xe, { useState as
|
|
3
|
-
import { u as gt, a as _e, D as
|
|
2
|
+
import xe, { useState as m, useRef as T, useEffect as P, Suspense as ft, useMemo as I, useCallback as de } from "react";
|
|
3
|
+
import { u as gt, a as _e, D as mt, c as ht, S as xt, h as yt, b as bt, s as vt, K as wt, P as St, d as ye, e as kt, C as Ct } from "../sortable.esm.es.js";
|
|
4
4
|
import { CalendarClock as Ae, Download as Dt, ChevronDown as ve, ChevronUp as Ie, Filter as Pe, GripVertical as Re } from "lucide-react";
|
|
5
5
|
import { createPortal as Nt } from "react-dom";
|
|
6
6
|
import { C as Ft, P as zt } from "../CustomFilterChips.es.js";
|
|
7
7
|
function Ot({
|
|
8
8
|
dateRangePicker: g,
|
|
9
9
|
onWeekToDate: d,
|
|
10
|
-
exportConfig:
|
|
10
|
+
exportConfig: y,
|
|
11
11
|
filterChipsConfig: p,
|
|
12
12
|
trailingActions: C
|
|
13
13
|
// Optional extra actions rendered after Export (e.g., Add Users button)
|
|
14
14
|
}) {
|
|
15
|
-
const [R, j] =
|
|
15
|
+
const [R, j] = m(!1), v = T(null), E = T(null);
|
|
16
16
|
P(() => {
|
|
17
17
|
const c = (z) => {
|
|
18
|
-
|
|
18
|
+
E.current && !E.current.contains(z.target) && v.current && !v.current.contains(z.target) && j(!1);
|
|
19
19
|
};
|
|
20
20
|
if (R)
|
|
21
21
|
return document.addEventListener("mousedown", c), () => {
|
|
@@ -25,11 +25,11 @@ function Ot({
|
|
|
25
25
|
const J = () => {
|
|
26
26
|
j((c) => !c);
|
|
27
27
|
}, q = (c) => {
|
|
28
|
-
j(!1),
|
|
28
|
+
j(!1), y != null && y.onExport && y.onExport(c);
|
|
29
29
|
}, S = (() => {
|
|
30
30
|
if (!(p != null && p.filters))
|
|
31
31
|
return !1;
|
|
32
|
-
const c = p.filters, z = p.customFilters || [], O = Object.entries(c).some(([
|
|
32
|
+
const c = p.filters, z = p.customFilters || [], O = Object.entries(c).some(([h, w]) => !!(Array.isArray(w) && w.length || typeof w == "string" && w.trim() !== "" || w && typeof w == "object" && (w.min != null || w.max != null))), G = z.some((h) => h.active);
|
|
33
33
|
return O || G;
|
|
34
34
|
})();
|
|
35
35
|
return /* @__PURE__ */ l("div", { className: "flex items-center gap-3 flex-wrap", children: [
|
|
@@ -55,19 +55,19 @@ function Ot({
|
|
|
55
55
|
children: g
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
|
-
|
|
58
|
+
y && /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
59
59
|
/* @__PURE__ */ l(
|
|
60
60
|
"button",
|
|
61
61
|
{
|
|
62
62
|
ref: v,
|
|
63
63
|
onClick: J,
|
|
64
|
-
disabled:
|
|
64
|
+
disabled: y.isExporting,
|
|
65
65
|
className: "inline-flex items-center justify-between gap-2 rounded-lg border border-gray-300 bg-white/80 px-4 py-2.5 transition-colors hover:bg-white text-sm font-medium text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed min-w-[120px]",
|
|
66
66
|
style: { fontFamily: "var(--font-sans)" },
|
|
67
67
|
children: [
|
|
68
68
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
69
69
|
/* @__PURE__ */ o(Dt, { size: 16 }),
|
|
70
|
-
/* @__PURE__ */ o("span", { children:
|
|
70
|
+
/* @__PURE__ */ o("span", { children: y.isExporting ? "Exporting..." : "Export" })
|
|
71
71
|
] }),
|
|
72
72
|
/* @__PURE__ */ o(ve, { size: 16 })
|
|
73
73
|
]
|
|
@@ -76,9 +76,9 @@ function Ot({
|
|
|
76
76
|
R && /* @__PURE__ */ o(
|
|
77
77
|
"div",
|
|
78
78
|
{
|
|
79
|
-
ref:
|
|
79
|
+
ref: E,
|
|
80
80
|
className: "absolute top-full right-0 mt-2 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50 min-w-[120px]",
|
|
81
|
-
children: (
|
|
81
|
+
children: (y.types || ["csv"]).map((c) => /* @__PURE__ */ l(
|
|
82
82
|
"button",
|
|
83
83
|
{
|
|
84
84
|
onClick: () => q(c),
|
|
@@ -112,17 +112,17 @@ function Ot({
|
|
|
112
112
|
] })
|
|
113
113
|
] });
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function be() {
|
|
116
116
|
return /* @__PURE__ */ o("div", { style: { height: 1, background: "rgba(52,58,64,0.08)" } });
|
|
117
117
|
}
|
|
118
|
-
const Lt = () => ({ userData: { email: "anonymous" } }),
|
|
119
|
-
function
|
|
118
|
+
const Lt = () => ({ userData: { email: "anonymous" } }), Tt = (g) => /* @__PURE__ */ o("img", { ...g });
|
|
119
|
+
function Et({ children: g }) {
|
|
120
120
|
return g;
|
|
121
121
|
}
|
|
122
122
|
function jt({
|
|
123
123
|
data: g = [],
|
|
124
124
|
columns: d = [],
|
|
125
|
-
initialPageSize:
|
|
125
|
+
initialPageSize: y = 10,
|
|
126
126
|
onRowClick: p,
|
|
127
127
|
// Server-side pagination props (optional)
|
|
128
128
|
totalCount: C = null,
|
|
@@ -133,7 +133,7 @@ function jt({
|
|
|
133
133
|
// Controlled pageSize (null = use internal state)
|
|
134
134
|
onPageChange: v = null,
|
|
135
135
|
// Callback for page changes (null = use internal state)
|
|
136
|
-
onPageSizeChange:
|
|
136
|
+
onPageSizeChange: E = null,
|
|
137
137
|
// Callback for pageSize changes (null = use internal state)
|
|
138
138
|
onFilterChange: J = null,
|
|
139
139
|
// Callback for filter changes (null = use client-side filtering)
|
|
@@ -153,8 +153,8 @@ function jt({
|
|
|
153
153
|
// Configuration for filters (dateRangePicker, onWeekToDate, exportConfig, filterChipsConfig)
|
|
154
154
|
}) {
|
|
155
155
|
var Me;
|
|
156
|
-
const { userData: G } = Lt(),
|
|
157
|
-
const n =
|
|
156
|
+
const { userData: G } = Lt(), h = (G == null ? void 0 : G.email) || "anonymous", w = xe.memo(({ children: e, content: t, className: r = "" }) => {
|
|
157
|
+
const n = T(null), [s, a] = m(!1);
|
|
158
158
|
P(() => {
|
|
159
159
|
const u = () => {
|
|
160
160
|
if (n.current) {
|
|
@@ -170,7 +170,7 @@ function jt({
|
|
|
170
170
|
}, [e, t]);
|
|
171
171
|
const i = /* @__PURE__ */ o("span", { className: `truncate block ${r}`, ref: n, children: e });
|
|
172
172
|
return s && t ? /* @__PURE__ */ o(
|
|
173
|
-
|
|
173
|
+
Et,
|
|
174
174
|
{
|
|
175
175
|
content: t,
|
|
176
176
|
styling: "bg-green-2 text-gray-900 px-3 py-2 text-sm rounded-lg shadow-md border border-gray-300 max-w-xs whitespace-normal",
|
|
@@ -181,11 +181,11 @@ function jt({
|
|
|
181
181
|
) : i;
|
|
182
182
|
});
|
|
183
183
|
w.displayName = "TruncatedCell";
|
|
184
|
-
const Z = C !== null && v !== null, ce = J !== null, B = Q !== null, [Be, ue] =
|
|
184
|
+
const Z = C !== null && v !== null, ce = J !== null, B = Q !== null, [Be, ue] = m(1), [We, Ve] = m(y), pe = R !== null ? R : Be, ee = j !== null ? j : We, te = (e) => {
|
|
185
185
|
v ? v(e) : ue(e);
|
|
186
186
|
}, we = (e) => {
|
|
187
|
-
|
|
188
|
-
}, D = 9,
|
|
187
|
+
E ? E(e) : Ve(e);
|
|
188
|
+
}, D = 9, b = "action", $ = T(!1), W = I(() => c ? `dataTable_columns_${c}:${h}` : `dataTable_columns_${d.map((t) => t.id || t.key).sort().join("_")}:${h}`, [c, d, h]), V = I(() => c ? `dataTable_manual_change_${c}:${h}` : null, [c, h]);
|
|
189
189
|
de((e, t) => {
|
|
190
190
|
if (typeof window > "u" || !e || !t || t.length === 0)
|
|
191
191
|
return null;
|
|
@@ -203,22 +203,22 @@ function jt({
|
|
|
203
203
|
}
|
|
204
204
|
return null;
|
|
205
205
|
}, []);
|
|
206
|
-
const [M, He] =
|
|
206
|
+
const [M, He] = m({}), [Se, Ke] = m(null), [ke, Ce] = m("asc");
|
|
207
207
|
de((e, t) => e === "csat_score" && t === "evaluation.csat_score" ? t : e, []);
|
|
208
|
-
const Y = B && S.length > 0 ? S[0][0] : Se, re = B && S.length > 0 ? S[0][1] : ke, [$t, De] =
|
|
208
|
+
const Y = B && S.length > 0 ? S[0][0] : Se, re = B && S.length > 0 ? S[0][1] : ke, [$t, De] = m(
|
|
209
209
|
() => d.map((e) => e.id || e.key)
|
|
210
210
|
), L = de((e) => {
|
|
211
211
|
if (!e || e.length === 0)
|
|
212
212
|
return e;
|
|
213
213
|
let t = Array.from(new Set(e));
|
|
214
214
|
t.length > D && (t = t.slice(0, D));
|
|
215
|
-
const n = d.map((i) => i.id || i.key).includes(
|
|
216
|
-
return !t.includes(
|
|
217
|
-
}, [d]), [f, _] =
|
|
215
|
+
const n = d.map((i) => i.id || i.key).includes(b);
|
|
216
|
+
return !t.includes(b) && n && (t.length >= D ? t = [...t.slice(0, D - 1), b] : t = [...t, b]), [...t.filter((i) => i !== b), b];
|
|
217
|
+
}, [d]), [f, _] = m(() => {
|
|
218
218
|
if (typeof window < "u" && c)
|
|
219
219
|
try {
|
|
220
|
-
if (localStorage.getItem(`dataTable_manual_change_${c}:${
|
|
221
|
-
const n = localStorage.getItem(`dataTable_columns_${c}:${
|
|
220
|
+
if (localStorage.getItem(`dataTable_manual_change_${c}:${h}`) === "true") {
|
|
221
|
+
const n = localStorage.getItem(`dataTable_columns_${c}:${h}`);
|
|
222
222
|
if (n) {
|
|
223
223
|
const s = JSON.parse(n);
|
|
224
224
|
if (Array.isArray(s) && s.length > 0) {
|
|
@@ -236,7 +236,7 @@ function jt({
|
|
|
236
236
|
}
|
|
237
237
|
const t = d.map((r) => r.id || r.key).slice(0, D);
|
|
238
238
|
return L(t);
|
|
239
|
-
}), [k, Ne] =
|
|
239
|
+
}), [k, Ne] = m(!1), [fe, Ue] = m({ top: 0, left: 0, width: 0 }), [Je, Fe] = m(/* @__PURE__ */ new Set()), [ze, Oe] = m(/* @__PURE__ */ new Set()), [N, ge] = m(null), [Ge, ne] = m(null), H = T(null), me = T(null), K = T(null), [Le, Te] = m(null), Ye = T(null), x = (e) => e.id || e.key, Xe = gt(
|
|
240
240
|
_e(St),
|
|
241
241
|
_e(wt, {
|
|
242
242
|
coordinateGetter: vt
|
|
@@ -246,16 +246,16 @@ function jt({
|
|
|
246
246
|
r && t.id !== r.id && ($.current = !0, _((n) => {
|
|
247
247
|
const s = n.indexOf(t.id), a = n.indexOf(r.id);
|
|
248
248
|
if (s !== -1 && a !== -1) {
|
|
249
|
-
const i =
|
|
249
|
+
const i = ye(n, s, a);
|
|
250
250
|
return ie(i), i;
|
|
251
251
|
}
|
|
252
252
|
return n;
|
|
253
253
|
}), De((n) => {
|
|
254
254
|
const s = n.indexOf(t.id), a = n.indexOf(r.id);
|
|
255
|
-
return
|
|
256
|
-
})),
|
|
255
|
+
return ye(n, s, a);
|
|
256
|
+
})), Te(null);
|
|
257
257
|
}, Qe = (e) => {
|
|
258
|
-
|
|
258
|
+
Te(e.active.id);
|
|
259
259
|
}, oe = I(() => ce ? g || [] : !g || g.length === 0 ? [] : g.filter((e) => Object.keys(M).every((t) => {
|
|
260
260
|
const r = M[t];
|
|
261
261
|
if (!r || r.trim() === "")
|
|
@@ -284,7 +284,7 @@ function jt({
|
|
|
284
284
|
}
|
|
285
285
|
}, [g, se, pe, ee, Z]), Ze = (e) => {
|
|
286
286
|
B && Q ? (Q(e), v ? v(1) : ue(1)) : (Se === e ? Ce(ke === "asc" ? "desc" : "asc") : (Ke(e), Ce("asc")), te(1));
|
|
287
|
-
},
|
|
287
|
+
}, Ee = (e, t) => {
|
|
288
288
|
const r = t && t.trim() !== "" ? { ...M, [e]: t } : Object.fromEntries(Object.entries(M).filter(([n]) => n !== e));
|
|
289
289
|
He(r), ce && J && J(r), v ? v(1) : ue(1);
|
|
290
290
|
}, et = (e) => {
|
|
@@ -298,8 +298,8 @@ function jt({
|
|
|
298
298
|
} catch (t) {
|
|
299
299
|
console.warn("Failed to save columns to localStorage:", t);
|
|
300
300
|
}
|
|
301
|
-
}, [W, V]),
|
|
302
|
-
e !==
|
|
301
|
+
}, [W, V]), he = (e) => {
|
|
302
|
+
e !== b && ($.current = !0, _((t) => t.includes(e) ? (K.current && (clearTimeout(K.current), K.current = null), t.length === 1 || (Oe((r) => new Set(r).add(e)), setTimeout(() => {
|
|
303
303
|
_((r) => {
|
|
304
304
|
const n = r.filter((a) => a !== e), s = L(n);
|
|
305
305
|
return ie(s), s;
|
|
@@ -317,7 +317,7 @@ function jt({
|
|
|
317
317
|
});
|
|
318
318
|
}, 200), t)));
|
|
319
319
|
}, tt = (e, t) => {
|
|
320
|
-
f[t] !==
|
|
320
|
+
f[t] !== b && ge(t);
|
|
321
321
|
}, rt = () => {
|
|
322
322
|
ge(null), ne(null);
|
|
323
323
|
}, nt = (e, t) => {
|
|
@@ -325,8 +325,8 @@ function jt({
|
|
|
325
325
|
}, ot = () => {
|
|
326
326
|
ne(null);
|
|
327
327
|
}, st = (e, t) => {
|
|
328
|
-
e.preventDefault(), N !== null && N !== t && f[t] !==
|
|
329
|
-
const n =
|
|
328
|
+
e.preventDefault(), N !== null && N !== t && f[t] !== b && f[N] !== b && ($.current = !0, _((r) => {
|
|
329
|
+
const n = ye(r, N, t), s = L(n);
|
|
330
330
|
return ie(s), s;
|
|
331
331
|
})), ge(null), ne(null);
|
|
332
332
|
};
|
|
@@ -347,8 +347,8 @@ function jt({
|
|
|
347
347
|
if (d.length > 0 && f.length === 0) {
|
|
348
348
|
if (typeof window < "u" && c)
|
|
349
349
|
try {
|
|
350
|
-
if (localStorage.getItem(`dataTable_manual_change_${c}:${
|
|
351
|
-
const r = localStorage.getItem(`dataTable_columns_${c}:${
|
|
350
|
+
if (localStorage.getItem(`dataTable_manual_change_${c}:${h}`) === "true") {
|
|
351
|
+
const r = localStorage.getItem(`dataTable_columns_${c}:${h}`);
|
|
352
352
|
if (r) {
|
|
353
353
|
const n = JSON.parse(r);
|
|
354
354
|
if (Array.isArray(n) && n.length > 0) {
|
|
@@ -368,7 +368,7 @@ function jt({
|
|
|
368
368
|
const e = d.map((t) => t.id || t.key);
|
|
369
369
|
_(L(e.slice(0, D)));
|
|
370
370
|
}
|
|
371
|
-
}, [d, c,
|
|
371
|
+
}, [d, c, h, L]);
|
|
372
372
|
const A = I(() => {
|
|
373
373
|
const e = f.map((t) => d.find((r) => x(r) === t)).filter(Boolean);
|
|
374
374
|
return L(e.map(x)).map((t) => d.find((r) => x(r) === t)).filter(Boolean);
|
|
@@ -392,7 +392,7 @@ function jt({
|
|
|
392
392
|
};
|
|
393
393
|
}, [k]), P(() => {
|
|
394
394
|
const e = (t) => {
|
|
395
|
-
k && H.current && !H.current.contains(t.target) &&
|
|
395
|
+
k && H.current && !H.current.contains(t.target) && me.current && !me.current.contains(t.target) && Ne(!1);
|
|
396
396
|
};
|
|
397
397
|
if (k)
|
|
398
398
|
return document.addEventListener("mousedown", e), () => {
|
|
@@ -401,7 +401,7 @@ function jt({
|
|
|
401
401
|
}, [k]);
|
|
402
402
|
const it = f.length === 1 ? ((Me = d.find((e) => (e.id || e.key) === f[0])) == null ? void 0 : Me.label) || "1 selected" : `${f.length} selected`;
|
|
403
403
|
function lt({ column: e, isHeaderRow: t = !0 }) {
|
|
404
|
-
const r = x(e), n = r ===
|
|
404
|
+
const r = x(e), n = r === b, {
|
|
405
405
|
attributes: s,
|
|
406
406
|
listeners: a,
|
|
407
407
|
setNodeRef: i,
|
|
@@ -439,7 +439,7 @@ function jt({
|
|
|
439
439
|
width: e.width || "auto",
|
|
440
440
|
borderRight: "1px solid rgba(52, 58, 64, 0.06)",
|
|
441
441
|
userSelect: "none",
|
|
442
|
-
background: "
|
|
442
|
+
background: "var(--primary-foreground)",
|
|
443
443
|
borderBottom: "1px solid rgba(52, 58, 64, 0.12)",
|
|
444
444
|
position: "sticky",
|
|
445
445
|
top: 0,
|
|
@@ -483,9 +483,10 @@ function jt({
|
|
|
483
483
|
{
|
|
484
484
|
style: {
|
|
485
485
|
width: e.width || "auto",
|
|
486
|
-
minWidth: e.width || "auto"
|
|
486
|
+
minWidth: e.width || "auto",
|
|
487
|
+
backgroundColor: "var(--primary-foreground)"
|
|
487
488
|
},
|
|
488
|
-
className: "sticky top-[57px] z-10
|
|
489
|
+
className: "sticky top-[57px] z-10 border-b border-[var(--border-strong)] px-4 py-2 text-left",
|
|
489
490
|
children: pt ? /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
490
491
|
/* @__PURE__ */ o(
|
|
491
492
|
Pe,
|
|
@@ -501,12 +502,12 @@ function jt({
|
|
|
501
502
|
placeholder: "Filter...",
|
|
502
503
|
value: M[r] || "",
|
|
503
504
|
onChange: (F) => {
|
|
504
|
-
F.stopPropagation(),
|
|
505
|
+
F.stopPropagation(), Ee(r, F.target.value);
|
|
505
506
|
},
|
|
506
507
|
onKeyDown: (F) => F.stopPropagation(),
|
|
507
508
|
onMouseDown: (F) => F.stopPropagation(),
|
|
508
|
-
className: "w-full pl-7 pr-2 py-1.5 text-xs border border-[var(--border)] rounded
|
|
509
|
-
style: { fontFamily: "var(--font-sans)" },
|
|
509
|
+
className: "w-full pl-7 pr-2 py-1.5 text-xs border border-[var(--border)] rounded text-[var(--text-ink)] placeholder:text-[var(--text-faint)] focus:outline-none focus:border-[var(--border-hover)] focus:ring-1 focus:ring-[var(--focus)] transition-colors",
|
|
510
|
+
style: { fontFamily: "var(--font-sans)", backgroundColor: "var(--primary-foreground)" },
|
|
510
511
|
autoComplete: "off"
|
|
511
512
|
}
|
|
512
513
|
)
|
|
@@ -517,8 +518,8 @@ function jt({
|
|
|
517
518
|
const $e = Le ? d.find((e) => x(e) === Le) : null, dt = k ? /* @__PURE__ */ l(
|
|
518
519
|
"div",
|
|
519
520
|
{
|
|
520
|
-
ref:
|
|
521
|
-
className: "flex flex-col
|
|
521
|
+
ref: me,
|
|
522
|
+
className: "flex flex-col overflow-auto z-[49] min-w-[220px]",
|
|
522
523
|
style: {
|
|
523
524
|
position: "fixed",
|
|
524
525
|
top: `${fe.top}px`,
|
|
@@ -526,6 +527,7 @@ function jt({
|
|
|
526
527
|
width: fe.width || 220,
|
|
527
528
|
maxHeight: "400px",
|
|
528
529
|
fontFamily: "var(--font-sans)",
|
|
530
|
+
backgroundColor: "var(--primary-foreground)",
|
|
529
531
|
borderRadius: "0 0 8px 8px",
|
|
530
532
|
// Rounded corners only on bottom
|
|
531
533
|
boxShadow: "4px 4px 6px 0px #6D70681A, -4px 0px 6px 0px #6D70681A",
|
|
@@ -538,7 +540,7 @@ function jt({
|
|
|
538
540
|
const r = d.find((u) => x(u) === e);
|
|
539
541
|
if (!r)
|
|
540
542
|
return null;
|
|
541
|
-
const n = f.indexOf(e), s = N === n, a = Ge === n, i = e ===
|
|
543
|
+
const n = f.indexOf(e), s = N === n, a = Ge === n, i = e === b;
|
|
542
544
|
return /* @__PURE__ */ l(xe.Fragment, { children: [
|
|
543
545
|
/* @__PURE__ */ l(
|
|
544
546
|
"div",
|
|
@@ -574,7 +576,7 @@ function jt({
|
|
|
574
576
|
{
|
|
575
577
|
type: "button",
|
|
576
578
|
onClick: (u) => {
|
|
577
|
-
u.preventDefault(), u.stopPropagation(), i ||
|
|
579
|
+
u.preventDefault(), u.stopPropagation(), i || he(e);
|
|
578
580
|
},
|
|
579
581
|
className: `h-4 w-4 rounded-[2px] border flex items-center justify-center transition-colors flex-shrink-0 ${i ? "bg-green-2 border-green-2 cursor-default" : ze.has(e) ? "bg-white border-gray-300" : "bg-green-2 border-green-2"}`,
|
|
580
582
|
children: !ze.has(e) && /* @__PURE__ */ o(
|
|
@@ -602,19 +604,19 @@ function jt({
|
|
|
602
604
|
]
|
|
603
605
|
}
|
|
604
606
|
),
|
|
605
|
-
t < f.length - 1 && /* @__PURE__ */ o(
|
|
607
|
+
t < f.length - 1 && /* @__PURE__ */ o(be, {})
|
|
606
608
|
] }, `selected-${e}-${t}`);
|
|
607
609
|
}),
|
|
608
610
|
d.filter((e) => !f.includes(x(e))).map((e, t) => {
|
|
609
611
|
const r = x(e), n = Je.has(r), s = d.filter((a) => !f.includes(x(a))).indexOf(e);
|
|
610
612
|
return /* @__PURE__ */ l(xe.Fragment, { children: [
|
|
611
|
-
f.length > 0 && s === 0 && /* @__PURE__ */ o(
|
|
613
|
+
f.length > 0 && s === 0 && /* @__PURE__ */ o(be, {}),
|
|
612
614
|
/* @__PURE__ */ l(
|
|
613
615
|
"label",
|
|
614
616
|
{
|
|
615
617
|
className: "flex items-center gap-2 px-3 py-2 hover:bg-gray-50 rounded cursor-pointer transition-colors",
|
|
616
618
|
onClick: (a) => {
|
|
617
|
-
a.preventDefault(),
|
|
619
|
+
a.preventDefault(), he(r);
|
|
618
620
|
},
|
|
619
621
|
children: [
|
|
620
622
|
/* @__PURE__ */ o(
|
|
@@ -622,7 +624,7 @@ function jt({
|
|
|
622
624
|
{
|
|
623
625
|
type: "button",
|
|
624
626
|
onClick: (a) => {
|
|
625
|
-
a.preventDefault(), a.stopPropagation(),
|
|
627
|
+
a.preventDefault(), a.stopPropagation(), he(r);
|
|
626
628
|
},
|
|
627
629
|
className: `h-4 w-4 rounded-[2px] border flex items-center justify-center transition-colors flex-shrink-0 ${n ? "bg-green-2 border-green-2" : "bg-white border-gray-300"}`,
|
|
628
630
|
children: n && /* @__PURE__ */ o(
|
|
@@ -650,13 +652,13 @@ function jt({
|
|
|
650
652
|
]
|
|
651
653
|
}
|
|
652
654
|
),
|
|
653
|
-
s < d.filter((a) => !f.includes(x(a))).length - 1 && /* @__PURE__ */ o(
|
|
655
|
+
s < d.filter((a) => !f.includes(x(a))).length - 1 && /* @__PURE__ */ o(be, {})
|
|
654
656
|
] }, `unselected-${r}`);
|
|
655
657
|
})
|
|
656
658
|
]
|
|
657
659
|
}
|
|
658
660
|
) : null;
|
|
659
|
-
return /* @__PURE__ */ l("div", { className: "w-full", style: { top: "130px", position: "sticky", zIndex: 35, backgroundColor: "
|
|
661
|
+
return /* @__PURE__ */ l("div", { className: "w-full", style: { top: "130px", position: "sticky", zIndex: 35, backgroundColor: "var(--primary-foreground)" }, children: [
|
|
660
662
|
d.length > 0 && /* @__PURE__ */ o(
|
|
661
663
|
"div",
|
|
662
664
|
{
|
|
@@ -664,7 +666,7 @@ function jt({
|
|
|
664
666
|
style: {
|
|
665
667
|
position: "sticky",
|
|
666
668
|
zIndex: 35,
|
|
667
|
-
backgroundColor: "
|
|
669
|
+
backgroundColor: "var(--primary-foreground)"
|
|
668
670
|
},
|
|
669
671
|
children: /* @__PURE__ */ l("div", { className: "flex items-center gap-3 flex-wrap", children: [
|
|
670
672
|
/* @__PURE__ */ l("div", { className: "flex-shrink-0", children: [
|
|
@@ -673,10 +675,11 @@ function jt({
|
|
|
673
675
|
"div",
|
|
674
676
|
{
|
|
675
677
|
ref: H,
|
|
676
|
-
className: "inline-flex items-center justify-between gap-2 px-4 py-2.5
|
|
678
|
+
className: "inline-flex items-center justify-between gap-2 px-4 py-2.5 cursor-pointer transition-colors text-sm font-medium text-gray-900 border border-gray-300 min-w-[220px]",
|
|
677
679
|
onClick: () => Ne(!k),
|
|
678
680
|
style: {
|
|
679
681
|
fontFamily: "var(--font-sans)",
|
|
682
|
+
backgroundColor: "var(--primary-foreground)",
|
|
680
683
|
borderRadius: k ? "8px 8px 0 0" : "8px"
|
|
681
684
|
// Rounded top corners when open, all corners when closed
|
|
682
685
|
},
|
|
@@ -705,18 +708,18 @@ function jt({
|
|
|
705
708
|
}
|
|
706
709
|
),
|
|
707
710
|
d.length > 0 && A.length > 0 ? /* @__PURE__ */ l(
|
|
708
|
-
|
|
711
|
+
mt,
|
|
709
712
|
{
|
|
710
713
|
sensors: Xe,
|
|
711
|
-
collisionDetection:
|
|
714
|
+
collisionDetection: ht,
|
|
712
715
|
onDragStart: Qe,
|
|
713
716
|
onDragEnd: qe,
|
|
714
717
|
children: [
|
|
715
718
|
/* @__PURE__ */ l("div", { className: "rounded-t-[14px]", style: {
|
|
716
719
|
border: "1px solid rgba(52, 58, 64, 0.12)",
|
|
717
|
-
borderBottom: "
|
|
720
|
+
borderBottom: "1px solid rgba(52, 58, 64, 0.12)",
|
|
718
721
|
overflow: "hidden",
|
|
719
|
-
background: "
|
|
722
|
+
background: "var(--primary-foreground)",
|
|
720
723
|
position: "relative",
|
|
721
724
|
top: "0.5rem"
|
|
722
725
|
}, children: [
|
|
@@ -743,7 +746,7 @@ function jt({
|
|
|
743
746
|
margin: 0
|
|
744
747
|
}, children: "Loading..." }),
|
|
745
748
|
/* @__PURE__ */ o(
|
|
746
|
-
|
|
749
|
+
Tt,
|
|
747
750
|
{
|
|
748
751
|
src: "/BrandLoading.gif",
|
|
749
752
|
alt: "Loading",
|
|
@@ -765,7 +768,7 @@ function jt({
|
|
|
765
768
|
xt,
|
|
766
769
|
{
|
|
767
770
|
items: f,
|
|
768
|
-
strategy:
|
|
771
|
+
strategy: yt,
|
|
769
772
|
children: A.map((e) => /* @__PURE__ */ o(lt, { column: e, isHeaderRow: !0 }, `header-${x(e)}`))
|
|
770
773
|
}
|
|
771
774
|
) }),
|
|
@@ -776,7 +779,7 @@ function jt({
|
|
|
776
779
|
{
|
|
777
780
|
style: {
|
|
778
781
|
padding: "8px 14px",
|
|
779
|
-
background: "
|
|
782
|
+
background: "var(--primary-foreground)",
|
|
780
783
|
borderBottom: "1px solid rgba(52, 58, 64, 0.10)",
|
|
781
784
|
position: "sticky",
|
|
782
785
|
top: "41px",
|
|
@@ -792,7 +795,7 @@ function jt({
|
|
|
792
795
|
placeholder: "Filter...",
|
|
793
796
|
value: M[t] || "",
|
|
794
797
|
onChange: (n) => {
|
|
795
|
-
n.stopPropagation(),
|
|
798
|
+
n.stopPropagation(), Ee(t, n.target.value);
|
|
796
799
|
},
|
|
797
800
|
onKeyDown: (n) => n.stopPropagation(),
|
|
798
801
|
onMouseDown: (n) => n.stopPropagation(),
|
|
@@ -802,16 +805,16 @@ function jt({
|
|
|
802
805
|
fontSize: "11.5px",
|
|
803
806
|
border: "1px solid rgba(52, 58, 64, 0.16)",
|
|
804
807
|
borderRadius: "6px",
|
|
805
|
-
background: "
|
|
808
|
+
background: "var(--primary-foreground)",
|
|
806
809
|
color: "rgba(30, 33, 37, 0.78)",
|
|
807
810
|
outline: "none",
|
|
808
811
|
fontFamily: "var(--font-sans)"
|
|
809
812
|
},
|
|
810
813
|
onFocus: (n) => {
|
|
811
|
-
n.target.style.borderColor = "rgba(231, 212, 162, 0.65)", n.target.style.background = "
|
|
814
|
+
n.target.style.borderColor = "rgba(231, 212, 162, 0.65)", n.target.style.background = "var(--primary-foreground)";
|
|
812
815
|
},
|
|
813
816
|
onBlur: (n) => {
|
|
814
|
-
n.target.style.borderColor = "rgba(52, 58, 64, 0.16)", n.target.style.background = "
|
|
817
|
+
n.target.style.borderColor = "rgba(52, 58, 64, 0.16)", n.target.style.background = "var(--primary-foreground)";
|
|
815
818
|
},
|
|
816
819
|
autoComplete: "off"
|
|
817
820
|
}
|
|
@@ -891,14 +894,14 @@ function jt({
|
|
|
891
894
|
)) : null })
|
|
892
895
|
] }) })
|
|
893
896
|
] }),
|
|
894
|
-
/* @__PURE__ */ o(
|
|
897
|
+
/* @__PURE__ */ o(bt, { children: $e ? /* @__PURE__ */ o("div", { className: "bg-[var(--paper-high)] border border-[var(--border-strong)] rounded px-4 py-2 shadow-lg", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
895
898
|
/* @__PURE__ */ o(Re, { size: 14, className: "text-[var(--text-faint)]" }),
|
|
896
899
|
/* @__PURE__ */ o("span", { className: "text-sm font-semibold text-[var(--text-ink)]", children: $e.label })
|
|
897
900
|
] }) }) : null })
|
|
898
901
|
]
|
|
899
902
|
}
|
|
900
903
|
) : null,
|
|
901
|
-
(Z ? C > 0 : se.length > 0) && /* @__PURE__ */ o("div", { className: "border-t border-gray-200
|
|
904
|
+
(Z ? C > 0 : se.length > 0) && /* @__PURE__ */ o("div", { className: "border-t border-gray-200 rounded-b-[14px]", style: { backgroundColor: "var(--primary-foreground)" }, children: /* @__PURE__ */ o(
|
|
902
905
|
zt,
|
|
903
906
|
{
|
|
904
907
|
page: pe,
|
|
@@ -907,7 +910,7 @@ function jt({
|
|
|
907
910
|
totalCount: Z ? C : se.length,
|
|
908
911
|
currentDataLength: ae.length,
|
|
909
912
|
onPageChange: te,
|
|
910
|
-
onPageSizeChange:
|
|
913
|
+
onPageSizeChange: E ? (e) => {
|
|
911
914
|
we(e), te(1);
|
|
912
915
|
} : (e) => {
|
|
913
916
|
we(e), te(1);
|
|
@@ -920,7 +923,7 @@ function jt({
|
|
|
920
923
|
function Bt({
|
|
921
924
|
title: g = "Summary stats",
|
|
922
925
|
stats: d = [],
|
|
923
|
-
columns:
|
|
926
|
+
columns: y = 2
|
|
924
927
|
}) {
|
|
925
928
|
return /* @__PURE__ */ l("div", { style: { fontFamily: "system-ui, -apple-system, sans-serif" }, children: [
|
|
926
929
|
/* @__PURE__ */ o(
|
|
@@ -936,7 +939,7 @@ function Bt({
|
|
|
936
939
|
{
|
|
937
940
|
style: {
|
|
938
941
|
display: "grid",
|
|
939
|
-
gridTemplateColumns: `repeat(${
|
|
942
|
+
gridTemplateColumns: `repeat(${y}, minmax(0, 1fr))`,
|
|
940
943
|
gap: "10px"
|
|
941
944
|
},
|
|
942
945
|
children: d.map((p, C) => /* @__PURE__ */ l(
|