@burdenoff/microfe-cosmicintersection 2026.1012.1 → 2026.1030.1
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/cosmicintersection/lib/useSelectedRecord.d.ts +20 -0
- package/dist/cosmicintersection/lib/useSelectedRecord.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/useSelectedRecord.js +19 -0
- package/dist/cosmicintersection/lib/useSelectedRecord.js.map +1 -0
- package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/access/AccessPage.js +239 -226
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +196 -195
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +188 -175
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +202 -201
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/utils/pageContext.d.ts +33 -7
- package/dist/utils/pageContext.d.ts.map +1 -1
- package/dist/utils/pageContext.js +75 -33
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,14 +12,15 @@ import { useFileDownloadUrl as de } from "../../components/FileUploadField.js";
|
|
|
12
12
|
import s from "../../components/PageLayout.js";
|
|
13
13
|
import c, { formatEnumLabel as l } from "../../components/StatusBadge.js";
|
|
14
14
|
import "../../components/index.js";
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
15
|
+
import { useSelectedRecord as fe } from "../../lib/useSelectedRecord.js";
|
|
16
|
+
import pe, { buildDatasetLineage as me } from "../../components/LineageGraph.js";
|
|
17
|
+
import { useMemo as he, useState as u } from "react";
|
|
18
|
+
import { Fragment as ge, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
19
|
+
import { useParams as _e } from "react-router";
|
|
20
|
+
import { ArrowRight as ve, Boxes as ye, Columns3 as p, Database as be, Download as xe, GitBranch as Se, History as Ce, MessagesSquare as we, Pencil as Te, Plus as Ee, Radar as De, Share2 as Oe, TriangleAlert as m } from "lucide-react";
|
|
21
|
+
import { Badge as h, Button as g, Checkbox as ke, Dialog as Ae, DialogContent as je, DialogDescription as Me, DialogFooter as Ne, DialogHeader as Pe, DialogTitle as Fe, Input as _, Label as v, Select as Ie, SelectContent as Le, SelectItem as Re, SelectTrigger as ze, SelectValue as Be, Table as Ve, TableBody as He, TableCell as y, TableHead as b, TableHeader as Ue, TableRow as x, Textarea as We } from "@burdenoff/fe-libs/ui";
|
|
21
22
|
//#region src/cosmicintersection/pages/datasets/DatasetDetailPage.tsx
|
|
22
|
-
var
|
|
23
|
+
var Ge = [
|
|
23
24
|
"STRING",
|
|
24
25
|
"INTEGER",
|
|
25
26
|
"FLOAT",
|
|
@@ -38,7 +39,7 @@ var We = [
|
|
|
38
39
|
function C(e) {
|
|
39
40
|
return S.has(e.fieldType) && !e.unit;
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
+
function Ke(e) {
|
|
42
43
|
if (!e) return "—";
|
|
43
44
|
let t = Number(e);
|
|
44
45
|
if (!Number.isFinite(t) || t <= 0) return "—";
|
|
@@ -71,65 +72,65 @@ function T({ label: e, value: t }) {
|
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
74
|
function E() {
|
|
74
|
-
let { id: S = "" } =
|
|
75
|
+
let { id: S = "" } = _e(), { navigate: E } = e(), { selectedId: D, select: qe } = fe("field"), O = (e) => qe(D === e ? null : e), { data: k, loading: Je, error: Ye, refetch: A } = ee(S), j = k?.cosDataset ?? null, M = de(j?.file?.id).data?.getFileDownloadUrl ?? null, [Xe, { loading: N }] = ne(), [Ze] = i(), [Qe, { loading: P }] = ae(), [$e, { loading: F }] = n(), I = r({ datasetId: S }), L = ie({ pagination: {
|
|
75
76
|
limit: 100,
|
|
76
77
|
offset: 0
|
|
77
|
-
} }),
|
|
78
|
+
} }), R = te({ pagination: {
|
|
78
79
|
limit: 100,
|
|
79
80
|
offset: 0
|
|
80
|
-
} }),
|
|
81
|
+
} }), z = re({ pagination: {
|
|
81
82
|
limit: 100,
|
|
82
83
|
offset: 0
|
|
83
|
-
} }),
|
|
84
|
-
if (!
|
|
84
|
+
} }), B = k?.cosDataset ?? null, V = he(() => {
|
|
85
|
+
if (!B) return {
|
|
85
86
|
nodes: [],
|
|
86
87
|
edges: []
|
|
87
88
|
};
|
|
88
89
|
let e = /* @__PURE__ */ new Map();
|
|
89
|
-
|
|
90
|
+
B.source && e.set(B.source.id, B.source);
|
|
90
91
|
let t = /* @__PURE__ */ new Map();
|
|
91
|
-
|
|
92
|
+
B.collection && t.set(B.collection.id, B.collection);
|
|
92
93
|
let n = {
|
|
93
|
-
datasetsById: new Map([[
|
|
94
|
+
datasetsById: new Map([[B.id, B]]),
|
|
94
95
|
sourcesById: e,
|
|
95
96
|
collectionsById: t,
|
|
96
|
-
runs: (
|
|
97
|
-
notebooks: (
|
|
98
|
-
analyses:
|
|
99
|
-
releases: (
|
|
97
|
+
runs: (L.data?.cosListRuns?.items ?? []).filter((e) => e.datasetId === B.id),
|
|
98
|
+
notebooks: (R.data?.cosListNotebooks?.items ?? []).filter((e) => e.datasetIds.includes(B.id)),
|
|
99
|
+
analyses: I.data?.cosListAnalyses ?? [],
|
|
100
|
+
releases: (z.data?.cosListReleases?.items ?? []).filter((e) => e.datasetIds.includes(B.id))
|
|
100
101
|
};
|
|
101
|
-
return
|
|
102
|
+
return me(B.id, n);
|
|
102
103
|
}, [
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
B,
|
|
105
|
+
L.data,
|
|
106
|
+
R.data,
|
|
105
107
|
I.data,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
W(""), K("STRING"), J(""), it(""), at(""), st(!0);
|
|
108
|
+
z.data
|
|
109
|
+
]), et = L.loading || R.loading || I.loading || z.loading, [H, U] = u([]), [tt, nt] = u(null), W = j ? `${j.id}:${j.updatedAt}` : null;
|
|
110
|
+
W && W !== tt && (nt(W), U(j?.tags ?? []));
|
|
111
|
+
let rt = j != null && (H.length !== j.tags.length || H.some((e, t) => e !== j.tags[t])), [it, at] = u(!1), [G, K] = u(""), [q, J] = u("STRING"), [Y, ot] = u(""), [st, X] = u(""), [ct, lt] = u(""), [ut, dt] = u(!0), ft = () => {
|
|
112
|
+
K(""), J("STRING"), ot(""), X(""), lt(""), dt(!0);
|
|
112
113
|
}, Z = (e) => {
|
|
113
|
-
|
|
114
|
+
at(e), e || ft();
|
|
114
115
|
};
|
|
115
|
-
if (
|
|
116
|
+
if (Je) return /* @__PURE__ */ d(s, {
|
|
116
117
|
title: "Dataset",
|
|
117
118
|
backPath: "datasets",
|
|
118
119
|
children: /* @__PURE__ */ d(o, { label: "Loading dataset…" })
|
|
119
120
|
});
|
|
120
|
-
if (
|
|
121
|
+
if (Ye) return /* @__PURE__ */ d(s, {
|
|
121
122
|
title: "Dataset",
|
|
122
123
|
backPath: "datasets",
|
|
123
124
|
children: /* @__PURE__ */ d(se, {
|
|
124
125
|
message: "We could not load this dataset.",
|
|
125
|
-
onRetry: () => void
|
|
126
|
+
onRetry: () => void A()
|
|
126
127
|
})
|
|
127
128
|
});
|
|
128
|
-
if (!
|
|
129
|
+
if (!j) return /* @__PURE__ */ d(s, {
|
|
129
130
|
title: "Dataset",
|
|
130
131
|
backPath: "datasets",
|
|
131
132
|
children: /* @__PURE__ */ d(a, {
|
|
132
|
-
icon:
|
|
133
|
+
icon: be,
|
|
133
134
|
title: "Dataset not found.",
|
|
134
135
|
description: "This dataset may have been removed or is outside your current scope.",
|
|
135
136
|
action: /* @__PURE__ */ d(g, {
|
|
@@ -139,36 +140,36 @@ function E() {
|
|
|
139
140
|
})
|
|
140
141
|
})
|
|
141
142
|
});
|
|
142
|
-
let Q = [...
|
|
143
|
-
(await
|
|
144
|
-
},
|
|
145
|
-
let e = await
|
|
143
|
+
let Q = [...j.schemaFields ?? []].sort((e, t) => e.position - t.position), $ = Q.filter(C).length, pt = j.status !== "AVAILABLE" && j.status !== "ARCHIVED", mt = async () => {
|
|
144
|
+
(await Xe({ variables: { id: j.id } })).data?.cosPublishDataset && (t.success("Dataset published", `“${j.name}” is now available.`), await A());
|
|
145
|
+
}, ht = async () => {
|
|
146
|
+
let e = await Ze({ variables: { id: j.id } });
|
|
146
147
|
if (e.error) throw Error(e.error.message);
|
|
147
148
|
if (!e.data?.cosArchiveDataset) throw t.error("Could not archive dataset", "The server did not confirm the change."), Error("Archive not confirmed");
|
|
148
149
|
t.success("Dataset archived"), E("datasets");
|
|
149
|
-
},
|
|
150
|
-
(await
|
|
151
|
-
id:
|
|
152
|
-
input: { tags:
|
|
153
|
-
} })).data?.cosUpdateDataset && (t.success("Tags updated"), await
|
|
154
|
-
},
|
|
155
|
-
if (!
|
|
150
|
+
}, gt = async () => {
|
|
151
|
+
(await Qe({ variables: {
|
|
152
|
+
id: j.id,
|
|
153
|
+
input: { tags: H }
|
|
154
|
+
} })).data?.cosUpdateDataset && (t.success("Tags updated"), await A());
|
|
155
|
+
}, _t = async () => {
|
|
156
|
+
if (!G.trim()) {
|
|
156
157
|
t.error("Field name is required");
|
|
157
158
|
return;
|
|
158
159
|
}
|
|
159
|
-
(await
|
|
160
|
-
datasetId:
|
|
161
|
-
name:
|
|
162
|
-
fieldType:
|
|
163
|
-
unit:
|
|
164
|
-
description:
|
|
165
|
-
provenance:
|
|
166
|
-
nullable:
|
|
167
|
-
} } })).data?.cosAddSchemaField && (t.success("Schema field added"), Z(!1), await
|
|
160
|
+
(await $e({ variables: { input: {
|
|
161
|
+
datasetId: j.id,
|
|
162
|
+
name: G.trim(),
|
|
163
|
+
fieldType: q,
|
|
164
|
+
unit: Y.trim() || void 0,
|
|
165
|
+
description: st.trim() || void 0,
|
|
166
|
+
provenance: ct.trim() || void 0,
|
|
167
|
+
nullable: ut
|
|
168
|
+
} } })).data?.cosAddSchemaField && (t.success("Schema field added"), Z(!1), await A());
|
|
168
169
|
};
|
|
169
170
|
return /* @__PURE__ */ f(s, {
|
|
170
|
-
title:
|
|
171
|
-
description:
|
|
171
|
+
title: j.name,
|
|
172
|
+
description: j.description ?? void 0,
|
|
172
173
|
backPath: "datasets",
|
|
173
174
|
actions: /* @__PURE__ */ f("div", {
|
|
174
175
|
className: "flex flex-wrap items-center justify-end gap-2",
|
|
@@ -176,19 +177,19 @@ function E() {
|
|
|
176
177
|
/* @__PURE__ */ f(g, {
|
|
177
178
|
type: "button",
|
|
178
179
|
variant: "outline",
|
|
179
|
-
onClick: () => E(`datasets/${
|
|
180
|
-
children: [/* @__PURE__ */ d(
|
|
180
|
+
onClick: () => E(`datasets/${j.id}/edit`),
|
|
181
|
+
children: [/* @__PURE__ */ d(Te, { className: "size-4" }), "Edit"]
|
|
181
182
|
}),
|
|
182
|
-
|
|
183
|
+
pt ? /* @__PURE__ */ d(g, {
|
|
183
184
|
type: "button",
|
|
184
|
-
onClick: () => void
|
|
185
|
-
disabled:
|
|
186
|
-
children:
|
|
185
|
+
onClick: () => void mt(),
|
|
186
|
+
disabled: N,
|
|
187
|
+
children: N ? "Publishing…" : "Publish"
|
|
187
188
|
}) : null,
|
|
188
189
|
/* @__PURE__ */ d(oe, {
|
|
189
|
-
ariaLabel: `Actions for ${
|
|
190
|
-
entityName:
|
|
191
|
-
onDelete: () =>
|
|
190
|
+
ariaLabel: `Actions for ${j.name}`,
|
|
191
|
+
entityName: j.name,
|
|
192
|
+
onDelete: () => ht(),
|
|
192
193
|
deleteLabel: "Archive dataset"
|
|
193
194
|
})
|
|
194
195
|
]
|
|
@@ -199,22 +200,22 @@ function E() {
|
|
|
199
200
|
/* @__PURE__ */ f("div", {
|
|
200
201
|
className: "flex flex-wrap items-center gap-2",
|
|
201
202
|
children: [
|
|
202
|
-
/* @__PURE__ */ d(c, { status:
|
|
203
|
+
/* @__PURE__ */ d(c, { status: j.status }),
|
|
203
204
|
/* @__PURE__ */ d(c, {
|
|
204
|
-
status:
|
|
205
|
-
label: l(
|
|
205
|
+
status: j.accessLevel,
|
|
206
|
+
label: l(j.accessLevel)
|
|
206
207
|
}),
|
|
207
208
|
/* @__PURE__ */ f("span", {
|
|
208
209
|
className: "inline-flex items-center gap-1.5 rounded-full border border-border-default bg-bg-elevated px-2.5 py-0.5 text-xs font-medium",
|
|
209
210
|
title: "Current dataset version",
|
|
210
211
|
children: [
|
|
211
|
-
/* @__PURE__ */ d(
|
|
212
|
+
/* @__PURE__ */ d(Se, {
|
|
212
213
|
className: "size-3.5 text-text-tertiary",
|
|
213
214
|
"aria-hidden": "true"
|
|
214
215
|
}),
|
|
215
216
|
/* @__PURE__ */ f("span", {
|
|
216
217
|
className: "text-text-primary",
|
|
217
|
-
children: ["v",
|
|
218
|
+
children: ["v", j.version]
|
|
218
219
|
}),
|
|
219
220
|
/* @__PURE__ */ d("span", {
|
|
220
221
|
className: "text-text-tertiary",
|
|
@@ -229,14 +230,14 @@ function E() {
|
|
|
229
230
|
children: [
|
|
230
231
|
/* @__PURE__ */ d(T, {
|
|
231
232
|
label: "Source",
|
|
232
|
-
value:
|
|
233
|
+
value: j.source ? /* @__PURE__ */ f("button", {
|
|
233
234
|
type: "button",
|
|
234
|
-
onClick: () => E(`sources/${
|
|
235
|
+
onClick: () => E(`sources/${j.source?.id}`),
|
|
235
236
|
className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
|
|
236
|
-
children: [/* @__PURE__ */ d(
|
|
237
|
+
children: [/* @__PURE__ */ d(De, {
|
|
237
238
|
className: "size-4 text-text-secondary",
|
|
238
239
|
"aria-hidden": "true"
|
|
239
|
-
}),
|
|
240
|
+
}), j.source.name]
|
|
240
241
|
}) : /* @__PURE__ */ d("span", {
|
|
241
242
|
className: "text-text-secondary",
|
|
242
243
|
children: "Not linked"
|
|
@@ -244,14 +245,14 @@ function E() {
|
|
|
244
245
|
}),
|
|
245
246
|
/* @__PURE__ */ d(T, {
|
|
246
247
|
label: "Collection",
|
|
247
|
-
value:
|
|
248
|
+
value: j.collection ? /* @__PURE__ */ f("button", {
|
|
248
249
|
type: "button",
|
|
249
|
-
onClick: () => E(`collections/${
|
|
250
|
+
onClick: () => E(`collections/${j.collection?.id}`),
|
|
250
251
|
className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
|
|
251
|
-
children: [/* @__PURE__ */ d(
|
|
252
|
+
children: [/* @__PURE__ */ d(ye, {
|
|
252
253
|
className: "size-4 text-text-secondary",
|
|
253
254
|
"aria-hidden": "true"
|
|
254
|
-
}),
|
|
255
|
+
}), j.collection.name]
|
|
255
256
|
}) : /* @__PURE__ */ d("span", {
|
|
256
257
|
className: "text-text-secondary",
|
|
257
258
|
children: "Not in a collection"
|
|
@@ -259,18 +260,18 @@ function E() {
|
|
|
259
260
|
}),
|
|
260
261
|
/* @__PURE__ */ d(T, {
|
|
261
262
|
label: "Format",
|
|
262
|
-
value: /* @__PURE__ */ d("span", { children:
|
|
263
|
+
value: /* @__PURE__ */ d("span", { children: j.format || "Not specified" })
|
|
263
264
|
}),
|
|
264
265
|
/* @__PURE__ */ d(T, {
|
|
265
266
|
label: "Size",
|
|
266
267
|
value: /* @__PURE__ */ f("span", {
|
|
267
268
|
className: "tabular-nums",
|
|
268
|
-
children: [
|
|
269
|
+
children: [Ke(j.sizeBytes), Number(j.rowCount) > 0 ? /* @__PURE__ */ f("span", {
|
|
269
270
|
className: "text-text-secondary",
|
|
270
271
|
children: [
|
|
271
272
|
" ",
|
|
272
273
|
"· ",
|
|
273
|
-
Number(
|
|
274
|
+
Number(j.rowCount).toLocaleString(),
|
|
274
275
|
" rows"
|
|
275
276
|
]
|
|
276
277
|
}) : null]
|
|
@@ -278,24 +279,24 @@ function E() {
|
|
|
278
279
|
}),
|
|
279
280
|
/* @__PURE__ */ d(T, {
|
|
280
281
|
label: "Ingested",
|
|
281
|
-
value: /* @__PURE__ */ d("span", { children: w(
|
|
282
|
+
value: /* @__PURE__ */ d("span", { children: w(j.ingestedAt) })
|
|
282
283
|
}),
|
|
283
284
|
/* @__PURE__ */ d(T, {
|
|
284
285
|
label: "Created",
|
|
285
|
-
value: /* @__PURE__ */ d("span", { children: w(
|
|
286
|
+
value: /* @__PURE__ */ d("span", { children: w(j.createdAt) })
|
|
286
287
|
}),
|
|
287
288
|
/* @__PURE__ */ d(T, {
|
|
288
289
|
label: "Updated",
|
|
289
|
-
value: /* @__PURE__ */ d("span", { children: w(
|
|
290
|
+
value: /* @__PURE__ */ d("span", { children: w(j.updatedAt) })
|
|
290
291
|
}),
|
|
291
292
|
/* @__PURE__ */ d(T, {
|
|
292
293
|
label: "Artifact",
|
|
293
|
-
value:
|
|
294
|
-
href:
|
|
294
|
+
value: j.file ? M ? /* @__PURE__ */ f("a", {
|
|
295
|
+
href: M,
|
|
295
296
|
target: "_blank",
|
|
296
297
|
rel: "noopener noreferrer",
|
|
297
298
|
className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
|
|
298
|
-
children: [/* @__PURE__ */ d(
|
|
299
|
+
children: [/* @__PURE__ */ d(xe, {
|
|
299
300
|
className: "size-4",
|
|
300
301
|
"aria-hidden": "true"
|
|
301
302
|
}), "Download file"]
|
|
@@ -315,7 +316,7 @@ function E() {
|
|
|
315
316
|
className: "flex items-center justify-between gap-3",
|
|
316
317
|
children: [/* @__PURE__ */ f("div", {
|
|
317
318
|
className: "flex items-center gap-2",
|
|
318
|
-
children: [/* @__PURE__ */ d(
|
|
319
|
+
children: [/* @__PURE__ */ d(Oe, {
|
|
319
320
|
className: "size-5 text-text-secondary",
|
|
320
321
|
"aria-hidden": "true"
|
|
321
322
|
}), /* @__PURE__ */ d("h2", {
|
|
@@ -324,18 +325,18 @@ function E() {
|
|
|
324
325
|
})]
|
|
325
326
|
}), /* @__PURE__ */ f("button", {
|
|
326
327
|
type: "button",
|
|
327
|
-
onClick: () => E(`lineage/${
|
|
328
|
+
onClick: () => E(`lineage/${j.id}`),
|
|
328
329
|
className: "inline-flex items-center gap-1 rounded-button text-sm font-medium text-text-link underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
|
|
329
|
-
children: ["View full lineage", /* @__PURE__ */ d(
|
|
330
|
+
children: ["View full lineage", /* @__PURE__ */ d(ve, {
|
|
330
331
|
className: "size-4",
|
|
331
332
|
"aria-hidden": "true"
|
|
332
333
|
})]
|
|
333
334
|
})]
|
|
334
|
-
}),
|
|
335
|
+
}), et && V.nodes.length <= 1 ? /* @__PURE__ */ d(o, { label: "Building lineage…" }) : V.nodes.length <= 1 ? /* @__PURE__ */ d("div", {
|
|
335
336
|
className: "rounded-card border border-dashed border-border-default bg-bg-sunken p-6 text-sm text-text-secondary",
|
|
336
337
|
children: "No upstream or downstream provenance is linked to this dataset yet. Connect a source, run a pipeline, attach a notebook, or publish a release to build its lineage."
|
|
337
|
-
}) : /* @__PURE__ */ d(
|
|
338
|
-
model:
|
|
338
|
+
}) : /* @__PURE__ */ d(pe, {
|
|
339
|
+
model: V,
|
|
339
340
|
mode: "compact",
|
|
340
341
|
onNavigate: E
|
|
341
342
|
})]
|
|
@@ -378,15 +379,15 @@ function E() {
|
|
|
378
379
|
variant: "outline",
|
|
379
380
|
size: "sm",
|
|
380
381
|
onClick: () => Z(!0),
|
|
381
|
-
children: [/* @__PURE__ */ d(
|
|
382
|
+
children: [/* @__PURE__ */ d(Ee, { className: "size-4" }), "Add field"]
|
|
382
383
|
})]
|
|
383
384
|
}), Q.length === 0 ? /* @__PURE__ */ d(a, {
|
|
384
385
|
icon: p,
|
|
385
386
|
title: "No schema fields yet.",
|
|
386
387
|
description: "Describe the columns in this dataset so consumers know what each field means."
|
|
387
|
-
}) : /* @__PURE__ */ f(
|
|
388
|
+
}) : /* @__PURE__ */ f(ge, { children: [/* @__PURE__ */ d("div", {
|
|
388
389
|
className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
|
|
389
|
-
children: /* @__PURE__ */ f(
|
|
390
|
+
children: /* @__PURE__ */ f(Ve, { children: [/* @__PURE__ */ d(Ue, { children: /* @__PURE__ */ f(x, { children: [
|
|
390
391
|
/* @__PURE__ */ d(b, {
|
|
391
392
|
className: "w-10 text-right",
|
|
392
393
|
children: "#"
|
|
@@ -396,51 +397,63 @@ function E() {
|
|
|
396
397
|
/* @__PURE__ */ d(b, { children: "Unit" }),
|
|
397
398
|
/* @__PURE__ */ d(b, { children: "Nullable" }),
|
|
398
399
|
/* @__PURE__ */ d(b, { children: "Provenance" })
|
|
399
|
-
] }) }), /* @__PURE__ */ d(
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
children:
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
400
|
+
] }) }), /* @__PURE__ */ d(He, { children: Q.map((e, t) => /* @__PURE__ */ f(x, {
|
|
401
|
+
"aria-selected": D === e.id,
|
|
402
|
+
"data-state": D === e.id ? "selected" : void 0,
|
|
403
|
+
className: D === e.id ? "bg-bg-sunken" : void 0,
|
|
404
|
+
children: [
|
|
405
|
+
/* @__PURE__ */ d(y, {
|
|
406
|
+
className: "text-right text-xs tabular-nums text-text-tertiary",
|
|
407
|
+
children: t + 1
|
|
408
|
+
}),
|
|
409
|
+
/* @__PURE__ */ f(y, { children: [/* @__PURE__ */ d("button", {
|
|
410
|
+
type: "button",
|
|
411
|
+
onClick: () => O(e.id),
|
|
412
|
+
"aria-pressed": D === e.id,
|
|
413
|
+
className: "text-left font-medium text-text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
|
|
414
|
+
children: e.name
|
|
415
|
+
}), e.description ? /* @__PURE__ */ d("p", {
|
|
416
|
+
className: "mt-0.5 line-clamp-1 max-w-xs text-xs text-text-secondary",
|
|
417
|
+
children: e.description
|
|
418
|
+
}) : null] }),
|
|
419
|
+
/* @__PURE__ */ d(y, { children: /* @__PURE__ */ d(h, {
|
|
420
|
+
variant: "secondary",
|
|
421
|
+
children: l(e.fieldType)
|
|
422
|
+
}) }),
|
|
423
|
+
/* @__PURE__ */ d(y, {
|
|
424
|
+
className: "text-sm text-text-secondary",
|
|
425
|
+
children: e.unit ? e.unit : C(e) ? /* @__PURE__ */ f("span", {
|
|
426
|
+
className: "inline-flex items-center gap-1 text-status-warning-text",
|
|
427
|
+
title: `${l(e.fieldType)} fields carry a measured quantity — record the unit so consumers can interpret the values.`,
|
|
428
|
+
children: [/* @__PURE__ */ d(m, {
|
|
429
|
+
className: "size-3.5",
|
|
430
|
+
"aria-hidden": "true"
|
|
431
|
+
}), "Not set"]
|
|
432
|
+
}) : "—"
|
|
433
|
+
}),
|
|
434
|
+
/* @__PURE__ */ d(y, {
|
|
435
|
+
className: "text-sm text-text-secondary",
|
|
436
|
+
children: e.nullable ? "Yes" : "No"
|
|
437
|
+
}),
|
|
438
|
+
/* @__PURE__ */ d(y, {
|
|
439
|
+
className: "text-sm text-text-secondary",
|
|
440
|
+
children: e.provenance || "—"
|
|
441
|
+
})
|
|
442
|
+
]
|
|
443
|
+
}, e.id)) })] })
|
|
435
444
|
}), /* @__PURE__ */ d("div", {
|
|
436
445
|
className: "space-y-2 md:hidden",
|
|
437
446
|
children: Q.map((e) => /* @__PURE__ */ f("div", {
|
|
438
|
-
|
|
447
|
+
"aria-current": D === e.id ? "true" : void 0,
|
|
448
|
+
className: D === e.id ? "rounded-card border border-border-focus bg-bg-sunken p-3" : "rounded-card border border-border-default bg-bg-elevated p-3",
|
|
439
449
|
children: [
|
|
440
450
|
/* @__PURE__ */ f("div", {
|
|
441
451
|
className: "flex items-start justify-between gap-2",
|
|
442
|
-
children: [/* @__PURE__ */ d("
|
|
443
|
-
|
|
452
|
+
children: [/* @__PURE__ */ d("button", {
|
|
453
|
+
type: "button",
|
|
454
|
+
onClick: () => O(e.id),
|
|
455
|
+
"aria-pressed": D === e.id,
|
|
456
|
+
className: "text-left font-medium text-text-primary underline-offset-2 hover:underline",
|
|
444
457
|
children: e.name
|
|
445
458
|
}), /* @__PURE__ */ d(h, {
|
|
446
459
|
variant: "secondary",
|
|
@@ -493,17 +506,17 @@ function E() {
|
|
|
493
506
|
/* @__PURE__ */ f("section", {
|
|
494
507
|
className: "space-y-3 rounded-card border border-border-default bg-bg-elevated p-5",
|
|
495
508
|
children: [/* @__PURE__ */ d(ue, {
|
|
496
|
-
value:
|
|
497
|
-
onChange:
|
|
509
|
+
value: H,
|
|
510
|
+
onChange: U,
|
|
498
511
|
label: "Dataset tags"
|
|
499
|
-
}),
|
|
512
|
+
}), rt ? /* @__PURE__ */ d("div", {
|
|
500
513
|
className: "flex justify-end",
|
|
501
514
|
children: /* @__PURE__ */ d(g, {
|
|
502
515
|
type: "button",
|
|
503
516
|
size: "sm",
|
|
504
|
-
onClick: () => void
|
|
505
|
-
disabled:
|
|
506
|
-
children:
|
|
517
|
+
onClick: () => void gt(),
|
|
518
|
+
disabled: P,
|
|
519
|
+
children: P ? "Saving…" : "Save tags"
|
|
507
520
|
})
|
|
508
521
|
}) : null]
|
|
509
522
|
}),
|
|
@@ -511,7 +524,7 @@ function E() {
|
|
|
511
524
|
className: "space-y-3",
|
|
512
525
|
children: [/* @__PURE__ */ f("div", {
|
|
513
526
|
className: "flex items-center gap-2",
|
|
514
|
-
children: [/* @__PURE__ */ d(
|
|
527
|
+
children: [/* @__PURE__ */ d(Ce, {
|
|
515
528
|
className: "size-5 text-text-secondary",
|
|
516
529
|
"aria-hidden": "true"
|
|
517
530
|
}), /* @__PURE__ */ d("h2", {
|
|
@@ -519,7 +532,7 @@ function E() {
|
|
|
519
532
|
children: "Activity"
|
|
520
533
|
})]
|
|
521
534
|
}), /* @__PURE__ */ d(ce, {
|
|
522
|
-
resourceId:
|
|
535
|
+
resourceId: j.id,
|
|
523
536
|
resourceType: "cosmicintersection-dataset"
|
|
524
537
|
})]
|
|
525
538
|
}),
|
|
@@ -527,7 +540,7 @@ function E() {
|
|
|
527
540
|
className: "space-y-3",
|
|
528
541
|
children: [/* @__PURE__ */ f("div", {
|
|
529
542
|
className: "flex items-center gap-2",
|
|
530
|
-
children: [/* @__PURE__ */ d(
|
|
543
|
+
children: [/* @__PURE__ */ d(we, {
|
|
531
544
|
className: "size-5 text-text-secondary",
|
|
532
545
|
"aria-hidden": "true"
|
|
533
546
|
}), /* @__PURE__ */ d("h2", {
|
|
@@ -536,19 +549,19 @@ function E() {
|
|
|
536
549
|
})]
|
|
537
550
|
}), /* @__PURE__ */ d(le, {
|
|
538
551
|
entityType: "cosmicintersection-dataset",
|
|
539
|
-
entityId:
|
|
540
|
-
title:
|
|
552
|
+
entityId: j.id,
|
|
553
|
+
title: j.name,
|
|
541
554
|
widgetKey: "dataset-discussion"
|
|
542
555
|
})]
|
|
543
556
|
})
|
|
544
557
|
]
|
|
545
|
-
}), /* @__PURE__ */ d(
|
|
546
|
-
open:
|
|
558
|
+
}), /* @__PURE__ */ d(Ae, {
|
|
559
|
+
open: it,
|
|
547
560
|
onOpenChange: Z,
|
|
548
|
-
children: /* @__PURE__ */ f(
|
|
549
|
-
/* @__PURE__ */ f(
|
|
561
|
+
children: /* @__PURE__ */ f(je, { children: [
|
|
562
|
+
/* @__PURE__ */ f(Pe, { children: [/* @__PURE__ */ d(Fe, { children: "Add schema field" }), /* @__PURE__ */ f(Me, { children: [
|
|
550
563
|
"Document a column in “",
|
|
551
|
-
|
|
564
|
+
j.name,
|
|
552
565
|
"” — its type, unit and provenance."
|
|
553
566
|
] })] }),
|
|
554
567
|
/* @__PURE__ */ f("div", {
|
|
@@ -561,8 +574,8 @@ function E() {
|
|
|
561
574
|
children: "Name"
|
|
562
575
|
}), /* @__PURE__ */ d(_, {
|
|
563
576
|
id: "cos-field-name",
|
|
564
|
-
value:
|
|
565
|
-
onChange: (e) =>
|
|
577
|
+
value: G,
|
|
578
|
+
onChange: (e) => K(e.target.value),
|
|
566
579
|
placeholder: "e.g. right_ascension",
|
|
567
580
|
required: !0
|
|
568
581
|
})]
|
|
@@ -574,14 +587,14 @@ function E() {
|
|
|
574
587
|
children: [/* @__PURE__ */ d(v, {
|
|
575
588
|
htmlFor: "cos-field-type",
|
|
576
589
|
children: "Type"
|
|
577
|
-
}), /* @__PURE__ */ f(
|
|
578
|
-
value:
|
|
579
|
-
onValueChange: (e) =>
|
|
580
|
-
children: [/* @__PURE__ */ d(
|
|
590
|
+
}), /* @__PURE__ */ f(Ie, {
|
|
591
|
+
value: q,
|
|
592
|
+
onValueChange: (e) => J(e),
|
|
593
|
+
children: [/* @__PURE__ */ d(ze, {
|
|
581
594
|
id: "cos-field-type",
|
|
582
595
|
"aria-label": "Field type",
|
|
583
|
-
children: /* @__PURE__ */ d(
|
|
584
|
-
}), /* @__PURE__ */ d(
|
|
596
|
+
children: /* @__PURE__ */ d(Be, {})
|
|
597
|
+
}), /* @__PURE__ */ d(Le, { children: Ge.map((e) => /* @__PURE__ */ d(Re, {
|
|
585
598
|
value: e,
|
|
586
599
|
children: l(e)
|
|
587
600
|
}, e)) })]
|
|
@@ -593,8 +606,8 @@ function E() {
|
|
|
593
606
|
children: "Unit"
|
|
594
607
|
}), /* @__PURE__ */ d(_, {
|
|
595
608
|
id: "cos-field-unit",
|
|
596
|
-
value:
|
|
597
|
-
onChange: (e) =>
|
|
609
|
+
value: Y,
|
|
610
|
+
onChange: (e) => ot(e.target.value),
|
|
598
611
|
placeholder: "e.g. deg, mag, Jy"
|
|
599
612
|
})]
|
|
600
613
|
})]
|
|
@@ -604,10 +617,10 @@ function E() {
|
|
|
604
617
|
children: [/* @__PURE__ */ d(v, {
|
|
605
618
|
htmlFor: "cos-field-desc",
|
|
606
619
|
children: "Description"
|
|
607
|
-
}), /* @__PURE__ */ d(
|
|
620
|
+
}), /* @__PURE__ */ d(We, {
|
|
608
621
|
id: "cos-field-desc",
|
|
609
|
-
value:
|
|
610
|
-
onChange: (e) =>
|
|
622
|
+
value: st,
|
|
623
|
+
onChange: (e) => X(e.target.value),
|
|
611
624
|
rows: 2
|
|
612
625
|
})]
|
|
613
626
|
}),
|
|
@@ -618,31 +631,31 @@ function E() {
|
|
|
618
631
|
children: "Provenance"
|
|
619
632
|
}), /* @__PURE__ */ d(_, {
|
|
620
633
|
id: "cos-field-prov",
|
|
621
|
-
value:
|
|
622
|
-
onChange: (e) =>
|
|
634
|
+
value: ct,
|
|
635
|
+
onChange: (e) => lt(e.target.value),
|
|
623
636
|
placeholder: "Where this field comes from"
|
|
624
637
|
})]
|
|
625
638
|
}),
|
|
626
639
|
/* @__PURE__ */ f("label", {
|
|
627
640
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
628
|
-
children: [/* @__PURE__ */ d(
|
|
629
|
-
checked:
|
|
630
|
-
onCheckedChange: (e) =>
|
|
641
|
+
children: [/* @__PURE__ */ d(ke, {
|
|
642
|
+
checked: ut,
|
|
643
|
+
onCheckedChange: (e) => dt(e === !0)
|
|
631
644
|
}), "Nullable (may contain empty values)"]
|
|
632
645
|
})
|
|
633
646
|
]
|
|
634
647
|
}),
|
|
635
|
-
/* @__PURE__ */ f(
|
|
648
|
+
/* @__PURE__ */ f(Ne, { children: [/* @__PURE__ */ d(g, {
|
|
636
649
|
type: "button",
|
|
637
650
|
variant: "outline",
|
|
638
651
|
onClick: () => Z(!1),
|
|
639
|
-
disabled:
|
|
652
|
+
disabled: F,
|
|
640
653
|
children: "Cancel"
|
|
641
654
|
}), /* @__PURE__ */ d(g, {
|
|
642
655
|
type: "button",
|
|
643
|
-
onClick: () => void
|
|
644
|
-
disabled:
|
|
645
|
-
children:
|
|
656
|
+
onClick: () => void _t(),
|
|
657
|
+
disabled: F,
|
|
658
|
+
children: F ? "Adding…" : "Add field"
|
|
646
659
|
})] })
|
|
647
660
|
] })
|
|
648
661
|
})]
|