chordia-ui 4.0.8 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DataTable2.cjs.js +1 -1
- package/dist/DataTable2.cjs.js.map +1 -1
- package/dist/DataTable2.es.js +760 -739
- package/dist/DataTable2.es.js.map +1 -1
- package/dist/IntegrationCard.cjs.js +1 -1
- package/dist/IntegrationCard.cjs.js.map +1 -1
- package/dist/IntegrationCard.es.js +11 -10
- package/dist/IntegrationCard.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 +25 -25
- package/dist/components/data.es.js.map +1 -1
- package/dist/components/notifications.cjs.js +1 -1
- package/dist/components/notifications.cjs.js.map +1 -1
- package/dist/components/notifications.es.js +6 -3
- package/dist/components/notifications.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/data/DataTable.jsx +1 -1
- package/src/components/data/DataTable2.jsx +42 -0
- package/src/components/layout/IntegrationCard.jsx +2 -1
- package/src/components/notifications/NotificationItem.jsx +3 -0
package/dist/DataTable2.es.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { u as
|
|
4
|
-
import { CalendarClock as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { C as
|
|
1
|
+
import { jsxs as h, jsx as s, Fragment as Ce } from "react/jsx-runtime";
|
|
2
|
+
import wt, { useState as y, useRef as K, useEffect as j, Suspense as kn, useMemo as oe, useCallback as O, useLayoutEffect as Dn } from "react";
|
|
3
|
+
import { u as Cn, a as Ut, D as Rn, c as zn, S as Bn, h as En, b as Mn, s as An, K as Nn, P as Wn, d as Ft, e as On, C as Tn } from "./sortable.esm.es.js";
|
|
4
|
+
import { CalendarClock as Xt, Download as $n, ChevronDown as Ln, Settings2 as Pn, X as In, GripVertical as kt, Search as _n, Check as Qe, Minus as jn, ArrowUp as Hn, ArrowDown as Kn, ArrowUpDown as Un, ListFilter as Xn } from "lucide-react";
|
|
5
|
+
import { createPortal as Rt } from "react-dom";
|
|
6
|
+
import { C as Gn, P as Jn } from "./CustomFilterChips.es.js";
|
|
7
7
|
import "motion/react";
|
|
8
8
|
import "recharts";
|
|
9
9
|
import "./AgentLiftAnalysisCard.es.js";
|
|
10
10
|
import "./TourGuideTooltip.es.js";
|
|
11
|
-
function
|
|
11
|
+
function Yn({
|
|
12
12
|
dateRangePicker: r,
|
|
13
13
|
onWeekToDate: l,
|
|
14
14
|
exportConfig: d,
|
|
15
15
|
filterChipsConfig: f,
|
|
16
|
-
trailingActions:
|
|
16
|
+
trailingActions: w
|
|
17
17
|
// Optional extra actions rendered after Export (e.g., Add Users button)
|
|
18
18
|
}) {
|
|
19
|
-
const [
|
|
20
|
-
|
|
21
|
-
const D = (
|
|
22
|
-
|
|
19
|
+
const [S, a] = y(!1), b = K(null), T = K(null);
|
|
20
|
+
j(() => {
|
|
21
|
+
const D = (v) => {
|
|
22
|
+
T.current && !T.current.contains(v.target) && b.current && !b.current.contains(v.target) && a(!1);
|
|
23
23
|
};
|
|
24
|
-
if (
|
|
24
|
+
if (S)
|
|
25
25
|
return document.addEventListener("mousedown", D), () => {
|
|
26
26
|
document.removeEventListener("mousedown", D);
|
|
27
27
|
};
|
|
28
|
-
}, [
|
|
28
|
+
}, [S]);
|
|
29
29
|
const k = () => {
|
|
30
30
|
a((D) => !D);
|
|
31
31
|
}, C = (D) => {
|
|
32
32
|
a(!1), d != null && d.onExport && d.onExport(D);
|
|
33
|
-
},
|
|
33
|
+
}, H = (() => {
|
|
34
34
|
if (!(f != null && f.filters))
|
|
35
35
|
return !1;
|
|
36
|
-
const D = f.filters,
|
|
37
|
-
return
|
|
36
|
+
const D = f.filters, v = f.customFilters || [], $ = Object.entries(D).some(([B, A]) => !!(Array.isArray(A) && A.length || typeof A == "string" && A.trim() !== "" || A && typeof A == "object" && (A.min != null || A.max != null))), L = v.some((B) => B.active);
|
|
37
|
+
return $ || L;
|
|
38
38
|
})();
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
l && /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ h("div", { className: "flex items-center gap-3 flex-wrap", children: [
|
|
40
|
+
l && /* @__PURE__ */ h(
|
|
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(Xt, { size: 16 }),
|
|
48
|
+
/* @__PURE__ */ s("span", { children: "Week to Date" })
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
r && /* @__PURE__ */
|
|
53
|
-
|
|
52
|
+
r && /* @__PURE__ */ s(
|
|
53
|
+
kn,
|
|
54
54
|
{
|
|
55
|
-
fallback: /* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
55
|
+
fallback: /* @__PURE__ */ h("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(Xt, { size: 16 }),
|
|
57
|
+
/* @__PURE__ */ s("span", { children: "Loading..." })
|
|
58
58
|
] }),
|
|
59
59
|
children: r
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
|
-
d && /* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
62
|
+
d && /* @__PURE__ */ h("div", { className: "relative", children: [
|
|
63
|
+
/* @__PURE__ */ h(
|
|
64
64
|
"button",
|
|
65
65
|
{
|
|
66
66
|
ref: b,
|
|
@@ -69,20 +69,20 @@ function Jn({
|
|
|
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__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
73
|
+
/* @__PURE__ */ s($n, { size: 16 }),
|
|
74
|
+
/* @__PURE__ */ s("span", { children: d.isExporting ? "Exporting..." : "Export" })
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ s(Ln, { size: 16 })
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
|
|
80
|
+
S && /* @__PURE__ */ s(
|
|
81
81
|
"div",
|
|
82
82
|
{
|
|
83
|
-
ref:
|
|
83
|
+
ref: T,
|
|
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: (d.types || ["csv"]).map((D) => /* @__PURE__ */
|
|
85
|
+
children: (d.types || ["csv"]).map((D) => /* @__PURE__ */ h(
|
|
86
86
|
"button",
|
|
87
87
|
{
|
|
88
88
|
onClick: () => C(D),
|
|
@@ -98,11 +98,11 @@ function Jn({
|
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
100
|
] }),
|
|
101
|
-
(
|
|
102
|
-
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
(H || w) && /* @__PURE__ */ h(Ce, { children: [
|
|
102
|
+
H && /* @__PURE__ */ s("div", { className: "h-9 mt-1 w-px bg-gray-300 flex-shrink-0" }),
|
|
103
|
+
/* @__PURE__ */ h("div", { className: "flex items-center gap-3 justify-end", children: [
|
|
104
|
+
H && f && /* @__PURE__ */ s(
|
|
105
|
+
Gn,
|
|
106
106
|
{
|
|
107
107
|
filters: f.filters,
|
|
108
108
|
onChange: f.onChange,
|
|
@@ -111,18 +111,18 @@ function Jn({
|
|
|
111
111
|
fieldOptions: f.fieldOptions || {}
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
|
-
|
|
114
|
+
w && /* @__PURE__ */ s("div", { className: "flex-shrink-0", children: w })
|
|
115
115
|
] })
|
|
116
116
|
] })
|
|
117
117
|
] });
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function zt(r) {
|
|
120
120
|
if (r == null)
|
|
121
121
|
return NaN;
|
|
122
122
|
const l = String(r).replace(/[,$%]|pp/gi, "").trim(), d = parseFloat(l);
|
|
123
123
|
return Number.isFinite(d) ? d : NaN;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Qn(r) {
|
|
126
126
|
if (r == null)
|
|
127
127
|
return NaN;
|
|
128
128
|
const l = String(r).trim(), d = l.match(/^(\d+):(\d+)(?::(\d+))?$/);
|
|
@@ -130,37 +130,37 @@ function Yn(r) {
|
|
|
130
130
|
const k = +d[1], C = +d[2], z = d[3] != null ? +d[3] : null;
|
|
131
131
|
return z != null ? k * 3600 + C * 60 + z : k * 60 + C;
|
|
132
132
|
}
|
|
133
|
-
let f = 0,
|
|
134
|
-
const
|
|
135
|
-
return
|
|
133
|
+
let f = 0, w = !1;
|
|
134
|
+
const S = l.match(/(\d+)\s*d\b/i), a = l.match(/(\d+)\s*h\b/i), b = l.match(/(\d+)\s*m(?!s)\b/i), T = l.match(/(\d+)\s*s\b/i);
|
|
135
|
+
return S && (f += +S[1] * 86400, w = !0), a && (f += +a[1] * 3600, w = !0), b && (f += +b[1] * 60, w = !0), T && (f += +T[1], w = !0), w ? f : NaN;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function qn(r) {
|
|
138
138
|
if (!r)
|
|
139
139
|
return null;
|
|
140
140
|
const l = String(r).trim(), d = l.match(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})$/);
|
|
141
141
|
if (d) {
|
|
142
|
-
const
|
|
143
|
-
return isNaN(
|
|
142
|
+
const w = d[3].length === 2 ? 2e3 + +d[3] : +d[3], S = new Date(w, +d[1] - 1, +d[2]);
|
|
143
|
+
return isNaN(S.getTime()) ? null : S;
|
|
144
144
|
}
|
|
145
145
|
const f = new Date(l);
|
|
146
146
|
return isNaN(f.getTime()) ? null : f;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Zn(r) {
|
|
149
149
|
if (!r || r.length === 0)
|
|
150
150
|
return "text";
|
|
151
151
|
const l = r.slice(0, 25), d = (f) => l.every(f);
|
|
152
152
|
return d((f) => /^\d{1,2}\/\d{1,2}\/\d{2,4}$/.test(f) || /^\d{4}-\d{2}-\d{2}/.test(f)) ? "date" : d((f) => /^\d+\s*[dhms]\b/i.test(f) || /^\d+:\d+(:\d+)?$/.test(f)) ? "duration" : d((f) => /^-?[\d,.]+(%|pp)?$/i.test(f)) ? "number" : "text";
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Ye(r) {
|
|
155
155
|
return r ? Array.isArray(r) ? r.length > 0 : r.type === "range" ? r.min !== "" && r.min !== void 0 && r.min !== null || r.max !== "" && r.max !== void 0 && r.max !== null : r.type === "durationRange" ? r.minSec !== "" && r.minSec != null || r.maxSec !== "" && r.maxSec != null : r.type === "scoreRange" ? Array.isArray(r.values) && r.values.length > 0 || r.min !== "" && r.min != null || r.max !== "" && r.max != null : r.type === "dateRange" ? !!(r.from || r.to) : !1 : !1;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function Gt(r) {
|
|
158
158
|
if (r == null || r === "" || isNaN(r))
|
|
159
159
|
return "";
|
|
160
|
-
const l = Number(r), d = Math.floor(l / 3600), f = Math.floor(l % 3600 / 60),
|
|
161
|
-
return d > 0 ? `${d}h ${f}m` : f > 0 ? `${f}m ${
|
|
160
|
+
const l = Number(r), d = Math.floor(l / 3600), f = Math.floor(l % 3600 / 60), w = Math.floor(l % 60);
|
|
161
|
+
return d > 0 ? `${d}h ${f}m` : f > 0 ? `${f}m ${w}s` : `${w}s`;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Vn(r) {
|
|
164
164
|
if (!r)
|
|
165
165
|
return "";
|
|
166
166
|
if (Array.isArray(r))
|
|
@@ -170,26 +170,26 @@ function Zn(r) {
|
|
|
170
170
|
return l != null && d != null ? `${l} – ${d}` : l != null ? `≥ ${l}` : d != null ? `≤ ${d}` : "";
|
|
171
171
|
}
|
|
172
172
|
if (r.type === "durationRange") {
|
|
173
|
-
const l = r.minSec !== "" && r.minSec != null ?
|
|
173
|
+
const l = r.minSec !== "" && r.minSec != null ? Gt(r.minSec) : null, d = r.maxSec !== "" && r.maxSec != null ? Gt(r.maxSec) : null;
|
|
174
174
|
return l && d ? `${l} – ${d}` : l ? `≥ ${l}` : d ? `≤ ${d}` : "";
|
|
175
175
|
}
|
|
176
176
|
if (r.type === "scoreRange") {
|
|
177
177
|
if (Array.isArray(r.values) && r.values.length > 0)
|
|
178
|
-
return r.values.slice().sort((f,
|
|
178
|
+
return r.values.slice().sort((f, w) => f - w).join(", ");
|
|
179
179
|
const l = r.min !== "" && r.min != null ? r.min : null, d = r.max !== "" && r.max != null ? r.max : null;
|
|
180
180
|
return l != null && d != null ? `${l} – ${d}` : l != null ? `≥ ${l}` : d != null ? `≤ ${d}` : "";
|
|
181
181
|
}
|
|
182
182
|
return r.type === "dateRange" ? r.from && r.to ? `${r.from} – ${r.to}` : r.from ? `from ${r.from}` : r.to ? `to ${r.to}` : "" : "";
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function er(r) {
|
|
185
185
|
return Array.isArray(r) ? Math.max(0, r.length - 1) : 0;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function tr(r) {
|
|
188
188
|
return Array.isArray(r) ? r.slice(1).map(String).join(", ") : "";
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function nr({ count: r, values: l }) {
|
|
191
191
|
const [d, f] = y(!1);
|
|
192
|
-
return /* @__PURE__ */
|
|
192
|
+
return /* @__PURE__ */ h(
|
|
193
193
|
"span",
|
|
194
194
|
{
|
|
195
195
|
onMouseEnter: () => f(!0),
|
|
@@ -213,7 +213,7 @@ function tr({ count: r, values: l }) {
|
|
|
213
213
|
children: [
|
|
214
214
|
"+",
|
|
215
215
|
r,
|
|
216
|
-
d && /* @__PURE__ */
|
|
216
|
+
d && /* @__PURE__ */ s(
|
|
217
217
|
"span",
|
|
218
218
|
{
|
|
219
219
|
role: "tooltip",
|
|
@@ -242,7 +242,7 @@ function tr({ count: r, values: l }) {
|
|
|
242
242
|
}
|
|
243
243
|
);
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function rr({ leftLabel: r, rightLabel: l, leftValue: d, rightValue: f, onLeftChange: w, onRightChange: S, type: a = "number", placeholderLeft: b = "Min", placeholderRight: T = "Max" }) {
|
|
246
246
|
const k = {
|
|
247
247
|
width: "100%",
|
|
248
248
|
height: 32,
|
|
@@ -256,36 +256,36 @@ function nr({ leftLabel: r, rightLabel: l, leftValue: d, rightValue: f, onLeftCh
|
|
|
256
256
|
outline: "none",
|
|
257
257
|
boxSizing: "border-box"
|
|
258
258
|
}, C = { fontSize: 12, color: "#676767", marginBottom: 4, fontFamily: "var(--font-sans)" };
|
|
259
|
-
return /* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
/* @__PURE__ */
|
|
259
|
+
return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
|
|
260
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
261
|
+
/* @__PURE__ */ s("span", { style: C, children: r }),
|
|
262
|
+
/* @__PURE__ */ s(
|
|
263
263
|
"input",
|
|
264
264
|
{
|
|
265
265
|
type: a,
|
|
266
266
|
value: d,
|
|
267
|
-
onChange: (z) =>
|
|
267
|
+
onChange: (z) => w(z.target.value),
|
|
268
268
|
placeholder: b,
|
|
269
269
|
style: k
|
|
270
270
|
}
|
|
271
271
|
)
|
|
272
272
|
] }),
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
274
|
+
/* @__PURE__ */ s("span", { style: C, children: l }),
|
|
275
|
+
/* @__PURE__ */ s(
|
|
276
276
|
"input",
|
|
277
277
|
{
|
|
278
278
|
type: a,
|
|
279
279
|
value: f,
|
|
280
|
-
onChange: (z) =>
|
|
281
|
-
placeholder:
|
|
280
|
+
onChange: (z) => S(z.target.value),
|
|
281
|
+
placeholder: T,
|
|
282
282
|
style: k
|
|
283
283
|
}
|
|
284
284
|
)
|
|
285
285
|
] })
|
|
286
286
|
] });
|
|
287
287
|
}
|
|
288
|
-
const
|
|
288
|
+
const Jt = [
|
|
289
289
|
{ id: "0-60", label: "0 to 60 Sec", minSec: 0, maxSec: 60 },
|
|
290
290
|
{ id: "60-120", label: "1m to 2 m", minSec: 60, maxSec: 120 },
|
|
291
291
|
{ id: "120-180", label: "2m to 3 m", minSec: 120, maxSec: 180 },
|
|
@@ -293,7 +293,7 @@ const Gt = [
|
|
|
293
293
|
{ id: "240-300", label: "4m to 5m", minSec: 240, maxSec: 300 },
|
|
294
294
|
{ id: "300+", label: "5 mins and above", minSec: 300, maxSec: null }
|
|
295
295
|
];
|
|
296
|
-
function
|
|
296
|
+
function Yt(r) {
|
|
297
297
|
if (r == null || r === "")
|
|
298
298
|
return null;
|
|
299
299
|
const l = String(r).trim().match(/^(\d{1,3}):(\d{2})$/);
|
|
@@ -302,8 +302,8 @@ function Jt(r) {
|
|
|
302
302
|
const d = Number(r);
|
|
303
303
|
return Number.isFinite(d) ? d : null;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
return /* @__PURE__ */
|
|
305
|
+
function Dt({ children: r }) {
|
|
306
|
+
return /* @__PURE__ */ s(
|
|
307
307
|
"div",
|
|
308
308
|
{
|
|
309
309
|
style: {
|
|
@@ -318,16 +318,16 @@ function kt({ children: r }) {
|
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Ct({
|
|
322
322
|
minValue: r,
|
|
323
323
|
maxValue: l,
|
|
324
324
|
onMinChange: d,
|
|
325
325
|
onMaxChange: f,
|
|
326
|
-
inputType:
|
|
327
|
-
inputMode:
|
|
326
|
+
inputType: w = "number",
|
|
327
|
+
inputMode: S = "decimal",
|
|
328
328
|
step: a,
|
|
329
329
|
placeholder: b = "0.0",
|
|
330
|
-
unit:
|
|
330
|
+
unit: T
|
|
331
331
|
}) {
|
|
332
332
|
const k = {
|
|
333
333
|
width: "100%",
|
|
@@ -341,15 +341,15 @@ function Dt({
|
|
|
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__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
345
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "flex-end", gap: 8 }, children: [
|
|
346
|
+
/* @__PURE__ */ h("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
|
-
type:
|
|
352
|
-
inputMode:
|
|
351
|
+
type: w,
|
|
352
|
+
inputMode: S,
|
|
353
353
|
step: a,
|
|
354
354
|
placeholder: b,
|
|
355
355
|
value: r,
|
|
@@ -358,14 +358,14 @@ function Dt({
|
|
|
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__ */ h("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
|
-
type:
|
|
368
|
-
inputMode:
|
|
367
|
+
type: w,
|
|
368
|
+
inputMode: S,
|
|
369
369
|
step: a,
|
|
370
370
|
placeholder: b,
|
|
371
371
|
value: l,
|
|
@@ -375,7 +375,7 @@ function Dt({
|
|
|
375
375
|
)
|
|
376
376
|
] })
|
|
377
377
|
] }),
|
|
378
|
-
|
|
378
|
+
T && /* @__PURE__ */ h(
|
|
379
379
|
"span",
|
|
380
380
|
{
|
|
381
381
|
style: {
|
|
@@ -385,127 +385,130 @@ function Dt({
|
|
|
385
385
|
},
|
|
386
386
|
children: [
|
|
387
387
|
"Enter durations in ",
|
|
388
|
-
|
|
388
|
+
T === "sec" ? "seconds" : T
|
|
389
389
|
]
|
|
390
390
|
}
|
|
391
391
|
)
|
|
392
392
|
] });
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
const z = d === "text",
|
|
396
|
-
if (
|
|
394
|
+
function or({ column: r, columnId: l, filterType: d = "text", position: f, popoverRef: w, distinctValues: S, initialValue: a, onApply: b, onCancel: T, onSearch: k = null, searchMinChars: C = 3 }) {
|
|
395
|
+
const z = d === "text", H = d === "number", D = d === "date", v = d === "duration", $ = d === "score", L = /duration/i.test(String((r == null ? void 0 : r.label) || l || "")), B = oe(() => {
|
|
396
|
+
if (!$ || !Array.isArray(S) || S.length === 0)
|
|
397
397
|
return !1;
|
|
398
|
-
let
|
|
399
|
-
for (const g of
|
|
400
|
-
const F =
|
|
401
|
-
Number.isFinite(F) && (F <
|
|
398
|
+
let p = 1 / 0, m = -1 / 0;
|
|
399
|
+
for (const g of S) {
|
|
400
|
+
const F = zt(g);
|
|
401
|
+
Number.isFinite(F) && (F < p && (p = F), F > m && (m = F));
|
|
402
402
|
}
|
|
403
|
-
return Number.isFinite(
|
|
404
|
-
}, [
|
|
403
|
+
return Number.isFinite(p) && Number.isFinite(m) && p >= 0 && m <= 5;
|
|
404
|
+
}, [$, S]), [A, ce] = y(
|
|
405
405
|
() => z ? new Set(Array.isArray(a) ? a : []) : /* @__PURE__ */ new Set()
|
|
406
|
-
), [
|
|
407
|
-
() =>
|
|
408
|
-
), [
|
|
409
|
-
() =>
|
|
410
|
-
), [
|
|
411
|
-
() =>
|
|
412
|
-
), [
|
|
413
|
-
() =>
|
|
414
|
-
), [
|
|
415
|
-
() =>
|
|
416
|
-
), [
|
|
417
|
-
|
|
418
|
-
z &&
|
|
406
|
+
), [ge, G] = y(""), [Z, J] = y(() => H && (a == null ? void 0 : a.type) === "range" && a.min != null ? a.min : ""), [V, ie] = y(() => H && (a == null ? void 0 : a.type) === "range" && a.max != null ? a.max : ""), [E, de] = y(/* @__PURE__ */ new Set()), [se, P] = y(
|
|
407
|
+
() => v && (a == null ? void 0 : a.type) === "durationRange" && a.minSec != null && a.minSec !== "" ? String(a.minSec) : ""
|
|
408
|
+
), [q, ue] = y(
|
|
409
|
+
() => v && (a == null ? void 0 : a.type) === "durationRange" && a.maxSec != null && a.maxSec !== "" ? String(a.maxSec) : ""
|
|
410
|
+
), [fe, qe] = y(
|
|
411
|
+
() => $ && (a == null ? void 0 : a.type) === "scoreRange" && Array.isArray(a.values) ? new Set(a.values) : /* @__PURE__ */ new Set()
|
|
412
|
+
), [je, Re] = y(
|
|
413
|
+
() => $ && (a == null ? void 0 : a.type) === "scoreRange" && a.min != null && a.min !== "" ? String(a.min) : ""
|
|
414
|
+
), [ye, ze] = y(
|
|
415
|
+
() => $ && (a == null ? void 0 : a.type) === "scoreRange" && a.max != null && a.max !== "" ? String(a.max) : ""
|
|
416
|
+
), [Ze, Y] = y(() => D && (a == null ? void 0 : a.type) === "dateRange" && a.from || ""), [I, ee] = y(() => D && (a == null ? void 0 : a.type) === "dateRange" && a.to || "");
|
|
417
|
+
j(() => {
|
|
418
|
+
z && ce(new Set(Array.isArray(a) ? a : []));
|
|
419
419
|
}, [l, z]);
|
|
420
|
-
const [
|
|
421
|
-
|
|
420
|
+
const [He, te] = y(null), [xe, X] = y(!1), be = K(0), ne = ge.trim(), Ve = z && typeof k == "function" && ne.length >= C;
|
|
421
|
+
j(() => {
|
|
422
422
|
if (!z || typeof k != "function")
|
|
423
423
|
return;
|
|
424
|
-
if (
|
|
425
|
-
|
|
424
|
+
if (ne.length < C) {
|
|
425
|
+
te(null), X(!1);
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
428
|
-
const
|
|
429
|
-
|
|
428
|
+
const p = ++be.current;
|
|
429
|
+
X(!0);
|
|
430
430
|
const m = setTimeout(async () => {
|
|
431
431
|
try {
|
|
432
|
-
const g = await k(
|
|
433
|
-
if (
|
|
432
|
+
const g = await k(ne);
|
|
433
|
+
if (p !== be.current)
|
|
434
434
|
return;
|
|
435
|
-
const F = Array.isArray(g) ? g.map((
|
|
436
|
-
|
|
435
|
+
const F = Array.isArray(g) ? g.map((M) => M && typeof M == "object" ? M.label ?? M.value : M).filter((M) => M != null && M !== "").map(String) : [];
|
|
436
|
+
te(F);
|
|
437
437
|
} catch {
|
|
438
|
-
|
|
438
|
+
p === be.current && te([]);
|
|
439
439
|
} finally {
|
|
440
|
-
|
|
440
|
+
p === be.current && X(!1);
|
|
441
441
|
}
|
|
442
442
|
}, 300);
|
|
443
443
|
return () => clearTimeout(m);
|
|
444
|
-
}, [z, k,
|
|
445
|
-
const
|
|
446
|
-
const
|
|
444
|
+
}, [z, k, ne, C]);
|
|
445
|
+
const N = oe(() => {
|
|
446
|
+
const p = ne.toLowerCase(), m = Ve ? He || [] : p ? S.filter((F) => String(F).toLowerCase().includes(p)) : S, g = /* @__PURE__ */ new Map();
|
|
447
447
|
for (const F of m)
|
|
448
448
|
g.set(String(F), F);
|
|
449
|
-
for (const F of
|
|
449
|
+
for (const F of A)
|
|
450
450
|
g.set(String(F), F);
|
|
451
|
-
return Array.from(g.values()).sort((F,
|
|
452
|
-
const
|
|
453
|
-
|
|
451
|
+
return Array.from(g.values()).sort((F, M) => {
|
|
452
|
+
const Se = String(F) === "NA", Ee = String(M) === "NA";
|
|
453
|
+
if (Se !== Ee)
|
|
454
|
+
return Se ? -1 : 1;
|
|
455
|
+
const re = A.has(F), Me = A.has(M);
|
|
456
|
+
return re !== Me ? re ? -1 : 1 : String(F).localeCompare(String(M));
|
|
454
457
|
});
|
|
455
|
-
}, [
|
|
456
|
-
|
|
458
|
+
}, [S, ne, A, Ve, He]), ve = (p) => {
|
|
459
|
+
ce((m) => {
|
|
457
460
|
const g = new Set(m);
|
|
458
|
-
return g.has(
|
|
461
|
+
return g.has(p) ? g.delete(p) : g.add(p), g;
|
|
459
462
|
});
|
|
460
|
-
},
|
|
461
|
-
z &&
|
|
462
|
-
},
|
|
463
|
-
|
|
463
|
+
}, et = () => {
|
|
464
|
+
z && ce(/* @__PURE__ */ new Set()), H && (J(""), ie("")), v && (de(/* @__PURE__ */ new Set()), P(""), ue("")), $ && (qe(/* @__PURE__ */ new Set()), Re(""), ze("")), D && (Y(""), ee("")), G("");
|
|
465
|
+
}, Be = (p) => {
|
|
466
|
+
de((m) => {
|
|
464
467
|
const g = new Set(m);
|
|
465
|
-
return g.has(
|
|
468
|
+
return g.has(p) ? g.delete(p) : g.add(p), g;
|
|
466
469
|
});
|
|
467
|
-
}, we = (
|
|
468
|
-
|
|
470
|
+
}, we = (p) => {
|
|
471
|
+
qe((m) => {
|
|
469
472
|
const g = new Set(m);
|
|
470
|
-
return g.has(
|
|
473
|
+
return g.has(p) ? g.delete(p) : g.add(p), g;
|
|
471
474
|
});
|
|
472
|
-
},
|
|
475
|
+
}, Fe = () => {
|
|
473
476
|
if (z)
|
|
474
|
-
return b(Array.from(
|
|
475
|
-
if (
|
|
477
|
+
return b(Array.from(A));
|
|
478
|
+
if (H)
|
|
476
479
|
return b({ type: "range", min: Z === "" ? "" : Number(Z), max: V === "" ? "" : Number(V) });
|
|
477
|
-
if (
|
|
478
|
-
const
|
|
479
|
-
let F = "",
|
|
480
|
+
if (v) {
|
|
481
|
+
const p = Yt(se), m = Yt(q), g = p != null || m != null;
|
|
482
|
+
let F = "", M = "";
|
|
480
483
|
if (g)
|
|
481
|
-
F =
|
|
482
|
-
else if (
|
|
483
|
-
const
|
|
484
|
-
F = Math.min(...
|
|
484
|
+
F = p ?? "", M = m ?? "";
|
|
485
|
+
else if (E.size > 0) {
|
|
486
|
+
const Se = Jt.filter((re) => E.has(re.id));
|
|
487
|
+
F = Math.min(...Se.map((re) => re.minSec)), M = Se.some((re) => re.maxSec == null) ? "" : Math.max(...Se.map((re) => re.maxSec));
|
|
485
488
|
}
|
|
486
|
-
return b({ type: "durationRange", minSec: F, maxSec:
|
|
489
|
+
return b({ type: "durationRange", minSec: F, maxSec: M });
|
|
487
490
|
}
|
|
488
|
-
if (
|
|
489
|
-
const
|
|
490
|
-
return
|
|
491
|
+
if ($) {
|
|
492
|
+
const p = je === "" ? null : Number(je), m = ye === "" ? null : Number(ye);
|
|
493
|
+
return p != null || m != null ? b({
|
|
491
494
|
type: "scoreRange",
|
|
492
495
|
values: [],
|
|
493
|
-
min:
|
|
496
|
+
min: p != null && Number.isFinite(p) ? p : "",
|
|
494
497
|
max: m != null && Number.isFinite(m) ? m : ""
|
|
495
498
|
}) : b({
|
|
496
499
|
type: "scoreRange",
|
|
497
|
-
values: Array.from(
|
|
500
|
+
values: Array.from(fe).sort((F, M) => F - M),
|
|
498
501
|
min: "",
|
|
499
502
|
max: ""
|
|
500
503
|
});
|
|
501
504
|
}
|
|
502
505
|
if (D)
|
|
503
|
-
return b({ type: "dateRange", from:
|
|
506
|
+
return b({ type: "dateRange", from: Ze, to: I });
|
|
504
507
|
};
|
|
505
|
-
return /* @__PURE__ */
|
|
508
|
+
return /* @__PURE__ */ h(
|
|
506
509
|
"div",
|
|
507
510
|
{
|
|
508
|
-
ref:
|
|
511
|
+
ref: w,
|
|
509
512
|
role: "dialog",
|
|
510
513
|
"aria-label": `Filter ${r.label || l}`,
|
|
511
514
|
style: {
|
|
@@ -525,8 +528,8 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
525
528
|
fontFamily: "var(--font-sans)"
|
|
526
529
|
},
|
|
527
530
|
children: [
|
|
528
|
-
z && /* @__PURE__ */
|
|
529
|
-
/* @__PURE__ */
|
|
531
|
+
z && /* @__PURE__ */ h(Ce, { children: [
|
|
532
|
+
/* @__PURE__ */ s(
|
|
530
533
|
"div",
|
|
531
534
|
{
|
|
532
535
|
style: {
|
|
@@ -537,7 +540,7 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
537
540
|
display: "flex",
|
|
538
541
|
alignItems: "center"
|
|
539
542
|
},
|
|
540
|
-
children: /* @__PURE__ */
|
|
543
|
+
children: /* @__PURE__ */ h(
|
|
541
544
|
"div",
|
|
542
545
|
{
|
|
543
546
|
style: {
|
|
@@ -551,14 +554,14 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
551
554
|
padding: "0 8px"
|
|
552
555
|
},
|
|
553
556
|
children: [
|
|
554
|
-
/* @__PURE__ */
|
|
555
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ s(_n, { size: 16, color: "#989898", strokeWidth: 2 }),
|
|
558
|
+
/* @__PURE__ */ s(
|
|
556
559
|
"input",
|
|
557
560
|
{
|
|
558
561
|
autoFocus: !0,
|
|
559
562
|
type: "text",
|
|
560
|
-
value:
|
|
561
|
-
onChange: (
|
|
563
|
+
value: ge,
|
|
564
|
+
onChange: (p) => G(p.target.value),
|
|
562
565
|
placeholder: "Search",
|
|
563
566
|
style: {
|
|
564
567
|
flex: 1,
|
|
@@ -577,9 +580,9 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
577
580
|
)
|
|
578
581
|
}
|
|
579
582
|
),
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
-
const m =
|
|
582
|
-
return /* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ s("div", { style: { maxHeight: 220, overflowY: "auto", display: "flex", flexDirection: "column", gap: 4 }, children: typeof k == "function" && ne.length > 0 && ne.length < C ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: `Type at least ${C} characters to search` }) : xe ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "Searching…" }) : N.length === 0 ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "No values" }) : N.map((p) => {
|
|
584
|
+
const m = A.has(p);
|
|
585
|
+
return /* @__PURE__ */ h(
|
|
583
586
|
"label",
|
|
584
587
|
{
|
|
585
588
|
style: {
|
|
@@ -591,7 +594,7 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
591
594
|
borderRadius: 6
|
|
592
595
|
},
|
|
593
596
|
children: [
|
|
594
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ s(
|
|
595
598
|
"span",
|
|
596
599
|
{
|
|
597
600
|
style: {
|
|
@@ -605,24 +608,24 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
605
608
|
border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
|
|
606
609
|
flexShrink: 0
|
|
607
610
|
},
|
|
608
|
-
children: m && /* @__PURE__ */
|
|
611
|
+
children: m && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
609
612
|
}
|
|
610
613
|
),
|
|
611
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ s(
|
|
612
615
|
"input",
|
|
613
616
|
{
|
|
614
617
|
type: "checkbox",
|
|
615
618
|
checked: m,
|
|
616
|
-
onChange: () =>
|
|
619
|
+
onChange: () => ve(p),
|
|
617
620
|
style: { position: "absolute", opacity: 0, pointerEvents: "none" },
|
|
618
621
|
tabIndex: -1
|
|
619
622
|
}
|
|
620
623
|
),
|
|
621
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ s(
|
|
622
625
|
"span",
|
|
623
626
|
{
|
|
624
627
|
onClick: (g) => {
|
|
625
|
-
g.preventDefault(),
|
|
628
|
+
g.preventDefault(), ve(p);
|
|
626
629
|
},
|
|
627
630
|
style: {
|
|
628
631
|
fontSize: 14,
|
|
@@ -633,43 +636,43 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
633
636
|
textOverflow: "ellipsis",
|
|
634
637
|
whiteSpace: "nowrap"
|
|
635
638
|
},
|
|
636
|
-
children:
|
|
639
|
+
children: p
|
|
637
640
|
}
|
|
638
641
|
)
|
|
639
642
|
]
|
|
640
643
|
},
|
|
641
|
-
|
|
644
|
+
p
|
|
642
645
|
);
|
|
643
646
|
}) })
|
|
644
647
|
] }),
|
|
645
|
-
|
|
646
|
-
/* @__PURE__ */
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
|
|
648
|
+
H && /* @__PURE__ */ h(Ce, { children: [
|
|
649
|
+
/* @__PURE__ */ s(Dt, { children: r.label || "Filter" }),
|
|
650
|
+
/* @__PURE__ */ s(
|
|
651
|
+
Ct,
|
|
649
652
|
{
|
|
650
653
|
minValue: Z,
|
|
651
654
|
maxValue: V,
|
|
652
|
-
onMinChange:
|
|
653
|
-
onMaxChange:
|
|
654
|
-
placeholder:
|
|
655
|
-
unit:
|
|
655
|
+
onMinChange: J,
|
|
656
|
+
onMaxChange: ie,
|
|
657
|
+
placeholder: L ? "00" : "0.0",
|
|
658
|
+
unit: L ? "sec" : void 0
|
|
656
659
|
}
|
|
657
660
|
)
|
|
658
661
|
] }),
|
|
659
|
-
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
r.filterShowPresets === !0 && /* @__PURE__ */
|
|
662
|
-
/* @__PURE__ */
|
|
663
|
-
const m =
|
|
664
|
-
return /* @__PURE__ */
|
|
662
|
+
v && /* @__PURE__ */ h(Ce, { children: [
|
|
663
|
+
/* @__PURE__ */ s(Dt, { children: r.label || "Duration" }),
|
|
664
|
+
r.filterShowPresets === !0 && /* @__PURE__ */ h(Ce, { children: [
|
|
665
|
+
/* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: Jt.map((p) => {
|
|
666
|
+
const m = E.has(p.id);
|
|
667
|
+
return /* @__PURE__ */ h(
|
|
665
668
|
"div",
|
|
666
669
|
{
|
|
667
670
|
role: "checkbox",
|
|
668
671
|
"aria-checked": m,
|
|
669
672
|
tabIndex: 0,
|
|
670
|
-
onClick: () =>
|
|
673
|
+
onClick: () => Be(p.id),
|
|
671
674
|
onKeyDown: (g) => {
|
|
672
|
-
(g.key === " " || g.key === "Enter") && (g.preventDefault(),
|
|
675
|
+
(g.key === " " || g.key === "Enter") && (g.preventDefault(), Be(p.id));
|
|
673
676
|
},
|
|
674
677
|
style: {
|
|
675
678
|
display: "flex",
|
|
@@ -679,7 +682,7 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
679
682
|
userSelect: "none"
|
|
680
683
|
},
|
|
681
684
|
children: [
|
|
682
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ s(
|
|
683
686
|
"span",
|
|
684
687
|
{
|
|
685
688
|
style: {
|
|
@@ -693,10 +696,10 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
693
696
|
border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
|
|
694
697
|
flexShrink: 0
|
|
695
698
|
},
|
|
696
|
-
children: m && /* @__PURE__ */
|
|
699
|
+
children: m && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
697
700
|
}
|
|
698
701
|
),
|
|
699
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ s(
|
|
700
703
|
"span",
|
|
701
704
|
{
|
|
702
705
|
style: {
|
|
@@ -705,16 +708,16 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
705
708
|
color: "#0B0B0B",
|
|
706
709
|
fontFamily: "var(--font-sans)"
|
|
707
710
|
},
|
|
708
|
-
children:
|
|
711
|
+
children: p.label
|
|
709
712
|
}
|
|
710
713
|
)
|
|
711
714
|
]
|
|
712
715
|
},
|
|
713
|
-
|
|
716
|
+
p.id
|
|
714
717
|
);
|
|
715
718
|
}) }),
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } }),
|
|
720
|
+
/* @__PURE__ */ s(
|
|
718
721
|
"div",
|
|
719
722
|
{
|
|
720
723
|
style: {
|
|
@@ -729,13 +732,13 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
729
732
|
}
|
|
730
733
|
)
|
|
731
734
|
] }),
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
|
|
735
|
+
/* @__PURE__ */ s(
|
|
736
|
+
Ct,
|
|
734
737
|
{
|
|
735
|
-
minValue:
|
|
736
|
-
maxValue:
|
|
737
|
-
onMinChange:
|
|
738
|
-
onMaxChange:
|
|
738
|
+
minValue: se,
|
|
739
|
+
maxValue: q,
|
|
740
|
+
onMinChange: P,
|
|
741
|
+
onMaxChange: ue,
|
|
739
742
|
inputType: "number",
|
|
740
743
|
inputMode: "numeric",
|
|
741
744
|
placeholder: "00",
|
|
@@ -743,20 +746,20 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
743
746
|
}
|
|
744
747
|
)
|
|
745
748
|
] }),
|
|
746
|
-
|
|
747
|
-
/* @__PURE__ */
|
|
748
|
-
B && r.filterShowPresets === !0 && /* @__PURE__ */
|
|
749
|
-
/* @__PURE__ */
|
|
750
|
-
const m =
|
|
751
|
-
return /* @__PURE__ */
|
|
749
|
+
$ && /* @__PURE__ */ h(Ce, { children: [
|
|
750
|
+
/* @__PURE__ */ s(Dt, { children: r.label || "Score" }),
|
|
751
|
+
B && r.filterShowPresets === !0 && /* @__PURE__ */ h(Ce, { children: [
|
|
752
|
+
/* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [1, 2, 3, 4, 5].map((p) => {
|
|
753
|
+
const m = fe.has(p);
|
|
754
|
+
return /* @__PURE__ */ h(
|
|
752
755
|
"div",
|
|
753
756
|
{
|
|
754
757
|
role: "checkbox",
|
|
755
758
|
"aria-checked": m,
|
|
756
759
|
tabIndex: 0,
|
|
757
|
-
onClick: () => we(
|
|
760
|
+
onClick: () => we(p),
|
|
758
761
|
onKeyDown: (g) => {
|
|
759
|
-
(g.key === " " || g.key === "Enter") && (g.preventDefault(), we(
|
|
762
|
+
(g.key === " " || g.key === "Enter") && (g.preventDefault(), we(p));
|
|
760
763
|
},
|
|
761
764
|
style: {
|
|
762
765
|
display: "flex",
|
|
@@ -766,7 +769,7 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
766
769
|
userSelect: "none"
|
|
767
770
|
},
|
|
768
771
|
children: [
|
|
769
|
-
/* @__PURE__ */
|
|
772
|
+
/* @__PURE__ */ s(
|
|
770
773
|
"span",
|
|
771
774
|
{
|
|
772
775
|
style: {
|
|
@@ -780,10 +783,10 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
780
783
|
border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
|
|
781
784
|
flexShrink: 0
|
|
782
785
|
},
|
|
783
|
-
children: m && /* @__PURE__ */
|
|
786
|
+
children: m && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
784
787
|
}
|
|
785
788
|
),
|
|
786
|
-
/* @__PURE__ */
|
|
789
|
+
/* @__PURE__ */ s(
|
|
787
790
|
"span",
|
|
788
791
|
{
|
|
789
792
|
style: {
|
|
@@ -792,17 +795,17 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
792
795
|
color: "#0B0B0B",
|
|
793
796
|
fontFamily: "var(--font-sans)"
|
|
794
797
|
},
|
|
795
|
-
children:
|
|
798
|
+
children: p
|
|
796
799
|
}
|
|
797
800
|
)
|
|
798
801
|
]
|
|
799
802
|
},
|
|
800
|
-
|
|
803
|
+
p
|
|
801
804
|
);
|
|
802
805
|
}) }),
|
|
803
|
-
/* @__PURE__ */
|
|
806
|
+
/* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } })
|
|
804
807
|
] }),
|
|
805
|
-
B && r.filterShowPresets === !0 && /* @__PURE__ */
|
|
808
|
+
B && r.filterShowPresets === !0 && /* @__PURE__ */ s(
|
|
806
809
|
"div",
|
|
807
810
|
{
|
|
808
811
|
style: {
|
|
@@ -816,38 +819,38 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
816
819
|
children: "Custom Range"
|
|
817
820
|
}
|
|
818
821
|
),
|
|
819
|
-
/* @__PURE__ */
|
|
820
|
-
|
|
822
|
+
/* @__PURE__ */ s(
|
|
823
|
+
Ct,
|
|
821
824
|
{
|
|
822
|
-
minValue:
|
|
823
|
-
maxValue:
|
|
824
|
-
onMinChange:
|
|
825
|
-
onMaxChange:
|
|
825
|
+
minValue: je,
|
|
826
|
+
maxValue: ye,
|
|
827
|
+
onMinChange: Re,
|
|
828
|
+
onMaxChange: ze,
|
|
826
829
|
step: "0.1"
|
|
827
830
|
}
|
|
828
831
|
)
|
|
829
832
|
] }),
|
|
830
|
-
D && /* @__PURE__ */
|
|
831
|
-
|
|
833
|
+
D && /* @__PURE__ */ s(
|
|
834
|
+
rr,
|
|
832
835
|
{
|
|
833
836
|
leftLabel: "From",
|
|
834
837
|
rightLabel: "To",
|
|
835
|
-
leftValue:
|
|
836
|
-
rightValue:
|
|
837
|
-
onLeftChange:
|
|
838
|
-
onRightChange:
|
|
838
|
+
leftValue: Ze,
|
|
839
|
+
rightValue: I,
|
|
840
|
+
onLeftChange: Y,
|
|
841
|
+
onRightChange: ee,
|
|
839
842
|
type: "date",
|
|
840
843
|
placeholderLeft: "",
|
|
841
844
|
placeholderRight: ""
|
|
842
845
|
}
|
|
843
846
|
),
|
|
844
|
-
/* @__PURE__ */
|
|
845
|
-
/* @__PURE__ */
|
|
846
|
-
/* @__PURE__ */
|
|
847
|
+
/* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } }),
|
|
848
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
849
|
+
/* @__PURE__ */ s(
|
|
847
850
|
"button",
|
|
848
851
|
{
|
|
849
852
|
type: "button",
|
|
850
|
-
onClick:
|
|
853
|
+
onClick: et,
|
|
851
854
|
style: {
|
|
852
855
|
background: "transparent",
|
|
853
856
|
border: "none",
|
|
@@ -858,14 +861,14 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
858
861
|
color: "#323232",
|
|
859
862
|
fontFamily: "var(--font-sans)"
|
|
860
863
|
},
|
|
861
|
-
children:
|
|
864
|
+
children: v && r.filterShowPresets === !0 || $ && B && r.filterShowPresets === !0 ? "View All" : "Reset"
|
|
862
865
|
}
|
|
863
866
|
),
|
|
864
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ s(
|
|
865
868
|
"button",
|
|
866
869
|
{
|
|
867
870
|
type: "button",
|
|
868
|
-
onClick:
|
|
871
|
+
onClick: Fe,
|
|
869
872
|
style: {
|
|
870
873
|
background: "#0B0B0B",
|
|
871
874
|
color: "#FFFFFF",
|
|
@@ -886,60 +889,60 @@ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popov
|
|
|
886
889
|
}
|
|
887
890
|
);
|
|
888
891
|
}
|
|
889
|
-
const
|
|
890
|
-
function
|
|
892
|
+
const sr = () => ({ userData: { email: "anonymous" } }), ir = (r) => /* @__PURE__ */ s("img", { ...r });
|
|
893
|
+
function lr({
|
|
891
894
|
children: r,
|
|
892
895
|
content: l,
|
|
893
896
|
direction: d = "top",
|
|
894
897
|
align: f = "center",
|
|
895
|
-
styling:
|
|
896
|
-
indicatorColor:
|
|
898
|
+
styling: w,
|
|
899
|
+
indicatorColor: S
|
|
897
900
|
}) {
|
|
898
|
-
const a = typeof l == "string" ? l : l != null ? String(l) : "", b = typeof
|
|
901
|
+
const a = typeof l == "string" ? l : l != null ? String(l) : "", b = typeof S == "string" && (S.startsWith("#") || S.startsWith("rgb") || S.startsWith("hsl") || S.startsWith("var(")) ? S : "var(--Grey-Strong, #2E3236)", [T, k] = y(!1), [C, z] = y(!1), [H, D] = y({ top: 0, left: 0, arrowLeft: 0, placement: "top" }), v = K(null), $ = K(null);
|
|
899
902
|
if (!a)
|
|
900
903
|
return r;
|
|
901
|
-
|
|
904
|
+
j(() => {
|
|
902
905
|
z(!0);
|
|
903
906
|
}, []);
|
|
904
|
-
const
|
|
905
|
-
if (!
|
|
907
|
+
const L = O(() => {
|
|
908
|
+
if (!v.current || !$.current || typeof window > "u")
|
|
906
909
|
return;
|
|
907
|
-
const B =
|
|
908
|
-
let
|
|
909
|
-
|
|
910
|
-
let
|
|
911
|
-
f === "start" && (
|
|
912
|
-
let
|
|
913
|
-
|
|
914
|
-
const
|
|
915
|
-
D({ top:
|
|
910
|
+
const B = v.current.getBoundingClientRect(), A = $.current.getBoundingClientRect(), ce = window.innerWidth, ge = window.innerHeight, G = 8, Z = 10, J = A.width, V = A.height, ie = B.top, E = ge - B.bottom, de = d === "bottom" ? "bottom" : "top";
|
|
911
|
+
let se = de;
|
|
912
|
+
de === "top" && ie < V + Z + G && E > ie ? se = "bottom" : de === "bottom" && E < V + Z + G && ie > E && (se = "top");
|
|
913
|
+
let P = B.left + B.width / 2;
|
|
914
|
+
f === "start" && (P = B.left), f === "end" && (P = B.right);
|
|
915
|
+
let q = se === "top" ? B.top - V - Z : B.bottom + Z, ue = f === "start" ? P : f === "end" ? P - J : P - J / 2;
|
|
916
|
+
q = Math.max(G, Math.min(q, ge - V - G)), ue = Math.max(G, Math.min(ue, ce - J - G));
|
|
917
|
+
const fe = Math.max(10, Math.min(P - ue, J - 10));
|
|
918
|
+
D({ top: q, left: ue, arrowLeft: fe, placement: se });
|
|
916
919
|
}, [f, d]);
|
|
917
|
-
return
|
|
918
|
-
if (!
|
|
920
|
+
return j(() => {
|
|
921
|
+
if (!T || !C)
|
|
919
922
|
return;
|
|
920
|
-
|
|
921
|
-
const B = () =>
|
|
923
|
+
L();
|
|
924
|
+
const B = () => L();
|
|
922
925
|
return window.addEventListener("resize", B), window.addEventListener("scroll", B, !0), () => {
|
|
923
926
|
window.removeEventListener("resize", B), window.removeEventListener("scroll", B, !0);
|
|
924
927
|
};
|
|
925
|
-
}, [
|
|
928
|
+
}, [T, C, L]), /* @__PURE__ */ h(
|
|
926
929
|
"span",
|
|
927
930
|
{
|
|
928
|
-
ref:
|
|
931
|
+
ref: v,
|
|
929
932
|
style: { display: "block", width: "100%" },
|
|
930
933
|
onMouseEnter: () => k(!0),
|
|
931
934
|
onMouseLeave: () => k(!1),
|
|
932
935
|
children: [
|
|
933
936
|
r,
|
|
934
|
-
|
|
935
|
-
/* @__PURE__ */
|
|
937
|
+
T && C && Rt(
|
|
938
|
+
/* @__PURE__ */ h(
|
|
936
939
|
"span",
|
|
937
940
|
{
|
|
938
|
-
ref:
|
|
941
|
+
ref: $,
|
|
939
942
|
style: {
|
|
940
943
|
position: "fixed",
|
|
941
|
-
top: `${
|
|
942
|
-
left: `${
|
|
944
|
+
top: `${H.top}px`,
|
|
945
|
+
left: `${H.left}px`,
|
|
943
946
|
background: "var(--Grey-Strong, #2E3236)",
|
|
944
947
|
color: "var(--Grey-White, #FFF)",
|
|
945
948
|
fontSize: "12px",
|
|
@@ -953,22 +956,22 @@ function ir({
|
|
|
953
956
|
boxShadow: "0 6px 18px rgba(0, 0, 0, 0.2)",
|
|
954
957
|
zIndex: 99999,
|
|
955
958
|
pointerEvents: "none",
|
|
956
|
-
...typeof
|
|
959
|
+
...typeof w == "object" ? w : {}
|
|
957
960
|
},
|
|
958
961
|
children: [
|
|
959
962
|
a,
|
|
960
|
-
/* @__PURE__ */
|
|
963
|
+
/* @__PURE__ */ s(
|
|
961
964
|
"span",
|
|
962
965
|
{
|
|
963
966
|
style: {
|
|
964
967
|
position: "absolute",
|
|
965
|
-
left: `${
|
|
968
|
+
left: `${H.arrowLeft}px`,
|
|
966
969
|
transform: "translateX(-50%)",
|
|
967
970
|
width: 0,
|
|
968
971
|
height: 0,
|
|
969
972
|
borderLeft: "6px solid transparent",
|
|
970
973
|
borderRight: "6px solid transparent",
|
|
971
|
-
...
|
|
974
|
+
...H.placement === "top" ? {
|
|
972
975
|
top: "100%",
|
|
973
976
|
borderTop: `7px solid ${b}`
|
|
974
977
|
} : {
|
|
@@ -987,21 +990,21 @@ function ir({
|
|
|
987
990
|
}
|
|
988
991
|
);
|
|
989
992
|
}
|
|
990
|
-
function
|
|
993
|
+
function br({
|
|
991
994
|
data: r = [],
|
|
992
995
|
columns: l = [],
|
|
993
996
|
initialPageSize: d = 10,
|
|
994
997
|
onRowClick: f,
|
|
995
998
|
// Server-side pagination props (optional)
|
|
996
|
-
totalCount:
|
|
999
|
+
totalCount: w = null,
|
|
997
1000
|
// Total count from server (null = use client-side pagination)
|
|
998
|
-
page:
|
|
1001
|
+
page: S = null,
|
|
999
1002
|
// Controlled page (null = use internal state)
|
|
1000
1003
|
pageSize: a = null,
|
|
1001
1004
|
// Controlled pageSize (null = use internal state)
|
|
1002
1005
|
onPageChange: b = null,
|
|
1003
1006
|
// Callback for page changes (null = use internal state)
|
|
1004
|
-
onPageSizeChange:
|
|
1007
|
+
onPageSizeChange: T = null,
|
|
1005
1008
|
// Callback for pageSize changes (null = use internal state)
|
|
1006
1009
|
onFilterChange: k = null,
|
|
1007
1010
|
// Callback for filter changes (null = use client-side filtering)
|
|
@@ -1010,58 +1013,58 @@ function xr({
|
|
|
1010
1013
|
// Optional callback to surface column limit errors to host app
|
|
1011
1014
|
onMaxColumnsError: z = null,
|
|
1012
1015
|
// Server-side sorting props (optional)
|
|
1013
|
-
onSort:
|
|
1016
|
+
onSort: H = null,
|
|
1014
1017
|
// Callback for sort changes (null = use client-side sorting)
|
|
1015
1018
|
sortFields: D = [],
|
|
1016
1019
|
// Array of [field, direction] tuples from parent (null = use internal state)
|
|
1017
|
-
tableId:
|
|
1020
|
+
tableId: v = null,
|
|
1018
1021
|
// Optional unique identifier for localStorage persistence (e.g., "history", "agents")
|
|
1019
|
-
isLoading:
|
|
1022
|
+
isLoading: $ = !1,
|
|
1020
1023
|
// Loading state to show overlay inside table
|
|
1021
1024
|
// Filter props (optional)
|
|
1022
|
-
filtersConfig:
|
|
1025
|
+
filtersConfig: L = null,
|
|
1023
1026
|
// Top toolbar filter config (chips/date/export). Note: this is different from `columnFilters` for inline header inputs.
|
|
1024
1027
|
// Column resize (optional) — min/max in px; columns may override with column.minWidth / column.maxWidth
|
|
1025
1028
|
columnResizeMinWidth: B = 120,
|
|
1026
|
-
columnResizeMaxWidth:
|
|
1029
|
+
columnResizeMaxWidth: A = 280,
|
|
1027
1030
|
// Fires whenever the user-visible column set changes. Useful for hosts that
|
|
1028
1031
|
// want to scope a CSV export, etc., to whatever the user has selected.
|
|
1029
1032
|
// Receives an array of column ids (excluding the action column).
|
|
1030
|
-
onVisibleColumnsChange:
|
|
1033
|
+
onVisibleColumnsChange: ce = null,
|
|
1031
1034
|
// When true, hides the "Columns" picker button in the toolbar. The
|
|
1032
1035
|
// surrounding toolbar wrapper is also skipped if no other toolbar content
|
|
1033
1036
|
// (e.g. `filtersConfig`) is configured.
|
|
1034
|
-
hideColumnPicker:
|
|
1037
|
+
hideColumnPicker: ge = !1,
|
|
1035
1038
|
// Row selection (opt-in). When `selectable` is true a leading checkbox
|
|
1036
1039
|
// column is rendered outside the reorderable/persisted column system, so it
|
|
1037
1040
|
// is always visible and unaffected by the column picker or saved prefs.
|
|
1038
1041
|
// Selection is controlled by the host: pass `selectedRowIds` (array of ids)
|
|
1039
1042
|
// and handle `onSelectionChange(nextIdsArray)`. `getRowId` resolves a row's
|
|
1040
1043
|
// id (defaults to `row.id`).
|
|
1041
|
-
selectable:
|
|
1044
|
+
selectable: G = !1,
|
|
1042
1045
|
selectedRowIds: Z = null,
|
|
1043
|
-
onSelectionChange:
|
|
1046
|
+
onSelectionChange: J = null,
|
|
1044
1047
|
getRowId: V = null
|
|
1045
1048
|
}) {
|
|
1046
|
-
var
|
|
1047
|
-
const { userData:
|
|
1048
|
-
const i =
|
|
1049
|
-
|
|
1049
|
+
var Kt;
|
|
1050
|
+
const { userData: ie } = sr(), E = (ie == null ? void 0 : ie.email) || "anonymous", de = wt.memo(({ children: e, content: t, className: o = "" }) => {
|
|
1051
|
+
const i = K(null), [n, u] = y(!1);
|
|
1052
|
+
j(() => {
|
|
1050
1053
|
const x = () => {
|
|
1051
1054
|
if (i.current) {
|
|
1052
|
-
const
|
|
1053
|
-
u(
|
|
1055
|
+
const U = i.current.scrollWidth > i.current.clientWidth;
|
|
1056
|
+
u(U);
|
|
1054
1057
|
}
|
|
1055
1058
|
};
|
|
1056
1059
|
x();
|
|
1057
|
-
const
|
|
1060
|
+
const W = setTimeout(x, 0);
|
|
1058
1061
|
return window.addEventListener("resize", x), () => {
|
|
1059
|
-
clearTimeout(
|
|
1062
|
+
clearTimeout(W), window.removeEventListener("resize", x);
|
|
1060
1063
|
};
|
|
1061
1064
|
}, [e, t]);
|
|
1062
|
-
const c = /* @__PURE__ */
|
|
1063
|
-
return n && t ? /* @__PURE__ */
|
|
1064
|
-
|
|
1065
|
+
const c = /* @__PURE__ */ s("span", { className: `truncate block ${o}`, ref: i, children: e });
|
|
1066
|
+
return n && t ? /* @__PURE__ */ s(
|
|
1067
|
+
lr,
|
|
1065
1068
|
{
|
|
1066
1069
|
content: t,
|
|
1067
1070
|
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",
|
|
@@ -1071,40 +1074,40 @@ function xr({
|
|
|
1071
1074
|
}
|
|
1072
1075
|
) : c;
|
|
1073
1076
|
});
|
|
1074
|
-
|
|
1075
|
-
const
|
|
1076
|
-
b ? b(e) :
|
|
1077
|
-
},
|
|
1078
|
-
|
|
1079
|
-
},
|
|
1080
|
-
|
|
1077
|
+
de.displayName = "TruncatedCell";
|
|
1078
|
+
const se = w !== null && b !== null, P = k !== null, q = H !== null, [ue, fe] = y(1), [qe, je] = y(d), Re = S !== null ? S : ue, ye = a !== null ? a : qe, ze = (e) => {
|
|
1079
|
+
b ? b(e) : fe(e);
|
|
1080
|
+
}, Ze = (e) => {
|
|
1081
|
+
T ? T(e) : je(e);
|
|
1082
|
+
}, Y = 50, I = "action", ee = K(!1), He = K(null), te = oe(() => v ? `dataTable_columns_${v}:${E}` : `dataTable_columns_${l.map((t) => t.id || t.key).sort().join("_")}:${E}`, [v, l, E]), xe = oe(() => v ? `dataTable_manual_change_${v}:${E}` : null, [v, E]);
|
|
1083
|
+
O((e, t) => {
|
|
1081
1084
|
if (typeof window > "u" || !e || !t || t.length === 0)
|
|
1082
1085
|
return null;
|
|
1083
1086
|
try {
|
|
1084
|
-
const
|
|
1085
|
-
if (
|
|
1086
|
-
const n = JSON.parse(
|
|
1087
|
+
const o = localStorage.getItem(e);
|
|
1088
|
+
if (o) {
|
|
1089
|
+
const n = JSON.parse(o).filter(
|
|
1087
1090
|
(u) => t.some((c) => (c.id || c.key) === u)
|
|
1088
1091
|
);
|
|
1089
1092
|
if (n.length > 0)
|
|
1090
1093
|
return n;
|
|
1091
1094
|
}
|
|
1092
|
-
} catch (
|
|
1093
|
-
console.warn("Failed to load saved columns from localStorage:",
|
|
1095
|
+
} catch (o) {
|
|
1096
|
+
console.warn("Failed to load saved columns from localStorage:", o);
|
|
1094
1097
|
}
|
|
1095
1098
|
return null;
|
|
1096
1099
|
}, []);
|
|
1097
|
-
const [
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1100
|
+
const [X, be] = y({}), [ne, Ve] = y(""), [N, ve] = y(null), [et, Be] = y({ top: 0, left: 0 }), we = K(null), Fe = K({}), [p, m] = y(null), [g, F] = y("asc"), M = O((e, t) => {
|
|
1101
|
+
const o = Ye(t);
|
|
1102
|
+
be((i) => {
|
|
1100
1103
|
const n = { ...i };
|
|
1101
|
-
return
|
|
1102
|
-
}), b ? b(1) :
|
|
1103
|
-
|
|
1104
|
+
return o ? n[e] = t : delete n[e], n;
|
|
1105
|
+
}), b ? b(1) : fe(1), P && k && k(
|
|
1106
|
+
o ? { ...X, [e]: t } : Object.fromEntries(Object.entries(X).filter(([i]) => i !== e))
|
|
1104
1107
|
);
|
|
1105
|
-
}, [
|
|
1106
|
-
|
|
1107
|
-
}, [k,
|
|
1108
|
+
}, [X, k, P, b]), Se = O(() => {
|
|
1109
|
+
be({}), Ve(""), b ? b(1) : fe(1), P && k && k({});
|
|
1110
|
+
}, [k, P, b]), Ee = O((e) => {
|
|
1108
1111
|
const t = l.find((n) => (n.id || n.key) === e);
|
|
1109
1112
|
if (t && Array.isArray(t.filterOptions)) {
|
|
1110
1113
|
const n = /* @__PURE__ */ new Set(), u = [];
|
|
@@ -1118,113 +1121,113 @@ function xr({
|
|
|
1118
1121
|
}
|
|
1119
1122
|
if (!r || r.length === 0)
|
|
1120
1123
|
return [];
|
|
1121
|
-
const
|
|
1124
|
+
const o = /* @__PURE__ */ new Set(), i = [];
|
|
1122
1125
|
for (const n of r) {
|
|
1123
1126
|
const u = n[e];
|
|
1124
1127
|
if (u == null)
|
|
1125
1128
|
continue;
|
|
1126
1129
|
const c = typeof u == "object" ? JSON.stringify(u) : String(u);
|
|
1127
|
-
|
|
1130
|
+
o.has(c) || (o.add(c), i.push(c));
|
|
1128
1131
|
}
|
|
1129
1132
|
return i.sort((n, u) => n.localeCompare(u));
|
|
1130
|
-
}, [r, l]),
|
|
1131
|
-
const t = l.find((
|
|
1132
|
-
return t && t.filterType ? t.filterType :
|
|
1133
|
-
}, [l,
|
|
1133
|
+
}, [r, l]), re = O((e) => {
|
|
1134
|
+
const t = l.find((o) => Q(o) === e);
|
|
1135
|
+
return t && t.filterType ? t.filterType : Zn(Ee(e));
|
|
1136
|
+
}, [l, Ee]), Me = O((e) => {
|
|
1134
1137
|
const i = typeof window < "u" ? window.innerWidth : 1 / 0;
|
|
1135
1138
|
let n = e.left;
|
|
1136
1139
|
return n + 280 > i - 8 && (n = Math.max(8, e.right - 280)), { top: e.bottom + 6, left: n };
|
|
1137
|
-
}, []),
|
|
1140
|
+
}, []), Qt = O((e, t) => {
|
|
1138
1141
|
if (!t) {
|
|
1139
|
-
|
|
1142
|
+
ve(e);
|
|
1140
1143
|
return;
|
|
1141
1144
|
}
|
|
1142
|
-
const
|
|
1143
|
-
|
|
1144
|
-
}, [
|
|
1145
|
-
|
|
1146
|
-
if (!
|
|
1145
|
+
const o = t.getBoundingClientRect();
|
|
1146
|
+
Be(Me(o)), ve((i) => i === e ? null : e);
|
|
1147
|
+
}, [Me]);
|
|
1148
|
+
j(() => {
|
|
1149
|
+
if (!N)
|
|
1147
1150
|
return;
|
|
1148
1151
|
const e = (t) => {
|
|
1149
|
-
if (
|
|
1152
|
+
if (we.current && we.current.contains(t.target))
|
|
1150
1153
|
return;
|
|
1151
|
-
const
|
|
1152
|
-
|
|
1154
|
+
const o = Fe.current[N];
|
|
1155
|
+
o && o.contains(t.target) || Object.values(Fe.current).some(
|
|
1153
1156
|
(n) => n && n.contains(t.target)
|
|
1154
|
-
) ||
|
|
1157
|
+
) || ve(null);
|
|
1155
1158
|
};
|
|
1156
1159
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1157
|
-
}, [
|
|
1158
|
-
if (!
|
|
1160
|
+
}, [N]), j(() => {
|
|
1161
|
+
if (!N)
|
|
1159
1162
|
return;
|
|
1160
1163
|
const e = () => {
|
|
1161
|
-
const t =
|
|
1164
|
+
const t = Fe.current[N];
|
|
1162
1165
|
if (!t)
|
|
1163
1166
|
return;
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1167
|
+
const o = t.getBoundingClientRect();
|
|
1168
|
+
Be(Me(o));
|
|
1166
1169
|
};
|
|
1167
1170
|
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
1168
1171
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
1169
1172
|
};
|
|
1170
|
-
}, [
|
|
1171
|
-
if (!
|
|
1173
|
+
}, [N, Me]), Dn(() => {
|
|
1174
|
+
if (!N)
|
|
1172
1175
|
return;
|
|
1173
|
-
const e =
|
|
1176
|
+
const e = we.current, t = Fe.current[N];
|
|
1174
1177
|
if (!e || !t)
|
|
1175
1178
|
return;
|
|
1176
|
-
const
|
|
1177
|
-
if (!(i.left +
|
|
1179
|
+
const o = e.offsetWidth, i = t.getBoundingClientRect(), n = 8, u = typeof window < "u" ? window.innerWidth : 1 / 0;
|
|
1180
|
+
if (!(i.left + o > u - n))
|
|
1178
1181
|
return;
|
|
1179
|
-
const x = Math.max(n, i.right -
|
|
1180
|
-
|
|
1181
|
-
}, [
|
|
1182
|
-
const
|
|
1182
|
+
const x = Math.max(n, i.right - o);
|
|
1183
|
+
Be((W) => W.left === x ? W : { ...W, left: x });
|
|
1184
|
+
}, [N, et.top]);
|
|
1185
|
+
const Bt = O((e) => !e || typeof e != "object" ? {} : Object.fromEntries(
|
|
1183
1186
|
Object.entries(e).filter(([, t]) => t == null ? !1 : typeof t == "string" ? t.trim() !== "" : !0)
|
|
1184
|
-
), []),
|
|
1185
|
-
const
|
|
1186
|
-
return
|
|
1187
|
+
), []), Et = O((e, t) => {
|
|
1188
|
+
const o = Object.keys(e || {}), i = Object.keys(t || {});
|
|
1189
|
+
return o.length !== i.length ? !1 : o.every((n) => e[n] === t[n]);
|
|
1187
1190
|
}, []);
|
|
1188
|
-
|
|
1189
|
-
if (!
|
|
1191
|
+
j(() => {
|
|
1192
|
+
if (!P || C === null)
|
|
1190
1193
|
return;
|
|
1191
|
-
const e =
|
|
1192
|
-
|
|
1193
|
-
}, [
|
|
1194
|
-
const
|
|
1194
|
+
const e = Bt(C);
|
|
1195
|
+
be((t) => Et(t, e) ? t : e);
|
|
1196
|
+
}, [P, C, Bt, Et]), O((e, t) => e === "csat_score" && t === "evaluation.csat_score" ? t : e, []);
|
|
1197
|
+
const Ke = q && D.length > 0 ? D[0][0] : p, tt = q && D.length > 0 ? D[0][1] : g, [ar, Mt] = y(
|
|
1195
1198
|
() => l.map((e) => e.id || e.key)
|
|
1196
|
-
),
|
|
1199
|
+
), le = O((e) => {
|
|
1197
1200
|
if (!e || e.length === 0)
|
|
1198
1201
|
return e;
|
|
1199
1202
|
let t = Array.from(new Set(e));
|
|
1200
|
-
t.length >
|
|
1201
|
-
const i = l.map((c) => c.id || c.key).includes(
|
|
1202
|
-
return !t.includes(
|
|
1203
|
-
}, [l]), [
|
|
1204
|
-
if (typeof window < "u" &&
|
|
1203
|
+
t.length > Y && (t = t.slice(0, Y));
|
|
1204
|
+
const i = l.map((c) => c.id || c.key).includes(I);
|
|
1205
|
+
return !t.includes(I) && i && (t.length >= Y ? t = [...t.slice(0, Y - 1), I] : t = [...t, I]), [...t.filter((c) => c !== I), I];
|
|
1206
|
+
}, [l]), [_, Ae] = y(() => {
|
|
1207
|
+
if (typeof window < "u" && v)
|
|
1205
1208
|
try {
|
|
1206
|
-
if (localStorage.getItem(`dataTable_manual_change_${
|
|
1207
|
-
const i = localStorage.getItem(`dataTable_columns_${
|
|
1209
|
+
if (localStorage.getItem(`dataTable_manual_change_${v}:${E}`) === "true") {
|
|
1210
|
+
const i = localStorage.getItem(`dataTable_columns_${v}:${E}`);
|
|
1208
1211
|
if (i) {
|
|
1209
1212
|
const n = JSON.parse(i);
|
|
1210
1213
|
if (Array.isArray(n) && n.length > 0) {
|
|
1211
|
-
|
|
1214
|
+
ee.current = !0;
|
|
1212
1215
|
const u = n.filter(
|
|
1213
1216
|
(c) => l.some((x) => (x.id || x.key) === c)
|
|
1214
1217
|
);
|
|
1215
1218
|
if (u.length > 0)
|
|
1216
|
-
return u.slice(0,
|
|
1219
|
+
return u.slice(0, Y);
|
|
1217
1220
|
}
|
|
1218
1221
|
}
|
|
1219
1222
|
}
|
|
1220
|
-
} catch (
|
|
1221
|
-
console.warn("Failed to load saved columns from localStorage:",
|
|
1223
|
+
} catch (o) {
|
|
1224
|
+
console.warn("Failed to load saved columns from localStorage:", o);
|
|
1222
1225
|
}
|
|
1223
|
-
const t = l.map((
|
|
1224
|
-
return
|
|
1225
|
-
}), [
|
|
1226
|
-
|
|
1227
|
-
const [
|
|
1226
|
+
const t = l.map((o) => o.id || o.key).slice(0, Y);
|
|
1227
|
+
return le(t);
|
|
1228
|
+
}), [ae, ht] = y(!1), [pe, Ne] = y([]), [At, qt] = y({ top: 0, left: 0, width: 0 }), [nt, We] = y(/* @__PURE__ */ new Set()), [rt, Oe] = y(/* @__PURE__ */ new Set()), he = K({}), ot = K(null);
|
|
1229
|
+
ot.current === null && (ot.current = [..._]);
|
|
1230
|
+
const [me, mt] = y(null), [Zt, st] = y(null), Te = K(null), gt = K(null), yt = K(null), [Nt, xt] = y(null), [bt, Vt] = y({}), en = K(null), it = K(null), Q = (e) => e.id || e.key, lt = O((e) => {
|
|
1228
1231
|
if (typeof e == "number" && Number.isFinite(e))
|
|
1229
1232
|
return e;
|
|
1230
1233
|
if (typeof e == "string") {
|
|
@@ -1233,60 +1236,60 @@ function xr({
|
|
|
1233
1236
|
const i = parseFloat(t);
|
|
1234
1237
|
return Number.isFinite(i) ? i : null;
|
|
1235
1238
|
}
|
|
1236
|
-
const
|
|
1237
|
-
return Number.isFinite(
|
|
1239
|
+
const o = parseFloat(t);
|
|
1240
|
+
return Number.isFinite(o) && `${o}` === t ? o : null;
|
|
1238
1241
|
}
|
|
1239
1242
|
return null;
|
|
1240
|
-
}, []),
|
|
1241
|
-
if (!
|
|
1243
|
+
}, []), Wt = O((e, t) => bt[e] != null ? `${bt[e]}px` : typeof t == "number" ? `${t}px` : t || "auto", [bt]), at = O((e) => {
|
|
1244
|
+
if (!it.current)
|
|
1242
1245
|
return;
|
|
1243
|
-
const { columnId: t, startX:
|
|
1244
|
-
|
|
1245
|
-
}, []),
|
|
1246
|
-
|
|
1247
|
-
}, [
|
|
1248
|
-
var
|
|
1246
|
+
const { columnId: t, startX: o, startWidth: i, minWidth: n, maxWidth: u } = it.current, c = e.clientX - o, x = Math.round(i + c), W = Math.min(u, Math.max(n, x));
|
|
1247
|
+
Vt((U) => ({ ...U, [t]: W }));
|
|
1248
|
+
}, []), Ue = O(() => {
|
|
1249
|
+
it.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", at), document.removeEventListener("mouseup", Ue);
|
|
1250
|
+
}, [at]), tn = O((e, t, o) => {
|
|
1251
|
+
var Ie;
|
|
1249
1252
|
e.preventDefault(), e.stopPropagation();
|
|
1250
|
-
const i = t.id || t.key, n =
|
|
1251
|
-
|
|
1252
|
-
}, [
|
|
1253
|
-
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
coordinateGetter:
|
|
1253
|
+
const i = t.id || t.key, n = lt(t.minWidth) ?? B, u = lt(t.maxWidth) ?? A, c = Math.min(n, u), x = Math.max(n, u), W = ((Ie = e.currentTarget.closest("th")) == null ? void 0 : Ie.getBoundingClientRect().width) || 0, U = lt(o), Je = U ?? Math.max(c, Math.round(W) || c), Pe = Math.min(x, Math.max(c, Je));
|
|
1254
|
+
it.current = { columnId: i, startX: e.clientX, startWidth: Pe, minWidth: c, maxWidth: x }, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", at), document.addEventListener("mouseup", Ue);
|
|
1255
|
+
}, [A, B, at, Ue, lt]);
|
|
1256
|
+
j(() => () => Ue(), [Ue]);
|
|
1257
|
+
const nn = Cn(
|
|
1258
|
+
Ut(Wn),
|
|
1259
|
+
Ut(Nn, {
|
|
1260
|
+
coordinateGetter: An
|
|
1258
1261
|
})
|
|
1259
|
-
),
|
|
1260
|
-
const { active: t, over:
|
|
1261
|
-
if (
|
|
1262
|
-
if (t.id ===
|
|
1263
|
-
Lt("Cannot drop columns on the Action column"),
|
|
1262
|
+
), rn = (e) => {
|
|
1263
|
+
const { active: t, over: o } = e;
|
|
1264
|
+
if (o && t.id !== o.id) {
|
|
1265
|
+
if (t.id === I || o.id === I) {
|
|
1266
|
+
Lt("Cannot drop columns on the Action column"), xt(null);
|
|
1264
1267
|
return;
|
|
1265
1268
|
}
|
|
1266
|
-
|
|
1267
|
-
const n = i.indexOf(t.id), u = i.indexOf(
|
|
1269
|
+
ee.current = !0, Ae((i) => {
|
|
1270
|
+
const n = i.indexOf(t.id), u = i.indexOf(o.id);
|
|
1268
1271
|
if (n !== -1 && u !== -1) {
|
|
1269
|
-
const c =
|
|
1270
|
-
return
|
|
1272
|
+
const c = Ft(i, n, u), x = le(c);
|
|
1273
|
+
return Pt(x), x;
|
|
1271
1274
|
}
|
|
1272
1275
|
return i;
|
|
1273
|
-
}),
|
|
1274
|
-
const n = i.indexOf(t.id), u = i.indexOf(
|
|
1275
|
-
return
|
|
1276
|
+
}), Mt((i) => {
|
|
1277
|
+
const n = i.indexOf(t.id), u = i.indexOf(o.id);
|
|
1278
|
+
return Ft(i, n, u);
|
|
1276
1279
|
});
|
|
1277
1280
|
}
|
|
1278
|
-
|
|
1279
|
-
},
|
|
1280
|
-
|
|
1281
|
-
},
|
|
1282
|
-
if (
|
|
1281
|
+
xt(null);
|
|
1282
|
+
}, on = (e) => {
|
|
1283
|
+
xt(e.active.id);
|
|
1284
|
+
}, ct = oe(() => {
|
|
1285
|
+
if (P)
|
|
1283
1286
|
return r || [];
|
|
1284
1287
|
if (!r || r.length === 0)
|
|
1285
1288
|
return [];
|
|
1286
|
-
const e =
|
|
1287
|
-
return r.filter((
|
|
1289
|
+
const e = ne.trim().toLowerCase(), t = Object.entries(X).filter(([, o]) => Ye(o));
|
|
1290
|
+
return r.filter((o) => {
|
|
1288
1291
|
for (const [i, n] of t) {
|
|
1289
|
-
const u =
|
|
1292
|
+
const u = o[i];
|
|
1290
1293
|
if (u == null)
|
|
1291
1294
|
return !1;
|
|
1292
1295
|
if (Array.isArray(n)) {
|
|
@@ -1296,19 +1299,19 @@ function xr({
|
|
|
1296
1299
|
continue;
|
|
1297
1300
|
}
|
|
1298
1301
|
if (n.type === "range") {
|
|
1299
|
-
const c =
|
|
1302
|
+
const c = zt(u);
|
|
1300
1303
|
if (isNaN(c) || n.min !== "" && n.min != null && c < Number(n.min) || n.max !== "" && n.max != null && c > Number(n.max))
|
|
1301
1304
|
return !1;
|
|
1302
1305
|
continue;
|
|
1303
1306
|
}
|
|
1304
1307
|
if (n.type === "durationRange") {
|
|
1305
|
-
const c =
|
|
1308
|
+
const c = Qn(u);
|
|
1306
1309
|
if (isNaN(c) || n.minSec !== "" && n.minSec != null && c < Number(n.minSec) || n.maxSec !== "" && n.maxSec != null && c > Number(n.maxSec))
|
|
1307
1310
|
return !1;
|
|
1308
1311
|
continue;
|
|
1309
1312
|
}
|
|
1310
1313
|
if (n.type === "scoreRange") {
|
|
1311
|
-
const c =
|
|
1314
|
+
const c = zt(u);
|
|
1312
1315
|
if (isNaN(c))
|
|
1313
1316
|
return !1;
|
|
1314
1317
|
if (Array.isArray(n.values) && n.values.length > 0) {
|
|
@@ -1322,7 +1325,7 @@ function xr({
|
|
|
1322
1325
|
continue;
|
|
1323
1326
|
}
|
|
1324
1327
|
if (n.type === "dateRange") {
|
|
1325
|
-
const c =
|
|
1328
|
+
const c = qn(u);
|
|
1326
1329
|
if (!c)
|
|
1327
1330
|
return !1;
|
|
1328
1331
|
if (n.from) {
|
|
@@ -1338,51 +1341,51 @@ function xr({
|
|
|
1338
1341
|
continue;
|
|
1339
1342
|
}
|
|
1340
1343
|
}
|
|
1341
|
-
return !(e && !Object.values(
|
|
1344
|
+
return !(e && !Object.values(o).some((n) => n == null ? !1 : String(n).toLowerCase().includes(e)));
|
|
1342
1345
|
});
|
|
1343
|
-
}, [r,
|
|
1344
|
-
const
|
|
1345
|
-
if (
|
|
1346
|
+
}, [r, X, ne, P]), Xe = oe(() => q || !Ke ? ct : [...ct].sort((e, t) => {
|
|
1347
|
+
const o = e[Ke], i = t[Ke];
|
|
1348
|
+
if (o == null)
|
|
1346
1349
|
return 1;
|
|
1347
1350
|
if (i == null)
|
|
1348
1351
|
return -1;
|
|
1349
|
-
if (typeof
|
|
1350
|
-
return
|
|
1351
|
-
const n = String(
|
|
1352
|
-
return
|
|
1353
|
-
}), [
|
|
1354
|
-
if (
|
|
1355
|
-
return
|
|
1352
|
+
if (typeof o == "number" && typeof i == "number")
|
|
1353
|
+
return tt === "asc" ? o - i : i - o;
|
|
1354
|
+
const n = String(o).toLowerCase(), u = String(i).toLowerCase();
|
|
1355
|
+
return tt === "asc" ? n.localeCompare(u) : u.localeCompare(n);
|
|
1356
|
+
}), [ct, Ke, tt, q]), $e = oe(() => {
|
|
1357
|
+
if (se)
|
|
1358
|
+
return Xe;
|
|
1356
1359
|
{
|
|
1357
|
-
const e = (
|
|
1358
|
-
return
|
|
1360
|
+
const e = (Re - 1) * ye, t = e + ye;
|
|
1361
|
+
return Xe.slice(e, t);
|
|
1359
1362
|
}
|
|
1360
|
-
}, [
|
|
1363
|
+
}, [Xe, Re, ye, se]), vt = O(
|
|
1361
1364
|
(e, t) => V ? V(e, t) : (e == null ? void 0 : e.id) ?? t,
|
|
1362
1365
|
[V]
|
|
1363
|
-
),
|
|
1366
|
+
), ke = oe(
|
|
1364
1367
|
() => new Set(Array.isArray(Z) ? Z : []),
|
|
1365
1368
|
[Z]
|
|
1366
|
-
),
|
|
1367
|
-
() =>
|
|
1368
|
-
[
|
|
1369
|
-
),
|
|
1370
|
-
() =>
|
|
1371
|
-
[
|
|
1372
|
-
),
|
|
1369
|
+
), De = oe(
|
|
1370
|
+
() => $e.map((e, t) => vt(e, t)),
|
|
1371
|
+
[$e, vt]
|
|
1372
|
+
), Ot = oe(
|
|
1373
|
+
() => De.reduce((e, t) => ke.has(t) ? e + 1 : e, 0),
|
|
1374
|
+
[De, ke]
|
|
1375
|
+
), dt = De.length > 0 && Ot === De.length, sn = Ot > 0 && !dt, ln = O(
|
|
1373
1376
|
(e) => {
|
|
1374
|
-
if (!
|
|
1377
|
+
if (!J)
|
|
1375
1378
|
return;
|
|
1376
|
-
const t = new Set(
|
|
1377
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
1379
|
+
const t = new Set(ke);
|
|
1380
|
+
t.has(e) ? t.delete(e) : t.add(e), J(Array.from(t));
|
|
1378
1381
|
},
|
|
1379
|
-
[
|
|
1380
|
-
),
|
|
1381
|
-
if (!
|
|
1382
|
+
[J, ke]
|
|
1383
|
+
), an = O(() => {
|
|
1384
|
+
if (!J)
|
|
1382
1385
|
return;
|
|
1383
|
-
const e = new Set(
|
|
1384
|
-
|
|
1385
|
-
}, [
|
|
1386
|
+
const e = new Set(ke);
|
|
1387
|
+
dt ? De.forEach((t) => e.delete(t)) : De.forEach((t) => e.add(t)), J(Array.from(e));
|
|
1388
|
+
}, [J, ke, dt, De]), Tt = ({ checked: e, indeterminate: t = !1, onToggle: o, ariaLabel: i }) => /* @__PURE__ */ s(
|
|
1386
1389
|
"span",
|
|
1387
1390
|
{
|
|
1388
1391
|
role: "checkbox",
|
|
@@ -1390,10 +1393,10 @@ function xr({
|
|
|
1390
1393
|
"aria-label": i,
|
|
1391
1394
|
tabIndex: 0,
|
|
1392
1395
|
onClick: (n) => {
|
|
1393
|
-
n.stopPropagation(),
|
|
1396
|
+
n.stopPropagation(), o();
|
|
1394
1397
|
},
|
|
1395
1398
|
onKeyDown: (n) => {
|
|
1396
|
-
(n.key === " " || n.key === "Enter") && (n.preventDefault(), n.stopPropagation(),
|
|
1399
|
+
(n.key === " " || n.key === "Enter") && (n.preventDefault(), n.stopPropagation(), o());
|
|
1397
1400
|
},
|
|
1398
1401
|
style: {
|
|
1399
1402
|
width: 16,
|
|
@@ -1407,110 +1410,110 @@ function xr({
|
|
|
1407
1410
|
cursor: "pointer",
|
|
1408
1411
|
flexShrink: 0
|
|
1409
1412
|
},
|
|
1410
|
-
children: t ? /* @__PURE__ */
|
|
1413
|
+
children: t ? /* @__PURE__ */ s(jn, { size: 11, color: "#FFFFFF", strokeWidth: 3 }) : e ? /* @__PURE__ */ s(Qe, { size: 11, color: "#FFFFFF", strokeWidth: 3 }) : null
|
|
1411
1414
|
}
|
|
1412
|
-
),
|
|
1413
|
-
|
|
1414
|
-
},
|
|
1415
|
-
const
|
|
1416
|
-
|
|
1415
|
+
), ut = 44, $t = (e) => {
|
|
1416
|
+
q && H ? (H(e), b ? b(1) : fe(1)) : (p === e ? F(g === "asc" ? "desc" : "asc") : (m(e), F("asc")), ze(1));
|
|
1417
|
+
}, cn = (e, t) => {
|
|
1418
|
+
const o = (t || "").split(/\s+/).map((i) => i.trim()).filter(Boolean);
|
|
1419
|
+
M(e, o);
|
|
1417
1420
|
}, Lt = (e) => {
|
|
1418
|
-
|
|
1419
|
-
|
|
1421
|
+
yt.current || (typeof z == "function" && z(e), yt.current = setTimeout(() => {
|
|
1422
|
+
yt.current = null;
|
|
1420
1423
|
}, 3e3));
|
|
1421
|
-
},
|
|
1422
|
-
if (typeof window < "u" &&
|
|
1424
|
+
}, Pt = O((e) => {
|
|
1425
|
+
if (typeof window < "u" && te && e.length > 0 && ee.current)
|
|
1423
1426
|
try {
|
|
1424
|
-
localStorage.setItem(
|
|
1427
|
+
localStorage.setItem(te, JSON.stringify(e)), xe && localStorage.setItem(xe, "true");
|
|
1425
1428
|
} catch (t) {
|
|
1426
1429
|
console.warn("Failed to save columns to localStorage:", t);
|
|
1427
1430
|
}
|
|
1428
|
-
}, [
|
|
1429
|
-
Object.values(
|
|
1430
|
-
},
|
|
1431
|
-
const e =
|
|
1432
|
-
return
|
|
1431
|
+
}, [te, xe]), It = 250, ft = () => {
|
|
1432
|
+
Object.values(he.current).forEach((e) => clearTimeout(e)), he.current = {};
|
|
1433
|
+
}, dn = () => {
|
|
1434
|
+
const e = pe.filter((t) => !rt.has(t));
|
|
1435
|
+
return nt.forEach((t) => {
|
|
1433
1436
|
e.includes(t) || e.push(t);
|
|
1434
|
-
}),
|
|
1435
|
-
},
|
|
1436
|
-
if (e ===
|
|
1437
|
+
}), le(e);
|
|
1438
|
+
}, un = (e) => {
|
|
1439
|
+
if (e === I)
|
|
1437
1440
|
return;
|
|
1438
|
-
if (
|
|
1439
|
-
clearTimeout(
|
|
1440
|
-
const i = new Set(
|
|
1441
|
+
if (he.current[e]) {
|
|
1442
|
+
clearTimeout(he.current[e]), delete he.current[e], We((o) => {
|
|
1443
|
+
const i = new Set(o);
|
|
1441
1444
|
return i.delete(e), i;
|
|
1442
|
-
}),
|
|
1443
|
-
const i = new Set(
|
|
1445
|
+
}), Oe((o) => {
|
|
1446
|
+
const i = new Set(o);
|
|
1444
1447
|
return i.delete(e), i;
|
|
1445
1448
|
});
|
|
1446
1449
|
return;
|
|
1447
1450
|
}
|
|
1448
|
-
if (
|
|
1449
|
-
if (
|
|
1451
|
+
if (pe.includes(e)) {
|
|
1452
|
+
if (pe.length - rt.size <= 1)
|
|
1450
1453
|
return;
|
|
1451
|
-
|
|
1452
|
-
|
|
1454
|
+
Oe((i) => new Set(i).add(e)), he.current[e] = setTimeout(() => {
|
|
1455
|
+
Ne((i) => i.filter((n) => n !== e)), Oe((i) => {
|
|
1453
1456
|
const n = new Set(i);
|
|
1454
1457
|
return n.delete(e), n;
|
|
1455
|
-
}), delete
|
|
1456
|
-
},
|
|
1458
|
+
}), delete he.current[e];
|
|
1459
|
+
}, It);
|
|
1457
1460
|
} else {
|
|
1458
|
-
if (
|
|
1461
|
+
if (pe.length + nt.size >= Y) {
|
|
1459
1462
|
Lt("Maximum 9 column selection allowed");
|
|
1460
1463
|
return;
|
|
1461
1464
|
}
|
|
1462
|
-
|
|
1463
|
-
|
|
1465
|
+
We((i) => new Set(i).add(e)), he.current[e] = setTimeout(() => {
|
|
1466
|
+
Ne((i) => le([...i, e])), We((i) => {
|
|
1464
1467
|
const n = new Set(i);
|
|
1465
1468
|
return n.delete(e), n;
|
|
1466
|
-
}), delete
|
|
1467
|
-
},
|
|
1469
|
+
}), delete he.current[e];
|
|
1470
|
+
}, It);
|
|
1468
1471
|
}
|
|
1469
|
-
},
|
|
1470
|
-
|
|
1471
|
-
},
|
|
1472
|
-
|
|
1473
|
-
},
|
|
1474
|
-
e.preventDefault(),
|
|
1475
|
-
},
|
|
1476
|
-
|
|
1477
|
-
},
|
|
1478
|
-
e.preventDefault(),
|
|
1479
|
-
const i =
|
|
1480
|
-
return
|
|
1481
|
-
}),
|
|
1472
|
+
}, fn = (e, t) => {
|
|
1473
|
+
pe[t] !== I && mt(t);
|
|
1474
|
+
}, pn = () => {
|
|
1475
|
+
mt(null), st(null);
|
|
1476
|
+
}, hn = (e, t) => {
|
|
1477
|
+
e.preventDefault(), me !== null && me !== t && st(t);
|
|
1478
|
+
}, mn = () => {
|
|
1479
|
+
st(null);
|
|
1480
|
+
}, gn = (e, t) => {
|
|
1481
|
+
e.preventDefault(), me !== null && me !== t && pe[t] !== I && pe[me] !== I && Ne((o) => {
|
|
1482
|
+
const i = Ft(o, me, t);
|
|
1483
|
+
return le(i);
|
|
1484
|
+
}), mt(null), st(null);
|
|
1482
1485
|
};
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
const t =
|
|
1486
|
-
return [...t, ...
|
|
1486
|
+
j(() => {
|
|
1487
|
+
Mt((e) => {
|
|
1488
|
+
const t = _.filter((n) => e.includes(n)), o = _.filter((n) => !e.includes(n)), i = e.filter((n) => !_.includes(n));
|
|
1489
|
+
return [...t, ...o, ...i];
|
|
1487
1490
|
});
|
|
1488
|
-
}, [
|
|
1489
|
-
if (typeof window < "u" &&
|
|
1491
|
+
}, [_]), j(() => {
|
|
1492
|
+
if (typeof window < "u" && te && _.length > 0 && ee.current)
|
|
1490
1493
|
try {
|
|
1491
|
-
const e =
|
|
1492
|
-
localStorage.setItem(
|
|
1494
|
+
const e = le(_);
|
|
1495
|
+
localStorage.setItem(te, JSON.stringify(e)), xe && localStorage.setItem(xe, "true");
|
|
1493
1496
|
} catch (e) {
|
|
1494
1497
|
console.warn("Failed to save columns to localStorage:", e);
|
|
1495
1498
|
}
|
|
1496
|
-
}, [
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
+
}, [_, te, xe]), j(() => {
|
|
1500
|
+
ce && ce(
|
|
1501
|
+
_.filter((e) => e !== I)
|
|
1499
1502
|
);
|
|
1500
|
-
}, [
|
|
1501
|
-
if (l.length > 0 &&
|
|
1502
|
-
if (typeof window < "u" &&
|
|
1503
|
+
}, [_, ce]), j(() => {
|
|
1504
|
+
if (l.length > 0 && _.length === 0) {
|
|
1505
|
+
if (typeof window < "u" && v)
|
|
1503
1506
|
try {
|
|
1504
|
-
if (localStorage.getItem(`dataTable_manual_change_${
|
|
1505
|
-
const
|
|
1506
|
-
if (
|
|
1507
|
-
const i = JSON.parse(
|
|
1507
|
+
if (localStorage.getItem(`dataTable_manual_change_${v}:${E}`) === "true") {
|
|
1508
|
+
const o = localStorage.getItem(`dataTable_columns_${v}:${E}`);
|
|
1509
|
+
if (o) {
|
|
1510
|
+
const i = JSON.parse(o);
|
|
1508
1511
|
if (Array.isArray(i) && i.length > 0) {
|
|
1509
1512
|
const n = i.filter(
|
|
1510
1513
|
(u) => l.some((c) => (c.id || c.key) === u)
|
|
1511
1514
|
);
|
|
1512
1515
|
if (n.length > 0) {
|
|
1513
|
-
|
|
1516
|
+
ee.current = !0, Ae(n.slice(0, Y));
|
|
1514
1517
|
return;
|
|
1515
1518
|
}
|
|
1516
1519
|
}
|
|
@@ -1520,20 +1523,38 @@ function xr({
|
|
|
1520
1523
|
console.warn("Failed to load saved columns from localStorage:", t);
|
|
1521
1524
|
}
|
|
1522
1525
|
const e = l.map((t) => t.id || t.key);
|
|
1523
|
-
|
|
1526
|
+
Ae(le(e.slice(0, Y)));
|
|
1524
1527
|
}
|
|
1525
|
-
}, [l,
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1528
|
+
}, [l, v, E, le]), j(() => {
|
|
1529
|
+
if (!(typeof window > "u" || !v) && !(!l || l.length === 0) && He.current !== E && (He.current = E, !ee.current))
|
|
1530
|
+
try {
|
|
1531
|
+
if (!(localStorage.getItem(`dataTable_manual_change_${v}:${E}`) === "true"))
|
|
1532
|
+
return;
|
|
1533
|
+
const t = localStorage.getItem(`dataTable_columns_${v}:${E}`);
|
|
1534
|
+
if (!t)
|
|
1535
|
+
return;
|
|
1536
|
+
const o = JSON.parse(t);
|
|
1537
|
+
if (!Array.isArray(o) || o.length === 0)
|
|
1538
|
+
return;
|
|
1539
|
+
const i = o.filter(
|
|
1540
|
+
(n) => l.some((u) => (u.id || u.key) === n)
|
|
1541
|
+
);
|
|
1542
|
+
i.length > 0 && (ee.current = !0, Ae(i.slice(0, Y)));
|
|
1543
|
+
} catch (e) {
|
|
1544
|
+
console.warn("Failed to re-load saved columns after user resolved:", e);
|
|
1545
|
+
}
|
|
1546
|
+
}, [E, v, l]);
|
|
1547
|
+
const Le = oe(() => {
|
|
1548
|
+
const e = _.map((t) => l.find((o) => Q(o) === t)).filter(Boolean);
|
|
1549
|
+
return le(e.map(Q)).map((t) => l.find((o) => Q(o) === t)).filter(Boolean);
|
|
1550
|
+
}, [l, _]);
|
|
1551
|
+
oe(() => Le.some((e) => e.filterable === !0), [Le]), j(() => {
|
|
1552
|
+
if (!ae || !Te.current)
|
|
1532
1553
|
return;
|
|
1533
1554
|
const e = () => {
|
|
1534
|
-
if (
|
|
1535
|
-
const t =
|
|
1536
|
-
|
|
1555
|
+
if (Te.current) {
|
|
1556
|
+
const t = Te.current.getBoundingClientRect(), o = 217, i = Math.max(8, t.right - o);
|
|
1557
|
+
qt({
|
|
1537
1558
|
top: t.bottom,
|
|
1538
1559
|
left: i,
|
|
1539
1560
|
width: Math.max(t.width || 220, 220)
|
|
@@ -1543,41 +1564,41 @@ function xr({
|
|
|
1543
1564
|
return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
1544
1565
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
1545
1566
|
};
|
|
1546
|
-
}, [
|
|
1567
|
+
}, [ae]), j(() => {
|
|
1547
1568
|
const e = (t) => {
|
|
1548
|
-
|
|
1569
|
+
ae && Te.current && !Te.current.contains(t.target) && gt.current && !gt.current.contains(t.target) && ht(!1);
|
|
1549
1570
|
};
|
|
1550
|
-
if (
|
|
1571
|
+
if (ae)
|
|
1551
1572
|
return document.addEventListener("mousedown", e), () => {
|
|
1552
1573
|
document.removeEventListener("mousedown", e);
|
|
1553
1574
|
};
|
|
1554
|
-
}, [
|
|
1555
|
-
|
|
1556
|
-
}, [
|
|
1557
|
-
function
|
|
1558
|
-
const
|
|
1575
|
+
}, [ae]), j(() => {
|
|
1576
|
+
ae && (ft(), Ne(_), We(/* @__PURE__ */ new Set()), Oe(/* @__PURE__ */ new Set()));
|
|
1577
|
+
}, [ae, _]), j(() => () => ft(), []), _.length === 1 ? (Kt = l.find((e) => (e.id || e.key) === _[0])) != null && Kt.label : `${_.length}`;
|
|
1578
|
+
function yn({ column: e, isHeaderRow: t = !0 }) {
|
|
1579
|
+
const o = Q(e), i = o === I, n = Wt(o, e.width), [u, c] = y(!1), {
|
|
1559
1580
|
attributes: x,
|
|
1560
|
-
listeners:
|
|
1561
|
-
setNodeRef:
|
|
1562
|
-
transform:
|
|
1563
|
-
transition:
|
|
1564
|
-
isDragging:
|
|
1565
|
-
} =
|
|
1566
|
-
transform:
|
|
1567
|
-
transition:
|
|
1568
|
-
opacity:
|
|
1581
|
+
listeners: W,
|
|
1582
|
+
setNodeRef: U,
|
|
1583
|
+
transform: Je,
|
|
1584
|
+
transition: Pe,
|
|
1585
|
+
isDragging: Ie
|
|
1586
|
+
} = On({ id: o }), bn = {
|
|
1587
|
+
transform: Tn.Transform.toString(Je),
|
|
1588
|
+
transition: Pe,
|
|
1589
|
+
opacity: Ie ? 0.5 : 1,
|
|
1569
1590
|
width: n,
|
|
1570
1591
|
minWidth: n
|
|
1571
1592
|
};
|
|
1572
|
-
let
|
|
1573
|
-
if (
|
|
1593
|
+
let _e = !1;
|
|
1594
|
+
if (q && D.length > 0) {
|
|
1574
1595
|
const R = D[0][0];
|
|
1575
|
-
(R ===
|
|
1596
|
+
(R === o || R === "csat_score" && o === "evaluation.csat_score") && (_e = !0);
|
|
1576
1597
|
} else
|
|
1577
|
-
|
|
1578
|
-
const
|
|
1598
|
+
_e = Ke === o;
|
|
1599
|
+
const vn = tt === "asc", Sn = e.filterable === !0;
|
|
1579
1600
|
if (!t)
|
|
1580
|
-
return /* @__PURE__ */
|
|
1601
|
+
return /* @__PURE__ */ s(
|
|
1581
1602
|
"th",
|
|
1582
1603
|
{
|
|
1583
1604
|
style: {
|
|
@@ -1589,22 +1610,22 @@ function xr({
|
|
|
1589
1610
|
boxSizing: "border-box"
|
|
1590
1611
|
},
|
|
1591
1612
|
className: "sticky top-[57px] z-10 border-b border-[var(--border-strong)] px-4 py-2 text-left",
|
|
1592
|
-
children:
|
|
1593
|
-
/* @__PURE__ */
|
|
1613
|
+
children: Sn ? /* @__PURE__ */ h("div", { className: "relative", children: [
|
|
1614
|
+
/* @__PURE__ */ s(
|
|
1594
1615
|
Filter,
|
|
1595
1616
|
{
|
|
1596
1617
|
size: 12,
|
|
1597
1618
|
className: "absolute left-2 top-1/2 -translate-y-1/2 text-[var(--text-faint)] pointer-events-none"
|
|
1598
1619
|
}
|
|
1599
1620
|
),
|
|
1600
|
-
/* @__PURE__ */
|
|
1621
|
+
/* @__PURE__ */ s(
|
|
1601
1622
|
"input",
|
|
1602
1623
|
{
|
|
1603
1624
|
type: "text",
|
|
1604
1625
|
placeholder: "Filter...",
|
|
1605
|
-
value:
|
|
1626
|
+
value: X[o] || "",
|
|
1606
1627
|
onChange: (R) => {
|
|
1607
|
-
R.stopPropagation(),
|
|
1628
|
+
R.stopPropagation(), cn(o, R.target.value);
|
|
1608
1629
|
},
|
|
1609
1630
|
onKeyDown: (R) => R.stopPropagation(),
|
|
1610
1631
|
onMouseDown: (R) => R.stopPropagation(),
|
|
@@ -1613,18 +1634,18 @@ function xr({
|
|
|
1613
1634
|
autoComplete: "off"
|
|
1614
1635
|
}
|
|
1615
1636
|
)
|
|
1616
|
-
] }) : /* @__PURE__ */
|
|
1637
|
+
] }) : /* @__PURE__ */ s("div", { className: "h-[34px]" })
|
|
1617
1638
|
}
|
|
1618
1639
|
);
|
|
1619
|
-
const
|
|
1620
|
-
return /* @__PURE__ */
|
|
1640
|
+
const St = N === o, pt = Ye(X[o]), wn = e.sortable !== !1 && (u || _e), Fn = e.filterable !== !1 && !i && (u || St || pt);
|
|
1641
|
+
return /* @__PURE__ */ h(
|
|
1621
1642
|
"th",
|
|
1622
1643
|
{
|
|
1623
|
-
ref:
|
|
1644
|
+
ref: U,
|
|
1624
1645
|
onMouseEnter: () => c(!0),
|
|
1625
1646
|
onMouseLeave: () => c(!1),
|
|
1626
1647
|
style: {
|
|
1627
|
-
...
|
|
1648
|
+
...bn,
|
|
1628
1649
|
padding: "0 12px",
|
|
1629
1650
|
height: 36,
|
|
1630
1651
|
textAlign: i ? "center" : "left",
|
|
@@ -1643,7 +1664,7 @@ function xr({
|
|
|
1643
1664
|
wordBreak: "normal",
|
|
1644
1665
|
overflowWrap: "normal",
|
|
1645
1666
|
verticalAlign: "middle",
|
|
1646
|
-
background: u ||
|
|
1667
|
+
background: u || St ? "#e6e6e6" : "#f2f2f0",
|
|
1647
1668
|
borderBottom: "1px solid #e6e6e6",
|
|
1648
1669
|
position: "sticky",
|
|
1649
1670
|
top: 0,
|
|
@@ -1652,7 +1673,7 @@ function xr({
|
|
|
1652
1673
|
transition: "background 100ms ease"
|
|
1653
1674
|
},
|
|
1654
1675
|
children: [
|
|
1655
|
-
!i && /* @__PURE__ */
|
|
1676
|
+
!i && /* @__PURE__ */ s(
|
|
1656
1677
|
"span",
|
|
1657
1678
|
{
|
|
1658
1679
|
"aria-hidden": "true",
|
|
@@ -1669,7 +1690,7 @@ function xr({
|
|
|
1669
1690
|
}
|
|
1670
1691
|
}
|
|
1671
1692
|
),
|
|
1672
|
-
/* @__PURE__ */
|
|
1693
|
+
/* @__PURE__ */ h(
|
|
1673
1694
|
"div",
|
|
1674
1695
|
{
|
|
1675
1696
|
style: {
|
|
@@ -1684,11 +1705,11 @@ function xr({
|
|
|
1684
1705
|
overflow: "hidden"
|
|
1685
1706
|
},
|
|
1686
1707
|
children: [
|
|
1687
|
-
!i && /* @__PURE__ */
|
|
1708
|
+
!i && /* @__PURE__ */ s(
|
|
1688
1709
|
"div",
|
|
1689
1710
|
{
|
|
1690
1711
|
...x,
|
|
1691
|
-
...
|
|
1712
|
+
...W,
|
|
1692
1713
|
style: {
|
|
1693
1714
|
cursor: "grab",
|
|
1694
1715
|
color: "rgba(11, 11, 11, 0.36)",
|
|
@@ -1697,13 +1718,13 @@ function xr({
|
|
|
1697
1718
|
visibility: u ? "visible" : "hidden",
|
|
1698
1719
|
flexShrink: 0
|
|
1699
1720
|
},
|
|
1700
|
-
children: /* @__PURE__ */
|
|
1721
|
+
children: /* @__PURE__ */ s(kt, { size: 14 })
|
|
1701
1722
|
}
|
|
1702
1723
|
),
|
|
1703
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ s(
|
|
1704
1725
|
"span",
|
|
1705
1726
|
{
|
|
1706
|
-
onClick: () => e.sortable !== !1 &&
|
|
1727
|
+
onClick: () => e.sortable !== !1 && $t(o),
|
|
1707
1728
|
title: typeof e.label == "string" ? e.label : void 0,
|
|
1708
1729
|
style: {
|
|
1709
1730
|
cursor: e.sortable !== !1 ? "pointer" : "default",
|
|
@@ -1717,12 +1738,12 @@ function xr({
|
|
|
1717
1738
|
children: e.label
|
|
1718
1739
|
}
|
|
1719
1740
|
),
|
|
1720
|
-
|
|
1741
|
+
wn && /* @__PURE__ */ s(
|
|
1721
1742
|
"button",
|
|
1722
1743
|
{
|
|
1723
1744
|
type: "button",
|
|
1724
1745
|
onClick: (R) => {
|
|
1725
|
-
R.stopPropagation(),
|
|
1746
|
+
R.stopPropagation(), $t(o);
|
|
1726
1747
|
},
|
|
1727
1748
|
title: "Sort",
|
|
1728
1749
|
style: {
|
|
@@ -1734,26 +1755,26 @@ function xr({
|
|
|
1734
1755
|
display: "inline-flex",
|
|
1735
1756
|
alignItems: "center",
|
|
1736
1757
|
justifyContent: "center",
|
|
1737
|
-
color:
|
|
1758
|
+
color: _e ? "#0b0b0b" : "rgba(11, 11, 11, 0.55)",
|
|
1738
1759
|
flexShrink: 0
|
|
1739
1760
|
},
|
|
1740
|
-
children:
|
|
1761
|
+
children: _e ? vn ? /* @__PURE__ */ s(Hn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(Kn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(Un, { size: 14, strokeWidth: 1.75 })
|
|
1741
1762
|
}
|
|
1742
1763
|
),
|
|
1743
|
-
|
|
1764
|
+
Fn && /* @__PURE__ */ h(
|
|
1744
1765
|
"button",
|
|
1745
1766
|
{
|
|
1746
1767
|
type: "button",
|
|
1747
1768
|
ref: (R) => {
|
|
1748
|
-
|
|
1769
|
+
Fe.current[o] = R;
|
|
1749
1770
|
},
|
|
1750
1771
|
onClick: (R) => {
|
|
1751
|
-
R.stopPropagation(),
|
|
1772
|
+
R.stopPropagation(), Qt(o, R.currentTarget);
|
|
1752
1773
|
},
|
|
1753
1774
|
title: "Filter",
|
|
1754
1775
|
style: {
|
|
1755
1776
|
position: "relative",
|
|
1756
|
-
background:
|
|
1777
|
+
background: St || pt ? "#D8D8D8" : "transparent",
|
|
1757
1778
|
border: "none",
|
|
1758
1779
|
padding: 4,
|
|
1759
1780
|
borderRadius: 4,
|
|
@@ -1761,12 +1782,12 @@ function xr({
|
|
|
1761
1782
|
display: "inline-flex",
|
|
1762
1783
|
alignItems: "center",
|
|
1763
1784
|
justifyContent: "center",
|
|
1764
|
-
color:
|
|
1785
|
+
color: pt ? "#0b0b0b" : "rgba(11, 11, 11, 0.7)",
|
|
1765
1786
|
flexShrink: 0
|
|
1766
1787
|
},
|
|
1767
1788
|
children: [
|
|
1768
|
-
/* @__PURE__ */
|
|
1769
|
-
|
|
1789
|
+
/* @__PURE__ */ s(Xn, { size: 14, strokeWidth: 1.75 }),
|
|
1790
|
+
pt && /* @__PURE__ */ s(
|
|
1770
1791
|
"span",
|
|
1771
1792
|
{
|
|
1772
1793
|
"aria-hidden": "true",
|
|
@@ -1787,7 +1808,7 @@ function xr({
|
|
|
1787
1808
|
]
|
|
1788
1809
|
}
|
|
1789
1810
|
),
|
|
1790
|
-
!i && /* @__PURE__ */
|
|
1811
|
+
!i && /* @__PURE__ */ s(
|
|
1791
1812
|
"span",
|
|
1792
1813
|
{
|
|
1793
1814
|
"aria-hidden": "true",
|
|
@@ -1804,14 +1825,14 @@ function xr({
|
|
|
1804
1825
|
}
|
|
1805
1826
|
}
|
|
1806
1827
|
),
|
|
1807
|
-
!i && /* @__PURE__ */
|
|
1828
|
+
!i && /* @__PURE__ */ s(
|
|
1808
1829
|
"div",
|
|
1809
1830
|
{
|
|
1810
1831
|
role: "separator",
|
|
1811
1832
|
"aria-orientation": "vertical",
|
|
1812
|
-
"aria-label": `Resize ${e.label ||
|
|
1833
|
+
"aria-label": `Resize ${e.label || o} column`,
|
|
1813
1834
|
title: "Drag to resize column",
|
|
1814
|
-
onMouseDown: (R) =>
|
|
1835
|
+
onMouseDown: (R) => tn(R, e, n),
|
|
1815
1836
|
onClick: (R) => R.stopPropagation(),
|
|
1816
1837
|
onMouseEnter: (R) => {
|
|
1817
1838
|
R.currentTarget.style.background = "rgba(30, 33, 37, 0.18)";
|
|
@@ -1835,21 +1856,21 @@ function xr({
|
|
|
1835
1856
|
}
|
|
1836
1857
|
);
|
|
1837
1858
|
}
|
|
1838
|
-
const
|
|
1839
|
-
const c = i &&
|
|
1840
|
-
|
|
1841
|
-
const
|
|
1842
|
-
return /* @__PURE__ */
|
|
1859
|
+
const _t = Nt ? l.find((e) => Q(e) === Nt) : null, jt = ({ col: e, columnId: t, isSelected: o, draggable: i, isAction: n, actualIndex: u }) => {
|
|
1860
|
+
const c = i && me === u, x = i && Zt === u && me !== null && me !== u;
|
|
1861
|
+
o ? rt.has(t) : nt.has(t);
|
|
1862
|
+
const W = o ? !rt.has(t) : nt.has(t);
|
|
1863
|
+
return /* @__PURE__ */ h(
|
|
1843
1864
|
"div",
|
|
1844
1865
|
{
|
|
1845
1866
|
draggable: i,
|
|
1846
|
-
onDragStart: i ? (
|
|
1847
|
-
onDragEnd: i ?
|
|
1848
|
-
onDragOver: i ? (
|
|
1849
|
-
onDragLeave: i ?
|
|
1850
|
-
onDrop: i ? (
|
|
1867
|
+
onDragStart: i ? (U) => fn(U, u) : void 0,
|
|
1868
|
+
onDragEnd: i ? pn : void 0,
|
|
1869
|
+
onDragOver: i ? (U) => hn(U, u) : void 0,
|
|
1870
|
+
onDragLeave: i ? mn : void 0,
|
|
1871
|
+
onDrop: i ? (U) => gn(U, u) : void 0,
|
|
1851
1872
|
onClick: () => {
|
|
1852
|
-
n ||
|
|
1873
|
+
n || un(t);
|
|
1853
1874
|
},
|
|
1854
1875
|
style: {
|
|
1855
1876
|
display: "flex",
|
|
@@ -1862,7 +1883,7 @@ function xr({
|
|
|
1862
1883
|
borderRadius: 6
|
|
1863
1884
|
},
|
|
1864
1885
|
children: [
|
|
1865
|
-
/* @__PURE__ */
|
|
1886
|
+
/* @__PURE__ */ s(
|
|
1866
1887
|
"span",
|
|
1867
1888
|
{
|
|
1868
1889
|
style: {
|
|
@@ -1875,10 +1896,10 @@ function xr({
|
|
|
1875
1896
|
visibility: i ? "visible" : "hidden",
|
|
1876
1897
|
flexShrink: 0
|
|
1877
1898
|
},
|
|
1878
|
-
children: /* @__PURE__ */
|
|
1899
|
+
children: /* @__PURE__ */ s(kt, { size: 14, strokeWidth: 1.75 })
|
|
1879
1900
|
}
|
|
1880
1901
|
),
|
|
1881
|
-
/* @__PURE__ */
|
|
1902
|
+
/* @__PURE__ */ s(
|
|
1882
1903
|
"span",
|
|
1883
1904
|
{
|
|
1884
1905
|
style: {
|
|
@@ -1888,15 +1909,15 @@ function xr({
|
|
|
1888
1909
|
display: "inline-flex",
|
|
1889
1910
|
alignItems: "center",
|
|
1890
1911
|
justifyContent: "center",
|
|
1891
|
-
background:
|
|
1892
|
-
border: `1px solid ${
|
|
1912
|
+
background: W ? "#0B0B0B" : "#FFFFFF",
|
|
1913
|
+
border: `1px solid ${W ? "#0B0B0B" : "#676767"}`,
|
|
1893
1914
|
flexShrink: 0,
|
|
1894
1915
|
marginLeft: 8
|
|
1895
1916
|
},
|
|
1896
|
-
children:
|
|
1917
|
+
children: W && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
1897
1918
|
}
|
|
1898
1919
|
),
|
|
1899
|
-
/* @__PURE__ */
|
|
1920
|
+
/* @__PURE__ */ s(
|
|
1900
1921
|
"span",
|
|
1901
1922
|
{
|
|
1902
1923
|
style: {
|
|
@@ -1913,14 +1934,14 @@ function xr({
|
|
|
1913
1934
|
]
|
|
1914
1935
|
}
|
|
1915
1936
|
);
|
|
1916
|
-
},
|
|
1937
|
+
}, xn = ae ? /* @__PURE__ */ h(
|
|
1917
1938
|
"div",
|
|
1918
1939
|
{
|
|
1919
|
-
ref:
|
|
1940
|
+
ref: gt,
|
|
1920
1941
|
style: {
|
|
1921
1942
|
position: "fixed",
|
|
1922
|
-
top: `${
|
|
1923
|
-
left: `${
|
|
1943
|
+
top: `${At.top}px`,
|
|
1944
|
+
left: `${At.left}px`,
|
|
1924
1945
|
width: 217,
|
|
1925
1946
|
maxHeight: 320,
|
|
1926
1947
|
zIndex: 49,
|
|
@@ -1934,7 +1955,7 @@ function xr({
|
|
|
1934
1955
|
boxShadow: "0 8px 24px rgba(11, 11, 11, 0.08)"
|
|
1935
1956
|
},
|
|
1936
1957
|
children: [
|
|
1937
|
-
/* @__PURE__ */
|
|
1958
|
+
/* @__PURE__ */ h(
|
|
1938
1959
|
"div",
|
|
1939
1960
|
{
|
|
1940
1961
|
style: {
|
|
@@ -1947,12 +1968,12 @@ function xr({
|
|
|
1947
1968
|
gap: 12
|
|
1948
1969
|
},
|
|
1949
1970
|
children: [
|
|
1950
|
-
|
|
1951
|
-
if (e ===
|
|
1971
|
+
pe.map((e, t) => {
|
|
1972
|
+
if (e === I)
|
|
1952
1973
|
return null;
|
|
1953
|
-
const
|
|
1954
|
-
return
|
|
1955
|
-
col:
|
|
1974
|
+
const o = l.find((i) => Q(i) === e);
|
|
1975
|
+
return o ? /* @__PURE__ */ s(wt.Fragment, { children: jt({
|
|
1976
|
+
col: o,
|
|
1956
1977
|
columnId: e,
|
|
1957
1978
|
isSelected: !0,
|
|
1958
1979
|
draggable: !0,
|
|
@@ -1961,11 +1982,11 @@ function xr({
|
|
|
1961
1982
|
}) }, `selected-${e}-${t}`) : null;
|
|
1962
1983
|
}),
|
|
1963
1984
|
l.filter((e) => {
|
|
1964
|
-
const t =
|
|
1965
|
-
return t !==
|
|
1985
|
+
const t = Q(e);
|
|
1986
|
+
return t !== I && !pe.includes(t);
|
|
1966
1987
|
}).map((e) => {
|
|
1967
|
-
const t =
|
|
1968
|
-
return /* @__PURE__ */
|
|
1988
|
+
const t = Q(e);
|
|
1989
|
+
return /* @__PURE__ */ s(wt.Fragment, { children: jt({
|
|
1969
1990
|
col: e,
|
|
1970
1991
|
columnId: t,
|
|
1971
1992
|
isSelected: !1,
|
|
@@ -1977,7 +1998,7 @@ function xr({
|
|
|
1977
1998
|
]
|
|
1978
1999
|
}
|
|
1979
2000
|
),
|
|
1980
|
-
/* @__PURE__ */
|
|
2001
|
+
/* @__PURE__ */ h(
|
|
1981
2002
|
"div",
|
|
1982
2003
|
{
|
|
1983
2004
|
style: {
|
|
@@ -1992,16 +2013,16 @@ function xr({
|
|
|
1992
2013
|
boxSizing: "border-box"
|
|
1993
2014
|
},
|
|
1994
2015
|
children: [
|
|
1995
|
-
/* @__PURE__ */
|
|
2016
|
+
/* @__PURE__ */ s(
|
|
1996
2017
|
"button",
|
|
1997
2018
|
{
|
|
1998
2019
|
type: "button",
|
|
1999
2020
|
onClick: (e) => {
|
|
2000
2021
|
e.preventDefault(), e.stopPropagation();
|
|
2001
|
-
const t =
|
|
2002
|
-
if (
|
|
2022
|
+
const t = ot.current ? [...ot.current] : l.map(Q).slice(0, Y), o = le(t);
|
|
2023
|
+
if (ee.current = !1, ft(), Ne(o), Ae(o), We(/* @__PURE__ */ new Set()), Oe(/* @__PURE__ */ new Set()), typeof window < "u" && te)
|
|
2003
2024
|
try {
|
|
2004
|
-
localStorage.removeItem(
|
|
2025
|
+
localStorage.removeItem(te);
|
|
2005
2026
|
} catch {
|
|
2006
2027
|
}
|
|
2007
2028
|
},
|
|
@@ -2018,14 +2039,14 @@ function xr({
|
|
|
2018
2039
|
children: "Reset"
|
|
2019
2040
|
}
|
|
2020
2041
|
),
|
|
2021
|
-
/* @__PURE__ */
|
|
2042
|
+
/* @__PURE__ */ s(
|
|
2022
2043
|
"button",
|
|
2023
2044
|
{
|
|
2024
2045
|
type: "button",
|
|
2025
2046
|
onClick: (e) => {
|
|
2026
|
-
e.preventDefault(), e.stopPropagation(),
|
|
2027
|
-
const t =
|
|
2028
|
-
|
|
2047
|
+
e.preventDefault(), e.stopPropagation(), ft();
|
|
2048
|
+
const t = dn();
|
|
2049
|
+
Ne(t), We(/* @__PURE__ */ new Set()), Oe(/* @__PURE__ */ new Set()), ee.current = !0, Ae(t), Pt(t), ht(!1);
|
|
2029
2050
|
},
|
|
2030
2051
|
style: {
|
|
2031
2052
|
background: "#2E3236",
|
|
@@ -2047,28 +2068,28 @@ function xr({
|
|
|
2047
2068
|
)
|
|
2048
2069
|
]
|
|
2049
2070
|
}
|
|
2050
|
-
) : null,
|
|
2051
|
-
|
|
2071
|
+
) : null, Ge = N ? l.find((e) => Q(e) === N) : null, Ht = Ge ? /* @__PURE__ */ s(
|
|
2072
|
+
or,
|
|
2052
2073
|
{
|
|
2053
|
-
column:
|
|
2054
|
-
columnId:
|
|
2055
|
-
filterType:
|
|
2056
|
-
position:
|
|
2057
|
-
popoverRef:
|
|
2058
|
-
distinctValues:
|
|
2059
|
-
initialValue:
|
|
2060
|
-
onSearch: typeof
|
|
2061
|
-
searchMinChars:
|
|
2074
|
+
column: Ge,
|
|
2075
|
+
columnId: N,
|
|
2076
|
+
filterType: re(N),
|
|
2077
|
+
position: et,
|
|
2078
|
+
popoverRef: we,
|
|
2079
|
+
distinctValues: Ee(N),
|
|
2080
|
+
initialValue: X[N],
|
|
2081
|
+
onSearch: typeof Ge.onFilterSearch == "function" ? Ge.onFilterSearch : null,
|
|
2082
|
+
searchMinChars: Ge.filterSearchMinChars ?? 3,
|
|
2062
2083
|
onApply: (e) => {
|
|
2063
|
-
|
|
2084
|
+
M(N, e), ve(null);
|
|
2064
2085
|
},
|
|
2065
|
-
onCancel: () =>
|
|
2086
|
+
onCancel: () => ve(null)
|
|
2066
2087
|
},
|
|
2067
|
-
|
|
2088
|
+
N
|
|
2068
2089
|
) : null;
|
|
2069
|
-
return /* @__PURE__ */
|
|
2070
|
-
|
|
2071
|
-
l.length > 0 && (
|
|
2090
|
+
return /* @__PURE__ */ h("div", { className: "w-full", children: [
|
|
2091
|
+
Ht && Rt(Ht, document.body),
|
|
2092
|
+
l.length > 0 && (L || !ge) && /* @__PURE__ */ s(
|
|
2072
2093
|
"div",
|
|
2073
2094
|
{
|
|
2074
2095
|
className: "pt-2 pb-1",
|
|
@@ -2077,7 +2098,7 @@ function xr({
|
|
|
2077
2098
|
zIndex: 35,
|
|
2078
2099
|
backgroundColor: "var(--primary-foreground)"
|
|
2079
2100
|
},
|
|
2080
|
-
children: /* @__PURE__ */
|
|
2101
|
+
children: /* @__PURE__ */ h(
|
|
2081
2102
|
"div",
|
|
2082
2103
|
{
|
|
2083
2104
|
style: {
|
|
@@ -2088,24 +2109,24 @@ function xr({
|
|
|
2088
2109
|
flexWrap: "wrap"
|
|
2089
2110
|
},
|
|
2090
2111
|
children: [
|
|
2091
|
-
|
|
2092
|
-
|
|
2112
|
+
L && /* @__PURE__ */ s("div", { style: { marginRight: "auto" }, children: /* @__PURE__ */ s(
|
|
2113
|
+
Yn,
|
|
2093
2114
|
{
|
|
2094
|
-
dateRangePicker:
|
|
2095
|
-
onWeekToDate:
|
|
2096
|
-
exportConfig:
|
|
2097
|
-
filterChipsConfig:
|
|
2098
|
-
trailingActions:
|
|
2115
|
+
dateRangePicker: L.dateRangePicker,
|
|
2116
|
+
onWeekToDate: L.onWeekToDate,
|
|
2117
|
+
exportConfig: L.exportConfig,
|
|
2118
|
+
filterChipsConfig: L.filterChipsConfig,
|
|
2119
|
+
trailingActions: L.trailingActions
|
|
2099
2120
|
}
|
|
2100
2121
|
) }),
|
|
2101
|
-
(
|
|
2102
|
-
!
|
|
2103
|
-
/* @__PURE__ */
|
|
2122
|
+
(L == null ? void 0 : L.rightActions) && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: 12, flexShrink: 0 }, children: L.rightActions }),
|
|
2123
|
+
!ge && /* @__PURE__ */ h("div", { style: { position: "relative" }, children: [
|
|
2124
|
+
/* @__PURE__ */ h(
|
|
2104
2125
|
"button",
|
|
2105
2126
|
{
|
|
2106
|
-
ref:
|
|
2127
|
+
ref: Te,
|
|
2107
2128
|
type: "button",
|
|
2108
|
-
onClick: () =>
|
|
2129
|
+
onClick: () => ht(!ae),
|
|
2109
2130
|
style: {
|
|
2110
2131
|
display: "inline-flex",
|
|
2111
2132
|
alignItems: "center",
|
|
@@ -2123,19 +2144,19 @@ function xr({
|
|
|
2123
2144
|
whiteSpace: "nowrap"
|
|
2124
2145
|
},
|
|
2125
2146
|
children: [
|
|
2126
|
-
/* @__PURE__ */
|
|
2147
|
+
/* @__PURE__ */ s(Pn, { size: 20, strokeWidth: 1.75 }),
|
|
2127
2148
|
"Columns"
|
|
2128
2149
|
]
|
|
2129
2150
|
}
|
|
2130
2151
|
),
|
|
2131
|
-
|
|
2152
|
+
ae && Rt(xn, document.body)
|
|
2132
2153
|
] })
|
|
2133
2154
|
]
|
|
2134
2155
|
}
|
|
2135
2156
|
)
|
|
2136
2157
|
}
|
|
2137
2158
|
),
|
|
2138
|
-
Object.keys(
|
|
2159
|
+
Object.keys(X).length > 0 && /* @__PURE__ */ h(
|
|
2139
2160
|
"div",
|
|
2140
2161
|
{
|
|
2141
2162
|
style: {
|
|
@@ -2146,12 +2167,12 @@ function xr({
|
|
|
2146
2167
|
padding: "8px 0"
|
|
2147
2168
|
},
|
|
2148
2169
|
children: [
|
|
2149
|
-
Object.entries(
|
|
2150
|
-
const
|
|
2151
|
-
if (!
|
|
2170
|
+
Object.entries(X).map(([e, t]) => {
|
|
2171
|
+
const o = l.find((c) => Q(c) === e);
|
|
2172
|
+
if (!o || !Ye(t))
|
|
2152
2173
|
return null;
|
|
2153
|
-
const i =
|
|
2154
|
-
return /* @__PURE__ */
|
|
2174
|
+
const i = Vn(t), n = er(t), u = tr(t);
|
|
2175
|
+
return /* @__PURE__ */ h(
|
|
2155
2176
|
"span",
|
|
2156
2177
|
{
|
|
2157
2178
|
style: {
|
|
@@ -2170,20 +2191,20 @@ function xr({
|
|
|
2170
2191
|
whiteSpace: "nowrap"
|
|
2171
2192
|
},
|
|
2172
2193
|
children: [
|
|
2173
|
-
/* @__PURE__ */
|
|
2174
|
-
/* @__PURE__ */
|
|
2175
|
-
|
|
2194
|
+
/* @__PURE__ */ h("span", { children: [
|
|
2195
|
+
/* @__PURE__ */ h("span", { style: { color: "#676767" }, children: [
|
|
2196
|
+
o.label,
|
|
2176
2197
|
": "
|
|
2177
2198
|
] }),
|
|
2178
|
-
/* @__PURE__ */
|
|
2199
|
+
/* @__PURE__ */ s("span", { children: i })
|
|
2179
2200
|
] }),
|
|
2180
|
-
n > 0 && /* @__PURE__ */
|
|
2181
|
-
/* @__PURE__ */
|
|
2201
|
+
n > 0 && /* @__PURE__ */ s(nr, { count: n, values: u }),
|
|
2202
|
+
/* @__PURE__ */ s(
|
|
2182
2203
|
"button",
|
|
2183
2204
|
{
|
|
2184
2205
|
type: "button",
|
|
2185
|
-
onClick: () =>
|
|
2186
|
-
"aria-label": `Remove ${
|
|
2206
|
+
onClick: () => M(e, []),
|
|
2207
|
+
"aria-label": `Remove ${o.label} filter`,
|
|
2187
2208
|
style: {
|
|
2188
2209
|
background: "transparent",
|
|
2189
2210
|
border: "none",
|
|
@@ -2192,7 +2213,7 @@ function xr({
|
|
|
2192
2213
|
display: "inline-flex",
|
|
2193
2214
|
color: "#676767"
|
|
2194
2215
|
},
|
|
2195
|
-
children: /* @__PURE__ */
|
|
2216
|
+
children: /* @__PURE__ */ s(In, { size: 14, strokeWidth: 2 })
|
|
2196
2217
|
}
|
|
2197
2218
|
)
|
|
2198
2219
|
]
|
|
@@ -2200,11 +2221,11 @@ function xr({
|
|
|
2200
2221
|
`chip-${e}`
|
|
2201
2222
|
);
|
|
2202
2223
|
}),
|
|
2203
|
-
/* @__PURE__ */
|
|
2224
|
+
/* @__PURE__ */ s(
|
|
2204
2225
|
"button",
|
|
2205
2226
|
{
|
|
2206
2227
|
type: "button",
|
|
2207
|
-
onClick:
|
|
2228
|
+
onClick: Se,
|
|
2208
2229
|
style: {
|
|
2209
2230
|
marginLeft: "auto",
|
|
2210
2231
|
background: "transparent",
|
|
@@ -2222,15 +2243,15 @@ function xr({
|
|
|
2222
2243
|
]
|
|
2223
2244
|
}
|
|
2224
2245
|
),
|
|
2225
|
-
l.length > 0 &&
|
|
2226
|
-
|
|
2246
|
+
l.length > 0 && Le.length > 0 ? /* @__PURE__ */ h(
|
|
2247
|
+
Rn,
|
|
2227
2248
|
{
|
|
2228
|
-
sensors:
|
|
2229
|
-
collisionDetection:
|
|
2230
|
-
onDragStart:
|
|
2231
|
-
onDragEnd:
|
|
2249
|
+
sensors: nn,
|
|
2250
|
+
collisionDetection: zn,
|
|
2251
|
+
onDragStart: on,
|
|
2252
|
+
onDragEnd: rn,
|
|
2232
2253
|
children: [
|
|
2233
|
-
/* @__PURE__ */
|
|
2254
|
+
/* @__PURE__ */ h("div", { style: {
|
|
2234
2255
|
borderRadius: 8,
|
|
2235
2256
|
border: "1px solid #E6E6E6",
|
|
2236
2257
|
overflow: "hidden",
|
|
@@ -2241,9 +2262,9 @@ function xr({
|
|
|
2241
2262
|
// collapse to just the header height and the centered overlay/loader
|
|
2242
2263
|
// would be squeezed into a thin strip. Reserve vertical space so the
|
|
2243
2264
|
// loader stays properly visible and centered.
|
|
2244
|
-
|
|
2265
|
+
...$ ? { minHeight: 320 } : {}
|
|
2245
2266
|
}, children: [
|
|
2246
|
-
|
|
2267
|
+
$ && /* @__PURE__ */ s("div", { style: {
|
|
2247
2268
|
position: "absolute",
|
|
2248
2269
|
inset: 0,
|
|
2249
2270
|
background: "rgba(255, 255, 255, 0.9)",
|
|
@@ -2254,19 +2275,19 @@ function xr({
|
|
|
2254
2275
|
alignItems: "center",
|
|
2255
2276
|
justifyContent: "center",
|
|
2256
2277
|
borderRadius: "14px"
|
|
2257
|
-
}, children: /* @__PURE__ */
|
|
2278
|
+
}, children: /* @__PURE__ */ h("div", { style: {
|
|
2258
2279
|
display: "flex",
|
|
2259
2280
|
flexDirection: "column",
|
|
2260
2281
|
alignItems: "center",
|
|
2261
2282
|
gap: "12px"
|
|
2262
2283
|
}, children: [
|
|
2263
|
-
/* @__PURE__ */
|
|
2284
|
+
/* @__PURE__ */ s("p", { style: {
|
|
2264
2285
|
fontSize: "13px",
|
|
2265
2286
|
color: "rgba(30, 33, 37, 0.6)",
|
|
2266
2287
|
margin: 0
|
|
2267
2288
|
}, children: "Loading..." }),
|
|
2268
|
-
/* @__PURE__ */
|
|
2269
|
-
|
|
2289
|
+
/* @__PURE__ */ s(
|
|
2290
|
+
ir,
|
|
2270
2291
|
{
|
|
2271
2292
|
src: "/BrandLoading.gif",
|
|
2272
2293
|
alt: "Loading",
|
|
@@ -2277,7 +2298,7 @@ function xr({
|
|
|
2277
2298
|
}
|
|
2278
2299
|
)
|
|
2279
2300
|
] }) }),
|
|
2280
|
-
/* @__PURE__ */
|
|
2301
|
+
/* @__PURE__ */ s("div", { className: "overflow-x-auto custom-thin-scrollbar-hidden", ref: en, style: { maxHeight: "500px", overflowY: "auto", position: "relative", zIndex: 1 }, children: /* @__PURE__ */ h("table", { style: {
|
|
2281
2302
|
width: "auto",
|
|
2282
2303
|
minWidth: "100%",
|
|
2283
2304
|
tableLayout: "fixed",
|
|
@@ -2287,13 +2308,13 @@ function xr({
|
|
|
2287
2308
|
border: "1px solid #e6e6e6",
|
|
2288
2309
|
boxSizing: "border-box"
|
|
2289
2310
|
}, children: [
|
|
2290
|
-
/* @__PURE__ */
|
|
2291
|
-
|
|
2311
|
+
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ h("tr", { children: [
|
|
2312
|
+
G && /* @__PURE__ */ s(
|
|
2292
2313
|
"th",
|
|
2293
2314
|
{
|
|
2294
2315
|
style: {
|
|
2295
|
-
width:
|
|
2296
|
-
minWidth:
|
|
2316
|
+
width: ut,
|
|
2317
|
+
minWidth: ut,
|
|
2297
2318
|
padding: "10px 8px",
|
|
2298
2319
|
textAlign: "center",
|
|
2299
2320
|
verticalAlign: "middle",
|
|
@@ -2305,30 +2326,30 @@ function xr({
|
|
|
2305
2326
|
zIndex: 10,
|
|
2306
2327
|
boxSizing: "border-box"
|
|
2307
2328
|
},
|
|
2308
|
-
children: /* @__PURE__ */
|
|
2309
|
-
|
|
2329
|
+
children: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", lineHeight: 0 }, children: /* @__PURE__ */ s(
|
|
2330
|
+
Tt,
|
|
2310
2331
|
{
|
|
2311
|
-
checked:
|
|
2312
|
-
indeterminate:
|
|
2313
|
-
onToggle:
|
|
2332
|
+
checked: dt,
|
|
2333
|
+
indeterminate: sn,
|
|
2334
|
+
onToggle: an,
|
|
2314
2335
|
ariaLabel: "Select all rows on this page"
|
|
2315
2336
|
}
|
|
2316
2337
|
) })
|
|
2317
2338
|
}
|
|
2318
2339
|
),
|
|
2319
|
-
/* @__PURE__ */
|
|
2320
|
-
|
|
2340
|
+
/* @__PURE__ */ s(
|
|
2341
|
+
Bn,
|
|
2321
2342
|
{
|
|
2322
|
-
items:
|
|
2323
|
-
strategy:
|
|
2324
|
-
children:
|
|
2343
|
+
items: _,
|
|
2344
|
+
strategy: En,
|
|
2345
|
+
children: Le.map((e) => /* @__PURE__ */ s(yn, { column: e, isHeaderRow: !0 }, `header-${Q(e)}`))
|
|
2325
2346
|
}
|
|
2326
2347
|
)
|
|
2327
2348
|
] }) }),
|
|
2328
|
-
/* @__PURE__ */
|
|
2349
|
+
/* @__PURE__ */ s("tbody", { children: !$ && $e.length === 0 ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
|
|
2329
2350
|
"td",
|
|
2330
2351
|
{
|
|
2331
|
-
colSpan:
|
|
2352
|
+
colSpan: Le.length + (G ? 1 : 0),
|
|
2332
2353
|
style: {
|
|
2333
2354
|
padding: "32px",
|
|
2334
2355
|
textAlign: "center",
|
|
@@ -2338,9 +2359,9 @@ function xr({
|
|
|
2338
2359
|
},
|
|
2339
2360
|
children: "No results found"
|
|
2340
2361
|
}
|
|
2341
|
-
) }) :
|
|
2342
|
-
const
|
|
2343
|
-
return /* @__PURE__ */
|
|
2362
|
+
) }) : !$ && $e.length > 0 ? $e.map((e, t) => {
|
|
2363
|
+
const o = vt(e, t), i = G && ke.has(o);
|
|
2364
|
+
return /* @__PURE__ */ h(
|
|
2344
2365
|
"tr",
|
|
2345
2366
|
{
|
|
2346
2367
|
"data-row-id": e.id || t,
|
|
@@ -2360,32 +2381,32 @@ function xr({
|
|
|
2360
2381
|
n.currentTarget.style.background = i ? "#F2F4F7" : "transparent";
|
|
2361
2382
|
},
|
|
2362
2383
|
children: [
|
|
2363
|
-
|
|
2384
|
+
G && /* @__PURE__ */ s(
|
|
2364
2385
|
"td",
|
|
2365
2386
|
{
|
|
2366
2387
|
onClick: (n) => n.stopPropagation(),
|
|
2367
2388
|
style: {
|
|
2368
|
-
width:
|
|
2369
|
-
minWidth:
|
|
2389
|
+
width: ut,
|
|
2390
|
+
minWidth: ut,
|
|
2370
2391
|
padding: "10px 8px",
|
|
2371
2392
|
textAlign: "center",
|
|
2372
2393
|
verticalAlign: "middle",
|
|
2373
2394
|
borderRight: "1px solid #e6e6e6",
|
|
2374
2395
|
boxSizing: "border-box"
|
|
2375
2396
|
},
|
|
2376
|
-
children: /* @__PURE__ */
|
|
2377
|
-
|
|
2397
|
+
children: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", lineHeight: 0 }, children: /* @__PURE__ */ s(
|
|
2398
|
+
Tt,
|
|
2378
2399
|
{
|
|
2379
2400
|
checked: i,
|
|
2380
|
-
onToggle: () =>
|
|
2401
|
+
onToggle: () => ln(o),
|
|
2381
2402
|
ariaLabel: "Select row"
|
|
2382
2403
|
}
|
|
2383
2404
|
) })
|
|
2384
2405
|
}
|
|
2385
2406
|
),
|
|
2386
|
-
|
|
2387
|
-
const u =
|
|
2388
|
-
return /* @__PURE__ */
|
|
2407
|
+
Le.map((n) => {
|
|
2408
|
+
const u = Q(n), c = Wt(u, n.width), x = e[u], W = n.render ? n.render(x, e) : x, U = c && c !== "auto", Je = typeof W == "string" && W.trim() !== "", Pe = U && Je, Ie = Pe ? /* @__PURE__ */ s(de, { content: W, children: W }) : W;
|
|
2409
|
+
return /* @__PURE__ */ s(
|
|
2389
2410
|
"td",
|
|
2390
2411
|
{
|
|
2391
2412
|
style: {
|
|
@@ -2396,9 +2417,9 @@ function xr({
|
|
|
2396
2417
|
boxSizing: "border-box",
|
|
2397
2418
|
width: c,
|
|
2398
2419
|
fontFamily: "var(--font-sans)",
|
|
2399
|
-
...
|
|
2420
|
+
...Pe && { maxWidth: c || "200px" }
|
|
2400
2421
|
},
|
|
2401
|
-
children:
|
|
2422
|
+
children: Ie
|
|
2402
2423
|
},
|
|
2403
2424
|
u
|
|
2404
2425
|
);
|
|
@@ -2410,26 +2431,26 @@ function xr({
|
|
|
2410
2431
|
}) : null })
|
|
2411
2432
|
] }) })
|
|
2412
2433
|
] }),
|
|
2413
|
-
/* @__PURE__ */
|
|
2414
|
-
/* @__PURE__ */
|
|
2415
|
-
/* @__PURE__ */
|
|
2434
|
+
/* @__PURE__ */ s(Mn, { children: _t ? /* @__PURE__ */ s("div", { className: "bg-[var(--paper-high)] border border-[var(--border-strong)] rounded px-4 py-2 shadow-lg", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
2435
|
+
/* @__PURE__ */ s(kt, { size: 14, className: "text-[var(--text-faint)]" }),
|
|
2436
|
+
/* @__PURE__ */ s("span", { className: "text-sm font-semibold text-[var(--text-ink)]", children: _t.label })
|
|
2416
2437
|
] }) }) : null })
|
|
2417
2438
|
]
|
|
2418
2439
|
}
|
|
2419
2440
|
) : null,
|
|
2420
2441
|
(() => {
|
|
2421
|
-
const e = !
|
|
2422
|
-
return t <= 0 ? null : /* @__PURE__ */
|
|
2423
|
-
|
|
2442
|
+
const e = !P && (ne.trim() !== "" || Object.values(X).some((o) => Ye(o))), t = se ? e ? Xe.length : w : Xe.length;
|
|
2443
|
+
return t <= 0 ? null : /* @__PURE__ */ s(
|
|
2444
|
+
Jn,
|
|
2424
2445
|
{
|
|
2425
|
-
page:
|
|
2446
|
+
page: Re,
|
|
2426
2447
|
pageSizeOptions: [5, 10, 20, 50, 100],
|
|
2427
|
-
pageSize:
|
|
2448
|
+
pageSize: ye,
|
|
2428
2449
|
totalCount: t,
|
|
2429
|
-
currentDataLength:
|
|
2430
|
-
onPageChange:
|
|
2431
|
-
onPageSizeChange: (
|
|
2432
|
-
|
|
2450
|
+
currentDataLength: $e.length,
|
|
2451
|
+
onPageChange: ze,
|
|
2452
|
+
onPageSizeChange: (o) => {
|
|
2453
|
+
Ze(o), ze(1);
|
|
2433
2454
|
},
|
|
2434
2455
|
showPageSizeSelector: !0
|
|
2435
2456
|
}
|
|
@@ -2438,7 +2459,7 @@ function xr({
|
|
|
2438
2459
|
] });
|
|
2439
2460
|
}
|
|
2440
2461
|
export {
|
|
2441
|
-
|
|
2442
|
-
|
|
2462
|
+
br as D,
|
|
2463
|
+
Yn as a
|
|
2443
2464
|
};
|
|
2444
2465
|
//# sourceMappingURL=DataTable2.es.js.map
|