chordia-ui 4.0.7 → 4.0.9
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 +928 -785
- package/dist/DataTable2.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/dist/components/policies.cjs.js +1 -1
- package/dist/components/policies.cjs.js.map +1 -1
- package/dist/components/policies.es.js +48 -49
- package/dist/components/policies.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/data/DataTable.jsx +1 -1
- package/src/components/data/DataTable2.jsx +210 -6
- package/src/components/notifications/NotificationItem.jsx +3 -0
- package/src/components/policies/PoliciesPage.jsx +0 -1
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
|
|
12
|
-
dateRangePicker:
|
|
11
|
+
function Yn({
|
|
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__ */ s(
|
|
47
|
+
/* @__PURE__ */ s(Xt, { size: 16 }),
|
|
48
48
|
/* @__PURE__ */ s("span", { children: "Week to Date" })
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
r && /* @__PURE__ */ s(
|
|
53
|
+
kn,
|
|
54
54
|
{
|
|
55
|
-
fallback: /* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */ s(
|
|
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
57
|
/* @__PURE__ */ s("span", { children: "Loading..." })
|
|
58
58
|
] }),
|
|
59
|
-
children:
|
|
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 Wn({
|
|
|
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__ */ s(
|
|
72
|
+
/* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
73
|
+
/* @__PURE__ */ s($n, { size: 16 }),
|
|
74
74
|
/* @__PURE__ */ s("span", { children: d.isExporting ? "Exporting..." : "Export" })
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */ s(
|
|
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 Wn({
|
|
|
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,85 +111,85 @@ function Wn({
|
|
|
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
|
|
120
|
-
if (
|
|
119
|
+
function zt(r) {
|
|
120
|
+
if (r == null)
|
|
121
121
|
return NaN;
|
|
122
|
-
const l = String(
|
|
122
|
+
const l = String(r).replace(/[,$%]|pp/gi, "").trim(), d = parseFloat(l);
|
|
123
123
|
return Number.isFinite(d) ? d : NaN;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
if (
|
|
125
|
+
function Qn(r) {
|
|
126
|
+
if (r == null)
|
|
127
127
|
return NaN;
|
|
128
|
-
const l = String(
|
|
128
|
+
const l = String(r).trim(), d = l.match(/^(\d+):(\d+)(?::(\d+))?$/);
|
|
129
129
|
if (d) {
|
|
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
|
|
138
|
-
if (!
|
|
137
|
+
function qn(r) {
|
|
138
|
+
if (!r)
|
|
139
139
|
return null;
|
|
140
|
-
const l = String(
|
|
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
|
|
149
|
-
if (!
|
|
148
|
+
function Zn(r) {
|
|
149
|
+
if (!r || r.length === 0)
|
|
150
150
|
return "text";
|
|
151
|
-
const l =
|
|
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
|
|
155
|
-
return
|
|
154
|
+
function Ye(r) {
|
|
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
|
|
158
|
-
if (
|
|
157
|
+
function Gt(r) {
|
|
158
|
+
if (r == null || r === "" || isNaN(r))
|
|
159
159
|
return "";
|
|
160
|
-
const l = Number(
|
|
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
|
|
164
|
-
if (!
|
|
163
|
+
function Vn(r) {
|
|
164
|
+
if (!r)
|
|
165
165
|
return "";
|
|
166
|
-
if (Array.isArray(
|
|
167
|
-
return
|
|
168
|
-
if (
|
|
169
|
-
const l =
|
|
166
|
+
if (Array.isArray(r))
|
|
167
|
+
return r.length === 0 ? "" : String(r[0]);
|
|
168
|
+
if (r.type === "range") {
|
|
169
|
+
const l = r.min !== "" && r.min != null ? r.min : null, d = r.max !== "" && r.max != null ? r.max : null;
|
|
170
170
|
return l != null && d != null ? `${l} – ${d}` : l != null ? `≥ ${l}` : d != null ? `≤ ${d}` : "";
|
|
171
171
|
}
|
|
172
|
-
if (
|
|
173
|
-
const l =
|
|
172
|
+
if (r.type === "durationRange") {
|
|
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
|
-
if (
|
|
177
|
-
if (Array.isArray(
|
|
178
|
-
return
|
|
179
|
-
const l =
|
|
176
|
+
if (r.type === "scoreRange") {
|
|
177
|
+
if (Array.isArray(r.values) && r.values.length > 0)
|
|
178
|
+
return r.values.slice().sort((f, w) => f - w).join(", ");
|
|
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
|
-
return
|
|
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
|
|
185
|
-
return Array.isArray(
|
|
184
|
+
function er(r) {
|
|
185
|
+
return Array.isArray(r) ? Math.max(0, r.length - 1) : 0;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
return Array.isArray(
|
|
187
|
+
function tr(r) {
|
|
188
|
+
return Array.isArray(r) ? r.slice(1).map(String).join(", ") : "";
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
const [d, f] =
|
|
192
|
-
return /* @__PURE__ */
|
|
190
|
+
function nr({ count: r, values: l }) {
|
|
191
|
+
const [d, f] = y(!1);
|
|
192
|
+
return /* @__PURE__ */ h(
|
|
193
193
|
"span",
|
|
194
194
|
{
|
|
195
195
|
onMouseEnter: () => f(!0),
|
|
@@ -212,7 +212,7 @@ function In({ count: n, values: l }) {
|
|
|
212
212
|
},
|
|
213
213
|
children: [
|
|
214
214
|
"+",
|
|
215
|
-
|
|
215
|
+
r,
|
|
216
216
|
d && /* @__PURE__ */ s(
|
|
217
217
|
"span",
|
|
218
218
|
{
|
|
@@ -242,7 +242,7 @@ function In({ count: n, 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 jn({ leftLabel: n, 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__ */ s("span", { style: C, children:
|
|
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
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__ */
|
|
273
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
274
274
|
/* @__PURE__ */ s("span", { style: C, children: l }),
|
|
275
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,16 +293,16 @@ const $t = [
|
|
|
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
|
|
297
|
-
if (
|
|
296
|
+
function Yt(r) {
|
|
297
|
+
if (r == null || r === "")
|
|
298
298
|
return null;
|
|
299
|
-
const l = String(
|
|
299
|
+
const l = String(r).trim().match(/^(\d{1,3}):(\d{2})$/);
|
|
300
300
|
if (l)
|
|
301
301
|
return Number(l[1]) * 60 + Number(l[2]);
|
|
302
|
-
const d = Number(
|
|
302
|
+
const d = Number(r);
|
|
303
303
|
return Number.isFinite(d) ? d : null;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function Dt({ children: r }) {
|
|
306
306
|
return /* @__PURE__ */ s(
|
|
307
307
|
"div",
|
|
308
308
|
{
|
|
@@ -314,20 +314,20 @@ function xt({ children: n }) {
|
|
|
314
314
|
padding: "4px 0 2px",
|
|
315
315
|
fontFamily: "var(--font-sans)"
|
|
316
316
|
},
|
|
317
|
-
children:
|
|
317
|
+
children: r
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
minValue:
|
|
321
|
+
function Ct({
|
|
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,31 +341,31 @@ function bt({
|
|
|
341
341
|
outline: "none",
|
|
342
342
|
boxSizing: "border-box"
|
|
343
343
|
};
|
|
344
|
-
return /* @__PURE__ */
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
-
/* @__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
347
|
/* @__PURE__ */ s("span", { style: { fontSize: 12, color: "#2E3236", fontFamily: "var(--font-sans)" }, children: "Min From" }),
|
|
348
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
|
-
value:
|
|
355
|
+
value: r,
|
|
356
356
|
onChange: (C) => d(C.target.value),
|
|
357
357
|
style: k
|
|
358
358
|
}
|
|
359
359
|
)
|
|
360
360
|
] }),
|
|
361
361
|
/* @__PURE__ */ s("span", { style: { fontSize: 12, fontWeight: 600, color: "#323232", paddingBottom: 8, fontFamily: "var(--font-sans)" }, children: "to" }),
|
|
362
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: 6, flex: 1, minWidth: 0 }, children: [
|
|
363
363
|
/* @__PURE__ */ s("span", { style: { fontSize: 12, color: "#2E3236", fontFamily: "var(--font-sans)" }, children: "Max" }),
|
|
364
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 bt({
|
|
|
375
375
|
)
|
|
376
376
|
] })
|
|
377
377
|
] }),
|
|
378
|
-
|
|
378
|
+
T && /* @__PURE__ */ h(
|
|
379
379
|
"span",
|
|
380
380
|
{
|
|
381
381
|
style: {
|
|
@@ -385,129 +385,132 @@ function bt({
|
|
|
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 p = 1 / 0,
|
|
399
|
-
for (const
|
|
400
|
-
const F =
|
|
401
|
-
Number.isFinite(F) && (F < p && (p = 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(p) && 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 p = ++
|
|
429
|
-
|
|
430
|
-
const
|
|
428
|
+
const p = ++be.current;
|
|
429
|
+
X(!0);
|
|
430
|
+
const m = setTimeout(async () => {
|
|
431
431
|
try {
|
|
432
|
-
const
|
|
433
|
-
if (p !==
|
|
432
|
+
const g = await k(ne);
|
|
433
|
+
if (p !== be.current)
|
|
434
434
|
return;
|
|
435
|
-
const F = Array.isArray(
|
|
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
|
-
p ===
|
|
438
|
+
p === be.current && te([]);
|
|
439
439
|
} finally {
|
|
440
|
-
p ===
|
|
440
|
+
p === be.current && X(!1);
|
|
441
441
|
}
|
|
442
442
|
}, 300);
|
|
443
|
-
return () => clearTimeout(
|
|
444
|
-
}, [z, k,
|
|
445
|
-
const
|
|
446
|
-
const p =
|
|
447
|
-
for (const F of
|
|
448
|
-
|
|
449
|
-
for (const F of
|
|
450
|
-
|
|
451
|
-
return Array.from(
|
|
452
|
-
const
|
|
453
|
-
|
|
443
|
+
return () => clearTimeout(m);
|
|
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
|
+
for (const F of m)
|
|
448
|
+
g.set(String(F), F);
|
|
449
|
+
for (const F of A)
|
|
450
|
+
g.set(String(F), F);
|
|
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
|
-
|
|
457
|
-
const
|
|
458
|
-
return
|
|
458
|
+
}, [S, ne, A, Ve, He]), ve = (p) => {
|
|
459
|
+
ce((m) => {
|
|
460
|
+
const g = new Set(m);
|
|
461
|
+
return g.has(p) ? g.delete(p) : g.add(p), g;
|
|
459
462
|
});
|
|
460
|
-
},
|
|
461
|
-
z &&
|
|
462
|
-
},
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
return
|
|
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) => {
|
|
467
|
+
const g = new Set(m);
|
|
468
|
+
return g.has(p) ? g.delete(p) : g.add(p), g;
|
|
466
469
|
});
|
|
467
|
-
},
|
|
468
|
-
|
|
469
|
-
const
|
|
470
|
-
return
|
|
470
|
+
}, we = (p) => {
|
|
471
|
+
qe((m) => {
|
|
472
|
+
const g = new Set(m);
|
|
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 (
|
|
476
|
-
return b({ type: "range", min:
|
|
477
|
-
if (
|
|
478
|
-
const p =
|
|
479
|
-
let F = "",
|
|
480
|
-
if (
|
|
481
|
-
F = p ?? "",
|
|
482
|
-
else if (
|
|
483
|
-
const
|
|
484
|
-
F = Math.min(...
|
|
477
|
+
return b(Array.from(A));
|
|
478
|
+
if (H)
|
|
479
|
+
return b({ type: "range", min: Z === "" ? "" : Number(Z), max: V === "" ? "" : Number(V) });
|
|
480
|
+
if (v) {
|
|
481
|
+
const p = Yt(se), m = Yt(q), g = p != null || m != null;
|
|
482
|
+
let F = "", M = "";
|
|
483
|
+
if (g)
|
|
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 p =
|
|
490
|
-
return p != null ||
|
|
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
496
|
min: p != null && Number.isFinite(p) ? p : "",
|
|
494
|
-
max:
|
|
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
|
-
"aria-label": `Filter ${
|
|
513
|
+
"aria-label": `Filter ${r.label || l}`,
|
|
511
514
|
style: {
|
|
512
515
|
position: "fixed",
|
|
513
516
|
top: f.top,
|
|
@@ -525,7 +528,7 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
525
528
|
fontFamily: "var(--font-sans)"
|
|
526
529
|
},
|
|
527
530
|
children: [
|
|
528
|
-
z && /* @__PURE__ */
|
|
531
|
+
z && /* @__PURE__ */ h(Ce, { children: [
|
|
529
532
|
/* @__PURE__ */ s(
|
|
530
533
|
"div",
|
|
531
534
|
{
|
|
@@ -537,7 +540,7 @@ function _n({ column: n, 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 _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
551
554
|
padding: "0 8px"
|
|
552
555
|
},
|
|
553
556
|
children: [
|
|
554
|
-
/* @__PURE__ */ s(
|
|
557
|
+
/* @__PURE__ */ s(_n, { size: 16, color: "#989898", strokeWidth: 2 }),
|
|
555
558
|
/* @__PURE__ */ s(
|
|
556
559
|
"input",
|
|
557
560
|
{
|
|
558
561
|
autoFocus: !0,
|
|
559
562
|
type: "text",
|
|
560
|
-
value:
|
|
561
|
-
onChange: (p) =>
|
|
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 _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
577
580
|
)
|
|
578
581
|
}
|
|
579
582
|
),
|
|
580
|
-
/* @__PURE__ */ s("div", { style: { maxHeight: 220, overflowY: "auto", display: "flex", flexDirection: "column", gap: 4 }, children: typeof k == "function" &&
|
|
581
|
-
const
|
|
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: {
|
|
@@ -601,19 +604,19 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
601
604
|
display: "inline-flex",
|
|
602
605
|
alignItems: "center",
|
|
603
606
|
justifyContent: "center",
|
|
604
|
-
background:
|
|
605
|
-
border: `1px solid ${
|
|
607
|
+
background: m ? "#0B0B0B" : "#FFFFFF",
|
|
608
|
+
border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
|
|
606
609
|
flexShrink: 0
|
|
607
610
|
},
|
|
608
|
-
children:
|
|
611
|
+
children: m && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
609
612
|
}
|
|
610
613
|
),
|
|
611
614
|
/* @__PURE__ */ s(
|
|
612
615
|
"input",
|
|
613
616
|
{
|
|
614
617
|
type: "checkbox",
|
|
615
|
-
checked:
|
|
616
|
-
onChange: () =>
|
|
618
|
+
checked: m,
|
|
619
|
+
onChange: () => ve(p),
|
|
617
620
|
style: { position: "absolute", opacity: 0, pointerEvents: "none" },
|
|
618
621
|
tabIndex: -1
|
|
619
622
|
}
|
|
@@ -621,8 +624,8 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
621
624
|
/* @__PURE__ */ s(
|
|
622
625
|
"span",
|
|
623
626
|
{
|
|
624
|
-
onClick: (
|
|
625
|
-
|
|
627
|
+
onClick: (g) => {
|
|
628
|
+
g.preventDefault(), ve(p);
|
|
626
629
|
},
|
|
627
630
|
style: {
|
|
628
631
|
fontSize: 14,
|
|
@@ -642,34 +645,34 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
642
645
|
);
|
|
643
646
|
}) })
|
|
644
647
|
] }),
|
|
645
|
-
|
|
646
|
-
/* @__PURE__ */ s(
|
|
648
|
+
H && /* @__PURE__ */ h(Ce, { children: [
|
|
649
|
+
/* @__PURE__ */ s(Dt, { children: r.label || "Filter" }),
|
|
647
650
|
/* @__PURE__ */ s(
|
|
648
|
-
|
|
651
|
+
Ct,
|
|
649
652
|
{
|
|
650
|
-
minValue:
|
|
651
|
-
maxValue:
|
|
652
|
-
onMinChange:
|
|
653
|
-
onMaxChange:
|
|
654
|
-
placeholder:
|
|
655
|
-
unit:
|
|
653
|
+
minValue: Z,
|
|
654
|
+
maxValue: V,
|
|
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__ */ s(
|
|
661
|
-
|
|
662
|
-
/* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children:
|
|
663
|
-
const
|
|
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
|
-
"aria-checked":
|
|
671
|
+
"aria-checked": m,
|
|
669
672
|
tabIndex: 0,
|
|
670
|
-
onClick: () =>
|
|
671
|
-
onKeyDown: (
|
|
672
|
-
(
|
|
673
|
+
onClick: () => Be(p.id),
|
|
674
|
+
onKeyDown: (g) => {
|
|
675
|
+
(g.key === " " || g.key === "Enter") && (g.preventDefault(), Be(p.id));
|
|
673
676
|
},
|
|
674
677
|
style: {
|
|
675
678
|
display: "flex",
|
|
@@ -689,11 +692,11 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
689
692
|
display: "inline-flex",
|
|
690
693
|
alignItems: "center",
|
|
691
694
|
justifyContent: "center",
|
|
692
|
-
background:
|
|
693
|
-
border: `1px solid ${
|
|
695
|
+
background: m ? "#0B0B0B" : "#FFFFFF",
|
|
696
|
+
border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
|
|
694
697
|
flexShrink: 0
|
|
695
698
|
},
|
|
696
|
-
children:
|
|
699
|
+
children: m && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
697
700
|
}
|
|
698
701
|
),
|
|
699
702
|
/* @__PURE__ */ s(
|
|
@@ -730,12 +733,12 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
730
733
|
)
|
|
731
734
|
] }),
|
|
732
735
|
/* @__PURE__ */ s(
|
|
733
|
-
|
|
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 _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
743
746
|
}
|
|
744
747
|
)
|
|
745
748
|
] }),
|
|
746
|
-
|
|
747
|
-
/* @__PURE__ */ s(
|
|
748
|
-
|
|
749
|
+
$ && /* @__PURE__ */ h(Ce, { children: [
|
|
750
|
+
/* @__PURE__ */ s(Dt, { children: r.label || "Score" }),
|
|
751
|
+
B && r.filterShowPresets === !0 && /* @__PURE__ */ h(Ce, { children: [
|
|
749
752
|
/* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [1, 2, 3, 4, 5].map((p) => {
|
|
750
|
-
const
|
|
751
|
-
return /* @__PURE__ */
|
|
753
|
+
const m = fe.has(p);
|
|
754
|
+
return /* @__PURE__ */ h(
|
|
752
755
|
"div",
|
|
753
756
|
{
|
|
754
757
|
role: "checkbox",
|
|
755
|
-
"aria-checked":
|
|
758
|
+
"aria-checked": m,
|
|
756
759
|
tabIndex: 0,
|
|
757
|
-
onClick: () =>
|
|
758
|
-
onKeyDown: (
|
|
759
|
-
(
|
|
760
|
+
onClick: () => we(p),
|
|
761
|
+
onKeyDown: (g) => {
|
|
762
|
+
(g.key === " " || g.key === "Enter") && (g.preventDefault(), we(p));
|
|
760
763
|
},
|
|
761
764
|
style: {
|
|
762
765
|
display: "flex",
|
|
@@ -776,11 +779,11 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
776
779
|
display: "inline-flex",
|
|
777
780
|
alignItems: "center",
|
|
778
781
|
justifyContent: "center",
|
|
779
|
-
background:
|
|
780
|
-
border: `1px solid ${
|
|
782
|
+
background: m ? "#0B0B0B" : "#FFFFFF",
|
|
783
|
+
border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
|
|
781
784
|
flexShrink: 0
|
|
782
785
|
},
|
|
783
|
-
children:
|
|
786
|
+
children: m && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
784
787
|
}
|
|
785
788
|
),
|
|
786
789
|
/* @__PURE__ */ s(
|
|
@@ -802,7 +805,7 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
802
805
|
}) }),
|
|
803
806
|
/* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } })
|
|
804
807
|
] }),
|
|
805
|
-
|
|
808
|
+
B && r.filterShowPresets === !0 && /* @__PURE__ */ s(
|
|
806
809
|
"div",
|
|
807
810
|
{
|
|
808
811
|
style: {
|
|
@@ -817,37 +820,37 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
817
820
|
}
|
|
818
821
|
),
|
|
819
822
|
/* @__PURE__ */ s(
|
|
820
|
-
|
|
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
833
|
D && /* @__PURE__ */ s(
|
|
831
|
-
|
|
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
847
|
/* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } }),
|
|
845
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
846
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 _n({ column: n, 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
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 _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
|
|
|
886
889
|
}
|
|
887
890
|
);
|
|
888
891
|
}
|
|
889
|
-
const
|
|
890
|
-
function
|
|
891
|
-
children:
|
|
892
|
+
const sr = () => ({ userData: { email: "anonymous" } }), ir = (r) => /* @__PURE__ */ s("img", { ...r });
|
|
893
|
+
function lr({
|
|
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
|
-
return
|
|
901
|
-
|
|
903
|
+
return r;
|
|
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
|
|
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
|
|
922
|
-
return window.addEventListener("resize",
|
|
923
|
-
window.removeEventListener("resize",
|
|
923
|
+
L();
|
|
924
|
+
const B = () => L();
|
|
925
|
+
return window.addEventListener("resize", B), window.addEventListener("scroll", B, !0), () => {
|
|
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
|
-
|
|
934
|
-
|
|
935
|
-
/* @__PURE__ */
|
|
936
|
+
r,
|
|
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,7 +956,7 @@ function Un({
|
|
|
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,
|
|
@@ -962,13 +965,13 @@ function Un({
|
|
|
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 Un({
|
|
|
987
990
|
}
|
|
988
991
|
);
|
|
989
992
|
}
|
|
990
|
-
function
|
|
991
|
-
data:
|
|
993
|
+
function br({
|
|
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,48 +1013,58 @@ function rr({
|
|
|
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
|
-
columnResizeMinWidth:
|
|
1026
|
-
columnResizeMaxWidth:
|
|
1028
|
+
columnResizeMinWidth: B = 120,
|
|
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,
|
|
1038
|
+
// Row selection (opt-in). When `selectable` is true a leading checkbox
|
|
1039
|
+
// column is rendered outside the reorderable/persisted column system, so it
|
|
1040
|
+
// is always visible and unaffected by the column picker or saved prefs.
|
|
1041
|
+
// Selection is controlled by the host: pass `selectedRowIds` (array of ids)
|
|
1042
|
+
// and handle `onSelectionChange(nextIdsArray)`. `getRowId` resolves a row's
|
|
1043
|
+
// id (defaults to `row.id`).
|
|
1044
|
+
selectable: G = !1,
|
|
1045
|
+
selectedRowIds: Z = null,
|
|
1046
|
+
onSelectionChange: J = null,
|
|
1047
|
+
getRowId: V = null
|
|
1035
1048
|
}) {
|
|
1036
|
-
var
|
|
1037
|
-
const { userData:
|
|
1038
|
-
const i =
|
|
1039
|
-
|
|
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(() => {
|
|
1040
1053
|
const x = () => {
|
|
1041
1054
|
if (i.current) {
|
|
1042
|
-
const
|
|
1043
|
-
u(
|
|
1055
|
+
const U = i.current.scrollWidth > i.current.clientWidth;
|
|
1056
|
+
u(U);
|
|
1044
1057
|
}
|
|
1045
1058
|
};
|
|
1046
1059
|
x();
|
|
1047
|
-
const
|
|
1060
|
+
const W = setTimeout(x, 0);
|
|
1048
1061
|
return window.addEventListener("resize", x), () => {
|
|
1049
|
-
clearTimeout(
|
|
1062
|
+
clearTimeout(W), window.removeEventListener("resize", x);
|
|
1050
1063
|
};
|
|
1051
1064
|
}, [e, t]);
|
|
1052
|
-
const c = /* @__PURE__ */ s("span", { className: `truncate block ${
|
|
1053
|
-
return
|
|
1054
|
-
|
|
1065
|
+
const c = /* @__PURE__ */ s("span", { className: `truncate block ${o}`, ref: i, children: e });
|
|
1066
|
+
return n && t ? /* @__PURE__ */ s(
|
|
1067
|
+
lr,
|
|
1055
1068
|
{
|
|
1056
1069
|
content: t,
|
|
1057
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",
|
|
@@ -1061,160 +1074,160 @@ function rr({
|
|
|
1061
1074
|
}
|
|
1062
1075
|
) : c;
|
|
1063
1076
|
});
|
|
1064
|
-
|
|
1065
|
-
const
|
|
1066
|
-
b ? b(e) :
|
|
1067
|
-
},
|
|
1068
|
-
|
|
1069
|
-
},
|
|
1070
|
-
|
|
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) => {
|
|
1071
1084
|
if (typeof window > "u" || !e || !t || t.length === 0)
|
|
1072
1085
|
return null;
|
|
1073
1086
|
try {
|
|
1074
|
-
const
|
|
1075
|
-
if (
|
|
1076
|
-
const
|
|
1087
|
+
const o = localStorage.getItem(e);
|
|
1088
|
+
if (o) {
|
|
1089
|
+
const n = JSON.parse(o).filter(
|
|
1077
1090
|
(u) => t.some((c) => (c.id || c.key) === u)
|
|
1078
1091
|
);
|
|
1079
|
-
if (
|
|
1080
|
-
return
|
|
1092
|
+
if (n.length > 0)
|
|
1093
|
+
return n;
|
|
1081
1094
|
}
|
|
1082
|
-
} catch (
|
|
1083
|
-
console.warn("Failed to load saved columns from localStorage:",
|
|
1095
|
+
} catch (o) {
|
|
1096
|
+
console.warn("Failed to load saved columns from localStorage:", o);
|
|
1084
1097
|
}
|
|
1085
1098
|
return null;
|
|
1086
1099
|
}, []);
|
|
1087
|
-
const [
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
const
|
|
1091
|
-
return
|
|
1092
|
-
}), b ? b(1) :
|
|
1093
|
-
|
|
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) => {
|
|
1103
|
+
const n = { ...i };
|
|
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))
|
|
1094
1107
|
);
|
|
1095
|
-
}, [
|
|
1096
|
-
|
|
1097
|
-
}, [k,
|
|
1098
|
-
const t = l.find((
|
|
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) => {
|
|
1111
|
+
const t = l.find((n) => (n.id || n.key) === e);
|
|
1099
1112
|
if (t && Array.isArray(t.filterOptions)) {
|
|
1100
|
-
const
|
|
1113
|
+
const n = /* @__PURE__ */ new Set(), u = [];
|
|
1101
1114
|
for (const c of t.filterOptions) {
|
|
1102
1115
|
if (c == null || c === "")
|
|
1103
1116
|
continue;
|
|
1104
1117
|
const x = typeof c == "object" ? JSON.stringify(c) : String(c);
|
|
1105
|
-
|
|
1118
|
+
n.has(x) || (n.add(x), u.push(x));
|
|
1106
1119
|
}
|
|
1107
1120
|
return u.sort((c, x) => c.localeCompare(x));
|
|
1108
1121
|
}
|
|
1109
|
-
if (!
|
|
1122
|
+
if (!r || r.length === 0)
|
|
1110
1123
|
return [];
|
|
1111
|
-
const
|
|
1112
|
-
for (const
|
|
1113
|
-
const u =
|
|
1124
|
+
const o = /* @__PURE__ */ new Set(), i = [];
|
|
1125
|
+
for (const n of r) {
|
|
1126
|
+
const u = n[e];
|
|
1114
1127
|
if (u == null)
|
|
1115
1128
|
continue;
|
|
1116
1129
|
const c = typeof u == "object" ? JSON.stringify(u) : String(u);
|
|
1117
|
-
|
|
1130
|
+
o.has(c) || (o.add(c), i.push(c));
|
|
1118
1131
|
}
|
|
1119
|
-
return i.sort((
|
|
1120
|
-
}, [
|
|
1121
|
-
const t = l.find((
|
|
1122
|
-
return t && t.filterType ? t.filterType :
|
|
1123
|
-
}, [l,
|
|
1132
|
+
return i.sort((n, u) => n.localeCompare(u));
|
|
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) => {
|
|
1124
1137
|
const i = typeof window < "u" ? window.innerWidth : 1 / 0;
|
|
1125
|
-
let
|
|
1126
|
-
return
|
|
1127
|
-
}, []),
|
|
1138
|
+
let n = e.left;
|
|
1139
|
+
return n + 280 > i - 8 && (n = Math.max(8, e.right - 280)), { top: e.bottom + 6, left: n };
|
|
1140
|
+
}, []), Qt = O((e, t) => {
|
|
1128
1141
|
if (!t) {
|
|
1129
|
-
|
|
1142
|
+
ve(e);
|
|
1130
1143
|
return;
|
|
1131
1144
|
}
|
|
1132
|
-
const
|
|
1133
|
-
|
|
1134
|
-
}, [
|
|
1135
|
-
|
|
1136
|
-
if (!
|
|
1145
|
+
const o = t.getBoundingClientRect();
|
|
1146
|
+
Be(Me(o)), ve((i) => i === e ? null : e);
|
|
1147
|
+
}, [Me]);
|
|
1148
|
+
j(() => {
|
|
1149
|
+
if (!N)
|
|
1137
1150
|
return;
|
|
1138
1151
|
const e = (t) => {
|
|
1139
1152
|
if (we.current && we.current.contains(t.target))
|
|
1140
1153
|
return;
|
|
1141
|
-
const
|
|
1142
|
-
|
|
1143
|
-
(
|
|
1144
|
-
) ||
|
|
1154
|
+
const o = Fe.current[N];
|
|
1155
|
+
o && o.contains(t.target) || Object.values(Fe.current).some(
|
|
1156
|
+
(n) => n && n.contains(t.target)
|
|
1157
|
+
) || ve(null);
|
|
1145
1158
|
};
|
|
1146
1159
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1147
|
-
}, [
|
|
1148
|
-
if (!
|
|
1160
|
+
}, [N]), j(() => {
|
|
1161
|
+
if (!N)
|
|
1149
1162
|
return;
|
|
1150
1163
|
const e = () => {
|
|
1151
|
-
const t =
|
|
1164
|
+
const t = Fe.current[N];
|
|
1152
1165
|
if (!t)
|
|
1153
1166
|
return;
|
|
1154
|
-
const
|
|
1155
|
-
|
|
1167
|
+
const o = t.getBoundingClientRect();
|
|
1168
|
+
Be(Me(o));
|
|
1156
1169
|
};
|
|
1157
1170
|
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
1158
1171
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
1159
1172
|
};
|
|
1160
|
-
}, [
|
|
1161
|
-
if (!
|
|
1173
|
+
}, [N, Me]), Dn(() => {
|
|
1174
|
+
if (!N)
|
|
1162
1175
|
return;
|
|
1163
|
-
const e = we.current, t =
|
|
1176
|
+
const e = we.current, t = Fe.current[N];
|
|
1164
1177
|
if (!e || !t)
|
|
1165
1178
|
return;
|
|
1166
|
-
const
|
|
1167
|
-
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))
|
|
1168
1181
|
return;
|
|
1169
|
-
const x = Math.max(
|
|
1170
|
-
|
|
1171
|
-
}, [
|
|
1172
|
-
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(
|
|
1173
1186
|
Object.entries(e).filter(([, t]) => t == null ? !1 : typeof t == "string" ? t.trim() !== "" : !0)
|
|
1174
|
-
), []),
|
|
1175
|
-
const
|
|
1176
|
-
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]);
|
|
1177
1190
|
}, []);
|
|
1178
|
-
|
|
1179
|
-
if (!
|
|
1191
|
+
j(() => {
|
|
1192
|
+
if (!P || C === null)
|
|
1180
1193
|
return;
|
|
1181
|
-
const e =
|
|
1182
|
-
|
|
1183
|
-
}, [
|
|
1184
|
-
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(
|
|
1185
1198
|
() => l.map((e) => e.id || e.key)
|
|
1186
|
-
),
|
|
1199
|
+
), le = O((e) => {
|
|
1187
1200
|
if (!e || e.length === 0)
|
|
1188
1201
|
return e;
|
|
1189
1202
|
let t = Array.from(new Set(e));
|
|
1190
|
-
t.length >
|
|
1191
|
-
const i = l.map((c) => c.id || c.key).includes(
|
|
1192
|
-
return !t.includes(
|
|
1193
|
-
}, [l]), [
|
|
1194
|
-
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)
|
|
1195
1208
|
try {
|
|
1196
|
-
if (localStorage.getItem(`dataTable_manual_change_${
|
|
1197
|
-
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}`);
|
|
1198
1211
|
if (i) {
|
|
1199
|
-
const
|
|
1200
|
-
if (Array.isArray(
|
|
1201
|
-
|
|
1202
|
-
const u =
|
|
1212
|
+
const n = JSON.parse(i);
|
|
1213
|
+
if (Array.isArray(n) && n.length > 0) {
|
|
1214
|
+
ee.current = !0;
|
|
1215
|
+
const u = n.filter(
|
|
1203
1216
|
(c) => l.some((x) => (x.id || x.key) === c)
|
|
1204
1217
|
);
|
|
1205
1218
|
if (u.length > 0)
|
|
1206
|
-
return u.slice(0,
|
|
1219
|
+
return u.slice(0, Y);
|
|
1207
1220
|
}
|
|
1208
1221
|
}
|
|
1209
1222
|
}
|
|
1210
|
-
} catch (
|
|
1211
|
-
console.warn("Failed to load saved columns from localStorage:",
|
|
1223
|
+
} catch (o) {
|
|
1224
|
+
console.warn("Failed to load saved columns from localStorage:", o);
|
|
1212
1225
|
}
|
|
1213
|
-
const t = l.map((
|
|
1214
|
-
return
|
|
1215
|
-
}), [
|
|
1216
|
-
|
|
1217
|
-
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) => {
|
|
1218
1231
|
if (typeof e == "number" && Number.isFinite(e))
|
|
1219
1232
|
return e;
|
|
1220
1233
|
if (typeof e == "string") {
|
|
@@ -1223,232 +1236,284 @@ function rr({
|
|
|
1223
1236
|
const i = parseFloat(t);
|
|
1224
1237
|
return Number.isFinite(i) ? i : null;
|
|
1225
1238
|
}
|
|
1226
|
-
const
|
|
1227
|
-
return Number.isFinite(
|
|
1239
|
+
const o = parseFloat(t);
|
|
1240
|
+
return Number.isFinite(o) && `${o}` === t ? o : null;
|
|
1228
1241
|
}
|
|
1229
1242
|
return null;
|
|
1230
|
-
}, []),
|
|
1231
|
-
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)
|
|
1232
1245
|
return;
|
|
1233
|
-
const { columnId: t, startX:
|
|
1234
|
-
|
|
1235
|
-
}, []),
|
|
1236
|
-
|
|
1237
|
-
}, [
|
|
1238
|
-
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;
|
|
1239
1252
|
e.preventDefault(), e.stopPropagation();
|
|
1240
|
-
const i = t.id || t.key,
|
|
1241
|
-
|
|
1242
|
-
}, [
|
|
1243
|
-
|
|
1244
|
-
const
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
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
|
|
1248
1261
|
})
|
|
1249
|
-
),
|
|
1250
|
-
const { active: t, over:
|
|
1251
|
-
if (
|
|
1252
|
-
if (t.id ===
|
|
1253
|
-
|
|
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);
|
|
1254
1267
|
return;
|
|
1255
1268
|
}
|
|
1256
|
-
|
|
1257
|
-
const
|
|
1258
|
-
if (
|
|
1259
|
-
const c =
|
|
1260
|
-
return
|
|
1269
|
+
ee.current = !0, Ae((i) => {
|
|
1270
|
+
const n = i.indexOf(t.id), u = i.indexOf(o.id);
|
|
1271
|
+
if (n !== -1 && u !== -1) {
|
|
1272
|
+
const c = Ft(i, n, u), x = le(c);
|
|
1273
|
+
return Pt(x), x;
|
|
1261
1274
|
}
|
|
1262
1275
|
return i;
|
|
1263
|
-
}),
|
|
1264
|
-
const
|
|
1265
|
-
return
|
|
1276
|
+
}), Mt((i) => {
|
|
1277
|
+
const n = i.indexOf(t.id), u = i.indexOf(o.id);
|
|
1278
|
+
return Ft(i, n, u);
|
|
1266
1279
|
});
|
|
1267
1280
|
}
|
|
1268
|
-
|
|
1269
|
-
},
|
|
1270
|
-
|
|
1271
|
-
},
|
|
1272
|
-
if (
|
|
1273
|
-
return
|
|
1274
|
-
if (!
|
|
1281
|
+
xt(null);
|
|
1282
|
+
}, on = (e) => {
|
|
1283
|
+
xt(e.active.id);
|
|
1284
|
+
}, ct = oe(() => {
|
|
1285
|
+
if (P)
|
|
1286
|
+
return r || [];
|
|
1287
|
+
if (!r || r.length === 0)
|
|
1275
1288
|
return [];
|
|
1276
|
-
const e =
|
|
1277
|
-
return
|
|
1278
|
-
for (const [i,
|
|
1279
|
-
const u =
|
|
1289
|
+
const e = ne.trim().toLowerCase(), t = Object.entries(X).filter(([, o]) => Ye(o));
|
|
1290
|
+
return r.filter((o) => {
|
|
1291
|
+
for (const [i, n] of t) {
|
|
1292
|
+
const u = o[i];
|
|
1280
1293
|
if (u == null)
|
|
1281
1294
|
return !1;
|
|
1282
|
-
if (Array.isArray(
|
|
1295
|
+
if (Array.isArray(n)) {
|
|
1283
1296
|
const c = String(u);
|
|
1284
|
-
if (!
|
|
1297
|
+
if (!n.some((x) => String(x) === c))
|
|
1285
1298
|
return !1;
|
|
1286
1299
|
continue;
|
|
1287
1300
|
}
|
|
1288
|
-
if (
|
|
1289
|
-
const c =
|
|
1290
|
-
if (isNaN(c) ||
|
|
1301
|
+
if (n.type === "range") {
|
|
1302
|
+
const c = zt(u);
|
|
1303
|
+
if (isNaN(c) || n.min !== "" && n.min != null && c < Number(n.min) || n.max !== "" && n.max != null && c > Number(n.max))
|
|
1291
1304
|
return !1;
|
|
1292
1305
|
continue;
|
|
1293
1306
|
}
|
|
1294
|
-
if (
|
|
1295
|
-
const c =
|
|
1296
|
-
if (isNaN(c) ||
|
|
1307
|
+
if (n.type === "durationRange") {
|
|
1308
|
+
const c = Qn(u);
|
|
1309
|
+
if (isNaN(c) || n.minSec !== "" && n.minSec != null && c < Number(n.minSec) || n.maxSec !== "" && n.maxSec != null && c > Number(n.maxSec))
|
|
1297
1310
|
return !1;
|
|
1298
1311
|
continue;
|
|
1299
1312
|
}
|
|
1300
|
-
if (
|
|
1301
|
-
const c =
|
|
1313
|
+
if (n.type === "scoreRange") {
|
|
1314
|
+
const c = zt(u);
|
|
1302
1315
|
if (isNaN(c))
|
|
1303
1316
|
return !1;
|
|
1304
|
-
if (Array.isArray(
|
|
1317
|
+
if (Array.isArray(n.values) && n.values.length > 0) {
|
|
1305
1318
|
const x = Math.floor(c);
|
|
1306
|
-
if (!
|
|
1319
|
+
if (!n.values.includes(x))
|
|
1307
1320
|
return !1;
|
|
1308
1321
|
continue;
|
|
1309
1322
|
}
|
|
1310
|
-
if (
|
|
1323
|
+
if (n.min !== "" && n.min != null && c < Number(n.min) || n.max !== "" && n.max != null && c > Number(n.max))
|
|
1311
1324
|
return !1;
|
|
1312
1325
|
continue;
|
|
1313
1326
|
}
|
|
1314
|
-
if (
|
|
1315
|
-
const c =
|
|
1327
|
+
if (n.type === "dateRange") {
|
|
1328
|
+
const c = qn(u);
|
|
1316
1329
|
if (!c)
|
|
1317
1330
|
return !1;
|
|
1318
|
-
if (
|
|
1319
|
-
const x = /* @__PURE__ */ new Date(
|
|
1331
|
+
if (n.from) {
|
|
1332
|
+
const x = /* @__PURE__ */ new Date(n.from + "T00:00:00");
|
|
1320
1333
|
if (c < x)
|
|
1321
1334
|
return !1;
|
|
1322
1335
|
}
|
|
1323
|
-
if (
|
|
1324
|
-
const x = /* @__PURE__ */ new Date(
|
|
1336
|
+
if (n.to) {
|
|
1337
|
+
const x = /* @__PURE__ */ new Date(n.to + "T23:59:59");
|
|
1325
1338
|
if (c > x)
|
|
1326
1339
|
return !1;
|
|
1327
1340
|
}
|
|
1328
1341
|
continue;
|
|
1329
1342
|
}
|
|
1330
1343
|
}
|
|
1331
|
-
return !(e && !Object.values(
|
|
1344
|
+
return !(e && !Object.values(o).some((n) => n == null ? !1 : String(n).toLowerCase().includes(e)));
|
|
1332
1345
|
});
|
|
1333
|
-
}, [
|
|
1334
|
-
const
|
|
1335
|
-
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)
|
|
1336
1349
|
return 1;
|
|
1337
1350
|
if (i == null)
|
|
1338
1351
|
return -1;
|
|
1339
|
-
if (typeof
|
|
1340
|
-
return
|
|
1341
|
-
const
|
|
1342
|
-
return
|
|
1343
|
-
}), [
|
|
1344
|
-
if (
|
|
1345
|
-
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;
|
|
1346
1359
|
{
|
|
1347
|
-
const e = (
|
|
1348
|
-
return
|
|
1360
|
+
const e = (Re - 1) * ye, t = e + ye;
|
|
1361
|
+
return Xe.slice(e, t);
|
|
1349
1362
|
}
|
|
1350
|
-
}, [
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1363
|
+
}, [Xe, Re, ye, se]), vt = O(
|
|
1364
|
+
(e, t) => V ? V(e, t) : (e == null ? void 0 : e.id) ?? t,
|
|
1365
|
+
[V]
|
|
1366
|
+
), ke = oe(
|
|
1367
|
+
() => new Set(Array.isArray(Z) ? Z : []),
|
|
1368
|
+
[Z]
|
|
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(
|
|
1376
|
+
(e) => {
|
|
1377
|
+
if (!J)
|
|
1378
|
+
return;
|
|
1379
|
+
const t = new Set(ke);
|
|
1380
|
+
t.has(e) ? t.delete(e) : t.add(e), J(Array.from(t));
|
|
1381
|
+
},
|
|
1382
|
+
[J, ke]
|
|
1383
|
+
), an = O(() => {
|
|
1384
|
+
if (!J)
|
|
1385
|
+
return;
|
|
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(
|
|
1389
|
+
"span",
|
|
1390
|
+
{
|
|
1391
|
+
role: "checkbox",
|
|
1392
|
+
"aria-checked": t ? "mixed" : e,
|
|
1393
|
+
"aria-label": i,
|
|
1394
|
+
tabIndex: 0,
|
|
1395
|
+
onClick: (n) => {
|
|
1396
|
+
n.stopPropagation(), o();
|
|
1397
|
+
},
|
|
1398
|
+
onKeyDown: (n) => {
|
|
1399
|
+
(n.key === " " || n.key === "Enter") && (n.preventDefault(), n.stopPropagation(), o());
|
|
1400
|
+
},
|
|
1401
|
+
style: {
|
|
1402
|
+
width: 16,
|
|
1403
|
+
height: 16,
|
|
1404
|
+
borderRadius: 5,
|
|
1405
|
+
display: "inline-flex",
|
|
1406
|
+
alignItems: "center",
|
|
1407
|
+
justifyContent: "center",
|
|
1408
|
+
background: e || t ? "#0B0B0B" : "#FFFFFF",
|
|
1409
|
+
border: `1px solid ${e || t ? "#0B0B0B" : "#676767"}`,
|
|
1410
|
+
cursor: "pointer",
|
|
1411
|
+
flexShrink: 0
|
|
1412
|
+
},
|
|
1413
|
+
children: t ? /* @__PURE__ */ s(jn, { size: 11, color: "#FFFFFF", strokeWidth: 3 }) : e ? /* @__PURE__ */ s(Qe, { size: 11, color: "#FFFFFF", strokeWidth: 3 }) : null
|
|
1414
|
+
}
|
|
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);
|
|
1420
|
+
}, Lt = (e) => {
|
|
1421
|
+
yt.current || (typeof z == "function" && z(e), yt.current = setTimeout(() => {
|
|
1422
|
+
yt.current = null;
|
|
1358
1423
|
}, 3e3));
|
|
1359
|
-
},
|
|
1360
|
-
if (typeof window < "u" &&
|
|
1424
|
+
}, Pt = O((e) => {
|
|
1425
|
+
if (typeof window < "u" && te && e.length > 0 && ee.current)
|
|
1361
1426
|
try {
|
|
1362
|
-
localStorage.setItem(
|
|
1427
|
+
localStorage.setItem(te, JSON.stringify(e)), xe && localStorage.setItem(xe, "true");
|
|
1363
1428
|
} catch (t) {
|
|
1364
1429
|
console.warn("Failed to save columns to localStorage:", t);
|
|
1365
1430
|
}
|
|
1366
|
-
}, [
|
|
1367
|
-
Object.values(
|
|
1368
|
-
},
|
|
1369
|
-
const e = pe.filter((t) => !
|
|
1370
|
-
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) => {
|
|
1371
1436
|
e.includes(t) || e.push(t);
|
|
1372
|
-
}),
|
|
1373
|
-
},
|
|
1374
|
-
if (e ===
|
|
1437
|
+
}), le(e);
|
|
1438
|
+
}, un = (e) => {
|
|
1439
|
+
if (e === I)
|
|
1375
1440
|
return;
|
|
1376
|
-
if (
|
|
1377
|
-
clearTimeout(
|
|
1378
|
-
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);
|
|
1379
1444
|
return i.delete(e), i;
|
|
1380
|
-
}),
|
|
1381
|
-
const i = new Set(
|
|
1445
|
+
}), Oe((o) => {
|
|
1446
|
+
const i = new Set(o);
|
|
1382
1447
|
return i.delete(e), i;
|
|
1383
1448
|
});
|
|
1384
1449
|
return;
|
|
1385
1450
|
}
|
|
1386
1451
|
if (pe.includes(e)) {
|
|
1387
|
-
if (pe.length -
|
|
1452
|
+
if (pe.length - rt.size <= 1)
|
|
1388
1453
|
return;
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
const
|
|
1392
|
-
return
|
|
1393
|
-
}), delete
|
|
1394
|
-
},
|
|
1454
|
+
Oe((i) => new Set(i).add(e)), he.current[e] = setTimeout(() => {
|
|
1455
|
+
Ne((i) => i.filter((n) => n !== e)), Oe((i) => {
|
|
1456
|
+
const n = new Set(i);
|
|
1457
|
+
return n.delete(e), n;
|
|
1458
|
+
}), delete he.current[e];
|
|
1459
|
+
}, It);
|
|
1395
1460
|
} else {
|
|
1396
|
-
if (pe.length +
|
|
1397
|
-
|
|
1461
|
+
if (pe.length + nt.size >= Y) {
|
|
1462
|
+
Lt("Maximum 9 column selection allowed");
|
|
1398
1463
|
return;
|
|
1399
1464
|
}
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
const
|
|
1403
|
-
return
|
|
1404
|
-
}), delete
|
|
1405
|
-
},
|
|
1465
|
+
We((i) => new Set(i).add(e)), he.current[e] = setTimeout(() => {
|
|
1466
|
+
Ne((i) => le([...i, e])), We((i) => {
|
|
1467
|
+
const n = new Set(i);
|
|
1468
|
+
return n.delete(e), n;
|
|
1469
|
+
}), delete he.current[e];
|
|
1470
|
+
}, It);
|
|
1406
1471
|
}
|
|
1407
|
-
},
|
|
1408
|
-
pe[t] !==
|
|
1409
|
-
},
|
|
1410
|
-
|
|
1411
|
-
},
|
|
1412
|
-
e.preventDefault(),
|
|
1413
|
-
},
|
|
1414
|
-
|
|
1415
|
-
},
|
|
1416
|
-
e.preventDefault(),
|
|
1417
|
-
const i =
|
|
1418
|
-
return
|
|
1419
|
-
}),
|
|
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);
|
|
1420
1485
|
};
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
const t =
|
|
1424
|
-
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];
|
|
1425
1490
|
});
|
|
1426
|
-
}, [
|
|
1427
|
-
if (typeof window < "u" &&
|
|
1491
|
+
}, [_]), j(() => {
|
|
1492
|
+
if (typeof window < "u" && te && _.length > 0 && ee.current)
|
|
1428
1493
|
try {
|
|
1429
|
-
const e =
|
|
1430
|
-
localStorage.setItem(
|
|
1494
|
+
const e = le(_);
|
|
1495
|
+
localStorage.setItem(te, JSON.stringify(e)), xe && localStorage.setItem(xe, "true");
|
|
1431
1496
|
} catch (e) {
|
|
1432
1497
|
console.warn("Failed to save columns to localStorage:", e);
|
|
1433
1498
|
}
|
|
1434
|
-
}, [
|
|
1435
|
-
|
|
1436
|
-
|
|
1499
|
+
}, [_, te, xe]), j(() => {
|
|
1500
|
+
ce && ce(
|
|
1501
|
+
_.filter((e) => e !== I)
|
|
1437
1502
|
);
|
|
1438
|
-
}, [
|
|
1439
|
-
if (l.length > 0 &&
|
|
1440
|
-
if (typeof window < "u" &&
|
|
1503
|
+
}, [_, ce]), j(() => {
|
|
1504
|
+
if (l.length > 0 && _.length === 0) {
|
|
1505
|
+
if (typeof window < "u" && v)
|
|
1441
1506
|
try {
|
|
1442
|
-
if (localStorage.getItem(`dataTable_manual_change_${
|
|
1443
|
-
const
|
|
1444
|
-
if (
|
|
1445
|
-
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);
|
|
1446
1511
|
if (Array.isArray(i) && i.length > 0) {
|
|
1447
|
-
const
|
|
1512
|
+
const n = i.filter(
|
|
1448
1513
|
(u) => l.some((c) => (c.id || c.key) === u)
|
|
1449
1514
|
);
|
|
1450
|
-
if (
|
|
1451
|
-
|
|
1515
|
+
if (n.length > 0) {
|
|
1516
|
+
ee.current = !0, Ae(n.slice(0, Y));
|
|
1452
1517
|
return;
|
|
1453
1518
|
}
|
|
1454
1519
|
}
|
|
@@ -1458,20 +1523,38 @@ function rr({
|
|
|
1458
1523
|
console.warn("Failed to load saved columns from localStorage:", t);
|
|
1459
1524
|
}
|
|
1460
1525
|
const e = l.map((t) => t.id || t.key);
|
|
1461
|
-
|
|
1526
|
+
Ae(le(e.slice(0, Y)));
|
|
1462
1527
|
}
|
|
1463
|
-
}, [l,
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
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)
|
|
1470
1553
|
return;
|
|
1471
1554
|
const e = () => {
|
|
1472
|
-
if (
|
|
1473
|
-
const t =
|
|
1474
|
-
|
|
1555
|
+
if (Te.current) {
|
|
1556
|
+
const t = Te.current.getBoundingClientRect(), o = 217, i = Math.max(8, t.right - o);
|
|
1557
|
+
qt({
|
|
1475
1558
|
top: t.bottom,
|
|
1476
1559
|
left: i,
|
|
1477
1560
|
width: Math.max(t.width || 220, 220)
|
|
@@ -1481,53 +1564,53 @@ function rr({
|
|
|
1481
1564
|
return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
1482
1565
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
1483
1566
|
};
|
|
1484
|
-
}, [
|
|
1567
|
+
}, [ae]), j(() => {
|
|
1485
1568
|
const e = (t) => {
|
|
1486
|
-
|
|
1569
|
+
ae && Te.current && !Te.current.contains(t.target) && gt.current && !gt.current.contains(t.target) && ht(!1);
|
|
1487
1570
|
};
|
|
1488
|
-
if (
|
|
1571
|
+
if (ae)
|
|
1489
1572
|
return document.addEventListener("mousedown", e), () => {
|
|
1490
1573
|
document.removeEventListener("mousedown", e);
|
|
1491
1574
|
};
|
|
1492
|
-
}, [
|
|
1493
|
-
|
|
1494
|
-
}, [
|
|
1495
|
-
function
|
|
1496
|
-
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), {
|
|
1497
1580
|
attributes: x,
|
|
1498
|
-
listeners:
|
|
1499
|
-
setNodeRef:
|
|
1500
|
-
transform:
|
|
1501
|
-
transition:
|
|
1502
|
-
isDragging:
|
|
1503
|
-
} =
|
|
1504
|
-
transform:
|
|
1505
|
-
transition:
|
|
1506
|
-
opacity:
|
|
1507
|
-
width:
|
|
1508
|
-
minWidth:
|
|
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,
|
|
1590
|
+
width: n,
|
|
1591
|
+
minWidth: n
|
|
1509
1592
|
};
|
|
1510
|
-
let
|
|
1511
|
-
if (
|
|
1593
|
+
let _e = !1;
|
|
1594
|
+
if (q && D.length > 0) {
|
|
1512
1595
|
const R = D[0][0];
|
|
1513
|
-
(R ===
|
|
1596
|
+
(R === o || R === "csat_score" && o === "evaluation.csat_score") && (_e = !0);
|
|
1514
1597
|
} else
|
|
1515
|
-
|
|
1516
|
-
const
|
|
1598
|
+
_e = Ke === o;
|
|
1599
|
+
const vn = tt === "asc", Sn = e.filterable === !0;
|
|
1517
1600
|
if (!t)
|
|
1518
1601
|
return /* @__PURE__ */ s(
|
|
1519
1602
|
"th",
|
|
1520
1603
|
{
|
|
1521
1604
|
style: {
|
|
1522
|
-
width:
|
|
1523
|
-
minWidth:
|
|
1605
|
+
width: n,
|
|
1606
|
+
minWidth: n,
|
|
1524
1607
|
backgroundColor: "var(--primary-foreground)",
|
|
1525
1608
|
borderRight: "1px solid #e6e6e6",
|
|
1526
1609
|
borderBottom: "1px solid #e6e6e6",
|
|
1527
1610
|
boxSizing: "border-box"
|
|
1528
1611
|
},
|
|
1529
1612
|
className: "sticky top-[57px] z-10 border-b border-[var(--border-strong)] px-4 py-2 text-left",
|
|
1530
|
-
children:
|
|
1613
|
+
children: Sn ? /* @__PURE__ */ h("div", { className: "relative", children: [
|
|
1531
1614
|
/* @__PURE__ */ s(
|
|
1532
1615
|
Filter,
|
|
1533
1616
|
{
|
|
@@ -1540,9 +1623,9 @@ function rr({
|
|
|
1540
1623
|
{
|
|
1541
1624
|
type: "text",
|
|
1542
1625
|
placeholder: "Filter...",
|
|
1543
|
-
value:
|
|
1626
|
+
value: X[o] || "",
|
|
1544
1627
|
onChange: (R) => {
|
|
1545
|
-
R.stopPropagation(),
|
|
1628
|
+
R.stopPropagation(), cn(o, R.target.value);
|
|
1546
1629
|
},
|
|
1547
1630
|
onKeyDown: (R) => R.stopPropagation(),
|
|
1548
1631
|
onMouseDown: (R) => R.stopPropagation(),
|
|
@@ -1554,15 +1637,15 @@ function rr({
|
|
|
1554
1637
|
] }) : /* @__PURE__ */ s("div", { className: "h-[34px]" })
|
|
1555
1638
|
}
|
|
1556
1639
|
);
|
|
1557
|
-
const
|
|
1558
|
-
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(
|
|
1559
1642
|
"th",
|
|
1560
1643
|
{
|
|
1561
|
-
ref:
|
|
1644
|
+
ref: U,
|
|
1562
1645
|
onMouseEnter: () => c(!0),
|
|
1563
1646
|
onMouseLeave: () => c(!1),
|
|
1564
1647
|
style: {
|
|
1565
|
-
...
|
|
1648
|
+
...bn,
|
|
1566
1649
|
padding: "0 12px",
|
|
1567
1650
|
height: 36,
|
|
1568
1651
|
textAlign: i ? "center" : "left",
|
|
@@ -1572,8 +1655,8 @@ function rr({
|
|
|
1572
1655
|
textTransform: "none",
|
|
1573
1656
|
color: "#0b0b0b",
|
|
1574
1657
|
cursor: e.sortable !== !1 ? "pointer" : "default",
|
|
1575
|
-
width:
|
|
1576
|
-
...typeof
|
|
1658
|
+
width: n,
|
|
1659
|
+
...typeof n == "string" && n.endsWith("px") ? { maxWidth: n } : {},
|
|
1577
1660
|
borderRight: "1px solid #e6e6e6",
|
|
1578
1661
|
boxSizing: "border-box",
|
|
1579
1662
|
userSelect: "none",
|
|
@@ -1581,7 +1664,7 @@ function rr({
|
|
|
1581
1664
|
wordBreak: "normal",
|
|
1582
1665
|
overflowWrap: "normal",
|
|
1583
1666
|
verticalAlign: "middle",
|
|
1584
|
-
background: u ||
|
|
1667
|
+
background: u || St ? "#e6e6e6" : "#f2f2f0",
|
|
1585
1668
|
borderBottom: "1px solid #e6e6e6",
|
|
1586
1669
|
position: "sticky",
|
|
1587
1670
|
top: 0,
|
|
@@ -1607,7 +1690,7 @@ function rr({
|
|
|
1607
1690
|
}
|
|
1608
1691
|
}
|
|
1609
1692
|
),
|
|
1610
|
-
/* @__PURE__ */
|
|
1693
|
+
/* @__PURE__ */ h(
|
|
1611
1694
|
"div",
|
|
1612
1695
|
{
|
|
1613
1696
|
style: {
|
|
@@ -1626,7 +1709,7 @@ function rr({
|
|
|
1626
1709
|
"div",
|
|
1627
1710
|
{
|
|
1628
1711
|
...x,
|
|
1629
|
-
...
|
|
1712
|
+
...W,
|
|
1630
1713
|
style: {
|
|
1631
1714
|
cursor: "grab",
|
|
1632
1715
|
color: "rgba(11, 11, 11, 0.36)",
|
|
@@ -1635,13 +1718,13 @@ function rr({
|
|
|
1635
1718
|
visibility: u ? "visible" : "hidden",
|
|
1636
1719
|
flexShrink: 0
|
|
1637
1720
|
},
|
|
1638
|
-
children: /* @__PURE__ */ s(
|
|
1721
|
+
children: /* @__PURE__ */ s(kt, { size: 14 })
|
|
1639
1722
|
}
|
|
1640
1723
|
),
|
|
1641
1724
|
/* @__PURE__ */ s(
|
|
1642
1725
|
"span",
|
|
1643
1726
|
{
|
|
1644
|
-
onClick: () => e.sortable !== !1 &&
|
|
1727
|
+
onClick: () => e.sortable !== !1 && $t(o),
|
|
1645
1728
|
title: typeof e.label == "string" ? e.label : void 0,
|
|
1646
1729
|
style: {
|
|
1647
1730
|
cursor: e.sortable !== !1 ? "pointer" : "default",
|
|
@@ -1655,12 +1738,12 @@ function rr({
|
|
|
1655
1738
|
children: e.label
|
|
1656
1739
|
}
|
|
1657
1740
|
),
|
|
1658
|
-
|
|
1741
|
+
wn && /* @__PURE__ */ s(
|
|
1659
1742
|
"button",
|
|
1660
1743
|
{
|
|
1661
1744
|
type: "button",
|
|
1662
1745
|
onClick: (R) => {
|
|
1663
|
-
R.stopPropagation(),
|
|
1746
|
+
R.stopPropagation(), $t(o);
|
|
1664
1747
|
},
|
|
1665
1748
|
title: "Sort",
|
|
1666
1749
|
style: {
|
|
@@ -1672,26 +1755,26 @@ function rr({
|
|
|
1672
1755
|
display: "inline-flex",
|
|
1673
1756
|
alignItems: "center",
|
|
1674
1757
|
justifyContent: "center",
|
|
1675
|
-
color:
|
|
1758
|
+
color: _e ? "#0b0b0b" : "rgba(11, 11, 11, 0.55)",
|
|
1676
1759
|
flexShrink: 0
|
|
1677
1760
|
},
|
|
1678
|
-
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 })
|
|
1679
1762
|
}
|
|
1680
1763
|
),
|
|
1681
|
-
|
|
1764
|
+
Fn && /* @__PURE__ */ h(
|
|
1682
1765
|
"button",
|
|
1683
1766
|
{
|
|
1684
1767
|
type: "button",
|
|
1685
1768
|
ref: (R) => {
|
|
1686
|
-
|
|
1769
|
+
Fe.current[o] = R;
|
|
1687
1770
|
},
|
|
1688
1771
|
onClick: (R) => {
|
|
1689
|
-
R.stopPropagation(),
|
|
1772
|
+
R.stopPropagation(), Qt(o, R.currentTarget);
|
|
1690
1773
|
},
|
|
1691
1774
|
title: "Filter",
|
|
1692
1775
|
style: {
|
|
1693
1776
|
position: "relative",
|
|
1694
|
-
background:
|
|
1777
|
+
background: St || pt ? "#D8D8D8" : "transparent",
|
|
1695
1778
|
border: "none",
|
|
1696
1779
|
padding: 4,
|
|
1697
1780
|
borderRadius: 4,
|
|
@@ -1699,12 +1782,12 @@ function rr({
|
|
|
1699
1782
|
display: "inline-flex",
|
|
1700
1783
|
alignItems: "center",
|
|
1701
1784
|
justifyContent: "center",
|
|
1702
|
-
color:
|
|
1785
|
+
color: pt ? "#0b0b0b" : "rgba(11, 11, 11, 0.7)",
|
|
1703
1786
|
flexShrink: 0
|
|
1704
1787
|
},
|
|
1705
1788
|
children: [
|
|
1706
|
-
/* @__PURE__ */ s(
|
|
1707
|
-
|
|
1789
|
+
/* @__PURE__ */ s(Xn, { size: 14, strokeWidth: 1.75 }),
|
|
1790
|
+
pt && /* @__PURE__ */ s(
|
|
1708
1791
|
"span",
|
|
1709
1792
|
{
|
|
1710
1793
|
"aria-hidden": "true",
|
|
@@ -1747,9 +1830,9 @@ function rr({
|
|
|
1747
1830
|
{
|
|
1748
1831
|
role: "separator",
|
|
1749
1832
|
"aria-orientation": "vertical",
|
|
1750
|
-
"aria-label": `Resize ${e.label ||
|
|
1833
|
+
"aria-label": `Resize ${e.label || o} column`,
|
|
1751
1834
|
title: "Drag to resize column",
|
|
1752
|
-
onMouseDown: (R) =>
|
|
1835
|
+
onMouseDown: (R) => tn(R, e, n),
|
|
1753
1836
|
onClick: (R) => R.stopPropagation(),
|
|
1754
1837
|
onMouseEnter: (R) => {
|
|
1755
1838
|
R.currentTarget.style.background = "rgba(30, 33, 37, 0.18)";
|
|
@@ -1773,28 +1856,28 @@ function rr({
|
|
|
1773
1856
|
}
|
|
1774
1857
|
);
|
|
1775
1858
|
}
|
|
1776
|
-
const
|
|
1777
|
-
const c = i &&
|
|
1778
|
-
|
|
1779
|
-
const
|
|
1780
|
-
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(
|
|
1781
1864
|
"div",
|
|
1782
1865
|
{
|
|
1783
1866
|
draggable: i,
|
|
1784
|
-
onDragStart: i ? (
|
|
1785
|
-
onDragEnd: i ?
|
|
1786
|
-
onDragOver: i ? (
|
|
1787
|
-
onDragLeave: i ?
|
|
1788
|
-
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,
|
|
1789
1872
|
onClick: () => {
|
|
1790
|
-
|
|
1873
|
+
n || un(t);
|
|
1791
1874
|
},
|
|
1792
1875
|
style: {
|
|
1793
1876
|
display: "flex",
|
|
1794
1877
|
alignItems: "center",
|
|
1795
1878
|
gap: 4,
|
|
1796
1879
|
padding: "2px 0",
|
|
1797
|
-
cursor:
|
|
1880
|
+
cursor: n ? "default" : i ? "grab" : "pointer",
|
|
1798
1881
|
opacity: c ? 0.5 : 1,
|
|
1799
1882
|
background: x ? "#F2F2F0" : "transparent",
|
|
1800
1883
|
borderRadius: 6
|
|
@@ -1813,7 +1896,7 @@ function rr({
|
|
|
1813
1896
|
visibility: i ? "visible" : "hidden",
|
|
1814
1897
|
flexShrink: 0
|
|
1815
1898
|
},
|
|
1816
|
-
children: /* @__PURE__ */ s(
|
|
1899
|
+
children: /* @__PURE__ */ s(kt, { size: 14, strokeWidth: 1.75 })
|
|
1817
1900
|
}
|
|
1818
1901
|
),
|
|
1819
1902
|
/* @__PURE__ */ s(
|
|
@@ -1826,12 +1909,12 @@ function rr({
|
|
|
1826
1909
|
display: "inline-flex",
|
|
1827
1910
|
alignItems: "center",
|
|
1828
1911
|
justifyContent: "center",
|
|
1829
|
-
background:
|
|
1830
|
-
border: `1px solid ${
|
|
1912
|
+
background: W ? "#0B0B0B" : "#FFFFFF",
|
|
1913
|
+
border: `1px solid ${W ? "#0B0B0B" : "#676767"}`,
|
|
1831
1914
|
flexShrink: 0,
|
|
1832
1915
|
marginLeft: 8
|
|
1833
1916
|
},
|
|
1834
|
-
children:
|
|
1917
|
+
children: W && /* @__PURE__ */ s(Qe, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
|
|
1835
1918
|
}
|
|
1836
1919
|
),
|
|
1837
1920
|
/* @__PURE__ */ s(
|
|
@@ -1851,14 +1934,14 @@ function rr({
|
|
|
1851
1934
|
]
|
|
1852
1935
|
}
|
|
1853
1936
|
);
|
|
1854
|
-
},
|
|
1937
|
+
}, xn = ae ? /* @__PURE__ */ h(
|
|
1855
1938
|
"div",
|
|
1856
1939
|
{
|
|
1857
|
-
ref:
|
|
1940
|
+
ref: gt,
|
|
1858
1941
|
style: {
|
|
1859
1942
|
position: "fixed",
|
|
1860
|
-
top: `${
|
|
1861
|
-
left: `${
|
|
1943
|
+
top: `${At.top}px`,
|
|
1944
|
+
left: `${At.left}px`,
|
|
1862
1945
|
width: 217,
|
|
1863
1946
|
maxHeight: 320,
|
|
1864
1947
|
zIndex: 49,
|
|
@@ -1872,7 +1955,7 @@ function rr({
|
|
|
1872
1955
|
boxShadow: "0 8px 24px rgba(11, 11, 11, 0.08)"
|
|
1873
1956
|
},
|
|
1874
1957
|
children: [
|
|
1875
|
-
/* @__PURE__ */
|
|
1958
|
+
/* @__PURE__ */ h(
|
|
1876
1959
|
"div",
|
|
1877
1960
|
{
|
|
1878
1961
|
style: {
|
|
@@ -1886,11 +1969,11 @@ function rr({
|
|
|
1886
1969
|
},
|
|
1887
1970
|
children: [
|
|
1888
1971
|
pe.map((e, t) => {
|
|
1889
|
-
if (e ===
|
|
1972
|
+
if (e === I)
|
|
1890
1973
|
return null;
|
|
1891
|
-
const
|
|
1892
|
-
return
|
|
1893
|
-
col:
|
|
1974
|
+
const o = l.find((i) => Q(i) === e);
|
|
1975
|
+
return o ? /* @__PURE__ */ s(wt.Fragment, { children: jt({
|
|
1976
|
+
col: o,
|
|
1894
1977
|
columnId: e,
|
|
1895
1978
|
isSelected: !0,
|
|
1896
1979
|
draggable: !0,
|
|
@@ -1899,11 +1982,11 @@ function rr({
|
|
|
1899
1982
|
}) }, `selected-${e}-${t}`) : null;
|
|
1900
1983
|
}),
|
|
1901
1984
|
l.filter((e) => {
|
|
1902
|
-
const t =
|
|
1903
|
-
return t !==
|
|
1985
|
+
const t = Q(e);
|
|
1986
|
+
return t !== I && !pe.includes(t);
|
|
1904
1987
|
}).map((e) => {
|
|
1905
|
-
const t =
|
|
1906
|
-
return /* @__PURE__ */ s(
|
|
1988
|
+
const t = Q(e);
|
|
1989
|
+
return /* @__PURE__ */ s(wt.Fragment, { children: jt({
|
|
1907
1990
|
col: e,
|
|
1908
1991
|
columnId: t,
|
|
1909
1992
|
isSelected: !1,
|
|
@@ -1915,7 +1998,7 @@ function rr({
|
|
|
1915
1998
|
]
|
|
1916
1999
|
}
|
|
1917
2000
|
),
|
|
1918
|
-
/* @__PURE__ */
|
|
2001
|
+
/* @__PURE__ */ h(
|
|
1919
2002
|
"div",
|
|
1920
2003
|
{
|
|
1921
2004
|
style: {
|
|
@@ -1936,10 +2019,10 @@ function rr({
|
|
|
1936
2019
|
type: "button",
|
|
1937
2020
|
onClick: (e) => {
|
|
1938
2021
|
e.preventDefault(), e.stopPropagation();
|
|
1939
|
-
const t =
|
|
1940
|
-
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)
|
|
1941
2024
|
try {
|
|
1942
|
-
localStorage.removeItem(
|
|
2025
|
+
localStorage.removeItem(te);
|
|
1943
2026
|
} catch {
|
|
1944
2027
|
}
|
|
1945
2028
|
},
|
|
@@ -1961,9 +2044,9 @@ function rr({
|
|
|
1961
2044
|
{
|
|
1962
2045
|
type: "button",
|
|
1963
2046
|
onClick: (e) => {
|
|
1964
|
-
e.preventDefault(), e.stopPropagation(),
|
|
1965
|
-
const t =
|
|
1966
|
-
|
|
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);
|
|
1967
2050
|
},
|
|
1968
2051
|
style: {
|
|
1969
2052
|
background: "#2E3236",
|
|
@@ -1985,28 +2068,28 @@ function rr({
|
|
|
1985
2068
|
)
|
|
1986
2069
|
]
|
|
1987
2070
|
}
|
|
1988
|
-
) : null,
|
|
1989
|
-
|
|
2071
|
+
) : null, Ge = N ? l.find((e) => Q(e) === N) : null, Ht = Ge ? /* @__PURE__ */ s(
|
|
2072
|
+
or,
|
|
1990
2073
|
{
|
|
1991
|
-
column:
|
|
1992
|
-
columnId:
|
|
1993
|
-
filterType:
|
|
1994
|
-
position:
|
|
2074
|
+
column: Ge,
|
|
2075
|
+
columnId: N,
|
|
2076
|
+
filterType: re(N),
|
|
2077
|
+
position: et,
|
|
1995
2078
|
popoverRef: we,
|
|
1996
|
-
distinctValues:
|
|
1997
|
-
initialValue:
|
|
1998
|
-
onSearch: typeof
|
|
1999
|
-
searchMinChars:
|
|
2079
|
+
distinctValues: Ee(N),
|
|
2080
|
+
initialValue: X[N],
|
|
2081
|
+
onSearch: typeof Ge.onFilterSearch == "function" ? Ge.onFilterSearch : null,
|
|
2082
|
+
searchMinChars: Ge.filterSearchMinChars ?? 3,
|
|
2000
2083
|
onApply: (e) => {
|
|
2001
|
-
|
|
2084
|
+
M(N, e), ve(null);
|
|
2002
2085
|
},
|
|
2003
|
-
onCancel: () =>
|
|
2086
|
+
onCancel: () => ve(null)
|
|
2004
2087
|
},
|
|
2005
|
-
|
|
2088
|
+
N
|
|
2006
2089
|
) : null;
|
|
2007
|
-
return /* @__PURE__ */
|
|
2008
|
-
|
|
2009
|
-
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(
|
|
2010
2093
|
"div",
|
|
2011
2094
|
{
|
|
2012
2095
|
className: "pt-2 pb-1",
|
|
@@ -2015,7 +2098,7 @@ function rr({
|
|
|
2015
2098
|
zIndex: 35,
|
|
2016
2099
|
backgroundColor: "var(--primary-foreground)"
|
|
2017
2100
|
},
|
|
2018
|
-
children: /* @__PURE__ */
|
|
2101
|
+
children: /* @__PURE__ */ h(
|
|
2019
2102
|
"div",
|
|
2020
2103
|
{
|
|
2021
2104
|
style: {
|
|
@@ -2026,23 +2109,24 @@ function rr({
|
|
|
2026
2109
|
flexWrap: "wrap"
|
|
2027
2110
|
},
|
|
2028
2111
|
children: [
|
|
2029
|
-
|
|
2030
|
-
|
|
2112
|
+
L && /* @__PURE__ */ s("div", { style: { marginRight: "auto" }, children: /* @__PURE__ */ s(
|
|
2113
|
+
Yn,
|
|
2031
2114
|
{
|
|
2032
|
-
dateRangePicker:
|
|
2033
|
-
onWeekToDate:
|
|
2034
|
-
exportConfig:
|
|
2035
|
-
filterChipsConfig:
|
|
2036
|
-
trailingActions:
|
|
2115
|
+
dateRangePicker: L.dateRangePicker,
|
|
2116
|
+
onWeekToDate: L.onWeekToDate,
|
|
2117
|
+
exportConfig: L.exportConfig,
|
|
2118
|
+
filterChipsConfig: L.filterChipsConfig,
|
|
2119
|
+
trailingActions: L.trailingActions
|
|
2037
2120
|
}
|
|
2038
2121
|
) }),
|
|
2039
|
-
|
|
2040
|
-
|
|
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(
|
|
2041
2125
|
"button",
|
|
2042
2126
|
{
|
|
2043
|
-
ref:
|
|
2127
|
+
ref: Te,
|
|
2044
2128
|
type: "button",
|
|
2045
|
-
onClick: () =>
|
|
2129
|
+
onClick: () => ht(!ae),
|
|
2046
2130
|
style: {
|
|
2047
2131
|
display: "inline-flex",
|
|
2048
2132
|
alignItems: "center",
|
|
@@ -2060,19 +2144,19 @@ function rr({
|
|
|
2060
2144
|
whiteSpace: "nowrap"
|
|
2061
2145
|
},
|
|
2062
2146
|
children: [
|
|
2063
|
-
/* @__PURE__ */ s(
|
|
2147
|
+
/* @__PURE__ */ s(Pn, { size: 20, strokeWidth: 1.75 }),
|
|
2064
2148
|
"Columns"
|
|
2065
2149
|
]
|
|
2066
2150
|
}
|
|
2067
2151
|
),
|
|
2068
|
-
|
|
2152
|
+
ae && Rt(xn, document.body)
|
|
2069
2153
|
] })
|
|
2070
2154
|
]
|
|
2071
2155
|
}
|
|
2072
2156
|
)
|
|
2073
2157
|
}
|
|
2074
2158
|
),
|
|
2075
|
-
Object.keys(
|
|
2159
|
+
Object.keys(X).length > 0 && /* @__PURE__ */ h(
|
|
2076
2160
|
"div",
|
|
2077
2161
|
{
|
|
2078
2162
|
style: {
|
|
@@ -2083,12 +2167,12 @@ function rr({
|
|
|
2083
2167
|
padding: "8px 0"
|
|
2084
2168
|
},
|
|
2085
2169
|
children: [
|
|
2086
|
-
Object.entries(
|
|
2087
|
-
const
|
|
2088
|
-
if (!
|
|
2170
|
+
Object.entries(X).map(([e, t]) => {
|
|
2171
|
+
const o = l.find((c) => Q(c) === e);
|
|
2172
|
+
if (!o || !Ye(t))
|
|
2089
2173
|
return null;
|
|
2090
|
-
const i =
|
|
2091
|
-
return /* @__PURE__ */
|
|
2174
|
+
const i = Vn(t), n = er(t), u = tr(t);
|
|
2175
|
+
return /* @__PURE__ */ h(
|
|
2092
2176
|
"span",
|
|
2093
2177
|
{
|
|
2094
2178
|
style: {
|
|
@@ -2107,20 +2191,20 @@ function rr({
|
|
|
2107
2191
|
whiteSpace: "nowrap"
|
|
2108
2192
|
},
|
|
2109
2193
|
children: [
|
|
2110
|
-
/* @__PURE__ */
|
|
2111
|
-
/* @__PURE__ */
|
|
2112
|
-
|
|
2194
|
+
/* @__PURE__ */ h("span", { children: [
|
|
2195
|
+
/* @__PURE__ */ h("span", { style: { color: "#676767" }, children: [
|
|
2196
|
+
o.label,
|
|
2113
2197
|
": "
|
|
2114
2198
|
] }),
|
|
2115
2199
|
/* @__PURE__ */ s("span", { children: i })
|
|
2116
2200
|
] }),
|
|
2117
|
-
|
|
2201
|
+
n > 0 && /* @__PURE__ */ s(nr, { count: n, values: u }),
|
|
2118
2202
|
/* @__PURE__ */ s(
|
|
2119
2203
|
"button",
|
|
2120
2204
|
{
|
|
2121
2205
|
type: "button",
|
|
2122
|
-
onClick: () =>
|
|
2123
|
-
"aria-label": `Remove ${
|
|
2206
|
+
onClick: () => M(e, []),
|
|
2207
|
+
"aria-label": `Remove ${o.label} filter`,
|
|
2124
2208
|
style: {
|
|
2125
2209
|
background: "transparent",
|
|
2126
2210
|
border: "none",
|
|
@@ -2129,7 +2213,7 @@ function rr({
|
|
|
2129
2213
|
display: "inline-flex",
|
|
2130
2214
|
color: "#676767"
|
|
2131
2215
|
},
|
|
2132
|
-
children: /* @__PURE__ */ s(
|
|
2216
|
+
children: /* @__PURE__ */ s(In, { size: 14, strokeWidth: 2 })
|
|
2133
2217
|
}
|
|
2134
2218
|
)
|
|
2135
2219
|
]
|
|
@@ -2141,7 +2225,7 @@ function rr({
|
|
|
2141
2225
|
"button",
|
|
2142
2226
|
{
|
|
2143
2227
|
type: "button",
|
|
2144
|
-
onClick:
|
|
2228
|
+
onClick: Se,
|
|
2145
2229
|
style: {
|
|
2146
2230
|
marginLeft: "auto",
|
|
2147
2231
|
background: "transparent",
|
|
@@ -2159,15 +2243,15 @@ function rr({
|
|
|
2159
2243
|
]
|
|
2160
2244
|
}
|
|
2161
2245
|
),
|
|
2162
|
-
l.length > 0 &&
|
|
2163
|
-
|
|
2246
|
+
l.length > 0 && Le.length > 0 ? /* @__PURE__ */ h(
|
|
2247
|
+
Rn,
|
|
2164
2248
|
{
|
|
2165
|
-
sensors:
|
|
2166
|
-
collisionDetection:
|
|
2167
|
-
onDragStart:
|
|
2168
|
-
onDragEnd:
|
|
2249
|
+
sensors: nn,
|
|
2250
|
+
collisionDetection: zn,
|
|
2251
|
+
onDragStart: on,
|
|
2252
|
+
onDragEnd: rn,
|
|
2169
2253
|
children: [
|
|
2170
|
-
/* @__PURE__ */
|
|
2254
|
+
/* @__PURE__ */ h("div", { style: {
|
|
2171
2255
|
borderRadius: 8,
|
|
2172
2256
|
border: "1px solid #E6E6E6",
|
|
2173
2257
|
overflow: "hidden",
|
|
@@ -2178,9 +2262,9 @@ function rr({
|
|
|
2178
2262
|
// collapse to just the header height and the centered overlay/loader
|
|
2179
2263
|
// would be squeezed into a thin strip. Reserve vertical space so the
|
|
2180
2264
|
// loader stays properly visible and centered.
|
|
2181
|
-
|
|
2265
|
+
...$ ? { minHeight: 320 } : {}
|
|
2182
2266
|
}, children: [
|
|
2183
|
-
|
|
2267
|
+
$ && /* @__PURE__ */ s("div", { style: {
|
|
2184
2268
|
position: "absolute",
|
|
2185
2269
|
inset: 0,
|
|
2186
2270
|
background: "rgba(255, 255, 255, 0.9)",
|
|
@@ -2191,7 +2275,7 @@ function rr({
|
|
|
2191
2275
|
alignItems: "center",
|
|
2192
2276
|
justifyContent: "center",
|
|
2193
2277
|
borderRadius: "14px"
|
|
2194
|
-
}, children: /* @__PURE__ */
|
|
2278
|
+
}, children: /* @__PURE__ */ h("div", { style: {
|
|
2195
2279
|
display: "flex",
|
|
2196
2280
|
flexDirection: "column",
|
|
2197
2281
|
alignItems: "center",
|
|
@@ -2203,7 +2287,7 @@ function rr({
|
|
|
2203
2287
|
margin: 0
|
|
2204
2288
|
}, children: "Loading..." }),
|
|
2205
2289
|
/* @__PURE__ */ s(
|
|
2206
|
-
|
|
2290
|
+
ir,
|
|
2207
2291
|
{
|
|
2208
2292
|
src: "/BrandLoading.gif",
|
|
2209
2293
|
alt: "Loading",
|
|
@@ -2214,7 +2298,7 @@ function rr({
|
|
|
2214
2298
|
}
|
|
2215
2299
|
)
|
|
2216
2300
|
] }) }),
|
|
2217
|
-
/* @__PURE__ */ s("div", { className: "overflow-x-auto custom-thin-scrollbar-hidden", ref:
|
|
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: {
|
|
2218
2302
|
width: "auto",
|
|
2219
2303
|
minWidth: "100%",
|
|
2220
2304
|
tableLayout: "fixed",
|
|
@@ -2224,18 +2308,48 @@ function rr({
|
|
|
2224
2308
|
border: "1px solid #e6e6e6",
|
|
2225
2309
|
boxSizing: "border-box"
|
|
2226
2310
|
}, children: [
|
|
2227
|
-
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2311
|
+
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ h("tr", { children: [
|
|
2312
|
+
G && /* @__PURE__ */ s(
|
|
2313
|
+
"th",
|
|
2314
|
+
{
|
|
2315
|
+
style: {
|
|
2316
|
+
width: ut,
|
|
2317
|
+
minWidth: ut,
|
|
2318
|
+
padding: "10px 8px",
|
|
2319
|
+
textAlign: "center",
|
|
2320
|
+
verticalAlign: "middle",
|
|
2321
|
+
background: "#f2f2f0",
|
|
2322
|
+
borderRight: "1px solid #e6e6e6",
|
|
2323
|
+
borderBottom: "1px solid #e6e6e6",
|
|
2324
|
+
position: "sticky",
|
|
2325
|
+
top: 0,
|
|
2326
|
+
zIndex: 10,
|
|
2327
|
+
boxSizing: "border-box"
|
|
2328
|
+
},
|
|
2329
|
+
children: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", lineHeight: 0 }, children: /* @__PURE__ */ s(
|
|
2330
|
+
Tt,
|
|
2331
|
+
{
|
|
2332
|
+
checked: dt,
|
|
2333
|
+
indeterminate: sn,
|
|
2334
|
+
onToggle: an,
|
|
2335
|
+
ariaLabel: "Select all rows on this page"
|
|
2336
|
+
}
|
|
2337
|
+
) })
|
|
2338
|
+
}
|
|
2339
|
+
),
|
|
2340
|
+
/* @__PURE__ */ s(
|
|
2341
|
+
Bn,
|
|
2342
|
+
{
|
|
2343
|
+
items: _,
|
|
2344
|
+
strategy: En,
|
|
2345
|
+
children: Le.map((e) => /* @__PURE__ */ s(yn, { column: e, isHeaderRow: !0 }, `header-${Q(e)}`))
|
|
2346
|
+
}
|
|
2347
|
+
)
|
|
2348
|
+
] }) }),
|
|
2349
|
+
/* @__PURE__ */ s("tbody", { children: !$ && $e.length === 0 ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
|
|
2236
2350
|
"td",
|
|
2237
2351
|
{
|
|
2238
|
-
colSpan:
|
|
2352
|
+
colSpan: Le.length + (G ? 1 : 0),
|
|
2239
2353
|
style: {
|
|
2240
2354
|
padding: "32px",
|
|
2241
2355
|
textAlign: "center",
|
|
@@ -2245,69 +2359,98 @@ function rr({
|
|
|
2245
2359
|
},
|
|
2246
2360
|
children: "No results found"
|
|
2247
2361
|
}
|
|
2248
|
-
) }) :
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
"
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2362
|
+
) }) : !$ && $e.length > 0 ? $e.map((e, t) => {
|
|
2363
|
+
const o = vt(e, t), i = G && ke.has(o);
|
|
2364
|
+
return /* @__PURE__ */ h(
|
|
2365
|
+
"tr",
|
|
2366
|
+
{
|
|
2367
|
+
"data-row-id": e.id || t,
|
|
2368
|
+
style: {
|
|
2369
|
+
borderBottom: "1px solid #e6e6e6",
|
|
2370
|
+
cursor: f ? "pointer" : "default",
|
|
2371
|
+
transition: "background 0.15s ease",
|
|
2372
|
+
background: i ? "#F2F4F7" : "transparent"
|
|
2373
|
+
},
|
|
2374
|
+
onClick: f ? (n) => {
|
|
2375
|
+
n.stopPropagation(), f(e, t);
|
|
2376
|
+
} : void 0,
|
|
2377
|
+
onMouseEnter: (n) => {
|
|
2378
|
+
n.currentTarget.style.background = "#E6E6E6";
|
|
2379
|
+
},
|
|
2380
|
+
onMouseLeave: (n) => {
|
|
2381
|
+
n.currentTarget.style.background = i ? "#F2F4F7" : "transparent";
|
|
2382
|
+
},
|
|
2383
|
+
children: [
|
|
2384
|
+
G && /* @__PURE__ */ s(
|
|
2385
|
+
"td",
|
|
2386
|
+
{
|
|
2387
|
+
onClick: (n) => n.stopPropagation(),
|
|
2388
|
+
style: {
|
|
2389
|
+
width: ut,
|
|
2390
|
+
minWidth: ut,
|
|
2391
|
+
padding: "10px 8px",
|
|
2392
|
+
textAlign: "center",
|
|
2393
|
+
verticalAlign: "middle",
|
|
2394
|
+
borderRight: "1px solid #e6e6e6",
|
|
2395
|
+
boxSizing: "border-box"
|
|
2396
|
+
},
|
|
2397
|
+
children: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", lineHeight: 0 }, children: /* @__PURE__ */ s(
|
|
2398
|
+
Tt,
|
|
2399
|
+
{
|
|
2400
|
+
checked: i,
|
|
2401
|
+
onToggle: () => ln(o),
|
|
2402
|
+
ariaLabel: "Select row"
|
|
2403
|
+
}
|
|
2404
|
+
) })
|
|
2405
|
+
}
|
|
2406
|
+
),
|
|
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(
|
|
2410
|
+
"td",
|
|
2411
|
+
{
|
|
2412
|
+
style: {
|
|
2413
|
+
padding: "10px 14px",
|
|
2414
|
+
color: "rgba(30, 33, 37, 0.78)",
|
|
2415
|
+
fontSize: "13px",
|
|
2416
|
+
borderRight: "1px solid #e6e6e6",
|
|
2417
|
+
boxSizing: "border-box",
|
|
2418
|
+
width: c,
|
|
2419
|
+
fontFamily: "var(--font-sans)",
|
|
2420
|
+
...Pe && { maxWidth: c || "200px" }
|
|
2421
|
+
},
|
|
2422
|
+
children: Ie
|
|
2423
|
+
},
|
|
2424
|
+
u
|
|
2425
|
+
);
|
|
2426
|
+
})
|
|
2427
|
+
]
|
|
2265
2428
|
},
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
"td",
|
|
2270
|
-
{
|
|
2271
|
-
style: {
|
|
2272
|
-
padding: "10px 14px",
|
|
2273
|
-
color: "rgba(30, 33, 37, 0.78)",
|
|
2274
|
-
fontSize: "13px",
|
|
2275
|
-
borderRight: "1px solid #e6e6e6",
|
|
2276
|
-
boxSizing: "border-box",
|
|
2277
|
-
width: o,
|
|
2278
|
-
fontFamily: "var(--font-sans)",
|
|
2279
|
-
..._ && { maxWidth: o || "200px" }
|
|
2280
|
-
},
|
|
2281
|
-
children: Ke
|
|
2282
|
-
},
|
|
2283
|
-
i
|
|
2284
|
-
);
|
|
2285
|
-
})
|
|
2286
|
-
},
|
|
2287
|
-
t
|
|
2288
|
-
)) : null })
|
|
2429
|
+
t
|
|
2430
|
+
);
|
|
2431
|
+
}) : null })
|
|
2289
2432
|
] }) })
|
|
2290
2433
|
] }),
|
|
2291
|
-
/* @__PURE__ */ s(
|
|
2292
|
-
/* @__PURE__ */ s(
|
|
2293
|
-
/* @__PURE__ */ s("span", { className: "text-sm font-semibold text-[var(--text-ink)]", children:
|
|
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 })
|
|
2294
2437
|
] }) }) : null })
|
|
2295
2438
|
]
|
|
2296
2439
|
}
|
|
2297
2440
|
) : null,
|
|
2298
2441
|
(() => {
|
|
2299
|
-
const e = !
|
|
2442
|
+
const e = !P && (ne.trim() !== "" || Object.values(X).some((o) => Ye(o))), t = se ? e ? Xe.length : w : Xe.length;
|
|
2300
2443
|
return t <= 0 ? null : /* @__PURE__ */ s(
|
|
2301
|
-
|
|
2444
|
+
Jn,
|
|
2302
2445
|
{
|
|
2303
|
-
page:
|
|
2446
|
+
page: Re,
|
|
2304
2447
|
pageSizeOptions: [5, 10, 20, 50, 100],
|
|
2305
|
-
pageSize:
|
|
2448
|
+
pageSize: ye,
|
|
2306
2449
|
totalCount: t,
|
|
2307
|
-
currentDataLength:
|
|
2308
|
-
onPageChange:
|
|
2309
|
-
onPageSizeChange: (
|
|
2310
|
-
|
|
2450
|
+
currentDataLength: $e.length,
|
|
2451
|
+
onPageChange: ze,
|
|
2452
|
+
onPageSizeChange: (o) => {
|
|
2453
|
+
Ze(o), ze(1);
|
|
2311
2454
|
},
|
|
2312
2455
|
showPageSizeSelector: !0
|
|
2313
2456
|
}
|
|
@@ -2316,7 +2459,7 @@ function rr({
|
|
|
2316
2459
|
] });
|
|
2317
2460
|
}
|
|
2318
2461
|
export {
|
|
2319
|
-
|
|
2320
|
-
|
|
2462
|
+
br as D,
|
|
2463
|
+
Yn as a
|
|
2321
2464
|
};
|
|
2322
2465
|
//# sourceMappingURL=DataTable2.es.js.map
|