@burdenoff/microfe-cosmicintersection 2026.704.1 → 2026.704.2
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/CosmicIntersectionRoutes.js +31 -23
- package/dist/cosmicintersection/CosmicIntersectionRoutes.js.map +1 -1
- package/dist/cosmicintersection/api/cosmicApi.js +131 -66
- package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
- package/dist/cosmicintersection/components/ActivityFeedPanel.js +68 -0
- package/dist/cosmicintersection/components/ActivityFeedPanel.js.map +1 -0
- package/dist/cosmicintersection/components/DiscussionPanel.js +57 -0
- package/dist/cosmicintersection/components/DiscussionPanel.js.map +1 -0
- package/dist/cosmicintersection/components/index.js +5 -3
- package/dist/cosmicintersection/pages/access/AccessPage.js +24 -17
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +12 -12
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +109 -96
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.js +87 -61
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionsPage.js +51 -42
- package/dist/cosmicintersection/pages/collections/CollectionsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.js +5 -3
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +172 -152
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.js +7 -7
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +205 -196
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +211 -161
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js +113 -108
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunsPage.js +86 -101
- package/dist/cosmicintersection/pages/runs/RunsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +205 -0
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js.map +1 -0
- package/dist/cosmicintersection/pages/sources/SourcesPage.js +110 -104
- package/dist/cosmicintersection/pages/sources/SourcesPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { useCosmicIntersection as e } from "../../context/CosmicIntersectionContext.js";
|
|
2
2
|
import { notify as t } from "../../lib/toast.js";
|
|
3
|
-
import { useCosAddSchemaFieldMutation as n, useCosArchiveDatasetMutation as r, useCosDatasetQuery as i, useCosPublishDatasetMutation as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import s from "../../components/
|
|
12
|
-
import c
|
|
3
|
+
import { useCosAddSchemaFieldMutation as n, useCosArchiveDatasetMutation as r, useCosDatasetQuery as i, useCosPublishDatasetMutation as a, useCosUpdateDatasetMutation as ee } from "../../api/cosmicApi.js";
|
|
4
|
+
import te from "../../components/ActionMenu.js";
|
|
5
|
+
import o from "../../components/EmptyState.js";
|
|
6
|
+
import ne from "../../components/ErrorState.js";
|
|
7
|
+
import re from "../../components/LoadingState.js";
|
|
8
|
+
import ie from "../../components/ActivityFeedPanel.js";
|
|
9
|
+
import ae from "../../components/DiscussionPanel.js";
|
|
10
|
+
import oe from "../../components/EntityTagsField.js";
|
|
11
|
+
import { useFileDownloadUrl as s } from "../../components/FileUploadField.js";
|
|
12
|
+
import c from "../../components/PageLayout.js";
|
|
13
|
+
import l, { formatEnumLabel as u } from "../../components/StatusBadge.js";
|
|
13
14
|
import "../../components/index.js";
|
|
14
|
-
import { useState as
|
|
15
|
-
import { jsx as
|
|
15
|
+
import { useState as d } from "react";
|
|
16
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
16
17
|
import { useParams as se } from "react-router-dom";
|
|
17
|
-
import { Boxes as ce, Columns3 as
|
|
18
|
-
import { Badge as
|
|
18
|
+
import { Boxes as ce, Columns3 as m, Database as le, Download as ue, History as de, MessagesSquare as fe, Pencil as pe, Plus as h, Radar as me } from "lucide-react";
|
|
19
|
+
import { Badge as g, Button as _, Checkbox as he, Dialog as ge, DialogContent as _e, DialogDescription as ve, DialogFooter as ye, DialogHeader as be, DialogTitle as xe, Input as v, Label as y, Select as Se, SelectContent as Ce, SelectItem as we, SelectTrigger as Te, SelectValue as Ee, Table as De, TableBody as Oe, TableCell as b, TableHead as x, TableHeader as S, TableRow as C, Textarea as w } from "@burdenoff/fe-libs/ui";
|
|
19
20
|
//#region src/cosmicintersection/pages/datasets/DatasetDetailPage.tsx
|
|
20
|
-
var
|
|
21
|
+
var T = [
|
|
21
22
|
"STRING",
|
|
22
23
|
"INTEGER",
|
|
23
24
|
"FLOAT",
|
|
@@ -29,7 +30,7 @@ var w = [
|
|
|
29
30
|
"IMAGE_REF",
|
|
30
31
|
"JSON"
|
|
31
32
|
];
|
|
32
|
-
function
|
|
33
|
+
function ke(e) {
|
|
33
34
|
if (!e) return "—";
|
|
34
35
|
let t = Number(e);
|
|
35
36
|
if (!Number.isFinite(t) || t <= 0) return "—";
|
|
@@ -50,70 +51,70 @@ function E(e) {
|
|
|
50
51
|
return Number.isNaN(t.getTime()) ? "—" : t.toLocaleString();
|
|
51
52
|
}
|
|
52
53
|
function D({ label: e, value: t }) {
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ p("div", {
|
|
54
55
|
className: "rounded-card border border-border-default bg-bg-elevated p-4",
|
|
55
|
-
children: [/* @__PURE__ */
|
|
56
|
+
children: [/* @__PURE__ */ f("p", {
|
|
56
57
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
57
58
|
children: e
|
|
58
|
-
}), /* @__PURE__ */
|
|
59
|
+
}), /* @__PURE__ */ f("div", {
|
|
59
60
|
className: "mt-1 text-sm text-text-primary",
|
|
60
61
|
children: t
|
|
61
62
|
})]
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
65
|
function O() {
|
|
65
|
-
let { id: O = "" } = se(), { navigate: k } = e(), { data:
|
|
66
|
-
R && R !==
|
|
67
|
-
let
|
|
66
|
+
let { id: O = "" } = se(), { navigate: k } = e(), { data: Ae, loading: je, error: Me, refetch: A } = i(O), j = Ae?.cosDataset ?? null, M = s(j?.file?.id).data?.getFileDownloadUrl ?? null, [Ne, { loading: N }] = a(), [Pe] = r(), [Fe, { loading: P }] = ee(), [Ie, { loading: F }] = n(), [I, L] = d([]), [Le, Re] = d(null), R = j ? `${j.id}:${j.updatedAt}` : null;
|
|
67
|
+
R && R !== Le && (Re(R), L(j?.tags ?? []));
|
|
68
|
+
let ze = j != null && (I.length !== j.tags.length || I.some((e, t) => e !== j.tags[t])), [Be, Ve] = d(!1), [z, B] = d(""), [V, H] = d("STRING"), [U, W] = d(""), [G, K] = d(""), [q, J] = d(""), [Y, X] = d(!0), He = () => {
|
|
68
69
|
B(""), H("STRING"), W(""), K(""), J(""), X(!0);
|
|
69
70
|
}, Z = (e) => {
|
|
70
|
-
|
|
71
|
+
Ve(e), e || He();
|
|
71
72
|
};
|
|
72
|
-
if (
|
|
73
|
+
if (je) return /* @__PURE__ */ f(c, {
|
|
73
74
|
title: "Dataset",
|
|
74
75
|
backPath: "datasets",
|
|
75
|
-
children: /* @__PURE__ */
|
|
76
|
+
children: /* @__PURE__ */ f(re, { label: "Loading dataset…" })
|
|
76
77
|
});
|
|
77
|
-
if (
|
|
78
|
+
if (Me) return /* @__PURE__ */ f(c, {
|
|
78
79
|
title: "Dataset",
|
|
79
80
|
backPath: "datasets",
|
|
80
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ f(ne, {
|
|
81
82
|
message: "We could not load this dataset.",
|
|
82
83
|
onRetry: () => void A()
|
|
83
84
|
})
|
|
84
85
|
});
|
|
85
|
-
if (!j) return /* @__PURE__ */
|
|
86
|
+
if (!j) return /* @__PURE__ */ f(c, {
|
|
86
87
|
title: "Dataset",
|
|
87
88
|
backPath: "datasets",
|
|
88
|
-
children: /* @__PURE__ */
|
|
89
|
-
icon:
|
|
89
|
+
children: /* @__PURE__ */ f(o, {
|
|
90
|
+
icon: le,
|
|
90
91
|
title: "Dataset not found.",
|
|
91
92
|
description: "This dataset may have been removed or is outside your current scope.",
|
|
92
|
-
action: /* @__PURE__ */
|
|
93
|
+
action: /* @__PURE__ */ f(_, {
|
|
93
94
|
type: "button",
|
|
94
95
|
onClick: () => k("datasets"),
|
|
95
96
|
children: "Back to datasets"
|
|
96
97
|
})
|
|
97
98
|
})
|
|
98
99
|
});
|
|
99
|
-
let Q = [...j.schemaFields ?? []].sort((e, t) => e.position - t.position),
|
|
100
|
-
(await
|
|
101
|
-
},
|
|
102
|
-
let e = await
|
|
100
|
+
let Q = [...j.schemaFields ?? []].sort((e, t) => e.position - t.position), Ue = j.status !== "AVAILABLE" && j.status !== "ARCHIVED", $ = async () => {
|
|
101
|
+
(await Ne({ variables: { id: j.id } })).data?.cosPublishDataset && (t.success("Dataset published", `“${j.name}” is now available.`), await A());
|
|
102
|
+
}, We = async () => {
|
|
103
|
+
let e = await Pe({ variables: { id: j.id } });
|
|
103
104
|
if (e.error) throw Error(e.error.message);
|
|
104
105
|
if (!e.data?.cosArchiveDataset) throw t.error("Could not archive dataset", "The server did not confirm the change."), Error("Archive not confirmed");
|
|
105
106
|
t.success("Dataset archived"), k("datasets");
|
|
106
|
-
},
|
|
107
|
-
(await
|
|
107
|
+
}, Ge = async () => {
|
|
108
|
+
(await Fe({ variables: {
|
|
108
109
|
id: j.id,
|
|
109
110
|
input: { tags: I }
|
|
110
111
|
} })).data?.cosUpdateDataset && (t.success("Tags updated"), await A());
|
|
111
|
-
},
|
|
112
|
+
}, Ke = async () => {
|
|
112
113
|
if (!z.trim()) {
|
|
113
114
|
t.error("Field name is required");
|
|
114
115
|
return;
|
|
115
116
|
}
|
|
116
|
-
(await
|
|
117
|
+
(await Ie({ variables: { input: {
|
|
117
118
|
datasetId: j.id,
|
|
118
119
|
name: z.trim(),
|
|
119
120
|
fieldType: V,
|
|
@@ -123,96 +124,96 @@ function O() {
|
|
|
123
124
|
nullable: Y
|
|
124
125
|
} } })).data?.cosAddSchemaField && (t.success("Schema field added"), Z(!1), await A());
|
|
125
126
|
};
|
|
126
|
-
return /* @__PURE__ */
|
|
127
|
+
return /* @__PURE__ */ p(c, {
|
|
127
128
|
title: j.name,
|
|
128
129
|
description: j.description ?? void 0,
|
|
129
130
|
backPath: "datasets",
|
|
130
|
-
actions: /* @__PURE__ */
|
|
131
|
+
actions: /* @__PURE__ */ p("div", {
|
|
131
132
|
className: "flex items-center gap-2",
|
|
132
133
|
children: [
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ p(_, {
|
|
134
135
|
type: "button",
|
|
135
136
|
variant: "outline",
|
|
136
137
|
onClick: () => k(`datasets/${j.id}/edit`),
|
|
137
|
-
children: [/* @__PURE__ */
|
|
138
|
+
children: [/* @__PURE__ */ f(pe, { className: "size-4" }), "Edit"]
|
|
138
139
|
}),
|
|
139
|
-
|
|
140
|
+
Ue ? /* @__PURE__ */ f(_, {
|
|
140
141
|
type: "button",
|
|
141
|
-
onClick: () => void
|
|
142
|
+
onClick: () => void $(),
|
|
142
143
|
disabled: N,
|
|
143
144
|
children: N ? "Publishing…" : "Publish"
|
|
144
145
|
}) : null,
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ f(te, {
|
|
146
147
|
ariaLabel: `Actions for ${j.name}`,
|
|
147
148
|
entityName: j.name,
|
|
148
|
-
onDelete: () =>
|
|
149
|
+
onDelete: () => We(),
|
|
149
150
|
deleteLabel: "Archive dataset"
|
|
150
151
|
})
|
|
151
152
|
]
|
|
152
153
|
}),
|
|
153
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ p("div", {
|
|
154
155
|
className: "space-y-6",
|
|
155
156
|
children: [
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ p("div", {
|
|
157
158
|
className: "flex flex-wrap items-center gap-2",
|
|
158
159
|
children: [
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ f(l, { status: j.status }),
|
|
161
|
+
/* @__PURE__ */ f(l, {
|
|
161
162
|
status: j.accessLevel,
|
|
162
|
-
label:
|
|
163
|
+
label: u(j.accessLevel)
|
|
163
164
|
}),
|
|
164
|
-
j.lineageCaptured ? /* @__PURE__ */
|
|
165
|
+
j.lineageCaptured ? /* @__PURE__ */ f(g, {
|
|
165
166
|
variant: "secondary",
|
|
166
167
|
children: "Lineage captured"
|
|
167
168
|
}) : null,
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ p(g, {
|
|
169
170
|
variant: "secondary",
|
|
170
171
|
children: ["v", j.version]
|
|
171
172
|
})
|
|
172
173
|
]
|
|
173
174
|
}),
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ p("div", {
|
|
175
176
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",
|
|
176
177
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ f(D, {
|
|
178
179
|
label: "Source",
|
|
179
|
-
value: j.source ? /* @__PURE__ */
|
|
180
|
+
value: j.source ? /* @__PURE__ */ p("button", {
|
|
180
181
|
type: "button",
|
|
181
|
-
onClick: () => k(`sources/${j.source?.id}
|
|
182
|
+
onClick: () => k(`sources/${j.source?.id}`),
|
|
182
183
|
className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ f(me, {
|
|
184
185
|
className: "size-4 text-text-secondary",
|
|
185
186
|
"aria-hidden": "true"
|
|
186
187
|
}), j.source.name]
|
|
187
|
-
}) : /* @__PURE__ */
|
|
188
|
+
}) : /* @__PURE__ */ f("span", {
|
|
188
189
|
className: "text-text-secondary",
|
|
189
190
|
children: "Not linked"
|
|
190
191
|
})
|
|
191
192
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ f(D, {
|
|
193
194
|
label: "Collection",
|
|
194
|
-
value: j.collection ? /* @__PURE__ */
|
|
195
|
+
value: j.collection ? /* @__PURE__ */ p("button", {
|
|
195
196
|
type: "button",
|
|
196
197
|
onClick: () => k(`collections/${j.collection?.id}`),
|
|
197
198
|
className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ f(ce, {
|
|
199
200
|
className: "size-4 text-text-secondary",
|
|
200
201
|
"aria-hidden": "true"
|
|
201
202
|
}), j.collection.name]
|
|
202
|
-
}) : /* @__PURE__ */
|
|
203
|
+
}) : /* @__PURE__ */ f("span", {
|
|
203
204
|
className: "text-text-secondary",
|
|
204
205
|
children: "Not in a collection"
|
|
205
206
|
})
|
|
206
207
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ f(D, {
|
|
208
209
|
label: "Format",
|
|
209
|
-
value: /* @__PURE__ */
|
|
210
|
+
value: /* @__PURE__ */ f("span", { children: j.format || "Not specified" })
|
|
210
211
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ f(D, {
|
|
212
213
|
label: "Size",
|
|
213
|
-
value: /* @__PURE__ */
|
|
214
|
+
value: /* @__PURE__ */ p("span", {
|
|
214
215
|
className: "tabular-nums",
|
|
215
|
-
children: [
|
|
216
|
+
children: [ke(j.sizeBytes), Number(j.rowCount) > 0 ? /* @__PURE__ */ p("span", {
|
|
216
217
|
className: "text-text-secondary",
|
|
217
218
|
children: [
|
|
218
219
|
" ",
|
|
@@ -223,149 +224,168 @@ function O() {
|
|
|
223
224
|
}) : null]
|
|
224
225
|
})
|
|
225
226
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ f(D, {
|
|
227
228
|
label: "Ingested",
|
|
228
|
-
value: /* @__PURE__ */
|
|
229
|
+
value: /* @__PURE__ */ f("span", { children: E(j.ingestedAt) })
|
|
229
230
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ f(D, {
|
|
231
232
|
label: "Created",
|
|
232
|
-
value: /* @__PURE__ */
|
|
233
|
+
value: /* @__PURE__ */ f("span", { children: E(j.createdAt) })
|
|
233
234
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ f(D, {
|
|
235
236
|
label: "Updated",
|
|
236
|
-
value: /* @__PURE__ */
|
|
237
|
+
value: /* @__PURE__ */ f("span", { children: E(j.updatedAt) })
|
|
237
238
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ f(D, {
|
|
239
240
|
label: "Artifact",
|
|
240
|
-
value: j.file ? M ? /* @__PURE__ */
|
|
241
|
+
value: j.file ? M ? /* @__PURE__ */ p("a", {
|
|
241
242
|
href: M,
|
|
242
243
|
target: "_blank",
|
|
243
244
|
rel: "noopener noreferrer",
|
|
244
245
|
className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
|
|
245
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ f(ue, {
|
|
246
247
|
className: "size-4",
|
|
247
248
|
"aria-hidden": "true"
|
|
248
249
|
}), "Download file"]
|
|
249
|
-
}) : /* @__PURE__ */
|
|
250
|
+
}) : /* @__PURE__ */ f("span", {
|
|
250
251
|
className: "text-text-secondary",
|
|
251
252
|
children: "Resolving link…"
|
|
252
|
-
}) : /* @__PURE__ */
|
|
253
|
+
}) : /* @__PURE__ */ f("span", {
|
|
253
254
|
className: "text-text-secondary",
|
|
254
255
|
children: "No file attached"
|
|
255
256
|
})
|
|
256
257
|
})
|
|
257
258
|
]
|
|
258
259
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ p("section", {
|
|
260
261
|
className: "space-y-3",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ p("div", {
|
|
262
263
|
className: "flex items-center justify-between gap-3",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
264
|
+
children: [/* @__PURE__ */ p("div", {
|
|
264
265
|
className: "flex items-center gap-2",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ f(m, {
|
|
266
267
|
className: "size-5 text-text-secondary",
|
|
267
268
|
"aria-hidden": "true"
|
|
268
|
-
}), /* @__PURE__ */
|
|
269
|
+
}), /* @__PURE__ */ f("h2", {
|
|
269
270
|
className: "text-lg font-semibold text-text-primary",
|
|
270
271
|
children: "Schema fields"
|
|
271
272
|
})]
|
|
272
|
-
}), /* @__PURE__ */
|
|
273
|
+
}), /* @__PURE__ */ p(_, {
|
|
273
274
|
type: "button",
|
|
274
275
|
variant: "outline",
|
|
275
276
|
size: "sm",
|
|
276
277
|
onClick: () => Z(!0),
|
|
277
|
-
children: [/* @__PURE__ */
|
|
278
|
+
children: [/* @__PURE__ */ f(h, { className: "size-4" }), "Add field"]
|
|
278
279
|
})]
|
|
279
|
-
}), Q.length === 0 ? /* @__PURE__ */
|
|
280
|
-
icon:
|
|
280
|
+
}), Q.length === 0 ? /* @__PURE__ */ f(o, {
|
|
281
|
+
icon: m,
|
|
281
282
|
title: "No schema fields yet.",
|
|
282
283
|
description: "Describe the columns in this dataset so consumers know what each field means."
|
|
283
|
-
}) : /* @__PURE__ */
|
|
284
|
+
}) : /* @__PURE__ */ f("div", {
|
|
284
285
|
className: "rounded-card border border-border-default bg-bg-elevated",
|
|
285
|
-
children: /* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
] }) }), /* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ p(De, { children: [/* @__PURE__ */ f(S, { children: /* @__PURE__ */ p(C, { children: [
|
|
287
|
+
/* @__PURE__ */ f(x, { children: "Name" }),
|
|
288
|
+
/* @__PURE__ */ f(x, { children: "Type" }),
|
|
289
|
+
/* @__PURE__ */ f(x, { children: "Unit" }),
|
|
290
|
+
/* @__PURE__ */ f(x, { children: "Nullable" }),
|
|
291
|
+
/* @__PURE__ */ f(x, { children: "Provenance" })
|
|
292
|
+
] }) }), /* @__PURE__ */ f(Oe, { children: Q.map((e) => /* @__PURE__ */ p(C, { children: [
|
|
293
|
+
/* @__PURE__ */ p(b, { children: [/* @__PURE__ */ f("span", {
|
|
293
294
|
className: "font-medium text-text-primary",
|
|
294
295
|
children: e.name
|
|
295
|
-
}), e.description ? /* @__PURE__ */
|
|
296
|
+
}), e.description ? /* @__PURE__ */ f("p", {
|
|
296
297
|
className: "mt-0.5 line-clamp-1 max-w-xs text-xs text-text-secondary",
|
|
297
298
|
children: e.description
|
|
298
299
|
}) : null] }),
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ f(b, { children: /* @__PURE__ */ f(g, {
|
|
300
301
|
variant: "secondary",
|
|
301
|
-
children:
|
|
302
|
+
children: u(e.fieldType)
|
|
302
303
|
}) }),
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ f(b, {
|
|
304
305
|
className: "text-sm text-text-secondary",
|
|
305
306
|
children: e.unit || "—"
|
|
306
307
|
}),
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ f(b, {
|
|
308
309
|
className: "text-sm text-text-secondary",
|
|
309
310
|
children: e.nullable ? "Yes" : "No"
|
|
310
311
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ f(b, {
|
|
312
313
|
className: "text-sm text-text-secondary",
|
|
313
314
|
children: e.provenance || "—"
|
|
314
315
|
})
|
|
315
316
|
] }, e.id)) })] })
|
|
316
317
|
})]
|
|
317
318
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ p("section", {
|
|
319
320
|
className: "space-y-3 rounded-card border border-border-default bg-bg-elevated p-5",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ f(oe, {
|
|
321
322
|
value: I,
|
|
322
323
|
onChange: L,
|
|
323
324
|
label: "Dataset tags"
|
|
324
|
-
}),
|
|
325
|
+
}), ze ? /* @__PURE__ */ f("div", {
|
|
325
326
|
className: "flex justify-end",
|
|
326
|
-
children: /* @__PURE__ */
|
|
327
|
+
children: /* @__PURE__ */ f(_, {
|
|
327
328
|
type: "button",
|
|
328
329
|
size: "sm",
|
|
329
|
-
onClick: () => void
|
|
330
|
+
onClick: () => void Ge(),
|
|
330
331
|
disabled: P,
|
|
331
332
|
children: P ? "Saving…" : "Save tags"
|
|
332
333
|
})
|
|
333
334
|
}) : null]
|
|
334
335
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
className: "
|
|
337
|
-
children: [
|
|
338
|
-
|
|
339
|
-
|
|
336
|
+
/* @__PURE__ */ p("section", {
|
|
337
|
+
className: "space-y-3",
|
|
338
|
+
children: [/* @__PURE__ */ p("div", {
|
|
339
|
+
className: "flex items-center gap-2",
|
|
340
|
+
children: [/* @__PURE__ */ f(de, {
|
|
341
|
+
className: "size-5 text-text-secondary",
|
|
340
342
|
"aria-hidden": "true"
|
|
341
|
-
}),
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
]
|
|
343
|
+
}), /* @__PURE__ */ f("h2", {
|
|
344
|
+
className: "text-lg font-semibold text-text-primary",
|
|
345
|
+
children: "Activity"
|
|
346
|
+
})]
|
|
347
|
+
}), /* @__PURE__ */ f(ie, {
|
|
348
|
+
resourceId: j.id,
|
|
349
|
+
resourceType: "cosmicintersection-dataset"
|
|
350
|
+
})]
|
|
351
|
+
}),
|
|
352
|
+
/* @__PURE__ */ p("section", {
|
|
353
|
+
className: "space-y-3",
|
|
354
|
+
children: [/* @__PURE__ */ p("div", {
|
|
355
|
+
className: "flex items-center gap-2",
|
|
356
|
+
children: [/* @__PURE__ */ f(fe, {
|
|
357
|
+
className: "size-5 text-text-secondary",
|
|
358
|
+
"aria-hidden": "true"
|
|
359
|
+
}), /* @__PURE__ */ f("h2", {
|
|
360
|
+
className: "text-lg font-semibold text-text-primary",
|
|
361
|
+
children: "Discussion"
|
|
362
|
+
})]
|
|
363
|
+
}), /* @__PURE__ */ f(ae, {
|
|
364
|
+
entityType: "cosmicintersection-dataset",
|
|
365
|
+
entityId: j.id,
|
|
366
|
+
title: j.name,
|
|
367
|
+
widgetKey: "dataset-discussion"
|
|
368
|
+
})]
|
|
349
369
|
})
|
|
350
370
|
]
|
|
351
|
-
}), /* @__PURE__ */
|
|
352
|
-
open:
|
|
371
|
+
}), /* @__PURE__ */ f(ge, {
|
|
372
|
+
open: Be,
|
|
353
373
|
onOpenChange: Z,
|
|
354
|
-
children: /* @__PURE__ */
|
|
355
|
-
/* @__PURE__ */
|
|
374
|
+
children: /* @__PURE__ */ p(_e, { children: [
|
|
375
|
+
/* @__PURE__ */ p(be, { children: [/* @__PURE__ */ f(xe, { children: "Add schema field" }), /* @__PURE__ */ p(ve, { children: [
|
|
356
376
|
"Document a column in “",
|
|
357
377
|
j.name,
|
|
358
378
|
"” — its type, unit and provenance."
|
|
359
379
|
] })] }),
|
|
360
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ p("div", {
|
|
361
381
|
className: "space-y-4",
|
|
362
382
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ p("div", {
|
|
364
384
|
className: "space-y-1.5",
|
|
365
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ f(y, {
|
|
366
386
|
htmlFor: "cos-field-name",
|
|
367
387
|
children: "Name"
|
|
368
|
-
}), /* @__PURE__ */
|
|
388
|
+
}), /* @__PURE__ */ f(v, {
|
|
369
389
|
id: "cos-field-name",
|
|
370
390
|
value: z,
|
|
371
391
|
onChange: (e) => B(e.target.value),
|
|
@@ -373,31 +393,31 @@ function O() {
|
|
|
373
393
|
required: !0
|
|
374
394
|
})]
|
|
375
395
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ p("div", {
|
|
377
397
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
378
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ p("div", {
|
|
379
399
|
className: "space-y-1.5",
|
|
380
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ f(y, {
|
|
381
401
|
htmlFor: "cos-field-type",
|
|
382
402
|
children: "Type"
|
|
383
|
-
}), /* @__PURE__ */
|
|
403
|
+
}), /* @__PURE__ */ p(Se, {
|
|
384
404
|
value: V,
|
|
385
405
|
onValueChange: (e) => H(e),
|
|
386
|
-
children: [/* @__PURE__ */
|
|
406
|
+
children: [/* @__PURE__ */ f(Te, {
|
|
387
407
|
id: "cos-field-type",
|
|
388
408
|
"aria-label": "Field type",
|
|
389
|
-
children: /* @__PURE__ */
|
|
390
|
-
}), /* @__PURE__ */
|
|
409
|
+
children: /* @__PURE__ */ f(Ee, {})
|
|
410
|
+
}), /* @__PURE__ */ f(Ce, { children: T.map((e) => /* @__PURE__ */ f(we, {
|
|
391
411
|
value: e,
|
|
392
|
-
children:
|
|
412
|
+
children: u(e)
|
|
393
413
|
}, e)) })]
|
|
394
414
|
})]
|
|
395
|
-
}), /* @__PURE__ */
|
|
415
|
+
}), /* @__PURE__ */ p("div", {
|
|
396
416
|
className: "space-y-1.5",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ f(y, {
|
|
398
418
|
htmlFor: "cos-field-unit",
|
|
399
419
|
children: "Unit"
|
|
400
|
-
}), /* @__PURE__ */
|
|
420
|
+
}), /* @__PURE__ */ f(v, {
|
|
401
421
|
id: "cos-field-unit",
|
|
402
422
|
value: U,
|
|
403
423
|
onChange: (e) => W(e.target.value),
|
|
@@ -405,48 +425,48 @@ function O() {
|
|
|
405
425
|
})]
|
|
406
426
|
})]
|
|
407
427
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ p("div", {
|
|
409
429
|
className: "space-y-1.5",
|
|
410
|
-
children: [/* @__PURE__ */
|
|
430
|
+
children: [/* @__PURE__ */ f(y, {
|
|
411
431
|
htmlFor: "cos-field-desc",
|
|
412
432
|
children: "Description"
|
|
413
|
-
}), /* @__PURE__ */
|
|
433
|
+
}), /* @__PURE__ */ f(w, {
|
|
414
434
|
id: "cos-field-desc",
|
|
415
435
|
value: G,
|
|
416
436
|
onChange: (e) => K(e.target.value),
|
|
417
437
|
rows: 2
|
|
418
438
|
})]
|
|
419
439
|
}),
|
|
420
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ p("div", {
|
|
421
441
|
className: "space-y-1.5",
|
|
422
|
-
children: [/* @__PURE__ */
|
|
442
|
+
children: [/* @__PURE__ */ f(y, {
|
|
423
443
|
htmlFor: "cos-field-prov",
|
|
424
444
|
children: "Provenance"
|
|
425
|
-
}), /* @__PURE__ */
|
|
445
|
+
}), /* @__PURE__ */ f(v, {
|
|
426
446
|
id: "cos-field-prov",
|
|
427
447
|
value: q,
|
|
428
448
|
onChange: (e) => J(e.target.value),
|
|
429
449
|
placeholder: "Where this field comes from"
|
|
430
450
|
})]
|
|
431
451
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ p("label", {
|
|
433
453
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
434
|
-
children: [/* @__PURE__ */
|
|
454
|
+
children: [/* @__PURE__ */ f(he, {
|
|
435
455
|
checked: Y,
|
|
436
456
|
onCheckedChange: (e) => X(e === !0)
|
|
437
457
|
}), "Nullable (may contain empty values)"]
|
|
438
458
|
})
|
|
439
459
|
]
|
|
440
460
|
}),
|
|
441
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ p(ye, { children: [/* @__PURE__ */ f(_, {
|
|
442
462
|
type: "button",
|
|
443
463
|
variant: "outline",
|
|
444
464
|
onClick: () => Z(!1),
|
|
445
465
|
disabled: F,
|
|
446
466
|
children: "Cancel"
|
|
447
|
-
}), /* @__PURE__ */
|
|
467
|
+
}), /* @__PURE__ */ f(_, {
|
|
448
468
|
type: "button",
|
|
449
|
-
onClick: () => void
|
|
469
|
+
onClick: () => void Ke(),
|
|
450
470
|
disabled: F,
|
|
451
471
|
children: F ? "Adding…" : "Add field"
|
|
452
472
|
})] })
|