@lincyaw/aegis-ui 0.11.0 → 0.12.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/agent/ask/AskPanel.cjs +1 -1
- package/dist/agent/ask/AskPanel.cjs.map +1 -1
- package/dist/agent/ask/AskPanel.js +25 -25
- package/dist/agent/ask/AskPanel.js.map +1 -1
- package/dist/components/ui/Button.cjs.map +1 -1
- package/dist/components/ui/Button.d.ts +4 -2
- package/dist/components/ui/Button.js.map +1 -1
- package/dist/components/ui/CheckGrid.cjs +1 -1
- package/dist/components/ui/CheckGrid.cjs.map +1 -1
- package/dist/components/ui/CheckGrid.js +18 -17
- package/dist/components/ui/CheckGrid.js.map +1 -1
- package/dist/components/ui/CodeEditor.cjs +1 -1
- package/dist/components/ui/CodeEditor.cjs.map +1 -1
- package/dist/components/ui/CodeEditor.js +95 -87
- package/dist/components/ui/CodeEditor.js.map +1 -1
- package/dist/components/ui/CommandInvocationCard.cjs +1 -1
- package/dist/components/ui/CommandInvocationCard.cjs.map +1 -1
- package/dist/components/ui/CommandInvocationCard.js +10 -10
- package/dist/components/ui/CommandInvocationCard.js.map +1 -1
- package/dist/components/ui/DangerZone.cjs +1 -1
- package/dist/components/ui/DangerZone.cjs.map +1 -1
- package/dist/components/ui/DangerZone.js +12 -12
- package/dist/components/ui/DangerZone.js.map +1 -1
- package/dist/components/ui/DataList.cjs +1 -1
- package/dist/components/ui/DataList.cjs.map +1 -1
- package/dist/components/ui/DataList.js +4 -3
- package/dist/components/ui/DataList.js.map +1 -1
- package/dist/components/ui/DataTable.cjs +1 -1
- package/dist/components/ui/DataTable.cjs.map +1 -1
- package/dist/components/ui/DataTable.d.ts +2 -1
- package/dist/components/ui/DataTable.js +125 -108
- package/dist/components/ui/DataTable.js.map +1 -1
- package/dist/components/ui/DiffViewer.cjs +1 -1
- package/dist/components/ui/DiffViewer.cjs.map +1 -1
- package/dist/components/ui/DiffViewer.js +29 -25
- package/dist/components/ui/DiffViewer.js.map +1 -1
- package/dist/components/ui/DropdownMenu.cjs.map +1 -1
- package/dist/components/ui/DropdownMenu.d.ts +1 -0
- package/dist/components/ui/DropdownMenu.js.map +1 -1
- package/dist/components/ui/FileDropzone.cjs +1 -1
- package/dist/components/ui/FileDropzone.cjs.map +1 -1
- package/dist/components/ui/FileDropzone.js +12 -12
- package/dist/components/ui/FileDropzone.js.map +1 -1
- package/dist/components/ui/FilePreview.cjs +1 -1
- package/dist/components/ui/FilePreview.cjs.map +1 -1
- package/dist/components/ui/FilePreview.js +16 -13
- package/dist/components/ui/FilePreview.js.map +1 -1
- package/dist/components/ui/ParetoChart.cjs +1 -1
- package/dist/components/ui/ParetoChart.cjs.map +1 -1
- package/dist/components/ui/ParetoChart.js +247 -212
- package/dist/components/ui/ParetoChart.js.map +1 -1
- package/dist/components/ui/QueryAutocomplete.cjs +1 -1
- package/dist/components/ui/QueryAutocomplete.cjs.map +1 -1
- package/dist/components/ui/QueryAutocomplete.d.ts +4 -1
- package/dist/components/ui/QueryAutocomplete.js +136 -123
- package/dist/components/ui/QueryAutocomplete.js.map +1 -1
- package/dist/components/ui/RankBar.cjs +1 -1
- package/dist/components/ui/RankBar.cjs.map +1 -1
- package/dist/components/ui/RankBar.js +9 -9
- package/dist/components/ui/RankBar.js.map +1 -1
- package/dist/components/ui/ReplayStepStrip.cjs +1 -1
- package/dist/components/ui/ReplayStepStrip.cjs.map +1 -1
- package/dist/components/ui/ReplayStepStrip.d.ts +6 -3
- package/dist/components/ui/ReplayStepStrip.js +71 -61
- package/dist/components/ui/ReplayStepStrip.js.map +1 -1
- package/dist/components/ui/ServiceMap.cjs +1 -1
- package/dist/components/ui/ServiceMap.cjs.map +1 -1
- package/dist/components/ui/ServiceMap.d.ts +9 -1
- package/dist/components/ui/ServiceMap.js +333 -268
- package/dist/components/ui/ServiceMap.js.map +1 -1
- package/dist/components/ui/SparkLine.cjs +1 -1
- package/dist/components/ui/SparkLine.cjs.map +1 -1
- package/dist/components/ui/SparkLine.d.ts +5 -2
- package/dist/components/ui/SparkLine.js +33 -29
- package/dist/components/ui/SparkLine.js.map +1 -1
- package/dist/components/ui/TableOfContents.cjs +1 -1
- package/dist/components/ui/TableOfContents.cjs.map +1 -1
- package/dist/components/ui/TableOfContents.js +16 -19
- package/dist/components/ui/TableOfContents.js.map +1 -1
- package/dist/components/ui/Tabs.cjs +2 -2
- package/dist/components/ui/Tabs.cjs.map +1 -1
- package/dist/components/ui/Tabs.js +107 -87
- package/dist/components/ui/Tabs.js.map +1 -1
- package/dist/components/ui/TimeRangePicker.cjs +1 -1
- package/dist/components/ui/TimeRangePicker.cjs.map +1 -1
- package/dist/components/ui/TimeRangePicker.d.ts +12 -1
- package/dist/components/ui/TimeRangePicker.js +69 -63
- package/dist/components/ui/TimeRangePicker.js.map +1 -1
- package/dist/components/ui/Timeline.cjs.map +1 -1
- package/dist/components/ui/Timeline.d.ts +4 -4
- package/dist/components/ui/Timeline.js.map +1 -1
- package/dist/components/ui/TimelineChart.cjs +2 -2
- package/dist/components/ui/TimelineChart.cjs.map +1 -1
- package/dist/components/ui/TimelineChart.d.ts +1 -0
- package/dist/components/ui/TimelineChart.js +131 -137
- package/dist/components/ui/TimelineChart.js.map +1 -1
- package/dist/components/ui/TraceTree.cjs +1 -1
- package/dist/components/ui/TraceTree.cjs.map +1 -1
- package/dist/components/ui/TraceTree.d.ts +4 -0
- package/dist/components/ui/TraceTree.js +88 -87
- package/dist/components/ui/TraceTree.js.map +1 -1
- package/dist/components/ui/TrajectoryStep.cjs +2 -1
- package/dist/components/ui/TrajectoryStep.cjs.map +1 -1
- package/dist/components/ui/TrajectoryStep.js +64 -43
- package/dist/components/ui/TrajectoryStep.js.map +1 -1
- package/dist/components/ui/useColumnWidths.cjs +1 -1
- package/dist/components/ui/useColumnWidths.cjs.map +1 -1
- package/dist/components/ui/useColumnWidths.d.ts +6 -1
- package/dist/components/ui/useColumnWidths.js +139 -123
- package/dist/components/ui/useColumnWidths.js.map +1 -1
- package/dist/layouts/shell/AegisShell.cjs +1 -1
- package/dist/layouts/shell/AegisShell.cjs.map +1 -1
- package/dist/layouts/shell/AegisShell.js +33 -34
- package/dist/layouts/shell/AegisShell.js.map +1 -1
- package/dist/lib/breakAtSeparators.cjs +2 -0
- package/dist/lib/breakAtSeparators.cjs.map +1 -0
- package/dist/lib/breakAtSeparators.d.ts +6 -0
- package/dist/lib/breakAtSeparators.js +10 -0
- package/dist/lib/breakAtSeparators.js.map +1 -0
- package/dist/locale/strings.cjs +1 -1
- package/dist/locale/strings.cjs.map +1 -1
- package/dist/locale/strings.d.ts +6 -0
- package/dist/locale/strings.js +27 -19
- package/dist/locale/strings.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/antdTheme.cjs +1 -1
- package/dist/theme/antdTheme.cjs.map +1 -1
- package/dist/theme/antdTheme.js +50 -29
- package/dist/theme/antdTheme.js.map +1 -1
- package/dist/transports/agentm/AgentmChannelProvider.cjs +1 -1
- package/dist/transports/agentm/AgentmChannelProvider.cjs.map +1 -1
- package/dist/transports/agentm/AgentmChannelProvider.js +66 -61
- package/dist/transports/agentm/AgentmChannelProvider.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
1
|
+
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useId as He, useState as P, useMemo as Ue, useRef as ae, Fragment as Ve } from "react";
|
|
3
3
|
import { RightOutlined as le } from "@ant-design/icons";
|
|
4
|
-
import { usePrimitiveSurface as
|
|
4
|
+
import { usePrimitiveSurface as qe } from "../../agent/core/usePrimitiveSurface.js";
|
|
5
5
|
import { useDevelopAfterLoad as Ge } from "../../hooks/useDevelopAfterLoad.js";
|
|
6
6
|
import { useMediaQuery as Qe } from "../../hooks/useMediaQuery.js";
|
|
7
7
|
import { Checkbox as se } from "./Checkbox.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { EmptyState as
|
|
10
|
-
import { Pagination as
|
|
9
|
+
import { EmptyState as Fe } from "./EmptyState.js";
|
|
10
|
+
import { Pagination as Xe } from "./Pagination.js";
|
|
11
11
|
import { SkeletonText as Ye, Skeleton as Je } from "./Skeleton.js";
|
|
12
|
-
import { useColumnWidths as
|
|
13
|
-
import { useStrings as
|
|
14
|
-
const
|
|
15
|
-
function
|
|
12
|
+
import { useColumnWidths as Ze } from "./useColumnWidths.js";
|
|
13
|
+
import { useStrings as Ke } from "../../locale/useStrings.js";
|
|
14
|
+
const D = 44, W = 32, ie = 40, et = "var(--aegis-data-table-pinned-max)", tt = "(max-width: 768px)", at = 'a, button, input, select, textarea, label, [role="button"], [role="link"], [role="checkbox"]';
|
|
15
|
+
function lt(s) {
|
|
16
16
|
if (window.getSelection()?.type === "Range")
|
|
17
17
|
return !0;
|
|
18
18
|
const g = s.target;
|
|
19
19
|
if (!(g instanceof Element))
|
|
20
20
|
return !1;
|
|
21
|
-
const f = g.closest(
|
|
21
|
+
const f = g.closest(at);
|
|
22
22
|
return f !== null && s.currentTarget.contains(f);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const
|
|
26
|
-
if (!
|
|
24
|
+
function st(s, g, f) {
|
|
25
|
+
const R = g?.sortValue;
|
|
26
|
+
if (!R)
|
|
27
27
|
return s;
|
|
28
28
|
const y = f === "asc" ? 1 : -1;
|
|
29
29
|
return s.map((i, n) => {
|
|
30
|
-
const u =
|
|
30
|
+
const u = R(i);
|
|
31
31
|
return { row: i, index: n, v: typeof u == "number" && isNaN(u) ? null : u };
|
|
32
32
|
}).sort((i, n) => {
|
|
33
33
|
if (i.v === null || n.v === null)
|
|
@@ -36,10 +36,10 @@ function at(s, g, f) {
|
|
|
36
36
|
return u === 0 ? i.index - n.index : u * y;
|
|
37
37
|
}).map((i) => i.row);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function it({
|
|
40
40
|
direction: s
|
|
41
41
|
}) {
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ d(
|
|
43
43
|
"svg",
|
|
44
44
|
{
|
|
45
45
|
className: "aegis-data-table__sort-icon",
|
|
@@ -64,11 +64,11 @@ function lt({
|
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function vt({
|
|
68
68
|
columns: s,
|
|
69
69
|
data: g,
|
|
70
70
|
rowKey: f,
|
|
71
|
-
ariaLabel:
|
|
71
|
+
ariaLabel: R,
|
|
72
72
|
loading: y = !1,
|
|
73
73
|
emptyTitle: i,
|
|
74
74
|
emptyDescription: n,
|
|
@@ -76,39 +76,39 @@ function ft({
|
|
|
76
76
|
className: ne,
|
|
77
77
|
framed: oe = !0,
|
|
78
78
|
persistKey: de,
|
|
79
|
-
pagination:
|
|
80
|
-
selectable:
|
|
81
|
-
selectedKeys:
|
|
82
|
-
onSelectedKeysChange:
|
|
83
|
-
renderExpanded:
|
|
84
|
-
expandedKeys:
|
|
79
|
+
pagination: z,
|
|
80
|
+
selectable: r = !1,
|
|
81
|
+
selectedKeys: H,
|
|
82
|
+
onSelectedKeysChange: U,
|
|
83
|
+
renderExpanded: V,
|
|
84
|
+
expandedKeys: q,
|
|
85
85
|
defaultExpandedKeys: re,
|
|
86
86
|
onExpandedKeysChange: ce,
|
|
87
87
|
renderMobileCard: G,
|
|
88
|
-
onRowClick:
|
|
88
|
+
onRowClick: L,
|
|
89
89
|
stickyFirstColumn: _e = !1,
|
|
90
90
|
stale: Q = !1,
|
|
91
|
-
sort:
|
|
91
|
+
sort: I,
|
|
92
92
|
defaultSort: ge,
|
|
93
93
|
onSortChange: he,
|
|
94
94
|
surface: ue
|
|
95
95
|
}) {
|
|
96
|
-
const N =
|
|
97
|
-
() =>
|
|
98
|
-
[g,
|
|
96
|
+
const N = Ke(), me = Qe(tt), be = He(), m = G !== void 0 && me, pe = Ge(y), [fe, ve] = P(ge ?? null), h = I === void 0 ? fe : I, F = s.find((e) => e.key === h?.key), O = Ue(
|
|
97
|
+
() => st(g, F, h?.direction ?? "asc"),
|
|
98
|
+
[g, F, h?.direction]
|
|
99
99
|
), ye = (e) => {
|
|
100
100
|
const t = e.firstSortDirection ?? (e.numeric ? "desc" : "asc"), l = {
|
|
101
101
|
key: e.key,
|
|
102
102
|
direction: h?.key === e.key ? h.direction === "asc" ? "desc" : "asc" : t
|
|
103
103
|
};
|
|
104
|
-
|
|
105
|
-
}, S =
|
|
106
|
-
|
|
104
|
+
I === void 0 && ve(l), he?.(l);
|
|
105
|
+
}, S = H ?? [], k = O.map((e, t) => f(e, t)), j = k.filter((e) => S.includes(e)).length, Ne = (e, t) => {
|
|
106
|
+
U?.(
|
|
107
107
|
t ? [...S, e] : S.filter((l) => l !== e)
|
|
108
108
|
);
|
|
109
109
|
}, ke = (e) => {
|
|
110
110
|
const t = S.filter((l) => !k.includes(l));
|
|
111
|
-
|
|
111
|
+
U?.(e ? [...t, ...k] : t);
|
|
112
112
|
}, Ce = (e, t) => /* @__PURE__ */ a(
|
|
113
113
|
se,
|
|
114
114
|
{
|
|
@@ -116,59 +116,60 @@ function ft({
|
|
|
116
116
|
onChange: t,
|
|
117
117
|
ariaLabel: N.selectRow
|
|
118
118
|
}
|
|
119
|
-
), [we, Se] =
|
|
120
|
-
|
|
119
|
+
), [we, Se] = P(re ?? []), v = q ?? we, [M, xe] = P(v), X = v.filter((e) => !M.includes(e));
|
|
120
|
+
X.length > 0 && xe([...M, ...X]);
|
|
121
121
|
const Re = (e) => {
|
|
122
122
|
const t = v.includes(e) ? v.filter((l) => l !== e) : [...v, e];
|
|
123
|
-
|
|
124
|
-
}, Y = ae(null), J = ae(null), Ee =
|
|
123
|
+
q === void 0 && Se(t), ce?.(t);
|
|
124
|
+
}, Y = ae(null), J = ae(null), Ee = qe(ue, g, "table", J), b = V !== void 0, c = L !== void 0, E = (r ? D : 0) + (b ? W : 0), Te = c ? ie : 0, x = _e && !m, C = Ze({
|
|
125
125
|
columns: s,
|
|
126
126
|
persistKey: de,
|
|
127
|
-
leadWidth:
|
|
128
|
-
trailWidth:
|
|
127
|
+
leadWidth: E,
|
|
128
|
+
trailWidth: Te,
|
|
129
|
+
firstColumnMax: x ? et : void 0,
|
|
129
130
|
tableRef: Y
|
|
130
|
-
}),
|
|
131
|
+
}), $e = [
|
|
131
132
|
"aegis-data-table",
|
|
132
133
|
oe ? "aegis-data-table--framed" : "",
|
|
133
134
|
Q ? "aegis-data-table--stale" : "",
|
|
134
135
|
ne ?? ""
|
|
135
|
-
].filter(Boolean).join(" "),
|
|
136
|
+
].filter(Boolean).join(" "), T = C.sized && !m, $ = T && C.fillerStyle !== void 0, Z = (m ? 1 : s.length) + ($ ? 1 : 0) + (c ? 1 : 0), De = Z + (r ? 1 : 0) + (b ? 1 : 0), Le = r ? D : 0, w = (e, t) => ({
|
|
136
137
|
className: [
|
|
137
138
|
`aegis-data-table__${t}`,
|
|
138
139
|
`aegis-data-table__${e}-cell`,
|
|
139
|
-
|
|
140
|
+
x ? `aegis-data-table__${t}--sticky` : ""
|
|
140
141
|
].filter(Boolean).join(" "),
|
|
141
142
|
style: {
|
|
142
|
-
width: e === "select" ?
|
|
143
|
-
left:
|
|
143
|
+
width: e === "select" ? D : W,
|
|
144
|
+
left: x ? e === "select" ? 0 : Le : void 0
|
|
144
145
|
}
|
|
145
|
-
}),
|
|
146
|
-
const
|
|
147
|
-
return
|
|
146
|
+
}), A = (e, t, l) => {
|
|
147
|
+
const o = `aegis-data-table__${e}`, _ = [o];
|
|
148
|
+
return x && t === 0 && _.push(`${o}--sticky`, `${o}--pinned`), l !== void 0 && (_.push(
|
|
148
149
|
"aegis-data-table__td--tone",
|
|
149
150
|
`aegis-data-table__td--tone-${l.tone}`
|
|
150
151
|
), l.step !== void 0 && l.step > 1 && _.push(`aegis-data-table__td--step-${String(l.step)}`)), _.join(" ");
|
|
151
152
|
}, K = (e) => e.kind === "actions" || e.numeric === !0 ? "right" : e.align ?? "left", B = (e, t) => ({
|
|
152
153
|
textAlign: K(e),
|
|
153
|
-
left:
|
|
154
|
+
left: x && t === 0 ? E : void 0
|
|
154
155
|
}), ee = (e, t) => {
|
|
155
156
|
const l = [
|
|
156
157
|
"aegis-data-table__cell",
|
|
157
158
|
`aegis-data-table__cell--${K(e)}`
|
|
158
159
|
];
|
|
159
160
|
return e.numeric && l.push("aegis-data-table__cell--numeric"), e.kind === "actions" ? l.push("aegis-data-table__cell--actions") : (e.truncate ?? !0) && l.push("aegis-data-table__cell--truncate"), /* @__PURE__ */ a("div", { className: l.join(" "), children: t });
|
|
160
|
-
},
|
|
161
|
+
}, Ie = (e, t) => m ? /* @__PURE__ */ a("td", { className: "aegis-data-table__td aegis-data-table__card-cell", children: G(e, t) }) : s.map((l, o) => /* @__PURE__ */ a(
|
|
161
162
|
"td",
|
|
162
163
|
{
|
|
163
|
-
className:
|
|
164
|
-
style: B(l,
|
|
164
|
+
className: A("td", o, l.cellTone?.(e, t)),
|
|
165
|
+
style: B(l, o),
|
|
165
166
|
children: ee(l, l.render(e, t))
|
|
166
167
|
},
|
|
167
168
|
l.key
|
|
168
169
|
)), Oe = () => m ? /* @__PURE__ */ a("td", { className: "aegis-data-table__td aegis-data-table__card-cell", children: /* @__PURE__ */ a(Ye, { lines: 2 }) }) : s.map((e, t) => /* @__PURE__ */ a(
|
|
169
170
|
"td",
|
|
170
171
|
{
|
|
171
|
-
className:
|
|
172
|
+
className: A("td", t),
|
|
172
173
|
style: B(e, t),
|
|
173
174
|
children: ee(
|
|
174
175
|
e,
|
|
@@ -176,14 +177,14 @@ function ft({
|
|
|
176
177
|
)
|
|
177
178
|
},
|
|
178
179
|
e.key
|
|
179
|
-
)), te =
|
|
180
|
+
)), te = $ && /* @__PURE__ */ a("td", { className: "aegis-data-table__td aegis-data-table__filler", "aria-hidden": !0 }), je = c && /* @__PURE__ */ a(
|
|
180
181
|
"td",
|
|
181
182
|
{
|
|
182
183
|
className: "aegis-data-table__td aegis-data-table__chevron-cell",
|
|
183
184
|
"aria-hidden": !0,
|
|
184
185
|
children: /* @__PURE__ */ a(le, { className: "aegis-data-table__chevron", "aria-hidden": !0 })
|
|
185
186
|
}
|
|
186
|
-
),
|
|
187
|
+
), Me = (e, t) => {
|
|
187
188
|
const l = v.includes(e);
|
|
188
189
|
return /* @__PURE__ */ a(
|
|
189
190
|
"button",
|
|
@@ -199,60 +200,70 @@ function ft({
|
|
|
199
200
|
children: /* @__PURE__ */ a(le, { className: "aegis-data-table__toggle-icon", "aria-hidden": !0 })
|
|
200
201
|
}
|
|
201
202
|
);
|
|
202
|
-
},
|
|
203
|
+
}, Ae = (e, t, l, o, _) => {
|
|
203
204
|
const p = v.includes(l);
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
+
return /* @__PURE__ */ d(
|
|
205
206
|
"tr",
|
|
206
207
|
{
|
|
207
208
|
className: p ? "aegis-data-table__detail-row aegis-data-table__detail-row--open" : "aegis-data-table__detail-row",
|
|
208
209
|
children: [
|
|
209
|
-
|
|
210
|
+
r && /* @__PURE__ */ a("td", { className: "aegis-data-table__detail-cell" }),
|
|
210
211
|
/* @__PURE__ */ a("td", { className: "aegis-data-table__detail-cell" }),
|
|
211
212
|
/* @__PURE__ */ a(
|
|
212
213
|
"td",
|
|
213
214
|
{
|
|
214
|
-
id:
|
|
215
|
+
id: o,
|
|
215
216
|
colSpan: Z,
|
|
216
217
|
className: "aegis-data-table__detail-cell",
|
|
217
|
-
children: /* @__PURE__ */ a(
|
|
218
|
+
children: /* @__PURE__ */ a(
|
|
219
|
+
"div",
|
|
220
|
+
{
|
|
221
|
+
className: "aegis-data-table__detail",
|
|
222
|
+
style: {
|
|
223
|
+
left: E,
|
|
224
|
+
width: `calc(100cqi - ${String(E)}px)`
|
|
225
|
+
},
|
|
226
|
+
children: /* @__PURE__ */ a("div", { className: "aegis-data-table__detail-clip", children: /* @__PURE__ */ a("div", { className: "aegis-data-table__detail-body", children: (p || M.includes(l)) && _(e, t) }) })
|
|
227
|
+
}
|
|
228
|
+
)
|
|
218
229
|
}
|
|
219
230
|
)
|
|
220
231
|
]
|
|
221
232
|
}
|
|
222
233
|
);
|
|
223
234
|
}, Be = (e, t, l) => {
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
e.key === "Enter" && e.target === e.currentTarget && (e.preventDefault(),
|
|
227
|
-
},
|
|
235
|
+
lt(e) || L?.(t, l);
|
|
236
|
+
}, Pe = (e, t, l) => {
|
|
237
|
+
e.key === "Enter" && e.target === e.currentTarget && (e.preventDefault(), L?.(t, l));
|
|
238
|
+
}, We = (e) => [
|
|
228
239
|
"aegis-data-table__row",
|
|
229
|
-
|
|
240
|
+
c ? "aegis-data-table__row--clickable" : "",
|
|
230
241
|
b ? "aegis-data-table__row--expandable" : "",
|
|
231
242
|
e ? "aegis-data-table__row--selected" : ""
|
|
232
|
-
].filter(Boolean).join(" "),
|
|
243
|
+
].filter(Boolean).join(" "), ze = [
|
|
233
244
|
"aegis-data-table__table",
|
|
234
|
-
|
|
245
|
+
T ? "aegis-data-table__table--fixed" : "",
|
|
235
246
|
m ? "aegis-data-table__table--cards" : ""
|
|
236
247
|
].filter(Boolean).join(" ");
|
|
237
|
-
return /* @__PURE__ */
|
|
248
|
+
return /* @__PURE__ */ d(
|
|
238
249
|
"div",
|
|
239
250
|
{
|
|
240
251
|
ref: J,
|
|
241
|
-
className:
|
|
252
|
+
className: $e,
|
|
242
253
|
"aria-busy": Q || y ? !0 : void 0,
|
|
243
254
|
...Ee,
|
|
244
255
|
children: [
|
|
245
|
-
/* @__PURE__ */ a("div", { className: "aegis-data-table__scroll", children: /* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ a("div", { className: "aegis-data-table__scroll-frame", children: /* @__PURE__ */ a("div", { className: "aegis-data-table__scroll", children: /* @__PURE__ */ d(
|
|
246
257
|
"table",
|
|
247
258
|
{
|
|
248
259
|
ref: Y,
|
|
249
|
-
"aria-label":
|
|
250
|
-
className:
|
|
251
|
-
style:
|
|
260
|
+
"aria-label": R,
|
|
261
|
+
className: ze,
|
|
262
|
+
style: T ? C.tableStyle : void 0,
|
|
252
263
|
children: [
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
b && /* @__PURE__ */ a("col", { style: { width:
|
|
264
|
+
T && /* @__PURE__ */ d("colgroup", { children: [
|
|
265
|
+
r && /* @__PURE__ */ a("col", { style: { width: D } }, "__select"),
|
|
266
|
+
b && /* @__PURE__ */ a("col", { style: { width: W } }, "__toggle"),
|
|
256
267
|
s.map((e, t) => {
|
|
257
268
|
const l = C.widths[t];
|
|
258
269
|
return /* @__PURE__ */ a(
|
|
@@ -264,7 +275,7 @@ function ft({
|
|
|
264
275
|
e.key
|
|
265
276
|
);
|
|
266
277
|
}),
|
|
267
|
-
|
|
278
|
+
$ && /* @__PURE__ */ a(
|
|
268
279
|
"col",
|
|
269
280
|
{
|
|
270
281
|
"data-column-filler": !0,
|
|
@@ -272,10 +283,10 @@ function ft({
|
|
|
272
283
|
},
|
|
273
284
|
"__filler"
|
|
274
285
|
),
|
|
275
|
-
|
|
286
|
+
c && /* @__PURE__ */ a("col", { style: { width: ie } }, "__chevron")
|
|
276
287
|
] }),
|
|
277
|
-
(!m ||
|
|
278
|
-
|
|
288
|
+
(!m || r) && /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ d("tr", { children: [
|
|
289
|
+
r && /* @__PURE__ */ a(
|
|
279
290
|
"th",
|
|
280
291
|
{
|
|
281
292
|
scope: "col",
|
|
@@ -300,16 +311,16 @@ function ft({
|
|
|
300
311
|
},
|
|
301
312
|
"__toggle"
|
|
302
313
|
),
|
|
303
|
-
m ? /* @__PURE__ */ a("th", { scope: "col", className: "aegis-data-table__th" }) : s.map((e, t) => /* @__PURE__ */
|
|
314
|
+
m ? /* @__PURE__ */ a("th", { scope: "col", className: "aegis-data-table__th" }) : s.map((e, t) => /* @__PURE__ */ d(
|
|
304
315
|
"th",
|
|
305
316
|
{
|
|
306
317
|
scope: "col",
|
|
307
318
|
"data-column-key": e.key,
|
|
308
|
-
className:
|
|
319
|
+
className: A("th", t),
|
|
309
320
|
style: B(e, t),
|
|
310
321
|
"aria-sort": e.sortable ? h?.key === e.key ? h.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
311
322
|
children: [
|
|
312
|
-
e.sortable ? /* @__PURE__ */
|
|
323
|
+
e.sortable ? /* @__PURE__ */ d(
|
|
313
324
|
"button",
|
|
314
325
|
{
|
|
315
326
|
type: "button",
|
|
@@ -320,7 +331,7 @@ function ft({
|
|
|
320
331
|
children: [
|
|
321
332
|
/* @__PURE__ */ a("span", { className: "aegis-data-table__th-label", children: e.header }),
|
|
322
333
|
/* @__PURE__ */ a(
|
|
323
|
-
|
|
334
|
+
it,
|
|
324
335
|
{
|
|
325
336
|
direction: h?.key === e.key ? h.direction : null
|
|
326
337
|
}
|
|
@@ -340,7 +351,7 @@ function ft({
|
|
|
340
351
|
},
|
|
341
352
|
e.key
|
|
342
353
|
)),
|
|
343
|
-
|
|
354
|
+
$ && /* @__PURE__ */ a(
|
|
344
355
|
"th",
|
|
345
356
|
{
|
|
346
357
|
scope: "col",
|
|
@@ -348,7 +359,7 @@ function ft({
|
|
|
348
359
|
"aria-hidden": !0
|
|
349
360
|
}
|
|
350
361
|
),
|
|
351
|
-
|
|
362
|
+
c && /* @__PURE__ */ a(
|
|
352
363
|
"th",
|
|
353
364
|
{
|
|
354
365
|
scope: "col",
|
|
@@ -357,21 +368,21 @@ function ft({
|
|
|
357
368
|
}
|
|
358
369
|
)
|
|
359
370
|
] }) }),
|
|
360
|
-
/* @__PURE__ */ a("tbody", { "data-aegis-develop": pe || void 0, children: y ? Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */
|
|
361
|
-
|
|
371
|
+
/* @__PURE__ */ a("tbody", { "data-aegis-develop": pe || void 0, children: y ? Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ d("tr", { className: "aegis-data-table__row", children: [
|
|
372
|
+
r && /* @__PURE__ */ a("td", { ...w("select", "td") }, "__select"),
|
|
362
373
|
b && /* @__PURE__ */ a("td", { ...w("toggle", "td") }, "__toggle"),
|
|
363
374
|
Oe(),
|
|
364
375
|
te,
|
|
365
|
-
|
|
376
|
+
c && /* @__PURE__ */ a("td", { className: "aegis-data-table__td", "aria-hidden": !0 })
|
|
366
377
|
] }, `sk-${t}`)) : O.length === 0 ? (
|
|
367
378
|
// Not a data row, so an empty table has no rows to read.
|
|
368
379
|
/* @__PURE__ */ a("tr", { role: "presentation", children: /* @__PURE__ */ a(
|
|
369
380
|
"td",
|
|
370
381
|
{
|
|
371
|
-
colSpan:
|
|
382
|
+
colSpan: De,
|
|
372
383
|
className: "aegis-data-table__empty-cell",
|
|
373
384
|
children: /* @__PURE__ */ a("div", { className: "aegis-data-table__empty", children: /* @__PURE__ */ a(
|
|
374
|
-
|
|
385
|
+
Fe,
|
|
375
386
|
{
|
|
376
387
|
title: i ?? N.noData,
|
|
377
388
|
description: n,
|
|
@@ -381,41 +392,47 @@ function ft({
|
|
|
381
392
|
}
|
|
382
393
|
) })
|
|
383
394
|
) : O.map((e, t) => {
|
|
384
|
-
const l = f(e, t),
|
|
385
|
-
return /* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */
|
|
395
|
+
const l = f(e, t), o = `${be}-detail-${String(t)}`, _ = S.includes(l);
|
|
396
|
+
return /* @__PURE__ */ d(Ve, { children: [
|
|
397
|
+
/* @__PURE__ */ d(
|
|
387
398
|
"tr",
|
|
388
399
|
{
|
|
389
|
-
className:
|
|
390
|
-
"aria-selected":
|
|
391
|
-
tabIndex:
|
|
392
|
-
onClick:
|
|
400
|
+
className: We(_),
|
|
401
|
+
"aria-selected": r || H !== void 0 ? _ : void 0,
|
|
402
|
+
tabIndex: c ? 0 : void 0,
|
|
403
|
+
onClick: c ? (p) => {
|
|
393
404
|
Be(p, e, t);
|
|
394
405
|
} : void 0,
|
|
395
|
-
onKeyDown:
|
|
396
|
-
|
|
406
|
+
onKeyDown: c ? (p) => {
|
|
407
|
+
Pe(p, e, t);
|
|
397
408
|
} : void 0,
|
|
398
409
|
children: [
|
|
399
|
-
|
|
410
|
+
r && /* @__PURE__ */ a("td", { ...w("select", "td"), children: Ce(_, (p) => {
|
|
400
411
|
Ne(l, p);
|
|
401
412
|
}) }),
|
|
402
|
-
b && /* @__PURE__ */ a("td", { ...w("toggle", "td"), children:
|
|
403
|
-
|
|
413
|
+
b && /* @__PURE__ */ a("td", { ...w("toggle", "td"), children: Me(l, o) }),
|
|
414
|
+
Ie(e, t),
|
|
404
415
|
te,
|
|
405
416
|
je
|
|
406
417
|
]
|
|
407
418
|
}
|
|
408
419
|
),
|
|
409
|
-
b &&
|
|
420
|
+
b && Ae(
|
|
421
|
+
e,
|
|
422
|
+
t,
|
|
423
|
+
l,
|
|
424
|
+
o,
|
|
425
|
+
V
|
|
426
|
+
)
|
|
410
427
|
] }, l);
|
|
411
428
|
}) })
|
|
412
429
|
]
|
|
413
430
|
}
|
|
414
|
-
) }),
|
|
415
|
-
|
|
416
|
-
|
|
431
|
+
) }) }),
|
|
432
|
+
z && /* @__PURE__ */ a(
|
|
433
|
+
Xe,
|
|
417
434
|
{
|
|
418
|
-
...
|
|
435
|
+
...z,
|
|
419
436
|
pageRowCount: g.length,
|
|
420
437
|
disabled: y,
|
|
421
438
|
className: "aegis-data-table__footer"
|
|
@@ -426,6 +443,6 @@ function ft({
|
|
|
426
443
|
);
|
|
427
444
|
}
|
|
428
445
|
export {
|
|
429
|
-
|
|
446
|
+
vt as DataTable
|
|
430
447
|
};
|
|
431
448
|
//# sourceMappingURL=DataTable.js.map
|