@mechane-ai/elements 0.50.0 → 0.51.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/catalog.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@mechane-ai/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"recipes": [
|
|
5
5
|
{
|
|
6
6
|
"slug": "allocation-report",
|
|
@@ -5636,10 +5636,22 @@
|
|
|
5636
5636
|
"kind": "type",
|
|
5637
5637
|
"declaration": "dist/packages/kits/src/research/collection-page.d.ts"
|
|
5638
5638
|
},
|
|
5639
|
+
"CollectionSectionProps": {
|
|
5640
|
+
"kind": "type",
|
|
5641
|
+
"declaration": "dist/packages/kits/src/research/collection-page.d.ts"
|
|
5642
|
+
},
|
|
5643
|
+
"CollectionStatus": {
|
|
5644
|
+
"kind": "type",
|
|
5645
|
+
"declaration": "dist/packages/kits/src/research/collection-page.d.ts"
|
|
5646
|
+
},
|
|
5639
5647
|
"CollectionPage": {
|
|
5640
5648
|
"kind": "value",
|
|
5641
5649
|
"declaration": "dist/packages/kits/src/research/collection-page.d.ts"
|
|
5642
5650
|
},
|
|
5651
|
+
"CollectionSection": {
|
|
5652
|
+
"kind": "value",
|
|
5653
|
+
"declaration": "dist/packages/kits/src/research/collection-page.d.ts"
|
|
5654
|
+
},
|
|
5643
5655
|
"FindingCardLabels": {
|
|
5644
5656
|
"kind": "type",
|
|
5645
5657
|
"declaration": "dist/packages/kits/src/research/finding-card.d.ts"
|
package/dist/kits/research.js
CHANGED
|
@@ -1,93 +1,159 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { f as
|
|
9
|
-
import { t as
|
|
10
|
-
import { u as
|
|
1
|
+
import { d as e, f as t, g as n, h as r, m as i, n as a, o, u as s, y as c } from "../src-DNclWY4V.js";
|
|
2
|
+
import { c as l, f as u, h as d, l as f, m as p, o as m, p as h, r as g, t as _, v } from "../src-9EJskqB_.js";
|
|
3
|
+
import { m as y, p as b, s as x, t as S } from "../src-npqwq3Sa.js";
|
|
4
|
+
import { T as C, h as w, i as T, n as E } from "../src-DhWMspwr.js";
|
|
5
|
+
import { r as D } from "../figure-format-B8kRZMlo.js";
|
|
6
|
+
import { n as O } from "../src-na2DdkKI.js";
|
|
7
|
+
import { t as k } from "../tree-diagram-Dau9jeXS.js";
|
|
8
|
+
import { f as A } from "../time-series-CsngFxr1.js";
|
|
9
|
+
import { t as j } from "../src-DFW49IAs.js";
|
|
10
|
+
import { u as M } from "../src-Dxs3Buo_.js";
|
|
11
11
|
import "@stylexjs/stylex";
|
|
12
|
-
import { useEffect as
|
|
13
|
-
import { Fragment as
|
|
12
|
+
import { useEffect as N } from "react";
|
|
13
|
+
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
14
14
|
// packages/kits/src/research/collection-page.tsx
|
|
15
|
-
var
|
|
15
|
+
var L = /* @__PURE__ */ new Set([
|
|
16
16
|
"INPUT",
|
|
17
17
|
"TEXTAREA",
|
|
18
18
|
"SELECT"
|
|
19
|
-
]);
|
|
20
|
-
function
|
|
21
|
-
return e instanceof HTMLElement ? e.isContentEditable ||
|
|
19
|
+
]), R = 8;
|
|
20
|
+
function z(e) {
|
|
21
|
+
return e instanceof HTMLElement ? e.isContentEditable || L.has(e.tagName) : !1;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
let k =
|
|
23
|
+
function B({ title: n, caption: i, rows: a, getRowId: o, columns: c, sort: l, onSortChange: u, search: d, filters: f, transformRows: p, rowAction: m, activeRowId: h, rowSizing: g, empty: _, filteredEmpty: v, status: b = "ready", failure: x, placeholderRows: w = R, hasGlobalShortcuts: T }) {
|
|
24
|
+
let E = b === "loading", D = b === "failed", O = b === "ready", k = r(a, {
|
|
25
25
|
mode: "local",
|
|
26
|
-
search:
|
|
27
|
-
filters:
|
|
28
|
-
}), { actions:
|
|
29
|
-
label: `${
|
|
26
|
+
search: d,
|
|
27
|
+
filters: f
|
|
28
|
+
}), { actions: A, chips: j, onKeyDown: M, openSearch: P } = t({
|
|
29
|
+
label: `${n} controls`,
|
|
30
30
|
...k.search !== void 0 && { search: k.search },
|
|
31
31
|
filters: k.filters,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
isPlaceholder: E,
|
|
33
|
+
isReady: O
|
|
34
|
+
}), L = T && O && k.search !== void 0;
|
|
35
|
+
N(() => {
|
|
36
|
+
if (!L) return;
|
|
36
37
|
function e(e) {
|
|
37
|
-
let t = e.key === "/" && !
|
|
38
|
-
(t || n) && (e.preventDefault(),
|
|
38
|
+
let t = e.key === "/" && !z(e.target), n = e.key.toLowerCase() === "f" && (e.metaKey || e.ctrlKey);
|
|
39
|
+
(t || n) && (e.preventDefault(), P());
|
|
39
40
|
}
|
|
40
41
|
return globalThis.addEventListener("keydown", e), () => globalThis.removeEventListener("keydown", e);
|
|
41
|
-
}, [
|
|
42
|
-
let B =
|
|
42
|
+
}, [L, P]);
|
|
43
|
+
let B = p === void 0 ? k.rows : p(k.rows), V = i ?? n, H = typeof d == "function", U = !("reason" in f), W = {
|
|
43
44
|
caption: V,
|
|
44
45
|
hideCaption: !0,
|
|
45
46
|
rows: B,
|
|
46
|
-
getRowId:
|
|
47
|
+
getRowId: o,
|
|
47
48
|
query: { mode: "frame" },
|
|
48
|
-
...
|
|
49
|
-
...
|
|
50
|
-
...
|
|
51
|
-
empty:
|
|
52
|
-
...
|
|
53
|
-
},
|
|
54
|
-
...
|
|
55
|
-
columns:
|
|
56
|
-
}) : /* @__PURE__ */
|
|
57
|
-
...
|
|
58
|
-
columns:
|
|
59
|
-
sort:
|
|
60
|
-
onSortChange:
|
|
61
|
-
}),
|
|
62
|
-
|
|
49
|
+
...m !== void 0 && { rowAction: m },
|
|
50
|
+
...h !== void 0 && { activeRowId: h },
|
|
51
|
+
...g !== void 0 && { rowSizing: g },
|
|
52
|
+
empty: _,
|
|
53
|
+
...v !== void 0 && { filteredEmpty: v }
|
|
54
|
+
}, G = u === void 0 ? /* @__PURE__ */ F(s, {
|
|
55
|
+
...W,
|
|
56
|
+
columns: c
|
|
57
|
+
}) : /* @__PURE__ */ F(s, {
|
|
58
|
+
...W,
|
|
59
|
+
columns: c,
|
|
60
|
+
sort: l,
|
|
61
|
+
onSortChange: u
|
|
62
|
+
}), K = /* @__PURE__ */ F(e, {
|
|
63
|
+
caption: V,
|
|
64
|
+
hideCaption: !0,
|
|
65
|
+
columns: c,
|
|
66
|
+
rows: w,
|
|
67
|
+
...g !== void 0 && { rowSizing: g }
|
|
68
|
+
}), q = x ?? /* @__PURE__ */ F(C, { children: /* @__PURE__ */ I(y, {
|
|
69
|
+
hasError: !0,
|
|
70
|
+
children: [
|
|
71
|
+
"Could not load ",
|
|
72
|
+
n.toLowerCase(),
|
|
73
|
+
"."
|
|
74
|
+
]
|
|
75
|
+
}) });
|
|
76
|
+
return {
|
|
77
|
+
controlActions: A,
|
|
78
|
+
chips: j,
|
|
79
|
+
onKeyDown: M,
|
|
80
|
+
content: E ? /* @__PURE__ */ F(S, {
|
|
81
|
+
state: "pending",
|
|
82
|
+
label: n,
|
|
83
|
+
placeholder: K
|
|
84
|
+
}) : /* @__PURE__ */ F(S, {
|
|
85
|
+
state: D ? "failed" : "ready",
|
|
86
|
+
label: n,
|
|
87
|
+
placeholder: K,
|
|
88
|
+
children: D ? q : G
|
|
89
|
+
}),
|
|
90
|
+
frameProps: {
|
|
91
|
+
search: H ? !0 : d,
|
|
92
|
+
filters: U ? !0 : f,
|
|
93
|
+
isFiltered: k.isFiltered
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function V(e) {
|
|
98
|
+
let { title: t, navigation: n, actions: r, notice: a, inspector: o, inspectorInitialPercent: s = 40 } = e, { controlActions: l, chips: u, onKeyDown: d, content: f, frameProps: p } = B({
|
|
99
|
+
...e,
|
|
100
|
+
hasGlobalShortcuts: !0
|
|
101
|
+
}), m = a != null, h = /* @__PURE__ */ I(P, { children: [n === void 0 && l, r] }), g = /* @__PURE__ */ F(E, {
|
|
102
|
+
header: /* @__PURE__ */ I(P, { children: [m && /* @__PURE__ */ F(C, { children: a }), u !== !1 && /* @__PURE__ */ F(c, {
|
|
63
103
|
label: "Applied filters",
|
|
64
|
-
children:
|
|
104
|
+
children: u
|
|
65
105
|
})] }),
|
|
66
|
-
children:
|
|
106
|
+
children: f
|
|
67
107
|
});
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
isFiltered: k.isFiltered,
|
|
72
|
-
children: /* @__PURE__ */ M("section", {
|
|
108
|
+
return /* @__PURE__ */ F(i, {
|
|
109
|
+
...p,
|
|
110
|
+
children: /* @__PURE__ */ F("section", {
|
|
73
111
|
className: "x12lumcd xeuugli x2lwn1j x78zum5 xdt5ytf",
|
|
74
|
-
onKeyDown:
|
|
75
|
-
children: /* @__PURE__ */
|
|
112
|
+
onKeyDown: d,
|
|
113
|
+
children: /* @__PURE__ */ F(w, {
|
|
76
114
|
title: t,
|
|
77
|
-
actions:
|
|
78
|
-
navigation:
|
|
79
|
-
children:
|
|
115
|
+
actions: h,
|
|
116
|
+
navigation: n,
|
|
117
|
+
children: o === void 0 ? g : /* @__PURE__ */ F(T, {
|
|
80
118
|
isResizable: !0,
|
|
81
|
-
inspectorInitialPercent:
|
|
82
|
-
inspector:
|
|
83
|
-
children:
|
|
119
|
+
inspectorInitialPercent: s,
|
|
120
|
+
inspector: o,
|
|
121
|
+
children: g
|
|
84
122
|
})
|
|
85
123
|
})
|
|
86
124
|
})
|
|
87
125
|
});
|
|
88
126
|
}
|
|
127
|
+
function H(e) {
|
|
128
|
+
let { id: t, title: n, meta: r, actions: a, notice: o } = e, { controlActions: s, chips: l, onKeyDown: u, content: d, frameProps: p } = B({
|
|
129
|
+
...e,
|
|
130
|
+
hasGlobalShortcuts: !1
|
|
131
|
+
}), m = o != null;
|
|
132
|
+
return /* @__PURE__ */ F(i, {
|
|
133
|
+
...p,
|
|
134
|
+
children: /* @__PURE__ */ I("section", {
|
|
135
|
+
"aria-label": n,
|
|
136
|
+
className: "xeuugli x78zum5 xdt5ytf",
|
|
137
|
+
onKeyDown: u,
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ F(f, {
|
|
140
|
+
...t !== void 0 && { id: t },
|
|
141
|
+
title: n,
|
|
142
|
+
meta: r,
|
|
143
|
+
actions: /* @__PURE__ */ I(P, { children: [s, a] })
|
|
144
|
+
}),
|
|
145
|
+
m && /* @__PURE__ */ F(C, { children: o }),
|
|
146
|
+
l !== !1 && /* @__PURE__ */ F(c, {
|
|
147
|
+
label: "Applied filters",
|
|
148
|
+
children: l
|
|
149
|
+
}),
|
|
150
|
+
d
|
|
151
|
+
]
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
}
|
|
89
155
|
// packages/kits/src/research/finding-card.tsx
|
|
90
|
-
var
|
|
156
|
+
var U = {
|
|
91
157
|
limitation: "Limitation",
|
|
92
158
|
details: "Full notes & evidence",
|
|
93
159
|
sources: "Sources",
|
|
@@ -97,100 +163,100 @@ var L = {
|
|
|
97
163
|
falsified: "Falsified",
|
|
98
164
|
open: "Open"
|
|
99
165
|
}
|
|
100
|
-
},
|
|
166
|
+
}, W = {
|
|
101
167
|
supported: "positive",
|
|
102
168
|
mixed: "warning",
|
|
103
169
|
falsified: "negative",
|
|
104
170
|
open: "neutral"
|
|
105
171
|
};
|
|
106
|
-
function
|
|
107
|
-
let
|
|
108
|
-
...
|
|
109
|
-
...
|
|
172
|
+
function G({ title: e, claim: t, locale: n, status: r, index: i, limitation: o, metrics: s = [], sources: c = [], author: u, recordedAt: f, recordedLabel: m, details: y, actions: b, labels: x }) {
|
|
173
|
+
let S = {
|
|
174
|
+
...U,
|
|
175
|
+
...x,
|
|
110
176
|
statusLabels: {
|
|
111
|
-
...
|
|
112
|
-
...
|
|
177
|
+
...U.statusLabels,
|
|
178
|
+
...x?.statusLabels
|
|
113
179
|
}
|
|
114
180
|
};
|
|
115
|
-
return /* @__PURE__ */
|
|
181
|
+
return /* @__PURE__ */ F(h, {
|
|
116
182
|
title: e,
|
|
117
|
-
index:
|
|
118
|
-
meta: /* @__PURE__ */
|
|
119
|
-
tone:
|
|
120
|
-
children:
|
|
121
|
-
}),
|
|
122
|
-
footer:
|
|
183
|
+
index: i,
|
|
184
|
+
meta: /* @__PURE__ */ I(p, { children: [/* @__PURE__ */ F(_, {
|
|
185
|
+
tone: W[r],
|
|
186
|
+
children: S.statusLabels[r]
|
|
187
|
+
}), b] }),
|
|
188
|
+
footer: u !== void 0 || f !== void 0 || c.length > 0 ? /* @__PURE__ */ I(p, {
|
|
123
189
|
shouldSpaceBetween: !0,
|
|
124
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ I(p, { children: [u !== void 0 && /* @__PURE__ */ F(l, {
|
|
125
191
|
variant: "caption",
|
|
126
192
|
tone: "muted",
|
|
127
|
-
children:
|
|
128
|
-
}),
|
|
129
|
-
dateTime:
|
|
130
|
-
label:
|
|
131
|
-
})] }), c.length > 0 && /* @__PURE__ */
|
|
193
|
+
children: u
|
|
194
|
+
}), f !== void 0 && /* @__PURE__ */ F(a, {
|
|
195
|
+
dateTime: f,
|
|
196
|
+
label: m ?? f
|
|
197
|
+
})] }), c.length > 0 && /* @__PURE__ */ I(p, { children: [/* @__PURE__ */ I(l, {
|
|
132
198
|
variant: "caption",
|
|
133
199
|
tone: "muted",
|
|
134
|
-
children: [
|
|
135
|
-
}), c.map((e) => e.summary !== void 0 && e.href !== void 0 ? /* @__PURE__ */
|
|
200
|
+
children: [S.sources, ":"]
|
|
201
|
+
}), c.map((e) => e.summary !== void 0 && e.href !== void 0 ? /* @__PURE__ */ I(O.Root, { children: [/* @__PURE__ */ F(O.Trigger, {
|
|
136
202
|
href: e.href,
|
|
137
|
-
children: /* @__PURE__ */
|
|
138
|
-
}), /* @__PURE__ */
|
|
203
|
+
children: /* @__PURE__ */ F(g, { children: e.label })
|
|
204
|
+
}), /* @__PURE__ */ F(O.Popup, { children: /* @__PURE__ */ I(d, {
|
|
139
205
|
isCompact: !0,
|
|
140
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ F(l, { children: e.label }), /* @__PURE__ */ F(l, {
|
|
141
207
|
variant: "caption",
|
|
142
208
|
tone: "muted",
|
|
143
209
|
children: e.summary
|
|
144
210
|
})]
|
|
145
|
-
}) })] }, e.id) : /* @__PURE__ */
|
|
211
|
+
}) })] }, e.id) : /* @__PURE__ */ F(g, { children: e.label }, e.id))] })]
|
|
146
212
|
}) : void 0,
|
|
147
|
-
children: /* @__PURE__ */
|
|
213
|
+
children: /* @__PURE__ */ I(d, {
|
|
148
214
|
isCompact: !0,
|
|
149
215
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
s.length > 0 && /* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ F(l, { children: t }),
|
|
217
|
+
s.length > 0 && /* @__PURE__ */ F(p, { children: s.map((e) => /* @__PURE__ */ I(_, {
|
|
152
218
|
tone: e.tone ?? "neutral",
|
|
153
219
|
children: [
|
|
154
220
|
e.label,
|
|
155
221
|
": ",
|
|
156
|
-
|
|
222
|
+
D({
|
|
157
223
|
value: e.value,
|
|
158
224
|
locale: n,
|
|
159
225
|
format: e.format
|
|
160
226
|
})
|
|
161
227
|
]
|
|
162
228
|
}, e.label)) }),
|
|
163
|
-
o !== void 0 && /* @__PURE__ */
|
|
229
|
+
o !== void 0 && /* @__PURE__ */ I(l, {
|
|
164
230
|
variant: "caption",
|
|
165
231
|
tone: "muted",
|
|
166
232
|
children: [
|
|
167
|
-
|
|
233
|
+
S.limitation,
|
|
168
234
|
": ",
|
|
169
235
|
o
|
|
170
236
|
]
|
|
171
237
|
}),
|
|
172
|
-
|
|
238
|
+
y !== void 0 && /* @__PURE__ */ I(v.Root, { children: [/* @__PURE__ */ F(v.Trigger, {
|
|
173
239
|
variant: "inline",
|
|
174
|
-
children:
|
|
175
|
-
}), /* @__PURE__ */
|
|
240
|
+
children: S.details
|
|
241
|
+
}), /* @__PURE__ */ F(v.Panel, { children: y })] })
|
|
176
242
|
]
|
|
177
243
|
})
|
|
178
244
|
});
|
|
179
245
|
}
|
|
180
246
|
// packages/kits/src/research/milestone-path.tsx
|
|
181
|
-
var
|
|
247
|
+
var K = {
|
|
182
248
|
baseline: "series5",
|
|
183
249
|
result: "series1",
|
|
184
250
|
breakthrough: "positive",
|
|
185
251
|
counterexample: "negative",
|
|
186
252
|
decision: "series3"
|
|
187
|
-
},
|
|
253
|
+
}, q = {
|
|
188
254
|
baseline: "neutral",
|
|
189
255
|
result: "neutral",
|
|
190
256
|
breakthrough: "positive",
|
|
191
257
|
counterexample: "negative",
|
|
192
258
|
decision: "warning"
|
|
193
|
-
},
|
|
259
|
+
}, J = {
|
|
194
260
|
metric: "Score",
|
|
195
261
|
delta: "Change",
|
|
196
262
|
limitation: "Limitation",
|
|
@@ -204,98 +270,98 @@ var B = {
|
|
|
204
270
|
decision: "Decision"
|
|
205
271
|
}
|
|
206
272
|
};
|
|
207
|
-
function
|
|
208
|
-
let
|
|
209
|
-
...
|
|
273
|
+
function Y({ milestones: e, valueLabel: t, valueFormat: n, deltaFormat: r, selected: i, onSelectedChange: a, labels: s, ...c }) {
|
|
274
|
+
let f = {
|
|
275
|
+
...J,
|
|
210
276
|
...s,
|
|
211
277
|
kinds: {
|
|
212
|
-
...
|
|
278
|
+
...J.kinds,
|
|
213
279
|
...s?.kinds
|
|
214
280
|
}
|
|
215
281
|
};
|
|
216
|
-
if (e.length === 0) return /* @__PURE__ */
|
|
282
|
+
if (e.length === 0) return /* @__PURE__ */ F(b, {
|
|
217
283
|
title: c.title,
|
|
218
|
-
children:
|
|
284
|
+
children: f.empty
|
|
219
285
|
});
|
|
220
|
-
if (new Set(e.map((e) => e.id)).size !== e.length) return /* @__PURE__ */
|
|
286
|
+
if (new Set(e.map((e) => e.id)).size !== e.length) return /* @__PURE__ */ F(y, {
|
|
221
287
|
hasError: !0,
|
|
222
288
|
children: "Milestones must have unique identifiers."
|
|
223
289
|
});
|
|
224
|
-
if (e.filter((e) => e.parentId === null).length !== 1) return /* @__PURE__ */
|
|
290
|
+
if (e.filter((e) => e.parentId === null).length !== 1) return /* @__PURE__ */ F(y, {
|
|
225
291
|
hasError: !0,
|
|
226
292
|
children: "MilestonePath requires exactly one root milestone (parentId: null)."
|
|
227
293
|
});
|
|
228
|
-
let
|
|
294
|
+
let m = e.map((e) => ({
|
|
229
295
|
id: e.id,
|
|
230
296
|
parentId: e.parentId,
|
|
231
297
|
label: e.label,
|
|
232
|
-
detail: e.wave === void 0 ?
|
|
298
|
+
detail: e.wave === void 0 ? f.kinds[e.kind] : `${e.wave} · ${f.kinds[e.kind]}`,
|
|
233
299
|
value: e.metric ?? null,
|
|
234
|
-
tone:
|
|
235
|
-
})),
|
|
300
|
+
tone: K[e.kind]
|
|
301
|
+
})), h = Array.from(new Set(e.map((e) => e.kind))).map((e) => ({
|
|
236
302
|
id: e,
|
|
237
|
-
label:
|
|
238
|
-
tone:
|
|
239
|
-
})),
|
|
240
|
-
return /* @__PURE__ */
|
|
303
|
+
label: f.kinds[e],
|
|
304
|
+
tone: K[e]
|
|
305
|
+
})), g = e.find((e) => e.id === i) ?? null;
|
|
306
|
+
return /* @__PURE__ */ I(d, { children: [/* @__PURE__ */ F(k, {
|
|
241
307
|
...c,
|
|
242
|
-
nodes:
|
|
308
|
+
nodes: m,
|
|
243
309
|
direction: "right",
|
|
244
310
|
link: "elbow",
|
|
245
311
|
valueLabel: t,
|
|
246
312
|
valueFormat: n,
|
|
247
|
-
toneLegend:
|
|
313
|
+
toneLegend: h,
|
|
248
314
|
selected: i,
|
|
249
|
-
onSelectedChange:
|
|
250
|
-
}),
|
|
315
|
+
onSelectedChange: a
|
|
316
|
+
}), g !== null && /* @__PURE__ */ I(d, {
|
|
251
317
|
isCompact: !0,
|
|
252
318
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ F(u, {}),
|
|
320
|
+
/* @__PURE__ */ I(p, {
|
|
255
321
|
shouldSpaceBetween: !0,
|
|
256
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ I(p, { children: [g.wave !== void 0 && /* @__PURE__ */ F(_, {
|
|
257
323
|
tone: "neutral",
|
|
258
|
-
children:
|
|
259
|
-
}), /* @__PURE__ */
|
|
260
|
-
tone:
|
|
261
|
-
children:
|
|
324
|
+
children: g.wave
|
|
325
|
+
}), /* @__PURE__ */ F(l, { children: /* @__PURE__ */ F("strong", { children: g.label }) })] }), /* @__PURE__ */ F(_, {
|
|
326
|
+
tone: q[g.kind],
|
|
327
|
+
children: f.kinds[g.kind]
|
|
262
328
|
})]
|
|
263
329
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ F(l, {
|
|
265
331
|
tone: "muted",
|
|
266
|
-
children:
|
|
332
|
+
children: g.claim
|
|
267
333
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
...
|
|
270
|
-
label:
|
|
271
|
-
value:
|
|
272
|
-
value:
|
|
334
|
+
/* @__PURE__ */ F(o, { items: [
|
|
335
|
+
...g.metric === void 0 ? [] : [{
|
|
336
|
+
label: f.metric,
|
|
337
|
+
value: D({
|
|
338
|
+
value: g.metric,
|
|
273
339
|
locale: c.locale,
|
|
274
340
|
format: n
|
|
275
341
|
})
|
|
276
342
|
}],
|
|
277
|
-
...
|
|
278
|
-
label:
|
|
279
|
-
value:
|
|
280
|
-
value:
|
|
343
|
+
...g.delta === void 0 ? [] : [{
|
|
344
|
+
label: f.delta,
|
|
345
|
+
value: D({
|
|
346
|
+
value: g.delta,
|
|
281
347
|
locale: c.locale,
|
|
282
348
|
format: r ?? n
|
|
283
349
|
})
|
|
284
350
|
}],
|
|
285
|
-
...
|
|
286
|
-
label:
|
|
287
|
-
value:
|
|
351
|
+
...g.limitation === void 0 ? [] : [{
|
|
352
|
+
label: f.limitation,
|
|
353
|
+
value: g.limitation
|
|
288
354
|
}],
|
|
289
|
-
...
|
|
290
|
-
label:
|
|
291
|
-
value:
|
|
355
|
+
...g.source === void 0 ? [] : [{
|
|
356
|
+
label: f.source,
|
|
357
|
+
value: g.source
|
|
292
358
|
}]
|
|
293
359
|
] })
|
|
294
360
|
]
|
|
295
361
|
})] });
|
|
296
362
|
}
|
|
297
363
|
// packages/kits/src/research/specimen-diff.tsx
|
|
298
|
-
var
|
|
364
|
+
var X = {
|
|
299
365
|
breakdownTitle: "Paired outcome flips",
|
|
300
366
|
all: "All",
|
|
301
367
|
gained: "Gained",
|
|
@@ -308,65 +374,65 @@ var W = {
|
|
|
308
374
|
candidate: "Candidate",
|
|
309
375
|
outcome: "Outcome",
|
|
310
376
|
empty: "No paired specimens available for these two runs."
|
|
311
|
-
},
|
|
377
|
+
}, Z = {
|
|
312
378
|
gained: "positive",
|
|
313
379
|
regressed: "negative",
|
|
314
380
|
both_pass: "neutral",
|
|
315
381
|
both_fail: "neutral"
|
|
316
|
-
},
|
|
382
|
+
}, Q = /* @__PURE__ */ new Set([
|
|
317
383
|
"gained",
|
|
318
384
|
"regressed",
|
|
319
385
|
"both_pass",
|
|
320
386
|
"both_fail"
|
|
321
387
|
]);
|
|
322
|
-
function
|
|
323
|
-
return e !== null &&
|
|
388
|
+
function ee(e) {
|
|
389
|
+
return e !== null && Q.has(e);
|
|
324
390
|
}
|
|
325
|
-
function
|
|
326
|
-
let
|
|
327
|
-
...
|
|
391
|
+
function te({ rows: e, baselineLabel: t, candidateLabel: r, filter: i, onFilterChange: a, onSelectRow: o, labels: c, ...u }) {
|
|
392
|
+
let f = {
|
|
393
|
+
...X,
|
|
328
394
|
...c
|
|
329
395
|
};
|
|
330
|
-
if (e.length === 0) return /* @__PURE__ */
|
|
331
|
-
title:
|
|
332
|
-
children:
|
|
396
|
+
if (e.length === 0) return /* @__PURE__ */ F(b, {
|
|
397
|
+
title: u.title,
|
|
398
|
+
children: f.empty
|
|
333
399
|
});
|
|
334
|
-
let
|
|
400
|
+
let p = {
|
|
335
401
|
gained: 0,
|
|
336
402
|
regressed: 0,
|
|
337
403
|
both_pass: 0,
|
|
338
404
|
both_fail: 0
|
|
339
405
|
};
|
|
340
|
-
for (let t of e)
|
|
341
|
-
let
|
|
342
|
-
gained:
|
|
343
|
-
regressed:
|
|
344
|
-
both_pass:
|
|
345
|
-
both_fail:
|
|
346
|
-
},
|
|
406
|
+
for (let t of e) p[t.outcome] += 1;
|
|
407
|
+
let m = i === "all" ? e : e.filter((e) => e.outcome === i), h = {
|
|
408
|
+
gained: f.gained,
|
|
409
|
+
regressed: f.regressed,
|
|
410
|
+
both_pass: f.bothPass,
|
|
411
|
+
both_fail: f.bothFail
|
|
412
|
+
}, v = [
|
|
347
413
|
{
|
|
348
414
|
id: "specimen",
|
|
349
|
-
label:
|
|
415
|
+
label: f.specimen,
|
|
350
416
|
role: "primary",
|
|
351
|
-
cell: (e) => /* @__PURE__ */
|
|
417
|
+
cell: (e) => /* @__PURE__ */ F(n, {
|
|
352
418
|
secondary: e.family,
|
|
353
419
|
children: e.prompt
|
|
354
420
|
})
|
|
355
421
|
},
|
|
356
422
|
{
|
|
357
423
|
id: "expected",
|
|
358
|
-
label:
|
|
424
|
+
label: f.expected,
|
|
359
425
|
role: "text",
|
|
360
|
-
cell: (e) => /* @__PURE__ */
|
|
426
|
+
cell: (e) => /* @__PURE__ */ F(g, { children: e.expected })
|
|
361
427
|
},
|
|
362
428
|
{
|
|
363
429
|
id: "baseline",
|
|
364
|
-
label:
|
|
430
|
+
label: t.trim() === "" ? f.baseline : t,
|
|
365
431
|
role: "text",
|
|
366
432
|
isSecondary: !0,
|
|
367
|
-
cell: (e) => /* @__PURE__ */
|
|
433
|
+
cell: (e) => /* @__PURE__ */ F(l, {
|
|
368
434
|
variant: "mono",
|
|
369
|
-
children: /* @__PURE__ */
|
|
435
|
+
children: /* @__PURE__ */ F(j, {
|
|
370
436
|
text: e.baselineOutput,
|
|
371
437
|
query: e.expected,
|
|
372
438
|
tone: "accent"
|
|
@@ -375,11 +441,11 @@ function J({ rows: e, baselineLabel: n, candidateLabel: r, filter: i, onFilterCh
|
|
|
375
441
|
},
|
|
376
442
|
{
|
|
377
443
|
id: "candidate",
|
|
378
|
-
label: r.trim() === "" ?
|
|
444
|
+
label: r.trim() === "" ? f.candidate : r,
|
|
379
445
|
role: "text",
|
|
380
|
-
cell: (e) => /* @__PURE__ */
|
|
446
|
+
cell: (e) => /* @__PURE__ */ F(l, {
|
|
381
447
|
variant: "mono",
|
|
382
|
-
children: /* @__PURE__ */
|
|
448
|
+
children: /* @__PURE__ */ F(j, {
|
|
383
449
|
text: e.candidateOutput,
|
|
384
450
|
query: e.expected,
|
|
385
451
|
tone: "accent"
|
|
@@ -388,119 +454,119 @@ function J({ rows: e, baselineLabel: n, candidateLabel: r, filter: i, onFilterCh
|
|
|
388
454
|
},
|
|
389
455
|
{
|
|
390
456
|
id: "outcome",
|
|
391
|
-
label:
|
|
457
|
+
label: f.outcome,
|
|
392
458
|
role: "status",
|
|
393
|
-
cell: (e) => /* @__PURE__ */
|
|
394
|
-
tone:
|
|
395
|
-
children:
|
|
459
|
+
cell: (e) => /* @__PURE__ */ F(_, {
|
|
460
|
+
tone: Z[e.outcome],
|
|
461
|
+
children: h[e.outcome]
|
|
396
462
|
})
|
|
397
463
|
}
|
|
398
464
|
];
|
|
399
|
-
return /* @__PURE__ */
|
|
465
|
+
return /* @__PURE__ */ I(d, {
|
|
400
466
|
isCompact: !0,
|
|
401
467
|
children: [
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
title:
|
|
404
|
-
description:
|
|
405
|
-
locale:
|
|
406
|
-
status:
|
|
407
|
-
source:
|
|
468
|
+
/* @__PURE__ */ F(A, {
|
|
469
|
+
title: f.breakdownTitle,
|
|
470
|
+
description: u.description,
|
|
471
|
+
locale: u.locale,
|
|
472
|
+
status: u.status,
|
|
473
|
+
source: u.source,
|
|
408
474
|
total: e.length,
|
|
409
475
|
valueFormat: { maximumFractionDigits: 0 },
|
|
410
476
|
items: [
|
|
411
477
|
{
|
|
412
478
|
id: "gained",
|
|
413
|
-
label:
|
|
414
|
-
value:
|
|
479
|
+
label: f.gained,
|
|
480
|
+
value: p.gained,
|
|
415
481
|
tone: "positive"
|
|
416
482
|
},
|
|
417
483
|
{
|
|
418
484
|
id: "both_pass",
|
|
419
|
-
label:
|
|
420
|
-
value:
|
|
485
|
+
label: f.bothPass,
|
|
486
|
+
value: p.both_pass,
|
|
421
487
|
tone: "series1"
|
|
422
488
|
},
|
|
423
489
|
{
|
|
424
490
|
id: "regressed",
|
|
425
|
-
label:
|
|
426
|
-
value:
|
|
491
|
+
label: f.regressed,
|
|
492
|
+
value: p.regressed,
|
|
427
493
|
tone: "negative"
|
|
428
494
|
},
|
|
429
495
|
{
|
|
430
496
|
id: "both_fail",
|
|
431
|
-
label:
|
|
432
|
-
value:
|
|
497
|
+
label: f.bothFail,
|
|
498
|
+
value: p.both_fail,
|
|
433
499
|
tone: "series5"
|
|
434
500
|
}
|
|
435
501
|
],
|
|
436
502
|
selected: i === "all" ? null : i,
|
|
437
503
|
onSelectedChange: (e) => {
|
|
438
|
-
|
|
504
|
+
ee(e) ? a(e === i ? "all" : e) : a("all");
|
|
439
505
|
}
|
|
440
506
|
}),
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
-
"aria-label":
|
|
507
|
+
/* @__PURE__ */ I(M.Root, {
|
|
508
|
+
"aria-label": f.outcome,
|
|
443
509
|
value: i,
|
|
444
510
|
onValueChange: (e) => {
|
|
445
511
|
a(e);
|
|
446
512
|
},
|
|
447
513
|
children: [
|
|
448
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ I(M.Item, {
|
|
449
515
|
value: "all",
|
|
450
516
|
children: [
|
|
451
|
-
|
|
517
|
+
f.all,
|
|
452
518
|
" (",
|
|
453
519
|
e.length,
|
|
454
520
|
")"
|
|
455
521
|
]
|
|
456
522
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ I(M.Item, {
|
|
458
524
|
value: "gained",
|
|
459
525
|
children: [
|
|
460
|
-
|
|
526
|
+
f.gained,
|
|
461
527
|
" (",
|
|
462
|
-
|
|
528
|
+
p.gained,
|
|
463
529
|
")"
|
|
464
530
|
]
|
|
465
531
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ I(M.Item, {
|
|
467
533
|
value: "regressed",
|
|
468
534
|
children: [
|
|
469
|
-
|
|
535
|
+
f.regressed,
|
|
470
536
|
" (",
|
|
471
|
-
|
|
537
|
+
p.regressed,
|
|
472
538
|
")"
|
|
473
539
|
]
|
|
474
540
|
}),
|
|
475
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ I(M.Item, {
|
|
476
542
|
value: "both_pass",
|
|
477
543
|
children: [
|
|
478
|
-
|
|
544
|
+
f.bothPass,
|
|
479
545
|
" (",
|
|
480
|
-
|
|
546
|
+
p.both_pass,
|
|
481
547
|
")"
|
|
482
548
|
]
|
|
483
549
|
}),
|
|
484
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ I(M.Item, {
|
|
485
551
|
value: "both_fail",
|
|
486
552
|
children: [
|
|
487
|
-
|
|
553
|
+
f.bothFail,
|
|
488
554
|
" (",
|
|
489
|
-
|
|
555
|
+
p.both_fail,
|
|
490
556
|
")"
|
|
491
557
|
]
|
|
492
558
|
})
|
|
493
559
|
]
|
|
494
560
|
}),
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
caption:
|
|
561
|
+
/* @__PURE__ */ F(s, {
|
|
562
|
+
caption: u.title,
|
|
497
563
|
hideCaption: !0,
|
|
498
|
-
columns:
|
|
499
|
-
rows:
|
|
564
|
+
columns: v,
|
|
565
|
+
rows: m,
|
|
500
566
|
getRowId: (e) => e.id,
|
|
501
|
-
...
|
|
567
|
+
...o !== void 0 && { rowAction: {
|
|
502
568
|
label: (e) => `Inspect ${e.id}`,
|
|
503
|
-
onActivate:
|
|
569
|
+
onActivate: o
|
|
504
570
|
} },
|
|
505
571
|
query: {
|
|
506
572
|
mode: "local",
|
|
@@ -511,14 +577,14 @@ function J({ rows: e, baselineLabel: n, candidateLabel: r, filter: i, onFilterCh
|
|
|
511
577
|
value: (e) => e.family
|
|
512
578
|
}]
|
|
513
579
|
},
|
|
514
|
-
empty:
|
|
580
|
+
empty: f.empty,
|
|
515
581
|
filteredEmpty: "No specimens match the current filter."
|
|
516
582
|
})
|
|
517
583
|
]
|
|
518
584
|
});
|
|
519
585
|
}
|
|
520
586
|
// packages/kits/src/research/work-heartbeat.tsx
|
|
521
|
-
var
|
|
587
|
+
var $ = {
|
|
522
588
|
title: "Active work reports",
|
|
523
589
|
empty: "No active or recent work reports.",
|
|
524
590
|
nextCheckpoint: "Next checkpoint",
|
|
@@ -529,65 +595,65 @@ var Y = {
|
|
|
529
595
|
overdue: "Update overdue",
|
|
530
596
|
stopped: "Stopped"
|
|
531
597
|
}
|
|
532
|
-
},
|
|
598
|
+
}, ne = {
|
|
533
599
|
running: "positive",
|
|
534
600
|
completed: "neutral",
|
|
535
601
|
blocked: "negative",
|
|
536
602
|
overdue: "warning",
|
|
537
603
|
stopped: "neutral"
|
|
538
604
|
};
|
|
539
|
-
function
|
|
605
|
+
function re(e) {
|
|
540
606
|
return e === void 0 ? null : Number.isFinite(e.completed) && Number.isFinite(e.total) && e.total > 0 ? e : null;
|
|
541
607
|
}
|
|
542
|
-
function
|
|
608
|
+
function ie({ reports: e, locale: t, labels: n }) {
|
|
543
609
|
let r = {
|
|
544
|
-
|
|
610
|
+
...$,
|
|
545
611
|
...n,
|
|
546
612
|
states: {
|
|
547
|
-
|
|
613
|
+
...$.states,
|
|
548
614
|
...n?.states
|
|
549
615
|
}
|
|
550
616
|
};
|
|
551
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
617
|
+
return e.length === 0 ? /* @__PURE__ */ F("div", {
|
|
552
618
|
className: "x1qokhjc",
|
|
553
|
-
children: /* @__PURE__ */
|
|
619
|
+
children: /* @__PURE__ */ F(l, {
|
|
554
620
|
variant: "caption",
|
|
555
621
|
tone: "muted",
|
|
556
622
|
children: r.empty
|
|
557
623
|
})
|
|
558
|
-
}) : /* @__PURE__ */
|
|
624
|
+
}) : /* @__PURE__ */ F("ul", {
|
|
559
625
|
className: "xe8uvvx x1ghz6dp x1717udv x178xt8z x13fuv20 xhjagg4",
|
|
560
626
|
children: e.map((e) => {
|
|
561
|
-
let n =
|
|
562
|
-
return /* @__PURE__ */
|
|
627
|
+
let n = re(e.progress), i = n === null ? null : Math.max(0, Math.min(100, n.completed / n.total * 100)), o = e.nextCheckpoint !== void 0 || e.executionRef !== void 0;
|
|
628
|
+
return /* @__PURE__ */ I("li", {
|
|
563
629
|
className: "x78zum5 xdt5ytf x1hnptsi x1qokhjc xso031l x1q0q8m5 x1qndepd",
|
|
564
630
|
children: [
|
|
565
|
-
/* @__PURE__ */
|
|
631
|
+
/* @__PURE__ */ I(p, {
|
|
566
632
|
shouldSpaceBetween: !0,
|
|
567
|
-
children: [/* @__PURE__ */
|
|
568
|
-
tone:
|
|
633
|
+
children: [/* @__PURE__ */ F(l, { children: /* @__PURE__ */ F("strong", { children: e.title }) }), /* @__PURE__ */ I(p, { children: [/* @__PURE__ */ F(m, {
|
|
634
|
+
tone: ne[e.state],
|
|
569
635
|
children: r.states[e.state]
|
|
570
|
-
}), /* @__PURE__ */
|
|
636
|
+
}), /* @__PURE__ */ F(a, {
|
|
571
637
|
dateTime: e.observedAt,
|
|
572
638
|
label: e.observedLabel
|
|
573
639
|
})] })]
|
|
574
640
|
}),
|
|
575
|
-
n !== null &&
|
|
641
|
+
n !== null && i !== null && /* @__PURE__ */ I(d, {
|
|
576
642
|
isCompact: !0,
|
|
577
|
-
children: [/* @__PURE__ */
|
|
643
|
+
children: [/* @__PURE__ */ I(p, {
|
|
578
644
|
shouldSpaceBetween: !0,
|
|
579
|
-
children: [/* @__PURE__ */
|
|
645
|
+
children: [/* @__PURE__ */ I(l, {
|
|
580
646
|
variant: "caption",
|
|
581
647
|
tone: "muted",
|
|
582
648
|
children: [
|
|
583
|
-
|
|
649
|
+
D({
|
|
584
650
|
value: n.completed,
|
|
585
651
|
locale: t,
|
|
586
652
|
format: { maximumFractionDigits: 0 }
|
|
587
653
|
}),
|
|
588
654
|
" /",
|
|
589
655
|
" ",
|
|
590
|
-
|
|
656
|
+
D({
|
|
591
657
|
value: n.total,
|
|
592
658
|
locale: t,
|
|
593
659
|
format: { maximumFractionDigits: 0 }
|
|
@@ -595,10 +661,10 @@ function Q({ reports: e, locale: t, labels: n }) {
|
|
|
595
661
|
" ",
|
|
596
662
|
n.unit
|
|
597
663
|
]
|
|
598
|
-
}), /* @__PURE__ */
|
|
664
|
+
}), /* @__PURE__ */ F(_, {
|
|
599
665
|
tone: "neutral",
|
|
600
|
-
children:
|
|
601
|
-
value:
|
|
666
|
+
children: D({
|
|
667
|
+
value: i / 100,
|
|
602
668
|
locale: t,
|
|
603
669
|
format: {
|
|
604
670
|
style: "percent",
|
|
@@ -606,12 +672,12 @@ function Q({ reports: e, locale: t, labels: n }) {
|
|
|
606
672
|
}
|
|
607
673
|
})
|
|
608
674
|
})]
|
|
609
|
-
}), /* @__PURE__ */
|
|
675
|
+
}), /* @__PURE__ */ F(x, {
|
|
610
676
|
label: e.title,
|
|
611
677
|
value: n.completed,
|
|
612
678
|
max: n.total,
|
|
613
|
-
valueLabel:
|
|
614
|
-
value:
|
|
679
|
+
valueLabel: D({
|
|
680
|
+
value: i / 100,
|
|
615
681
|
locale: t,
|
|
616
682
|
format: {
|
|
617
683
|
style: "percent",
|
|
@@ -620,9 +686,9 @@ function Q({ reports: e, locale: t, labels: n }) {
|
|
|
620
686
|
})
|
|
621
687
|
})]
|
|
622
688
|
}),
|
|
623
|
-
o && /* @__PURE__ */
|
|
689
|
+
o && /* @__PURE__ */ I(p, {
|
|
624
690
|
shouldSpaceBetween: !0,
|
|
625
|
-
children: [e.nextCheckpoint === void 0 ? /* @__PURE__ */
|
|
691
|
+
children: [e.nextCheckpoint === void 0 ? /* @__PURE__ */ F("span", {}) : /* @__PURE__ */ I(l, {
|
|
626
692
|
variant: "caption",
|
|
627
693
|
tone: "muted",
|
|
628
694
|
children: [
|
|
@@ -630,11 +696,11 @@ function Q({ reports: e, locale: t, labels: n }) {
|
|
|
630
696
|
": ",
|
|
631
697
|
e.nextCheckpoint
|
|
632
698
|
]
|
|
633
|
-
}), e.executionRef !== void 0 && /* @__PURE__ */
|
|
699
|
+
}), e.executionRef !== void 0 && /* @__PURE__ */ F(g, { children: e.executionRef })]
|
|
634
700
|
})
|
|
635
701
|
]
|
|
636
702
|
}, e.id);
|
|
637
703
|
})
|
|
638
704
|
});
|
|
639
705
|
}
|
|
640
|
-
export {
|
|
706
|
+
export { V as CollectionPage, H as CollectionSection, G as FindingCard, Y as MilestonePath, te as SpecimenDiff, ie as WorkHeartbeat };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import type { DataTableColumn, DataTableRowAction, DataTableSort, DataTableSortDetails, TableFilterDimension, TableQueryException } from '../../../collections/src/index.ts';
|
|
3
3
|
import { PageLayout } from '../../../layout/src/index.ts';
|
|
4
|
+
export type CollectionStatus = 'loading' | 'ready' | 'failed';
|
|
4
5
|
type SortableColumns<Row> = {
|
|
5
6
|
readonly columns: ReadonlyArray<DataTableColumn<Row>>;
|
|
6
7
|
readonly sort: DataTableSort | undefined;
|
|
@@ -12,7 +13,7 @@ type SortableColumns<Row> = {
|
|
|
12
13
|
readonly sort?: never;
|
|
13
14
|
readonly onSortChange?: never;
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
+
type SharedCollectionProps<Row extends object> = SortableColumns<Row> & {
|
|
16
17
|
readonly title: string;
|
|
17
18
|
readonly caption?: string;
|
|
18
19
|
readonly rows: ReadonlyArray<Row>;
|
|
@@ -23,7 +24,6 @@ export type CollectionPageProps<Row extends object> = SortableColumns<Row> & {
|
|
|
23
24
|
readonly filters: ReadonlyArray<TableFilterDimension<Row>> | TableQueryException;
|
|
24
25
|
/** Optional custom row transformer (e.g. sorting) applied after local search and filtering. */
|
|
25
26
|
readonly transformRows?: (rows: ReadonlyArray<Row>) => ReadonlyArray<Row>;
|
|
26
|
-
readonly navigation?: ComponentProps<typeof PageLayout>['navigation'];
|
|
27
27
|
readonly actions?: ReactNode;
|
|
28
28
|
readonly notice?: ReactNode;
|
|
29
29
|
readonly rowAction?: DataTableRowAction<Row> | undefined;
|
|
@@ -31,6 +31,13 @@ export type CollectionPageProps<Row extends object> = SortableColumns<Row> & {
|
|
|
31
31
|
readonly rowSizing?: 'fixed' | 'content' | undefined;
|
|
32
32
|
readonly empty: ReactNode;
|
|
33
33
|
readonly filteredEmpty?: ReactNode;
|
|
34
|
+
/** Read lifecycle state: `'loading'` reserves geometry with `DataTablePlaceholder` inside `AsyncRegion`. */
|
|
35
|
+
readonly status?: CollectionStatus;
|
|
36
|
+
readonly failure?: ReactNode;
|
|
37
|
+
readonly placeholderRows?: number;
|
|
38
|
+
};
|
|
39
|
+
export type CollectionPageProps<Row extends object> = SharedCollectionProps<Row> & {
|
|
40
|
+
readonly navigation?: ComponentProps<typeof PageLayout>['navigation'];
|
|
34
41
|
/** Optional right-hand inspector pane rendered inside a resizable Workbench split when open. */
|
|
35
42
|
readonly inspector?: {
|
|
36
43
|
readonly label: string;
|
|
@@ -38,9 +45,19 @@ export type CollectionPageProps<Row extends object> = SortableColumns<Row> & {
|
|
|
38
45
|
} | undefined;
|
|
39
46
|
readonly inspectorInitialPercent?: number | undefined;
|
|
40
47
|
};
|
|
48
|
+
export type CollectionSectionProps<Row extends object> = SharedCollectionProps<Row> & {
|
|
49
|
+
readonly id?: string;
|
|
50
|
+
readonly meta?: ReactNode;
|
|
51
|
+
};
|
|
41
52
|
/**
|
|
42
53
|
* Full-width collection page Lego block: wires `PageLayout`, top-bar search and filter controls (`/` and `⌘F`), active
|
|
43
|
-
* filter chips, edge-to-edge `CollectionLayout
|
|
54
|
+
* filter chips, `AsyncRegion` + `DataTablePlaceholder` loading states, edge-to-edge `CollectionLayout`, and an optional
|
|
55
|
+
* resizable `Workbench` inspector.
|
|
56
|
+
*/
|
|
57
|
+
export declare function CollectionPage<Row extends object>(props: CollectionPageProps<Row>): ReactNode;
|
|
58
|
+
/**
|
|
59
|
+
* Full-width collection section for tabbed or multi-section views. Wires `SectionHeading`, top-bar search and filters,
|
|
60
|
+
* active filter chips, `AsyncRegion` loading placeholders, and edge-to-edge `DataTable`.
|
|
44
61
|
*/
|
|
45
|
-
export declare function
|
|
62
|
+
export declare function CollectionSection<Row extends object>(props: CollectionSectionProps<Row>): ReactNode;
|
|
46
63
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { CollectionPageProps } from './collection-page.tsx';
|
|
2
|
-
export { CollectionPage } from './collection-page.tsx';
|
|
1
|
+
export type { CollectionPageProps, CollectionSectionProps, CollectionStatus } from './collection-page.tsx';
|
|
2
|
+
export { CollectionPage, CollectionSection } from './collection-page.tsx';
|
|
3
3
|
export type { FindingCardLabels, FindingCardProps, FindingMetric, FindingSource, FindingStatus, } from './finding-card.tsx';
|
|
4
4
|
export { FindingCard } from './finding-card.tsx';
|
|
5
5
|
export type { MilestoneKind, MilestonePathLabels, MilestonePathProps, ResearchMilestone } from './milestone-path.tsx';
|
package/package.json
CHANGED