@pstdio/ui 0.35.0 → 0.36.1
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/{MermaidComponent-DGDnQ6pb.js → MermaidComponent-Cxg7NtjX.js} +2 -2
- package/dist/{MermaidComponent-DGDnQ6pb.js.map → MermaidComponent-Cxg7NtjX.js.map} +1 -1
- package/dist/chat-ui.d.ts +3 -3
- package/dist/chat-ui.js +1 -1
- package/dist/{data-table-stats-row-DNJG8tLZ.js → data-table-stats-row-UuTinYfL.js} +2 -2
- package/dist/{data-table-stats-row-DNJG8tLZ.js.map → data-table-stats-row-UuTinYfL.js.map} +1 -1
- package/dist/data-table.d.ts +32 -1
- package/dist/data-table.js +540 -406
- package/dist/data-table.js.map +1 -1
- package/dist/index.d.ts +17 -21
- package/dist/index.js +861 -907
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer.d.ts +3 -1
- package/dist/kanban-renderer.js +171 -171
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/{param-editor-IJzw1cA2.js → param-editor-I0dKQeeZ.js} +2 -2
- package/dist/{param-editor-IJzw1cA2.js.map → param-editor-I0dKQeeZ.js.map} +1 -1
- package/dist/{param-editor-field-DscIjv8s.js → param-editor-field-CBguLs_b.js} +2 -2
- package/dist/{param-editor-field-DscIjv8s.js.map → param-editor-field-CBguLs_b.js.map} +1 -1
- package/dist/param-editor.js +2 -2
- package/dist/{rich-text-DtQpHBlX.js → rich-text-BgDvOEGH.js} +657 -654
- package/dist/rich-text-BgDvOEGH.js.map +1 -0
- package/dist/rich-text.js +1 -1
- package/dist/{theme-kSkOHzbV.js → theme-0cbWICbg.js} +247 -163
- package/dist/theme-0cbWICbg.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/{workspace-badge-CkJ_jTQw.d.ts → workspace-badge-Brm3Xr3m.d.ts} +1 -1
- package/dist/{workspace-badge-9g78pXHS.js → workspace-badge-DrvH8WKV.js} +38 -42
- package/dist/workspace-badge-DrvH8WKV.js.map +1 -0
- package/package.json +2 -2
- package/dist/rich-text-DtQpHBlX.js.map +0 -1
- package/dist/theme-kSkOHzbV.js.map +0 -1
- package/dist/workspace-badge-9g78pXHS.js.map +0 -1
package/dist/data-table.js
CHANGED
|
@@ -1,107 +1,224 @@
|
|
|
1
1
|
import { a as e, n as t } from "./prism-pSHJejZx.js";
|
|
2
2
|
import { n, t as r } from "./scroll-area-Cr1lNXAr.js";
|
|
3
3
|
import { i, s as a, t as o } from "./list-row-De9R2zKU.js";
|
|
4
|
-
import { A as s, C as c, D as l, E as u, F as d, I as f,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
4
|
+
import { A as s, C as c, D as l, E as u, F as d, I as f, M as p, N as m, O as h, P as g, R as _, S as v, T as y, Y as b, b as x, g as S, h as C, j as w, k as T, m as E, w as D, x as O, y as ee, z as k } from "./rich-text-BgDvOEGH.js";
|
|
5
|
+
import { t as A } from "./diff-bubble-DZsarmSG.js";
|
|
6
|
+
import { n as j } from "./param-editor-I0dKQeeZ.js";
|
|
7
|
+
import { Badge as M, Box as te, Button as N, Flex as P, HStack as F, Icon as I, IconButton as ne, Image as L, Menu as R, Popover as z, Portal as B, Skeleton as V, Stack as re, Table as H, Text as U, chakra as W } from "@chakra-ui/react";
|
|
8
|
+
import { c as G } from "react/compiler-runtime";
|
|
9
|
+
import { jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
10
|
+
import { Fragment as ie, Suspense as ae, cloneElement as oe, isValidElement as J, lazy as se, useEffect as ce, useRef as le, useState as Y } from "react";
|
|
11
|
+
import { ArrowDownAZ as ue, ArrowUpAZ as de, Braces as fe, Check as pe, ChevronDown as me, ChevronRight as X, CircleHelp as he, GripVertical as ge, Minus as Z, MoreVertical as _e, Settings2 as ve } from "lucide-react";
|
|
12
|
+
import { DndContext as ye, PointerSensor as be, closestCenter as xe, useSensor as Se, useSensors as Ce } from "@dnd-kit/core";
|
|
13
|
+
import { SortableContext as Q, useSortable as we, verticalListSortingStrategy as Te } from "@dnd-kit/sortable";
|
|
14
|
+
import { CSS as Ee } from "@dnd-kit/utilities";
|
|
15
|
+
import { flexRender as De, getCoreRowModel as Oe, getPaginationRowModel as ke, getSortedRowModel as Ae, useReactTable as je } from "@tanstack/react-table";
|
|
15
16
|
//#region src/components/data-table/categorical-color-cell.tsx
|
|
16
|
-
var
|
|
17
|
+
var Me = (e, t) => t.find((t) => Object.is(t.value, e))?.color ?? null, Ne = (e) => {
|
|
17
18
|
let { children: t } = e;
|
|
18
19
|
return t;
|
|
19
|
-
},
|
|
20
|
-
let t = e.trim(), n = t.startsWith("#") ? t.slice(1) : t, r = n.length === 3 ?
|
|
20
|
+
}, Pe = "#111827", Fe = "#ffffff", Ie = "#000000", Le = 4.5, Re = (e) => e.split("").map((e) => e + e).join(""), $ = (e) => {
|
|
21
|
+
let t = e.trim(), n = t.startsWith("#") ? t.slice(1) : t, r = n.length === 3 ? Re(n) : n;
|
|
21
22
|
return /^[\da-f]{6}$/i.test(r) ? {
|
|
22
23
|
r: Number.parseInt(r.slice(0, 2), 16),
|
|
23
24
|
g: Number.parseInt(r.slice(2, 4), 16),
|
|
24
25
|
b: Number.parseInt(r.slice(4, 6), 16)
|
|
25
26
|
} : null;
|
|
26
|
-
},
|
|
27
|
+
}, ze = (e) => {
|
|
27
28
|
let t = e / 255;
|
|
28
29
|
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
29
|
-
},
|
|
30
|
-
let n =
|
|
30
|
+
}, Be = (e) => .2126 * ze(e.r) + .7152 * ze(e.g) + .0722 * ze(e.b), Ve = (e, t) => {
|
|
31
|
+
let n = Be(e), r = Be(t), i = Math.max(n, r), a = Math.min(n, r);
|
|
31
32
|
return (i + .05) / (a + .05);
|
|
32
|
-
},
|
|
33
|
+
}, He = (e) => {
|
|
33
34
|
let t = (e) => Math.round(e).toString(16).padStart(2, "0");
|
|
34
35
|
return `#${t(e.r)}${t(e.g)}${t(e.b)}`;
|
|
35
|
-
},
|
|
36
|
+
}, Ue = (e, t, n) => ({
|
|
36
37
|
r: e.r * (1 - n) + t.r * n,
|
|
37
38
|
g: e.g * (1 - n) + t.g * n,
|
|
38
39
|
b: e.b * (1 - n) + t.b * n
|
|
39
|
-
}),
|
|
40
|
+
}), We = (e, t) => {
|
|
40
41
|
for (let n = 1; n <= 50; n += 1) {
|
|
41
|
-
let r =
|
|
42
|
-
if (
|
|
43
|
-
color:
|
|
42
|
+
let r = Ue(e, t, n / 50);
|
|
43
|
+
if (Ve(r, e) >= Le) return {
|
|
44
|
+
color: He(r),
|
|
44
45
|
step: n
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
48
|
return {
|
|
48
|
-
color:
|
|
49
|
+
color: He(t),
|
|
49
50
|
step: 50
|
|
50
51
|
};
|
|
51
|
-
},
|
|
52
|
-
let t =
|
|
53
|
-
if (!t) return
|
|
54
|
-
let n =
|
|
52
|
+
}, Ge = (e) => {
|
|
53
|
+
let t = $(e);
|
|
54
|
+
if (!t) return Pe;
|
|
55
|
+
let n = $(Ie), r = $(Fe), i = We(t, n), a = We(t, r);
|
|
55
56
|
return i.step <= a.step ? i.color : a.color;
|
|
56
|
-
},
|
|
57
|
-
let r =
|
|
58
|
-
return !r || !i ? null :
|
|
59
|
-
},
|
|
60
|
-
let t = e.foreground?.light ??
|
|
57
|
+
}, Ke = (e, t, n) => {
|
|
58
|
+
let r = $(e), i = $(t);
|
|
59
|
+
return !r || !i ? null : He(Ue(r, i, 1 - n));
|
|
60
|
+
}, qe = (e) => {
|
|
61
|
+
let t = e.foreground?.light ?? Ge(e.light), n = e.foreground?.dark ?? Ge(e.dark);
|
|
61
62
|
return {
|
|
62
63
|
backgroundColor: `light-dark(${e.light}, ${e.dark})`,
|
|
63
64
|
color: `light-dark(${t}, ${n})`
|
|
64
65
|
};
|
|
65
|
-
},
|
|
66
|
+
}, Je = (e) => Math.round(e * 100) / 100, Ye = (e, t, n) => Ke(e, t, n) || `color-mix(in srgb, ${e} ${Je(n * 100)}%, ${t})`, Xe = (e, t, n) => {
|
|
66
67
|
let r = e.foreground && t.foreground ? {
|
|
67
|
-
light:
|
|
68
|
-
dark:
|
|
68
|
+
light: Ye(e.foreground.light, t.foreground.light, n),
|
|
69
|
+
dark: Ye(e.foreground.dark, t.foreground.dark, n)
|
|
69
70
|
} : void 0;
|
|
70
71
|
return {
|
|
71
|
-
light:
|
|
72
|
-
dark:
|
|
72
|
+
light: Ye(e.light, t.light, n),
|
|
73
|
+
dark: Ye(e.dark, t.dark, n),
|
|
73
74
|
...r ? { foreground: r } : {}
|
|
74
75
|
};
|
|
75
|
-
},
|
|
76
|
+
}, Ze = (e, t) => {
|
|
76
77
|
if (typeof e != "number" || !Number.isFinite(e) || t.length < 2) return null;
|
|
77
78
|
let n = t[0], r = t[t.length - 1];
|
|
78
79
|
if (r.value - n.value <= 0) return null;
|
|
79
80
|
if (e <= n.value) return n.color;
|
|
80
81
|
if (e >= r.value) return r.color;
|
|
81
82
|
let i = t.findIndex((t) => e <= t.value), a = t[i - 1], o = t[i], s = 1 - (e - a.value) / (o.value - a.value);
|
|
82
|
-
return
|
|
83
|
-
},
|
|
84
|
-
let t =
|
|
85
|
-
return t[0] === n ? r = t[1] : (r = /* @__PURE__ */
|
|
83
|
+
return Xe(a.color, o.color, s);
|
|
84
|
+
}, Qe = (e) => {
|
|
85
|
+
let t = G(2), { value: n } = e, r;
|
|
86
|
+
return t[0] === n ? r = t[1] : (r = /* @__PURE__ */ K(U, {
|
|
86
87
|
textStyle: "paragraph/S/medium",
|
|
87
88
|
fontVariantNumeric: "tabular-nums",
|
|
88
89
|
truncate: !0,
|
|
89
90
|
children: n
|
|
90
91
|
}), t[0] = n, t[1] = r), r;
|
|
91
|
-
},
|
|
92
|
+
}, $e = (e) => {
|
|
93
|
+
let t = G(6), { value: n, categories: r } = e, i;
|
|
94
|
+
t[0] !== r || t[1] !== n ? (i = r?.find((e) => e.value === n)?.palette ?? "gray", t[0] = r, t[1] = n, t[2] = i) : i = t[2];
|
|
95
|
+
let a = i, o = String(n), s;
|
|
96
|
+
return t[3] !== a || t[4] !== o ? (s = /* @__PURE__ */ K(M, {
|
|
97
|
+
variant: "subtle",
|
|
98
|
+
size: "sm",
|
|
99
|
+
colorPalette: a,
|
|
100
|
+
maxW: "full",
|
|
101
|
+
truncate: !0,
|
|
102
|
+
children: o
|
|
103
|
+
}), t[3] = a, t[4] = o, t[5] = s) : s = t[5], s;
|
|
104
|
+
}, et = [
|
|
105
|
+
{
|
|
106
|
+
unit: "year",
|
|
107
|
+
seconds: 31536e3
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
unit: "month",
|
|
111
|
+
seconds: 2592e3
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
unit: "day",
|
|
115
|
+
seconds: 86400
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
unit: "hour",
|
|
119
|
+
seconds: 3600
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
unit: "minute",
|
|
123
|
+
seconds: 60
|
|
124
|
+
}
|
|
125
|
+
], tt = (e) => {
|
|
126
|
+
if (typeof e != "string") return null;
|
|
127
|
+
let t = Date.parse(e);
|
|
128
|
+
return Number.isNaN(t) ? null : new Date(t);
|
|
129
|
+
}, nt = (e, t = /* @__PURE__ */ new Date(), n) => {
|
|
130
|
+
let r = tt(e);
|
|
131
|
+
if (!r) return null;
|
|
132
|
+
let i = new Intl.RelativeTimeFormat(n, { numeric: "auto" }), a = (r.getTime() - t.getTime()) / 1e3, o = et.find((e) => Math.abs(a) >= e.seconds);
|
|
133
|
+
return o ? i.format(Math.round(a / o.seconds), o.unit) : i.format(0, "second");
|
|
134
|
+
}, rt = (e) => {
|
|
135
|
+
let t = G(12), { value: r } = e, [i, a] = Y(it), o, s;
|
|
136
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = () => {
|
|
137
|
+
let e = setInterval(() => a(/* @__PURE__ */ new Date()), 6e4);
|
|
138
|
+
return () => clearInterval(e);
|
|
139
|
+
}, s = [], t[0] = o, t[1] = s) : (o = t[0], s = t[1]), ce(o, s);
|
|
140
|
+
let c;
|
|
141
|
+
t[2] !== i || t[3] !== r ? (c = nt(r, i), t[2] = i, t[3] = r, t[4] = c) : c = t[4];
|
|
142
|
+
let l = c, u;
|
|
143
|
+
t[5] === r ? u = t[6] : (u = new Date(r).toLocaleString(void 0, {
|
|
144
|
+
dateStyle: "medium",
|
|
145
|
+
timeStyle: "short"
|
|
146
|
+
}), t[5] = r, t[6] = u);
|
|
147
|
+
let d = u, f;
|
|
148
|
+
t[7] === l ? f = t[8] : (f = /* @__PURE__ */ K(U, {
|
|
149
|
+
as: "span",
|
|
150
|
+
tabIndex: 0,
|
|
151
|
+
textStyle: "paragraph/S/regular",
|
|
152
|
+
color: "fg.muted",
|
|
153
|
+
whiteSpace: "nowrap",
|
|
154
|
+
children: l
|
|
155
|
+
}), t[7] = l, t[8] = f);
|
|
156
|
+
let p;
|
|
157
|
+
return t[9] !== d || t[10] !== f ? (p = /* @__PURE__ */ K(n, {
|
|
158
|
+
content: d,
|
|
159
|
+
openDelay: 300,
|
|
160
|
+
children: f
|
|
161
|
+
}), t[9] = d, t[10] = f, t[11] = p) : p = t[11], p;
|
|
162
|
+
};
|
|
163
|
+
function it() {
|
|
164
|
+
return /* @__PURE__ */ new Date();
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/components/data-table/data-table-diff-cell.tsx
|
|
168
|
+
var at = (e) => {
|
|
169
|
+
let t = G(3), { value: n } = e, r;
|
|
170
|
+
return t[0] !== n.additions || t[1] !== n.deletions ? (r = /* @__PURE__ */ K(A, {
|
|
171
|
+
additions: n.additions,
|
|
172
|
+
deletions: n.deletions,
|
|
173
|
+
variant: "ghost",
|
|
174
|
+
size: "small"
|
|
175
|
+
}), t[0] = n.additions, t[1] = n.deletions, t[2] = r) : r = t[2], r;
|
|
176
|
+
}, ot = (e) => {
|
|
177
|
+
let t = G(14), { value: r } = e, i;
|
|
178
|
+
t[0] === r ? i = t[1] : (i = r.slice(0, -5), t[0] = r, t[1] = i);
|
|
179
|
+
let a = i, o;
|
|
180
|
+
t[2] === r ? o = t[3] : (o = r.slice(-5), t[2] = r, t[3] = o);
|
|
181
|
+
let s = o, c;
|
|
182
|
+
t[4] === a ? c = t[5] : (c = /* @__PURE__ */ K(W.span, {
|
|
183
|
+
overflow: "hidden",
|
|
184
|
+
textOverflow: "ellipsis",
|
|
185
|
+
children: a
|
|
186
|
+
}), t[4] = a, t[5] = c);
|
|
187
|
+
let l;
|
|
188
|
+
t[6] === s ? l = t[7] : (l = /* @__PURE__ */ K(W.span, {
|
|
189
|
+
flexShrink: 0,
|
|
190
|
+
children: s
|
|
191
|
+
}), t[6] = s, t[7] = l);
|
|
192
|
+
let u;
|
|
193
|
+
t[8] !== c || t[9] !== l ? (u = /* @__PURE__ */ q(W.span, {
|
|
194
|
+
display: "inline-flex",
|
|
195
|
+
minW: "0",
|
|
196
|
+
maxW: "full",
|
|
197
|
+
tabIndex: 0,
|
|
198
|
+
textStyle: "paragraph/S/regular",
|
|
199
|
+
whiteSpace: "nowrap",
|
|
200
|
+
children: [c, l]
|
|
201
|
+
}), t[8] = c, t[9] = l, t[10] = u) : u = t[10];
|
|
202
|
+
let d;
|
|
203
|
+
return t[11] !== u || t[12] !== r ? (d = /* @__PURE__ */ K(n, {
|
|
204
|
+
content: r,
|
|
205
|
+
openDelay: 300,
|
|
206
|
+
children: u
|
|
207
|
+
}), t[11] = u, t[12] = r, t[13] = d) : d = t[13], d;
|
|
208
|
+
}, st = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, ct = /(^|\s)(avatar|image|logo|photo|picture|thumbnail)(\s|$)/i, lt = (e) => {
|
|
92
209
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
|
|
93
210
|
return t ? `${t[0]?.toUpperCase()}${t.slice(1)}` : "Details";
|
|
94
|
-
},
|
|
211
|
+
}, ut = (e) => e.map((e) => /^\d+$/.test(e) ? e : lt(e)).join(" / "), dt = (e) => e.every((e) => typeof e != "object" || !e), ft = (e, t, n) => {
|
|
95
212
|
if (Array.isArray(e)) {
|
|
96
|
-
if (e.length === 0 ||
|
|
213
|
+
if (e.length === 0 || dt(e)) {
|
|
97
214
|
n.push({
|
|
98
|
-
label:
|
|
215
|
+
label: ut(t),
|
|
99
216
|
value: e
|
|
100
217
|
});
|
|
101
218
|
return;
|
|
102
219
|
}
|
|
103
220
|
e.forEach((e, r) => {
|
|
104
|
-
|
|
221
|
+
ft(e, [...t, String(r + 1)], n);
|
|
105
222
|
});
|
|
106
223
|
return;
|
|
107
224
|
}
|
|
@@ -109,91 +226,91 @@ var De = (e, t) => t.find((t) => Object.is(t.value, e))?.color ?? null, Oe = (e)
|
|
|
109
226
|
let r = Object.entries(e);
|
|
110
227
|
if (r.length === 0) {
|
|
111
228
|
n.push({
|
|
112
|
-
label:
|
|
229
|
+
label: ut(t),
|
|
113
230
|
value: null
|
|
114
231
|
});
|
|
115
232
|
return;
|
|
116
233
|
}
|
|
117
234
|
r.forEach(([e, r]) => {
|
|
118
|
-
|
|
235
|
+
ft(r, [...t, e], n);
|
|
119
236
|
});
|
|
120
237
|
return;
|
|
121
238
|
}
|
|
122
239
|
n.push({
|
|
123
|
-
label:
|
|
240
|
+
label: ut(t),
|
|
124
241
|
value: e
|
|
125
242
|
});
|
|
126
|
-
},
|
|
243
|
+
}, pt = (e) => {
|
|
127
244
|
if (typeof e != "string") return e;
|
|
128
245
|
try {
|
|
129
246
|
return JSON.parse(e);
|
|
130
247
|
} catch {
|
|
131
248
|
return e;
|
|
132
249
|
}
|
|
133
|
-
},
|
|
250
|
+
}, mt = (e) => {
|
|
134
251
|
let t = [];
|
|
135
|
-
return
|
|
252
|
+
return ft(pt(e), [], t), t.map((e) => ({
|
|
136
253
|
...e,
|
|
137
254
|
label: e.label || "Value"
|
|
138
255
|
}));
|
|
139
|
-
},
|
|
256
|
+
}, ht = (e, t) => {
|
|
140
257
|
if (typeof e != "string") return !1;
|
|
141
258
|
if (e.startsWith("data:image/")) return !0;
|
|
142
259
|
try {
|
|
143
260
|
let n = new URL(e);
|
|
144
|
-
return n.protocol !== "http:" && n.protocol !== "https:" ? !1 :
|
|
261
|
+
return n.protocol !== "http:" && n.protocol !== "https:" ? !1 : st.test(n.pathname) || ct.test(t);
|
|
145
262
|
} catch {
|
|
146
263
|
return !1;
|
|
147
264
|
}
|
|
148
|
-
},
|
|
149
|
-
let t =
|
|
265
|
+
}, gt = (e, t) => Array.isArray(e) && e.length > 0 && e.every((e) => ht(e, t)), _t = (e) => e == null || e === "" ? "Not provided" : typeof e == "boolean" ? e ? "Yes" : "No" : String(e), vt = (e) => Array.isArray(e) ? e.length === 0 ? "None" : e.map(_t).join(", ") : _t(e), yt = (e) => {
|
|
266
|
+
let t = pt(e);
|
|
150
267
|
if (Array.isArray(t) && t.length === 0 || typeof t == "object" && t && Object.keys(t).length === 0) return "No details";
|
|
151
|
-
let n =
|
|
268
|
+
let n = mt(e).filter((e) => !ht(e.value, e.label) && !gt(e.value, e.label));
|
|
152
269
|
if (n.length === 0) return "No details";
|
|
153
|
-
let r = n.slice(0, 2).map((e) =>
|
|
270
|
+
let r = n.slice(0, 2).map((e) => vt(e.value)), i = n.length - r.length;
|
|
154
271
|
return [...r, i > 0 ? `${i} more` : null].filter(Boolean).join(" · ");
|
|
155
|
-
},
|
|
272
|
+
}, bt = (e) => {
|
|
156
273
|
let { label: t, value: n } = e;
|
|
157
|
-
return
|
|
274
|
+
return ht(n, t) ? {
|
|
158
275
|
type: "image",
|
|
159
276
|
src: String(n),
|
|
160
277
|
alt: `${t} preview`
|
|
161
|
-
} : Array.isArray(n) &&
|
|
278
|
+
} : Array.isArray(n) && gt(n, t) ? {
|
|
162
279
|
type: "image-gallery",
|
|
163
280
|
images: n.map((e, n) => ({
|
|
164
281
|
src: String(e),
|
|
165
282
|
alt: `${t} ${n + 1} preview`
|
|
166
283
|
}))
|
|
167
284
|
} : Array.isArray(n) ? n : n === void 0 ? null : n;
|
|
168
|
-
},
|
|
285
|
+
}, xt = (e) => mt(e).map((e, t) => ({
|
|
169
286
|
id: `friendly-json-${t}`,
|
|
170
287
|
name: e.label,
|
|
171
288
|
type: "readOnly",
|
|
172
|
-
value:
|
|
173
|
-
})),
|
|
174
|
-
let t =
|
|
175
|
-
t[0] === n ? r = t[1] : (r =
|
|
289
|
+
value: bt(e)
|
|
290
|
+
})), St = (e) => {
|
|
291
|
+
let t = G(4), { value: n } = e, r;
|
|
292
|
+
t[0] === n ? r = t[1] : (r = xt(n), t[0] = n, t[1] = r);
|
|
176
293
|
let i;
|
|
177
|
-
return t[2] === r ? i = t[3] : (i = /* @__PURE__ */
|
|
294
|
+
return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ K(j, {
|
|
178
295
|
params: r,
|
|
179
296
|
readOnly: !0,
|
|
180
297
|
fullWidth: !0
|
|
181
298
|
}), t[2] = r, t[3] = i), i;
|
|
182
|
-
},
|
|
183
|
-
let t =
|
|
299
|
+
}, Ct = (e) => e.stopPropagation(), wt = (e) => {
|
|
300
|
+
let t = G(49), { columnLabel: n, value: i } = e, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b;
|
|
184
301
|
if (t[0] !== n || t[1] !== i) {
|
|
185
|
-
let e =
|
|
186
|
-
t[18] === i ? r = t[19] : (r =
|
|
302
|
+
let e = mt(i).flatMap(Tt).slice(0, 2), r;
|
|
303
|
+
t[18] === i ? r = t[19] : (r = yt(i), t[18] = i, t[19] = r), c = r, s = z.Root, t[20] === Symbol.for("react.memo_cache_sentinel") ? (f = {
|
|
187
304
|
placement: "bottom-start",
|
|
188
305
|
offset: { mainAxis: 6 }
|
|
189
|
-
}, t[20] = f) : f = t[20], o =
|
|
306
|
+
}, t[20] = f) : f = t[20], o = z.Trigger, d = !0, a = N, l = `View ${n} details`, u = "ghost", p = "xs", m = "full", h = "0", g = "28px", _ = "2xs", v = "flex-start", y = Ct, b = e.length > 0 ? /* @__PURE__ */ K(F, {
|
|
190
307
|
gap: "-1",
|
|
191
308
|
flexShrink: "0",
|
|
192
|
-
children: e.map(
|
|
193
|
-
}) : /* @__PURE__ */
|
|
309
|
+
children: e.map(Et)
|
|
310
|
+
}) : /* @__PURE__ */ K(fe, { size: 14 }), t[0] = n, t[1] = i, t[2] = a, t[3] = o, t[4] = s, t[5] = c, t[6] = l, t[7] = u, t[8] = d, t[9] = f, t[10] = p, t[11] = m, t[12] = h, t[13] = g, t[14] = _, t[15] = v, t[16] = y, t[17] = b;
|
|
194
311
|
} else a = t[2], o = t[3], s = t[4], c = t[5], l = t[6], u = t[7], d = t[8], f = t[9], p = t[10], m = t[11], h = t[12], g = t[13], _ = t[14], v = t[15], y = t[16], b = t[17];
|
|
195
312
|
let x;
|
|
196
|
-
t[21] === c ? x = t[22] : (x = /* @__PURE__ */
|
|
313
|
+
t[21] === c ? x = t[22] : (x = /* @__PURE__ */ K(U, {
|
|
197
314
|
flex: "1",
|
|
198
315
|
minWidth: "0",
|
|
199
316
|
textAlign: "left",
|
|
@@ -202,9 +319,9 @@ var De = (e, t) => t.find((t) => Object.is(t.value, e))?.color ?? null, Oe = (e)
|
|
|
202
319
|
children: c
|
|
203
320
|
}), t[21] = c, t[22] = x);
|
|
204
321
|
let S;
|
|
205
|
-
t[23] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */
|
|
322
|
+
t[23] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ K(X, { size: 12 }), t[23] = S) : S = t[23];
|
|
206
323
|
let C;
|
|
207
|
-
t[24] !== a || t[25] !== l || t[26] !== u || t[27] !== x || t[28] !== p || t[29] !== m || t[30] !== h || t[31] !== g || t[32] !== _ || t[33] !== v || t[34] !== y || t[35] !== b ? (C = /* @__PURE__ */
|
|
324
|
+
t[24] !== a || t[25] !== l || t[26] !== u || t[27] !== x || t[28] !== p || t[29] !== m || t[30] !== h || t[31] !== g || t[32] !== _ || t[33] !== v || t[34] !== y || t[35] !== b ? (C = /* @__PURE__ */ q(a, {
|
|
208
325
|
"aria-label": l,
|
|
209
326
|
variant: u,
|
|
210
327
|
size: p,
|
|
@@ -221,38 +338,38 @@ var De = (e, t) => t.find((t) => Object.is(t.value, e))?.color ?? null, Oe = (e)
|
|
|
221
338
|
]
|
|
222
339
|
}), t[24] = a, t[25] = l, t[26] = u, t[27] = x, t[28] = p, t[29] = m, t[30] = h, t[31] = g, t[32] = _, t[33] = v, t[34] = y, t[35] = b, t[36] = C) : C = t[36];
|
|
223
340
|
let w;
|
|
224
|
-
t[37] !== o || t[38] !== d || t[39] !== C ? (w = /* @__PURE__ */
|
|
341
|
+
t[37] !== o || t[38] !== d || t[39] !== C ? (w = /* @__PURE__ */ K(o, {
|
|
225
342
|
asChild: d,
|
|
226
343
|
children: C
|
|
227
344
|
}), t[37] = o, t[38] = d, t[39] = C, t[40] = w) : w = t[40];
|
|
228
345
|
let T;
|
|
229
346
|
t[41] === Symbol.for("react.memo_cache_sentinel") ? (T = { overscrollBehavior: "contain" }, t[41] = T) : T = t[41];
|
|
230
347
|
let E;
|
|
231
|
-
t[42] === i ? E = t[43] : (E = /* @__PURE__ */
|
|
348
|
+
t[42] === i ? E = t[43] : (E = /* @__PURE__ */ K(B, { children: /* @__PURE__ */ K(z.Positioner, { children: /* @__PURE__ */ K(z.Content, {
|
|
232
349
|
width: "min(380px, calc(100vw - 32px))",
|
|
233
350
|
padding: "0",
|
|
234
351
|
background: "bg",
|
|
235
352
|
overflow: "hidden",
|
|
236
|
-
children: /* @__PURE__ */
|
|
353
|
+
children: /* @__PURE__ */ K(r, {
|
|
237
354
|
maxH: "360px",
|
|
238
355
|
viewportProps: T,
|
|
239
|
-
children: /* @__PURE__ */
|
|
356
|
+
children: /* @__PURE__ */ K(St, { value: i })
|
|
240
357
|
})
|
|
241
358
|
}) }) }), t[42] = i, t[43] = E);
|
|
242
359
|
let D;
|
|
243
|
-
return t[44] !== s || t[45] !== f || t[46] !== w || t[47] !== E ? (D = /* @__PURE__ */
|
|
360
|
+
return t[44] !== s || t[45] !== f || t[46] !== w || t[47] !== E ? (D = /* @__PURE__ */ q(s, {
|
|
244
361
|
positioning: f,
|
|
245
362
|
children: [w, E]
|
|
246
363
|
}), t[44] = s, t[45] = f, t[46] = w, t[47] = E, t[48] = D) : D = t[48], D;
|
|
247
364
|
};
|
|
248
|
-
function
|
|
249
|
-
return
|
|
365
|
+
function Tt(e) {
|
|
366
|
+
return ht(e.value, e.label) ? [e] : !Array.isArray(e.value) || !gt(e.value, e.label) ? [] : e.value.map((t, n) => ({
|
|
250
367
|
label: `${e.label} ${n + 1}`,
|
|
251
368
|
value: t
|
|
252
369
|
}));
|
|
253
370
|
}
|
|
254
|
-
function
|
|
255
|
-
return /* @__PURE__ */
|
|
371
|
+
function Et(e) {
|
|
372
|
+
return /* @__PURE__ */ K(L, {
|
|
256
373
|
src: String(e.value),
|
|
257
374
|
alt: `${e.label} preview`,
|
|
258
375
|
boxSize: "22px",
|
|
@@ -264,16 +381,16 @@ function mt(e) {
|
|
|
264
381
|
}
|
|
265
382
|
//#endregion
|
|
266
383
|
//#region src/components/data-table/data-table-cell-renderers.tsx
|
|
267
|
-
var
|
|
384
|
+
var Dt = (e) => J(e) ? oe(e, { style: {
|
|
268
385
|
...e.props.style,
|
|
269
386
|
flexWrap: "nowrap",
|
|
270
387
|
minWidth: 0,
|
|
271
388
|
whiteSpace: "nowrap"
|
|
272
|
-
} }) : e,
|
|
389
|
+
} }) : e, Ot = (e) => {
|
|
273
390
|
e.stopPropagation();
|
|
274
|
-
},
|
|
275
|
-
let n =
|
|
276
|
-
n[0] === s ? c = n[1] : (c = /* @__PURE__ */
|
|
391
|
+
}, kt = (t) => {
|
|
392
|
+
let n = G(8), { table: r } = t, i = r.getIsAllRowsSelected(), a = !i && r.getIsSomeRowsSelected(), o = i ? !0 : a ? "indeterminate" : !1, s = a ? Z : pe, c;
|
|
393
|
+
n[0] === s ? c = n[1] : (c = /* @__PURE__ */ K(I, {
|
|
277
394
|
as: s,
|
|
278
395
|
boxSize: "12px",
|
|
279
396
|
strokeWidth: "3"
|
|
@@ -281,67 +398,67 @@ var ht = (e) => Y(e) ? J(e, { style: {
|
|
|
281
398
|
let l;
|
|
282
399
|
n[2] === r ? l = n[3] : (l = (e) => r.toggleAllRowsSelected(e.checked === !0), n[2] = r, n[3] = l);
|
|
283
400
|
let u;
|
|
284
|
-
return n[4] !== o || n[5] !== c || n[6] !== l ? (u = /* @__PURE__ */
|
|
401
|
+
return n[4] !== o || n[5] !== c || n[6] !== l ? (u = /* @__PURE__ */ K(e, {
|
|
285
402
|
checked: o,
|
|
286
403
|
"aria-label": "Select all",
|
|
287
404
|
icon: c,
|
|
288
|
-
onClick:
|
|
405
|
+
onClick: Ot,
|
|
289
406
|
onCheckedChange: l
|
|
290
407
|
}), n[4] = o, n[5] = c, n[6] = l, n[7] = u) : u = n[7], u;
|
|
291
|
-
},
|
|
292
|
-
let n =
|
|
293
|
-
n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */
|
|
294
|
-
as:
|
|
408
|
+
}, At = (t) => {
|
|
409
|
+
let n = G(6), { row: r, column: i } = t, { selectedRowIds: a } = i.columnDef.meta, o = !!a?.[r.id], s;
|
|
410
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ K(I, {
|
|
411
|
+
as: pe,
|
|
295
412
|
boxSize: "12px",
|
|
296
413
|
strokeWidth: "3"
|
|
297
414
|
}), n[0] = s) : s = n[0];
|
|
298
415
|
let c;
|
|
299
416
|
n[1] === r ? c = n[2] : (c = (e) => r.toggleSelected(e.checked === !0), n[1] = r, n[2] = c);
|
|
300
417
|
let l;
|
|
301
|
-
return n[3] !== o || n[4] !== c ? (l = /* @__PURE__ */
|
|
418
|
+
return n[3] !== o || n[4] !== c ? (l = /* @__PURE__ */ K(e, {
|
|
302
419
|
checked: o,
|
|
303
420
|
"aria-label": "Select row",
|
|
304
421
|
icon: s,
|
|
305
|
-
onClick:
|
|
422
|
+
onClick: Ot,
|
|
306
423
|
onCheckedChange: c
|
|
307
424
|
}), n[3] = o, n[4] = c, n[5] = l) : l = n[5], l;
|
|
308
|
-
},
|
|
425
|
+
}, jt = (e, t) => {
|
|
309
426
|
let n = new Set(t.map((e) => e.label));
|
|
310
427
|
return [...t, ...e.filter((e) => !n.has(e.label))];
|
|
311
|
-
},
|
|
312
|
-
let t =
|
|
428
|
+
}, Mt = (e) => {
|
|
429
|
+
let t = G(30), { row: n, column: r } = e, { rowActions: i, getRowActions: a } = r.columnDef.meta, s, c, l, u, d, f, p, m, h;
|
|
313
430
|
if (t[0] !== a || t[1] !== n || t[2] !== i) {
|
|
314
431
|
h = Symbol.for("react.early_return_sentinel");
|
|
315
432
|
bb0: {
|
|
316
|
-
let e =
|
|
433
|
+
let e = jt(i === void 0 ? [] : i, a?.(n.original) ?? []);
|
|
317
434
|
if (e.length === 0) {
|
|
318
435
|
h = null;
|
|
319
436
|
break bb0;
|
|
320
437
|
}
|
|
321
|
-
u =
|
|
438
|
+
u = R.Root, t[12] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ K(R.Trigger, {
|
|
322
439
|
asChild: !0,
|
|
323
|
-
children: /* @__PURE__ */
|
|
440
|
+
children: /* @__PURE__ */ K(ne, {
|
|
324
441
|
"aria-label": "Row actions",
|
|
325
442
|
size: "2xs",
|
|
326
443
|
variant: "ghost",
|
|
327
|
-
onClick:
|
|
328
|
-
children: /* @__PURE__ */
|
|
329
|
-
as:
|
|
444
|
+
onClick: Ot,
|
|
445
|
+
children: /* @__PURE__ */ K(I, {
|
|
446
|
+
as: me,
|
|
330
447
|
boxSize: "14px"
|
|
331
448
|
})
|
|
332
449
|
})
|
|
333
|
-
}), t[12] = m) : m = t[12], l =
|
|
450
|
+
}), t[12] = m) : m = t[12], l = B, c = R.Positioner, s = R.Content, d = "popover", f = "bg";
|
|
334
451
|
let r;
|
|
335
|
-
t[13] === n ? r = t[14] : (r = (e) => /* @__PURE__ */
|
|
452
|
+
t[13] === n ? r = t[14] : (r = (e) => /* @__PURE__ */ K(R.Item, {
|
|
336
453
|
value: e.label,
|
|
337
454
|
asChild: !0,
|
|
338
|
-
children: /* @__PURE__ */
|
|
455
|
+
children: /* @__PURE__ */ K(o, {
|
|
339
456
|
asChild: !0,
|
|
340
457
|
variant: "full-width",
|
|
341
458
|
tone: e.destructive ? "danger" : "default",
|
|
342
459
|
label: e.label,
|
|
343
460
|
icon: e.icon,
|
|
344
|
-
onClick:
|
|
461
|
+
onClick: Ot,
|
|
345
462
|
onActivate: () => e.onSelect(n.original)
|
|
346
463
|
})
|
|
347
464
|
}, e.label), t[13] = n, t[14] = r), p = e.map(r);
|
|
@@ -350,24 +467,24 @@ var ht = (e) => Y(e) ? J(e, { style: {
|
|
|
350
467
|
} else s = t[3], c = t[4], l = t[5], u = t[6], d = t[7], f = t[8], p = t[9], m = t[10], h = t[11];
|
|
351
468
|
if (h !== Symbol.for("react.early_return_sentinel")) return h;
|
|
352
469
|
let g;
|
|
353
|
-
t[15] !== s || t[16] !== d || t[17] !== f || t[18] !== p ? (g = /* @__PURE__ */
|
|
470
|
+
t[15] !== s || t[16] !== d || t[17] !== f || t[18] !== p ? (g = /* @__PURE__ */ K(s, {
|
|
354
471
|
zIndex: d,
|
|
355
472
|
bg: f,
|
|
356
473
|
children: p
|
|
357
474
|
}), t[15] = s, t[16] = d, t[17] = f, t[18] = p, t[19] = g) : g = t[19];
|
|
358
475
|
let _;
|
|
359
|
-
t[20] !== c || t[21] !== g ? (_ = /* @__PURE__ */
|
|
476
|
+
t[20] !== c || t[21] !== g ? (_ = /* @__PURE__ */ K(c, { children: g }), t[20] = c, t[21] = g, t[22] = _) : _ = t[22];
|
|
360
477
|
let v;
|
|
361
|
-
t[23] !== l || t[24] !== _ ? (v = /* @__PURE__ */
|
|
478
|
+
t[23] !== l || t[24] !== _ ? (v = /* @__PURE__ */ K(l, { children: _ }), t[23] = l, t[24] = _, t[25] = v) : v = t[25];
|
|
362
479
|
let y;
|
|
363
|
-
return t[26] !== u || t[27] !== m || t[28] !== v ? (y = /* @__PURE__ */
|
|
364
|
-
},
|
|
365
|
-
let t =
|
|
480
|
+
return t[26] !== u || t[27] !== m || t[28] !== v ? (y = /* @__PURE__ */ q(u, { children: [m, v] }), t[26] = u, t[27] = m, t[28] = v, t[29] = y) : y = t[29], y;
|
|
481
|
+
}, Nt = (e) => {
|
|
482
|
+
let t = G(15), { value: n, wrapRows: r } = e, i, a;
|
|
366
483
|
if (t[0] !== n || t[1] !== r) {
|
|
367
484
|
a = Symbol.for("react.early_return_sentinel");
|
|
368
|
-
bb0: if (i =
|
|
369
|
-
let e = r ? "visible" : "hidden", n = r ? "anywhere" : void 0, o = r ? "normal" : "nowrap", s = r ? i :
|
|
370
|
-
t[4] !== e || t[5] !== n || t[6] !== o || t[7] !== s ? (c = /* @__PURE__ */ W
|
|
485
|
+
bb0: if (i = d(n), J(i)) {
|
|
486
|
+
let e = r ? "visible" : "hidden", n = r ? "anywhere" : void 0, o = r ? "normal" : "nowrap", s = r ? i : Dt(i), c;
|
|
487
|
+
t[4] !== e || t[5] !== n || t[6] !== o || t[7] !== s ? (c = /* @__PURE__ */ K(W.span, {
|
|
371
488
|
display: "inline-flex",
|
|
372
489
|
maxWidth: "full",
|
|
373
490
|
minW: "0",
|
|
@@ -382,7 +499,7 @@ var ht = (e) => Y(e) ? J(e, { style: {
|
|
|
382
499
|
} else i = t[2], a = t[3];
|
|
383
500
|
if (a !== Symbol.for("react.early_return_sentinel")) return a;
|
|
384
501
|
let o = r ? "visible" : "hidden", s = r ? "anywhere" : void 0, c = r ? void 0 : "ellipsis", l = r ? "normal" : "nowrap", u;
|
|
385
|
-
return t[9] !== i || t[10] !== o || t[11] !== s || t[12] !== c || t[13] !== l ? (u = /* @__PURE__ */
|
|
502
|
+
return t[9] !== i || t[10] !== o || t[11] !== s || t[12] !== c || t[13] !== l ? (u = /* @__PURE__ */ K(U, {
|
|
386
503
|
maxWidth: "full",
|
|
387
504
|
overflow: o,
|
|
388
505
|
overflowWrap: s,
|
|
@@ -391,64 +508,87 @@ var ht = (e) => Y(e) ? J(e, { style: {
|
|
|
391
508
|
whiteSpace: l,
|
|
392
509
|
children: i
|
|
393
510
|
}), t[9] = i, t[10] = o, t[11] = s, t[12] = c, t[13] = l, t[14] = u) : u = t[14], u;
|
|
394
|
-
},
|
|
395
|
-
let t =
|
|
511
|
+
}, Pt = (e) => {
|
|
512
|
+
let t = G(20), { columnLabel: n, renderer: r, value: i, wrapRows: a } = e;
|
|
396
513
|
if (r?.type === "json") {
|
|
397
514
|
let e;
|
|
398
|
-
return t[0] !== n || t[1] !== i ? (e = /* @__PURE__ */
|
|
515
|
+
return t[0] !== n || t[1] !== i ? (e = /* @__PURE__ */ K(wt, {
|
|
399
516
|
columnLabel: n,
|
|
400
517
|
value: i
|
|
401
518
|
}), t[0] = n, t[1] = i, t[2] = e) : e = t[2], e;
|
|
402
519
|
}
|
|
403
|
-
if (r?.type === "
|
|
520
|
+
if (r?.type === "badge" && [
|
|
521
|
+
"string",
|
|
522
|
+
"number",
|
|
523
|
+
"boolean"
|
|
524
|
+
].includes(typeof i)) {
|
|
525
|
+
let e = i, n;
|
|
526
|
+
return t[3] !== r.categories || t[4] !== e ? (n = /* @__PURE__ */ K($e, {
|
|
527
|
+
value: e,
|
|
528
|
+
categories: r.categories
|
|
529
|
+
}), t[3] = r.categories, t[4] = e, t[5] = n) : n = t[5], n;
|
|
530
|
+
}
|
|
531
|
+
if (r?.type === "diff" && p(i)) {
|
|
404
532
|
let e;
|
|
405
|
-
return t[
|
|
533
|
+
return t[6] === i ? e = t[7] : (e = /* @__PURE__ */ K(at, { value: i }), t[6] = i, t[7] = e), e;
|
|
406
534
|
}
|
|
407
|
-
if (r?.type === "
|
|
535
|
+
if (r?.type === "path" && typeof i == "string" && !a) {
|
|
408
536
|
let e;
|
|
409
|
-
return t[
|
|
537
|
+
return t[8] === i ? e = t[9] : (e = /* @__PURE__ */ K(ot, { value: i }), t[8] = i, t[9] = e), e;
|
|
538
|
+
}
|
|
539
|
+
if (r?.type === "date" && nt(i)) {
|
|
540
|
+
let e = i, n;
|
|
541
|
+
return t[10] === e ? n = t[11] : (n = /* @__PURE__ */ K(rt, { value: e }), t[10] = e, t[11] = n), n;
|
|
542
|
+
}
|
|
543
|
+
if (r?.type === "color-scale" && Ze(i, r.stops) && typeof i == "number") {
|
|
544
|
+
let e;
|
|
545
|
+
return t[12] === i ? e = t[13] : (e = /* @__PURE__ */ K(Qe, { value: i }), t[12] = i, t[13] = e), e;
|
|
546
|
+
}
|
|
547
|
+
if (r?.type === "categorical-color" && Me(i, r.categories)) {
|
|
548
|
+
let e;
|
|
549
|
+
return t[14] !== i || t[15] !== a ? (e = /* @__PURE__ */ K(Ne, { children: /* @__PURE__ */ K(Nt, {
|
|
410
550
|
value: i,
|
|
411
551
|
wrapRows: a
|
|
412
|
-
}) }), t[
|
|
552
|
+
}) }), t[14] = i, t[15] = a, t[16] = e) : e = t[16], e;
|
|
413
553
|
}
|
|
414
554
|
let o;
|
|
415
|
-
return t[
|
|
555
|
+
return t[17] !== i || t[18] !== a ? (o = /* @__PURE__ */ K(Nt, {
|
|
416
556
|
value: i,
|
|
417
557
|
wrapRows: a
|
|
418
|
-
}), t[
|
|
419
|
-
},
|
|
420
|
-
let t =
|
|
558
|
+
}), t[17] = i, t[18] = a, t[19] = o) : o = t[19], o;
|
|
559
|
+
}, Ft = (e) => {
|
|
560
|
+
let t = G(4), { getValue: n } = e, r;
|
|
421
561
|
t[0] === n ? r = t[1] : (r = n(), t[0] = n, t[1] = r);
|
|
422
562
|
let i;
|
|
423
|
-
return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ W
|
|
563
|
+
return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ K(W.span, {
|
|
424
564
|
display: "block",
|
|
425
565
|
textStyle: "paragraph/S/regular",
|
|
426
566
|
textAlign: "center",
|
|
427
567
|
children: r
|
|
428
568
|
}), t[2] = r, t[3] = i), i;
|
|
429
|
-
},
|
|
430
|
-
let t =
|
|
569
|
+
}, It = (e) => {
|
|
570
|
+
let t = G(7), { column: n, getValue: r } = e, { renderer: i, wrapRows: a } = n.columnDef.meta, o = a !== void 0 && a, s = n.id, c;
|
|
431
571
|
t[0] === r ? c = t[1] : (c = r(), t[0] = r, t[1] = c);
|
|
432
572
|
let l;
|
|
433
|
-
return t[2] !== n.id || t[3] !== i || t[4] !== c || t[5] !== o ? (l = /* @__PURE__ */
|
|
573
|
+
return t[2] !== n.id || t[3] !== i || t[4] !== c || t[5] !== o ? (l = /* @__PURE__ */ K(Pt, {
|
|
434
574
|
columnLabel: s,
|
|
435
575
|
renderer: i,
|
|
436
576
|
value: c,
|
|
437
577
|
wrapRows: o
|
|
438
578
|
}), t[2] = n.id, t[3] = i, t[4] = c, t[5] = o, t[6] = l) : l = t[6], l;
|
|
439
|
-
},
|
|
440
|
-
let t =
|
|
441
|
-
t[0] === i ? s = t[1] : (s = /* @__PURE__ */ W
|
|
579
|
+
}, Lt = (e) => {
|
|
580
|
+
let t = G(9), { column: r } = e, { headerLabel: i, headerIcon: a, columnDescription: o } = r.columnDef.meta, s;
|
|
581
|
+
t[0] === i ? s = t[1] : (s = /* @__PURE__ */ K(W.span, {
|
|
442
582
|
overflow: "hidden",
|
|
443
583
|
textOverflow: "ellipsis",
|
|
444
584
|
whiteSpace: "nowrap",
|
|
445
585
|
children: i
|
|
446
586
|
}), t[0] = i, t[1] = s);
|
|
447
587
|
let c;
|
|
448
|
-
t[2] !== o || t[3] !== i ? (c = o ? /* @__PURE__ */
|
|
588
|
+
t[2] !== o || t[3] !== i ? (c = o ? /* @__PURE__ */ K(n, {
|
|
449
589
|
content: o,
|
|
450
|
-
children: /* @__PURE__ */
|
|
451
|
-
as:
|
|
590
|
+
children: /* @__PURE__ */ K(I, {
|
|
591
|
+
as: he,
|
|
452
592
|
"aria-label": `About ${i}`,
|
|
453
593
|
boxSize: "12px",
|
|
454
594
|
color: "fg.muted",
|
|
@@ -459,7 +599,7 @@ var ht = (e) => Y(e) ? J(e, { style: {
|
|
|
459
599
|
})
|
|
460
600
|
}) : null, t[2] = o, t[3] = i, t[4] = c) : c = t[4];
|
|
461
601
|
let l;
|
|
462
|
-
return t[5] !== a || t[6] !== s || t[7] !== c ? (l = /* @__PURE__ */
|
|
602
|
+
return t[5] !== a || t[6] !== s || t[7] !== c ? (l = /* @__PURE__ */ q(W.span, {
|
|
463
603
|
display: "inline-flex",
|
|
464
604
|
alignItems: "center",
|
|
465
605
|
gap: "4px",
|
|
@@ -472,51 +612,51 @@ var ht = (e) => Y(e) ? J(e, { style: {
|
|
|
472
612
|
c
|
|
473
613
|
]
|
|
474
614
|
}), t[5] = a, t[6] = s, t[7] = c, t[8] = l) : l = t[8], l;
|
|
475
|
-
},
|
|
615
|
+
}, Rt = (e, t) => e === t ? 0 : e == null ? 1 : t == null ? -1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t)), zt = (e, t) => {
|
|
476
616
|
if (t?.type === "color-scale") {
|
|
477
|
-
let n =
|
|
478
|
-
if (n && typeof e == "number") return
|
|
617
|
+
let n = Ze(e, t.stops);
|
|
618
|
+
if (n && typeof e == "number") return qe(n);
|
|
479
619
|
}
|
|
480
620
|
if (t?.type === "categorical-color") {
|
|
481
|
-
let n =
|
|
482
|
-
if (n) return
|
|
621
|
+
let n = Me(e, t.categories);
|
|
622
|
+
if (n) return qe(n);
|
|
483
623
|
}
|
|
484
624
|
};
|
|
485
|
-
function
|
|
486
|
-
let { columnIcons: r, columnDescriptions: i, compactHeaders: a, enableSelection: o = !1, selectedRowIds: s, rowActions: c = [], getRowActions: l, columnRenderers: u, wrapRows: d = !1 } = n,
|
|
625
|
+
function Bt(e, t, n = {}) {
|
|
626
|
+
let { columnIcons: r, columnDescriptions: i, compactHeaders: a, enableSelection: o = !1, selectedRowIds: s, rowActions: c = [], getRowActions: l, columnRenderers: u, wrapRows: d = !1 } = n, p = g.accessor((e, t) => t + 1, {
|
|
487
627
|
header: "",
|
|
488
628
|
id: "rowIndex",
|
|
489
629
|
enableResizing: !1,
|
|
490
630
|
size: 20,
|
|
491
|
-
cell:
|
|
492
|
-
}),
|
|
631
|
+
cell: Ft
|
|
632
|
+
}), h = g.display({
|
|
493
633
|
id: "rowSelection",
|
|
494
|
-
header:
|
|
495
|
-
cell:
|
|
634
|
+
header: kt,
|
|
635
|
+
cell: At,
|
|
496
636
|
meta: { selectedRowIds: s },
|
|
497
637
|
enableResizing: !1,
|
|
498
638
|
enableSorting: !1,
|
|
499
639
|
size: 36
|
|
500
|
-
}),
|
|
501
|
-
let n = t || "-", o = e.map((e) => e[n]), s = u?.[n], c = r?.[n], l = c === void 0 ?
|
|
502
|
-
return
|
|
640
|
+
}), _ = t.map((t) => {
|
|
641
|
+
let n = t || "-", o = e.map((e) => e[n]), s = u?.[n], c = r?.[n], l = c === void 0 ? f(o) : c, p = i?.[n];
|
|
642
|
+
return g.accessor((e) => e[n], {
|
|
503
643
|
id: n,
|
|
504
|
-
header:
|
|
505
|
-
cell:
|
|
644
|
+
header: Lt,
|
|
645
|
+
cell: It,
|
|
506
646
|
meta: {
|
|
507
647
|
headerLabel: a?.[n] ?? n,
|
|
508
648
|
headerIcon: l,
|
|
509
|
-
columnDescription:
|
|
649
|
+
columnDescription: p,
|
|
510
650
|
renderer: s,
|
|
511
651
|
wrapRows: d,
|
|
512
|
-
getCellStyle: (e) =>
|
|
652
|
+
getCellStyle: (e) => zt(e, s)
|
|
513
653
|
},
|
|
514
|
-
sortingFn: (e, t) =>
|
|
654
|
+
sortingFn: (e, t) => Rt(m(e.original[n], s), m(t.original[n], s))
|
|
515
655
|
});
|
|
516
|
-
}),
|
|
656
|
+
}), v = g.display({
|
|
517
657
|
id: "rowActions",
|
|
518
658
|
header: "",
|
|
519
|
-
cell:
|
|
659
|
+
cell: Mt,
|
|
520
660
|
meta: {
|
|
521
661
|
rowActions: c,
|
|
522
662
|
getRowActions: l
|
|
@@ -526,19 +666,19 @@ function kt(e, t, n = {}) {
|
|
|
526
666
|
size: 36
|
|
527
667
|
});
|
|
528
668
|
return [
|
|
529
|
-
|
|
530
|
-
...o ? [
|
|
531
|
-
...
|
|
532
|
-
...c.length > 0 || l ? [
|
|
669
|
+
p,
|
|
670
|
+
...o ? [h] : [],
|
|
671
|
+
..._,
|
|
672
|
+
...c.length > 0 || l ? [v] : []
|
|
533
673
|
];
|
|
534
674
|
}
|
|
535
675
|
//#endregion
|
|
536
676
|
//#region src/components/data-table/data-table-column-menu.tsx
|
|
537
|
-
var
|
|
538
|
-
let n =
|
|
677
|
+
var Vt = (t) => {
|
|
678
|
+
let n = G(28), { column: r, checked: i, onColumnVisibilityChange: a } = t, o;
|
|
539
679
|
n[0] === r.id ? o = n[1] : (o = { id: r.id }, n[0] = r.id, n[1] = o);
|
|
540
|
-
let { attributes: s, listeners: c, setNodeRef: l, transform: u, transition: d, isDragging: f } =
|
|
541
|
-
n[2] === u ? p = n[3] : (p =
|
|
680
|
+
let { attributes: s, listeners: c, setNodeRef: l, transform: u, transition: d, isDragging: f } = we(o), p;
|
|
681
|
+
n[2] === u ? p = n[3] : (p = Ee.Transform.toString(u), n[2] = u, n[3] = p);
|
|
542
682
|
let m = f ? .5 : 1, h;
|
|
543
683
|
n[4] !== p || n[5] !== m || n[6] !== d ? (h = {
|
|
544
684
|
transform: p,
|
|
@@ -548,9 +688,9 @@ var At = (t) => {
|
|
|
548
688
|
let g = h, _;
|
|
549
689
|
n[8] === Symbol.for("react.memo_cache_sentinel") ? (_ = { bg: "bg.hover" }, n[8] = _) : _ = n[8];
|
|
550
690
|
let v;
|
|
551
|
-
n[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */
|
|
691
|
+
n[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ K(ge, { size: 14 }), n[9] = v) : v = n[9];
|
|
552
692
|
let y;
|
|
553
|
-
n[10] !== s || n[11] !== c ? (y = /* @__PURE__ */
|
|
693
|
+
n[10] !== s || n[11] !== c ? (y = /* @__PURE__ */ K(te, {
|
|
554
694
|
as: "span",
|
|
555
695
|
display: "inline-flex",
|
|
556
696
|
cursor: "grab",
|
|
@@ -560,22 +700,22 @@ var At = (t) => {
|
|
|
560
700
|
children: v
|
|
561
701
|
}), n[10] = s, n[11] = c, n[12] = y) : y = n[12];
|
|
562
702
|
let b;
|
|
563
|
-
n[13] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */
|
|
564
|
-
as:
|
|
703
|
+
n[13] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ K(I, {
|
|
704
|
+
as: pe,
|
|
565
705
|
boxSize: "12px",
|
|
566
706
|
strokeWidth: "3"
|
|
567
707
|
}), n[13] = b) : b = n[13];
|
|
568
708
|
let x;
|
|
569
709
|
n[14] !== r.id || n[15] !== a ? (x = (e) => a(r.id, e.checked === !0), n[14] = r.id, n[15] = a, n[16] = x) : x = n[16];
|
|
570
710
|
let S;
|
|
571
|
-
n[17] === r.label ? S = n[18] : (S = /* @__PURE__ */
|
|
711
|
+
n[17] === r.label ? S = n[18] : (S = /* @__PURE__ */ K(U, {
|
|
572
712
|
as: "span",
|
|
573
713
|
textStyle: "label/S/regular",
|
|
574
714
|
truncate: !0,
|
|
575
715
|
children: r.label
|
|
576
716
|
}), n[17] = r.label, n[18] = S);
|
|
577
717
|
let C;
|
|
578
|
-
n[19] !== i || n[20] !== x || n[21] !== S ? (C = /* @__PURE__ */
|
|
718
|
+
n[19] !== i || n[20] !== x || n[21] !== S ? (C = /* @__PURE__ */ K(e, {
|
|
579
719
|
checked: i,
|
|
580
720
|
flex: "1",
|
|
581
721
|
minW: "0",
|
|
@@ -588,7 +728,7 @@ var At = (t) => {
|
|
|
588
728
|
children: S
|
|
589
729
|
}), n[19] = i, n[20] = x, n[21] = S, n[22] = C) : C = n[22];
|
|
590
730
|
let w;
|
|
591
|
-
return n[23] !== l || n[24] !== g || n[25] !== C || n[26] !== y ? (w = /* @__PURE__ */
|
|
731
|
+
return n[23] !== l || n[24] !== g || n[25] !== C || n[26] !== y ? (w = /* @__PURE__ */ q(F, {
|
|
592
732
|
ref: l,
|
|
593
733
|
style: g,
|
|
594
734
|
gap: "2xs",
|
|
@@ -600,176 +740,176 @@ var At = (t) => {
|
|
|
600
740
|
_hover: _,
|
|
601
741
|
children: [y, C]
|
|
602
742
|
}), n[23] = l, n[24] = g, n[25] = C, n[26] = y, n[27] = w) : w = n[27], w;
|
|
603
|
-
},
|
|
604
|
-
let n =
|
|
743
|
+
}, Ht = (e) => {
|
|
744
|
+
let n = G(47), { columns: a, visibleColumnIds: o, wrapRows: s, showStats: c, statsAvailable: l, onColumnVisibilityChange: u, onColumnReorder: d, onWrapRowsChange: f, onStatsVisibilityChange: p } = e, m = le(null), h = le(null), [g, v] = Y(!1), [y, b] = Y(""), x;
|
|
605
745
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (x = { activationConstraint: { distance: 5 } }, n[0] = x) : x = n[0];
|
|
606
|
-
let S =
|
|
746
|
+
let S = Ce(Se(be, x)), C;
|
|
607
747
|
if (n[1] !== a || n[2] !== y) {
|
|
608
748
|
let e = y.trim().toLowerCase();
|
|
609
749
|
C = e ? a.filter((t) => t.label.toLowerCase().includes(e)) : a, n[1] = a, n[2] = y, n[3] = C;
|
|
610
750
|
} else C = n[3];
|
|
611
751
|
let w = C, T;
|
|
612
|
-
n[4] ===
|
|
752
|
+
n[4] === d ? T = n[5] : (T = (e) => {
|
|
613
753
|
let { active: t, over: n } = e;
|
|
614
|
-
n && t.id !== n.id &&
|
|
615
|
-
}, n[4] =
|
|
616
|
-
let E = T, D,
|
|
617
|
-
n[6] ===
|
|
618
|
-
if (!
|
|
754
|
+
n && t.id !== n.id && d(String(t.id), String(n.id));
|
|
755
|
+
}, n[4] = d, n[5] = T);
|
|
756
|
+
let E = T, D, O;
|
|
757
|
+
n[6] === g ? (D = n[7], O = n[8]) : (D = () => {
|
|
758
|
+
if (!g) return;
|
|
619
759
|
let e = (e) => {
|
|
620
760
|
let t = e.target;
|
|
621
|
-
t instanceof Node && (
|
|
761
|
+
t instanceof Node && (h.current?.contains(t) || m.current?.contains(t) || v(!1));
|
|
622
762
|
}, t = (e) => {
|
|
623
763
|
e.key === "Escape" && v(!1);
|
|
624
764
|
};
|
|
625
765
|
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t, !0), () => {
|
|
626
766
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t, !0);
|
|
627
767
|
};
|
|
628
|
-
},
|
|
629
|
-
let
|
|
630
|
-
n[9] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
768
|
+
}, O = [g], n[6] = g, n[7] = D, n[8] = O), ce(D, O);
|
|
769
|
+
let ee;
|
|
770
|
+
n[9] === Symbol.for("react.memo_cache_sentinel") ? (ee = {
|
|
631
771
|
placement: "bottom-end",
|
|
632
772
|
offset: { mainAxis: 8 },
|
|
633
|
-
getAnchorElement: () =>
|
|
634
|
-
}, n[9] =
|
|
773
|
+
getAnchorElement: () => m.current
|
|
774
|
+
}, n[9] = ee) : ee = n[9];
|
|
635
775
|
let k;
|
|
636
|
-
n[10] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */
|
|
776
|
+
n[10] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ K(z.Trigger, {
|
|
637
777
|
asChild: !0,
|
|
638
|
-
children: /* @__PURE__ */
|
|
639
|
-
ref:
|
|
778
|
+
children: /* @__PURE__ */ K(ne, {
|
|
779
|
+
ref: m,
|
|
640
780
|
"aria-label": "Display settings",
|
|
641
781
|
variant: "ghost",
|
|
642
782
|
size: "sm",
|
|
643
|
-
onClick: () => v(
|
|
644
|
-
children: /* @__PURE__ */
|
|
645
|
-
as:
|
|
783
|
+
onClick: () => v(Ut),
|
|
784
|
+
children: /* @__PURE__ */ K(I, {
|
|
785
|
+
as: ve,
|
|
646
786
|
boxSize: "14px"
|
|
647
787
|
})
|
|
648
788
|
})
|
|
649
789
|
}), n[10] = k) : k = n[10];
|
|
650
790
|
let A;
|
|
651
|
-
n[11] !==
|
|
791
|
+
n[11] !== f || n[12] !== s ? (A = /* @__PURE__ */ K(_, {
|
|
652
792
|
showDivider: !0,
|
|
653
793
|
wrapRows: s,
|
|
654
|
-
onWrapRowsChange:
|
|
655
|
-
}), n[11] =
|
|
794
|
+
onWrapRowsChange: f
|
|
795
|
+
}), n[11] = f, n[12] = s, n[13] = A) : A = n[13];
|
|
656
796
|
let j;
|
|
657
|
-
n[14] !==
|
|
797
|
+
n[14] !== p || n[15] !== c || n[16] !== l ? (j = l ? /* @__PURE__ */ K(te, {
|
|
658
798
|
borderBottomWidth: "1px",
|
|
659
799
|
borderColor: "border.subtle",
|
|
660
800
|
padding: "xs",
|
|
661
|
-
children: /* @__PURE__ */
|
|
801
|
+
children: /* @__PURE__ */ K(t, {
|
|
662
802
|
checked: c,
|
|
663
803
|
inputProps: { role: "switch" },
|
|
664
804
|
width: "full",
|
|
665
805
|
flexDirection: "row-reverse",
|
|
666
806
|
justifyContent: "space-between",
|
|
667
|
-
onCheckedChange: (e) =>
|
|
668
|
-
children: /* @__PURE__ */
|
|
807
|
+
onCheckedChange: (e) => p(e.checked === !0),
|
|
808
|
+
children: /* @__PURE__ */ K(U, {
|
|
669
809
|
as: "span",
|
|
670
810
|
textStyle: "label/S/regular",
|
|
671
811
|
children: "Statistics"
|
|
672
812
|
})
|
|
673
813
|
})
|
|
674
|
-
}) : null, n[14] =
|
|
675
|
-
let
|
|
676
|
-
n[18] === y ?
|
|
814
|
+
}) : null, n[14] = p, n[15] = c, n[16] = l, n[17] = j) : j = n[17];
|
|
815
|
+
let M;
|
|
816
|
+
n[18] === y ? M = n[19] : (M = /* @__PURE__ */ K(i, {
|
|
677
817
|
value: y,
|
|
678
818
|
placeholder: "Search columns",
|
|
679
819
|
onValueChange: b
|
|
680
|
-
}), n[18] = y, n[19] =
|
|
820
|
+
}), n[18] = y, n[19] = M);
|
|
821
|
+
let N;
|
|
822
|
+
n[20] === Symbol.for("react.memo_cache_sentinel") ? (N = { overscrollBehavior: "contain" }, n[20] = N) : N = n[20];
|
|
823
|
+
let P;
|
|
824
|
+
n[21] === a ? P = n[22] : (P = a.map(Wt), n[21] = a, n[22] = P);
|
|
681
825
|
let F;
|
|
682
|
-
n[20] === Symbol.for("react.memo_cache_sentinel") ? (F = { overscrollBehavior: "contain" }, n[20] = F) : F = n[20];
|
|
683
|
-
let R;
|
|
684
|
-
n[21] === a ? R = n[22] : (R = a.map(Nt), n[21] = a, n[22] = R);
|
|
685
|
-
let B;
|
|
686
826
|
if (n[23] !== w || n[24] !== u || n[25] !== o) {
|
|
687
827
|
let e;
|
|
688
|
-
n[27] !== u || n[28] !== o ? (e = (e) => /* @__PURE__ */
|
|
828
|
+
n[27] !== u || n[28] !== o ? (e = (e) => /* @__PURE__ */ K(Vt, {
|
|
689
829
|
column: e,
|
|
690
830
|
checked: o.has(e.id),
|
|
691
831
|
onColumnVisibilityChange: u
|
|
692
|
-
}, e.id), n[27] = u, n[28] = o, n[29] = e) : e = n[29],
|
|
693
|
-
} else
|
|
694
|
-
let
|
|
695
|
-
n[30] ===
|
|
832
|
+
}, e.id), n[27] = u, n[28] = o, n[29] = e) : e = n[29], F = w.map(e), n[23] = w, n[24] = u, n[25] = o, n[26] = F;
|
|
833
|
+
} else F = n[26];
|
|
834
|
+
let L;
|
|
835
|
+
n[30] === F ? L = n[31] : (L = /* @__PURE__ */ K(re, {
|
|
696
836
|
gap: "1px",
|
|
697
|
-
children:
|
|
698
|
-
}), n[30] =
|
|
699
|
-
let
|
|
700
|
-
n[32] !==
|
|
701
|
-
items:
|
|
702
|
-
strategy:
|
|
703
|
-
children:
|
|
704
|
-
}), n[32] =
|
|
705
|
-
let
|
|
706
|
-
n[35] !== E || n[36] !== S || n[37] !==
|
|
837
|
+
children: F
|
|
838
|
+
}), n[30] = F, n[31] = L);
|
|
839
|
+
let R;
|
|
840
|
+
n[32] !== P || n[33] !== L ? (R = /* @__PURE__ */ K(Q, {
|
|
841
|
+
items: P,
|
|
842
|
+
strategy: Te,
|
|
843
|
+
children: L
|
|
844
|
+
}), n[32] = P, n[33] = L, n[34] = R) : R = n[34];
|
|
845
|
+
let V;
|
|
846
|
+
n[35] !== E || n[36] !== S || n[37] !== R ? (V = /* @__PURE__ */ K(r, {
|
|
707
847
|
maxH: "280px",
|
|
708
|
-
viewportProps:
|
|
709
|
-
children: /* @__PURE__ */
|
|
848
|
+
viewportProps: N,
|
|
849
|
+
children: /* @__PURE__ */ K(te, {
|
|
710
850
|
padding: "2xs",
|
|
711
|
-
children: /* @__PURE__ */
|
|
851
|
+
children: /* @__PURE__ */ K(ye, {
|
|
712
852
|
sensors: S,
|
|
713
|
-
collisionDetection:
|
|
853
|
+
collisionDetection: xe,
|
|
714
854
|
onDragEnd: E,
|
|
715
|
-
children:
|
|
855
|
+
children: R
|
|
716
856
|
})
|
|
717
857
|
})
|
|
718
|
-
}), n[35] = E, n[36] = S, n[37] =
|
|
719
|
-
let
|
|
720
|
-
n[39] !==
|
|
721
|
-
ref:
|
|
858
|
+
}), n[35] = E, n[36] = S, n[37] = R, n[38] = V) : V = n[38];
|
|
859
|
+
let H;
|
|
860
|
+
n[39] !== V || n[40] !== A || n[41] !== j || n[42] !== M ? (H = /* @__PURE__ */ K(B, { children: /* @__PURE__ */ K(z.Positioner, { children: /* @__PURE__ */ K(z.Content, {
|
|
861
|
+
ref: h,
|
|
722
862
|
width: "min(320px, calc(100vw - 32px))",
|
|
723
863
|
p: "0",
|
|
724
864
|
bg: "bg",
|
|
725
865
|
overflow: "hidden",
|
|
726
|
-
children: /* @__PURE__ */
|
|
866
|
+
children: /* @__PURE__ */ q(re, {
|
|
727
867
|
gap: "0",
|
|
728
868
|
children: [
|
|
729
869
|
A,
|
|
730
870
|
j,
|
|
731
|
-
|
|
732
|
-
|
|
871
|
+
M,
|
|
872
|
+
V
|
|
733
873
|
]
|
|
734
874
|
})
|
|
735
|
-
}) }) }), n[39] =
|
|
736
|
-
let
|
|
737
|
-
return n[44] !==
|
|
738
|
-
open:
|
|
875
|
+
}) }) }), n[39] = V, n[40] = A, n[41] = j, n[42] = M, n[43] = H) : H = n[43];
|
|
876
|
+
let W;
|
|
877
|
+
return n[44] !== g || n[45] !== H ? (W = /* @__PURE__ */ q(z.Root, {
|
|
878
|
+
open: g,
|
|
739
879
|
closeOnInteractOutside: !1,
|
|
740
|
-
positioning:
|
|
741
|
-
children: [k,
|
|
742
|
-
}), n[44] =
|
|
880
|
+
positioning: ee,
|
|
881
|
+
children: [k, H]
|
|
882
|
+
}), n[44] = g, n[45] = H, n[46] = W) : W = n[46], W;
|
|
743
883
|
};
|
|
744
|
-
function
|
|
884
|
+
function Ut(e) {
|
|
745
885
|
return !e;
|
|
746
886
|
}
|
|
747
|
-
function
|
|
887
|
+
function Wt(e) {
|
|
748
888
|
return e.id;
|
|
749
889
|
}
|
|
750
890
|
//#endregion
|
|
751
891
|
//#region src/components/data-table/data-table-table-parts.tsx
|
|
752
|
-
var
|
|
892
|
+
var Gt = /* @__PURE__ */ new Set([
|
|
753
893
|
"rowIndex",
|
|
754
894
|
"rowSelection",
|
|
755
895
|
"rowActions"
|
|
756
|
-
]),
|
|
757
|
-
let t =
|
|
896
|
+
]), Kt = (e) => e === "asc" ? de : e === "desc" ? ue : _e, qt = (e) => {
|
|
897
|
+
let t = G(37), { header: r, headerGroup: i, table: a, fullWidth: s, hasDescription: c } = e, l, u, d;
|
|
758
898
|
if (t[0] !== r.column || t[1] !== a) {
|
|
759
899
|
u = r.column.getIsSorted();
|
|
760
900
|
let e;
|
|
761
|
-
t[5] !== r.column.id || t[6] !== a ? (e = !
|
|
901
|
+
t[5] !== r.column.id || t[6] !== a ? (e = !Gt.has(r.column.id) && a.getCoreRowModel().rows.length > 1, t[5] = r.column.id, t[6] = a, t[7] = e) : e = t[7], l = e, d = Kt(u), t[0] = r.column, t[1] = a, t[2] = l, t[3] = u, t[4] = d;
|
|
762
902
|
} else l = t[2], u = t[3], d = t[4];
|
|
763
903
|
let f = d, p;
|
|
764
|
-
t[8] === r ? p = t[9] : (p = r.column.id === "rowSelection" ? "Select all" :
|
|
904
|
+
t[8] === r ? p = t[9] : (p = r.column.id === "rowSelection" ? "Select all" : De(r.column.columnDef.header, r.getContext()), t[8] = r, t[9] = p);
|
|
765
905
|
let m = p, h = r.column.id, g;
|
|
766
906
|
t[10] === Symbol.for("react.memo_cache_sentinel") ? (g = { borderRight: "none" }, t[10] = g) : g = t[10];
|
|
767
907
|
let _ = r.id, v = s && i.headers.indexOf(r) === i.headers.length - 1 ? void 0 : `calc(var(--header-${r.id}-size) * 1px)`, y;
|
|
768
908
|
t[11] === v ? y = t[12] : (y = { width: v }, t[11] = v, t[12] = y);
|
|
769
909
|
let b;
|
|
770
|
-
t[13] === r ? b = t[14] : (b =
|
|
910
|
+
t[13] === r ? b = t[14] : (b = De(r.column.columnDef.header, r.getContext()), t[13] = r, t[14] = b);
|
|
771
911
|
let x;
|
|
772
|
-
t[15] === b ? x = t[16] : (x = /* @__PURE__ */
|
|
912
|
+
t[15] === b ? x = t[16] : (x = /* @__PURE__ */ K(U, {
|
|
773
913
|
as: "div",
|
|
774
914
|
textStyle: "label/S/medium",
|
|
775
915
|
lineHeight: "1.2",
|
|
@@ -777,58 +917,58 @@ var Pt = /* @__PURE__ */ new Set([
|
|
|
777
917
|
children: b
|
|
778
918
|
}), t[15] = b, t[16] = x);
|
|
779
919
|
let S;
|
|
780
|
-
t[17] !== f || t[18] !== l || t[19] !== r.column || t[20] !== u ? (S = l && /* @__PURE__ */
|
|
920
|
+
t[17] !== f || t[18] !== l || t[19] !== r.column || t[20] !== u ? (S = l && /* @__PURE__ */ q(R.Root, { children: [/* @__PURE__ */ K(R.Trigger, {
|
|
781
921
|
asChild: !0,
|
|
782
|
-
children: /* @__PURE__ */
|
|
922
|
+
children: /* @__PURE__ */ K(ne, {
|
|
783
923
|
ml: "2px",
|
|
784
924
|
size: "2xs",
|
|
785
925
|
"aria-label": u ? `Sorted ${u}` : "Sort column",
|
|
786
926
|
variant: "ghost",
|
|
787
927
|
visibility: u ? "visible" : "hidden",
|
|
788
928
|
_groupHover: { visibility: "visible" },
|
|
789
|
-
children: /* @__PURE__ */
|
|
929
|
+
children: /* @__PURE__ */ K(I, {
|
|
790
930
|
as: f,
|
|
791
931
|
boxSize: "14px"
|
|
792
932
|
})
|
|
793
933
|
})
|
|
794
|
-
}), /* @__PURE__ */
|
|
934
|
+
}), /* @__PURE__ */ K(B, { children: /* @__PURE__ */ K(R.Positioner, { children: /* @__PURE__ */ q(R.Content, {
|
|
795
935
|
zIndex: "popover",
|
|
796
936
|
bg: "bg",
|
|
797
937
|
children: [
|
|
798
|
-
/* @__PURE__ */
|
|
938
|
+
/* @__PURE__ */ K(R.Item, {
|
|
799
939
|
value: "sort-asc",
|
|
800
940
|
asChild: !0,
|
|
801
|
-
children: /* @__PURE__ */
|
|
941
|
+
children: /* @__PURE__ */ K(o, {
|
|
802
942
|
asChild: !0,
|
|
803
943
|
variant: "full-width",
|
|
804
944
|
label: "Sort ascending",
|
|
805
|
-
icon: /* @__PURE__ */
|
|
806
|
-
as:
|
|
945
|
+
icon: /* @__PURE__ */ K(I, {
|
|
946
|
+
as: de,
|
|
807
947
|
boxSize: "16px"
|
|
808
948
|
}),
|
|
809
949
|
disabled: u === "asc",
|
|
810
950
|
onActivate: () => r.column.toggleSorting(!1)
|
|
811
951
|
})
|
|
812
952
|
}),
|
|
813
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ K(R.Item, {
|
|
814
954
|
value: "sort-desc",
|
|
815
955
|
asChild: !0,
|
|
816
|
-
children: /* @__PURE__ */
|
|
956
|
+
children: /* @__PURE__ */ K(o, {
|
|
817
957
|
asChild: !0,
|
|
818
958
|
variant: "full-width",
|
|
819
959
|
label: "Sort descending",
|
|
820
|
-
icon: /* @__PURE__ */
|
|
821
|
-
as:
|
|
960
|
+
icon: /* @__PURE__ */ K(I, {
|
|
961
|
+
as: ue,
|
|
822
962
|
boxSize: "16px"
|
|
823
963
|
}),
|
|
824
964
|
disabled: u === "desc",
|
|
825
965
|
onActivate: () => r.column.toggleSorting(!0)
|
|
826
966
|
})
|
|
827
967
|
}),
|
|
828
|
-
u && /* @__PURE__ */
|
|
968
|
+
u && /* @__PURE__ */ K(R.Item, {
|
|
829
969
|
value: "clear-sort",
|
|
830
970
|
asChild: !0,
|
|
831
|
-
children: /* @__PURE__ */
|
|
971
|
+
children: /* @__PURE__ */ K(o, {
|
|
832
972
|
asChild: !0,
|
|
833
973
|
variant: "full-width",
|
|
834
974
|
label: "Clear sort",
|
|
@@ -838,14 +978,14 @@ var Pt = /* @__PURE__ */ new Set([
|
|
|
838
978
|
]
|
|
839
979
|
}) }) })] }), t[17] = f, t[18] = l, t[19] = r.column, t[20] = u, t[21] = S) : S = t[21];
|
|
840
980
|
let C;
|
|
841
|
-
t[22] === r ? C = t[23] : (C = r.column.getCanResize() && /* @__PURE__ */
|
|
981
|
+
t[22] === r ? C = t[23] : (C = r.column.getCanResize() && /* @__PURE__ */ K("span", {
|
|
842
982
|
onDoubleClick: () => r.column.resetSize(),
|
|
843
983
|
onMouseDown: r.getResizeHandler(),
|
|
844
984
|
onTouchStart: r.getResizeHandler(),
|
|
845
985
|
className: `resizer ${r.column.getIsResizing() ? "isResizing" : ""}`
|
|
846
986
|
}), t[22] = r, t[23] = C);
|
|
847
987
|
let w;
|
|
848
|
-
t[24] !== C || t[25] !== x || t[26] !== S ? (w = /* @__PURE__ */
|
|
988
|
+
t[24] !== C || t[25] !== x || t[26] !== S ? (w = /* @__PURE__ */ q(P, {
|
|
849
989
|
className: "group",
|
|
850
990
|
alignItems: "center",
|
|
851
991
|
justifyContent: "space-between",
|
|
@@ -859,13 +999,13 @@ var Pt = /* @__PURE__ */ new Set([
|
|
|
859
999
|
]
|
|
860
1000
|
}), t[24] = C, t[25] = x, t[26] = S, t[27] = w) : w = t[27];
|
|
861
1001
|
let T;
|
|
862
|
-
t[28] !== c || t[29] !== w || t[30] !== m ? (T = /* @__PURE__ */
|
|
1002
|
+
t[28] !== c || t[29] !== w || t[30] !== m ? (T = /* @__PURE__ */ K(n, {
|
|
863
1003
|
content: m,
|
|
864
1004
|
disabled: c,
|
|
865
1005
|
children: w
|
|
866
1006
|
}), t[28] = c, t[29] = w, t[30] = m, t[31] = T) : T = t[31];
|
|
867
1007
|
let E;
|
|
868
|
-
return t[32] !== r.column.id || t[33] !== r.id || t[34] !== T || t[35] !== y ? (E = /* @__PURE__ */
|
|
1008
|
+
return t[32] !== r.column.id || t[33] !== r.id || t[34] !== T || t[35] !== y ? (E = /* @__PURE__ */ K(H.ColumnHeader, {
|
|
869
1009
|
"data-column-id": h,
|
|
870
1010
|
textTransform: "none",
|
|
871
1011
|
borderRight: "1px solid",
|
|
@@ -880,8 +1020,8 @@ var Pt = /* @__PURE__ */ new Set([
|
|
|
880
1020
|
style: y,
|
|
881
1021
|
children: T
|
|
882
1022
|
}, _), t[32] = r.column.id, t[33] = r.id, t[34] = T, t[35] = y, t[36] = E) : E = t[36], E;
|
|
883
|
-
},
|
|
884
|
-
let t =
|
|
1023
|
+
}, Jt = (e) => {
|
|
1024
|
+
let t = G(26), { cell: n, row: r, wrapRows: i, getCellContextMenuActions: o } = e, s = n.column.columnDef.meta, c;
|
|
885
1025
|
t[0] !== n || t[1] !== s ? (c = s?.getCellStyle?.(n.getValue()), t[0] = n, t[1] = s, t[2] = c) : c = t[2];
|
|
886
1026
|
let l = c, u;
|
|
887
1027
|
if (t[3] !== n || t[4] !== o || t[5] !== r.id || t[6] !== r.original) {
|
|
@@ -901,9 +1041,9 @@ var Pt = /* @__PURE__ */ new Set([
|
|
|
901
1041
|
let d = u, f = n.column.id, p = i ? "anywhere" : void 0, m = i ? void 0 : "10", h = i ? void 0 : "10", g;
|
|
902
1042
|
t[8] === Symbol.for("react.memo_cache_sentinel") ? (g = { borderRight: "none" }, t[8] = g) : g = t[8];
|
|
903
1043
|
let _ = n.id, v = i ? void 0 : "ellipsis", y = i ? "top" : "middle", b = i ? "normal" : "nowrap", x;
|
|
904
|
-
t[9] === n ? x = t[10] : (x =
|
|
1044
|
+
t[9] === n ? x = t[10] : (x = De(n.column.columnDef.cell, n.getContext()), t[9] = n, t[10] = x);
|
|
905
1045
|
let S;
|
|
906
|
-
t[11] !== n.column.id || t[12] !== n.id || t[13] !== l || t[14] !== b || t[15] !== x || t[16] !== p || t[17] !== m || t[18] !== h || t[19] !== v || t[20] !== y ? (S = /* @__PURE__ */
|
|
1046
|
+
t[11] !== n.column.id || t[12] !== n.id || t[13] !== l || t[14] !== b || t[15] !== x || t[16] !== p || t[17] !== m || t[18] !== h || t[19] !== v || t[20] !== y ? (S = /* @__PURE__ */ K(H.Cell, {
|
|
907
1047
|
"data-column-id": f,
|
|
908
1048
|
width: "fit-content",
|
|
909
1049
|
maxWidth: "12rem",
|
|
@@ -926,12 +1066,12 @@ var Pt = /* @__PURE__ */ new Set([
|
|
|
926
1066
|
let C = S;
|
|
927
1067
|
if (d.length === 0) return C;
|
|
928
1068
|
let w;
|
|
929
|
-
return t[22] !== n.id || t[23] !== C || t[24] !== d ? (w = /* @__PURE__ */
|
|
1069
|
+
return t[22] !== n.id || t[23] !== C || t[24] !== d ? (w = /* @__PURE__ */ K(a, {
|
|
930
1070
|
actions: d,
|
|
931
1071
|
children: C
|
|
932
1072
|
}, n.id), t[22] = n.id, t[23] = C, t[24] = d, t[25] = w) : w = t[25], w;
|
|
933
|
-
},
|
|
934
|
-
let t =
|
|
1073
|
+
}, Yt = (e) => {
|
|
1074
|
+
let t = G(23), { row: n, noBorder: r, rowIsInteractive: i, rowIsActive: a, rowIsSelected: o, wrapRows: s, onRowClick: c, getCellContextMenuActions: l } = e, u = n.id, d = a ? "true" : void 0, f = o ? "true" : void 0, p = o ? "true" : void 0, m = s ? void 0 : "10", h = i ? "pointer" : void 0, g;
|
|
935
1075
|
t[0] !== c || t[1] !== n.original || t[2] !== i ? (g = i ? () => c?.(n.original) : void 0, t[0] = c, t[1] = n.original, t[2] = i, t[3] = g) : g = t[3];
|
|
936
1076
|
let _ = r ? "none" : "1px solid", v = r ? "none" : "1px solid", y = r ? "none" : "1px solid", b;
|
|
937
1077
|
t[4] === y ? b = t[5] : (b = {
|
|
@@ -939,14 +1079,14 @@ var Pt = /* @__PURE__ */ new Set([
|
|
|
939
1079
|
borderColor: "border.subtle"
|
|
940
1080
|
}, t[4] = y, t[5] = b);
|
|
941
1081
|
let x = a ? "bg.active" : "bg", S;
|
|
942
|
-
t[6] !== l || t[7] !== n || t[8] !== s ? (S = n.getVisibleCells().map((e) => /* @__PURE__ */
|
|
1082
|
+
t[6] !== l || t[7] !== n || t[8] !== s ? (S = n.getVisibleCells().map((e) => /* @__PURE__ */ K(Jt, {
|
|
943
1083
|
cell: e,
|
|
944
1084
|
row: n,
|
|
945
1085
|
wrapRows: s,
|
|
946
1086
|
getCellContextMenuActions: l
|
|
947
1087
|
}, e.id)), t[6] = l, t[7] = n, t[8] = s, t[9] = S) : S = t[9];
|
|
948
1088
|
let C;
|
|
949
|
-
return t[10] !== n.id || t[11] !== d || t[12] !== b || t[13] !== x || t[14] !== S || t[15] !== f || t[16] !== p || t[17] !== m || t[18] !== h || t[19] !== g || t[20] !== _ || t[21] !== v ? (C = /* @__PURE__ */
|
|
1089
|
+
return t[10] !== n.id || t[11] !== d || t[12] !== b || t[13] !== x || t[14] !== S || t[15] !== f || t[16] !== p || t[17] !== m || t[18] !== h || t[19] !== g || t[20] !== _ || t[21] !== v ? (C = /* @__PURE__ */ K(H.Row, {
|
|
950
1090
|
"data-active": d,
|
|
951
1091
|
"data-selected": f,
|
|
952
1092
|
"aria-selected": p,
|
|
@@ -961,16 +1101,20 @@ var Pt = /* @__PURE__ */ new Set([
|
|
|
961
1101
|
background: x,
|
|
962
1102
|
children: S
|
|
963
1103
|
}, u), t[10] = n.id, t[11] = d, t[12] = b, t[13] = x, t[14] = S, t[15] = f, t[16] = p, t[17] = m, t[18] = h, t[19] = g, t[20] = _, t[21] = v, t[22] = C) : C = t[22], C;
|
|
964
|
-
},
|
|
1104
|
+
}, Xt = se(() => import("./data-table-stats-row-UuTinYfL.js").then((e) => ({ default: e.DataTableStatsRow }))), Zt = (e, t) => e.map((e) => ({
|
|
965
1105
|
id: e,
|
|
966
1106
|
label: t?.[e] ?? e
|
|
967
|
-
})),
|
|
968
|
-
let t =
|
|
1107
|
+
})), Qt = (e) => {
|
|
1108
|
+
let t = {};
|
|
1109
|
+
for (let n of e.getFlatHeaders()) t[`--header-${n.id}-size`] = n.getSize(), t[`--col-${n.column.id}-size`] = n.column.getSize();
|
|
1110
|
+
return t;
|
|
1111
|
+
}, $t = (e) => {
|
|
1112
|
+
let t = G(12), { table: n, pagination: r, pageSizeOptions: i } = e, a;
|
|
969
1113
|
t[0] === n ? a = t[1] : (a = n.getPageCount(), t[0] = n, t[1] = a);
|
|
970
1114
|
let o = r.pageIndex, s = r.pageSize, c;
|
|
971
1115
|
t[2] === n ? c = t[3] : (c = n.getCoreRowModel(), t[2] = n, t[3] = c);
|
|
972
1116
|
let l;
|
|
973
|
-
return t[4] !== i || t[5] !== r.pageIndex || t[6] !== r.pageSize || t[7] !== a || t[8] !== c.rows.length || t[9] !== n.setPageIndex || t[10] !== n.setPageSize ? (l = /* @__PURE__ */
|
|
1117
|
+
return t[4] !== i || t[5] !== r.pageIndex || t[6] !== r.pageSize || t[7] !== a || t[8] !== c.rows.length || t[9] !== n.setPageIndex || t[10] !== n.setPageSize ? (l = /* @__PURE__ */ K(S, {
|
|
974
1118
|
pageCount: a,
|
|
975
1119
|
pageIndex: o,
|
|
976
1120
|
pageSize: s,
|
|
@@ -979,192 +1123,182 @@ var Pt = /* @__PURE__ */ new Set([
|
|
|
979
1123
|
onPageChange: n.setPageIndex,
|
|
980
1124
|
onPageSizeChange: n.setPageSize
|
|
981
1125
|
}), t[4] = i, t[5] = r.pageIndex, t[6] = r.pageSize, t[7] = a, t[8] = c.rows.length, t[9] = n.setPageIndex, t[10] = n.setPageSize, t[11] = l) : l = t[11], l;
|
|
982
|
-
},
|
|
983
|
-
let { data: t, noBorder: n, fullWidth: i, hiddenColumns: a,
|
|
1126
|
+
}, en = (e) => {
|
|
1127
|
+
let { data: t, noBorder: n, fullWidth: i, hiddenColumns: a, defaultHiddenColumns: o, defaultShowStats: d = !0, onRowClick: f, isRowInteractive: p, activeRowId: m, columnIcons: g, columnDescriptions: _, compactHeaders: S, columnStats: E, columnRenderers: A, initialPageSize: j, pageSizeOptions: M = [
|
|
984
1128
|
10,
|
|
985
1129
|
20,
|
|
986
1130
|
30,
|
|
987
1131
|
50,
|
|
988
1132
|
100
|
|
989
|
-
], rowActions:
|
|
1133
|
+
], rowActions: N = [], getRowActions: F, getRowId: I, toolbarStorageKey: ne, enableRowActivation: L = !1, getCellContextMenuActions: R } = e, [z, B] = Y([]), [V, re] = Y(() => ({
|
|
990
1134
|
pageIndex: 0,
|
|
991
|
-
pageSize: l({ initialPageSize:
|
|
992
|
-
})), [
|
|
1135
|
+
pageSize: l({ initialPageSize: j })
|
|
1136
|
+
})), [U, W] = Y({}), [G, oe] = Y(d), [J, se] = Y(!1), [le, ue] = Y(() => {
|
|
993
1137
|
let e = new Set(a ?? []);
|
|
994
1138
|
return Object.keys(t[0] || {}).filter((t) => !e.has(t));
|
|
995
|
-
}), [
|
|
996
|
-
toolbarStorageKey:
|
|
997
|
-
columnKeys:
|
|
998
|
-
}),
|
|
1139
|
+
}), [de, fe] = Y(() => new Set(o)), pe = new Set(a ?? []), me = Object.keys(t[0] || {}).filter((e) => !pe.has(e)), X = D(me, le), he = new Set(X.filter((e) => !de.has(e))), ge = X.filter((e) => he.has(e)), Z = T(e), _e = h(e), ve = ee(t, X, S, A), ye = x(t, X, I, A), be = u({
|
|
1140
|
+
toolbarStorageKey: ne,
|
|
1141
|
+
columnKeys: me
|
|
1142
|
+
}), xe = b(be, (e) => e.filters, {
|
|
999
1143
|
settings: { viewMode: "list" },
|
|
1000
1144
|
views: e.defaultViews,
|
|
1001
1145
|
activeViewId: e.defaultActiveViewId
|
|
1002
|
-
}),
|
|
1003
|
-
columnIcons:
|
|
1146
|
+
}), Se = O(ye, xe, ve).map((e) => e.sourceRow), Ce = Bt(t, ge, {
|
|
1147
|
+
columnIcons: g,
|
|
1004
1148
|
columnDescriptions: _,
|
|
1005
|
-
compactHeaders:
|
|
1006
|
-
enableSelection:
|
|
1007
|
-
rowActions:
|
|
1008
|
-
getRowActions:
|
|
1009
|
-
selectedRowIds:
|
|
1010
|
-
columnRenderers:
|
|
1011
|
-
wrapRows:
|
|
1012
|
-
}),
|
|
1013
|
-
data:
|
|
1014
|
-
columns:
|
|
1149
|
+
compactHeaders: S,
|
|
1150
|
+
enableSelection: Z,
|
|
1151
|
+
rowActions: N,
|
|
1152
|
+
getRowActions: F,
|
|
1153
|
+
selectedRowIds: U,
|
|
1154
|
+
columnRenderers: A,
|
|
1155
|
+
wrapRows: J
|
|
1156
|
+
}), Q = je({
|
|
1157
|
+
data: Se,
|
|
1158
|
+
columns: Ce,
|
|
1015
1159
|
defaultColumn: {
|
|
1016
1160
|
size: 150,
|
|
1017
1161
|
minSize: 40,
|
|
1018
1162
|
maxSize: 800
|
|
1019
1163
|
},
|
|
1020
1164
|
state: {
|
|
1021
|
-
sorting:
|
|
1022
|
-
pagination:
|
|
1023
|
-
rowSelection:
|
|
1165
|
+
sorting: z,
|
|
1166
|
+
pagination: V,
|
|
1167
|
+
rowSelection: U
|
|
1024
1168
|
},
|
|
1025
|
-
getRowId: (e, t) => y(e, t,
|
|
1169
|
+
getRowId: (e, t) => y(e, t, I),
|
|
1026
1170
|
columnResizeMode: "onChange",
|
|
1027
1171
|
columnResizeDirection: "ltr",
|
|
1028
|
-
onSortingChange:
|
|
1029
|
-
onPaginationChange:
|
|
1030
|
-
onRowSelectionChange:
|
|
1031
|
-
getSortedRowModel:
|
|
1032
|
-
getCoreRowModel:
|
|
1033
|
-
getPaginationRowModel:
|
|
1034
|
-
enableMultiRowSelection:
|
|
1035
|
-
enableRowSelection:
|
|
1172
|
+
onSortingChange: B,
|
|
1173
|
+
onPaginationChange: re,
|
|
1174
|
+
onRowSelectionChange: W,
|
|
1175
|
+
getSortedRowModel: Ae(),
|
|
1176
|
+
getCoreRowModel: Oe(),
|
|
1177
|
+
getPaginationRowModel: ke(),
|
|
1178
|
+
enableMultiRowSelection: Z,
|
|
1179
|
+
enableRowSelection: Z,
|
|
1036
1180
|
autoResetAll: !1
|
|
1037
1181
|
});
|
|
1038
|
-
|
|
1039
|
-
let e =
|
|
1040
|
-
e === 0 ||
|
|
1182
|
+
ce(() => {
|
|
1183
|
+
let e = Q.getPageCount();
|
|
1184
|
+
e === 0 || V.pageIndex < e || re((t) => ({
|
|
1041
1185
|
...t,
|
|
1042
1186
|
pageIndex: Math.max(e - 1, 0)
|
|
1043
1187
|
}));
|
|
1044
|
-
}, [
|
|
1045
|
-
let
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
wrapRows: ne,
|
|
1056
|
-
showStats: J,
|
|
1057
|
-
statsAvailable: !!C,
|
|
1058
|
-
onColumnVisibilityChange: (e, t) => ce((n) => {
|
|
1059
|
-
let r = new Set(n);
|
|
1060
|
-
return t ? r.delete(e) : r.add(e), r;
|
|
1061
|
-
}),
|
|
1062
|
-
onColumnReorder: (e, t) => oe((n) => c(E(ue, n), e, t)),
|
|
1063
|
-
onWrapRowsChange: ie,
|
|
1064
|
-
onStatsVisibilityChange: Y
|
|
1188
|
+
}, [V.pageIndex, Q]);
|
|
1189
|
+
let we = Qt(Q), Te = Q.getSelectedRowModel().rows, Ee = Q.getCoreRowModel().rows, De = v(Te), Me = /* @__PURE__ */ K(Ht, {
|
|
1190
|
+
columns: Zt(X, S),
|
|
1191
|
+
visibleColumnIds: he,
|
|
1192
|
+
wrapRows: J,
|
|
1193
|
+
showStats: G,
|
|
1194
|
+
statsAvailable: !!E,
|
|
1195
|
+
onColumnVisibilityChange: (e, t) => fe((n) => w(n, e, t)),
|
|
1196
|
+
onColumnReorder: (e, t) => ue((n) => c(D(me, n), e, t)),
|
|
1197
|
+
onWrapRowsChange: se,
|
|
1198
|
+
onStatsVisibilityChange: oe
|
|
1065
1199
|
});
|
|
1066
|
-
return /* @__PURE__ */
|
|
1200
|
+
return /* @__PURE__ */ q(P, {
|
|
1067
1201
|
direction: "column",
|
|
1068
1202
|
height: "100%",
|
|
1069
1203
|
width: "100%",
|
|
1070
1204
|
children: [
|
|
1071
|
-
/* @__PURE__ */
|
|
1072
|
-
rows:
|
|
1073
|
-
storageKey:
|
|
1074
|
-
attributes:
|
|
1075
|
-
columnControl:
|
|
1205
|
+
/* @__PURE__ */ K(k, {
|
|
1206
|
+
rows: ye,
|
|
1207
|
+
storageKey: be,
|
|
1208
|
+
attributes: ve,
|
|
1209
|
+
columnControl: Me,
|
|
1076
1210
|
defaultViews: e.defaultViews,
|
|
1077
1211
|
defaultActiveViewId: e.defaultActiveViewId
|
|
1078
1212
|
}),
|
|
1079
|
-
/* @__PURE__ */
|
|
1213
|
+
/* @__PURE__ */ q(te, {
|
|
1080
1214
|
position: "relative",
|
|
1081
1215
|
flex: "1",
|
|
1082
1216
|
minHeight: "0",
|
|
1083
|
-
children: [/* @__PURE__ */
|
|
1217
|
+
children: [/* @__PURE__ */ K(r, {
|
|
1084
1218
|
height: "100%",
|
|
1085
1219
|
maxWidth: "unset",
|
|
1086
1220
|
showHorizontalScrollbar: !0,
|
|
1087
|
-
children: /* @__PURE__ */
|
|
1221
|
+
children: /* @__PURE__ */ q(H.Root, {
|
|
1088
1222
|
className: `data-table${i ? " full-width" : ""}`,
|
|
1089
1223
|
style: {
|
|
1090
|
-
...
|
|
1091
|
-
width: i ? "100%" :
|
|
1224
|
+
...we,
|
|
1225
|
+
width: i ? "100%" : Q.getTotalSize()
|
|
1092
1226
|
},
|
|
1093
|
-
children: [/* @__PURE__ */
|
|
1227
|
+
children: [/* @__PURE__ */ K(H.Header, { children: Q.getHeaderGroups().map((e) => /* @__PURE__ */ q(ie, { children: [/* @__PURE__ */ K(H.Row, {
|
|
1094
1228
|
className: "data-table-column-header-row",
|
|
1095
1229
|
borderRight: n ? "none" : "1px solid",
|
|
1096
1230
|
borderColor: "border.subtle",
|
|
1097
|
-
children: e.headers.map((t) => /* @__PURE__ */
|
|
1231
|
+
children: e.headers.map((t) => /* @__PURE__ */ K(qt, {
|
|
1098
1232
|
header: t,
|
|
1099
1233
|
headerGroup: e,
|
|
1100
|
-
table:
|
|
1234
|
+
table: Q,
|
|
1101
1235
|
fullWidth: i,
|
|
1102
1236
|
hasDescription: !!_?.[t.column.id]
|
|
1103
1237
|
}, t.id))
|
|
1104
|
-
}),
|
|
1238
|
+
}), E && G ? /* @__PURE__ */ K(ae, {
|
|
1105
1239
|
fallback: null,
|
|
1106
|
-
children: /* @__PURE__ */
|
|
1240
|
+
children: /* @__PURE__ */ K(Xt, {
|
|
1107
1241
|
headerGroup: e,
|
|
1108
|
-
rows:
|
|
1109
|
-
columnStats:
|
|
1242
|
+
rows: Se,
|
|
1243
|
+
columnStats: E,
|
|
1110
1244
|
noBorder: n,
|
|
1111
1245
|
fullWidth: i
|
|
1112
1246
|
})
|
|
1113
|
-
}) : null] }, e.id)) }), /* @__PURE__ */
|
|
1114
|
-
let t =
|
|
1115
|
-
enableRowActivation:
|
|
1247
|
+
}) : null] }, e.id)) }), /* @__PURE__ */ K(H.Body, { children: Q.getRowModel().rows.map((e) => {
|
|
1248
|
+
let t = f ? p?.(e.original) ?? !0 : !1, r = s({
|
|
1249
|
+
enableRowActivation: L,
|
|
1116
1250
|
activeRowId: m,
|
|
1117
1251
|
rowId: e.id
|
|
1118
1252
|
}), i = e.getIsSelected();
|
|
1119
|
-
return /* @__PURE__ */
|
|
1253
|
+
return /* @__PURE__ */ K(Yt, {
|
|
1120
1254
|
row: e,
|
|
1121
1255
|
noBorder: n,
|
|
1122
1256
|
rowIsInteractive: t,
|
|
1123
1257
|
rowIsActive: r,
|
|
1124
1258
|
rowIsSelected: i,
|
|
1125
|
-
wrapRows:
|
|
1126
|
-
onRowClick:
|
|
1127
|
-
getCellContextMenuActions:
|
|
1259
|
+
wrapRows: J,
|
|
1260
|
+
onRowClick: f,
|
|
1261
|
+
getCellContextMenuActions: R
|
|
1128
1262
|
}, e.id);
|
|
1129
1263
|
}) })]
|
|
1130
1264
|
})
|
|
1131
|
-
}),
|
|
1132
|
-
selectedCount:
|
|
1133
|
-
totalCount:
|
|
1134
|
-
onClearSelection: () =>
|
|
1135
|
-
onSelectAll: () =>
|
|
1136
|
-
actions:
|
|
1265
|
+
}), Z && Te.length > 0 ? /* @__PURE__ */ K(C, {
|
|
1266
|
+
selectedCount: Te.length,
|
|
1267
|
+
totalCount: Ee.length,
|
|
1268
|
+
onClearSelection: () => Q.toggleAllRowsSelected(!1),
|
|
1269
|
+
onSelectAll: () => Q.toggleAllRowsSelected(!0),
|
|
1270
|
+
actions: _e,
|
|
1137
1271
|
selectedRows: De
|
|
1138
1272
|
}) : null]
|
|
1139
1273
|
}),
|
|
1140
|
-
|
|
1141
|
-
table:
|
|
1142
|
-
pagination:
|
|
1143
|
-
pageSizeOptions:
|
|
1274
|
+
Q.getPageCount() > 1 && /* @__PURE__ */ K($t, {
|
|
1275
|
+
table: Q,
|
|
1276
|
+
pagination: V,
|
|
1277
|
+
pageSizeOptions: M
|
|
1144
1278
|
})
|
|
1145
1279
|
]
|
|
1146
1280
|
});
|
|
1147
|
-
},
|
|
1148
|
-
let t =
|
|
1281
|
+
}, tn = (e) => {
|
|
1282
|
+
let t = G(4);
|
|
1149
1283
|
if (e.editMode) {
|
|
1150
1284
|
let n;
|
|
1151
|
-
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */
|
|
1285
|
+
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ K(E, { ...e }), t[0] = e, t[1] = n), n;
|
|
1152
1286
|
}
|
|
1153
1287
|
let n;
|
|
1154
|
-
return t[2] === e ? n = t[3] : (n = /* @__PURE__ */
|
|
1155
|
-
},
|
|
1288
|
+
return t[2] === e ? n = t[3] : (n = /* @__PURE__ */ K(en, { ...e }), t[2] = e, t[3] = n), n;
|
|
1289
|
+
}, nn = [
|
|
1156
1290
|
"70%",
|
|
1157
1291
|
"45%",
|
|
1158
1292
|
"60%",
|
|
1159
1293
|
"35%",
|
|
1160
1294
|
"55%"
|
|
1161
|
-
],
|
|
1162
|
-
let t =
|
|
1163
|
-
t[0] !== a || t[1] !== n ? (s = n && n.length > 0 ? n : Array.from({ length: a },
|
|
1295
|
+
], rn = (e) => {
|
|
1296
|
+
let t = G(15), { columns: n, columnCount: r, rowCount: i } = e, a = r === void 0 ? 3 : r, o = i === void 0 ? 5 : i, s;
|
|
1297
|
+
t[0] !== a || t[1] !== n ? (s = n && n.length > 0 ? n : Array.from({ length: a }, an), t[0] = a, t[1] = n, t[2] = s) : s = t[2];
|
|
1164
1298
|
let c = s, l;
|
|
1165
|
-
t[3] === c ? l = t[4] : (l = c.map(
|
|
1299
|
+
t[3] === c ? l = t[4] : (l = c.map(on), t[3] = c, t[4] = l);
|
|
1166
1300
|
let u;
|
|
1167
|
-
t[5] === l ? u = t[6] : (u = /* @__PURE__ */
|
|
1301
|
+
t[5] === l ? u = t[6] : (u = /* @__PURE__ */ K(H.Header, { children: /* @__PURE__ */ K(H.Row, {
|
|
1168
1302
|
className: "data-table-column-header-row",
|
|
1169
1303
|
borderRight: "1px solid",
|
|
1170
1304
|
borderColor: "border.subtle",
|
|
@@ -1173,34 +1307,34 @@ var Pt = /* @__PURE__ */ new Set([
|
|
|
1173
1307
|
let d;
|
|
1174
1308
|
if (t[7] !== c || t[8] !== o) {
|
|
1175
1309
|
let e;
|
|
1176
|
-
t[10] === c ? e = t[11] : (e = (e, t) => /* @__PURE__ */
|
|
1310
|
+
t[10] === c ? e = t[11] : (e = (e, t) => /* @__PURE__ */ K(H.Row, { children: c.map((e, n) => /* @__PURE__ */ K(H.Cell, {
|
|
1177
1311
|
padding: "xs",
|
|
1178
1312
|
borderRight: "1px solid",
|
|
1179
1313
|
borderColor: "border.subtle",
|
|
1180
1314
|
_last: { borderRight: "none" },
|
|
1181
1315
|
borderBottom: "none",
|
|
1182
|
-
children: /* @__PURE__ */
|
|
1316
|
+
children: /* @__PURE__ */ K(V, {
|
|
1183
1317
|
height: "14px",
|
|
1184
|
-
width:
|
|
1318
|
+
width: nn[(t + n) % nn.length],
|
|
1185
1319
|
borderRadius: "xs"
|
|
1186
1320
|
})
|
|
1187
|
-
}, e.id)) }, t), t[10] = c, t[11] = e), d = /* @__PURE__ */
|
|
1321
|
+
}, e.id)) }, t), t[10] = c, t[11] = e), d = /* @__PURE__ */ K(H.Body, { children: Array.from({ length: o }, e) }), t[7] = c, t[8] = o, t[9] = d;
|
|
1188
1322
|
} else d = t[9];
|
|
1189
1323
|
let f;
|
|
1190
|
-
return t[12] !== u || t[13] !== d ? (f = /* @__PURE__ */
|
|
1324
|
+
return t[12] !== u || t[13] !== d ? (f = /* @__PURE__ */ q(H.Root, {
|
|
1191
1325
|
className: "data-table full-width",
|
|
1192
1326
|
width: "100%",
|
|
1193
1327
|
children: [u, d]
|
|
1194
1328
|
}), t[12] = u, t[13] = d, t[14] = f) : f = t[14], f;
|
|
1195
1329
|
};
|
|
1196
|
-
function
|
|
1330
|
+
function an(e, t) {
|
|
1197
1331
|
return {
|
|
1198
1332
|
id: `column-${t + 1}`,
|
|
1199
1333
|
label: ""
|
|
1200
1334
|
};
|
|
1201
1335
|
}
|
|
1202
|
-
function
|
|
1203
|
-
return /* @__PURE__ */
|
|
1336
|
+
function on(e) {
|
|
1337
|
+
return /* @__PURE__ */ K(H.ColumnHeader, {
|
|
1204
1338
|
textTransform: "none",
|
|
1205
1339
|
borderRight: "1px solid",
|
|
1206
1340
|
_last: { borderRight: "none" },
|
|
@@ -1208,13 +1342,13 @@ function qt(e) {
|
|
|
1208
1342
|
paddingX: "xs",
|
|
1209
1343
|
paddingY: "xs",
|
|
1210
1344
|
whiteSpace: "nowrap",
|
|
1211
|
-
children: e.label ? /* @__PURE__ */
|
|
1345
|
+
children: e.label ? /* @__PURE__ */ K(U, {
|
|
1212
1346
|
as: "div",
|
|
1213
1347
|
textStyle: "label/S/medium",
|
|
1214
1348
|
lineHeight: "1.2",
|
|
1215
1349
|
truncate: !0,
|
|
1216
1350
|
children: e.label
|
|
1217
|
-
}) : /* @__PURE__ */
|
|
1351
|
+
}) : /* @__PURE__ */ K(V, {
|
|
1218
1352
|
height: "12px",
|
|
1219
1353
|
width: "4rem",
|
|
1220
1354
|
borderRadius: "xs"
|
|
@@ -1222,6 +1356,6 @@ function qt(e) {
|
|
|
1222
1356
|
}, e.id);
|
|
1223
1357
|
}
|
|
1224
1358
|
//#endregion
|
|
1225
|
-
export {
|
|
1359
|
+
export { tn as DataTable, rn as DataTableSkeleton, St as FriendlyJsonDisplay, d as formatDisplayValue, f as getIcon };
|
|
1226
1360
|
|
|
1227
1361
|
//# sourceMappingURL=data-table.js.map
|