@pstdio/ui 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MermaidComponent-AmAjWLPm.js → MermaidComponent-BVMyKttu.js} +2 -2
- package/dist/{MermaidComponent-AmAjWLPm.js.map → MermaidComponent-BVMyKttu.js.map} +1 -1
- package/dist/chat-ui.js +2 -6
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/data-table/build-columns.d.ts +1 -0
- package/dist/components/data-table/types.d.ts +1 -0
- package/dist/components/diff-viewer/code-editor.d.ts +2 -0
- package/dist/components/diff-viewer/file-change-badge.d.ts +3 -0
- package/dist/components/diff-viewer/file-list-panel.d.ts +0 -1
- package/dist/components/diff-viewer/index.d.ts +2 -0
- package/dist/components/param-editor/param-editor.types.d.ts +2 -0
- package/dist/components/tag-editor/tag-editor-row.d.ts +1 -0
- package/dist/components/tag-editor/tag-editor.types.d.ts +1 -0
- package/dist/components/tag-editor/tag-settings-panel.d.ts +1 -1
- package/dist/components/tree-list/tree-list-background.d.ts +8 -0
- package/dist/components/tree-list/tree-list-drag.d.ts +7 -0
- package/dist/components/tree-list/tree-list-inline-creation-story.d.ts +3 -0
- package/dist/components/tree-list/tree-list-inline-input.d.ts +9 -0
- package/dist/components/tree-list/tree-list-move-surface.d.ts +7 -0
- package/dist/components/tree-list/tree-list-node-row.d.ts +1 -0
- package/dist/components/tree-list/tree-list.d.ts +2 -0
- package/dist/components/tree-list/tree-list.types.d.ts +13 -0
- package/dist/data-table.js +666 -643
- package/dist/data-table.js.map +1 -1
- package/dist/diff.js +799 -815
- package/dist/diff.js.map +1 -1
- package/dist/{edit-mode-data-table-4GMiDy75.js → edit-mode-data-table-D6NeiDJx.js} +3 -3
- package/dist/{edit-mode-data-table-4GMiDy75.js.map → edit-mode-data-table-D6NeiDJx.js.map} +1 -1
- package/dist/{editor-config-Dyh8n5A2.js → editor-config-D9OksZ93.js} +3 -3
- package/dist/{editor-config-Dyh8n5A2.js.map → editor-config-D9OksZ93.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1025 -1042
- package/dist/index.js.map +1 -1
- package/dist/{kanban-renderer-toolbar-BcUZvGyY.js → kanban-renderer-toolbar-CpegGbwq.js} +2 -2
- package/dist/{kanban-renderer-toolbar-BcUZvGyY.js.map → kanban-renderer-toolbar-CpegGbwq.js.map} +1 -1
- package/dist/kanban-renderer.js +5 -5
- package/dist/{lazy-markdown-editor-CWSREEhf.js → lazy-markdown-editor-B7uP2ALS.js} +2 -2
- package/dist/{lazy-markdown-editor-CWSREEhf.js.map → lazy-markdown-editor-B7uP2ALS.js.map} +1 -1
- package/dist/{list-row-B8L4TGsh.js → list-row-9oxy-F0v.js} +228 -253
- package/dist/list-row-9oxy-F0v.js.map +1 -0
- package/dist/{param-editor-w3xH-t8A.js → param-editor-B8Ff9Nm8.js} +2 -2
- package/dist/{param-editor-w3xH-t8A.js.map → param-editor-B8Ff9Nm8.js.map} +1 -1
- package/dist/{param-editor-field-C8zRDStn.js → param-editor-field-Cu4pto_a.js} +3 -3
- package/dist/{param-editor-field-C8zRDStn.js.map → param-editor-field-Cu4pto_a.js.map} +1 -1
- package/dist/{rich-message-jZ2oPQhU.js → rich-message-DdFYRzTo.js} +2 -2
- package/dist/{rich-message-jZ2oPQhU.js.map → rich-message-DdFYRzTo.js.map} +1 -1
- package/dist/rich-text.js +4 -4
- package/dist/terminal.js +1 -1
- package/dist/terminal.js.map +1 -1
- package/dist/theme/recipes/input.d.ts +32 -0
- package/dist/{theme-J8K8KbZi.js → theme-BH4fSst9.js} +33 -1
- package/dist/theme-BH4fSst9.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/tree-list-uV4UFj0x.js +1116 -0
- package/dist/tree-list-uV4UFj0x.js.map +1 -0
- package/package.json +1 -1
- package/dist/list-row-B8L4TGsh.js.map +0 -1
- package/dist/theme-J8K8KbZi.js.map +0 -1
- package/dist/tree-list-CC13pOYi.js +0 -1033
- package/dist/tree-list-CC13pOYi.js.map +0 -1
package/dist/data-table.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as _, Fragment as st } from "react/jsx-runtime";
|
|
2
2
|
import { c as z } from "react/compiler-runtime";
|
|
3
|
-
import { Text as O, Popover as Q, HStack as
|
|
4
|
-
import { flexRender as
|
|
5
|
-
import { isValidElement as
|
|
6
|
-
import { S as xe, T as
|
|
7
|
-
import { u as
|
|
8
|
-
import { Braces as
|
|
3
|
+
import { Text as O, Popover as Q, HStack as je, Portal as ce, Image as at, Button as ct, chakra as ie, Icon as Y, Menu as X, IconButton as Se, Stack as ke, Box as oe, Table as L, Flex as ee, Skeleton as Ee } from "@chakra-ui/react";
|
|
4
|
+
import { flexRender as he, useReactTable as dt, getPaginationRowModel as ut, getCoreRowModel as mt, getSortedRowModel as ft } from "@tanstack/react-table";
|
|
5
|
+
import { isValidElement as Be, cloneElement as gt, useRef as _e, useState as Z, useEffect as We, Fragment as ht } from "react";
|
|
6
|
+
import { S as xe, T as Fe } from "./browser-storage-DPtOQJx0.js";
|
|
7
|
+
import { u as bt } from "./kanban-renderer-toolbar-CpegGbwq.js";
|
|
8
|
+
import { Braces as pt, ChevronRight as St, CircleHelp as xt, Minus as wt, Check as we, ChevronDown as yt, Settings2 as Ct, GripVertical as vt, ArrowUpAZ as Ke, ArrowDownAZ as Je, MoreVertical as Rt } from "lucide-react";
|
|
9
9
|
import { C as ye } from "./number-input-WUfejtNx.js";
|
|
10
|
-
import { L as
|
|
11
|
-
import { c as
|
|
12
|
-
import { P as
|
|
13
|
-
import { useSensors as
|
|
14
|
-
import { SortableContext as
|
|
15
|
-
import { CSS as
|
|
16
|
-
import { b as
|
|
17
|
-
import { useChart as
|
|
18
|
-
import { XAxis as
|
|
19
|
-
const
|
|
10
|
+
import { L as se, S as It, R as At } from "./list-row-9oxy-F0v.js";
|
|
11
|
+
import { c as ne, g as $t, i as Xe, f as kt, E as _t, r as zt, a as ze, s as Tt, b as Dt, d as Vt, e as Mt, h as Pt, j as Ht, k as Lt, l as Ot, m as Nt, D as jt, n as Et, S as Bt, P as Wt } from "./edit-mode-data-table-D6NeiDJx.js";
|
|
12
|
+
import { P as Ft } from "./param-editor-B8Ff9Nm8.js";
|
|
13
|
+
import { useSensors as Kt, useSensor as Jt, PointerSensor as Xt, DndContext as qt, closestCenter as Gt } from "@dnd-kit/core";
|
|
14
|
+
import { SortableContext as Ut, verticalListSortingStrategy as Yt, useSortable as Zt } from "@dnd-kit/sortable";
|
|
15
|
+
import { CSS as Qt } from "@dnd-kit/utilities";
|
|
16
|
+
import { b as el } from "./param-editor-field-Cu4pto_a.js";
|
|
17
|
+
import { useChart as tl, Chart as Te } from "@chakra-ui/charts";
|
|
18
|
+
import { XAxis as ll, YAxis as ol, Bar as nl, Tooltip as rl, BarChart as il, useActiveTooltipCoordinate as sl, usePlotArea as al } from "recharts";
|
|
19
|
+
const qe = (l, e) => e.find((t) => Object.is(t.value, l))?.color ?? null, cl = (l) => {
|
|
20
20
|
const {
|
|
21
21
|
children: e
|
|
22
|
-
} =
|
|
22
|
+
} = l;
|
|
23
23
|
return e;
|
|
24
|
-
},
|
|
25
|
-
const e =
|
|
26
|
-
return /^[\da-f]{6}$/i.test(
|
|
27
|
-
r: Number.parseInt(
|
|
28
|
-
g: Number.parseInt(
|
|
29
|
-
b: Number.parseInt(
|
|
24
|
+
}, dl = "#111827", ul = "#ffffff", ml = "#000000", fl = 4.5, gl = (l) => l.split("").map((e) => e + e).join(""), le = (l) => {
|
|
25
|
+
const e = l.trim(), t = e.startsWith("#") ? e.slice(1) : e, o = t.length === 3 ? gl(t) : t;
|
|
26
|
+
return /^[\da-f]{6}$/i.test(o) ? {
|
|
27
|
+
r: Number.parseInt(o.slice(0, 2), 16),
|
|
28
|
+
g: Number.parseInt(o.slice(2, 4), 16),
|
|
29
|
+
b: Number.parseInt(o.slice(4, 6), 16)
|
|
30
30
|
} : null;
|
|
31
|
-
}, fe = (
|
|
32
|
-
const e =
|
|
31
|
+
}, fe = (l) => {
|
|
32
|
+
const e = l / 255;
|
|
33
33
|
return e <= 0.03928 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
|
|
34
|
-
},
|
|
35
|
-
const t =
|
|
34
|
+
}, De = (l) => 0.2126 * fe(l.r) + 0.7152 * fe(l.g) + 0.0722 * fe(l.b), hl = (l, e) => {
|
|
35
|
+
const t = De(l), o = De(e), n = Math.max(t, o), r = Math.min(t, o);
|
|
36
36
|
return (n + 0.05) / (r + 0.05);
|
|
37
|
-
}, be = (
|
|
37
|
+
}, be = (l) => {
|
|
38
38
|
const e = (t) => Math.round(t).toString(16).padStart(2, "0");
|
|
39
|
-
return `#${e(
|
|
40
|
-
},
|
|
41
|
-
r:
|
|
42
|
-
g:
|
|
43
|
-
b:
|
|
44
|
-
}),
|
|
39
|
+
return `#${e(l.r)}${e(l.g)}${e(l.b)}`;
|
|
40
|
+
}, Ge = (l, e, t) => ({
|
|
41
|
+
r: l.r * (1 - t) + e.r * t,
|
|
42
|
+
g: l.g * (1 - t) + e.g * t,
|
|
43
|
+
b: l.b * (1 - t) + e.b * t
|
|
44
|
+
}), Ve = (l, e) => {
|
|
45
45
|
for (let t = 1; t <= 50; t += 1) {
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
46
|
+
const o = Ge(l, e, t / 50);
|
|
47
|
+
if (hl(o, l) >= fl)
|
|
48
48
|
return {
|
|
49
|
-
color: be(
|
|
49
|
+
color: be(o),
|
|
50
50
|
step: t
|
|
51
51
|
};
|
|
52
52
|
}
|
|
@@ -54,439 +54,460 @@ const Xe = (o, e) => e.find((t) => Object.is(t.value, o))?.color ?? null, ao = (
|
|
|
54
54
|
color: be(e),
|
|
55
55
|
step: 50
|
|
56
56
|
};
|
|
57
|
-
},
|
|
58
|
-
const e =
|
|
59
|
-
if (!e) return
|
|
60
|
-
const t =
|
|
57
|
+
}, Me = (l) => {
|
|
58
|
+
const e = le(l);
|
|
59
|
+
if (!e) return dl;
|
|
60
|
+
const t = le(ml), o = le(ul), n = Ve(e, t), r = Ve(e, o);
|
|
61
61
|
return n.step <= r.step ? n.color : r.color;
|
|
62
|
-
},
|
|
63
|
-
const
|
|
64
|
-
return !
|
|
65
|
-
},
|
|
66
|
-
const e =
|
|
62
|
+
}, bl = (l, e, t) => {
|
|
63
|
+
const o = le(l), n = le(e);
|
|
64
|
+
return !o || !n ? null : be(Ge(o, n, 1 - t));
|
|
65
|
+
}, Pe = (l) => {
|
|
66
|
+
const e = l.foreground?.light ?? Me(l.light), t = l.foreground?.dark ?? Me(l.dark);
|
|
67
67
|
return {
|
|
68
|
-
backgroundColor: `light-dark(${
|
|
68
|
+
backgroundColor: `light-dark(${l.light}, ${l.dark})`,
|
|
69
69
|
color: `light-dark(${e}, ${t})`
|
|
70
70
|
};
|
|
71
|
-
},
|
|
72
|
-
const
|
|
73
|
-
return
|
|
74
|
-
},
|
|
75
|
-
const
|
|
76
|
-
light:
|
|
77
|
-
dark:
|
|
71
|
+
}, pl = (l) => Math.round(l * 100) / 100, re = (l, e, t) => {
|
|
72
|
+
const o = bl(l, e, t);
|
|
73
|
+
return o || `color-mix(in srgb, ${l} ${pl(t * 100)}%, ${e})`;
|
|
74
|
+
}, Sl = (l, e, t) => {
|
|
75
|
+
const o = l.foreground && e.foreground ? {
|
|
76
|
+
light: re(l.foreground.light, e.foreground.light, t),
|
|
77
|
+
dark: re(l.foreground.dark, e.foreground.dark, t)
|
|
78
78
|
} : void 0;
|
|
79
79
|
return {
|
|
80
|
-
light:
|
|
81
|
-
dark:
|
|
82
|
-
...
|
|
83
|
-
foreground:
|
|
80
|
+
light: re(l.light, e.light, t),
|
|
81
|
+
dark: re(l.dark, e.dark, t),
|
|
82
|
+
...o ? {
|
|
83
|
+
foreground: o
|
|
84
84
|
} : {}
|
|
85
85
|
};
|
|
86
|
-
},
|
|
87
|
-
if (typeof
|
|
88
|
-
const t = e[0],
|
|
89
|
-
if (
|
|
90
|
-
if (
|
|
91
|
-
if (
|
|
92
|
-
const r = e.findIndex((m) =>
|
|
93
|
-
return
|
|
94
|
-
},
|
|
86
|
+
}, Ue = (l, e) => {
|
|
87
|
+
if (typeof l != "number" || !Number.isFinite(l) || e.length < 2) return null;
|
|
88
|
+
const t = e[0], o = e[e.length - 1];
|
|
89
|
+
if (o.value - t.value <= 0) return null;
|
|
90
|
+
if (l <= t.value) return t.color;
|
|
91
|
+
if (l >= o.value) return o.color;
|
|
92
|
+
const r = e.findIndex((m) => l <= m.value), c = e[r - 1], i = e[r], d = 1 - (l - c.value) / (i.value - c.value);
|
|
93
|
+
return Sl(c.color, i.color, d);
|
|
94
|
+
}, xl = (l) => {
|
|
95
95
|
const e = z(2), {
|
|
96
96
|
value: t
|
|
97
|
-
} =
|
|
98
|
-
let
|
|
99
|
-
return e[0] !== t ? (
|
|
100
|
-
},
|
|
101
|
-
const e =
|
|
97
|
+
} = l;
|
|
98
|
+
let o;
|
|
99
|
+
return e[0] !== t ? (o = /* @__PURE__ */ a(O, { textStyle: "paragraph/S/medium", fontVariantNumeric: "tabular-nums", truncate: !0, children: t }), e[0] = t, e[1] = o) : o = e[1], o;
|
|
100
|
+
}, wl = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, yl = /(^|\s)(avatar|image|logo|photo|picture|thumbnail)(\s|$)/i, Cl = (l) => {
|
|
101
|
+
const e = l.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
|
|
102
102
|
return e ? `${e[0]?.toUpperCase()}${e.slice(1)}` : "Details";
|
|
103
|
-
},
|
|
104
|
-
if (Array.isArray(
|
|
105
|
-
if (
|
|
103
|
+
}, ge = (l) => l.map((e) => /^\d+$/.test(e) ? e : Cl(e)).join(" / "), vl = (l) => l.every((e) => e === null || typeof e != "object"), pe = (l, e, t) => {
|
|
104
|
+
if (Array.isArray(l)) {
|
|
105
|
+
if (l.length === 0 || vl(l)) {
|
|
106
106
|
t.push({
|
|
107
|
-
label:
|
|
108
|
-
value:
|
|
107
|
+
label: ge(e),
|
|
108
|
+
value: l
|
|
109
109
|
});
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
pe(
|
|
112
|
+
l.forEach((o, n) => {
|
|
113
|
+
pe(o, [...e, String(n + 1)], t);
|
|
114
114
|
});
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
|
-
if (
|
|
118
|
-
const
|
|
119
|
-
if (
|
|
117
|
+
if (l !== null && typeof l == "object") {
|
|
118
|
+
const o = Object.entries(l);
|
|
119
|
+
if (o.length === 0) {
|
|
120
120
|
t.push({
|
|
121
|
-
label:
|
|
121
|
+
label: ge(e),
|
|
122
122
|
value: null
|
|
123
123
|
});
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
o.forEach(([n, r]) => {
|
|
127
127
|
pe(r, [...e, n], t);
|
|
128
128
|
});
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
131
|
t.push({
|
|
132
|
-
label:
|
|
133
|
-
value:
|
|
132
|
+
label: ge(e),
|
|
133
|
+
value: l
|
|
134
134
|
});
|
|
135
|
-
},
|
|
136
|
-
if (typeof
|
|
135
|
+
}, Ye = (l) => {
|
|
136
|
+
if (typeof l != "string") return l;
|
|
137
137
|
try {
|
|
138
|
-
return JSON.parse(
|
|
138
|
+
return JSON.parse(l);
|
|
139
139
|
} catch {
|
|
140
|
-
return
|
|
140
|
+
return l;
|
|
141
141
|
}
|
|
142
|
-
}, Ce = (
|
|
142
|
+
}, Ce = (l) => {
|
|
143
143
|
const e = [];
|
|
144
|
-
return pe(
|
|
144
|
+
return pe(Ye(l), [], e), e.map((t) => ({
|
|
145
145
|
...t,
|
|
146
146
|
label: t.label || "Value"
|
|
147
147
|
}));
|
|
148
|
-
},
|
|
149
|
-
if (typeof
|
|
150
|
-
if (
|
|
148
|
+
}, de = (l, e) => {
|
|
149
|
+
if (typeof l != "string") return !1;
|
|
150
|
+
if (l.startsWith("data:image/")) return !0;
|
|
151
151
|
try {
|
|
152
|
-
const t = new URL(
|
|
153
|
-
return t.protocol !== "http:" && t.protocol !== "https:" ? !1 :
|
|
152
|
+
const t = new URL(l);
|
|
153
|
+
return t.protocol !== "http:" && t.protocol !== "https:" ? !1 : wl.test(t.pathname) || yl.test(e);
|
|
154
154
|
} catch {
|
|
155
155
|
return !1;
|
|
156
156
|
}
|
|
157
|
-
}, ve = (
|
|
158
|
-
const e =
|
|
157
|
+
}, ve = (l, e) => Array.isArray(l) && l.length > 0 && l.every((t) => de(t, e)), He = (l) => l == null || l === "" ? "Not provided" : typeof l == "boolean" ? l ? "Yes" : "No" : String(l), Rl = (l) => Array.isArray(l) ? l.length === 0 ? "None" : l.map(He).join(", ") : He(l), Il = (l) => {
|
|
158
|
+
const e = Ye(l);
|
|
159
159
|
if (Array.isArray(e) && e.length === 0 || e !== null && typeof e == "object" && Object.keys(e).length === 0)
|
|
160
160
|
return "No details";
|
|
161
|
-
const t = Ce(
|
|
161
|
+
const t = Ce(l).filter((r) => !de(r.value, r.label) && !ve(r.value, r.label));
|
|
162
162
|
if (t.length === 0) return "No details";
|
|
163
|
-
const
|
|
164
|
-
return [...
|
|
165
|
-
},
|
|
163
|
+
const o = t.slice(0, 2).map((r) => Rl(r.value)), n = t.length - o.length;
|
|
164
|
+
return [...o, n > 0 ? `${n} more` : null].filter(Boolean).join(" · ");
|
|
165
|
+
}, Al = (l) => {
|
|
166
166
|
const {
|
|
167
167
|
label: e,
|
|
168
168
|
value: t
|
|
169
|
-
} =
|
|
170
|
-
return
|
|
169
|
+
} = l;
|
|
170
|
+
return de(t, e) ? {
|
|
171
171
|
type: "image",
|
|
172
172
|
src: String(t),
|
|
173
173
|
alt: `${e} preview`
|
|
174
174
|
} : Array.isArray(t) && ve(t, e) ? {
|
|
175
175
|
type: "image-gallery",
|
|
176
|
-
images: t.map((
|
|
177
|
-
src: String(
|
|
176
|
+
images: t.map((o, n) => ({
|
|
177
|
+
src: String(o),
|
|
178
178
|
alt: `${e} ${n + 1} preview`
|
|
179
179
|
}))
|
|
180
180
|
} : Array.isArray(t) ? t : t === void 0 ? null : t;
|
|
181
|
-
},
|
|
181
|
+
}, $l = (l) => Ce(l).map((e, t) => ({
|
|
182
182
|
id: `friendly-json-${t}`,
|
|
183
183
|
name: e.label,
|
|
184
184
|
type: "readOnly",
|
|
185
|
-
value:
|
|
186
|
-
})),
|
|
185
|
+
value: Al(e)
|
|
186
|
+
})), kl = (l) => {
|
|
187
187
|
const e = z(4), {
|
|
188
188
|
value: t
|
|
189
|
-
} =
|
|
190
|
-
let
|
|
191
|
-
e[0] !== t ? (
|
|
189
|
+
} = l;
|
|
190
|
+
let o;
|
|
191
|
+
e[0] !== t ? (o = $l(t), e[0] = t, e[1] = o) : o = e[1];
|
|
192
192
|
let n;
|
|
193
|
-
return e[2] !==
|
|
194
|
-
},
|
|
193
|
+
return e[2] !== o ? (n = /* @__PURE__ */ a(Ft, { params: o, readOnly: !0, fullWidth: !0 }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
194
|
+
}, _l = (l) => l.stopPropagation(), zl = (l) => {
|
|
195
195
|
const e = z(49), {
|
|
196
196
|
columnLabel: t,
|
|
197
|
-
value:
|
|
198
|
-
} =
|
|
199
|
-
let n, r, c,
|
|
200
|
-
if (e[0] !== t || e[1] !==
|
|
201
|
-
const M = Ce(
|
|
197
|
+
value: o
|
|
198
|
+
} = l;
|
|
199
|
+
let n, r, c, i, s, d, m, u, f, g, p, b, h, x, w, y;
|
|
200
|
+
if (e[0] !== t || e[1] !== o) {
|
|
201
|
+
const M = Ce(o).flatMap(Tl).slice(0, 2);
|
|
202
202
|
let P;
|
|
203
|
-
e[18] !==
|
|
203
|
+
e[18] !== o ? (P = Il(o), e[18] = o, e[19] = P) : P = e[19], i = P, c = Q.Root, e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = {
|
|
204
204
|
placement: "bottom-start",
|
|
205
205
|
offset: {
|
|
206
206
|
mainAxis: 6
|
|
207
207
|
}
|
|
208
|
-
}, e[20] = u) : u = e[20], r = Q.Trigger, m = !0, n =
|
|
208
|
+
}, e[20] = u) : u = e[20], r = Q.Trigger, m = !0, n = ct, s = `View ${t} details`, d = "ghost", f = "xs", g = "full", p = "0", b = "28px", h = "2xs", x = "flex-start", w = _l, y = M.length > 0 ? /* @__PURE__ */ a(je, { gap: "-1", flexShrink: "0", children: M.map(Dl) }) : /* @__PURE__ */ a(pt, { size: 14 }), e[0] = t, e[1] = o, e[2] = n, e[3] = r, e[4] = c, e[5] = i, e[6] = s, e[7] = d, e[8] = m, e[9] = u, e[10] = f, e[11] = g, e[12] = p, e[13] = b, e[14] = h, e[15] = x, e[16] = w, e[17] = y;
|
|
209
209
|
} else
|
|
210
|
-
n = e[2], r = e[3], c = e[4],
|
|
210
|
+
n = e[2], r = e[3], c = e[4], i = e[5], s = e[6], d = e[7], m = e[8], u = e[9], f = e[10], g = e[11], p = e[12], b = e[13], h = e[14], x = e[15], w = e[16], y = e[17];
|
|
211
211
|
let C;
|
|
212
|
-
e[21] !==
|
|
212
|
+
e[21] !== i ? (C = /* @__PURE__ */ a(O, { flex: "1", minWidth: "0", textAlign: "left", textStyle: "paragraph/S/regular", truncate: !0, children: i }), e[21] = i, e[22] = C) : C = e[22];
|
|
213
|
+
let v;
|
|
214
|
+
e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ a(St, { size: 12 }), e[23] = v) : v = e[23];
|
|
213
215
|
let S;
|
|
214
|
-
e[
|
|
215
|
-
let w;
|
|
216
|
-
e[24] !== n || e[25] !== i || e[26] !== d || e[27] !== C || e[28] !== f || e[29] !== g || e[30] !== b || e[31] !== h || e[32] !== v || e[33] !== x || e[34] !== p || e[35] !== y ? (w = /* @__PURE__ */ k(n, { "aria-label": i, variant: d, size: f, width: g, minWidth: b, height: h, paddingX: v, justifyContent: x, onClick: p, children: [
|
|
216
|
+
e[24] !== n || e[25] !== s || e[26] !== d || e[27] !== C || e[28] !== f || e[29] !== g || e[30] !== p || e[31] !== b || e[32] !== h || e[33] !== x || e[34] !== w || e[35] !== y ? (S = /* @__PURE__ */ _(n, { "aria-label": s, variant: d, size: f, width: g, minWidth: p, height: b, paddingX: h, justifyContent: x, onClick: w, children: [
|
|
217
217
|
y,
|
|
218
218
|
C,
|
|
219
|
-
|
|
220
|
-
] }), e[24] = n, e[25] =
|
|
219
|
+
v
|
|
220
|
+
] }), e[24] = n, e[25] = s, e[26] = d, e[27] = C, e[28] = f, e[29] = g, e[30] = p, e[31] = b, e[32] = h, e[33] = x, e[34] = w, e[35] = y, e[36] = S) : S = e[36];
|
|
221
221
|
let I;
|
|
222
|
-
e[37] !== r || e[38] !== m || e[39] !==
|
|
223
|
-
let $;
|
|
224
|
-
e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
|
|
225
|
-
overscrollBehavior: "contain"
|
|
226
|
-
}, e[41] = $) : $ = e[41];
|
|
222
|
+
e[37] !== r || e[38] !== m || e[39] !== S ? (I = /* @__PURE__ */ a(r, { asChild: m, children: S }), e[37] = r, e[38] = m, e[39] = S, e[40] = I) : I = e[40];
|
|
227
223
|
let A;
|
|
228
|
-
e[
|
|
229
|
-
|
|
230
|
-
|
|
224
|
+
e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = {
|
|
225
|
+
overscrollBehavior: "contain"
|
|
226
|
+
}, e[41] = A) : A = e[41];
|
|
227
|
+
let $;
|
|
228
|
+
e[42] !== o ? ($ = /* @__PURE__ */ a(ce, { children: /* @__PURE__ */ a(Q.Positioner, { children: /* @__PURE__ */ a(Q.Content, { width: "min(380px, calc(100vw - 32px))", padding: "0", background: "bg", overflow: "hidden", children: /* @__PURE__ */ a(xe, { maxH: "360px", viewportProps: A, children: /* @__PURE__ */ a(kl, { value: o }) }) }) }) }), e[42] = o, e[43] = $) : $ = e[43];
|
|
229
|
+
let D;
|
|
230
|
+
return e[44] !== c || e[45] !== u || e[46] !== I || e[47] !== $ ? (D = /* @__PURE__ */ _(c, { positioning: u, children: [
|
|
231
231
|
I,
|
|
232
|
-
|
|
233
|
-
] }), e[44] = c, e[45] = u, e[46] = I, e[47] =
|
|
232
|
+
$
|
|
233
|
+
] }), e[44] = c, e[45] = u, e[46] = I, e[47] = $, e[48] = D) : D = e[48], D;
|
|
234
234
|
};
|
|
235
|
-
function
|
|
236
|
-
return
|
|
237
|
-
label: `${
|
|
235
|
+
function Tl(l) {
|
|
236
|
+
return de(l.value, l.label) ? [l] : !Array.isArray(l.value) || !ve(l.value, l.label) ? [] : l.value.map((e, t) => ({
|
|
237
|
+
label: `${l.label} ${t + 1}`,
|
|
238
238
|
value: e
|
|
239
239
|
}));
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
return /* @__PURE__ */
|
|
241
|
+
function Dl(l) {
|
|
242
|
+
return /* @__PURE__ */ a(at, { src: String(l.value), alt: `${l.label} preview`, boxSize: "22px", borderRadius: "xs", borderWidth: "1px", borderColor: "border.subtle", objectFit: "cover" }, l.label);
|
|
243
243
|
}
|
|
244
|
-
const
|
|
244
|
+
const Le = (l) => Xe(l) ? l.sortValue : l, Vl = (l, e) => l === e ? 0 : l == null ? 1 : e == null ? -1 : typeof l == "number" && typeof e == "number" ? l - e : String(l).localeCompare(String(e)), Ml = (l) => Be(l) ? gt(l, {
|
|
245
245
|
style: {
|
|
246
|
-
...
|
|
246
|
+
...l.props.style,
|
|
247
247
|
flexWrap: "nowrap",
|
|
248
248
|
minWidth: 0,
|
|
249
249
|
whiteSpace: "nowrap"
|
|
250
250
|
}
|
|
251
|
-
}) :
|
|
252
|
-
|
|
253
|
-
},
|
|
251
|
+
}) : l, ae = (l) => {
|
|
252
|
+
l.stopPropagation();
|
|
253
|
+
}, Pl = (l) => {
|
|
254
254
|
const e = z(8), {
|
|
255
255
|
table: t
|
|
256
|
-
} =
|
|
257
|
-
let a;
|
|
258
|
-
e[0] !== c ? (a = /* @__PURE__ */ s(Y, { as: c, boxSize: "12px", strokeWidth: "3" }), e[0] = c, e[1] = a) : a = e[1];
|
|
256
|
+
} = l, o = t.getIsAllRowsSelected(), n = !o && t.getIsSomeRowsSelected(), r = o ? !0 : n ? "indeterminate" : !1, c = n ? wt : we;
|
|
259
257
|
let i;
|
|
260
|
-
e[
|
|
258
|
+
e[0] !== c ? (i = /* @__PURE__ */ a(Y, { as: c, boxSize: "12px", strokeWidth: "3" }), e[0] = c, e[1] = i) : i = e[1];
|
|
259
|
+
let s;
|
|
260
|
+
e[2] !== t ? (s = (m) => t.toggleAllRowsSelected(m.checked === !0), e[2] = t, e[3] = s) : s = e[3];
|
|
261
261
|
let d;
|
|
262
|
-
return e[4] !== r || e[5] !==
|
|
263
|
-
},
|
|
262
|
+
return e[4] !== r || e[5] !== i || e[6] !== s ? (d = /* @__PURE__ */ a(ye, { checked: r, "aria-label": "Select all", icon: i, onClick: ae, onCheckedChange: s }), e[4] = r, e[5] = i, e[6] = s, e[7] = d) : d = e[7], d;
|
|
263
|
+
}, Hl = (l) => {
|
|
264
264
|
const e = z(6), {
|
|
265
265
|
row: t,
|
|
266
|
-
selectedRowIds:
|
|
267
|
-
} =
|
|
266
|
+
selectedRowIds: o
|
|
267
|
+
} = l, n = !!o?.[t.id];
|
|
268
268
|
let r;
|
|
269
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
269
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ a(Y, { as: we, boxSize: "12px", strokeWidth: "3" }), e[0] = r) : r = e[0];
|
|
270
270
|
let c;
|
|
271
|
-
e[1] !== t ? (c = (
|
|
272
|
-
let
|
|
273
|
-
return e[3] !== n || e[4] !== c ? (
|
|
274
|
-
},
|
|
275
|
-
const
|
|
271
|
+
e[1] !== t ? (c = (s) => t.toggleSelected(s.checked === !0), e[1] = t, e[2] = c) : c = e[2];
|
|
272
|
+
let i;
|
|
273
|
+
return e[3] !== n || e[4] !== c ? (i = /* @__PURE__ */ a(ye, { checked: n, "aria-label": "Select row", icon: r, onClick: ae, onCheckedChange: c }), e[3] = n, e[4] = c, e[5] = i) : i = e[5], i;
|
|
274
|
+
}, Ll = (l, e) => {
|
|
275
|
+
const t = new Set(e.map((o) => o.label));
|
|
276
|
+
return [...e, ...l.filter((o) => !t.has(o.label))];
|
|
277
|
+
}, Ol = (l) => {
|
|
278
|
+
const e = z(30), {
|
|
276
279
|
row: t,
|
|
277
|
-
actions:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
280
|
+
actions: o,
|
|
281
|
+
getActions: n
|
|
282
|
+
} = l;
|
|
283
|
+
let r, c, i, s, d, m, u, f, g;
|
|
284
|
+
if (e[0] !== o || e[1] !== n || e[2] !== t) {
|
|
285
|
+
g = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
286
|
+
e: {
|
|
287
|
+
const w = Ll(o, n?.(t.original) ?? []);
|
|
288
|
+
if (w.length === 0) {
|
|
289
|
+
g = null;
|
|
290
|
+
break e;
|
|
291
|
+
}
|
|
292
|
+
s = X.Root, e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ a(X.Trigger, { asChild: !0, children: /* @__PURE__ */ a(Se, { "aria-label": "Row actions", size: "2xs", variant: "ghost", onClick: ae, children: /* @__PURE__ */ a(Y, { as: yt, boxSize: "14px" }) }) }), e[12] = f) : f = e[12], i = ce, c = X.Positioner, r = X.Content, d = "popover", m = "bg";
|
|
293
|
+
let y;
|
|
294
|
+
e[13] !== t ? (y = (C) => /* @__PURE__ */ a(X.Item, { value: C.label, asChild: !0, children: /* @__PURE__ */ a(se, { asChild: !0, variant: "full-width", tone: C.destructive ? "danger" : "default", label: C.label, icon: C.icon, onClick: ae, onActivate: () => C.onSelect(t.original) }) }, C.label), e[13] = t, e[14] = y) : y = e[14], u = w.map(y);
|
|
295
|
+
}
|
|
296
|
+
e[0] = o, e[1] = n, e[2] = t, e[3] = r, e[4] = c, e[5] = i, e[6] = s, e[7] = d, e[8] = m, e[9] = u, e[10] = f, e[11] = g;
|
|
285
297
|
} else
|
|
286
|
-
r = e[3];
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
},
|
|
298
|
+
r = e[3], c = e[4], i = e[5], s = e[6], d = e[7], m = e[8], u = e[9], f = e[10], g = e[11];
|
|
299
|
+
if (g !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
300
|
+
return g;
|
|
301
|
+
let p;
|
|
302
|
+
e[15] !== r || e[16] !== d || e[17] !== m || e[18] !== u ? (p = /* @__PURE__ */ a(r, { zIndex: d, bg: m, children: u }), e[15] = r, e[16] = d, e[17] = m, e[18] = u, e[19] = p) : p = e[19];
|
|
303
|
+
let b;
|
|
304
|
+
e[20] !== c || e[21] !== p ? (b = /* @__PURE__ */ a(c, { children: p }), e[20] = c, e[21] = p, e[22] = b) : b = e[22];
|
|
305
|
+
let h;
|
|
306
|
+
e[23] !== i || e[24] !== b ? (h = /* @__PURE__ */ a(i, { children: b }), e[23] = i, e[24] = b, e[25] = h) : h = e[25];
|
|
307
|
+
let x;
|
|
308
|
+
return e[26] !== s || e[27] !== f || e[28] !== h ? (x = /* @__PURE__ */ _(s, { children: [
|
|
309
|
+
f,
|
|
310
|
+
h
|
|
311
|
+
] }), e[26] = s, e[27] = f, e[28] = h, e[29] = x) : x = e[29], x;
|
|
312
|
+
}, Oe = (l) => {
|
|
293
313
|
const e = z(5), {
|
|
294
314
|
value: t
|
|
295
|
-
} =
|
|
296
|
-
let
|
|
315
|
+
} = l;
|
|
316
|
+
let o, n;
|
|
297
317
|
if (e[0] !== t) {
|
|
298
318
|
n = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
299
319
|
e:
|
|
300
|
-
if (
|
|
301
|
-
n = /* @__PURE__ */
|
|
320
|
+
if (o = kt(t), Be(o)) {
|
|
321
|
+
n = /* @__PURE__ */ a(ie.span, { display: "inline-flex", maxWidth: "full", minW: "0", overflow: "hidden", whiteSpace: "nowrap", children: Ml(o) });
|
|
302
322
|
break e;
|
|
303
323
|
}
|
|
304
|
-
e[0] = t, e[1] =
|
|
324
|
+
e[0] = t, e[1] = o, e[2] = n;
|
|
305
325
|
} else
|
|
306
|
-
|
|
326
|
+
o = e[1], n = e[2];
|
|
307
327
|
if (n !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
308
328
|
return n;
|
|
309
329
|
let r;
|
|
310
|
-
return e[3] !==
|
|
311
|
-
},
|
|
330
|
+
return e[3] !== o ? (r = /* @__PURE__ */ a(O, { maxWidth: "full", overflow: "hidden", textOverflow: "ellipsis", textStyle: "paragraph/S/regular", whiteSpace: "nowrap", children: o }), e[3] = o, e[4] = r) : r = e[4], r;
|
|
331
|
+
}, Nl = (l) => {
|
|
312
332
|
const e = z(9), {
|
|
313
333
|
columnLabel: t,
|
|
314
|
-
renderer:
|
|
334
|
+
renderer: o,
|
|
315
335
|
value: n
|
|
316
|
-
} =
|
|
317
|
-
if (
|
|
336
|
+
} = l;
|
|
337
|
+
if (o?.type === "json") {
|
|
318
338
|
let c;
|
|
319
|
-
return e[0] !== t || e[1] !== n ? (c = /* @__PURE__ */
|
|
339
|
+
return e[0] !== t || e[1] !== n ? (c = /* @__PURE__ */ a(zl, { columnLabel: t, value: n }), e[0] = t, e[1] = n, e[2] = c) : c = e[2], c;
|
|
320
340
|
}
|
|
321
|
-
if (
|
|
322
|
-
let
|
|
323
|
-
return e[3] !== n ? (
|
|
341
|
+
if (o?.type === "color-scale" && Ue(n, o.stops) && typeof n == "number") {
|
|
342
|
+
let i;
|
|
343
|
+
return e[3] !== n ? (i = /* @__PURE__ */ a(xl, { value: n }), e[3] = n, e[4] = i) : i = e[4], i;
|
|
324
344
|
}
|
|
325
|
-
if (
|
|
326
|
-
let
|
|
327
|
-
return e[5] !== n ? (
|
|
345
|
+
if (o?.type === "categorical-color" && qe(n, o.categories)) {
|
|
346
|
+
let i;
|
|
347
|
+
return e[5] !== n ? (i = /* @__PURE__ */ a(cl, { children: /* @__PURE__ */ a(Oe, { value: n }) }), e[5] = n, e[6] = i) : i = e[6], i;
|
|
328
348
|
}
|
|
329
349
|
let r;
|
|
330
|
-
return e[7] !== n ? (r = /* @__PURE__ */
|
|
331
|
-
},
|
|
350
|
+
return e[7] !== n ? (r = /* @__PURE__ */ a(Oe, { value: n }), e[7] = n, e[8] = r) : r = e[8], r;
|
|
351
|
+
}, jl = (l, e) => {
|
|
332
352
|
if (e?.type === "color-scale") {
|
|
333
|
-
const t =
|
|
334
|
-
if (t && typeof
|
|
353
|
+
const t = Ue(l, e.stops);
|
|
354
|
+
if (t && typeof l == "number") return Pe(t);
|
|
335
355
|
}
|
|
336
356
|
if (e?.type === "categorical-color") {
|
|
337
|
-
const t =
|
|
338
|
-
if (t) return
|
|
357
|
+
const t = qe(l, e.categories);
|
|
358
|
+
if (t) return Pe(t);
|
|
339
359
|
}
|
|
340
360
|
};
|
|
341
|
-
function
|
|
361
|
+
function El(l, e, t = {}) {
|
|
342
362
|
const {
|
|
343
|
-
columnIcons:
|
|
363
|
+
columnIcons: o,
|
|
344
364
|
columnDescriptions: n,
|
|
345
365
|
compactHeaders: r,
|
|
346
366
|
enableSelection: c = !1,
|
|
347
|
-
rowActions:
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
367
|
+
rowActions: i = [],
|
|
368
|
+
getRowActions: s,
|
|
369
|
+
selectedRowIds: d,
|
|
370
|
+
columnRenderers: m
|
|
371
|
+
} = t, u = ne.accessor((b, h) => h + 1, {
|
|
351
372
|
header: "",
|
|
352
373
|
id: "rowIndex",
|
|
353
374
|
enableResizing: !1,
|
|
354
375
|
size: 20,
|
|
355
|
-
cell: (b) => /* @__PURE__ */
|
|
356
|
-
}),
|
|
376
|
+
cell: (b) => /* @__PURE__ */ a(ie.span, { display: "block", textStyle: "paragraph/S/regular", textAlign: "center", children: b.getValue() })
|
|
377
|
+
}), f = ne.display({
|
|
357
378
|
id: "rowSelection",
|
|
358
|
-
header:
|
|
359
|
-
cell: (b) => /* @__PURE__ */
|
|
379
|
+
header: Pl,
|
|
380
|
+
cell: (b) => /* @__PURE__ */ a(Hl, { ...b, selectedRowIds: d }),
|
|
360
381
|
enableResizing: !1,
|
|
361
382
|
enableSorting: !1,
|
|
362
383
|
size: 36
|
|
363
|
-
}),
|
|
364
|
-
const h = b || "-",
|
|
365
|
-
return
|
|
384
|
+
}), g = e.map((b) => {
|
|
385
|
+
const h = b || "-", x = l.map((S) => S[h]), w = m?.[h], y = o?.[h], C = y === void 0 ? $t(x) : y, v = n?.[h];
|
|
386
|
+
return ne.accessor((S) => S[h], {
|
|
366
387
|
id: h,
|
|
367
388
|
header: () => {
|
|
368
389
|
const S = r?.[h] ?? h;
|
|
369
|
-
return /* @__PURE__ */
|
|
370
|
-
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
|
|
390
|
+
return /* @__PURE__ */ _(ie.span, { display: "inline-flex", alignItems: "center", gap: "4px", minW: "0", maxW: "full", overflow: "hidden", children: [
|
|
391
|
+
C,
|
|
392
|
+
/* @__PURE__ */ a(ie.span, { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: S }),
|
|
393
|
+
v ? /* @__PURE__ */ a(Fe, { content: v, children: /* @__PURE__ */ a(Y, { as: xt, "aria-label": `About ${S}`, boxSize: "12px", color: "fg.muted", cursor: "help", flexShrink: 0, opacity: 0.6, tabIndex: 0 }) }) : null
|
|
373
394
|
] });
|
|
374
395
|
},
|
|
375
|
-
cell: (S) => /* @__PURE__ */
|
|
396
|
+
cell: (S) => /* @__PURE__ */ a(Nl, { columnLabel: h, renderer: w, value: S.getValue() }),
|
|
376
397
|
meta: {
|
|
377
|
-
getCellStyle: (S) =>
|
|
398
|
+
getCellStyle: (S) => jl(S, w)
|
|
378
399
|
},
|
|
379
|
-
sortingFn: (S,
|
|
380
|
-
const
|
|
381
|
-
return
|
|
400
|
+
sortingFn: (S, I) => {
|
|
401
|
+
const A = Le(S.original[h]), $ = Le(I.original[h]);
|
|
402
|
+
return Vl(A, $);
|
|
382
403
|
}
|
|
383
404
|
});
|
|
384
|
-
}),
|
|
405
|
+
}), p = ne.display({
|
|
385
406
|
id: "rowActions",
|
|
386
407
|
header: "",
|
|
387
|
-
cell: (b) => /* @__PURE__ */
|
|
408
|
+
cell: (b) => /* @__PURE__ */ a(Ol, { ...b, actions: i, getActions: s }),
|
|
388
409
|
enableResizing: !1,
|
|
389
410
|
enableSorting: !1,
|
|
390
411
|
size: 36
|
|
391
412
|
});
|
|
392
|
-
return [
|
|
413
|
+
return [u, ...c ? [f] : [], ...g, ...i.length > 0 || s ? [p] : []];
|
|
393
414
|
}
|
|
394
|
-
const
|
|
415
|
+
const Bl = (l) => {
|
|
395
416
|
const e = z(28), {
|
|
396
417
|
column: t,
|
|
397
|
-
checked:
|
|
418
|
+
checked: o,
|
|
398
419
|
onColumnVisibilityChange: n
|
|
399
|
-
} =
|
|
420
|
+
} = l;
|
|
400
421
|
let r;
|
|
401
422
|
e[0] !== t.id ? (r = {
|
|
402
423
|
id: t.id
|
|
403
424
|
}, e[0] = t.id, e[1] = r) : r = e[1];
|
|
404
425
|
const {
|
|
405
426
|
attributes: c,
|
|
406
|
-
listeners:
|
|
407
|
-
setNodeRef:
|
|
427
|
+
listeners: i,
|
|
428
|
+
setNodeRef: s,
|
|
408
429
|
transform: d,
|
|
409
430
|
transition: m,
|
|
410
431
|
isDragging: u
|
|
411
|
-
} =
|
|
432
|
+
} = Zt(r);
|
|
412
433
|
let f;
|
|
413
|
-
e[2] !== d ? (f =
|
|
434
|
+
e[2] !== d ? (f = Qt.Transform.toString(d), e[2] = d, e[3] = f) : f = e[3];
|
|
414
435
|
const g = u ? 0.5 : 1;
|
|
415
|
-
let
|
|
416
|
-
e[4] !== f || e[5] !== g || e[6] !== m ? (
|
|
436
|
+
let p;
|
|
437
|
+
e[4] !== f || e[5] !== g || e[6] !== m ? (p = {
|
|
417
438
|
transform: f,
|
|
418
439
|
transition: m,
|
|
419
440
|
opacity: g
|
|
420
|
-
}, e[4] = f, e[5] = g, e[6] = m, e[7] =
|
|
421
|
-
const
|
|
422
|
-
let
|
|
423
|
-
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
441
|
+
}, e[4] = f, e[5] = g, e[6] = m, e[7] = p) : p = e[7];
|
|
442
|
+
const b = p;
|
|
443
|
+
let h;
|
|
444
|
+
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
424
445
|
bg: "bg.hover"
|
|
425
|
-
}, e[8] =
|
|
446
|
+
}, e[8] = h) : h = e[8];
|
|
426
447
|
let x;
|
|
427
|
-
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */
|
|
428
|
-
let
|
|
429
|
-
e[10] !== c || e[11] !==
|
|
448
|
+
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ a(vt, { size: 14 }), e[9] = x) : x = e[9];
|
|
449
|
+
let w;
|
|
450
|
+
e[10] !== c || e[11] !== i ? (w = /* @__PURE__ */ a(oe, { as: "span", display: "inline-flex", cursor: "grab", color: "fg.muted", ...c, ...i, children: x }), e[10] = c, e[11] = i, e[12] = w) : w = e[12];
|
|
430
451
|
let y;
|
|
431
|
-
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */
|
|
452
|
+
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ a(Y, { as: we, boxSize: "12px", strokeWidth: "3" }), e[13] = y) : y = e[13];
|
|
432
453
|
let C;
|
|
433
|
-
e[14] !== t.id || e[15] !== n ? (C = (
|
|
454
|
+
e[14] !== t.id || e[15] !== n ? (C = (A) => n(t.id, A.checked === !0), e[14] = t.id, e[15] = n, e[16] = C) : C = e[16];
|
|
455
|
+
let v;
|
|
456
|
+
e[17] !== t.label ? (v = /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", truncate: !0, children: t.label }), e[17] = t.label, e[18] = v) : v = e[18];
|
|
434
457
|
let S;
|
|
435
|
-
e[
|
|
436
|
-
let w;
|
|
437
|
-
e[19] !== l || e[20] !== C || e[21] !== S ? (w = /* @__PURE__ */ s(ye, { checked: l, flex: "1", minW: "0", width: "full", flexDirection: "row-reverse", justifyContent: "space-between", size: "sm", icon: y, onCheckedChange: C, children: S }), e[19] = l, e[20] = C, e[21] = S, e[22] = w) : w = e[22];
|
|
458
|
+
e[19] !== o || e[20] !== C || e[21] !== v ? (S = /* @__PURE__ */ a(ye, { checked: o, flex: "1", minW: "0", width: "full", flexDirection: "row-reverse", justifyContent: "space-between", size: "sm", icon: y, onCheckedChange: C, children: v }), e[19] = o, e[20] = C, e[21] = v, e[22] = S) : S = e[22];
|
|
438
459
|
let I;
|
|
439
|
-
return e[23] !==
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
] }), e[23] =
|
|
443
|
-
},
|
|
460
|
+
return e[23] !== s || e[24] !== b || e[25] !== S || e[26] !== w ? (I = /* @__PURE__ */ _(je, { ref: s, style: b, gap: "2xs", minW: "0", width: "full", borderRadius: "xs", px: "xs", py: "2xs", _hover: h, children: [
|
|
461
|
+
w,
|
|
462
|
+
S
|
|
463
|
+
] }), e[23] = s, e[24] = b, e[25] = S, e[26] = w, e[27] = I) : I = e[27], I;
|
|
464
|
+
}, Wl = (l) => {
|
|
444
465
|
const e = z(43), {
|
|
445
466
|
columns: t,
|
|
446
|
-
visibleColumnIds:
|
|
467
|
+
visibleColumnIds: o,
|
|
447
468
|
showStats: n,
|
|
448
469
|
statsAvailable: r,
|
|
449
470
|
onColumnVisibilityChange: c,
|
|
450
|
-
onColumnReorder:
|
|
451
|
-
onStatsVisibilityChange:
|
|
452
|
-
} =
|
|
453
|
-
let
|
|
454
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
471
|
+
onColumnReorder: i,
|
|
472
|
+
onStatsVisibilityChange: s
|
|
473
|
+
} = l, d = _e(null), m = _e(null), [u, f] = Z(!1), [g, p] = Z("");
|
|
474
|
+
let b;
|
|
475
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
|
|
455
476
|
activationConstraint: {
|
|
456
477
|
distance: 5
|
|
457
478
|
}
|
|
458
|
-
}, e[0] =
|
|
459
|
-
const
|
|
479
|
+
}, e[0] = b) : b = e[0];
|
|
480
|
+
const h = Kt(Jt(Xt, b));
|
|
460
481
|
let x;
|
|
461
482
|
if (e[1] !== t || e[2] !== g) {
|
|
462
|
-
const
|
|
463
|
-
x =
|
|
483
|
+
const k = g.trim().toLowerCase();
|
|
484
|
+
x = k ? t.filter((T) => T.label.toLowerCase().includes(k)) : t, e[1] = t, e[2] = g, e[3] = x;
|
|
464
485
|
} else
|
|
465
486
|
x = e[3];
|
|
466
|
-
const
|
|
487
|
+
const w = x;
|
|
467
488
|
let y;
|
|
468
|
-
e[4] !==
|
|
489
|
+
e[4] !== i ? (y = (k) => {
|
|
469
490
|
const {
|
|
470
|
-
active:
|
|
471
|
-
over:
|
|
472
|
-
} =
|
|
473
|
-
!
|
|
474
|
-
}, e[4] =
|
|
491
|
+
active: T,
|
|
492
|
+
over: W
|
|
493
|
+
} = k;
|
|
494
|
+
!W || T.id === W.id || i(String(T.id), String(W.id));
|
|
495
|
+
}, e[4] = i, e[5] = y) : y = e[5];
|
|
475
496
|
const C = y;
|
|
476
|
-
let
|
|
477
|
-
e[6] !== u ? (
|
|
497
|
+
let v, S;
|
|
498
|
+
e[6] !== u ? (v = () => {
|
|
478
499
|
if (!u)
|
|
479
500
|
return;
|
|
480
|
-
const
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
},
|
|
484
|
-
|
|
501
|
+
const k = (W) => {
|
|
502
|
+
const H = W.target;
|
|
503
|
+
H instanceof Node && (m.current?.contains(H) || d.current?.contains(H) || f(!1));
|
|
504
|
+
}, T = (W) => {
|
|
505
|
+
W.key === "Escape" && f(!1);
|
|
485
506
|
};
|
|
486
|
-
return document.addEventListener("pointerdown",
|
|
487
|
-
document.removeEventListener("pointerdown",
|
|
507
|
+
return document.addEventListener("pointerdown", k), document.addEventListener("keydown", T, !0), () => {
|
|
508
|
+
document.removeEventListener("pointerdown", k), document.removeEventListener("keydown", T, !0);
|
|
488
509
|
};
|
|
489
|
-
},
|
|
510
|
+
}, S = [u], e[6] = u, e[7] = v, e[8] = S) : (v = e[7], S = e[8]), We(v, S);
|
|
490
511
|
let I;
|
|
491
512
|
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = {
|
|
492
513
|
placement: "bottom-end",
|
|
@@ -495,576 +516,578 @@ const Eo = (o) => {
|
|
|
495
516
|
},
|
|
496
517
|
getAnchorElement: () => d.current
|
|
497
518
|
}, e[9] = I) : I = e[9];
|
|
498
|
-
let $;
|
|
499
|
-
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ s(Q.Trigger, { asChild: !0, children: /* @__PURE__ */ s(Se, { ref: d, "aria-label": "Display settings", variant: "ghost", size: "sm", onClick: () => f(Wo), children: /* @__PURE__ */ s(Y, { as: yt, boxSize: "14px" }) }) }), e[10] = $) : $ = e[10];
|
|
500
519
|
let A;
|
|
501
|
-
e[
|
|
520
|
+
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ a(Q.Trigger, { asChild: !0, children: /* @__PURE__ */ a(Se, { ref: d, "aria-label": "Display settings", variant: "ghost", size: "sm", onClick: () => f(Fl), children: /* @__PURE__ */ a(Y, { as: Ct, boxSize: "14px" }) }) }), e[10] = A) : A = e[10];
|
|
521
|
+
let $;
|
|
522
|
+
e[11] !== s || e[12] !== n || e[13] !== r ? ($ = r ? /* @__PURE__ */ a(oe, { borderBottomWidth: "1px", borderColor: "border.subtle", padding: "xs", children: /* @__PURE__ */ a(el, { checked: n, inputProps: {
|
|
502
523
|
role: "switch"
|
|
503
|
-
}, width: "full", flexDirection: "row-reverse", justifyContent: "space-between", onCheckedChange: (
|
|
504
|
-
let
|
|
505
|
-
e[15] !== g ? (
|
|
506
|
-
let
|
|
507
|
-
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
524
|
+
}, width: "full", flexDirection: "row-reverse", justifyContent: "space-between", onCheckedChange: (k) => s(k.checked === !0), children: /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", children: "Statistics" }) }) }) : null, e[11] = s, e[12] = n, e[13] = r, e[14] = $) : $ = e[14];
|
|
525
|
+
let D;
|
|
526
|
+
e[15] !== g ? (D = /* @__PURE__ */ a(It, { value: g, placeholder: "Search columns", onValueChange: p }), e[15] = g, e[16] = D) : D = e[16];
|
|
527
|
+
let N;
|
|
528
|
+
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = {
|
|
508
529
|
overscrollBehavior: "contain"
|
|
509
|
-
}, e[17] =
|
|
530
|
+
}, e[17] = N) : N = e[17];
|
|
510
531
|
let M;
|
|
511
|
-
e[18] !== t ? (M = t.map(
|
|
532
|
+
e[18] !== t ? (M = t.map(Kl), e[18] = t, e[19] = M) : M = e[19];
|
|
512
533
|
let P;
|
|
513
|
-
if (e[20] !==
|
|
514
|
-
let
|
|
515
|
-
e[24] !== c || e[25] !==
|
|
534
|
+
if (e[20] !== w || e[21] !== c || e[22] !== o) {
|
|
535
|
+
let k;
|
|
536
|
+
e[24] !== c || e[25] !== o ? (k = (T) => /* @__PURE__ */ a(Bl, { column: T, checked: o.has(T.id), onColumnVisibilityChange: c }, T.id), e[24] = c, e[25] = o, e[26] = k) : k = e[26], P = w.map(k), e[20] = w, e[21] = c, e[22] = o, e[23] = P;
|
|
516
537
|
} else
|
|
517
538
|
P = e[23];
|
|
518
|
-
let N;
|
|
519
|
-
e[27] !== P ? (N = /* @__PURE__ */ s(ke, { gap: "1px", children: P }), e[27] = P, e[28] = N) : N = e[28];
|
|
520
539
|
let j;
|
|
521
|
-
e[
|
|
540
|
+
e[27] !== P ? (j = /* @__PURE__ */ a(ke, { gap: "1px", children: P }), e[27] = P, e[28] = j) : j = e[28];
|
|
522
541
|
let E;
|
|
523
|
-
e[
|
|
542
|
+
e[29] !== M || e[30] !== j ? (E = /* @__PURE__ */ a(Ut, { items: M, strategy: Yt, children: j }), e[29] = M, e[30] = j, e[31] = E) : E = e[31];
|
|
524
543
|
let B;
|
|
525
|
-
e[
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
E
|
|
529
|
-
] }) }) }) }), e[36] = E, e[37] = A, e[38] = T, e[39] = B) : B = e[39];
|
|
530
|
-
let W;
|
|
531
|
-
return e[40] !== u || e[41] !== B ? (W = /* @__PURE__ */ k(Q.Root, { open: u, closeOnInteractOutside: !1, positioning: I, children: [
|
|
544
|
+
e[32] !== C || e[33] !== h || e[34] !== E ? (B = /* @__PURE__ */ a(xe, { maxH: "280px", viewportProps: N, children: /* @__PURE__ */ a(oe, { padding: "2xs", children: /* @__PURE__ */ a(qt, { sensors: h, collisionDetection: Gt, onDragEnd: C, children: E }) }) }), e[32] = C, e[33] = h, e[34] = E, e[35] = B) : B = e[35];
|
|
545
|
+
let F;
|
|
546
|
+
e[36] !== B || e[37] !== $ || e[38] !== D ? (F = /* @__PURE__ */ a(ce, { children: /* @__PURE__ */ a(Q.Positioner, { children: /* @__PURE__ */ a(Q.Content, { ref: m, width: "min(320px, calc(100vw - 32px))", p: "0", bg: "bg", overflow: "hidden", children: /* @__PURE__ */ _(ke, { gap: "0", children: [
|
|
532
547
|
$,
|
|
548
|
+
D,
|
|
533
549
|
B
|
|
534
|
-
] }), e[
|
|
550
|
+
] }) }) }) }), e[36] = B, e[37] = $, e[38] = D, e[39] = F) : F = e[39];
|
|
551
|
+
let K;
|
|
552
|
+
return e[40] !== u || e[41] !== F ? (K = /* @__PURE__ */ _(Q.Root, { open: u, closeOnInteractOutside: !1, positioning: I, children: [
|
|
553
|
+
A,
|
|
554
|
+
F
|
|
555
|
+
] }), e[40] = u, e[41] = F, e[42] = K) : K = e[42], K;
|
|
535
556
|
};
|
|
536
|
-
function
|
|
537
|
-
return !
|
|
557
|
+
function Fl(l) {
|
|
558
|
+
return !l;
|
|
538
559
|
}
|
|
539
|
-
function
|
|
540
|
-
return
|
|
560
|
+
function Kl(l) {
|
|
561
|
+
return l.id;
|
|
541
562
|
}
|
|
542
|
-
const
|
|
543
|
-
const
|
|
563
|
+
const Jl = () => {
|
|
564
|
+
const l = z(11), e = sl(), t = al();
|
|
544
565
|
if (!e || !t)
|
|
545
566
|
return null;
|
|
546
|
-
const
|
|
567
|
+
const o = t.y + t.height;
|
|
547
568
|
let n;
|
|
548
|
-
|
|
569
|
+
l[0] !== e.x || l[1] !== t.y || l[2] !== o ? (n = /* @__PURE__ */ a("line", { x1: e.x, x2: e.x, y1: t.y, y2: o }), l[0] = e.x, l[1] = t.y, l[2] = o, l[3] = n) : n = l[3];
|
|
549
570
|
const r = t.x + t.width;
|
|
550
571
|
let c;
|
|
551
|
-
|
|
552
|
-
let
|
|
553
|
-
return
|
|
572
|
+
l[4] !== e.y || l[5] !== t.x || l[6] !== r ? (c = /* @__PURE__ */ a("line", { x1: t.x, x2: r, y1: e.y, y2: e.y }), l[4] = e.y, l[5] = t.x, l[6] = r, l[7] = c) : c = l[7];
|
|
573
|
+
let i;
|
|
574
|
+
return l[8] !== n || l[9] !== c ? (i = /* @__PURE__ */ _("g", { pointerEvents: "none", stroke: "var(--chakra-colors-border-emphasized)", strokeWidth: "1", children: [
|
|
554
575
|
n,
|
|
555
576
|
c
|
|
556
|
-
] }),
|
|
557
|
-
},
|
|
577
|
+
] }), l[8] = n, l[9] = c, l[10] = i) : i = l[10], i;
|
|
578
|
+
}, Ze = (l) => {
|
|
558
579
|
const e = z(47), {
|
|
559
580
|
data: t,
|
|
560
|
-
dataKey:
|
|
581
|
+
dataKey: o,
|
|
561
582
|
color: n,
|
|
562
583
|
height: r,
|
|
563
584
|
ariaLabel: c,
|
|
564
|
-
tooltipLabel:
|
|
565
|
-
tooltipValue:
|
|
585
|
+
tooltipLabel: i,
|
|
586
|
+
tooltipValue: s,
|
|
566
587
|
tooltipSeriesLabel: d,
|
|
567
588
|
layout: m,
|
|
568
589
|
categoryKey: u,
|
|
569
590
|
domain: f,
|
|
570
591
|
barSize: g,
|
|
571
|
-
barCategoryGap:
|
|
572
|
-
} =
|
|
592
|
+
barCategoryGap: p
|
|
593
|
+
} = l, b = m === void 0 ? "horizontal" : m, h = p === void 0 ? 1 : p;
|
|
573
594
|
let x;
|
|
574
|
-
e[0] !== n || e[1] !==
|
|
575
|
-
name:
|
|
595
|
+
e[0] !== n || e[1] !== o ? (x = [{
|
|
596
|
+
name: o,
|
|
576
597
|
color: n
|
|
577
|
-
}], e[0] = n, e[1] =
|
|
578
|
-
let
|
|
579
|
-
e[3] !== t || e[4] !== x ? (
|
|
598
|
+
}], e[0] = n, e[1] = o, e[2] = x) : x = e[2];
|
|
599
|
+
let w;
|
|
600
|
+
e[3] !== t || e[4] !== x ? (w = {
|
|
580
601
|
data: t,
|
|
581
602
|
series: x
|
|
582
|
-
}, e[3] = t, e[4] = x, e[5] =
|
|
583
|
-
const y =
|
|
603
|
+
}, e[3] = t, e[4] = x, e[5] = w) : w = e[5];
|
|
604
|
+
const y = tl(w);
|
|
584
605
|
let C;
|
|
585
|
-
e[6] !==
|
|
586
|
-
const
|
|
587
|
-
let
|
|
588
|
-
e[8] !== u ? (
|
|
589
|
-
const I =
|
|
590
|
-
let
|
|
591
|
-
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
606
|
+
e[6] !== o ? (C = (H) => H[o], e[6] = o, e[7] = C) : C = e[7];
|
|
607
|
+
const v = C;
|
|
608
|
+
let S;
|
|
609
|
+
e[8] !== u ? (S = u ? (H) => H[u] : void 0, e[8] = u, e[9] = S) : S = e[9];
|
|
610
|
+
const I = S, A = y.data;
|
|
611
|
+
let $;
|
|
612
|
+
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
|
|
592
613
|
top: 2,
|
|
593
614
|
right: 0,
|
|
594
615
|
bottom: 0,
|
|
595
616
|
left: 0
|
|
596
|
-
}, e[10] =
|
|
597
|
-
let
|
|
598
|
-
e[11] !== f || e[12] !== I || e[13] !==
|
|
599
|
-
/* @__PURE__ */
|
|
600
|
-
/* @__PURE__ */
|
|
601
|
-
] }) : null, e[11] = f, e[12] = I, e[13] =
|
|
602
|
-
let
|
|
603
|
-
e[15] !== y || e[16] !== n ? (
|
|
617
|
+
}, e[10] = $) : $ = e[10];
|
|
618
|
+
let D;
|
|
619
|
+
e[11] !== f || e[12] !== I || e[13] !== b ? (D = b === "vertical" ? /* @__PURE__ */ _(st, { children: [
|
|
620
|
+
/* @__PURE__ */ a(ll, { type: "number", domain: f, hide: !0 }),
|
|
621
|
+
/* @__PURE__ */ a(ol, { type: "category", dataKey: I, hide: !0 })
|
|
622
|
+
] }) : null, e[11] = f, e[12] = I, e[13] = b, e[14] = D) : D = e[14];
|
|
623
|
+
let N;
|
|
624
|
+
e[15] !== y || e[16] !== n ? (N = y.color(n), e[15] = y, e[16] = n, e[17] = N) : N = e[17];
|
|
604
625
|
let M;
|
|
605
|
-
e[18] !== g || e[19] !==
|
|
626
|
+
e[18] !== g || e[19] !== v || e[20] !== N ? (M = /* @__PURE__ */ a(nl, { dataKey: v, fill: N, barSize: g, isAnimationActive: !1 }), e[18] = g, e[19] = v, e[20] = N, e[21] = M) : M = e[21];
|
|
606
627
|
let P;
|
|
607
628
|
e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
|
|
608
629
|
x: !0,
|
|
609
630
|
y: !0
|
|
610
631
|
}, e[22] = P) : P = e[22];
|
|
611
|
-
let N;
|
|
612
|
-
e[23] !== a ? (N = (K, ne) => {
|
|
613
|
-
const te = ne[0]?.payload;
|
|
614
|
-
return te ? a(te) : K;
|
|
615
|
-
}, e[23] = a, e[24] = N) : N = e[24];
|
|
616
632
|
let j;
|
|
617
|
-
e[
|
|
633
|
+
e[23] !== i ? (j = (H, ue) => {
|
|
634
|
+
const te = ue[0]?.payload;
|
|
635
|
+
return te ? i(te) : H;
|
|
636
|
+
}, e[23] = i, e[24] = j) : j = e[24];
|
|
618
637
|
let E;
|
|
619
|
-
e[
|
|
638
|
+
e[25] !== d || e[26] !== s ? (E = (H) => [s(H), d], e[25] = d, e[26] = s, e[27] = E) : E = e[27];
|
|
620
639
|
let B;
|
|
621
|
-
e[
|
|
622
|
-
let
|
|
623
|
-
e[
|
|
640
|
+
e[28] !== j || e[29] !== E ? (B = /* @__PURE__ */ a(Te.Tooltip, { labelFormatter: j, formatter: E }), e[28] = j, e[29] = E, e[30] = B) : B = e[30];
|
|
641
|
+
let F;
|
|
642
|
+
e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ a(Jl, {}), e[31] = F) : F = e[31];
|
|
643
|
+
let K;
|
|
644
|
+
e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (K = {
|
|
624
645
|
zIndex: 1800
|
|
625
|
-
}, e[32] =
|
|
626
|
-
let
|
|
627
|
-
e[33] !==
|
|
628
|
-
let
|
|
629
|
-
e[35] !==
|
|
630
|
-
|
|
646
|
+
}, e[32] = K) : K = e[32];
|
|
647
|
+
let k;
|
|
648
|
+
e[33] !== B ? (k = /* @__PURE__ */ a(rl, { allowEscapeViewBox: P, content: B, cursor: F, isAnimationActive: !1, wrapperStyle: K }), e[33] = B, e[34] = k) : k = e[34];
|
|
649
|
+
let T;
|
|
650
|
+
e[35] !== h || e[36] !== y.data || e[37] !== b || e[38] !== M || e[39] !== k || e[40] !== D ? (T = /* @__PURE__ */ _(il, { responsive: !0, data: A, layout: b, margin: $, barCategoryGap: h, children: [
|
|
651
|
+
D,
|
|
631
652
|
M,
|
|
632
|
-
|
|
633
|
-
] }), e[35] =
|
|
634
|
-
let
|
|
635
|
-
return e[42] !== c || e[43] !== y || e[44] !== r || e[45] !==
|
|
636
|
-
},
|
|
637
|
-
const
|
|
638
|
-
for (const
|
|
639
|
-
n.set(
|
|
640
|
-
const r = [...n.entries()].map(([
|
|
641
|
-
label: String(
|
|
653
|
+
k
|
|
654
|
+
] }), e[35] = h, e[36] = y.data, e[37] = b, e[38] = M, e[39] = k, e[40] = D, e[41] = T) : T = e[41];
|
|
655
|
+
let W;
|
|
656
|
+
return e[42] !== c || e[43] !== y || e[44] !== r || e[45] !== T ? (W = /* @__PURE__ */ a(Te.Root, { chart: y, height: r, aspectRatio: "auto", cursor: "crosshair", "aria-label": c, children: T }), e[42] = c, e[43] = y, e[44] = r, e[45] = T, e[46] = W) : W = e[46], W;
|
|
657
|
+
}, Xl = (l) => Xe(l) ? l.sortValue : l, Re = (l, e) => l.map((t) => Xl(t[e])).filter((t) => t != null && t !== ""), ql = (l, e) => new Set(Re(l, e)).size, Gl = (l, e, t) => {
|
|
658
|
+
const o = Re(l, e), n = /* @__PURE__ */ new Map();
|
|
659
|
+
for (const s of o)
|
|
660
|
+
n.set(s, (n.get(s) ?? 0) + 1);
|
|
661
|
+
const r = [...n.entries()].map(([s, d]) => ({
|
|
662
|
+
label: String(s),
|
|
642
663
|
count: d,
|
|
643
|
-
percentage: Math.round(d /
|
|
644
|
-
})).sort((
|
|
645
|
-
return
|
|
664
|
+
percentage: Math.round(d / o.length * 100)
|
|
665
|
+
})).sort((s, d) => d.count - s.count || s.label.localeCompare(d.label)), c = r.slice(0, t), i = r.slice(t).reduce((s, d) => s + d.count, 0);
|
|
666
|
+
return i === 0 ? c : [...c, {
|
|
646
667
|
label: "Other",
|
|
647
|
-
count:
|
|
648
|
-
percentage: Math.round(
|
|
668
|
+
count: i,
|
|
669
|
+
percentage: Math.round(i / o.length * 100)
|
|
649
670
|
}];
|
|
650
|
-
},
|
|
651
|
-
const
|
|
652
|
-
if (
|
|
653
|
-
const n = Math.min(...
|
|
671
|
+
}, Ul = (l, e, t) => {
|
|
672
|
+
const o = Re(l, e).filter((s) => typeof s == "number");
|
|
673
|
+
if (o.length === 0) return null;
|
|
674
|
+
const n = Math.min(...o), r = Math.max(...o), c = (r - n) / t, i = Array.from({
|
|
654
675
|
length: t
|
|
655
|
-
}, (
|
|
676
|
+
}, (s, d) => ({
|
|
656
677
|
start: n + c * d,
|
|
657
678
|
end: n + c * (d + 1),
|
|
658
679
|
count: 0
|
|
659
680
|
}));
|
|
660
|
-
for (const
|
|
661
|
-
const d =
|
|
662
|
-
|
|
681
|
+
for (const s of o) {
|
|
682
|
+
const d = s === r || c === 0 ? t - 1 : Math.floor((s - n) / c);
|
|
683
|
+
i[d].count += 1;
|
|
663
684
|
}
|
|
664
685
|
return {
|
|
665
686
|
min: n,
|
|
666
687
|
max: r,
|
|
667
|
-
bins:
|
|
688
|
+
bins: i
|
|
668
689
|
};
|
|
669
690
|
}, G = new Intl.NumberFormat(void 0, {
|
|
670
691
|
maximumFractionDigits: 2
|
|
671
|
-
}).format,
|
|
692
|
+
}).format, Qe = "vis.categorical.1", et = (l) => {
|
|
672
693
|
const e = z(10), {
|
|
673
694
|
value: t,
|
|
674
|
-
count:
|
|
675
|
-
} =
|
|
695
|
+
count: o
|
|
696
|
+
} = l;
|
|
676
697
|
let n;
|
|
677
|
-
e[0] !== t ? (n = /* @__PURE__ */
|
|
698
|
+
e[0] !== t ? (n = /* @__PURE__ */ a(O, { textStyle: "label/L/medium", lineHeight: "1", maxWidth: "100%", truncate: !0, children: t }), e[0] = t, e[1] = n) : n = e[1];
|
|
678
699
|
let r;
|
|
679
|
-
e[2] !==
|
|
680
|
-
const c =
|
|
681
|
-
let
|
|
682
|
-
e[4] !== r || e[5] !== c ? (
|
|
700
|
+
e[2] !== o ? (r = G(o), e[2] = o, e[3] = r) : r = e[3];
|
|
701
|
+
const c = o === 1 ? "value" : "values";
|
|
702
|
+
let i;
|
|
703
|
+
e[4] !== r || e[5] !== c ? (i = /* @__PURE__ */ _(O, { textStyle: "label/XS", color: "fg.muted", children: [
|
|
683
704
|
r,
|
|
684
705
|
" ",
|
|
685
706
|
c
|
|
686
|
-
] }), e[4] = r, e[5] = c, e[6] =
|
|
687
|
-
let
|
|
688
|
-
return e[7] !== n || e[8] !==
|
|
707
|
+
] }), e[4] = r, e[5] = c, e[6] = i) : i = e[6];
|
|
708
|
+
let s;
|
|
709
|
+
return e[7] !== n || e[8] !== i ? (s = /* @__PURE__ */ _(ee, { "data-single-value-stat": !0, direction: "column", gap: "2xs", alignItems: "flex-start", minWidth: "0", children: [
|
|
689
710
|
n,
|
|
690
|
-
|
|
691
|
-
] }), e[7] = n, e[8] =
|
|
692
|
-
},
|
|
711
|
+
i
|
|
712
|
+
] }), e[7] = n, e[8] = i, e[9] = s) : s = e[9], s;
|
|
713
|
+
}, Yl = (l) => {
|
|
693
714
|
const e = z(22), {
|
|
694
715
|
rows: t,
|
|
695
|
-
columnId:
|
|
696
|
-
} =
|
|
697
|
-
let n, r, c,
|
|
698
|
-
if (e[0] !==
|
|
699
|
-
const
|
|
700
|
-
r = ee, d = "column", m = "2xs", u = "flex-start", n = O, c = "label/L/medium",
|
|
716
|
+
columnId: o
|
|
717
|
+
} = l;
|
|
718
|
+
let n, r, c, i, s, d, m, u;
|
|
719
|
+
if (e[0] !== o || e[1] !== t) {
|
|
720
|
+
const b = ql(t, o);
|
|
721
|
+
r = ee, d = "column", m = "2xs", u = "flex-start", n = O, c = "label/L/medium", i = "1", s = G(b), e[0] = o, e[1] = t, e[2] = n, e[3] = r, e[4] = c, e[5] = i, e[6] = s, e[7] = d, e[8] = m, e[9] = u;
|
|
701
722
|
} else
|
|
702
|
-
n = e[2], r = e[3], c = e[4],
|
|
723
|
+
n = e[2], r = e[3], c = e[4], i = e[5], s = e[6], d = e[7], m = e[8], u = e[9];
|
|
703
724
|
let f;
|
|
704
|
-
e[10] !== n || e[11] !== c || e[12] !==
|
|
725
|
+
e[10] !== n || e[11] !== c || e[12] !== i || e[13] !== s ? (f = /* @__PURE__ */ a(n, { textStyle: c, lineHeight: i, children: s }), e[10] = n, e[11] = c, e[12] = i, e[13] = s, e[14] = f) : f = e[14];
|
|
705
726
|
let g;
|
|
706
|
-
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */
|
|
707
|
-
let
|
|
708
|
-
return e[16] !== r || e[17] !== d || e[18] !== m || e[19] !== u || e[20] !== f ? (
|
|
727
|
+
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "unique values" }), e[15] = g) : g = e[15];
|
|
728
|
+
let p;
|
|
729
|
+
return e[16] !== r || e[17] !== d || e[18] !== m || e[19] !== u || e[20] !== f ? (p = /* @__PURE__ */ _(r, { direction: d, gap: m, alignItems: u, children: [
|
|
709
730
|
f,
|
|
710
731
|
g
|
|
711
|
-
] }), e[16] = r, e[17] = d, e[18] = m, e[19] = u, e[20] = f, e[21] =
|
|
712
|
-
},
|
|
732
|
+
] }), e[16] = r, e[17] = d, e[18] = m, e[19] = u, e[20] = f, e[21] = p) : p = e[21], p;
|
|
733
|
+
}, Zl = (l) => {
|
|
713
734
|
const e = z(36), {
|
|
714
735
|
rows: t,
|
|
715
|
-
columnId:
|
|
736
|
+
columnId: o,
|
|
716
737
|
binCount: n
|
|
717
|
-
} =
|
|
718
|
-
let r, c,
|
|
719
|
-
if (e[0] !== n || e[1] !==
|
|
738
|
+
} = l;
|
|
739
|
+
let r, c, i, s, d, m, u, f, g, p, b, h, x, w;
|
|
740
|
+
if (e[0] !== n || e[1] !== o || e[2] !== t) {
|
|
720
741
|
m = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
721
742
|
e: {
|
|
722
|
-
const
|
|
723
|
-
if (!
|
|
724
|
-
let
|
|
725
|
-
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
743
|
+
const S = Ul(t, o, n);
|
|
744
|
+
if (!S) {
|
|
745
|
+
let A;
|
|
746
|
+
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "No numeric values" }), e[17] = A) : A = e[17], m = A;
|
|
726
747
|
break e;
|
|
727
748
|
}
|
|
728
|
-
const I =
|
|
729
|
-
if (
|
|
730
|
-
m = /* @__PURE__ */
|
|
749
|
+
const I = S.bins.reduce(oo, 0);
|
|
750
|
+
if (S.min === S.max) {
|
|
751
|
+
m = /* @__PURE__ */ a(et, { value: G(S.min), count: I });
|
|
731
752
|
break e;
|
|
732
753
|
}
|
|
733
|
-
|
|
754
|
+
i = ee, b = "column", h = "100%", x = "2xs", w = /* @__PURE__ */ a(Ze, { data: S.bins, dataKey: "count", color: Qe, height: "40px", ariaLabel: `Distribution for ${o}`, tooltipLabel: no, tooltipValue: ro, tooltipSeriesLabel: "Count" }), c = ee, f = "space-between", g = "xs", p = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: G(S.min) }), r = O, s = "label/XS/regular", d = "fg.muted", u = G(S.max);
|
|
734
755
|
}
|
|
735
|
-
e[0] = n, e[1] =
|
|
756
|
+
e[0] = n, e[1] = o, e[2] = t, e[3] = r, e[4] = c, e[5] = i, e[6] = s, e[7] = d, e[8] = m, e[9] = u, e[10] = f, e[11] = g, e[12] = p, e[13] = b, e[14] = h, e[15] = x, e[16] = w;
|
|
736
757
|
} else
|
|
737
|
-
r = e[3], c = e[4],
|
|
758
|
+
r = e[3], c = e[4], i = e[5], s = e[6], d = e[7], m = e[8], u = e[9], f = e[10], g = e[11], p = e[12], b = e[13], h = e[14], x = e[15], w = e[16];
|
|
738
759
|
if (m !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
739
760
|
return m;
|
|
740
761
|
let y;
|
|
741
|
-
e[18] !== r || e[19] !==
|
|
762
|
+
e[18] !== r || e[19] !== s || e[20] !== d || e[21] !== u ? (y = /* @__PURE__ */ a(r, { textStyle: s, color: d, children: u }), e[18] = r, e[19] = s, e[20] = d, e[21] = u, e[22] = y) : y = e[22];
|
|
742
763
|
let C;
|
|
743
|
-
e[23] !== c || e[24] !== y || e[25] !== f || e[26] !== g || e[27] !==
|
|
744
|
-
b,
|
|
745
|
-
y
|
|
746
|
-
] }), e[23] = c, e[24] = y, e[25] = f, e[26] = g, e[27] = b, e[28] = C) : C = e[28];
|
|
747
|
-
let S;
|
|
748
|
-
return e[29] !== a || e[30] !== C || e[31] !== h || e[32] !== v || e[33] !== x || e[34] !== p ? (S = /* @__PURE__ */ k(a, { direction: h, width: v, gap: x, children: [
|
|
764
|
+
e[23] !== c || e[24] !== y || e[25] !== f || e[26] !== g || e[27] !== p ? (C = /* @__PURE__ */ _(c, { justifyContent: f, gap: g, children: [
|
|
749
765
|
p,
|
|
766
|
+
y
|
|
767
|
+
] }), e[23] = c, e[24] = y, e[25] = f, e[26] = g, e[27] = p, e[28] = C) : C = e[28];
|
|
768
|
+
let v;
|
|
769
|
+
return e[29] !== i || e[30] !== C || e[31] !== b || e[32] !== h || e[33] !== x || e[34] !== w ? (v = /* @__PURE__ */ _(i, { direction: b, width: h, gap: x, children: [
|
|
770
|
+
w,
|
|
750
771
|
C
|
|
751
|
-
] }), e[29] =
|
|
752
|
-
},
|
|
772
|
+
] }), e[29] = i, e[30] = C, e[31] = b, e[32] = h, e[33] = x, e[34] = w, e[35] = v) : v = e[35], v;
|
|
773
|
+
}, Ql = (l) => {
|
|
753
774
|
const e = z(15), {
|
|
754
775
|
rows: t,
|
|
755
|
-
columnId:
|
|
776
|
+
columnId: o,
|
|
756
777
|
limit: n
|
|
757
|
-
} =
|
|
758
|
-
let r, c,
|
|
759
|
-
if (e[0] !==
|
|
778
|
+
} = l;
|
|
779
|
+
let r, c, i, s, d, m;
|
|
780
|
+
if (e[0] !== o || e[1] !== n || e[2] !== t) {
|
|
760
781
|
m = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
761
782
|
e: {
|
|
762
|
-
const f =
|
|
783
|
+
const f = Gl(t, o, n);
|
|
763
784
|
if (f.length === 1 && f[0]) {
|
|
764
|
-
m = /* @__PURE__ */
|
|
785
|
+
m = /* @__PURE__ */ a(et, { value: f[0].label, count: f[0].count });
|
|
765
786
|
break e;
|
|
766
787
|
}
|
|
767
|
-
r = ee, c = "column",
|
|
788
|
+
r = ee, c = "column", i = "100%", s = "2xs", d = f.map(ao);
|
|
768
789
|
}
|
|
769
|
-
e[0] =
|
|
790
|
+
e[0] = o, e[1] = n, e[2] = t, e[3] = r, e[4] = c, e[5] = i, e[6] = s, e[7] = d, e[8] = m;
|
|
770
791
|
} else
|
|
771
|
-
r = e[3], c = e[4],
|
|
792
|
+
r = e[3], c = e[4], i = e[5], s = e[6], d = e[7], m = e[8];
|
|
772
793
|
if (m !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
773
794
|
return m;
|
|
774
795
|
let u;
|
|
775
|
-
return e[9] !== r || e[10] !== c || e[11] !==
|
|
776
|
-
},
|
|
796
|
+
return e[9] !== r || e[10] !== c || e[11] !== i || e[12] !== s || e[13] !== d ? (u = /* @__PURE__ */ a(r, { direction: c, width: i, gap: s, children: d }), e[9] = r, e[10] = c, e[11] = i, e[12] = s, e[13] = d, e[14] = u) : u = e[14], u;
|
|
797
|
+
}, eo = (l) => {
|
|
777
798
|
const e = z(11), {
|
|
778
799
|
rows: t,
|
|
779
|
-
columnId:
|
|
800
|
+
columnId: o,
|
|
780
801
|
stat: n
|
|
781
|
-
} =
|
|
802
|
+
} = l;
|
|
782
803
|
if (n.type === "unique") {
|
|
783
|
-
let
|
|
784
|
-
return e[0] !==
|
|
804
|
+
let i;
|
|
805
|
+
return e[0] !== o || e[1] !== t ? (i = /* @__PURE__ */ a(Yl, { rows: t, columnId: o }), e[0] = o, e[1] = t, e[2] = i) : i = e[2], i;
|
|
785
806
|
}
|
|
786
807
|
if (n.type === "histogram") {
|
|
787
|
-
const
|
|
788
|
-
let
|
|
789
|
-
return e[3] !==
|
|
808
|
+
const i = n.bins ?? 10;
|
|
809
|
+
let s;
|
|
810
|
+
return e[3] !== o || e[4] !== t || e[5] !== i ? (s = /* @__PURE__ */ a(Zl, { rows: t, columnId: o, binCount: i }), e[3] = o, e[4] = t, e[5] = i, e[6] = s) : s = e[6], s;
|
|
790
811
|
}
|
|
791
812
|
const r = n.limit ?? 2;
|
|
792
813
|
let c;
|
|
793
|
-
return e[7] !==
|
|
794
|
-
},
|
|
814
|
+
return e[7] !== o || e[8] !== t || e[9] !== r ? (c = /* @__PURE__ */ a(Ql, { rows: t, columnId: o, limit: r }), e[7] = o, e[8] = t, e[9] = r, e[10] = c) : c = e[10], c;
|
|
815
|
+
}, to = (l) => {
|
|
795
816
|
const e = z(12), {
|
|
796
817
|
header: t,
|
|
797
|
-
headerGroup:
|
|
818
|
+
headerGroup: o,
|
|
798
819
|
rows: n,
|
|
799
820
|
columnStats: r,
|
|
800
821
|
fullWidth: c
|
|
801
|
-
} =
|
|
822
|
+
} = l, i = r[t.column.id], s = i?.type;
|
|
802
823
|
let d;
|
|
803
824
|
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
804
825
|
borderRight: "none"
|
|
805
826
|
}, e[0] = d) : d = e[0];
|
|
806
|
-
const m = c &&
|
|
827
|
+
const m = c && o.headers.indexOf(t) === o.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
|
|
807
828
|
let u;
|
|
808
829
|
e[1] !== m ? (u = {
|
|
809
830
|
width: m
|
|
810
831
|
}, e[1] = m, e[2] = u) : u = e[2];
|
|
811
832
|
let f;
|
|
812
|
-
e[3] !== t.column.id || e[4] !== n || e[5] !==
|
|
833
|
+
e[3] !== t.column.id || e[4] !== n || e[5] !== i ? (f = i ? /* @__PURE__ */ a(eo, { rows: n, columnId: t.column.id, stat: i }) : null, e[3] = t.column.id, e[4] = n, e[5] = i, e[6] = f) : f = e[6];
|
|
813
834
|
let g;
|
|
814
|
-
return e[7] !== t.column.id || e[8] !==
|
|
815
|
-
},
|
|
835
|
+
return e[7] !== t.column.id || e[8] !== s || e[9] !== u || e[10] !== f ? (g = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": t.column.id, "data-stat-type": s, borderRight: "1px solid", _last: d, borderColor: "border.subtle", padding: "xs", verticalAlign: "middle", overflow: "hidden", style: u, children: f }), e[7] = t.column.id, e[8] = s, e[9] = u, e[10] = f, e[11] = g) : g = e[11], g;
|
|
836
|
+
}, lo = (l) => {
|
|
816
837
|
const e = z(8), {
|
|
817
838
|
headerGroup: t,
|
|
818
|
-
rows:
|
|
839
|
+
rows: o,
|
|
819
840
|
columnStats: n,
|
|
820
841
|
fullWidth: r,
|
|
821
842
|
noBorder: c
|
|
822
|
-
} =
|
|
843
|
+
} = l;
|
|
823
844
|
if (!t.headers.some((u) => n[u.column.id]))
|
|
824
845
|
return null;
|
|
825
|
-
const
|
|
846
|
+
const s = c ? "none" : "1px solid";
|
|
826
847
|
let d;
|
|
827
|
-
e[0] !== n || e[1] !== r || e[2] !== t || e[3] !==
|
|
848
|
+
e[0] !== n || e[1] !== r || e[2] !== t || e[3] !== o ? (d = t.headers.map((u) => /* @__PURE__ */ a(to, { header: u, headerGroup: t, rows: o, columnStats: n, fullWidth: r }, u.id)), e[0] = n, e[1] = r, e[2] = t, e[3] = o, e[4] = d) : d = e[4];
|
|
828
849
|
let m;
|
|
829
|
-
return e[5] !==
|
|
850
|
+
return e[5] !== s || e[6] !== d ? (m = /* @__PURE__ */ a(L.Row, { className: "data-table-stats-row", borderRight: s, borderColor: "border.subtle", children: d }), e[5] = s, e[6] = d, e[7] = m) : m = e[7], m;
|
|
830
851
|
};
|
|
831
|
-
function
|
|
832
|
-
return
|
|
852
|
+
function oo(l, e) {
|
|
853
|
+
return l + e.count;
|
|
833
854
|
}
|
|
834
|
-
function
|
|
835
|
-
return `${G(
|
|
855
|
+
function no(l) {
|
|
856
|
+
return `${G(l.start)} – ${G(l.end)}`;
|
|
836
857
|
}
|
|
837
|
-
function
|
|
838
|
-
return `${G(Number(
|
|
858
|
+
function ro(l) {
|
|
859
|
+
return `${G(Number(l))} values`;
|
|
839
860
|
}
|
|
840
|
-
function
|
|
841
|
-
return `${
|
|
861
|
+
function io(l) {
|
|
862
|
+
return `${l.label} · ${G(l.count)} values`;
|
|
842
863
|
}
|
|
843
|
-
function
|
|
844
|
-
return `${G(Number(
|
|
864
|
+
function so(l) {
|
|
865
|
+
return `${G(Number(l))}%`;
|
|
845
866
|
}
|
|
846
|
-
function
|
|
847
|
-
return /* @__PURE__ */
|
|
848
|
-
/* @__PURE__ */
|
|
849
|
-
/* @__PURE__ */
|
|
850
|
-
/* @__PURE__ */
|
|
851
|
-
/* @__PURE__ */
|
|
852
|
-
|
|
867
|
+
function ao(l) {
|
|
868
|
+
return /* @__PURE__ */ _(oe, { position: "relative", height: "18px", children: [
|
|
869
|
+
/* @__PURE__ */ a(Ze, { data: [l], dataKey: "percentage", categoryKey: "label", color: Qe, height: "18px", ariaLabel: `${l.label}: ${l.percentage}%`, layout: "vertical", domain: [0, 100], barSize: 18, tooltipLabel: io, tooltipValue: so, tooltipSeriesLabel: "Share" }),
|
|
870
|
+
/* @__PURE__ */ _(ee, { position: "absolute", inset: "0", paddingX: "2xs", justifyContent: "space-between", gap: "xs", pointerEvents: "none", children: [
|
|
871
|
+
/* @__PURE__ */ a(O, { textStyle: "label/2XS", color: "fg.inverted", truncate: !0, children: l.label }),
|
|
872
|
+
/* @__PURE__ */ _(O, { textStyle: "label/2XS/medium", color: "fg.muted", children: [
|
|
873
|
+
l.percentage,
|
|
853
874
|
"%"
|
|
854
875
|
] })
|
|
855
876
|
] })
|
|
856
|
-
] },
|
|
877
|
+
] }, l.label);
|
|
857
878
|
}
|
|
858
|
-
const
|
|
879
|
+
const co = /* @__PURE__ */ new Set(["rowIndex", "rowSelection", "rowActions"]), uo = (l) => l === "asc" ? Ke : l === "desc" ? Je : Rt, mo = (l) => {
|
|
859
880
|
const e = z(37), {
|
|
860
881
|
header: t,
|
|
861
|
-
headerGroup:
|
|
882
|
+
headerGroup: o,
|
|
862
883
|
table: n,
|
|
863
884
|
fullWidth: r,
|
|
864
885
|
hasDescription: c
|
|
865
|
-
} =
|
|
866
|
-
let
|
|
886
|
+
} = l;
|
|
887
|
+
let i, s, d;
|
|
867
888
|
if (e[0] !== t.column || e[1] !== n) {
|
|
868
|
-
|
|
869
|
-
let
|
|
870
|
-
e[5] !== t.column.id || e[6] !== n ? (
|
|
889
|
+
s = t.column.getIsSorted();
|
|
890
|
+
let $;
|
|
891
|
+
e[5] !== t.column.id || e[6] !== n ? ($ = !co.has(t.column.id) && n.getCoreRowModel().rows.length > 1, e[5] = t.column.id, e[6] = n, e[7] = $) : $ = e[7], i = $, d = uo(s), e[0] = t.column, e[1] = n, e[2] = i, e[3] = s, e[4] = d;
|
|
871
892
|
} else
|
|
872
|
-
|
|
893
|
+
i = e[2], s = e[3], d = e[4];
|
|
873
894
|
const m = d;
|
|
874
895
|
let u;
|
|
875
|
-
e[8] !== t ? (u = t.column.id === "rowSelection" ? "Select all" :
|
|
896
|
+
e[8] !== t ? (u = t.column.id === "rowSelection" ? "Select all" : he(t.column.columnDef.header, t.getContext()), e[8] = t, e[9] = u) : u = e[9];
|
|
876
897
|
const f = u, g = t.column.id;
|
|
877
|
-
let
|
|
878
|
-
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
898
|
+
let p;
|
|
899
|
+
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = {
|
|
879
900
|
borderRight: "none"
|
|
880
|
-
}, e[10] =
|
|
881
|
-
const
|
|
901
|
+
}, e[10] = p) : p = e[10];
|
|
902
|
+
const b = t.id, h = r && o.headers.indexOf(t) === o.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
|
|
882
903
|
let x;
|
|
883
|
-
e[11] !==
|
|
884
|
-
width:
|
|
885
|
-
}, e[11] =
|
|
886
|
-
let
|
|
887
|
-
e[13] !== t ? (
|
|
904
|
+
e[11] !== h ? (x = {
|
|
905
|
+
width: h
|
|
906
|
+
}, e[11] = h, e[12] = x) : x = e[12];
|
|
907
|
+
let w;
|
|
908
|
+
e[13] !== t ? (w = he(t.column.columnDef.header, t.getContext()), e[13] = t, e[14] = w) : w = e[14];
|
|
888
909
|
let y;
|
|
889
|
-
e[15] !==
|
|
910
|
+
e[15] !== w ? (y = /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: w }), e[15] = w, e[16] = y) : y = e[16];
|
|
890
911
|
let C;
|
|
891
|
-
e[17] !== m || e[18] !==
|
|
892
|
-
/* @__PURE__ */
|
|
912
|
+
e[17] !== m || e[18] !== i || e[19] !== t.column || e[20] !== s ? (C = i && /* @__PURE__ */ _(X.Root, { children: [
|
|
913
|
+
/* @__PURE__ */ a(X.Trigger, { asChild: !0, children: /* @__PURE__ */ a(Se, { ml: "2px", size: "2xs", "aria-label": s ? `Sorted ${s}` : "Sort column", variant: "ghost", visibility: s ? "visible" : "hidden", _groupHover: {
|
|
893
914
|
visibility: "visible"
|
|
894
|
-
}, children: /* @__PURE__ */
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
/* @__PURE__ */
|
|
897
|
-
/* @__PURE__ */
|
|
898
|
-
|
|
915
|
+
}, children: /* @__PURE__ */ a(Y, { as: m, boxSize: "14px" }) }) }),
|
|
916
|
+
/* @__PURE__ */ a(ce, { children: /* @__PURE__ */ a(X.Positioner, { children: /* @__PURE__ */ _(X.Content, { zIndex: "popover", bg: "bg", children: [
|
|
917
|
+
/* @__PURE__ */ a(X.Item, { value: "sort-asc", asChild: !0, children: /* @__PURE__ */ a(se, { asChild: !0, variant: "full-width", label: "Sort ascending", icon: /* @__PURE__ */ a(Y, { as: Ke, boxSize: "16px" }), disabled: s === "asc", onActivate: () => t.column.toggleSorting(!1) }) }),
|
|
918
|
+
/* @__PURE__ */ a(X.Item, { value: "sort-desc", asChild: !0, children: /* @__PURE__ */ a(se, { asChild: !0, variant: "full-width", label: "Sort descending", icon: /* @__PURE__ */ a(Y, { as: Je, boxSize: "16px" }), disabled: s === "desc", onActivate: () => t.column.toggleSorting(!0) }) }),
|
|
919
|
+
s && /* @__PURE__ */ a(X.Item, { value: "clear-sort", asChild: !0, children: /* @__PURE__ */ a(se, { asChild: !0, variant: "full-width", label: "Clear sort", onActivate: () => t.column.clearSorting() }) })
|
|
899
920
|
] }) }) })
|
|
900
|
-
] }), e[17] = m, e[18] =
|
|
921
|
+
] }), e[17] = m, e[18] = i, e[19] = t.column, e[20] = s, e[21] = C) : C = e[21];
|
|
922
|
+
let v;
|
|
923
|
+
e[22] !== t ? (v = t.column.getCanResize() && /* @__PURE__ */ a("span", { onDoubleClick: () => t.column.resetSize(), onMouseDown: t.getResizeHandler(), onTouchStart: t.getResizeHandler(), className: `resizer ${t.column.getIsResizing() ? "isResizing" : ""}` }), e[22] = t, e[23] = v) : v = e[23];
|
|
901
924
|
let S;
|
|
902
|
-
e[
|
|
903
|
-
let w;
|
|
904
|
-
e[24] !== S || e[25] !== y || e[26] !== C ? (w = /* @__PURE__ */ k(ee, { className: "group", alignItems: "center", justifyContent: "space-between", gap: "1", flex: "1", minW: "0", children: [
|
|
925
|
+
e[24] !== v || e[25] !== y || e[26] !== C ? (S = /* @__PURE__ */ _(ee, { className: "group", alignItems: "center", justifyContent: "space-between", gap: "1", flex: "1", minW: "0", children: [
|
|
905
926
|
y,
|
|
906
927
|
C,
|
|
907
|
-
|
|
908
|
-
] }), e[24] =
|
|
928
|
+
v
|
|
929
|
+
] }), e[24] = v, e[25] = y, e[26] = C, e[27] = S) : S = e[27];
|
|
909
930
|
let I;
|
|
910
|
-
e[28] !== c || e[29] !==
|
|
911
|
-
let
|
|
912
|
-
return e[32] !== t.column.id || e[33] !== t.id || e[34] !== I || e[35] !== x ? (
|
|
913
|
-
},
|
|
931
|
+
e[28] !== c || e[29] !== S || e[30] !== f ? (I = /* @__PURE__ */ a(Fe, { content: f, disabled: c, children: S }), e[28] = c, e[29] = S, e[30] = f, e[31] = I) : I = e[31];
|
|
932
|
+
let A;
|
|
933
|
+
return e[32] !== t.column.id || e[33] !== t.id || e[34] !== I || e[35] !== x ? (A = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": g, textTransform: "none", borderRight: "1px solid", _last: p, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", overflow: "hidden", position: "relative", verticalAlign: "middle", whiteSpace: "nowrap", style: x, children: I }, b), e[32] = t.column.id, e[33] = t.id, e[34] = I, e[35] = x, e[36] = A) : A = e[36], A;
|
|
934
|
+
}, fo = (l) => {
|
|
914
935
|
const e = z(20), {
|
|
915
936
|
cell: t,
|
|
916
|
-
row:
|
|
937
|
+
row: o,
|
|
917
938
|
getCellContextMenuActions: n
|
|
918
|
-
} =
|
|
939
|
+
} = l, r = t.column.columnDef.meta;
|
|
919
940
|
let c;
|
|
920
941
|
e[0] !== t || e[1] !== r ? (c = r?.getCellStyle?.(t.getValue()), e[0] = t, e[1] = r, e[2] = c) : c = e[2];
|
|
921
|
-
const
|
|
922
|
-
let
|
|
923
|
-
if (e[3] !== t || e[4] !== n || e[5] !==
|
|
942
|
+
const i = c;
|
|
943
|
+
let s;
|
|
944
|
+
if (e[3] !== t || e[4] !== n || e[5] !== o.id || e[6] !== o.original) {
|
|
924
945
|
const x = {
|
|
925
|
-
row:
|
|
926
|
-
rowId:
|
|
946
|
+
row: o.original,
|
|
947
|
+
rowId: o.id,
|
|
927
948
|
columnId: t.column.id,
|
|
928
949
|
value: t.getValue()
|
|
929
950
|
};
|
|
930
|
-
|
|
931
|
-
key:
|
|
932
|
-
label:
|
|
933
|
-
icon:
|
|
934
|
-
onClick: () =>
|
|
935
|
-
})) ?? [], e[3] = t, e[4] = n, e[5] =
|
|
951
|
+
s = n?.(x).map((w) => ({
|
|
952
|
+
key: w.label,
|
|
953
|
+
label: w.label,
|
|
954
|
+
icon: w.icon,
|
|
955
|
+
onClick: () => w.onSelect(x)
|
|
956
|
+
})) ?? [], e[3] = t, e[4] = n, e[5] = o.id, e[6] = o.original, e[7] = s;
|
|
936
957
|
} else
|
|
937
|
-
|
|
938
|
-
const d =
|
|
958
|
+
s = e[7];
|
|
959
|
+
const d = s, m = t.column.id;
|
|
939
960
|
let u;
|
|
940
961
|
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = {
|
|
941
962
|
borderRight: "none"
|
|
942
963
|
}, e[8] = u) : u = e[8];
|
|
943
964
|
const f = t.id;
|
|
944
965
|
let g;
|
|
945
|
-
e[9] !== t ? (g =
|
|
946
|
-
let
|
|
947
|
-
e[11] !== t.column.id || e[12] !== t.id || e[13] !==
|
|
948
|
-
const
|
|
966
|
+
e[9] !== t ? (g = he(t.column.columnDef.cell, t.getContext()), e[9] = t, e[10] = g) : g = e[10];
|
|
967
|
+
let p;
|
|
968
|
+
e[11] !== t.column.id || e[12] !== t.id || e[13] !== i || e[14] !== g ? (p = /* @__PURE__ */ a(L.Cell, { "data-column-id": m, width: "fit-content", maxWidth: "12rem", overflow: "hidden", padding: "xs", borderRight: "1px solid", borderColor: "border.subtle", _last: u, borderBottom: "none", textStyle: "paragraph/S/regular", textOverflow: "ellipsis", whiteSpace: "nowrap", style: i, children: g }, f), e[11] = t.column.id, e[12] = t.id, e[13] = i, e[14] = g, e[15] = p) : p = e[15];
|
|
969
|
+
const b = p;
|
|
949
970
|
if (d.length === 0)
|
|
950
|
-
return
|
|
951
|
-
let
|
|
952
|
-
return e[16] !== t.id || e[17] !==
|
|
953
|
-
},
|
|
971
|
+
return b;
|
|
972
|
+
let h;
|
|
973
|
+
return e[16] !== t.id || e[17] !== b || e[18] !== d ? (h = /* @__PURE__ */ a(At, { actions: d, children: b }, t.id), e[16] = t.id, e[17] = b, e[18] = d, e[19] = h) : h = e[19], h;
|
|
974
|
+
}, go = (l) => {
|
|
954
975
|
const e = z(21), {
|
|
955
976
|
row: t,
|
|
956
|
-
noBorder:
|
|
977
|
+
noBorder: o,
|
|
957
978
|
rowIsInteractive: n,
|
|
958
979
|
rowIsActive: r,
|
|
959
980
|
rowIsSelected: c,
|
|
960
|
-
onRowClick:
|
|
961
|
-
getCellContextMenuActions:
|
|
962
|
-
} =
|
|
963
|
-
let b;
|
|
964
|
-
e[0] !== a || e[1] !== t.original || e[2] !== n ? (b = n ? () => a?.(t.original) : void 0, e[0] = a, e[1] = t.original, e[2] = n, e[3] = b) : b = e[3];
|
|
965
|
-
const h = l ? "none" : "1px solid", v = l ? "none" : "1px solid", x = l ? "none" : "1px solid";
|
|
981
|
+
onRowClick: i,
|
|
982
|
+
getCellContextMenuActions: s
|
|
983
|
+
} = l, d = t.id, m = r ? "true" : void 0, u = c ? "true" : void 0, f = c ? "true" : void 0, g = n ? "pointer" : void 0;
|
|
966
984
|
let p;
|
|
967
|
-
e[
|
|
985
|
+
e[0] !== i || e[1] !== t.original || e[2] !== n ? (p = n ? () => i?.(t.original) : void 0, e[0] = i, e[1] = t.original, e[2] = n, e[3] = p) : p = e[3];
|
|
986
|
+
const b = o ? "none" : "1px solid", h = o ? "none" : "1px solid", x = o ? "none" : "1px solid";
|
|
987
|
+
let w;
|
|
988
|
+
e[4] !== x ? (w = {
|
|
968
989
|
borderBottom: x,
|
|
969
990
|
borderColor: "border.subtle"
|
|
970
|
-
}, e[4] = x, e[5] =
|
|
991
|
+
}, e[4] = x, e[5] = w) : w = e[5];
|
|
971
992
|
const y = r ? "bg.active" : "bg";
|
|
972
993
|
let C;
|
|
973
|
-
e[6] !==
|
|
974
|
-
let
|
|
975
|
-
return e[9] !== t.id || e[10] !== m || e[11] !== y || e[12] !== C || e[13] !== u || e[14] !== f || e[15] !== g || e[16] !==
|
|
976
|
-
},
|
|
994
|
+
e[6] !== s || e[7] !== t ? (C = t.getVisibleCells().map((S) => /* @__PURE__ */ a(fo, { cell: S, row: t, getCellContextMenuActions: s }, S.id)), e[6] = s, e[7] = t, e[8] = C) : C = e[8];
|
|
995
|
+
let v;
|
|
996
|
+
return e[9] !== t.id || e[10] !== m || e[11] !== y || e[12] !== C || e[13] !== u || e[14] !== f || e[15] !== g || e[16] !== p || e[17] !== b || e[18] !== h || e[19] !== w ? (v = /* @__PURE__ */ a(L.Row, { "data-active": m, "data-selected": u, "aria-selected": f, cursor: g, onClick: p, borderTop: b, borderBottom: "1px solid", borderRight: h, _last: w, borderColor: "border.subtle", background: y, children: C }, d), e[9] = t.id, e[10] = m, e[11] = y, e[12] = C, e[13] = u, e[14] = f, e[15] = g, e[16] = p, e[17] = b, e[18] = h, e[19] = w, e[20] = v) : v = e[20], v;
|
|
997
|
+
}, ho = (l) => {
|
|
977
998
|
const e = z(12), {
|
|
978
999
|
table: t,
|
|
979
|
-
pagination:
|
|
1000
|
+
pagination: o,
|
|
980
1001
|
pageSizeOptions: n
|
|
981
|
-
} =
|
|
1002
|
+
} = l;
|
|
982
1003
|
let r;
|
|
983
1004
|
e[0] !== t ? (r = t.getPageCount(), e[0] = t, e[1] = r) : r = e[1];
|
|
984
|
-
const c =
|
|
985
|
-
let
|
|
986
|
-
e[2] !== t ? (
|
|
1005
|
+
const c = o.pageIndex, i = o.pageSize;
|
|
1006
|
+
let s;
|
|
1007
|
+
e[2] !== t ? (s = t.getCoreRowModel(), e[2] = t, e[3] = s) : s = e[3];
|
|
987
1008
|
let d;
|
|
988
|
-
return e[4] !== n || e[5] !==
|
|
989
|
-
},
|
|
1009
|
+
return e[4] !== n || e[5] !== o.pageIndex || e[6] !== o.pageSize || e[7] !== r || e[8] !== s.rows.length || e[9] !== t.setPageIndex || e[10] !== t.setPageSize ? (d = /* @__PURE__ */ a(Wt, { pageCount: r, pageIndex: c, pageSize: i, pageSizeOptions: n, totalRows: s.rows.length, onPageChange: t.setPageIndex, onPageSizeChange: t.setPageSize }), e[4] = n, e[5] = o.pageIndex, e[6] = o.pageSize, e[7] = r, e[8] = s.rows.length, e[9] = t.setPageIndex, e[10] = t.setPageSize, e[11] = d) : d = e[11], d;
|
|
1010
|
+
}, bo = (l) => {
|
|
990
1011
|
const {
|
|
991
1012
|
data: e,
|
|
992
1013
|
noBorder: t,
|
|
993
|
-
fullWidth:
|
|
1014
|
+
fullWidth: o,
|
|
994
1015
|
hiddenColumns: n,
|
|
995
1016
|
onRowClick: r,
|
|
996
1017
|
isRowInteractive: c,
|
|
997
|
-
activeRowId:
|
|
998
|
-
columnIcons:
|
|
1018
|
+
activeRowId: i,
|
|
1019
|
+
columnIcons: s,
|
|
999
1020
|
columnDescriptions: d,
|
|
1000
1021
|
compactHeaders: m,
|
|
1001
1022
|
columnStats: u,
|
|
1002
1023
|
columnRenderers: f,
|
|
1003
1024
|
initialPageSize: g,
|
|
1004
|
-
pageSizeOptions:
|
|
1005
|
-
rowActions:
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1025
|
+
pageSizeOptions: p = [10, 20, 30, 50, 100],
|
|
1026
|
+
rowActions: b = [],
|
|
1027
|
+
getRowActions: h,
|
|
1028
|
+
getRowId: x,
|
|
1029
|
+
toolbarStorageKey: w,
|
|
1030
|
+
enableRowActivation: y = !1,
|
|
1031
|
+
getCellContextMenuActions: C
|
|
1032
|
+
} = l, [v, S] = Z([]), [I, A] = Z(() => ({
|
|
1011
1033
|
pageIndex: 0,
|
|
1012
1034
|
pageSize: zt({
|
|
1013
1035
|
initialPageSize: g
|
|
1014
1036
|
})
|
|
1015
|
-
})), [$,
|
|
1037
|
+
})), [$, D] = Z({}), [N, M] = Z(!0), [P, j] = Z(() => {
|
|
1016
1038
|
const R = new Set(n ?? []);
|
|
1017
1039
|
return Object.keys(e[0] || {}).filter((V) => !R.has(V));
|
|
1018
|
-
}), [
|
|
1019
|
-
toolbarStorageKey:
|
|
1020
|
-
columnKeys:
|
|
1021
|
-
}),
|
|
1040
|
+
}), [E, B] = Z(() => /* @__PURE__ */ new Set()), F = new Set(n ?? []), K = Object.keys(e[0] || {}).filter((R) => !F.has(R)), k = ze(K, P), T = new Set(k.filter((R) => !E.has(R))), W = k.filter((R) => T.has(R)), H = Tt(l), ue = Dt(l), te = Vt(e, k, m), Ie = Mt(e, k, x), Ae = Pt({
|
|
1041
|
+
toolbarStorageKey: w,
|
|
1042
|
+
columnKeys: K
|
|
1043
|
+
}), tt = bt(Ae, (R) => R.filters, {
|
|
1022
1044
|
settings: {
|
|
1023
1045
|
viewMode: "list"
|
|
1024
1046
|
},
|
|
1025
|
-
views:
|
|
1026
|
-
activeViewId:
|
|
1027
|
-
}), $e =
|
|
1028
|
-
columnIcons:
|
|
1047
|
+
views: l.defaultViews,
|
|
1048
|
+
activeViewId: l.defaultActiveViewId
|
|
1049
|
+
}), $e = Ht(Ie, tt, te).map((R) => R.sourceRow), lt = El(e, W, {
|
|
1050
|
+
columnIcons: s,
|
|
1029
1051
|
columnDescriptions: d,
|
|
1030
1052
|
compactHeaders: m,
|
|
1031
1053
|
enableSelection: H,
|
|
1032
|
-
rowActions:
|
|
1054
|
+
rowActions: b,
|
|
1055
|
+
getRowActions: h,
|
|
1033
1056
|
selectedRowIds: $,
|
|
1034
1057
|
columnRenderers: f
|
|
1035
|
-
}), J =
|
|
1058
|
+
}), J = dt({
|
|
1036
1059
|
data: $e,
|
|
1037
|
-
columns:
|
|
1060
|
+
columns: lt,
|
|
1038
1061
|
defaultColumn: {
|
|
1039
1062
|
size: 150,
|
|
1040
1063
|
minSize: 40,
|
|
1041
1064
|
maxSize: 800
|
|
1042
1065
|
},
|
|
1043
1066
|
state: {
|
|
1044
|
-
sorting:
|
|
1045
|
-
pagination:
|
|
1067
|
+
sorting: v,
|
|
1068
|
+
pagination: I,
|
|
1046
1069
|
rowSelection: $
|
|
1047
1070
|
},
|
|
1048
|
-
getRowId: (R, V) =>
|
|
1071
|
+
getRowId: (R, V) => Lt(R, V, x),
|
|
1049
1072
|
columnResizeMode: "onChange",
|
|
1050
1073
|
columnResizeDirection: "ltr",
|
|
1051
1074
|
onSortingChange: S,
|
|
1052
|
-
onPaginationChange:
|
|
1053
|
-
onRowSelectionChange:
|
|
1054
|
-
getSortedRowModel:
|
|
1055
|
-
getCoreRowModel:
|
|
1056
|
-
getPaginationRowModel:
|
|
1075
|
+
onPaginationChange: A,
|
|
1076
|
+
onRowSelectionChange: D,
|
|
1077
|
+
getSortedRowModel: ft(),
|
|
1078
|
+
getCoreRowModel: mt(),
|
|
1079
|
+
getPaginationRowModel: ut(),
|
|
1057
1080
|
enableMultiRowSelection: H,
|
|
1058
1081
|
enableRowSelection: H,
|
|
1059
1082
|
autoResetAll: !1
|
|
1060
1083
|
});
|
|
1061
|
-
|
|
1084
|
+
We(() => {
|
|
1062
1085
|
const R = J.getPageCount();
|
|
1063
|
-
R === 0 ||
|
|
1086
|
+
R === 0 || I.pageIndex < R || A((V) => ({
|
|
1064
1087
|
...V,
|
|
1065
1088
|
pageIndex: Math.max(R - 1, 0)
|
|
1066
1089
|
}));
|
|
1067
|
-
}, [
|
|
1090
|
+
}, [I.pageIndex, J]);
|
|
1068
1091
|
const ot = (() => {
|
|
1069
1092
|
const R = J.getFlatHeaders(), V = {};
|
|
1070
1093
|
for (let U = 0; U < R.length; U++) {
|
|
@@ -1072,91 +1095,91 @@ const al = /* @__PURE__ */ new Set(["rowIndex", "rowSelection", "rowActions"]),
|
|
|
1072
1095
|
V[`--header-${q.id}-size`] = q.getSize(), V[`--col-${q.column.id}-size`] = q.column.getSize();
|
|
1073
1096
|
}
|
|
1074
1097
|
return V;
|
|
1075
|
-
})(), me = J.getSelectedRowModel().rows,
|
|
1098
|
+
})(), me = J.getSelectedRowModel().rows, nt = J.getCoreRowModel().rows, rt = Ot(me), it = /* @__PURE__ */ a(Wl, { columns: k.map((R) => ({
|
|
1076
1099
|
id: R,
|
|
1077
1100
|
label: m?.[R] ?? R
|
|
1078
|
-
})), visibleColumnIds:
|
|
1101
|
+
})), visibleColumnIds: T, showStats: N, statsAvailable: !!u, onColumnVisibilityChange: (R, V) => B((U) => {
|
|
1079
1102
|
const q = new Set(U);
|
|
1080
1103
|
return V ? q.delete(R) : q.add(R), q;
|
|
1081
|
-
}), onColumnReorder: (R, V) =>
|
|
1082
|
-
return /* @__PURE__ */
|
|
1083
|
-
/* @__PURE__ */
|
|
1084
|
-
/* @__PURE__ */
|
|
1085
|
-
/* @__PURE__ */
|
|
1104
|
+
}), onColumnReorder: (R, V) => j((U) => Nt(ze(K, U), R, V)), onStatsVisibilityChange: M });
|
|
1105
|
+
return /* @__PURE__ */ _(ee, { direction: "column", height: "100%", width: "100%", children: [
|
|
1106
|
+
/* @__PURE__ */ a(jt, { rows: Ie, storageKey: Ae, attributes: te, columnControl: it, defaultViews: l.defaultViews, defaultActiveViewId: l.defaultActiveViewId }),
|
|
1107
|
+
/* @__PURE__ */ _(oe, { position: "relative", flex: "1", minHeight: "0", children: [
|
|
1108
|
+
/* @__PURE__ */ a(xe, { height: "100%", maxWidth: "unset", showHorizontalScrollbar: !0, children: /* @__PURE__ */ _(L.Root, { className: `data-table${o ? " full-width" : ""}`, style: {
|
|
1086
1109
|
...ot,
|
|
1087
|
-
width:
|
|
1110
|
+
width: o ? "100%" : J.getTotalSize()
|
|
1088
1111
|
}, children: [
|
|
1089
|
-
/* @__PURE__ */
|
|
1090
|
-
/* @__PURE__ */
|
|
1091
|
-
u &&
|
|
1112
|
+
/* @__PURE__ */ a(L.Header, { children: J.getHeaderGroups().map((R) => /* @__PURE__ */ _(ht, { children: [
|
|
1113
|
+
/* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: t ? "none" : "1px solid", borderColor: "border.subtle", children: R.headers.map((V) => /* @__PURE__ */ a(mo, { header: V, headerGroup: R, table: J, fullWidth: o, hasDescription: !!d?.[V.column.id] }, V.id)) }),
|
|
1114
|
+
u && N ? /* @__PURE__ */ a(lo, { headerGroup: R, rows: $e, columnStats: u, noBorder: t, fullWidth: o }) : null
|
|
1092
1115
|
] }, R.id)) }),
|
|
1093
|
-
/* @__PURE__ */
|
|
1094
|
-
const V = r ? c?.(R.original) ?? !0 : !1, U =
|
|
1095
|
-
enableRowActivation:
|
|
1096
|
-
activeRowId:
|
|
1116
|
+
/* @__PURE__ */ a(L.Body, { children: J.getRowModel().rows.map((R) => {
|
|
1117
|
+
const V = r ? c?.(R.original) ?? !0 : !1, U = Et({
|
|
1118
|
+
enableRowActivation: y,
|
|
1119
|
+
activeRowId: i,
|
|
1097
1120
|
rowId: R.id
|
|
1098
1121
|
}), q = R.getIsSelected();
|
|
1099
|
-
return /* @__PURE__ */
|
|
1122
|
+
return /* @__PURE__ */ a(go, { row: R, noBorder: t, rowIsInteractive: V, rowIsActive: U, rowIsSelected: q, onRowClick: r, getCellContextMenuActions: C }, R.id);
|
|
1100
1123
|
}) })
|
|
1101
1124
|
] }) }),
|
|
1102
|
-
H && me.length > 0 ? /* @__PURE__ */
|
|
1125
|
+
H && me.length > 0 ? /* @__PURE__ */ a(Bt, { selectedCount: me.length, totalCount: nt.length, onClearSelection: () => J.toggleAllRowsSelected(!1), onSelectAll: () => J.toggleAllRowsSelected(!0), actions: ue, selectedRows: rt }) : null
|
|
1103
1126
|
] }),
|
|
1104
|
-
J.getPageCount() > 1 && /* @__PURE__ */
|
|
1127
|
+
J.getPageCount() > 1 && /* @__PURE__ */ a(ho, { table: J, pagination: I, pageSizeOptions: p })
|
|
1105
1128
|
] });
|
|
1106
|
-
},
|
|
1129
|
+
}, Oo = (l) => {
|
|
1107
1130
|
const e = z(4);
|
|
1108
|
-
if (
|
|
1109
|
-
let
|
|
1110
|
-
return e[0] !==
|
|
1131
|
+
if (l.editMode) {
|
|
1132
|
+
let o;
|
|
1133
|
+
return e[0] !== l ? (o = /* @__PURE__ */ a(_t, { ...l }), e[0] = l, e[1] = o) : o = e[1], o;
|
|
1111
1134
|
}
|
|
1112
1135
|
let t;
|
|
1113
|
-
return e[2] !==
|
|
1114
|
-
},
|
|
1136
|
+
return e[2] !== l ? (t = /* @__PURE__ */ a(bo, { ...l }), e[2] = l, e[3] = t) : t = e[3], t;
|
|
1137
|
+
}, Ne = ["70%", "45%", "60%", "35%", "55%"], No = (l) => {
|
|
1115
1138
|
const e = z(15), {
|
|
1116
1139
|
columns: t,
|
|
1117
|
-
columnCount:
|
|
1140
|
+
columnCount: o,
|
|
1118
1141
|
rowCount: n
|
|
1119
|
-
} =
|
|
1120
|
-
let
|
|
1121
|
-
e[0] !== r || e[1] !== t ? (
|
|
1142
|
+
} = l, r = o === void 0 ? 3 : o, c = n === void 0 ? 5 : n;
|
|
1143
|
+
let i;
|
|
1144
|
+
e[0] !== r || e[1] !== t ? (i = t && t.length > 0 ? t : Array.from({
|
|
1122
1145
|
length: r
|
|
1123
|
-
},
|
|
1124
|
-
const
|
|
1146
|
+
}, po), e[0] = r, e[1] = t, e[2] = i) : i = e[2];
|
|
1147
|
+
const s = i;
|
|
1125
1148
|
let d;
|
|
1126
|
-
e[3] !==
|
|
1149
|
+
e[3] !== s ? (d = s.map(So), e[3] = s, e[4] = d) : d = e[4];
|
|
1127
1150
|
let m;
|
|
1128
|
-
e[5] !== d ? (m = /* @__PURE__ */
|
|
1151
|
+
e[5] !== d ? (m = /* @__PURE__ */ a(L.Header, { children: /* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: "1px solid", borderColor: "border.subtle", children: d }) }), e[5] = d, e[6] = m) : m = e[6];
|
|
1129
1152
|
let u;
|
|
1130
|
-
if (e[7] !==
|
|
1153
|
+
if (e[7] !== s || e[8] !== c) {
|
|
1131
1154
|
let g;
|
|
1132
|
-
e[10] !==
|
|
1155
|
+
e[10] !== s ? (g = (p, b) => /* @__PURE__ */ a(L.Row, { children: s.map((h, x) => /* @__PURE__ */ a(L.Cell, { padding: "xs", borderRight: "1px solid", borderColor: "border.subtle", _last: {
|
|
1133
1156
|
borderRight: "none"
|
|
1134
|
-
}, borderBottom: "none", children: /* @__PURE__ */
|
|
1157
|
+
}, borderBottom: "none", children: /* @__PURE__ */ a(Ee, { height: "14px", width: Ne[(b + x) % Ne.length], borderRadius: "xs" }) }, h.id)) }, b), e[10] = s, e[11] = g) : g = e[11], u = /* @__PURE__ */ a(L.Body, { children: Array.from({
|
|
1135
1158
|
length: c
|
|
1136
|
-
}, g) }), e[7] =
|
|
1159
|
+
}, g) }), e[7] = s, e[8] = c, e[9] = u;
|
|
1137
1160
|
} else
|
|
1138
1161
|
u = e[9];
|
|
1139
1162
|
let f;
|
|
1140
|
-
return e[12] !== m || e[13] !== u ? (f = /* @__PURE__ */
|
|
1163
|
+
return e[12] !== m || e[13] !== u ? (f = /* @__PURE__ */ _(L.Root, { className: "data-table full-width", width: "100%", children: [
|
|
1141
1164
|
m,
|
|
1142
1165
|
u
|
|
1143
1166
|
] }), e[12] = m, e[13] = u, e[14] = f) : f = e[14], f;
|
|
1144
1167
|
};
|
|
1145
|
-
function
|
|
1168
|
+
function po(l, e) {
|
|
1146
1169
|
return {
|
|
1147
1170
|
id: `column-${e + 1}`,
|
|
1148
1171
|
label: ""
|
|
1149
1172
|
};
|
|
1150
1173
|
}
|
|
1151
|
-
function
|
|
1152
|
-
return /* @__PURE__ */
|
|
1174
|
+
function So(l) {
|
|
1175
|
+
return /* @__PURE__ */ a(L.ColumnHeader, { textTransform: "none", borderRight: "1px solid", _last: {
|
|
1153
1176
|
borderRight: "none"
|
|
1154
|
-
}, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", whiteSpace: "nowrap", children:
|
|
1177
|
+
}, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", whiteSpace: "nowrap", children: l.label ? /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: l.label }) : /* @__PURE__ */ a(Ee, { height: "12px", width: "4rem", borderRadius: "xs" }) }, l.id);
|
|
1155
1178
|
}
|
|
1156
1179
|
export {
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1180
|
+
Oo as DataTable,
|
|
1181
|
+
No as DataTableSkeleton,
|
|
1182
|
+
kl as FriendlyJsonDisplay,
|
|
1160
1183
|
kt as formatDisplayValue,
|
|
1161
1184
|
$t as getIcon
|
|
1162
1185
|
};
|