chordia-ui 3.9.0 → 3.9.2
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/DataTable2.cjs.js +1 -1
- package/dist/DataTable2.cjs.js.map +1 -1
- package/dist/DataTable2.es.js +611 -604
- package/dist/DataTable2.es.js.map +1 -1
- package/dist/PerformancePanel.cjs.js +1 -1
- package/dist/PerformancePanel.cjs.js.map +1 -1
- package/dist/PerformancePanel.es.js +1068 -816
- package/dist/PerformancePanel.es.js.map +1 -1
- package/dist/SupervisorSelect.cjs.js +2 -0
- package/dist/SupervisorSelect.cjs.js.map +1 -0
- package/dist/SupervisorSelect.es.js +352 -0
- package/dist/SupervisorSelect.es.js.map +1 -0
- package/dist/components/Signals.cjs.js +1 -1
- package/dist/components/Signals.cjs.js.map +1 -1
- package/dist/components/Signals.es.js +273 -318
- package/dist/components/Signals.es.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.cjs.js +3 -3
- package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.es.js +98 -92
- package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
- package/dist/components/performance.cjs.js +1 -1
- package/dist/components/performance.cjs.js.map +1 -1
- package/dist/components/performance.es.js +116 -349
- package/dist/components/performance.es.js.map +1 -1
- package/dist/components/reports.cjs.js +2 -2
- package/dist/components/reports.cjs.js.map +1 -1
- package/dist/components/reports.es.js +122 -141
- package/dist/components/reports.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +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 +130 -124
- package/dist/pages/interactionDetails.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Signals/SignalDetailsPage.jsx +2 -29
- package/src/components/Signals/SignalsListPage.jsx +2 -24
- package/src/components/UpdatedInteractionDetails/UpdatedCoachingSynthesisCard.jsx +8 -1
- package/src/components/data/DataTable2.jsx +19 -5
- package/src/components/pages/interactionDetails/CoachingSynthesisCard.jsx +8 -1
- package/src/components/performance/PerformanceDetailsPage.jsx +230 -75
- package/src/components/performance/PerformancePanel.jsx +42 -45
- package/src/components/performance/index.js +27 -0
- package/src/components/performance/performanceApiMap.js +133 -0
- package/src/components/performance/performanceMetrics.js +63 -0
- package/src/components/performance/performanceRangeFormat.js +92 -0
- package/src/components/performance/performanceSparkline.js +52 -0
- package/src/components/reports/ReportsList.jsx +2 -25
package/dist/DataTable2.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { u as ln, a as zt, D as an, c as cn, S as dn, h as un, b as fn, s as pn, K as mn, P as hn, d as
|
|
4
|
-
import { CalendarClock as Bt, Download as xn, ChevronDown as bn, Settings2 as vn, X as Sn, GripVertical as
|
|
5
|
-
import { createPortal as
|
|
1
|
+
import { jsxs as p, jsx as s, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import rt, { useState as y, useRef as X, useEffect as _, Suspense as on, useMemo as ue, useCallback as O, useLayoutEffect as sn } from "react";
|
|
3
|
+
import { u as ln, a as zt, D as an, c as cn, S as dn, h as un, b as fn, s as pn, K as mn, P as hn, d as ot, e as gn, C as yn } from "./sortable.esm.es.js";
|
|
4
|
+
import { CalendarClock as Bt, Download as xn, ChevronDown as bn, Settings2 as vn, X as Sn, GripVertical as st, Search as wn, Check as Xe, ArrowUp as Fn, ArrowDown as kn, ArrowUpDown as Dn, ListFilter as Cn } from "lucide-react";
|
|
5
|
+
import { createPortal as at } from "react-dom";
|
|
6
6
|
import { C as Rn, P as zn } from "./CustomFilterChips.es.js";
|
|
7
7
|
import "motion/react";
|
|
8
8
|
import "recharts";
|
|
@@ -16,10 +16,10 @@ function Bn({
|
|
|
16
16
|
trailingActions: w
|
|
17
17
|
// Optional extra actions rendered after Export (e.g., Add Users button)
|
|
18
18
|
}) {
|
|
19
|
-
const [b, a] =
|
|
19
|
+
const [b, a] = y(!1), x = X(null), B = X(null);
|
|
20
20
|
_(() => {
|
|
21
|
-
const S = (
|
|
22
|
-
|
|
21
|
+
const S = (D) => {
|
|
22
|
+
B.current && !B.current.contains(D.target) && x.current && !x.current.contains(D.target) && a(!1);
|
|
23
23
|
};
|
|
24
24
|
if (b)
|
|
25
25
|
return document.addEventListener("mousedown", S), () => {
|
|
@@ -28,64 +28,64 @@ function Bn({
|
|
|
28
28
|
}, [b]);
|
|
29
29
|
const F = () => {
|
|
30
30
|
a((S) => !S);
|
|
31
|
-
},
|
|
31
|
+
}, k = (S) => {
|
|
32
32
|
a(!1), c != null && c.onExport && c.onExport(S);
|
|
33
|
-
},
|
|
33
|
+
}, E = (() => {
|
|
34
34
|
if (!(u != null && u.filters))
|
|
35
35
|
return !1;
|
|
36
|
-
const S = u.filters,
|
|
37
|
-
return
|
|
36
|
+
const S = u.filters, D = u.customFilters || [], U = Object.entries(S).some(([R, L]) => !!(Array.isArray(L) && L.length || typeof L == "string" && L.trim() !== "" || L && typeof L == "object" && (L.min != null || L.max != null))), N = D.some((R) => R.active);
|
|
37
|
+
return U || N;
|
|
38
38
|
})();
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
l && /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ p("div", { className: "flex items-center gap-3 flex-wrap", children: [
|
|
40
|
+
l && /* @__PURE__ */ p(
|
|
41
41
|
"button",
|
|
42
42
|
{
|
|
43
43
|
onClick: l,
|
|
44
44
|
className: "inline-flex items-center 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",
|
|
45
45
|
style: { fontFamily: "var(--font-sans)" },
|
|
46
46
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ s(Bt, { size: 16 }),
|
|
48
|
+
/* @__PURE__ */ s("span", { children: "Week to Date" })
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
n && /* @__PURE__ */
|
|
52
|
+
n && /* @__PURE__ */ s(
|
|
53
53
|
on,
|
|
54
54
|
{
|
|
55
|
-
fallback: /* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
55
|
+
fallback: /* @__PURE__ */ p("div", { className: "inline-flex items-center gap-2 rounded-lg border border-gray-300 bg-white/80 px-4 py-2.5 text-sm font-medium text-gray-400", children: [
|
|
56
|
+
/* @__PURE__ */ s(Bt, { size: 16 }),
|
|
57
|
+
/* @__PURE__ */ s("span", { children: "Loading..." })
|
|
58
58
|
] }),
|
|
59
59
|
children: n
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
|
-
c && /* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
62
|
+
c && /* @__PURE__ */ p("div", { className: "relative", children: [
|
|
63
|
+
/* @__PURE__ */ p(
|
|
64
64
|
"button",
|
|
65
65
|
{
|
|
66
|
-
ref:
|
|
66
|
+
ref: x,
|
|
67
67
|
onClick: F,
|
|
68
68
|
disabled: c.isExporting,
|
|
69
69
|
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]",
|
|
70
70
|
style: { fontFamily: "var(--font-sans)" },
|
|
71
71
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-2", children: [
|
|
73
|
+
/* @__PURE__ */ s(xn, { size: 16 }),
|
|
74
|
+
/* @__PURE__ */ s("span", { children: c.isExporting ? "Exporting..." : "Export" })
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ s(bn, { size: 16 })
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
b && /* @__PURE__ */
|
|
80
|
+
b && /* @__PURE__ */ s(
|
|
81
81
|
"div",
|
|
82
82
|
{
|
|
83
|
-
ref:
|
|
83
|
+
ref: B,
|
|
84
84
|
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]",
|
|
85
|
-
children: (c.types || ["csv"]).map((S) => /* @__PURE__ */
|
|
85
|
+
children: (c.types || ["csv"]).map((S) => /* @__PURE__ */ p(
|
|
86
86
|
"button",
|
|
87
87
|
{
|
|
88
|
-
onClick: () =>
|
|
88
|
+
onClick: () => k(S),
|
|
89
89
|
className: "w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",
|
|
90
90
|
style: { fontFamily: "var(--font-sans)" },
|
|
91
91
|
children: [
|
|
@@ -98,10 +98,10 @@ function Bn({
|
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
100
|
] }),
|
|
101
|
-
(
|
|
102
|
-
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
|
|
101
|
+
(E || w) && /* @__PURE__ */ p(ye, { children: [
|
|
102
|
+
E && /* @__PURE__ */ s("div", { className: "h-9 mt-1 w-px bg-gray-300 flex-shrink-0" }),
|
|
103
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-3 justify-end", children: [
|
|
104
|
+
E && u && /* @__PURE__ */ s(
|
|
105
105
|
Rn,
|
|
106
106
|
{
|
|
107
107
|
filters: u.filters,
|
|
@@ -111,12 +111,12 @@ function Bn({
|
|
|
111
111
|
fieldOptions: u.fieldOptions || {}
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
|
-
w && /* @__PURE__ */
|
|
114
|
+
w && /* @__PURE__ */ s("div", { className: "flex-shrink-0", children: w })
|
|
115
115
|
] })
|
|
116
116
|
] })
|
|
117
117
|
] });
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function ct(n) {
|
|
120
120
|
if (n == null)
|
|
121
121
|
return NaN;
|
|
122
122
|
const l = String(n).replace(/[,$%]|pp/gi, "").trim(), c = parseFloat(l);
|
|
@@ -127,12 +127,12 @@ function Mn(n) {
|
|
|
127
127
|
return NaN;
|
|
128
128
|
const l = String(n).trim(), c = l.match(/^(\d+):(\d+)(?::(\d+))?$/);
|
|
129
129
|
if (c) {
|
|
130
|
-
const F = +c[1],
|
|
131
|
-
return
|
|
130
|
+
const F = +c[1], k = +c[2], I = c[3] != null ? +c[3] : null;
|
|
131
|
+
return I != null ? F * 3600 + k * 60 + I : F * 60 + k;
|
|
132
132
|
}
|
|
133
133
|
let u = 0, w = !1;
|
|
134
|
-
const b = l.match(/(\d+)\s*d\b/i), a = l.match(/(\d+)\s*h\b/i),
|
|
135
|
-
return b && (u += +b[1] * 86400, w = !0), a && (u += +a[1] * 3600, w = !0),
|
|
134
|
+
const b = l.match(/(\d+)\s*d\b/i), a = l.match(/(\d+)\s*h\b/i), x = l.match(/(\d+)\s*m(?!s)\b/i), B = l.match(/(\d+)\s*s\b/i);
|
|
135
|
+
return b && (u += +b[1] * 86400, w = !0), a && (u += +a[1] * 3600, w = !0), x && (u += +x[1] * 60, w = !0), B && (u += +B[1], w = !0), w ? u : NaN;
|
|
136
136
|
}
|
|
137
137
|
function En(n) {
|
|
138
138
|
if (!n)
|
|
@@ -151,7 +151,7 @@ function Nn(n) {
|
|
|
151
151
|
const l = n.slice(0, 25), c = (u) => l.every(u);
|
|
152
152
|
return c((u) => /^\d{1,2}\/\d{1,2}\/\d{2,4}$/.test(u) || /^\d{4}-\d{2}-\d{2}/.test(u)) ? "date" : c((u) => /^\d+\s*[dhms]\b/i.test(u) || /^\d+:\d+(:\d+)?$/.test(u)) ? "duration" : c((u) => /^-?[\d,.]+(%|pp)?$/i.test(u)) ? "number" : "text";
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Ee(n) {
|
|
155
155
|
return n ? Array.isArray(n) ? n.length > 0 : n.type === "range" ? n.min !== "" && n.min !== void 0 && n.min !== null || n.max !== "" && n.max !== void 0 && n.max !== null : n.type === "durationRange" ? n.minSec !== "" && n.minSec != null || n.maxSec !== "" && n.maxSec != null : n.type === "scoreRange" ? Array.isArray(n.values) && n.values.length > 0 || n.min !== "" && n.min != null || n.max !== "" && n.max != null : n.type === "dateRange" ? !!(n.from || n.to) : !1 : !1;
|
|
156
156
|
}
|
|
157
157
|
function Mt(n) {
|
|
@@ -181,15 +181,15 @@ function Wn(n) {
|
|
|
181
181
|
}
|
|
182
182
|
return n.type === "dateRange" ? n.from && n.to ? `${n.from} – ${n.to}` : n.from ? `from ${n.from}` : n.to ? `to ${n.to}` : "" : "";
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function An(n) {
|
|
185
185
|
return Array.isArray(n) ? Math.max(0, n.length - 1) : 0;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function $n(n) {
|
|
188
188
|
return Array.isArray(n) ? n.slice(1).map(String).join(", ") : "";
|
|
189
189
|
}
|
|
190
190
|
function In({ count: n, values: l }) {
|
|
191
|
-
const [c, u] =
|
|
192
|
-
return /* @__PURE__ */
|
|
191
|
+
const [c, u] = y(!1);
|
|
192
|
+
return /* @__PURE__ */ p(
|
|
193
193
|
"span",
|
|
194
194
|
{
|
|
195
195
|
onMouseEnter: () => u(!0),
|
|
@@ -213,7 +213,7 @@ function In({ count: n, values: l }) {
|
|
|
213
213
|
children: [
|
|
214
214
|
"+",
|
|
215
215
|
n,
|
|
216
|
-
c && /* @__PURE__ */
|
|
216
|
+
c && /* @__PURE__ */ s(
|
|
217
217
|
"span",
|
|
218
218
|
{
|
|
219
219
|
role: "tooltip",
|
|
@@ -242,7 +242,7 @@ function In({ count: n, values: l }) {
|
|
|
242
242
|
}
|
|
243
243
|
);
|
|
244
244
|
}
|
|
245
|
-
function Ln({ leftLabel: n, rightLabel: l, leftValue: c, rightValue: u, onLeftChange: w, onRightChange: b, type: a = "number", placeholderLeft:
|
|
245
|
+
function Ln({ leftLabel: n, rightLabel: l, leftValue: c, rightValue: u, onLeftChange: w, onRightChange: b, type: a = "number", placeholderLeft: x = "Min", placeholderRight: B = "Max" }) {
|
|
246
246
|
const F = {
|
|
247
247
|
width: "100%",
|
|
248
248
|
height: 32,
|
|
@@ -255,30 +255,30 @@ function Ln({ leftLabel: n, rightLabel: l, leftValue: c, rightValue: u, onLeftCh
|
|
|
255
255
|
color: "#0B0B0B",
|
|
256
256
|
outline: "none",
|
|
257
257
|
boxSizing: "border-box"
|
|
258
|
-
},
|
|
259
|
-
return /* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
/* @__PURE__ */
|
|
258
|
+
}, k = { fontSize: 12, color: "#676767", marginBottom: 4, fontFamily: "var(--font-sans)" };
|
|
259
|
+
return /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
|
|
260
|
+
/* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
261
|
+
/* @__PURE__ */ s("span", { style: k, children: n }),
|
|
262
|
+
/* @__PURE__ */ s(
|
|
263
263
|
"input",
|
|
264
264
|
{
|
|
265
265
|
type: a,
|
|
266
266
|
value: c,
|
|
267
|
-
onChange: (
|
|
268
|
-
placeholder:
|
|
267
|
+
onChange: (I) => w(I.target.value),
|
|
268
|
+
placeholder: x,
|
|
269
269
|
style: F
|
|
270
270
|
}
|
|
271
271
|
)
|
|
272
272
|
] }),
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
274
|
+
/* @__PURE__ */ s("span", { style: k, children: l }),
|
|
275
|
+
/* @__PURE__ */ s(
|
|
276
276
|
"input",
|
|
277
277
|
{
|
|
278
278
|
type: a,
|
|
279
279
|
value: u,
|
|
280
|
-
onChange: (
|
|
281
|
-
placeholder:
|
|
280
|
+
onChange: (I) => b(I.target.value),
|
|
281
|
+
placeholder: B,
|
|
282
282
|
style: F
|
|
283
283
|
}
|
|
284
284
|
)
|
|
@@ -302,8 +302,8 @@ function Nt(n) {
|
|
|
302
302
|
const c = Number(n);
|
|
303
303
|
return Number.isFinite(c) ? c : null;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
return /* @__PURE__ */
|
|
305
|
+
function it({ children: n }) {
|
|
306
|
+
return /* @__PURE__ */ s(
|
|
307
307
|
"div",
|
|
308
308
|
{
|
|
309
309
|
style: {
|
|
@@ -318,7 +318,7 @@ function ot({ children: n }) {
|
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function lt({
|
|
322
322
|
minValue: n,
|
|
323
323
|
maxValue: l,
|
|
324
324
|
onMinChange: c,
|
|
@@ -326,8 +326,8 @@ function st({
|
|
|
326
326
|
inputType: w = "number",
|
|
327
327
|
inputMode: b = "decimal",
|
|
328
328
|
step: a,
|
|
329
|
-
placeholder:
|
|
330
|
-
unit:
|
|
329
|
+
placeholder: x = "0.0",
|
|
330
|
+
unit: B
|
|
331
331
|
}) {
|
|
332
332
|
const F = {
|
|
333
333
|
width: "100%",
|
|
@@ -341,41 +341,41 @@ function st({
|
|
|
341
341
|
outline: "none",
|
|
342
342
|
boxSizing: "border-box"
|
|
343
343
|
};
|
|
344
|
-
return /* @__PURE__ */
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
-
/* @__PURE__ */
|
|
348
|
-
/* @__PURE__ */
|
|
344
|
+
return /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
345
|
+
/* @__PURE__ */ p("div", { style: { display: "flex", alignItems: "flex-end", gap: 8 }, children: [
|
|
346
|
+
/* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 6, flex: 1, minWidth: 0 }, children: [
|
|
347
|
+
/* @__PURE__ */ s("span", { style: { fontSize: 12, color: "#2E3236", fontFamily: "var(--font-sans)" }, children: "Min From" }),
|
|
348
|
+
/* @__PURE__ */ s(
|
|
349
349
|
"input",
|
|
350
350
|
{
|
|
351
351
|
type: w,
|
|
352
352
|
inputMode: b,
|
|
353
353
|
step: a,
|
|
354
|
-
placeholder:
|
|
354
|
+
placeholder: x,
|
|
355
355
|
value: n,
|
|
356
|
-
onChange: (
|
|
356
|
+
onChange: (k) => c(k.target.value),
|
|
357
357
|
style: F
|
|
358
358
|
}
|
|
359
359
|
)
|
|
360
360
|
] }),
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ s("span", { style: { fontSize: 12, fontWeight: 600, color: "#323232", paddingBottom: 8, fontFamily: "var(--font-sans)" }, children: "to" }),
|
|
362
|
+
/* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 6, flex: 1, minWidth: 0 }, children: [
|
|
363
|
+
/* @__PURE__ */ s("span", { style: { fontSize: 12, color: "#2E3236", fontFamily: "var(--font-sans)" }, children: "Max" }),
|
|
364
|
+
/* @__PURE__ */ s(
|
|
365
365
|
"input",
|
|
366
366
|
{
|
|
367
367
|
type: w,
|
|
368
368
|
inputMode: b,
|
|
369
369
|
step: a,
|
|
370
|
-
placeholder:
|
|
370
|
+
placeholder: x,
|
|
371
371
|
value: l,
|
|
372
|
-
onChange: (
|
|
372
|
+
onChange: (k) => u(k.target.value),
|
|
373
373
|
style: F
|
|
374
374
|
}
|
|
375
375
|
)
|
|
376
376
|
] })
|
|
377
377
|
] }),
|
|
378
|
-
|
|
378
|
+
B && /* @__PURE__ */ p(
|
|
379
379
|
"span",
|
|
380
380
|
{
|
|
381
381
|
style: {
|
|
@@ -384,93 +384,96 @@ function st({
|
|
|
384
384
|
fontFamily: "var(--font-sans)"
|
|
385
385
|
},
|
|
386
386
|
children: [
|
|
387
|
-
"
|
|
388
|
-
|
|
387
|
+
"Enter durations in ",
|
|
388
|
+
B === "sec" ? "seconds" : B
|
|
389
389
|
]
|
|
390
390
|
}
|
|
391
391
|
)
|
|
392
392
|
] });
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
const F = c === "text",
|
|
394
|
+
function On({ column: n, columnId: l, filterType: c = "text", position: u, popoverRef: w, distinctValues: b, initialValue: a, onApply: x, onCancel: B }) {
|
|
395
|
+
const F = c === "text", k = c === "number", I = c === "date", E = c === "duration", S = c === "score", D = /duration/i.test(String((n == null ? void 0 : n.label) || l || "")), U = ue(() => {
|
|
396
396
|
if (!S || !Array.isArray(b) || b.length === 0)
|
|
397
397
|
return !1;
|
|
398
|
-
let
|
|
399
|
-
for (const
|
|
400
|
-
const
|
|
401
|
-
Number.isFinite(
|
|
398
|
+
let m = 1 / 0, h = -1 / 0;
|
|
399
|
+
for (const g of b) {
|
|
400
|
+
const M = ct(g);
|
|
401
|
+
Number.isFinite(M) && (M < m && (m = M), M > h && (h = M));
|
|
402
402
|
}
|
|
403
|
-
return Number.isFinite(
|
|
404
|
-
}, [S, b]), [
|
|
403
|
+
return Number.isFinite(m) && Number.isFinite(h) && m >= 0 && h <= 5;
|
|
404
|
+
}, [S, b]), [N, R] = y(
|
|
405
405
|
() => F ? new Set(Array.isArray(a) ? a : []) : /* @__PURE__ */ new Set()
|
|
406
|
-
), [
|
|
407
|
-
() =>
|
|
408
|
-
), [
|
|
409
|
-
() =>
|
|
410
|
-
), [
|
|
406
|
+
), [L, fe] = y(""), [ae, G] = y(() => k && (a == null ? void 0 : a.type) === "range" && a.min != null ? a.min : ""), [W, ne] = y(() => k && (a == null ? void 0 : a.type) === "range" && a.max != null ? a.max : ""), [Q, j] = y(/* @__PURE__ */ new Set()), [J, pe] = y(
|
|
407
|
+
() => E && (a == null ? void 0 : a.type) === "durationRange" && a.minSec != null && a.minSec !== "" ? String(a.minSec) : ""
|
|
408
|
+
), [q, Z] = y(
|
|
409
|
+
() => E && (a == null ? void 0 : a.type) === "durationRange" && a.maxSec != null && a.maxSec !== "" ? String(a.maxSec) : ""
|
|
410
|
+
), [me, V] = y(
|
|
411
411
|
() => S && (a == null ? void 0 : a.type) === "scoreRange" && Array.isArray(a.values) ? new Set(a.values) : /* @__PURE__ */ new Set()
|
|
412
|
-
), [
|
|
412
|
+
), [re, xe] = y(
|
|
413
413
|
() => S && (a == null ? void 0 : a.type) === "scoreRange" && a.min != null && a.min !== "" ? String(a.min) : ""
|
|
414
|
-
), [
|
|
414
|
+
), [ke, Y] = y(
|
|
415
415
|
() => S && (a == null ? void 0 : a.type) === "scoreRange" && a.max != null && a.max !== "" ? String(a.max) : ""
|
|
416
|
-
), [
|
|
416
|
+
), [A, oe] = y(() => I && (a == null ? void 0 : a.type) === "dateRange" && a.from || ""), [ee, ce] = y(() => I && (a == null ? void 0 : a.type) === "dateRange" && a.to || "");
|
|
417
417
|
_(() => {
|
|
418
|
-
F &&
|
|
418
|
+
F && R(new Set(Array.isArray(a) ? a : []));
|
|
419
419
|
}, [l, F]);
|
|
420
|
-
const
|
|
421
|
-
const
|
|
422
|
-
return
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
const x = new Set(h);
|
|
426
|
-
return x.has(f) ? x.delete(f) : x.add(f), x;
|
|
420
|
+
const H = ue(() => {
|
|
421
|
+
const m = L.trim().toLowerCase();
|
|
422
|
+
return [...m ? b.filter((g) => String(g).toLowerCase().includes(m)) : b].sort((g, M) => {
|
|
423
|
+
const te = N.has(g), ge = N.has(M);
|
|
424
|
+
return te !== ge ? te ? -1 : 1 : String(g).localeCompare(String(M));
|
|
427
425
|
});
|
|
428
|
-
},
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
const x = new Set(h);
|
|
433
|
-
return x.has(f) ? x.delete(f) : x.add(f), x;
|
|
426
|
+
}, [b, L, N]), be = (m) => {
|
|
427
|
+
R((h) => {
|
|
428
|
+
const g = new Set(h);
|
|
429
|
+
return g.has(m) ? g.delete(m) : g.add(m), g;
|
|
434
430
|
});
|
|
435
|
-
},
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
431
|
+
}, De = () => {
|
|
432
|
+
F && R(/* @__PURE__ */ new Set()), k && (G(""), ne("")), E && (j(/* @__PURE__ */ new Set()), pe(""), Z("")), S && (V(/* @__PURE__ */ new Set()), xe(""), Y("")), I && (oe(""), ce("")), fe("");
|
|
433
|
+
}, Ne = (m) => {
|
|
434
|
+
j((h) => {
|
|
435
|
+
const g = new Set(h);
|
|
436
|
+
return g.has(m) ? g.delete(m) : g.add(m), g;
|
|
439
437
|
});
|
|
440
|
-
},
|
|
438
|
+
}, z = (m) => {
|
|
439
|
+
V((h) => {
|
|
440
|
+
const g = new Set(h);
|
|
441
|
+
return g.has(m) ? g.delete(m) : g.add(m), g;
|
|
442
|
+
});
|
|
443
|
+
}, he = () => {
|
|
441
444
|
if (F)
|
|
442
|
-
return
|
|
443
|
-
if (
|
|
444
|
-
return
|
|
445
|
-
if (
|
|
446
|
-
const
|
|
447
|
-
let
|
|
448
|
-
if (
|
|
449
|
-
|
|
450
|
-
else if (
|
|
451
|
-
const
|
|
452
|
-
|
|
445
|
+
return x(Array.from(N));
|
|
446
|
+
if (k)
|
|
447
|
+
return x({ type: "range", min: ae === "" ? "" : Number(ae), max: W === "" ? "" : Number(W) });
|
|
448
|
+
if (E) {
|
|
449
|
+
const m = Nt(J), h = Nt(q), g = m != null || h != null;
|
|
450
|
+
let M = "", te = "";
|
|
451
|
+
if (g)
|
|
452
|
+
M = m ?? "", te = h ?? "";
|
|
453
|
+
else if (Q.size > 0) {
|
|
454
|
+
const ge = Et.filter((se) => Q.has(se.id));
|
|
455
|
+
M = Math.min(...ge.map((se) => se.minSec)), te = ge.some((se) => se.maxSec == null) ? "" : Math.max(...ge.map((se) => se.maxSec));
|
|
453
456
|
}
|
|
454
|
-
return
|
|
457
|
+
return x({ type: "durationRange", minSec: M, maxSec: te });
|
|
455
458
|
}
|
|
456
459
|
if (S) {
|
|
457
|
-
const
|
|
458
|
-
return
|
|
460
|
+
const m = re === "" ? null : Number(re), h = ke === "" ? null : Number(ke);
|
|
461
|
+
return m != null || h != null ? x({
|
|
459
462
|
type: "scoreRange",
|
|
460
463
|
values: [],
|
|
461
|
-
min:
|
|
464
|
+
min: m != null && Number.isFinite(m) ? m : "",
|
|
462
465
|
max: h != null && Number.isFinite(h) ? h : ""
|
|
463
|
-
}) :
|
|
466
|
+
}) : x({
|
|
464
467
|
type: "scoreRange",
|
|
465
|
-
values: Array.from(
|
|
468
|
+
values: Array.from(me).sort((M, te) => M - te),
|
|
466
469
|
min: "",
|
|
467
470
|
max: ""
|
|
468
471
|
});
|
|
469
472
|
}
|
|
470
|
-
if (
|
|
471
|
-
return
|
|
473
|
+
if (I)
|
|
474
|
+
return x({ type: "dateRange", from: A, to: ee });
|
|
472
475
|
};
|
|
473
|
-
return /* @__PURE__ */
|
|
476
|
+
return /* @__PURE__ */ p(
|
|
474
477
|
"div",
|
|
475
478
|
{
|
|
476
479
|
ref: w,
|
|
@@ -493,8 +496,8 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
493
496
|
fontFamily: "var(--font-sans)"
|
|
494
497
|
},
|
|
495
498
|
children: [
|
|
496
|
-
F && /* @__PURE__ */
|
|
497
|
-
/* @__PURE__ */
|
|
499
|
+
F && /* @__PURE__ */ p(ye, { children: [
|
|
500
|
+
/* @__PURE__ */ s(
|
|
498
501
|
"div",
|
|
499
502
|
{
|
|
500
503
|
style: {
|
|
@@ -505,7 +508,7 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
505
508
|
display: "flex",
|
|
506
509
|
alignItems: "center"
|
|
507
510
|
},
|
|
508
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ p(
|
|
509
512
|
"div",
|
|
510
513
|
{
|
|
511
514
|
style: {
|
|
@@ -519,14 +522,14 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
519
522
|
padding: "0 8px"
|
|
520
523
|
},
|
|
521
524
|
children: [
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ s(wn, { size: 16, color: "#989898", strokeWidth: 2 }),
|
|
526
|
+
/* @__PURE__ */ s(
|
|
524
527
|
"input",
|
|
525
528
|
{
|
|
526
529
|
autoFocus: !0,
|
|
527
530
|
type: "text",
|
|
528
|
-
value:
|
|
529
|
-
onChange: (
|
|
531
|
+
value: L,
|
|
532
|
+
onChange: (m) => fe(m.target.value),
|
|
530
533
|
placeholder: "Search",
|
|
531
534
|
style: {
|
|
532
535
|
flex: 1,
|
|
@@ -545,9 +548,9 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
545
548
|
)
|
|
546
549
|
}
|
|
547
550
|
),
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
const h =
|
|
550
|
-
return /* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ s("div", { style: { maxHeight: 220, overflowY: "auto", display: "flex", flexDirection: "column", gap: 4 }, children: H.length === 0 ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "No values" }) : H.map((m) => {
|
|
552
|
+
const h = N.has(m);
|
|
553
|
+
return /* @__PURE__ */ p(
|
|
551
554
|
"label",
|
|
552
555
|
{
|
|
553
556
|
style: {
|
|
@@ -559,7 +562,7 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
559
562
|
borderRadius: 6
|
|
560
563
|
},
|
|
561
564
|
children: [
|
|
562
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ s(
|
|
563
566
|
"span",
|
|
564
567
|
{
|
|
565
568
|
style: {
|
|
@@ -573,24 +576,24 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
573
576
|
border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
|
|
574
577
|
flexShrink: 0
|
|
575
578
|
},
|
|
576
|
-
children: h && /* @__PURE__ */
|
|
579
|
+
children: h && /* @__PURE__ */ s(Xe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
577
580
|
}
|
|
578
581
|
),
|
|
579
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ s(
|
|
580
583
|
"input",
|
|
581
584
|
{
|
|
582
585
|
type: "checkbox",
|
|
583
586
|
checked: h,
|
|
584
|
-
onChange: () =>
|
|
587
|
+
onChange: () => be(m),
|
|
585
588
|
style: { position: "absolute", opacity: 0, pointerEvents: "none" },
|
|
586
589
|
tabIndex: -1
|
|
587
590
|
}
|
|
588
591
|
),
|
|
589
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ s(
|
|
590
593
|
"span",
|
|
591
594
|
{
|
|
592
|
-
onClick: (
|
|
593
|
-
|
|
595
|
+
onClick: (g) => {
|
|
596
|
+
g.preventDefault(), be(m);
|
|
594
597
|
},
|
|
595
598
|
style: {
|
|
596
599
|
fontSize: 14,
|
|
@@ -601,41 +604,43 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
601
604
|
textOverflow: "ellipsis",
|
|
602
605
|
whiteSpace: "nowrap"
|
|
603
606
|
},
|
|
604
|
-
children:
|
|
607
|
+
children: m
|
|
605
608
|
}
|
|
606
609
|
)
|
|
607
610
|
]
|
|
608
611
|
},
|
|
609
|
-
|
|
612
|
+
m
|
|
610
613
|
);
|
|
611
614
|
}) })
|
|
612
615
|
] }),
|
|
613
|
-
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
/* @__PURE__ */
|
|
616
|
-
|
|
616
|
+
k && /* @__PURE__ */ p(ye, { children: [
|
|
617
|
+
/* @__PURE__ */ s(it, { children: n.label || "Filter" }),
|
|
618
|
+
/* @__PURE__ */ s(
|
|
619
|
+
lt,
|
|
617
620
|
{
|
|
618
|
-
minValue:
|
|
619
|
-
maxValue:
|
|
620
|
-
onMinChange:
|
|
621
|
-
onMaxChange:
|
|
621
|
+
minValue: ae,
|
|
622
|
+
maxValue: W,
|
|
623
|
+
onMinChange: G,
|
|
624
|
+
onMaxChange: ne,
|
|
625
|
+
placeholder: D ? "00" : "0.0",
|
|
626
|
+
unit: D ? "sec" : void 0
|
|
622
627
|
}
|
|
623
628
|
)
|
|
624
629
|
] }),
|
|
625
|
-
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
-
n.filterShowPresets === !0 && /* @__PURE__ */
|
|
628
|
-
/* @__PURE__ */
|
|
629
|
-
const h =
|
|
630
|
-
return /* @__PURE__ */
|
|
630
|
+
E && /* @__PURE__ */ p(ye, { children: [
|
|
631
|
+
/* @__PURE__ */ s(it, { children: n.label || "Duration" }),
|
|
632
|
+
n.filterShowPresets === !0 && /* @__PURE__ */ p(ye, { children: [
|
|
633
|
+
/* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: Et.map((m) => {
|
|
634
|
+
const h = Q.has(m.id);
|
|
635
|
+
return /* @__PURE__ */ p(
|
|
631
636
|
"div",
|
|
632
637
|
{
|
|
633
638
|
role: "checkbox",
|
|
634
639
|
"aria-checked": h,
|
|
635
640
|
tabIndex: 0,
|
|
636
|
-
onClick: () =>
|
|
637
|
-
onKeyDown: (
|
|
638
|
-
(
|
|
641
|
+
onClick: () => Ne(m.id),
|
|
642
|
+
onKeyDown: (g) => {
|
|
643
|
+
(g.key === " " || g.key === "Enter") && (g.preventDefault(), Ne(m.id));
|
|
639
644
|
},
|
|
640
645
|
style: {
|
|
641
646
|
display: "flex",
|
|
@@ -645,7 +650,7 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
645
650
|
userSelect: "none"
|
|
646
651
|
},
|
|
647
652
|
children: [
|
|
648
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ s(
|
|
649
654
|
"span",
|
|
650
655
|
{
|
|
651
656
|
style: {
|
|
@@ -659,10 +664,10 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
659
664
|
border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
|
|
660
665
|
flexShrink: 0
|
|
661
666
|
},
|
|
662
|
-
children: h && /* @__PURE__ */
|
|
667
|
+
children: h && /* @__PURE__ */ s(Xe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
663
668
|
}
|
|
664
669
|
),
|
|
665
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ s(
|
|
666
671
|
"span",
|
|
667
672
|
{
|
|
668
673
|
style: {
|
|
@@ -671,16 +676,16 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
671
676
|
color: "#0B0B0B",
|
|
672
677
|
fontFamily: "var(--font-sans)"
|
|
673
678
|
},
|
|
674
|
-
children:
|
|
679
|
+
children: m.label
|
|
675
680
|
}
|
|
676
681
|
)
|
|
677
682
|
]
|
|
678
683
|
},
|
|
679
|
-
|
|
684
|
+
m.id
|
|
680
685
|
);
|
|
681
686
|
}) }),
|
|
682
|
-
/* @__PURE__ */
|
|
683
|
-
/* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } }),
|
|
688
|
+
/* @__PURE__ */ s(
|
|
684
689
|
"div",
|
|
685
690
|
{
|
|
686
691
|
style: {
|
|
@@ -695,34 +700,34 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
695
700
|
}
|
|
696
701
|
)
|
|
697
702
|
] }),
|
|
698
|
-
/* @__PURE__ */
|
|
699
|
-
|
|
703
|
+
/* @__PURE__ */ s(
|
|
704
|
+
lt,
|
|
700
705
|
{
|
|
701
|
-
minValue:
|
|
702
|
-
maxValue:
|
|
703
|
-
onMinChange:
|
|
704
|
-
onMaxChange:
|
|
706
|
+
minValue: J,
|
|
707
|
+
maxValue: q,
|
|
708
|
+
onMinChange: pe,
|
|
709
|
+
onMaxChange: Z,
|
|
705
710
|
inputType: "number",
|
|
706
711
|
inputMode: "numeric",
|
|
707
|
-
placeholder: "
|
|
712
|
+
placeholder: "00",
|
|
708
713
|
unit: "sec"
|
|
709
714
|
}
|
|
710
715
|
)
|
|
711
716
|
] }),
|
|
712
|
-
S && /* @__PURE__ */
|
|
713
|
-
/* @__PURE__ */
|
|
714
|
-
|
|
715
|
-
/* @__PURE__ */
|
|
716
|
-
const h =
|
|
717
|
-
return /* @__PURE__ */
|
|
717
|
+
S && /* @__PURE__ */ p(ye, { children: [
|
|
718
|
+
/* @__PURE__ */ s(it, { children: n.label || "Score" }),
|
|
719
|
+
U && n.filterShowPresets === !0 && /* @__PURE__ */ p(ye, { children: [
|
|
720
|
+
/* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [1, 2, 3, 4, 5].map((m) => {
|
|
721
|
+
const h = me.has(m);
|
|
722
|
+
return /* @__PURE__ */ p(
|
|
718
723
|
"div",
|
|
719
724
|
{
|
|
720
725
|
role: "checkbox",
|
|
721
726
|
"aria-checked": h,
|
|
722
727
|
tabIndex: 0,
|
|
723
|
-
onClick: () =>
|
|
724
|
-
onKeyDown: (
|
|
725
|
-
(
|
|
728
|
+
onClick: () => z(m),
|
|
729
|
+
onKeyDown: (g) => {
|
|
730
|
+
(g.key === " " || g.key === "Enter") && (g.preventDefault(), z(m));
|
|
726
731
|
},
|
|
727
732
|
style: {
|
|
728
733
|
display: "flex",
|
|
@@ -732,7 +737,7 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
732
737
|
userSelect: "none"
|
|
733
738
|
},
|
|
734
739
|
children: [
|
|
735
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ s(
|
|
736
741
|
"span",
|
|
737
742
|
{
|
|
738
743
|
style: {
|
|
@@ -746,10 +751,10 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
746
751
|
border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
|
|
747
752
|
flexShrink: 0
|
|
748
753
|
},
|
|
749
|
-
children: h && /* @__PURE__ */
|
|
754
|
+
children: h && /* @__PURE__ */ s(Xe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
750
755
|
}
|
|
751
756
|
),
|
|
752
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ s(
|
|
753
758
|
"span",
|
|
754
759
|
{
|
|
755
760
|
style: {
|
|
@@ -758,17 +763,17 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
758
763
|
color: "#0B0B0B",
|
|
759
764
|
fontFamily: "var(--font-sans)"
|
|
760
765
|
},
|
|
761
|
-
children:
|
|
766
|
+
children: m
|
|
762
767
|
}
|
|
763
768
|
)
|
|
764
769
|
]
|
|
765
770
|
},
|
|
766
|
-
|
|
771
|
+
m
|
|
767
772
|
);
|
|
768
773
|
}) }),
|
|
769
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } })
|
|
770
775
|
] }),
|
|
771
|
-
|
|
776
|
+
U && n.filterShowPresets === !0 && /* @__PURE__ */ s(
|
|
772
777
|
"div",
|
|
773
778
|
{
|
|
774
779
|
style: {
|
|
@@ -782,38 +787,38 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
782
787
|
children: "Custom Range"
|
|
783
788
|
}
|
|
784
789
|
),
|
|
785
|
-
/* @__PURE__ */
|
|
786
|
-
|
|
790
|
+
/* @__PURE__ */ s(
|
|
791
|
+
lt,
|
|
787
792
|
{
|
|
788
|
-
minValue:
|
|
789
|
-
maxValue:
|
|
790
|
-
onMinChange:
|
|
791
|
-
onMaxChange:
|
|
793
|
+
minValue: re,
|
|
794
|
+
maxValue: ke,
|
|
795
|
+
onMinChange: xe,
|
|
796
|
+
onMaxChange: Y,
|
|
792
797
|
step: "0.1"
|
|
793
798
|
}
|
|
794
799
|
)
|
|
795
800
|
] }),
|
|
796
|
-
|
|
801
|
+
I && /* @__PURE__ */ s(
|
|
797
802
|
Ln,
|
|
798
803
|
{
|
|
799
804
|
leftLabel: "From",
|
|
800
805
|
rightLabel: "To",
|
|
801
|
-
leftValue:
|
|
802
|
-
rightValue:
|
|
803
|
-
onLeftChange:
|
|
804
|
-
onRightChange:
|
|
806
|
+
leftValue: A,
|
|
807
|
+
rightValue: ee,
|
|
808
|
+
onLeftChange: oe,
|
|
809
|
+
onRightChange: ce,
|
|
805
810
|
type: "date",
|
|
806
811
|
placeholderLeft: "",
|
|
807
812
|
placeholderRight: ""
|
|
808
813
|
}
|
|
809
814
|
),
|
|
810
|
-
/* @__PURE__ */
|
|
811
|
-
/* @__PURE__ */
|
|
812
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } }),
|
|
816
|
+
/* @__PURE__ */ p("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
817
|
+
/* @__PURE__ */ s(
|
|
813
818
|
"button",
|
|
814
819
|
{
|
|
815
820
|
type: "button",
|
|
816
|
-
onClick:
|
|
821
|
+
onClick: De,
|
|
817
822
|
style: {
|
|
818
823
|
background: "transparent",
|
|
819
824
|
border: "none",
|
|
@@ -824,14 +829,14 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
824
829
|
color: "#323232",
|
|
825
830
|
fontFamily: "var(--font-sans)"
|
|
826
831
|
},
|
|
827
|
-
children:
|
|
832
|
+
children: E && n.filterShowPresets === !0 || S && U && n.filterShowPresets === !0 ? "View All" : "Reset"
|
|
828
833
|
}
|
|
829
834
|
),
|
|
830
|
-
/* @__PURE__ */
|
|
835
|
+
/* @__PURE__ */ s(
|
|
831
836
|
"button",
|
|
832
837
|
{
|
|
833
838
|
type: "button",
|
|
834
|
-
onClick:
|
|
839
|
+
onClick: he,
|
|
835
840
|
style: {
|
|
836
841
|
background: "#0B0B0B",
|
|
837
842
|
color: "#FFFFFF",
|
|
@@ -852,7 +857,7 @@ function Pn({ column: n, columnId: l, filterType: c = "text", position: u, popov
|
|
|
852
857
|
}
|
|
853
858
|
);
|
|
854
859
|
}
|
|
855
|
-
const
|
|
860
|
+
const Pn = () => ({ userData: { email: "anonymous" } }), Tn = (n) => /* @__PURE__ */ s("img", { ...n });
|
|
856
861
|
function jn({
|
|
857
862
|
children: n,
|
|
858
863
|
content: l,
|
|
@@ -861,51 +866,51 @@ function jn({
|
|
|
861
866
|
styling: w,
|
|
862
867
|
indicatorColor: b
|
|
863
868
|
}) {
|
|
864
|
-
const a = typeof l == "string" ? l : l != null ? String(l) : "",
|
|
869
|
+
const a = typeof l == "string" ? l : l != null ? String(l) : "", x = typeof b == "string" && (b.startsWith("#") || b.startsWith("rgb") || b.startsWith("hsl") || b.startsWith("var(")) ? b : "var(--Grey-Strong, #2E3236)", [B, F] = y(!1), [k, I] = y(!1), [E, S] = y({ top: 0, left: 0, arrowLeft: 0, placement: "top" }), D = X(null), U = X(null);
|
|
865
870
|
if (!a)
|
|
866
871
|
return n;
|
|
867
872
|
_(() => {
|
|
868
|
-
|
|
873
|
+
I(!0);
|
|
869
874
|
}, []);
|
|
870
|
-
const
|
|
871
|
-
if (!
|
|
875
|
+
const N = O(() => {
|
|
876
|
+
if (!D.current || !U.current || typeof window > "u")
|
|
872
877
|
return;
|
|
873
|
-
const R =
|
|
874
|
-
let
|
|
875
|
-
pe === "top" &&
|
|
876
|
-
let
|
|
877
|
-
u === "start" && (
|
|
878
|
-
let me =
|
|
879
|
-
me = Math.max(
|
|
880
|
-
const
|
|
881
|
-
S({ top: me, left:
|
|
878
|
+
const R = D.current.getBoundingClientRect(), L = U.current.getBoundingClientRect(), fe = window.innerWidth, ae = window.innerHeight, G = 8, W = 10, ne = L.width, Q = L.height, j = R.top, J = ae - R.bottom, pe = c === "bottom" ? "bottom" : "top";
|
|
879
|
+
let q = pe;
|
|
880
|
+
pe === "top" && j < Q + W + G && J > j ? q = "bottom" : pe === "bottom" && J < Q + W + G && j > J && (q = "top");
|
|
881
|
+
let Z = R.left + R.width / 2;
|
|
882
|
+
u === "start" && (Z = R.left), u === "end" && (Z = R.right);
|
|
883
|
+
let me = q === "top" ? R.top - Q - W : R.bottom + W, V = u === "start" ? Z : u === "end" ? Z - ne : Z - ne / 2;
|
|
884
|
+
me = Math.max(G, Math.min(me, ae - Q - G)), V = Math.max(G, Math.min(V, fe - ne - G));
|
|
885
|
+
const re = Math.max(10, Math.min(Z - V, ne - 10));
|
|
886
|
+
S({ top: me, left: V, arrowLeft: re, placement: q });
|
|
882
887
|
}, [u, c]);
|
|
883
888
|
return _(() => {
|
|
884
|
-
if (!
|
|
889
|
+
if (!B || !k)
|
|
885
890
|
return;
|
|
886
|
-
|
|
887
|
-
const R = () =>
|
|
891
|
+
N();
|
|
892
|
+
const R = () => N();
|
|
888
893
|
return window.addEventListener("resize", R), window.addEventListener("scroll", R, !0), () => {
|
|
889
894
|
window.removeEventListener("resize", R), window.removeEventListener("scroll", R, !0);
|
|
890
895
|
};
|
|
891
|
-
}, [
|
|
896
|
+
}, [B, k, N]), /* @__PURE__ */ p(
|
|
892
897
|
"span",
|
|
893
898
|
{
|
|
894
|
-
ref:
|
|
899
|
+
ref: D,
|
|
895
900
|
style: { display: "block", width: "100%" },
|
|
896
901
|
onMouseEnter: () => F(!0),
|
|
897
902
|
onMouseLeave: () => F(!1),
|
|
898
903
|
children: [
|
|
899
904
|
n,
|
|
900
|
-
|
|
901
|
-
/* @__PURE__ */
|
|
905
|
+
B && k && at(
|
|
906
|
+
/* @__PURE__ */ p(
|
|
902
907
|
"span",
|
|
903
908
|
{
|
|
904
|
-
ref:
|
|
909
|
+
ref: U,
|
|
905
910
|
style: {
|
|
906
911
|
position: "fixed",
|
|
907
|
-
top: `${
|
|
908
|
-
left: `${
|
|
912
|
+
top: `${E.top}px`,
|
|
913
|
+
left: `${E.left}px`,
|
|
909
914
|
background: "var(--Grey-Strong, #2E3236)",
|
|
910
915
|
color: "var(--Grey-White, #FFF)",
|
|
911
916
|
fontSize: "12px",
|
|
@@ -923,23 +928,23 @@ function jn({
|
|
|
923
928
|
},
|
|
924
929
|
children: [
|
|
925
930
|
a,
|
|
926
|
-
/* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ s(
|
|
927
932
|
"span",
|
|
928
933
|
{
|
|
929
934
|
style: {
|
|
930
935
|
position: "absolute",
|
|
931
|
-
left: `${
|
|
936
|
+
left: `${E.arrowLeft}px`,
|
|
932
937
|
transform: "translateX(-50%)",
|
|
933
938
|
width: 0,
|
|
934
939
|
height: 0,
|
|
935
940
|
borderLeft: "6px solid transparent",
|
|
936
941
|
borderRight: "6px solid transparent",
|
|
937
|
-
...
|
|
942
|
+
...E.placement === "top" ? {
|
|
938
943
|
top: "100%",
|
|
939
|
-
borderTop: `7px solid ${
|
|
944
|
+
borderTop: `7px solid ${x}`
|
|
940
945
|
} : {
|
|
941
946
|
bottom: "100%",
|
|
942
|
-
borderBottom: `7px solid ${
|
|
947
|
+
borderBottom: `7px solid ${x}`
|
|
943
948
|
}
|
|
944
949
|
}
|
|
945
950
|
}
|
|
@@ -965,27 +970,27 @@ function Vn({
|
|
|
965
970
|
// Controlled page (null = use internal state)
|
|
966
971
|
pageSize: a = null,
|
|
967
972
|
// Controlled pageSize (null = use internal state)
|
|
968
|
-
onPageChange:
|
|
973
|
+
onPageChange: x = null,
|
|
969
974
|
// Callback for page changes (null = use internal state)
|
|
970
|
-
onPageSizeChange:
|
|
975
|
+
onPageSizeChange: B = null,
|
|
971
976
|
// Callback for pageSize changes (null = use internal state)
|
|
972
977
|
onFilterChange: F = null,
|
|
973
978
|
// Callback for filter changes (null = use client-side filtering)
|
|
974
|
-
columnFilters:
|
|
979
|
+
columnFilters: k = null,
|
|
975
980
|
// Controlled inline header filters (columnId -> value). Used to rehydrate inputs in server-side filtering mode.
|
|
976
981
|
// Optional callback to surface column limit errors to host app
|
|
977
|
-
onMaxColumnsError:
|
|
982
|
+
onMaxColumnsError: I = null,
|
|
978
983
|
// Server-side sorting props (optional)
|
|
979
|
-
onSort:
|
|
984
|
+
onSort: E = null,
|
|
980
985
|
// Callback for sort changes (null = use client-side sorting)
|
|
981
986
|
sortFields: S = [],
|
|
982
987
|
// Array of [field, direction] tuples from parent (null = use internal state)
|
|
983
|
-
tableId:
|
|
988
|
+
tableId: D = null,
|
|
984
989
|
// Optional unique identifier for localStorage persistence (e.g., "history", "agents")
|
|
985
|
-
isLoading:
|
|
990
|
+
isLoading: U = !1,
|
|
986
991
|
// Loading state to show overlay inside table
|
|
987
992
|
// Filter props (optional)
|
|
988
|
-
filtersConfig:
|
|
993
|
+
filtersConfig: N = null,
|
|
989
994
|
// Top toolbar filter config (chips/date/export). Note: this is different from `columnFilters` for inline header inputs.
|
|
990
995
|
// Column resize (optional) — min/max in px; columns may override with column.minWidth / column.maxWidth
|
|
991
996
|
columnResizeMinWidth: R = 120,
|
|
@@ -993,20 +998,20 @@ function Vn({
|
|
|
993
998
|
// Fires whenever the user-visible column set changes. Useful for hosts that
|
|
994
999
|
// want to scope a CSV export, etc., to whatever the user has selected.
|
|
995
1000
|
// Receives an array of column ids (excluding the action column).
|
|
996
|
-
onVisibleColumnsChange:
|
|
1001
|
+
onVisibleColumnsChange: fe = null,
|
|
997
1002
|
// When true, hides the "Columns" picker button in the toolbar. The
|
|
998
1003
|
// surrounding toolbar wrapper is also skipped if no other toolbar content
|
|
999
1004
|
// (e.g. `filtersConfig`) is configured.
|
|
1000
|
-
hideColumnPicker:
|
|
1005
|
+
hideColumnPicker: ae = !1
|
|
1001
1006
|
}) {
|
|
1002
1007
|
var Rt;
|
|
1003
|
-
const { userData:
|
|
1004
|
-
const i =
|
|
1008
|
+
const { userData: G } = Pn(), W = (G == null ? void 0 : G.email) || "anonymous", ne = rt.memo(({ children: e, content: t, className: r = "" }) => {
|
|
1009
|
+
const i = X(null), [o, f] = y(!1);
|
|
1005
1010
|
_(() => {
|
|
1006
1011
|
const v = () => {
|
|
1007
1012
|
if (i.current) {
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1013
|
+
const T = i.current.scrollWidth > i.current.clientWidth;
|
|
1014
|
+
f(T);
|
|
1010
1015
|
}
|
|
1011
1016
|
};
|
|
1012
1017
|
v();
|
|
@@ -1015,8 +1020,8 @@ function Vn({
|
|
|
1015
1020
|
clearTimeout(P), window.removeEventListener("resize", v);
|
|
1016
1021
|
};
|
|
1017
1022
|
}, [e, t]);
|
|
1018
|
-
const d = /* @__PURE__ */
|
|
1019
|
-
return
|
|
1023
|
+
const d = /* @__PURE__ */ s("span", { className: `truncate block ${r}`, ref: i, children: e });
|
|
1024
|
+
return o && t ? /* @__PURE__ */ s(
|
|
1020
1025
|
jn,
|
|
1021
1026
|
{
|
|
1022
1027
|
content: t,
|
|
@@ -1027,147 +1032,149 @@ function Vn({
|
|
|
1027
1032
|
}
|
|
1028
1033
|
) : d;
|
|
1029
1034
|
});
|
|
1030
|
-
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1033
|
-
},
|
|
1034
|
-
|
|
1035
|
-
},
|
|
1036
|
-
|
|
1035
|
+
ne.displayName = "TruncatedCell";
|
|
1036
|
+
const Q = w !== null && x !== null, j = F !== null, J = E !== null, [pe, q] = y(1), [Z, me] = y(c), V = b !== null ? b : pe, re = a !== null ? a : Z, xe = (e) => {
|
|
1037
|
+
x ? x(e) : q(e);
|
|
1038
|
+
}, ke = (e) => {
|
|
1039
|
+
B ? B(e) : me(e);
|
|
1040
|
+
}, Y = 50, A = "action", oe = X(!1), ee = ue(() => D ? `dataTable_columns_${D}:${W}` : `dataTable_columns_${l.map((t) => t.id || t.key).sort().join("_")}:${W}`, [D, l, W]), ce = ue(() => D ? `dataTable_manual_change_${D}:${W}` : null, [D, W]);
|
|
1041
|
+
O((e, t) => {
|
|
1037
1042
|
if (typeof window > "u" || !e || !t || t.length === 0)
|
|
1038
1043
|
return null;
|
|
1039
1044
|
try {
|
|
1040
1045
|
const r = localStorage.getItem(e);
|
|
1041
1046
|
if (r) {
|
|
1042
|
-
const
|
|
1043
|
-
(
|
|
1047
|
+
const o = JSON.parse(r).filter(
|
|
1048
|
+
(f) => t.some((d) => (d.id || d.key) === f)
|
|
1044
1049
|
);
|
|
1045
|
-
if (
|
|
1046
|
-
return
|
|
1050
|
+
if (o.length > 0)
|
|
1051
|
+
return o;
|
|
1047
1052
|
}
|
|
1048
1053
|
} catch (r) {
|
|
1049
1054
|
console.warn("Failed to load saved columns from localStorage:", r);
|
|
1050
1055
|
}
|
|
1051
1056
|
return null;
|
|
1052
1057
|
}, []);
|
|
1053
|
-
const [
|
|
1054
|
-
const r =
|
|
1055
|
-
|
|
1056
|
-
const
|
|
1057
|
-
return r ?
|
|
1058
|
-
}),
|
|
1059
|
-
r ? { ...
|
|
1058
|
+
const [H, be] = y({}), [De, Ne] = y(""), [z, he] = y(null), [m, h] = y({ top: 0, left: 0 }), g = X(null), M = X({}), [te, ge] = y(null), [Ue, se] = y("asc"), Ge = O((e, t) => {
|
|
1059
|
+
const r = Ee(t);
|
|
1060
|
+
be((i) => {
|
|
1061
|
+
const o = { ...i };
|
|
1062
|
+
return r ? o[e] = t : delete o[e], o;
|
|
1063
|
+
}), x ? x(1) : q(1), j && F && F(
|
|
1064
|
+
r ? { ...H, [e]: t } : Object.fromEntries(Object.entries(H).filter(([i]) => i !== e))
|
|
1060
1065
|
);
|
|
1061
|
-
}, [
|
|
1062
|
-
|
|
1063
|
-
}, [F,
|
|
1066
|
+
}, [H, F, j, x]), Wt = O(() => {
|
|
1067
|
+
be({}), Ne(""), x ? x(1) : q(1), j && F && F({});
|
|
1068
|
+
}, [F, j, x]), Je = O((e) => {
|
|
1064
1069
|
if (!n || n.length === 0)
|
|
1065
1070
|
return [];
|
|
1066
1071
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
1067
1072
|
for (const i of n) {
|
|
1068
|
-
const
|
|
1069
|
-
if (
|
|
1073
|
+
const o = i[e];
|
|
1074
|
+
if (o == null)
|
|
1070
1075
|
continue;
|
|
1071
|
-
const
|
|
1072
|
-
t.has(
|
|
1076
|
+
const f = typeof o == "object" ? JSON.stringify(o) : String(o);
|
|
1077
|
+
t.has(f) || (t.add(f), r.push(f));
|
|
1073
1078
|
}
|
|
1074
|
-
return r.sort((i,
|
|
1075
|
-
}, [n]),
|
|
1076
|
-
const t = l.find((r) =>
|
|
1077
|
-
return t && t.filterType ? t.filterType : Nn(
|
|
1078
|
-
}, [l,
|
|
1079
|
+
return r.sort((i, o) => i.localeCompare(o));
|
|
1080
|
+
}, [n]), At = O((e) => {
|
|
1081
|
+
const t = l.find((r) => K(r) === e);
|
|
1082
|
+
return t && t.filterType ? t.filterType : Nn(Je(e));
|
|
1083
|
+
}, [l, Je]), We = O((e) => {
|
|
1079
1084
|
const i = typeof window < "u" ? window.innerWidth : 1 / 0;
|
|
1080
|
-
let
|
|
1081
|
-
return
|
|
1082
|
-
}, []),
|
|
1085
|
+
let o = e.left;
|
|
1086
|
+
return o + 280 > i - 8 && (o = Math.max(8, e.right - 280)), { top: e.bottom + 6, left: o };
|
|
1087
|
+
}, []), $t = O((e, t) => {
|
|
1083
1088
|
if (!t) {
|
|
1084
|
-
|
|
1089
|
+
he(e);
|
|
1085
1090
|
return;
|
|
1086
1091
|
}
|
|
1087
1092
|
const r = t.getBoundingClientRect();
|
|
1088
|
-
|
|
1089
|
-
}, [
|
|
1093
|
+
h(We(r)), he((i) => i === e ? null : e);
|
|
1094
|
+
}, [We]);
|
|
1090
1095
|
_(() => {
|
|
1091
|
-
if (!
|
|
1096
|
+
if (!z)
|
|
1092
1097
|
return;
|
|
1093
1098
|
const e = (t) => {
|
|
1094
|
-
if (
|
|
1099
|
+
if (g.current && g.current.contains(t.target))
|
|
1095
1100
|
return;
|
|
1096
|
-
const r =
|
|
1097
|
-
r && r.contains(t.target) ||
|
|
1101
|
+
const r = M.current[z];
|
|
1102
|
+
r && r.contains(t.target) || Object.values(M.current).some(
|
|
1103
|
+
(o) => o && o.contains(t.target)
|
|
1104
|
+
) || he(null);
|
|
1098
1105
|
};
|
|
1099
1106
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1100
|
-
}, [
|
|
1101
|
-
if (!
|
|
1107
|
+
}, [z]), _(() => {
|
|
1108
|
+
if (!z)
|
|
1102
1109
|
return;
|
|
1103
1110
|
const e = () => {
|
|
1104
|
-
const t =
|
|
1111
|
+
const t = M.current[z];
|
|
1105
1112
|
if (!t)
|
|
1106
1113
|
return;
|
|
1107
1114
|
const r = t.getBoundingClientRect();
|
|
1108
|
-
|
|
1115
|
+
h(We(r));
|
|
1109
1116
|
};
|
|
1110
1117
|
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
1111
1118
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
1112
1119
|
};
|
|
1113
|
-
}, [
|
|
1114
|
-
if (!
|
|
1120
|
+
}, [z, We]), sn(() => {
|
|
1121
|
+
if (!z)
|
|
1115
1122
|
return;
|
|
1116
|
-
const e =
|
|
1123
|
+
const e = g.current, t = M.current[z];
|
|
1117
1124
|
if (!e || !t)
|
|
1118
1125
|
return;
|
|
1119
|
-
const r = e.offsetWidth, i = t.getBoundingClientRect(),
|
|
1120
|
-
if (!(i.left + r >
|
|
1126
|
+
const r = e.offsetWidth, i = t.getBoundingClientRect(), o = 8, f = typeof window < "u" ? window.innerWidth : 1 / 0;
|
|
1127
|
+
if (!(i.left + r > f - o))
|
|
1121
1128
|
return;
|
|
1122
|
-
const v = Math.max(
|
|
1123
|
-
|
|
1124
|
-
}, [
|
|
1125
|
-
const dt =
|
|
1129
|
+
const v = Math.max(o, i.right - r);
|
|
1130
|
+
h((P) => P.left === v ? P : { ...P, left: v });
|
|
1131
|
+
}, [z, m.top]);
|
|
1132
|
+
const dt = O((e) => !e || typeof e != "object" ? {} : Object.fromEntries(
|
|
1126
1133
|
Object.entries(e).filter(([, t]) => t == null ? !1 : typeof t == "string" ? t.trim() !== "" : !0)
|
|
1127
|
-
), []), ut =
|
|
1134
|
+
), []), ut = O((e, t) => {
|
|
1128
1135
|
const r = Object.keys(e || {}), i = Object.keys(t || {});
|
|
1129
|
-
return r.length !== i.length ? !1 : r.every((
|
|
1136
|
+
return r.length !== i.length ? !1 : r.every((o) => e[o] === t[o]);
|
|
1130
1137
|
}, []);
|
|
1131
1138
|
_(() => {
|
|
1132
|
-
if (!
|
|
1139
|
+
if (!j || k === null)
|
|
1133
1140
|
return;
|
|
1134
|
-
const e = dt(
|
|
1135
|
-
|
|
1136
|
-
}, [
|
|
1137
|
-
const
|
|
1141
|
+
const e = dt(k);
|
|
1142
|
+
be((t) => ut(t, e) ? t : e);
|
|
1143
|
+
}, [j, k, dt, ut]), O((e, t) => e === "csat_score" && t === "evaluation.csat_score" ? t : e, []);
|
|
1144
|
+
const Ce = J && S.length > 0 ? S[0][0] : te, Ae = J && S.length > 0 ? S[0][1] : Ue, [_n, ft] = y(
|
|
1138
1145
|
() => l.map((e) => e.id || e.key)
|
|
1139
|
-
),
|
|
1146
|
+
), ie = O((e) => {
|
|
1140
1147
|
if (!e || e.length === 0)
|
|
1141
1148
|
return e;
|
|
1142
1149
|
let t = Array.from(new Set(e));
|
|
1143
|
-
t.length >
|
|
1144
|
-
const i = l.map((d) => d.id || d.key).includes(
|
|
1145
|
-
return !t.includes(
|
|
1146
|
-
}, [l]), [
|
|
1147
|
-
if (typeof window < "u" &&
|
|
1150
|
+
t.length > Y && (t = t.slice(0, Y));
|
|
1151
|
+
const i = l.map((d) => d.id || d.key).includes(A);
|
|
1152
|
+
return !t.includes(A) && i && (t.length >= Y ? t = [...t.slice(0, Y - 1), A] : t = [...t, A]), [...t.filter((d) => d !== A), A];
|
|
1153
|
+
}, [l]), [$, Re] = y(() => {
|
|
1154
|
+
if (typeof window < "u" && D)
|
|
1148
1155
|
try {
|
|
1149
|
-
if (localStorage.getItem(`dataTable_manual_change_${
|
|
1150
|
-
const i = localStorage.getItem(`dataTable_columns_${
|
|
1156
|
+
if (localStorage.getItem(`dataTable_manual_change_${D}:${W}`) === "true") {
|
|
1157
|
+
const i = localStorage.getItem(`dataTable_columns_${D}:${W}`);
|
|
1151
1158
|
if (i) {
|
|
1152
|
-
const
|
|
1153
|
-
if (Array.isArray(
|
|
1154
|
-
|
|
1155
|
-
const
|
|
1159
|
+
const o = JSON.parse(i);
|
|
1160
|
+
if (Array.isArray(o) && o.length > 0) {
|
|
1161
|
+
oe.current = !0;
|
|
1162
|
+
const f = o.filter(
|
|
1156
1163
|
(d) => l.some((v) => (v.id || v.key) === d)
|
|
1157
1164
|
);
|
|
1158
|
-
if (
|
|
1159
|
-
return
|
|
1165
|
+
if (f.length > 0)
|
|
1166
|
+
return f.slice(0, Y);
|
|
1160
1167
|
}
|
|
1161
1168
|
}
|
|
1162
1169
|
}
|
|
1163
1170
|
} catch (r) {
|
|
1164
1171
|
console.warn("Failed to load saved columns from localStorage:", r);
|
|
1165
1172
|
}
|
|
1166
|
-
const t = l.map((r) => r.id || r.key).slice(0,
|
|
1167
|
-
return
|
|
1168
|
-
}), [
|
|
1169
|
-
|
|
1170
|
-
const [de,
|
|
1173
|
+
const t = l.map((r) => r.id || r.key).slice(0, Y);
|
|
1174
|
+
return ie(t);
|
|
1175
|
+
}), [le, Ye] = y(!1), [ve, $e] = y([]), [pt, It] = y({ top: 0, left: 0, width: 0 }), [mt, ht] = y(/* @__PURE__ */ new Set()), [gt, yt] = y(/* @__PURE__ */ new Set()), Ie = X(null);
|
|
1176
|
+
Ie.current === null && (Ie.current = [...$]);
|
|
1177
|
+
const [de, Qe] = y(null), [Lt, Le] = y(null), Se = X(null), qe = X(null), Ze = X(null), [xt, Ve] = y(null), [et, Ot] = y({}), Pt = X(null), Oe = X(null), K = (e) => e.id || e.key, Pe = O((e) => {
|
|
1171
1178
|
if (typeof e == "number" && Number.isFinite(e))
|
|
1172
1179
|
return e;
|
|
1173
1180
|
if (typeof e == "string") {
|
|
@@ -1180,20 +1187,20 @@ function Vn({
|
|
|
1180
1187
|
return Number.isFinite(r) && `${r}` === t ? r : null;
|
|
1181
1188
|
}
|
|
1182
1189
|
return null;
|
|
1183
|
-
}, []), bt =
|
|
1184
|
-
if (!
|
|
1190
|
+
}, []), bt = O((e, t) => et[e] != null ? `${et[e]}px` : typeof t == "number" ? `${t}px` : t || "auto", [et]), Te = O((e) => {
|
|
1191
|
+
if (!Oe.current)
|
|
1185
1192
|
return;
|
|
1186
|
-
const { columnId: t, startX: r, startWidth: i, minWidth:
|
|
1187
|
-
|
|
1188
|
-
}, []),
|
|
1189
|
-
|
|
1190
|
-
}, [
|
|
1191
|
-
var
|
|
1193
|
+
const { columnId: t, startX: r, startWidth: i, minWidth: o, maxWidth: f } = Oe.current, d = e.clientX - r, v = Math.round(i + d), P = Math.min(f, Math.max(o, v));
|
|
1194
|
+
Ot((T) => ({ ...T, [t]: P }));
|
|
1195
|
+
}, []), ze = O(() => {
|
|
1196
|
+
Oe.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", Te), document.removeEventListener("mouseup", ze);
|
|
1197
|
+
}, [Te]), Tt = O((e, t, r) => {
|
|
1198
|
+
var He;
|
|
1192
1199
|
e.preventDefault(), e.stopPropagation();
|
|
1193
|
-
const i = t.id || t.key,
|
|
1194
|
-
|
|
1195
|
-
}, [L, R,
|
|
1196
|
-
_(() => () =>
|
|
1200
|
+
const i = t.id || t.key, o = Pe(t.minWidth) ?? R, f = Pe(t.maxWidth) ?? L, d = Math.min(o, f), v = Math.max(o, f), P = ((He = e.currentTarget.closest("th")) == null ? void 0 : He.getBoundingClientRect().width) || 0, T = Pe(r), Me = T ?? Math.max(d, Math.round(P) || d), tt = Math.min(v, Math.max(d, Me));
|
|
1201
|
+
Oe.current = { columnId: i, startX: e.clientX, startWidth: tt, minWidth: d, maxWidth: v }, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", Te), document.addEventListener("mouseup", ze);
|
|
1202
|
+
}, [L, R, Te, ze, Pe]);
|
|
1203
|
+
_(() => () => ze(), [ze]);
|
|
1197
1204
|
const jt = ln(
|
|
1198
1205
|
zt(hn),
|
|
1199
1206
|
zt(mn, {
|
|
@@ -1202,167 +1209,167 @@ function Vn({
|
|
|
1202
1209
|
), _t = (e) => {
|
|
1203
1210
|
const { active: t, over: r } = e;
|
|
1204
1211
|
if (r && t.id !== r.id) {
|
|
1205
|
-
if (t.id ===
|
|
1206
|
-
St("Cannot drop columns on the Action column"),
|
|
1212
|
+
if (t.id === A || r.id === A) {
|
|
1213
|
+
St("Cannot drop columns on the Action column"), Ve(null);
|
|
1207
1214
|
return;
|
|
1208
1215
|
}
|
|
1209
|
-
|
|
1210
|
-
const
|
|
1211
|
-
if (
|
|
1212
|
-
const d =
|
|
1216
|
+
oe.current = !0, Re((i) => {
|
|
1217
|
+
const o = i.indexOf(t.id), f = i.indexOf(r.id);
|
|
1218
|
+
if (o !== -1 && f !== -1) {
|
|
1219
|
+
const d = ot(i, o, f), v = ie(d);
|
|
1213
1220
|
return wt(v), v;
|
|
1214
1221
|
}
|
|
1215
1222
|
return i;
|
|
1216
1223
|
}), ft((i) => {
|
|
1217
|
-
const
|
|
1218
|
-
return
|
|
1224
|
+
const o = i.indexOf(t.id), f = i.indexOf(r.id);
|
|
1225
|
+
return ot(i, o, f);
|
|
1219
1226
|
});
|
|
1220
1227
|
}
|
|
1221
|
-
|
|
1228
|
+
Ve(null);
|
|
1222
1229
|
}, Ht = (e) => {
|
|
1223
|
-
|
|
1224
|
-
},
|
|
1225
|
-
if (
|
|
1230
|
+
Ve(e.active.id);
|
|
1231
|
+
}, je = ue(() => {
|
|
1232
|
+
if (j)
|
|
1226
1233
|
return n || [];
|
|
1227
1234
|
if (!n || n.length === 0)
|
|
1228
1235
|
return [];
|
|
1229
|
-
const e =
|
|
1236
|
+
const e = De.trim().toLowerCase(), t = Object.entries(H).filter(([, r]) => Ee(r));
|
|
1230
1237
|
return n.filter((r) => {
|
|
1231
|
-
for (const [i,
|
|
1232
|
-
const
|
|
1233
|
-
if (
|
|
1238
|
+
for (const [i, o] of t) {
|
|
1239
|
+
const f = r[i];
|
|
1240
|
+
if (f == null)
|
|
1234
1241
|
return !1;
|
|
1235
|
-
if (Array.isArray(
|
|
1236
|
-
const d = String(
|
|
1237
|
-
if (!
|
|
1242
|
+
if (Array.isArray(o)) {
|
|
1243
|
+
const d = String(f);
|
|
1244
|
+
if (!o.some((v) => String(v) === d))
|
|
1238
1245
|
return !1;
|
|
1239
1246
|
continue;
|
|
1240
1247
|
}
|
|
1241
|
-
if (
|
|
1242
|
-
const d =
|
|
1243
|
-
if (isNaN(d) ||
|
|
1248
|
+
if (o.type === "range") {
|
|
1249
|
+
const d = ct(f);
|
|
1250
|
+
if (isNaN(d) || o.min !== "" && o.min != null && d < Number(o.min) || o.max !== "" && o.max != null && d > Number(o.max))
|
|
1244
1251
|
return !1;
|
|
1245
1252
|
continue;
|
|
1246
1253
|
}
|
|
1247
|
-
if (
|
|
1248
|
-
const d = Mn(
|
|
1249
|
-
if (isNaN(d) ||
|
|
1254
|
+
if (o.type === "durationRange") {
|
|
1255
|
+
const d = Mn(f);
|
|
1256
|
+
if (isNaN(d) || o.minSec !== "" && o.minSec != null && d < Number(o.minSec) || o.maxSec !== "" && o.maxSec != null && d > Number(o.maxSec))
|
|
1250
1257
|
return !1;
|
|
1251
1258
|
continue;
|
|
1252
1259
|
}
|
|
1253
|
-
if (
|
|
1254
|
-
const d =
|
|
1260
|
+
if (o.type === "scoreRange") {
|
|
1261
|
+
const d = ct(f);
|
|
1255
1262
|
if (isNaN(d))
|
|
1256
1263
|
return !1;
|
|
1257
|
-
if (Array.isArray(
|
|
1264
|
+
if (Array.isArray(o.values) && o.values.length > 0) {
|
|
1258
1265
|
const v = Math.floor(d);
|
|
1259
|
-
if (!
|
|
1266
|
+
if (!o.values.includes(v))
|
|
1260
1267
|
return !1;
|
|
1261
1268
|
continue;
|
|
1262
1269
|
}
|
|
1263
|
-
if (
|
|
1270
|
+
if (o.min !== "" && o.min != null && d < Number(o.min) || o.max !== "" && o.max != null && d > Number(o.max))
|
|
1264
1271
|
return !1;
|
|
1265
1272
|
continue;
|
|
1266
1273
|
}
|
|
1267
|
-
if (
|
|
1268
|
-
const d = En(
|
|
1274
|
+
if (o.type === "dateRange") {
|
|
1275
|
+
const d = En(f);
|
|
1269
1276
|
if (!d)
|
|
1270
1277
|
return !1;
|
|
1271
|
-
if (
|
|
1272
|
-
const v = /* @__PURE__ */ new Date(
|
|
1278
|
+
if (o.from) {
|
|
1279
|
+
const v = /* @__PURE__ */ new Date(o.from + "T00:00:00");
|
|
1273
1280
|
if (d < v)
|
|
1274
1281
|
return !1;
|
|
1275
1282
|
}
|
|
1276
|
-
if (
|
|
1277
|
-
const v = /* @__PURE__ */ new Date(
|
|
1283
|
+
if (o.to) {
|
|
1284
|
+
const v = /* @__PURE__ */ new Date(o.to + "T23:59:59");
|
|
1278
1285
|
if (d > v)
|
|
1279
1286
|
return !1;
|
|
1280
1287
|
}
|
|
1281
1288
|
continue;
|
|
1282
1289
|
}
|
|
1283
1290
|
}
|
|
1284
|
-
return !(e && !Object.values(r).some((
|
|
1291
|
+
return !(e && !Object.values(r).some((o) => o == null ? !1 : String(o).toLowerCase().includes(e)));
|
|
1285
1292
|
});
|
|
1286
|
-
}, [n,
|
|
1287
|
-
const r = e[
|
|
1293
|
+
}, [n, H, De, j]), Be = ue(() => J || !Ce ? je : [...je].sort((e, t) => {
|
|
1294
|
+
const r = e[Ce], i = t[Ce];
|
|
1288
1295
|
if (r == null)
|
|
1289
1296
|
return 1;
|
|
1290
1297
|
if (i == null)
|
|
1291
1298
|
return -1;
|
|
1292
1299
|
if (typeof r == "number" && typeof i == "number")
|
|
1293
|
-
return
|
|
1294
|
-
const
|
|
1295
|
-
return
|
|
1296
|
-
}), [
|
|
1297
|
-
if (
|
|
1298
|
-
return
|
|
1300
|
+
return Ae === "asc" ? r - i : i - r;
|
|
1301
|
+
const o = String(r).toLowerCase(), f = String(i).toLowerCase();
|
|
1302
|
+
return Ae === "asc" ? o.localeCompare(f) : f.localeCompare(o);
|
|
1303
|
+
}), [je, Ce, Ae, J]), _e = ue(() => {
|
|
1304
|
+
if (Q)
|
|
1305
|
+
return Be;
|
|
1299
1306
|
{
|
|
1300
|
-
const e = (
|
|
1301
|
-
return
|
|
1307
|
+
const e = (V - 1) * re, t = e + re;
|
|
1308
|
+
return Be.slice(e, t);
|
|
1302
1309
|
}
|
|
1303
|
-
}, [
|
|
1304
|
-
|
|
1310
|
+
}, [Be, V, re, Q]), vt = (e) => {
|
|
1311
|
+
J && E ? (E(e), x ? x(1) : q(1)) : (te === e ? se(Ue === "asc" ? "desc" : "asc") : (ge(e), se("asc")), xe(1));
|
|
1305
1312
|
}, Kt = (e, t) => {
|
|
1306
1313
|
const r = (t || "").split(/\s+/).map((i) => i.trim()).filter(Boolean);
|
|
1307
|
-
|
|
1314
|
+
Ge(e, r);
|
|
1308
1315
|
}, St = (e) => {
|
|
1309
|
-
|
|
1310
|
-
|
|
1316
|
+
Ze.current || (typeof I == "function" && I(e), Ze.current = setTimeout(() => {
|
|
1317
|
+
Ze.current = null;
|
|
1311
1318
|
}, 3e3));
|
|
1312
|
-
}, wt =
|
|
1313
|
-
if (typeof window < "u" &&
|
|
1319
|
+
}, wt = O((e) => {
|
|
1320
|
+
if (typeof window < "u" && ee && e.length > 0 && oe.current)
|
|
1314
1321
|
try {
|
|
1315
|
-
localStorage.setItem(
|
|
1322
|
+
localStorage.setItem(ee, JSON.stringify(e)), ce && localStorage.setItem(ce, "true");
|
|
1316
1323
|
} catch (t) {
|
|
1317
1324
|
console.warn("Failed to save columns to localStorage:", t);
|
|
1318
1325
|
}
|
|
1319
|
-
}, [
|
|
1320
|
-
e !==
|
|
1326
|
+
}, [ee, ce]), Xt = (e) => {
|
|
1327
|
+
e !== A && $e((t) => t.includes(e) ? t.length === 1 ? t : t.filter((r) => r !== e) : t.length >= Y ? (St("Maximum 9 column selection allowed"), t) : ie([...t, e]));
|
|
1321
1328
|
}, Ut = (e, t) => {
|
|
1322
|
-
|
|
1329
|
+
ve[t] !== A && Qe(t);
|
|
1323
1330
|
}, Gt = () => {
|
|
1324
|
-
|
|
1331
|
+
Qe(null), Le(null);
|
|
1325
1332
|
}, Jt = (e, t) => {
|
|
1326
|
-
e.preventDefault(), de !== null && de !== t &&
|
|
1333
|
+
e.preventDefault(), de !== null && de !== t && Le(t);
|
|
1327
1334
|
}, Yt = () => {
|
|
1328
|
-
|
|
1335
|
+
Le(null);
|
|
1329
1336
|
}, Qt = (e, t) => {
|
|
1330
|
-
e.preventDefault(), de !== null && de !== t &&
|
|
1331
|
-
const i =
|
|
1332
|
-
return
|
|
1333
|
-
}),
|
|
1337
|
+
e.preventDefault(), de !== null && de !== t && ve[t] !== A && ve[de] !== A && $e((r) => {
|
|
1338
|
+
const i = ot(r, de, t);
|
|
1339
|
+
return ie(i);
|
|
1340
|
+
}), Qe(null), Le(null);
|
|
1334
1341
|
};
|
|
1335
1342
|
_(() => {
|
|
1336
1343
|
ft((e) => {
|
|
1337
|
-
const t =
|
|
1344
|
+
const t = $.filter((o) => e.includes(o)), r = $.filter((o) => !e.includes(o)), i = e.filter((o) => !$.includes(o));
|
|
1338
1345
|
return [...t, ...r, ...i];
|
|
1339
1346
|
});
|
|
1340
|
-
}, [
|
|
1341
|
-
if (typeof window < "u" &&
|
|
1347
|
+
}, [$]), _(() => {
|
|
1348
|
+
if (typeof window < "u" && ee && $.length > 0 && oe.current)
|
|
1342
1349
|
try {
|
|
1343
|
-
const e =
|
|
1344
|
-
localStorage.setItem(
|
|
1350
|
+
const e = ie($);
|
|
1351
|
+
localStorage.setItem(ee, JSON.stringify(e)), ce && localStorage.setItem(ce, "true");
|
|
1345
1352
|
} catch (e) {
|
|
1346
1353
|
console.warn("Failed to save columns to localStorage:", e);
|
|
1347
1354
|
}
|
|
1348
|
-
}, [
|
|
1349
|
-
|
|
1350
|
-
|
|
1355
|
+
}, [$, ee, ce]), _(() => {
|
|
1356
|
+
fe && fe(
|
|
1357
|
+
$.filter((e) => e !== A)
|
|
1351
1358
|
);
|
|
1352
|
-
}, [
|
|
1353
|
-
if (l.length > 0 &&
|
|
1354
|
-
if (typeof window < "u" &&
|
|
1359
|
+
}, [$, fe]), _(() => {
|
|
1360
|
+
if (l.length > 0 && $.length === 0) {
|
|
1361
|
+
if (typeof window < "u" && D)
|
|
1355
1362
|
try {
|
|
1356
|
-
if (localStorage.getItem(`dataTable_manual_change_${
|
|
1357
|
-
const r = localStorage.getItem(`dataTable_columns_${
|
|
1363
|
+
if (localStorage.getItem(`dataTable_manual_change_${D}:${W}`) === "true") {
|
|
1364
|
+
const r = localStorage.getItem(`dataTable_columns_${D}:${W}`);
|
|
1358
1365
|
if (r) {
|
|
1359
1366
|
const i = JSON.parse(r);
|
|
1360
1367
|
if (Array.isArray(i) && i.length > 0) {
|
|
1361
|
-
const
|
|
1362
|
-
(
|
|
1368
|
+
const o = i.filter(
|
|
1369
|
+
(f) => l.some((d) => (d.id || d.key) === f)
|
|
1363
1370
|
);
|
|
1364
|
-
if (
|
|
1365
|
-
|
|
1371
|
+
if (o.length > 0) {
|
|
1372
|
+
oe.current = !0, Re(o.slice(0, Y));
|
|
1366
1373
|
return;
|
|
1367
1374
|
}
|
|
1368
1375
|
}
|
|
@@ -1372,19 +1379,19 @@ function Vn({
|
|
|
1372
1379
|
console.warn("Failed to load saved columns from localStorage:", t);
|
|
1373
1380
|
}
|
|
1374
1381
|
const e = l.map((t) => t.id || t.key);
|
|
1375
|
-
|
|
1382
|
+
Re(ie(e.slice(0, Y)));
|
|
1376
1383
|
}
|
|
1377
|
-
}, [l,
|
|
1378
|
-
const
|
|
1379
|
-
const e =
|
|
1380
|
-
return
|
|
1381
|
-
}, [l,
|
|
1382
|
-
ue(() =>
|
|
1383
|
-
if (!
|
|
1384
|
+
}, [l, D, W, ie]);
|
|
1385
|
+
const we = ue(() => {
|
|
1386
|
+
const e = $.map((t) => l.find((r) => K(r) === t)).filter(Boolean);
|
|
1387
|
+
return ie(e.map(K)).map((t) => l.find((r) => K(r) === t)).filter(Boolean);
|
|
1388
|
+
}, [l, $]);
|
|
1389
|
+
ue(() => we.some((e) => e.filterable === !0), [we]), _(() => {
|
|
1390
|
+
if (!le || !Se.current)
|
|
1384
1391
|
return;
|
|
1385
1392
|
const e = () => {
|
|
1386
|
-
if (
|
|
1387
|
-
const t =
|
|
1393
|
+
if (Se.current) {
|
|
1394
|
+
const t = Se.current.getBoundingClientRect(), r = 217, i = Math.max(8, t.right - r);
|
|
1388
1395
|
It({
|
|
1389
1396
|
top: t.bottom,
|
|
1390
1397
|
left: i,
|
|
@@ -1395,66 +1402,66 @@ function Vn({
|
|
|
1395
1402
|
return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
1396
1403
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
1397
1404
|
};
|
|
1398
|
-
}, [
|
|
1405
|
+
}, [le]), _(() => {
|
|
1399
1406
|
const e = (t) => {
|
|
1400
|
-
|
|
1407
|
+
le && Se.current && !Se.current.contains(t.target) && qe.current && !qe.current.contains(t.target) && Ye(!1);
|
|
1401
1408
|
};
|
|
1402
|
-
if (
|
|
1409
|
+
if (le)
|
|
1403
1410
|
return document.addEventListener("mousedown", e), () => {
|
|
1404
1411
|
document.removeEventListener("mousedown", e);
|
|
1405
1412
|
};
|
|
1406
|
-
}, [
|
|
1407
|
-
|
|
1408
|
-
}, [
|
|
1413
|
+
}, [le]), _(() => {
|
|
1414
|
+
le && ($e($), ht(/* @__PURE__ */ new Set()), yt(/* @__PURE__ */ new Set()));
|
|
1415
|
+
}, [le, $]), $.length === 1 ? (Rt = l.find((e) => (e.id || e.key) === $[0])) != null && Rt.label : `${$.length}`;
|
|
1409
1416
|
function qt({ column: e, isHeaderRow: t = !0 }) {
|
|
1410
|
-
const r =
|
|
1417
|
+
const r = K(e), i = r === A, o = bt(r, e.width), [f, d] = y(!1), {
|
|
1411
1418
|
attributes: v,
|
|
1412
1419
|
listeners: P,
|
|
1413
|
-
setNodeRef:
|
|
1414
|
-
transform:
|
|
1415
|
-
transition:
|
|
1416
|
-
isDragging:
|
|
1420
|
+
setNodeRef: T,
|
|
1421
|
+
transform: Me,
|
|
1422
|
+
transition: tt,
|
|
1423
|
+
isDragging: He
|
|
1417
1424
|
} = gn({ id: r }), Vt = {
|
|
1418
|
-
transform: yn.Transform.toString(
|
|
1419
|
-
transition:
|
|
1420
|
-
opacity:
|
|
1421
|
-
width:
|
|
1422
|
-
minWidth:
|
|
1425
|
+
transform: yn.Transform.toString(Me),
|
|
1426
|
+
transition: tt,
|
|
1427
|
+
opacity: He ? 0.5 : 1,
|
|
1428
|
+
width: o,
|
|
1429
|
+
minWidth: o
|
|
1423
1430
|
};
|
|
1424
|
-
let
|
|
1425
|
-
if (
|
|
1431
|
+
let Fe = !1;
|
|
1432
|
+
if (J && S.length > 0) {
|
|
1426
1433
|
const C = S[0][0];
|
|
1427
|
-
(C === r || C === "csat_score" && r === "evaluation.csat_score") && (
|
|
1434
|
+
(C === r || C === "csat_score" && r === "evaluation.csat_score") && (Fe = !0);
|
|
1428
1435
|
} else
|
|
1429
|
-
|
|
1430
|
-
const en =
|
|
1436
|
+
Fe = Ce === r;
|
|
1437
|
+
const en = Ae === "asc", tn = e.filterable === !0;
|
|
1431
1438
|
if (!t)
|
|
1432
|
-
return /* @__PURE__ */
|
|
1439
|
+
return /* @__PURE__ */ s(
|
|
1433
1440
|
"th",
|
|
1434
1441
|
{
|
|
1435
1442
|
style: {
|
|
1436
|
-
width:
|
|
1437
|
-
minWidth:
|
|
1443
|
+
width: o,
|
|
1444
|
+
minWidth: o,
|
|
1438
1445
|
backgroundColor: "var(--primary-foreground)",
|
|
1439
1446
|
borderRight: "1px solid #e6e6e6",
|
|
1440
1447
|
borderBottom: "1px solid #e6e6e6",
|
|
1441
1448
|
boxSizing: "border-box"
|
|
1442
1449
|
},
|
|
1443
1450
|
className: "sticky top-[57px] z-10 border-b border-[var(--border-strong)] px-4 py-2 text-left",
|
|
1444
|
-
children: tn ? /* @__PURE__ */
|
|
1445
|
-
/* @__PURE__ */
|
|
1451
|
+
children: tn ? /* @__PURE__ */ p("div", { className: "relative", children: [
|
|
1452
|
+
/* @__PURE__ */ s(
|
|
1446
1453
|
Filter,
|
|
1447
1454
|
{
|
|
1448
1455
|
size: 12,
|
|
1449
1456
|
className: "absolute left-2 top-1/2 -translate-y-1/2 text-[var(--text-faint)] pointer-events-none"
|
|
1450
1457
|
}
|
|
1451
1458
|
),
|
|
1452
|
-
/* @__PURE__ */
|
|
1459
|
+
/* @__PURE__ */ s(
|
|
1453
1460
|
"input",
|
|
1454
1461
|
{
|
|
1455
1462
|
type: "text",
|
|
1456
1463
|
placeholder: "Filter...",
|
|
1457
|
-
value:
|
|
1464
|
+
value: H[r] || "",
|
|
1458
1465
|
onChange: (C) => {
|
|
1459
1466
|
C.stopPropagation(), Kt(r, C.target.value);
|
|
1460
1467
|
},
|
|
@@ -1465,14 +1472,14 @@ function Vn({
|
|
|
1465
1472
|
autoComplete: "off"
|
|
1466
1473
|
}
|
|
1467
1474
|
)
|
|
1468
|
-
] }) : /* @__PURE__ */
|
|
1475
|
+
] }) : /* @__PURE__ */ s("div", { className: "h-[34px]" })
|
|
1469
1476
|
}
|
|
1470
1477
|
);
|
|
1471
|
-
const
|
|
1472
|
-
return /* @__PURE__ */
|
|
1478
|
+
const nt = z === r, Ke = Ee(H[r]), nn = e.sortable !== !1 && (f || Fe), rn = e.filterable !== !1 && !i && (f || nt || Ke);
|
|
1479
|
+
return /* @__PURE__ */ p(
|
|
1473
1480
|
"th",
|
|
1474
1481
|
{
|
|
1475
|
-
ref:
|
|
1482
|
+
ref: T,
|
|
1476
1483
|
onMouseEnter: () => d(!0),
|
|
1477
1484
|
onMouseLeave: () => d(!1),
|
|
1478
1485
|
style: {
|
|
@@ -1486,8 +1493,8 @@ function Vn({
|
|
|
1486
1493
|
textTransform: "none",
|
|
1487
1494
|
color: "#0b0b0b",
|
|
1488
1495
|
cursor: e.sortable !== !1 ? "pointer" : "default",
|
|
1489
|
-
width:
|
|
1490
|
-
...typeof
|
|
1496
|
+
width: o,
|
|
1497
|
+
...typeof o == "string" && o.endsWith("px") ? { maxWidth: o } : {},
|
|
1491
1498
|
borderRight: "1px solid #e6e6e6",
|
|
1492
1499
|
boxSizing: "border-box",
|
|
1493
1500
|
userSelect: "none",
|
|
@@ -1495,7 +1502,7 @@ function Vn({
|
|
|
1495
1502
|
wordBreak: "normal",
|
|
1496
1503
|
overflowWrap: "normal",
|
|
1497
1504
|
verticalAlign: "middle",
|
|
1498
|
-
background:
|
|
1505
|
+
background: f || nt ? "#e6e6e6" : "#f2f2f0",
|
|
1499
1506
|
borderBottom: "1px solid #e6e6e6",
|
|
1500
1507
|
position: "sticky",
|
|
1501
1508
|
top: 0,
|
|
@@ -1504,7 +1511,7 @@ function Vn({
|
|
|
1504
1511
|
transition: "background 100ms ease"
|
|
1505
1512
|
},
|
|
1506
1513
|
children: [
|
|
1507
|
-
!i && /* @__PURE__ */
|
|
1514
|
+
!i && /* @__PURE__ */ s(
|
|
1508
1515
|
"span",
|
|
1509
1516
|
{
|
|
1510
1517
|
"aria-hidden": "true",
|
|
@@ -1521,7 +1528,7 @@ function Vn({
|
|
|
1521
1528
|
}
|
|
1522
1529
|
}
|
|
1523
1530
|
),
|
|
1524
|
-
/* @__PURE__ */
|
|
1531
|
+
/* @__PURE__ */ p(
|
|
1525
1532
|
"div",
|
|
1526
1533
|
{
|
|
1527
1534
|
style: {
|
|
@@ -1536,7 +1543,7 @@ function Vn({
|
|
|
1536
1543
|
overflow: "hidden"
|
|
1537
1544
|
},
|
|
1538
1545
|
children: [
|
|
1539
|
-
!i && /* @__PURE__ */
|
|
1546
|
+
!i && /* @__PURE__ */ s(
|
|
1540
1547
|
"div",
|
|
1541
1548
|
{
|
|
1542
1549
|
...v,
|
|
@@ -1546,13 +1553,13 @@ function Vn({
|
|
|
1546
1553
|
color: "rgba(11, 11, 11, 0.36)",
|
|
1547
1554
|
display: "inline-flex",
|
|
1548
1555
|
alignItems: "center",
|
|
1549
|
-
visibility:
|
|
1556
|
+
visibility: f ? "visible" : "hidden",
|
|
1550
1557
|
flexShrink: 0
|
|
1551
1558
|
},
|
|
1552
|
-
children: /* @__PURE__ */
|
|
1559
|
+
children: /* @__PURE__ */ s(st, { size: 14 })
|
|
1553
1560
|
}
|
|
1554
1561
|
),
|
|
1555
|
-
/* @__PURE__ */
|
|
1562
|
+
/* @__PURE__ */ s(
|
|
1556
1563
|
"span",
|
|
1557
1564
|
{
|
|
1558
1565
|
onClick: () => e.sortable !== !1 && vt(r),
|
|
@@ -1569,7 +1576,7 @@ function Vn({
|
|
|
1569
1576
|
children: e.label
|
|
1570
1577
|
}
|
|
1571
1578
|
),
|
|
1572
|
-
nn && /* @__PURE__ */
|
|
1579
|
+
nn && /* @__PURE__ */ s(
|
|
1573
1580
|
"button",
|
|
1574
1581
|
{
|
|
1575
1582
|
type: "button",
|
|
@@ -1586,26 +1593,26 @@ function Vn({
|
|
|
1586
1593
|
display: "inline-flex",
|
|
1587
1594
|
alignItems: "center",
|
|
1588
1595
|
justifyContent: "center",
|
|
1589
|
-
color:
|
|
1596
|
+
color: Fe ? "#0b0b0b" : "rgba(11, 11, 11, 0.55)",
|
|
1590
1597
|
flexShrink: 0
|
|
1591
1598
|
},
|
|
1592
|
-
children:
|
|
1599
|
+
children: Fe ? en ? /* @__PURE__ */ s(Fn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(kn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(Dn, { size: 14, strokeWidth: 1.75 })
|
|
1593
1600
|
}
|
|
1594
1601
|
),
|
|
1595
|
-
rn && /* @__PURE__ */
|
|
1602
|
+
rn && /* @__PURE__ */ p(
|
|
1596
1603
|
"button",
|
|
1597
1604
|
{
|
|
1598
1605
|
type: "button",
|
|
1599
1606
|
ref: (C) => {
|
|
1600
|
-
|
|
1607
|
+
M.current[r] = C;
|
|
1601
1608
|
},
|
|
1602
1609
|
onClick: (C) => {
|
|
1603
|
-
C.stopPropagation(),
|
|
1610
|
+
C.stopPropagation(), $t(r, C.currentTarget);
|
|
1604
1611
|
},
|
|
1605
1612
|
title: "Filter",
|
|
1606
1613
|
style: {
|
|
1607
1614
|
position: "relative",
|
|
1608
|
-
background:
|
|
1615
|
+
background: nt || Ke ? "#D8D8D8" : "transparent",
|
|
1609
1616
|
border: "none",
|
|
1610
1617
|
padding: 4,
|
|
1611
1618
|
borderRadius: 4,
|
|
@@ -1613,12 +1620,12 @@ function Vn({
|
|
|
1613
1620
|
display: "inline-flex",
|
|
1614
1621
|
alignItems: "center",
|
|
1615
1622
|
justifyContent: "center",
|
|
1616
|
-
color:
|
|
1623
|
+
color: Ke ? "#0b0b0b" : "rgba(11, 11, 11, 0.7)",
|
|
1617
1624
|
flexShrink: 0
|
|
1618
1625
|
},
|
|
1619
1626
|
children: [
|
|
1620
|
-
/* @__PURE__ */
|
|
1621
|
-
|
|
1627
|
+
/* @__PURE__ */ s(Cn, { size: 14, strokeWidth: 1.75 }),
|
|
1628
|
+
Ke && /* @__PURE__ */ s(
|
|
1622
1629
|
"span",
|
|
1623
1630
|
{
|
|
1624
1631
|
"aria-hidden": "true",
|
|
@@ -1639,7 +1646,7 @@ function Vn({
|
|
|
1639
1646
|
]
|
|
1640
1647
|
}
|
|
1641
1648
|
),
|
|
1642
|
-
!i && /* @__PURE__ */
|
|
1649
|
+
!i && /* @__PURE__ */ s(
|
|
1643
1650
|
"span",
|
|
1644
1651
|
{
|
|
1645
1652
|
"aria-hidden": "true",
|
|
@@ -1656,14 +1663,14 @@ function Vn({
|
|
|
1656
1663
|
}
|
|
1657
1664
|
}
|
|
1658
1665
|
),
|
|
1659
|
-
!i && /* @__PURE__ */
|
|
1666
|
+
!i && /* @__PURE__ */ s(
|
|
1660
1667
|
"div",
|
|
1661
1668
|
{
|
|
1662
1669
|
role: "separator",
|
|
1663
1670
|
"aria-orientation": "vertical",
|
|
1664
1671
|
"aria-label": `Resize ${e.label || r} column`,
|
|
1665
1672
|
title: "Drag to resize column",
|
|
1666
|
-
onMouseDown: (C) => Tt(C, e,
|
|
1673
|
+
onMouseDown: (C) => Tt(C, e, o),
|
|
1667
1674
|
onClick: (C) => C.stopPropagation(),
|
|
1668
1675
|
onMouseEnter: (C) => {
|
|
1669
1676
|
C.currentTarget.style.background = "rgba(30, 33, 37, 0.18)";
|
|
@@ -1687,34 +1694,34 @@ function Vn({
|
|
|
1687
1694
|
}
|
|
1688
1695
|
);
|
|
1689
1696
|
}
|
|
1690
|
-
const Ft = xt ? l.find((e) =>
|
|
1691
|
-
const d = i && de ===
|
|
1697
|
+
const Ft = xt ? l.find((e) => K(e) === xt) : null, kt = ({ col: e, columnId: t, isSelected: r, draggable: i, isAction: o, actualIndex: f }) => {
|
|
1698
|
+
const d = i && de === f, v = i && Lt === f && de !== null && de !== f;
|
|
1692
1699
|
r ? gt.has(t) : mt.has(t);
|
|
1693
1700
|
const P = r ? !gt.has(t) : mt.has(t);
|
|
1694
|
-
return /* @__PURE__ */
|
|
1701
|
+
return /* @__PURE__ */ p(
|
|
1695
1702
|
"div",
|
|
1696
1703
|
{
|
|
1697
1704
|
draggable: i,
|
|
1698
|
-
onDragStart: i ? (
|
|
1705
|
+
onDragStart: i ? (T) => Ut(T, f) : void 0,
|
|
1699
1706
|
onDragEnd: i ? Gt : void 0,
|
|
1700
|
-
onDragOver: i ? (
|
|
1707
|
+
onDragOver: i ? (T) => Jt(T, f) : void 0,
|
|
1701
1708
|
onDragLeave: i ? Yt : void 0,
|
|
1702
|
-
onDrop: i ? (
|
|
1709
|
+
onDrop: i ? (T) => Qt(T, f) : void 0,
|
|
1703
1710
|
onClick: () => {
|
|
1704
|
-
|
|
1711
|
+
o || Xt(t);
|
|
1705
1712
|
},
|
|
1706
1713
|
style: {
|
|
1707
1714
|
display: "flex",
|
|
1708
1715
|
alignItems: "center",
|
|
1709
1716
|
gap: 4,
|
|
1710
1717
|
padding: "2px 0",
|
|
1711
|
-
cursor:
|
|
1718
|
+
cursor: o ? "default" : i ? "grab" : "pointer",
|
|
1712
1719
|
opacity: d ? 0.5 : 1,
|
|
1713
1720
|
background: v ? "#F2F2F0" : "transparent",
|
|
1714
1721
|
borderRadius: 6
|
|
1715
1722
|
},
|
|
1716
1723
|
children: [
|
|
1717
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ s(
|
|
1718
1725
|
"span",
|
|
1719
1726
|
{
|
|
1720
1727
|
style: {
|
|
@@ -1727,10 +1734,10 @@ function Vn({
|
|
|
1727
1734
|
visibility: i ? "visible" : "hidden",
|
|
1728
1735
|
flexShrink: 0
|
|
1729
1736
|
},
|
|
1730
|
-
children: /* @__PURE__ */
|
|
1737
|
+
children: /* @__PURE__ */ s(st, { size: 14, strokeWidth: 1.75 })
|
|
1731
1738
|
}
|
|
1732
1739
|
),
|
|
1733
|
-
/* @__PURE__ */
|
|
1740
|
+
/* @__PURE__ */ s(
|
|
1734
1741
|
"span",
|
|
1735
1742
|
{
|
|
1736
1743
|
style: {
|
|
@@ -1745,10 +1752,10 @@ function Vn({
|
|
|
1745
1752
|
flexShrink: 0,
|
|
1746
1753
|
marginLeft: 8
|
|
1747
1754
|
},
|
|
1748
|
-
children: P && /* @__PURE__ */
|
|
1755
|
+
children: P && /* @__PURE__ */ s(Xe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
1749
1756
|
}
|
|
1750
1757
|
),
|
|
1751
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ s(
|
|
1752
1759
|
"span",
|
|
1753
1760
|
{
|
|
1754
1761
|
style: {
|
|
@@ -1765,10 +1772,10 @@ function Vn({
|
|
|
1765
1772
|
]
|
|
1766
1773
|
}
|
|
1767
1774
|
);
|
|
1768
|
-
}, Zt =
|
|
1775
|
+
}, Zt = le ? /* @__PURE__ */ p(
|
|
1769
1776
|
"div",
|
|
1770
1777
|
{
|
|
1771
|
-
ref:
|
|
1778
|
+
ref: qe,
|
|
1772
1779
|
style: {
|
|
1773
1780
|
position: "fixed",
|
|
1774
1781
|
top: `${pt.top}px`,
|
|
@@ -1786,7 +1793,7 @@ function Vn({
|
|
|
1786
1793
|
boxShadow: "0 8px 24px rgba(11, 11, 11, 0.08)"
|
|
1787
1794
|
},
|
|
1788
1795
|
children: [
|
|
1789
|
-
/* @__PURE__ */
|
|
1796
|
+
/* @__PURE__ */ p(
|
|
1790
1797
|
"div",
|
|
1791
1798
|
{
|
|
1792
1799
|
style: {
|
|
@@ -1799,11 +1806,11 @@ function Vn({
|
|
|
1799
1806
|
gap: 12
|
|
1800
1807
|
},
|
|
1801
1808
|
children: [
|
|
1802
|
-
|
|
1803
|
-
if (e ===
|
|
1809
|
+
ve.map((e, t) => {
|
|
1810
|
+
if (e === A)
|
|
1804
1811
|
return null;
|
|
1805
|
-
const r = l.find((i) =>
|
|
1806
|
-
return r ? /* @__PURE__ */
|
|
1812
|
+
const r = l.find((i) => K(i) === e);
|
|
1813
|
+
return r ? /* @__PURE__ */ s(rt.Fragment, { children: kt({
|
|
1807
1814
|
col: r,
|
|
1808
1815
|
columnId: e,
|
|
1809
1816
|
isSelected: !0,
|
|
@@ -1813,11 +1820,11 @@ function Vn({
|
|
|
1813
1820
|
}) }, `selected-${e}-${t}`) : null;
|
|
1814
1821
|
}),
|
|
1815
1822
|
l.filter((e) => {
|
|
1816
|
-
const t =
|
|
1817
|
-
return t !==
|
|
1823
|
+
const t = K(e);
|
|
1824
|
+
return t !== A && !ve.includes(t);
|
|
1818
1825
|
}).map((e) => {
|
|
1819
|
-
const t =
|
|
1820
|
-
return /* @__PURE__ */
|
|
1826
|
+
const t = K(e);
|
|
1827
|
+
return /* @__PURE__ */ s(rt.Fragment, { children: kt({
|
|
1821
1828
|
col: e,
|
|
1822
1829
|
columnId: t,
|
|
1823
1830
|
isSelected: !1,
|
|
@@ -1829,7 +1836,7 @@ function Vn({
|
|
|
1829
1836
|
]
|
|
1830
1837
|
}
|
|
1831
1838
|
),
|
|
1832
|
-
/* @__PURE__ */
|
|
1839
|
+
/* @__PURE__ */ p(
|
|
1833
1840
|
"div",
|
|
1834
1841
|
{
|
|
1835
1842
|
style: {
|
|
@@ -1844,16 +1851,16 @@ function Vn({
|
|
|
1844
1851
|
boxSizing: "border-box"
|
|
1845
1852
|
},
|
|
1846
1853
|
children: [
|
|
1847
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ s(
|
|
1848
1855
|
"button",
|
|
1849
1856
|
{
|
|
1850
1857
|
type: "button",
|
|
1851
1858
|
onClick: (e) => {
|
|
1852
1859
|
e.preventDefault(), e.stopPropagation();
|
|
1853
|
-
const t =
|
|
1854
|
-
if (
|
|
1860
|
+
const t = Ie.current ? [...Ie.current] : l.map(K).slice(0, Y), r = ie(t);
|
|
1861
|
+
if (oe.current = !1, $e(r), Re(r), ht(/* @__PURE__ */ new Set()), yt(/* @__PURE__ */ new Set()), typeof window < "u" && ee)
|
|
1855
1862
|
try {
|
|
1856
|
-
localStorage.removeItem(
|
|
1863
|
+
localStorage.removeItem(ee);
|
|
1857
1864
|
} catch {
|
|
1858
1865
|
}
|
|
1859
1866
|
},
|
|
@@ -1870,14 +1877,14 @@ function Vn({
|
|
|
1870
1877
|
children: "Reset"
|
|
1871
1878
|
}
|
|
1872
1879
|
),
|
|
1873
|
-
/* @__PURE__ */
|
|
1880
|
+
/* @__PURE__ */ s(
|
|
1874
1881
|
"button",
|
|
1875
1882
|
{
|
|
1876
1883
|
type: "button",
|
|
1877
1884
|
onClick: (e) => {
|
|
1878
1885
|
e.preventDefault(), e.stopPropagation();
|
|
1879
|
-
const t =
|
|
1880
|
-
|
|
1886
|
+
const t = ie(ve);
|
|
1887
|
+
oe.current = !0, Re(t), wt(t), Ye(!1);
|
|
1881
1888
|
},
|
|
1882
1889
|
style: {
|
|
1883
1890
|
background: "#2E3236",
|
|
@@ -1899,26 +1906,26 @@ function Vn({
|
|
|
1899
1906
|
)
|
|
1900
1907
|
]
|
|
1901
1908
|
}
|
|
1902
|
-
) : null, Dt =
|
|
1903
|
-
|
|
1909
|
+
) : null, Dt = z ? l.find((e) => K(e) === z) : null, Ct = Dt ? /* @__PURE__ */ s(
|
|
1910
|
+
On,
|
|
1904
1911
|
{
|
|
1905
1912
|
column: Dt,
|
|
1906
|
-
columnId:
|
|
1907
|
-
filterType:
|
|
1908
|
-
position:
|
|
1909
|
-
popoverRef:
|
|
1910
|
-
distinctValues:
|
|
1911
|
-
initialValue:
|
|
1913
|
+
columnId: z,
|
|
1914
|
+
filterType: At(z),
|
|
1915
|
+
position: m,
|
|
1916
|
+
popoverRef: g,
|
|
1917
|
+
distinctValues: Je(z),
|
|
1918
|
+
initialValue: H[z],
|
|
1912
1919
|
onApply: (e) => {
|
|
1913
|
-
|
|
1920
|
+
Ge(z, e), he(null);
|
|
1914
1921
|
},
|
|
1915
|
-
onCancel: () =>
|
|
1922
|
+
onCancel: () => he(null)
|
|
1916
1923
|
},
|
|
1917
|
-
|
|
1924
|
+
z
|
|
1918
1925
|
) : null;
|
|
1919
|
-
return /* @__PURE__ */
|
|
1920
|
-
Ct &&
|
|
1921
|
-
l.length > 0 && (
|
|
1926
|
+
return /* @__PURE__ */ p("div", { className: "w-full", children: [
|
|
1927
|
+
Ct && at(Ct, document.body),
|
|
1928
|
+
l.length > 0 && (N || !ae) && /* @__PURE__ */ s(
|
|
1922
1929
|
"div",
|
|
1923
1930
|
{
|
|
1924
1931
|
className: "pt-2 pb-1",
|
|
@@ -1927,7 +1934,7 @@ function Vn({
|
|
|
1927
1934
|
zIndex: 35,
|
|
1928
1935
|
backgroundColor: "var(--primary-foreground)"
|
|
1929
1936
|
},
|
|
1930
|
-
children: /* @__PURE__ */
|
|
1937
|
+
children: /* @__PURE__ */ p(
|
|
1931
1938
|
"div",
|
|
1932
1939
|
{
|
|
1933
1940
|
style: {
|
|
@@ -1938,23 +1945,23 @@ function Vn({
|
|
|
1938
1945
|
flexWrap: "wrap"
|
|
1939
1946
|
},
|
|
1940
1947
|
children: [
|
|
1941
|
-
|
|
1948
|
+
N && /* @__PURE__ */ s("div", { style: { marginRight: "auto" }, children: /* @__PURE__ */ s(
|
|
1942
1949
|
Bn,
|
|
1943
1950
|
{
|
|
1944
|
-
dateRangePicker:
|
|
1945
|
-
onWeekToDate:
|
|
1946
|
-
exportConfig:
|
|
1947
|
-
filterChipsConfig:
|
|
1948
|
-
trailingActions:
|
|
1951
|
+
dateRangePicker: N.dateRangePicker,
|
|
1952
|
+
onWeekToDate: N.onWeekToDate,
|
|
1953
|
+
exportConfig: N.exportConfig,
|
|
1954
|
+
filterChipsConfig: N.filterChipsConfig,
|
|
1955
|
+
trailingActions: N.trailingActions
|
|
1949
1956
|
}
|
|
1950
1957
|
) }),
|
|
1951
|
-
!
|
|
1952
|
-
/* @__PURE__ */
|
|
1958
|
+
!ae && /* @__PURE__ */ p("div", { style: { position: "relative" }, children: [
|
|
1959
|
+
/* @__PURE__ */ p(
|
|
1953
1960
|
"button",
|
|
1954
1961
|
{
|
|
1955
|
-
ref:
|
|
1962
|
+
ref: Se,
|
|
1956
1963
|
type: "button",
|
|
1957
|
-
onClick: () =>
|
|
1964
|
+
onClick: () => Ye(!le),
|
|
1958
1965
|
style: {
|
|
1959
1966
|
display: "inline-flex",
|
|
1960
1967
|
alignItems: "center",
|
|
@@ -1972,19 +1979,19 @@ function Vn({
|
|
|
1972
1979
|
whiteSpace: "nowrap"
|
|
1973
1980
|
},
|
|
1974
1981
|
children: [
|
|
1975
|
-
/* @__PURE__ */
|
|
1982
|
+
/* @__PURE__ */ s(vn, { size: 20, strokeWidth: 1.75 }),
|
|
1976
1983
|
"Columns"
|
|
1977
1984
|
]
|
|
1978
1985
|
}
|
|
1979
1986
|
),
|
|
1980
|
-
|
|
1987
|
+
le && at(Zt, document.body)
|
|
1981
1988
|
] })
|
|
1982
1989
|
]
|
|
1983
1990
|
}
|
|
1984
1991
|
)
|
|
1985
1992
|
}
|
|
1986
1993
|
),
|
|
1987
|
-
Object.keys(
|
|
1994
|
+
Object.keys(H).length > 0 && /* @__PURE__ */ p(
|
|
1988
1995
|
"div",
|
|
1989
1996
|
{
|
|
1990
1997
|
style: {
|
|
@@ -1995,12 +2002,12 @@ function Vn({
|
|
|
1995
2002
|
padding: "8px 0"
|
|
1996
2003
|
},
|
|
1997
2004
|
children: [
|
|
1998
|
-
Object.entries(
|
|
1999
|
-
const r = l.find((d) =>
|
|
2000
|
-
if (!r || !
|
|
2005
|
+
Object.entries(H).map(([e, t]) => {
|
|
2006
|
+
const r = l.find((d) => K(d) === e);
|
|
2007
|
+
if (!r || !Ee(t))
|
|
2001
2008
|
return null;
|
|
2002
|
-
const i = Wn(t),
|
|
2003
|
-
return /* @__PURE__ */
|
|
2009
|
+
const i = Wn(t), o = An(t), f = $n(t);
|
|
2010
|
+
return /* @__PURE__ */ p(
|
|
2004
2011
|
"span",
|
|
2005
2012
|
{
|
|
2006
2013
|
style: {
|
|
@@ -2019,19 +2026,19 @@ function Vn({
|
|
|
2019
2026
|
whiteSpace: "nowrap"
|
|
2020
2027
|
},
|
|
2021
2028
|
children: [
|
|
2022
|
-
/* @__PURE__ */
|
|
2023
|
-
/* @__PURE__ */
|
|
2029
|
+
/* @__PURE__ */ p("span", { children: [
|
|
2030
|
+
/* @__PURE__ */ p("span", { style: { color: "#676767" }, children: [
|
|
2024
2031
|
r.label,
|
|
2025
2032
|
": "
|
|
2026
2033
|
] }),
|
|
2027
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ s("span", { children: i })
|
|
2028
2035
|
] }),
|
|
2029
|
-
|
|
2030
|
-
/* @__PURE__ */
|
|
2036
|
+
o > 0 && /* @__PURE__ */ s(In, { count: o, values: f }),
|
|
2037
|
+
/* @__PURE__ */ s(
|
|
2031
2038
|
"button",
|
|
2032
2039
|
{
|
|
2033
2040
|
type: "button",
|
|
2034
|
-
onClick: () =>
|
|
2041
|
+
onClick: () => Ge(e, []),
|
|
2035
2042
|
"aria-label": `Remove ${r.label} filter`,
|
|
2036
2043
|
style: {
|
|
2037
2044
|
background: "transparent",
|
|
@@ -2041,7 +2048,7 @@ function Vn({
|
|
|
2041
2048
|
display: "inline-flex",
|
|
2042
2049
|
color: "#676767"
|
|
2043
2050
|
},
|
|
2044
|
-
children: /* @__PURE__ */
|
|
2051
|
+
children: /* @__PURE__ */ s(Sn, { size: 14, strokeWidth: 2 })
|
|
2045
2052
|
}
|
|
2046
2053
|
)
|
|
2047
2054
|
]
|
|
@@ -2049,7 +2056,7 @@ function Vn({
|
|
|
2049
2056
|
`chip-${e}`
|
|
2050
2057
|
);
|
|
2051
2058
|
}),
|
|
2052
|
-
/* @__PURE__ */
|
|
2059
|
+
/* @__PURE__ */ s(
|
|
2053
2060
|
"button",
|
|
2054
2061
|
{
|
|
2055
2062
|
type: "button",
|
|
@@ -2071,7 +2078,7 @@ function Vn({
|
|
|
2071
2078
|
]
|
|
2072
2079
|
}
|
|
2073
2080
|
),
|
|
2074
|
-
l.length > 0 &&
|
|
2081
|
+
l.length > 0 && we.length > 0 ? /* @__PURE__ */ p(
|
|
2075
2082
|
an,
|
|
2076
2083
|
{
|
|
2077
2084
|
sensors: jt,
|
|
@@ -2079,7 +2086,7 @@ function Vn({
|
|
|
2079
2086
|
onDragStart: Ht,
|
|
2080
2087
|
onDragEnd: _t,
|
|
2081
2088
|
children: [
|
|
2082
|
-
/* @__PURE__ */
|
|
2089
|
+
/* @__PURE__ */ p("div", { style: {
|
|
2083
2090
|
borderRadius: 8,
|
|
2084
2091
|
border: "1px solid #E6E6E6",
|
|
2085
2092
|
overflow: "hidden",
|
|
@@ -2087,7 +2094,7 @@ function Vn({
|
|
|
2087
2094
|
position: "relative",
|
|
2088
2095
|
top: "0.5rem"
|
|
2089
2096
|
}, children: [
|
|
2090
|
-
|
|
2097
|
+
U && /* @__PURE__ */ s("div", { style: {
|
|
2091
2098
|
position: "absolute",
|
|
2092
2099
|
inset: 0,
|
|
2093
2100
|
background: "rgba(255, 255, 255, 0.9)",
|
|
@@ -2098,18 +2105,18 @@ function Vn({
|
|
|
2098
2105
|
alignItems: "center",
|
|
2099
2106
|
justifyContent: "center",
|
|
2100
2107
|
borderRadius: "14px"
|
|
2101
|
-
}, children: /* @__PURE__ */
|
|
2108
|
+
}, children: /* @__PURE__ */ p("div", { style: {
|
|
2102
2109
|
display: "flex",
|
|
2103
2110
|
flexDirection: "column",
|
|
2104
2111
|
alignItems: "center",
|
|
2105
2112
|
gap: "12px"
|
|
2106
2113
|
}, children: [
|
|
2107
|
-
/* @__PURE__ */
|
|
2114
|
+
/* @__PURE__ */ s("p", { style: {
|
|
2108
2115
|
fontSize: "13px",
|
|
2109
2116
|
color: "rgba(30, 33, 37, 0.6)",
|
|
2110
2117
|
margin: 0
|
|
2111
2118
|
}, children: "Loading..." }),
|
|
2112
|
-
/* @__PURE__ */
|
|
2119
|
+
/* @__PURE__ */ s(
|
|
2113
2120
|
Tn,
|
|
2114
2121
|
{
|
|
2115
2122
|
src: "/BrandLoading.gif",
|
|
@@ -2121,7 +2128,7 @@ function Vn({
|
|
|
2121
2128
|
}
|
|
2122
2129
|
)
|
|
2123
2130
|
] }) }),
|
|
2124
|
-
/* @__PURE__ */
|
|
2131
|
+
/* @__PURE__ */ s("div", { className: "overflow-x-auto custom-thin-scrollbar-hidden", ref: Pt, style: { maxHeight: "500px", overflowY: "auto", position: "relative", zIndex: 1 }, children: /* @__PURE__ */ p("table", { style: {
|
|
2125
2132
|
width: "auto",
|
|
2126
2133
|
minWidth: "100%",
|
|
2127
2134
|
tableLayout: "fixed",
|
|
@@ -2131,18 +2138,18 @@ function Vn({
|
|
|
2131
2138
|
border: "1px solid #e6e6e6",
|
|
2132
2139
|
boxSizing: "border-box"
|
|
2133
2140
|
}, children: [
|
|
2134
|
-
/* @__PURE__ */
|
|
2141
|
+
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
|
|
2135
2142
|
dn,
|
|
2136
2143
|
{
|
|
2137
|
-
items:
|
|
2144
|
+
items: $,
|
|
2138
2145
|
strategy: un,
|
|
2139
|
-
children:
|
|
2146
|
+
children: we.map((e) => /* @__PURE__ */ s(qt, { column: e, isHeaderRow: !0 }, `header-${K(e)}`))
|
|
2140
2147
|
}
|
|
2141
2148
|
) }) }),
|
|
2142
|
-
/* @__PURE__ */
|
|
2149
|
+
/* @__PURE__ */ s("tbody", { children: !U && _e.length === 0 ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
|
|
2143
2150
|
"td",
|
|
2144
2151
|
{
|
|
2145
|
-
colSpan:
|
|
2152
|
+
colSpan: we.length,
|
|
2146
2153
|
style: {
|
|
2147
2154
|
padding: "32px",
|
|
2148
2155
|
textAlign: "center",
|
|
@@ -2152,7 +2159,7 @@ function Vn({
|
|
|
2152
2159
|
},
|
|
2153
2160
|
children: "No results found"
|
|
2154
2161
|
}
|
|
2155
|
-
) }) : !
|
|
2162
|
+
) }) : !U && _e.length > 0 ? _e.map((e, t) => /* @__PURE__ */ s(
|
|
2156
2163
|
"tr",
|
|
2157
2164
|
{
|
|
2158
2165
|
"data-row-id": e.id || t,
|
|
@@ -2170,9 +2177,9 @@ function Vn({
|
|
|
2170
2177
|
onMouseLeave: (r) => {
|
|
2171
2178
|
r.currentTarget.style.background = "transparent";
|
|
2172
2179
|
},
|
|
2173
|
-
children:
|
|
2174
|
-
const i =
|
|
2175
|
-
return /* @__PURE__ */
|
|
2180
|
+
children: we.map((r) => {
|
|
2181
|
+
const i = K(r), o = bt(i, r.width), f = e[i], d = r.render ? r.render(f, e) : f, v = o && o !== "auto", P = typeof d == "string" && d.trim() !== "", T = v && P, Me = T ? /* @__PURE__ */ s(ne, { content: d, children: d }) : d;
|
|
2182
|
+
return /* @__PURE__ */ s(
|
|
2176
2183
|
"td",
|
|
2177
2184
|
{
|
|
2178
2185
|
style: {
|
|
@@ -2181,11 +2188,11 @@ function Vn({
|
|
|
2181
2188
|
fontSize: "13px",
|
|
2182
2189
|
borderRight: "1px solid #e6e6e6",
|
|
2183
2190
|
boxSizing: "border-box",
|
|
2184
|
-
width:
|
|
2191
|
+
width: o,
|
|
2185
2192
|
fontFamily: "var(--font-sans)",
|
|
2186
|
-
...
|
|
2193
|
+
...T && { maxWidth: o || "200px" }
|
|
2187
2194
|
},
|
|
2188
|
-
children:
|
|
2195
|
+
children: Me
|
|
2189
2196
|
},
|
|
2190
2197
|
i
|
|
2191
2198
|
);
|
|
@@ -2195,26 +2202,26 @@ function Vn({
|
|
|
2195
2202
|
)) : null })
|
|
2196
2203
|
] }) })
|
|
2197
2204
|
] }),
|
|
2198
|
-
/* @__PURE__ */
|
|
2199
|
-
/* @__PURE__ */
|
|
2200
|
-
/* @__PURE__ */
|
|
2205
|
+
/* @__PURE__ */ s(fn, { children: Ft ? /* @__PURE__ */ s("div", { className: "bg-[var(--paper-high)] border border-[var(--border-strong)] rounded px-4 py-2 shadow-lg", children: /* @__PURE__ */ p("div", { className: "flex items-center gap-2", children: [
|
|
2206
|
+
/* @__PURE__ */ s(st, { size: 14, className: "text-[var(--text-faint)]" }),
|
|
2207
|
+
/* @__PURE__ */ s("span", { className: "text-sm font-semibold text-[var(--text-ink)]", children: Ft.label })
|
|
2201
2208
|
] }) }) : null })
|
|
2202
2209
|
]
|
|
2203
2210
|
}
|
|
2204
2211
|
) : null,
|
|
2205
2212
|
(() => {
|
|
2206
|
-
const e = !
|
|
2207
|
-
return t <= 0 ? null : /* @__PURE__ */
|
|
2213
|
+
const e = !j && (De.trim() !== "" || Object.values(H).some((r) => Ee(r))), t = Q ? e ? Be.length : w : Be.length;
|
|
2214
|
+
return t <= 0 ? null : /* @__PURE__ */ s(
|
|
2208
2215
|
zn,
|
|
2209
2216
|
{
|
|
2210
|
-
page:
|
|
2217
|
+
page: V,
|
|
2211
2218
|
pageSizeOptions: [5, 10, 20, 50, 100],
|
|
2212
|
-
pageSize:
|
|
2219
|
+
pageSize: re,
|
|
2213
2220
|
totalCount: t,
|
|
2214
|
-
currentDataLength:
|
|
2215
|
-
onPageChange:
|
|
2221
|
+
currentDataLength: _e.length,
|
|
2222
|
+
onPageChange: xe,
|
|
2216
2223
|
onPageSizeChange: (r) => {
|
|
2217
|
-
|
|
2224
|
+
ke(r), xe(1);
|
|
2218
2225
|
},
|
|
2219
2226
|
showPageSizeSelector: !0
|
|
2220
2227
|
}
|