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