@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.
- package/dist/components/ui/DataTable.cjs +1 -1
- package/dist/components/ui/DataTable.cjs.map +1 -1
- package/dist/components/ui/DataTable.js +205 -207
- package/dist/components/ui/DataTable.js.map +1 -1
- package/dist/components/ui/DetailBeside.cjs +2 -0
- package/dist/components/ui/DetailBeside.cjs.map +1 -0
- package/dist/components/ui/DetailBeside.d.ts +37 -0
- package/dist/components/ui/DetailBeside.js +113 -0
- package/dist/components/ui/DetailBeside.js.map +1 -0
- package/dist/components/ui/FileTree.cjs +1 -1
- package/dist/components/ui/FileTree.cjs.map +1 -1
- package/dist/components/ui/FileTree.js +118 -111
- package/dist/components/ui/FileTree.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.js +303 -262
- package/dist/components/ui/ServiceMap.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.js +182 -178
- package/dist/components/ui/TraceTree.js.map +1 -1
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/selectedRowDetail.cjs +2 -0
- package/dist/components/ui/selectedRowDetail.cjs.map +1 -0
- package/dist/components/ui/selectedRowDetail.d.ts +25 -0
- package/dist/components/ui/selectedRowDetail.js +8 -0
- package/dist/components/ui/selectedRowDetail.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +259 -257
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { RightOutlined as
|
|
4
|
-
import { usePrimitiveSurface as
|
|
5
|
-
import { useDevelopAfterLoad as
|
|
6
|
-
import { useMediaQuery as
|
|
7
|
-
import { Checkbox as
|
|
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
|
|
10
|
-
import { Pagination as
|
|
11
|
-
import { SkeletonText as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
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
|
|
19
|
-
if (!(
|
|
19
|
+
const c = s.target;
|
|
20
|
+
if (!(c instanceof Element))
|
|
20
21
|
return !1;
|
|
21
|
-
const f =
|
|
22
|
+
const f = c.closest(nt);
|
|
22
23
|
return f !== null && s.currentTarget.contains(f);
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
const R =
|
|
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
|
|
31
|
-
return { row: i, index: n, v: typeof
|
|
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
|
|
36
|
-
return
|
|
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
|
|
40
|
+
function rt({
|
|
40
41
|
direction: s
|
|
41
42
|
}) {
|
|
42
|
-
return /* @__PURE__ */
|
|
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
|
|
68
|
+
function wt({
|
|
68
69
|
columns: s,
|
|
69
|
-
data:
|
|
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:
|
|
76
|
-
className:
|
|
77
|
-
framed:
|
|
78
|
-
persistKey:
|
|
79
|
-
pagination:
|
|
80
|
-
selectable:
|
|
81
|
-
selectedKeys:
|
|
82
|
-
onSelectedKeysChange:
|
|
83
|
-
renderExpanded:
|
|
84
|
-
expandedKeys:
|
|
85
|
-
defaultExpandedKeys:
|
|
86
|
-
onExpandedKeysChange:
|
|
87
|
-
renderMobileCard:
|
|
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:
|
|
90
|
-
stale:
|
|
90
|
+
stickyFirstColumn: he = !1,
|
|
91
|
+
stale: F = !1,
|
|
91
92
|
sort: I,
|
|
92
|
-
defaultSort:
|
|
93
|
-
onSortChange:
|
|
94
|
-
surface:
|
|
93
|
+
defaultSort: me,
|
|
94
|
+
onSortChange: be,
|
|
95
|
+
surface: pe
|
|
95
96
|
}) {
|
|
96
|
-
const N =
|
|
97
|
-
() =>
|
|
98
|
-
[
|
|
99
|
-
),
|
|
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:
|
|
103
|
+
direction: _?.key === e.key ? _.direction === "asc" ? "desc" : "asc" : t
|
|
103
104
|
};
|
|
104
|
-
I === void 0 &&
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
t ? [...
|
|
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
|
-
},
|
|
110
|
-
const t =
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
|
|
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
|
-
), [
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
const t =
|
|
123
|
-
|
|
124
|
-
},
|
|
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:
|
|
127
|
+
persistKey: _e,
|
|
127
128
|
leadWidth: E,
|
|
128
|
-
trailWidth:
|
|
129
|
-
firstColumnMax:
|
|
130
|
-
tableRef:
|
|
131
|
-
}),
|
|
129
|
+
trailWidth: Le,
|
|
130
|
+
firstColumnMax: S ? st : void 0,
|
|
131
|
+
tableRef: Z
|
|
132
|
+
}), Ie = [
|
|
132
133
|
"aegis-data-table",
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
].filter(Boolean).join(" "),
|
|
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
|
-
|
|
141
|
+
S ? `aegis-data-table__${t}--sticky` : ""
|
|
141
142
|
].filter(Boolean).join(" "),
|
|
142
143
|
style: {
|
|
143
|
-
width: e === "select" ?
|
|
144
|
-
left:
|
|
144
|
+
width: e === "select" ? $ : z,
|
|
145
|
+
left: S ? e === "select" ? 0 : je : void 0
|
|
145
146
|
}
|
|
146
|
-
}),
|
|
147
|
-
const
|
|
148
|
-
return
|
|
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 &&
|
|
152
|
-
},
|
|
153
|
-
textAlign:
|
|
154
|
-
left:
|
|
155
|
-
}),
|
|
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--${
|
|
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
|
-
},
|
|
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:
|
|
165
|
-
style:
|
|
166
|
-
children:
|
|
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
|
-
)),
|
|
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:
|
|
173
|
-
style:
|
|
174
|
-
children:
|
|
173
|
+
className: B("td", t),
|
|
174
|
+
style: P(e, t),
|
|
175
|
+
children: ae(
|
|
175
176
|
e,
|
|
176
|
-
/* @__PURE__ */ a(
|
|
177
|
+
/* @__PURE__ */ a(et, { width: "80%", height: "var(--space-3)" })
|
|
177
178
|
)
|
|
178
179
|
},
|
|
179
180
|
e.key
|
|
180
|
-
)),
|
|
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(
|
|
186
|
+
children: /* @__PURE__ */ a(ne, { className: "aegis-data-table__chevron", "aria-hidden": !0 })
|
|
186
187
|
}
|
|
187
|
-
),
|
|
188
|
-
const l =
|
|
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
|
-
|
|
199
|
+
Te(e);
|
|
199
200
|
},
|
|
200
|
-
children: /* @__PURE__ */ a(
|
|
201
|
+
children: /* @__PURE__ */ a(ne, { className: "aegis-data-table__toggle-icon", "aria-hidden": !0 })
|
|
201
202
|
}
|
|
202
203
|
);
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
"
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
"
|
|
220
|
-
{
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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
|
-
},
|
|
236
|
+
}, He = (e) => [
|
|
239
237
|
"aegis-data-table__row",
|
|
240
|
-
|
|
241
|
-
|
|
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(" "),
|
|
241
|
+
].filter(Boolean).join(" "), Ue = [
|
|
244
242
|
"aegis-data-table__table",
|
|
245
|
-
|
|
243
|
+
D ? "aegis-data-table__table--fixed" : "",
|
|
246
244
|
m ? "aegis-data-table__table--cards" : ""
|
|
247
245
|
].filter(Boolean).join(" ");
|
|
248
|
-
return /* @__PURE__ */
|
|
246
|
+
return /* @__PURE__ */ o(
|
|
249
247
|
"div",
|
|
250
248
|
{
|
|
251
|
-
ref:
|
|
252
|
-
className:
|
|
253
|
-
"aria-busy":
|
|
254
|
-
|
|
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__ */
|
|
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:
|
|
257
|
+
ref: Z,
|
|
260
258
|
"aria-label": R,
|
|
261
|
-
className:
|
|
262
|
-
style:
|
|
259
|
+
className: Ue,
|
|
260
|
+
style: D ? C.tableStyle : void 0,
|
|
263
261
|
children: [
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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
|
-
|
|
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
|
-
|
|
284
|
+
r && /* @__PURE__ */ a("col", { style: { width: de } }, "__chevron")
|
|
287
285
|
] }),
|
|
288
|
-
(!m ||
|
|
289
|
-
|
|
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
|
-
|
|
293
|
+
oe,
|
|
296
294
|
{
|
|
297
|
-
checked:
|
|
298
|
-
indeterminate:
|
|
299
|
-
onChange:
|
|
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
|
-
|
|
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__ */
|
|
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:
|
|
320
|
-
style:
|
|
321
|
-
"aria-sort": e.sortable ?
|
|
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__ */
|
|
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
|
-
|
|
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
|
-
|
|
332
|
+
rt,
|
|
335
333
|
{
|
|
336
|
-
direction:
|
|
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
|
-
|
|
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
|
-
|
|
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":
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
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:
|
|
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
|
-
|
|
383
|
+
Je,
|
|
386
384
|
{
|
|
387
385
|
title: i ?? N.noData,
|
|
388
386
|
description: n,
|
|
389
|
-
action:
|
|
387
|
+
action: h
|
|
390
388
|
}
|
|
391
389
|
) })
|
|
392
390
|
}
|
|
393
391
|
) })
|
|
394
392
|
) : O.map((e, t) => {
|
|
395
|
-
const l = f(e, t),
|
|
396
|
-
return /* @__PURE__ */
|
|
397
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
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:
|
|
407
|
-
|
|
405
|
+
onKeyDown: r ? (x) => {
|
|
406
|
+
ze(x, e, t);
|
|
408
407
|
} : void 0,
|
|
409
408
|
children: [
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
d && /* @__PURE__ */ a("td", { ...w("select", "td"), children: xe(p, (x) => {
|
|
410
|
+
we(l, x);
|
|
412
411
|
}) }),
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
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
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
l,
|
|
424
|
-
|
|
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
|
-
|
|
433
|
-
|
|
430
|
+
H && /* @__PURE__ */ a(
|
|
431
|
+
Ze,
|
|
434
432
|
{
|
|
435
|
-
...
|
|
436
|
-
pageRowCount:
|
|
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
|
-
|
|
444
|
+
wt as DataTable
|
|
447
445
|
};
|
|
448
446
|
//# sourceMappingURL=DataTable.js.map
|