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