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