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