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