@burdenoff/microfe-cosmicintersection 2026.1107.1 → 2026.1108.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/api/cosmicApi.d.ts +208 -1
- package/dist/cosmicintersection/api/cosmicApi.d.ts.map +1 -1
- package/dist/cosmicintersection/api/cosmicApi.js +291 -107
- package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
- package/dist/cosmicintersection/components/AiRunAttribution.d.ts +18 -0
- package/dist/cosmicintersection/components/AiRunAttribution.d.ts.map +1 -0
- package/dist/cosmicintersection/components/AiRunAttribution.js +39 -0
- package/dist/cosmicintersection/components/AiRunAttribution.js.map +1 -0
- package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts +15 -0
- package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts.map +1 -0
- package/dist/cosmicintersection/components/ReleaseDraftDialog.js +193 -0
- package/dist/cosmicintersection/components/ReleaseDraftDialog.js.map +1 -0
- package/dist/cosmicintersection/components/RunTriageCard.d.ts +15 -0
- package/dist/cosmicintersection/components/RunTriageCard.d.ts.map +1 -0
- package/dist/cosmicintersection/components/RunTriageCard.js +282 -0
- package/dist/cosmicintersection/components/RunTriageCard.js.map +1 -0
- package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts +18 -0
- package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts.map +1 -0
- package/dist/cosmicintersection/components/SchemaProposalPanel.js +277 -0
- package/dist/cosmicintersection/components/SchemaProposalPanel.js.map +1 -0
- package/dist/cosmicintersection/components/index.d.ts +4 -0
- package/dist/cosmicintersection/components/index.d.ts.map +1 -1
- package/dist/cosmicintersection/components/index.js +5 -1
- package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/access/AccessPage.js +348 -326
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +732 -543
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +268 -119
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +322 -307
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +5 -2
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js +190 -185
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,28 +1,29 @@
|
|
|
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, useCosAnalysesQuery as r, useCosArchiveDatasetMutation as i, useCosDatasetQuery as ee, useCosNotebooksQuery as te, useCosPublishDatasetMutation as ne, useCosReleasesQuery as re,
|
|
4
|
-
import { ActionMenu as
|
|
3
|
+
import { useCosAddSchemaFieldMutation as n, useCosAnalysesQuery as r, useCosArchiveDatasetMutation as i, useCosDatasetQuery as ee, useCosNotebooksQuery as te, useCosPublishDatasetMutation as ne, useCosReleasesQuery as re, useCosRemoveSchemaFieldMutation as ie, useCosRunsQuery as ae, useCosUpdateDatasetMutation as oe, useCosUpdateSchemaFieldMutation as se } from "../../api/cosmicApi.js";
|
|
4
|
+
import { ActionMenu as ce } from "../../components/ActionMenu.js";
|
|
5
5
|
import { EmptyState as a } from "../../components/EmptyState.js";
|
|
6
|
-
import { ErrorState as
|
|
7
|
-
import { LoadingState as
|
|
8
|
-
import { ActivityFeedPanel as
|
|
9
|
-
import { DiscussionPanel as
|
|
10
|
-
import { WorkspaceTagsPicker as
|
|
11
|
-
import { useFileDownloadUrl as
|
|
12
|
-
import { PageLayout as
|
|
13
|
-
import { StatusBadge as
|
|
6
|
+
import { ErrorState as le } from "../../components/ErrorState.js";
|
|
7
|
+
import { LoadingState as ue } from "../../components/LoadingState.js";
|
|
8
|
+
import { ActivityFeedPanel as de } from "../../components/ActivityFeedPanel.js";
|
|
9
|
+
import { DiscussionPanel as fe } from "../../components/DiscussionPanel.js";
|
|
10
|
+
import { WorkspaceTagsPicker as pe } from "../../components/WorkspaceTagsPicker.js";
|
|
11
|
+
import { useFileDownloadUrl as me } from "../../components/FileUploadField.js";
|
|
12
|
+
import { PageLayout as o } from "../../components/PageLayout.js";
|
|
13
|
+
import { StatusBadge as he, formatEnumLabel as s } from "../../components/StatusBadge.js";
|
|
14
|
+
import { SchemaProposalPanel as ge } from "../../components/SchemaProposalPanel.js";
|
|
14
15
|
import "../../components/index.js";
|
|
15
|
-
import { useSelectedRecord as
|
|
16
|
-
import { useTrackRecentItem as
|
|
17
|
-
import { useEntityTagSync as
|
|
18
|
-
import { LineageGraph as
|
|
19
|
-
import { useMemo as
|
|
20
|
-
import { Fragment as
|
|
21
|
-
import { useParams as
|
|
22
|
-
import { ArrowRight as
|
|
23
|
-
import { Badge as
|
|
16
|
+
import { useSelectedRecord as _e } from "../../lib/useSelectedRecord.js";
|
|
17
|
+
import { useTrackRecentItem as ve } from "../../lib/useTrackRecentItem.js";
|
|
18
|
+
import { useEntityTagSync as ye } from "../../hooks/useEntityTagSync.js";
|
|
19
|
+
import { LineageGraph as be, buildDatasetLineage as xe } from "../../components/LineageGraph.js";
|
|
20
|
+
import { useMemo as Se, useState as c } from "react";
|
|
21
|
+
import { Fragment as Ce, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
22
|
+
import { useParams as we } from "react-router";
|
|
23
|
+
import { ArrowRight as Te, Boxes as Ee, Columns3 as De, Database as Oe, Download as ke, GitBranch as Ae, History as je, MessagesSquare as Me, Pencil as d, Plus as Ne, Radar as Pe, Share2 as Fe, Trash2 as Ie, TriangleAlert as f } from "lucide-react";
|
|
24
|
+
import { Badge as p, Button as m, Checkbox as Le, Dialog as h, DialogContent as g, DialogDescription as _, DialogFooter as v, DialogHeader as y, DialogTitle as b, Input as x, Label as S, Select as Re, SelectContent as ze, SelectItem as Be, SelectTrigger as Ve, SelectValue as He, Table as Ue, TableBody as We, TableCell as C, TableHead as w, TableHeader as Ge, TableRow as Ke, Textarea as qe } from "@burdenoff/fe-libs/ui";
|
|
24
25
|
//#region src/cosmicintersection/pages/datasets/DatasetDetailPage.tsx
|
|
25
|
-
var
|
|
26
|
+
var Je = [
|
|
26
27
|
"STRING",
|
|
27
28
|
"INTEGER",
|
|
28
29
|
"FLOAT",
|
|
@@ -33,15 +34,15 @@ var qe = [
|
|
|
33
34
|
"GEOMETRY",
|
|
34
35
|
"IMAGE_REF",
|
|
35
36
|
"JSON"
|
|
36
|
-
],
|
|
37
|
+
], T = /* @__PURE__ */ new Set([
|
|
37
38
|
"FLOAT",
|
|
38
39
|
"COORDINATE",
|
|
39
40
|
"SPECTRUM"
|
|
40
41
|
]);
|
|
41
|
-
function
|
|
42
|
-
return
|
|
42
|
+
function E(e) {
|
|
43
|
+
return T.has(e.fieldType) && !e.unit;
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function Ye(e) {
|
|
45
46
|
if (!e) return "—";
|
|
46
47
|
let t = Number(e);
|
|
47
48
|
if (!Number.isFinite(t) || t <= 0) return "—";
|
|
@@ -56,629 +57,817 @@ function Je(e) {
|
|
|
56
57
|
for (; r >= 1024 && i < n.length - 1;) r /= 1024, i += 1;
|
|
57
58
|
return `${r >= 10 || i === 0 ? Math.round(r) : r.toFixed(1)} ${n[i]}`;
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
+
function D(e) {
|
|
60
61
|
if (!e) return "—";
|
|
61
62
|
let t = new Date(e);
|
|
62
63
|
return Number.isNaN(t.getTime()) ? "—" : t.toLocaleString();
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
-
return /* @__PURE__ */
|
|
65
|
+
function O({ label: e, value: t }) {
|
|
66
|
+
return /* @__PURE__ */ u("div", {
|
|
66
67
|
className: "rounded-card border border-border-default bg-bg-elevated p-4",
|
|
67
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ l("p", {
|
|
68
69
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
69
70
|
children: e
|
|
70
|
-
}), /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ l("div", {
|
|
71
72
|
className: "mt-1 text-sm text-text-primary",
|
|
72
73
|
children: t
|
|
73
74
|
})]
|
|
74
75
|
});
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
let { id:
|
|
78
|
-
|
|
77
|
+
function k() {
|
|
78
|
+
let { id: T = "" } = we(), { navigate: k } = e(), { selectedId: A, select: Xe } = _e("field"), Ze = (e) => Xe(A === e ? null : e), { data: Qe, loading: $e, error: et, refetch: j } = ee(T), M = Qe?.cosDataset ?? null;
|
|
79
|
+
ve(M ? {
|
|
79
80
|
type: "dataset",
|
|
80
|
-
id:
|
|
81
|
-
name:
|
|
82
|
-
path: `datasets/${encodeURIComponent(
|
|
81
|
+
id: M.id,
|
|
82
|
+
name: M.name,
|
|
83
|
+
path: `datasets/${encodeURIComponent(M.id)}`
|
|
83
84
|
} : null);
|
|
84
|
-
let
|
|
85
|
+
let tt = me(M?.file?.id).data?.getFileDownloadUrl ?? null, [nt, { loading: rt }] = ne(), [it] = i(), [at, { loading: N }] = oe(), { syncTags: ot } = ye("COSMICINTERSECTION_DATASET"), [P, st] = c(!1), [ct, { loading: F }] = n(), [lt, { loading: I }] = se(), [ut, { loading: L }] = ie(), [R, z] = c(null), [B, dt] = c(""), [ft, pt] = c("STRING"), [mt, ht] = c(""), [gt, _t] = c(""), [vt, yt] = c(""), [bt, xt] = c(!0), [V, H] = c(null), St = (e) => {
|
|
86
|
+
z(e), dt(e.name), pt(e.fieldType), ht(e.unit ?? ""), _t(e.description ?? ""), yt(e.provenance ?? ""), xt(e.nullable);
|
|
87
|
+
}, Ct = async () => {
|
|
88
|
+
if (R) {
|
|
89
|
+
if (!B.trim()) {
|
|
90
|
+
t.error("Field name is required");
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
(await lt({ variables: {
|
|
94
|
+
id: R.id,
|
|
95
|
+
input: {
|
|
96
|
+
name: B.trim(),
|
|
97
|
+
fieldType: ft,
|
|
98
|
+
unit: mt.trim() || void 0,
|
|
99
|
+
description: gt.trim() || void 0,
|
|
100
|
+
provenance: vt.trim() || void 0,
|
|
101
|
+
nullable: bt
|
|
102
|
+
}
|
|
103
|
+
} })).data?.cosUpdateSchemaField && (t.success("Schema field updated"), z(null), await j());
|
|
104
|
+
}
|
|
105
|
+
}, wt = async () => {
|
|
106
|
+
V && (await ut({ variables: { id: V } })).data?.cosRemoveSchemaField && (t.success("Schema field removed"), H(null), await j());
|
|
107
|
+
}, U = r({ datasetId: T }), W = ae({ pagination: {
|
|
85
108
|
limit: 100,
|
|
86
109
|
offset: 0
|
|
87
|
-
} }),
|
|
110
|
+
} }), G = te({ pagination: {
|
|
88
111
|
limit: 100,
|
|
89
112
|
offset: 0
|
|
90
|
-
} }),
|
|
113
|
+
} }), K = re({ pagination: {
|
|
91
114
|
limit: 100,
|
|
92
115
|
offset: 0
|
|
93
|
-
} }),
|
|
94
|
-
if (!
|
|
116
|
+
} }), q = Qe?.cosDataset ?? null, J = Se(() => {
|
|
117
|
+
if (!q) return {
|
|
95
118
|
nodes: [],
|
|
96
119
|
edges: []
|
|
97
120
|
};
|
|
98
121
|
let e = /* @__PURE__ */ new Map();
|
|
99
|
-
|
|
122
|
+
q.source && e.set(q.source.id, q.source);
|
|
100
123
|
let t = /* @__PURE__ */ new Map();
|
|
101
|
-
|
|
124
|
+
q.collection && t.set(q.collection.id, q.collection);
|
|
102
125
|
let n = {
|
|
103
|
-
datasetsById: /* @__PURE__ */ new Map([[
|
|
126
|
+
datasetsById: /* @__PURE__ */ new Map([[q.id, q]]),
|
|
104
127
|
sourcesById: e,
|
|
105
128
|
collectionsById: t,
|
|
106
|
-
runs: (
|
|
107
|
-
notebooks: (
|
|
108
|
-
analyses:
|
|
109
|
-
releases: (
|
|
129
|
+
runs: (W.data?.cosListRuns?.items ?? []).filter((e) => e.datasetId === q.id),
|
|
130
|
+
notebooks: (G.data?.cosListNotebooks?.items ?? []).filter((e) => e.datasetIds.includes(q.id)),
|
|
131
|
+
analyses: U.data?.cosListAnalyses ?? [],
|
|
132
|
+
releases: (K.data?.cosListReleases?.items ?? []).filter((e) => e.datasetIds.includes(q.id))
|
|
110
133
|
};
|
|
111
|
-
return
|
|
134
|
+
return xe(q.id, n);
|
|
112
135
|
}, [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
]),
|
|
119
|
-
|
|
120
|
-
let
|
|
121
|
-
|
|
122
|
-
},
|
|
123
|
-
|
|
136
|
+
q,
|
|
137
|
+
W.data,
|
|
138
|
+
G.data,
|
|
139
|
+
U.data,
|
|
140
|
+
K.data
|
|
141
|
+
]), Tt = W.loading || G.loading || U.loading || K.loading, [Y, Et] = c([]), [Dt, Ot] = c(null), X = M ? `${M.id}:${M.updatedAt}` : null;
|
|
142
|
+
X && X !== Dt && (Ot(X), Et(M?.tags ?? []));
|
|
143
|
+
let kt = M != null && (Y.length !== M.tags.length || Y.some((e, t) => e !== M.tags[t])), [At, jt] = c(!1), [Z, Mt] = c(""), [Nt, Pt] = c("STRING"), [Ft, It] = c(""), [Lt, Rt] = c(""), [zt, Bt] = c(""), [Vt, Ht] = c(!0), Ut = () => {
|
|
144
|
+
Mt(""), Pt("STRING"), It(""), Rt(""), Bt(""), Ht(!0);
|
|
145
|
+
}, Q = (e) => {
|
|
146
|
+
jt(e), e || Ut();
|
|
124
147
|
};
|
|
125
|
-
if (
|
|
148
|
+
if ($e) return /* @__PURE__ */ l(o, {
|
|
126
149
|
title: "Dataset",
|
|
127
150
|
backPath: "datasets",
|
|
128
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ l(ue, { label: "Loading dataset…" })
|
|
129
152
|
});
|
|
130
|
-
if (
|
|
153
|
+
if (et) return /* @__PURE__ */ l(o, {
|
|
131
154
|
title: "Dataset",
|
|
132
155
|
backPath: "datasets",
|
|
133
|
-
children: /* @__PURE__ */
|
|
156
|
+
children: /* @__PURE__ */ l(le, {
|
|
134
157
|
message: "We could not load this dataset.",
|
|
135
|
-
onRetry: () => void
|
|
158
|
+
onRetry: () => void j()
|
|
136
159
|
})
|
|
137
160
|
});
|
|
138
|
-
if (!
|
|
161
|
+
if (!M) return /* @__PURE__ */ l(o, {
|
|
139
162
|
title: "Dataset",
|
|
140
163
|
backPath: "datasets",
|
|
141
|
-
children: /* @__PURE__ */
|
|
142
|
-
icon:
|
|
164
|
+
children: /* @__PURE__ */ l(a, {
|
|
165
|
+
icon: Oe,
|
|
143
166
|
title: "Dataset not found.",
|
|
144
167
|
description: "This dataset may have been removed or is outside your current scope.",
|
|
145
|
-
action: /* @__PURE__ */
|
|
168
|
+
action: /* @__PURE__ */ l(m, {
|
|
146
169
|
type: "button",
|
|
147
|
-
onClick: () =>
|
|
170
|
+
onClick: () => k("datasets"),
|
|
148
171
|
children: "Back to datasets"
|
|
149
172
|
})
|
|
150
173
|
})
|
|
151
174
|
});
|
|
152
|
-
let
|
|
153
|
-
(await
|
|
154
|
-
},
|
|
155
|
-
let e = await
|
|
175
|
+
let $ = [...M.schemaFields ?? []].sort((e, t) => e.position - t.position), Wt = $.filter(E).length, Gt = M.status !== "AVAILABLE" && M.status !== "ARCHIVED", Kt = async () => {
|
|
176
|
+
(await nt({ variables: { id: M.id } })).data?.cosPublishDataset && (t.success("Dataset published", `“${M.name}” is now available.`), await j());
|
|
177
|
+
}, qt = async () => {
|
|
178
|
+
let e = await it({ variables: { id: M.id } });
|
|
156
179
|
if (e.error) throw Error(e.error.message);
|
|
157
180
|
if (!e.data?.cosArchiveDataset) throw t.error("Could not archive dataset", "The server did not confirm the change."), Error("Archive not confirmed");
|
|
158
|
-
t.success("Dataset archived"),
|
|
159
|
-
},
|
|
160
|
-
if (
|
|
161
|
-
let e =
|
|
162
|
-
|
|
181
|
+
t.success("Dataset archived"), k("datasets");
|
|
182
|
+
}, Jt = async () => {
|
|
183
|
+
if (P) return;
|
|
184
|
+
let e = M.tags;
|
|
185
|
+
st(!0);
|
|
163
186
|
try {
|
|
164
|
-
(await
|
|
165
|
-
id:
|
|
166
|
-
input: { tags:
|
|
167
|
-
} })).data?.cosUpdateDataset && (await
|
|
187
|
+
(await at({ variables: {
|
|
188
|
+
id: M.id,
|
|
189
|
+
input: { tags: Y }
|
|
190
|
+
} })).data?.cosUpdateDataset && (await ot(M.id, Y, e) && t.success("Tags updated"), await j());
|
|
168
191
|
} finally {
|
|
169
|
-
|
|
192
|
+
st(!1);
|
|
170
193
|
}
|
|
171
|
-
},
|
|
172
|
-
if (!
|
|
194
|
+
}, Yt = async () => {
|
|
195
|
+
if (!Z.trim()) {
|
|
173
196
|
t.error("Field name is required");
|
|
174
197
|
return;
|
|
175
198
|
}
|
|
176
|
-
(await
|
|
177
|
-
datasetId:
|
|
178
|
-
name:
|
|
179
|
-
fieldType:
|
|
180
|
-
unit:
|
|
181
|
-
description:
|
|
182
|
-
provenance:
|
|
183
|
-
nullable:
|
|
184
|
-
} } })).data?.cosAddSchemaField && (t.success("Schema field added"),
|
|
199
|
+
(await ct({ variables: { input: {
|
|
200
|
+
datasetId: M.id,
|
|
201
|
+
name: Z.trim(),
|
|
202
|
+
fieldType: Nt,
|
|
203
|
+
unit: Ft.trim() || void 0,
|
|
204
|
+
description: Lt.trim() || void 0,
|
|
205
|
+
provenance: zt.trim() || void 0,
|
|
206
|
+
nullable: Vt
|
|
207
|
+
} } })).data?.cosAddSchemaField && (t.success("Schema field added"), Q(!1), await j());
|
|
185
208
|
};
|
|
186
|
-
return /* @__PURE__ */
|
|
187
|
-
title:
|
|
188
|
-
description:
|
|
209
|
+
return /* @__PURE__ */ u(o, {
|
|
210
|
+
title: M.name,
|
|
211
|
+
description: M.description ?? void 0,
|
|
189
212
|
backPath: "datasets",
|
|
190
|
-
actions: /* @__PURE__ */
|
|
213
|
+
actions: /* @__PURE__ */ u("div", {
|
|
191
214
|
className: "flex flex-wrap items-center justify-end gap-2",
|
|
192
215
|
children: [
|
|
193
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ u(m, {
|
|
194
217
|
type: "button",
|
|
195
218
|
variant: "outline",
|
|
196
|
-
onClick: () =>
|
|
197
|
-
children: [/* @__PURE__ */ d
|
|
219
|
+
onClick: () => k(`datasets/${M.id}/edit`),
|
|
220
|
+
children: [/* @__PURE__ */ l(d, { className: "size-4" }), "Edit"]
|
|
198
221
|
}),
|
|
199
|
-
|
|
222
|
+
Gt ? /* @__PURE__ */ l(m, {
|
|
200
223
|
type: "button",
|
|
201
|
-
onClick: () => void
|
|
202
|
-
disabled:
|
|
203
|
-
children:
|
|
224
|
+
onClick: () => void Kt(),
|
|
225
|
+
disabled: rt,
|
|
226
|
+
children: rt ? "Publishing…" : "Publish"
|
|
204
227
|
}) : null,
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
ariaLabel: `Actions for ${
|
|
207
|
-
entityName:
|
|
208
|
-
onDelete: () =>
|
|
228
|
+
/* @__PURE__ */ l(ce, {
|
|
229
|
+
ariaLabel: `Actions for ${M.name}`,
|
|
230
|
+
entityName: M.name,
|
|
231
|
+
onDelete: () => qt(),
|
|
209
232
|
deleteLabel: "Archive dataset"
|
|
210
233
|
})
|
|
211
234
|
]
|
|
212
235
|
}),
|
|
213
|
-
children: [
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
]
|
|
243
|
-
}),
|
|
244
|
-
/* @__PURE__ */ f("div", {
|
|
245
|
-
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",
|
|
246
|
-
children: [
|
|
247
|
-
/* @__PURE__ */ d(T, {
|
|
248
|
-
label: "Source",
|
|
249
|
-
value: j.source ? /* @__PURE__ */ f("button", {
|
|
250
|
-
type: "button",
|
|
251
|
-
onClick: () => E(`sources/${j.source?.id}`),
|
|
252
|
-
className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
|
|
253
|
-
children: [/* @__PURE__ */ d(ke, {
|
|
254
|
-
className: "size-4 text-text-secondary",
|
|
255
|
-
"aria-hidden": "true"
|
|
256
|
-
}), j.source.name]
|
|
257
|
-
}) : /* @__PURE__ */ d("span", {
|
|
258
|
-
className: "text-text-secondary",
|
|
259
|
-
children: "Not linked"
|
|
260
|
-
})
|
|
261
|
-
}),
|
|
262
|
-
/* @__PURE__ */ d(T, {
|
|
263
|
-
label: "Collection",
|
|
264
|
-
value: j.collection ? /* @__PURE__ */ f("button", {
|
|
265
|
-
type: "button",
|
|
266
|
-
onClick: () => E(`collections/${j.collection?.id}`),
|
|
267
|
-
className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
|
|
268
|
-
children: [/* @__PURE__ */ d(xe, {
|
|
269
|
-
className: "size-4 text-text-secondary",
|
|
270
|
-
"aria-hidden": "true"
|
|
271
|
-
}), j.collection.name]
|
|
272
|
-
}) : /* @__PURE__ */ d("span", {
|
|
273
|
-
className: "text-text-secondary",
|
|
274
|
-
children: "Not in a collection"
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ u("div", {
|
|
238
|
+
className: "space-y-6",
|
|
239
|
+
children: [
|
|
240
|
+
/* @__PURE__ */ u("div", {
|
|
241
|
+
className: "flex flex-wrap items-center gap-2",
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ l(he, { status: M.status }),
|
|
244
|
+
/* @__PURE__ */ l(he, {
|
|
245
|
+
status: M.accessLevel,
|
|
246
|
+
label: s(M.accessLevel)
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ u("span", {
|
|
249
|
+
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",
|
|
250
|
+
title: "Current dataset version",
|
|
251
|
+
children: [
|
|
252
|
+
/* @__PURE__ */ l(Ae, {
|
|
253
|
+
className: "size-3.5 text-text-tertiary",
|
|
254
|
+
"aria-hidden": "true"
|
|
255
|
+
}),
|
|
256
|
+
/* @__PURE__ */ u("span", {
|
|
257
|
+
className: "text-text-primary",
|
|
258
|
+
children: ["v", M.version]
|
|
259
|
+
}),
|
|
260
|
+
/* @__PURE__ */ l("span", {
|
|
261
|
+
className: "text-text-tertiary",
|
|
262
|
+
children: "· current"
|
|
263
|
+
})
|
|
264
|
+
]
|
|
275
265
|
})
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
266
|
+
]
|
|
267
|
+
}),
|
|
268
|
+
/* @__PURE__ */ u("div", {
|
|
269
|
+
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",
|
|
270
|
+
children: [
|
|
271
|
+
/* @__PURE__ */ l(O, {
|
|
272
|
+
label: "Source",
|
|
273
|
+
value: M.source ? /* @__PURE__ */ u("button", {
|
|
274
|
+
type: "button",
|
|
275
|
+
onClick: () => k(`sources/${M.source?.id}`),
|
|
276
|
+
className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
|
|
277
|
+
children: [/* @__PURE__ */ l(Pe, {
|
|
278
|
+
className: "size-4 text-text-secondary",
|
|
279
|
+
"aria-hidden": "true"
|
|
280
|
+
}), M.source.name]
|
|
281
|
+
}) : /* @__PURE__ */ l("span", {
|
|
286
282
|
className: "text-text-secondary",
|
|
287
|
-
children:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
283
|
+
children: "Not linked"
|
|
284
|
+
})
|
|
285
|
+
}),
|
|
286
|
+
/* @__PURE__ */ l(O, {
|
|
287
|
+
label: "Collection",
|
|
288
|
+
value: M.collection ? /* @__PURE__ */ u("button", {
|
|
289
|
+
type: "button",
|
|
290
|
+
onClick: () => k(`collections/${M.collection?.id}`),
|
|
291
|
+
className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
|
|
292
|
+
children: [/* @__PURE__ */ l(Ee, {
|
|
293
|
+
className: "size-4 text-text-secondary",
|
|
294
|
+
"aria-hidden": "true"
|
|
295
|
+
}), M.collection.name]
|
|
296
|
+
}) : /* @__PURE__ */ l("span", {
|
|
297
|
+
className: "text-text-secondary",
|
|
298
|
+
children: "Not in a collection"
|
|
299
|
+
})
|
|
300
|
+
}),
|
|
301
|
+
/* @__PURE__ */ l(O, {
|
|
302
|
+
label: "Format",
|
|
303
|
+
value: /* @__PURE__ */ l("span", { children: M.format || "Not specified" })
|
|
304
|
+
}),
|
|
305
|
+
/* @__PURE__ */ l(O, {
|
|
306
|
+
label: "Size",
|
|
307
|
+
value: /* @__PURE__ */ u("span", {
|
|
308
|
+
className: "tabular-nums",
|
|
309
|
+
children: [Ye(M.sizeBytes), Number(M.rowCount) > 0 ? /* @__PURE__ */ u("span", {
|
|
310
|
+
className: "text-text-secondary",
|
|
311
|
+
children: [
|
|
312
|
+
" ",
|
|
313
|
+
"· ",
|
|
314
|
+
Number(M.rowCount).toLocaleString(),
|
|
315
|
+
" rows"
|
|
316
|
+
]
|
|
317
|
+
}) : null]
|
|
318
|
+
})
|
|
319
|
+
}),
|
|
320
|
+
/* @__PURE__ */ l(O, {
|
|
321
|
+
label: "Ingested",
|
|
322
|
+
value: /* @__PURE__ */ l("span", { children: D(M.ingestedAt) })
|
|
323
|
+
}),
|
|
324
|
+
/* @__PURE__ */ l(O, {
|
|
325
|
+
label: "Created",
|
|
326
|
+
value: /* @__PURE__ */ l("span", { children: D(M.createdAt) })
|
|
327
|
+
}),
|
|
328
|
+
/* @__PURE__ */ l(O, {
|
|
329
|
+
label: "Updated",
|
|
330
|
+
value: /* @__PURE__ */ l("span", { children: D(M.updatedAt) })
|
|
331
|
+
}),
|
|
332
|
+
/* @__PURE__ */ l(O, {
|
|
333
|
+
label: "Artifact",
|
|
334
|
+
value: M.file ? tt ? /* @__PURE__ */ u("a", {
|
|
335
|
+
href: tt,
|
|
336
|
+
target: "_blank",
|
|
337
|
+
rel: "noopener noreferrer",
|
|
338
|
+
className: "inline-flex items-center gap-1.5 text-text-primary underline-offset-2 hover:underline",
|
|
339
|
+
children: [/* @__PURE__ */ l(ke, {
|
|
340
|
+
className: "size-4",
|
|
341
|
+
"aria-hidden": "true"
|
|
342
|
+
}), "Download file"]
|
|
343
|
+
}) : /* @__PURE__ */ l("span", {
|
|
344
|
+
className: "text-text-secondary",
|
|
345
|
+
children: "Resolving link…"
|
|
346
|
+
}) : /* @__PURE__ */ l("span", {
|
|
347
|
+
className: "text-text-secondary",
|
|
348
|
+
children: "No file attached"
|
|
349
|
+
})
|
|
294
350
|
})
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
children: [/* @__PURE__ */ d(Ce, {
|
|
351
|
+
]
|
|
352
|
+
}),
|
|
353
|
+
/* @__PURE__ */ u("section", {
|
|
354
|
+
className: "space-y-3",
|
|
355
|
+
children: [/* @__PURE__ */ u("div", {
|
|
356
|
+
className: "flex items-center justify-between gap-3",
|
|
357
|
+
children: [/* @__PURE__ */ u("div", {
|
|
358
|
+
className: "flex items-center gap-2",
|
|
359
|
+
children: [/* @__PURE__ */ l(Fe, {
|
|
360
|
+
className: "size-5 text-text-secondary",
|
|
361
|
+
"aria-hidden": "true"
|
|
362
|
+
}), /* @__PURE__ */ l("h2", {
|
|
363
|
+
className: "text-lg font-semibold text-text-primary",
|
|
364
|
+
children: "Lineage"
|
|
365
|
+
})]
|
|
366
|
+
}), /* @__PURE__ */ u("button", {
|
|
367
|
+
type: "button",
|
|
368
|
+
onClick: () => k(`lineage/${M.id}`),
|
|
369
|
+
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",
|
|
370
|
+
children: ["View full lineage", /* @__PURE__ */ l(Te, {
|
|
316
371
|
className: "size-4",
|
|
317
372
|
"aria-hidden": "true"
|
|
318
|
-
})
|
|
319
|
-
}) : /* @__PURE__ */ d("span", {
|
|
320
|
-
className: "text-text-secondary",
|
|
321
|
-
children: "Resolving link…"
|
|
322
|
-
}) : /* @__PURE__ */ d("span", {
|
|
323
|
-
className: "text-text-secondary",
|
|
324
|
-
children: "No file attached"
|
|
325
|
-
})
|
|
326
|
-
})
|
|
327
|
-
]
|
|
328
|
-
}),
|
|
329
|
-
/* @__PURE__ */ f("section", {
|
|
330
|
-
className: "space-y-3",
|
|
331
|
-
children: [/* @__PURE__ */ f("div", {
|
|
332
|
-
className: "flex items-center justify-between gap-3",
|
|
333
|
-
children: [/* @__PURE__ */ f("div", {
|
|
334
|
-
className: "flex items-center gap-2",
|
|
335
|
-
children: [/* @__PURE__ */ d(Ae, {
|
|
336
|
-
className: "size-5 text-text-secondary",
|
|
337
|
-
"aria-hidden": "true"
|
|
338
|
-
}), /* @__PURE__ */ d("h2", {
|
|
339
|
-
className: "text-lg font-semibold text-text-primary",
|
|
340
|
-
children: "Lineage"
|
|
341
|
-
})]
|
|
342
|
-
}), /* @__PURE__ */ f("button", {
|
|
343
|
-
type: "button",
|
|
344
|
-
onClick: () => E(`lineage/${j.id}`),
|
|
345
|
-
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",
|
|
346
|
-
children: ["View full lineage", /* @__PURE__ */ d(be, {
|
|
347
|
-
className: "size-4",
|
|
348
|
-
"aria-hidden": "true"
|
|
373
|
+
})]
|
|
349
374
|
})]
|
|
375
|
+
}), Tt && J.nodes.length <= 1 ? /* @__PURE__ */ l(ue, { label: "Building lineage…" }) : J.nodes.length <= 1 ? /* @__PURE__ */ l("div", {
|
|
376
|
+
className: "rounded-card border border-dashed border-border-default bg-bg-sunken p-6 text-sm text-text-secondary",
|
|
377
|
+
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."
|
|
378
|
+
}) : /* @__PURE__ */ l(be, {
|
|
379
|
+
model: J,
|
|
380
|
+
mode: "compact",
|
|
381
|
+
onNavigate: k
|
|
350
382
|
})]
|
|
351
|
-
}),
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}),
|
|
360
|
-
/* @__PURE__ */ f("section", {
|
|
361
|
-
className: "space-y-3",
|
|
362
|
-
children: [/* @__PURE__ */ f("div", {
|
|
363
|
-
className: "flex items-center justify-between gap-3",
|
|
364
|
-
children: [/* @__PURE__ */ f("div", {
|
|
365
|
-
className: "flex flex-wrap items-center gap-2",
|
|
366
|
-
children: [
|
|
367
|
-
/* @__PURE__ */ d(p, {
|
|
368
|
-
className: "size-5 text-text-secondary",
|
|
369
|
-
"aria-hidden": "true"
|
|
370
|
-
}),
|
|
371
|
-
/* @__PURE__ */ d("h2", {
|
|
372
|
-
className: "text-lg font-semibold text-text-primary",
|
|
373
|
-
children: "Schema fields"
|
|
374
|
-
}),
|
|
375
|
-
Q.length > 0 ? /* @__PURE__ */ d(h, {
|
|
376
|
-
variant: "secondary",
|
|
377
|
-
className: "text-xs",
|
|
378
|
-
children: Q.length
|
|
379
|
-
}) : null,
|
|
380
|
-
$ > 0 ? /* @__PURE__ */ f(h, {
|
|
381
|
-
variant: "outline",
|
|
382
|
-
className: "gap-1 border-status-warning-border bg-status-warning-bg-subtle text-xs text-status-warning-text",
|
|
383
|
+
}),
|
|
384
|
+
/* @__PURE__ */ u("section", {
|
|
385
|
+
className: "space-y-3",
|
|
386
|
+
children: [
|
|
387
|
+
/* @__PURE__ */ u("div", {
|
|
388
|
+
className: "flex items-center justify-between gap-3",
|
|
389
|
+
children: [/* @__PURE__ */ u("div", {
|
|
390
|
+
className: "flex flex-wrap items-center gap-2",
|
|
383
391
|
children: [
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
className: "size-
|
|
392
|
+
/* @__PURE__ */ l(De, {
|
|
393
|
+
className: "size-5 text-text-secondary",
|
|
386
394
|
"aria-hidden": "true"
|
|
387
395
|
}),
|
|
388
|
-
|
|
389
|
-
|
|
396
|
+
/* @__PURE__ */ l("h2", {
|
|
397
|
+
className: "text-lg font-semibold text-text-primary",
|
|
398
|
+
children: "Schema fields"
|
|
399
|
+
}),
|
|
400
|
+
$.length > 0 ? /* @__PURE__ */ l(p, {
|
|
401
|
+
variant: "secondary",
|
|
402
|
+
className: "text-xs",
|
|
403
|
+
children: $.length
|
|
404
|
+
}) : null,
|
|
405
|
+
Wt > 0 ? /* @__PURE__ */ u(p, {
|
|
406
|
+
variant: "outline",
|
|
407
|
+
className: "gap-1 border-status-warning-border bg-status-warning-bg-subtle text-xs text-status-warning-text",
|
|
408
|
+
children: [
|
|
409
|
+
/* @__PURE__ */ l(f, {
|
|
410
|
+
className: "size-3",
|
|
411
|
+
"aria-hidden": "true"
|
|
412
|
+
}),
|
|
413
|
+
Wt,
|
|
414
|
+
" missing a unit"
|
|
415
|
+
]
|
|
416
|
+
}) : null
|
|
390
417
|
]
|
|
391
|
-
})
|
|
392
|
-
]
|
|
393
|
-
}), /* @__PURE__ */ f(g, {
|
|
394
|
-
type: "button",
|
|
395
|
-
variant: "outline",
|
|
396
|
-
size: "sm",
|
|
397
|
-
onClick: () => Z(!0),
|
|
398
|
-
children: [/* @__PURE__ */ d(Oe, { className: "size-4" }), "Add field"]
|
|
399
|
-
})]
|
|
400
|
-
}), Q.length === 0 ? /* @__PURE__ */ d(a, {
|
|
401
|
-
icon: p,
|
|
402
|
-
title: "No schema fields yet.",
|
|
403
|
-
description: "Describe the columns in this dataset so consumers know what each field means."
|
|
404
|
-
}) : /* @__PURE__ */ f(ve, { children: [/* @__PURE__ */ d("div", {
|
|
405
|
-
className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
|
|
406
|
-
children: /* @__PURE__ */ f(Ue, { children: [/* @__PURE__ */ d(Ge, { children: /* @__PURE__ */ f(x, { children: [
|
|
407
|
-
/* @__PURE__ */ d(b, {
|
|
408
|
-
className: "w-10 text-right",
|
|
409
|
-
children: "#"
|
|
410
|
-
}),
|
|
411
|
-
/* @__PURE__ */ d(b, { children: "Name" }),
|
|
412
|
-
/* @__PURE__ */ d(b, { children: "Type" }),
|
|
413
|
-
/* @__PURE__ */ d(b, { children: "Unit" }),
|
|
414
|
-
/* @__PURE__ */ d(b, { children: "Nullable" }),
|
|
415
|
-
/* @__PURE__ */ d(b, { children: "Provenance" })
|
|
416
|
-
] }) }), /* @__PURE__ */ d(We, { children: Q.map((e, t) => /* @__PURE__ */ f(x, {
|
|
417
|
-
"aria-selected": D === e.id,
|
|
418
|
-
"data-state": D === e.id ? "selected" : void 0,
|
|
419
|
-
className: D === e.id ? "bg-bg-sunken" : void 0,
|
|
420
|
-
children: [
|
|
421
|
-
/* @__PURE__ */ d(y, {
|
|
422
|
-
className: "text-right text-xs tabular-nums text-text-tertiary",
|
|
423
|
-
children: t + 1
|
|
424
|
-
}),
|
|
425
|
-
/* @__PURE__ */ f(y, { children: [/* @__PURE__ */ d("button", {
|
|
418
|
+
}), /* @__PURE__ */ u(m, {
|
|
426
419
|
type: "button",
|
|
427
|
-
|
|
428
|
-
"
|
|
429
|
-
|
|
430
|
-
children:
|
|
431
|
-
})
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
}),
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
})
|
|
458
|
-
]
|
|
459
|
-
}, e.id)) })] })
|
|
460
|
-
}), /* @__PURE__ */ d("div", {
|
|
461
|
-
className: "space-y-2 md:hidden",
|
|
462
|
-
children: Q.map((e) => /* @__PURE__ */ f("div", {
|
|
463
|
-
"aria-current": D === e.id ? "true" : void 0,
|
|
464
|
-
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",
|
|
465
|
-
children: [
|
|
466
|
-
/* @__PURE__ */ f("div", {
|
|
467
|
-
className: "flex items-start justify-between gap-2",
|
|
468
|
-
children: [/* @__PURE__ */ d("button", {
|
|
469
|
-
type: "button",
|
|
470
|
-
onClick: () => O(e.id),
|
|
471
|
-
"aria-pressed": D === e.id,
|
|
472
|
-
className: "text-left font-medium text-text-primary underline-offset-2 hover:underline",
|
|
473
|
-
children: e.name
|
|
474
|
-
}), /* @__PURE__ */ d(h, {
|
|
475
|
-
variant: "secondary",
|
|
476
|
-
children: l(e.fieldType)
|
|
477
|
-
})]
|
|
478
|
-
}),
|
|
479
|
-
e.description ? /* @__PURE__ */ d("p", {
|
|
480
|
-
className: "mt-1 text-xs text-text-secondary",
|
|
481
|
-
children: e.description
|
|
482
|
-
}) : null,
|
|
483
|
-
/* @__PURE__ */ f("dl", {
|
|
484
|
-
className: "mt-2 grid grid-cols-2 gap-2 text-xs",
|
|
420
|
+
variant: "outline",
|
|
421
|
+
size: "sm",
|
|
422
|
+
onClick: () => Q(!0),
|
|
423
|
+
children: [/* @__PURE__ */ l(Ne, { className: "size-4" }), "Add field"]
|
|
424
|
+
})]
|
|
425
|
+
}),
|
|
426
|
+
$.length === 0 ? /* @__PURE__ */ l(a, {
|
|
427
|
+
icon: De,
|
|
428
|
+
title: "No schema fields yet.",
|
|
429
|
+
description: "Describe the columns in this dataset so consumers know what each field means."
|
|
430
|
+
}) : /* @__PURE__ */ u(Ce, { children: [/* @__PURE__ */ l("div", {
|
|
431
|
+
className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
|
|
432
|
+
children: /* @__PURE__ */ u(Ue, { children: [/* @__PURE__ */ l(Ge, { children: /* @__PURE__ */ u(Ke, { children: [
|
|
433
|
+
/* @__PURE__ */ l(w, {
|
|
434
|
+
className: "w-10 text-right",
|
|
435
|
+
children: "#"
|
|
436
|
+
}),
|
|
437
|
+
/* @__PURE__ */ l(w, { children: "Name" }),
|
|
438
|
+
/* @__PURE__ */ l(w, { children: "Type" }),
|
|
439
|
+
/* @__PURE__ */ l(w, { children: "Unit" }),
|
|
440
|
+
/* @__PURE__ */ l(w, { children: "Nullable" }),
|
|
441
|
+
/* @__PURE__ */ l(w, { children: "Provenance" }),
|
|
442
|
+
/* @__PURE__ */ l(w, {
|
|
443
|
+
className: "w-20 text-right",
|
|
444
|
+
children: "Actions"
|
|
445
|
+
})
|
|
446
|
+
] }) }), /* @__PURE__ */ l(We, { children: $.map((e, t) => /* @__PURE__ */ u(Ke, {
|
|
447
|
+
"aria-selected": A === e.id,
|
|
448
|
+
"data-state": A === e.id ? "selected" : void 0,
|
|
449
|
+
className: A === e.id ? "bg-bg-sunken" : void 0,
|
|
485
450
|
children: [
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
className: "text-text-tertiary",
|
|
488
|
-
children:
|
|
489
|
-
}),
|
|
490
|
-
|
|
491
|
-
|
|
451
|
+
/* @__PURE__ */ l(C, {
|
|
452
|
+
className: "text-right text-xs tabular-nums text-text-tertiary",
|
|
453
|
+
children: t + 1
|
|
454
|
+
}),
|
|
455
|
+
/* @__PURE__ */ u(C, { children: [/* @__PURE__ */ l("button", {
|
|
456
|
+
type: "button",
|
|
457
|
+
onClick: () => Ze(e.id),
|
|
458
|
+
"aria-pressed": A === e.id,
|
|
459
|
+
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",
|
|
460
|
+
children: e.name
|
|
461
|
+
}), e.description ? /* @__PURE__ */ l("p", {
|
|
462
|
+
className: "mt-0.5 line-clamp-1 max-w-xs text-xs text-text-secondary",
|
|
463
|
+
children: e.description
|
|
464
|
+
}) : null] }),
|
|
465
|
+
/* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(p, {
|
|
466
|
+
variant: "secondary",
|
|
467
|
+
children: s(e.fieldType)
|
|
468
|
+
}) }),
|
|
469
|
+
/* @__PURE__ */ l(C, {
|
|
470
|
+
className: "text-sm text-text-secondary",
|
|
471
|
+
children: e.unit ? e.unit : E(e) ? /* @__PURE__ */ u("span", {
|
|
492
472
|
className: "inline-flex items-center gap-1 text-status-warning-text",
|
|
493
|
-
|
|
494
|
-
|
|
473
|
+
title: `${s(e.fieldType)} fields carry a measured quantity — record the unit so consumers can interpret the values.`,
|
|
474
|
+
children: [/* @__PURE__ */ l(f, {
|
|
475
|
+
className: "size-3.5",
|
|
495
476
|
"aria-hidden": "true"
|
|
496
477
|
}), "Not set"]
|
|
497
478
|
}) : "—"
|
|
498
|
-
})
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
-
className: "text-text-
|
|
501
|
-
children: "Nullable"
|
|
502
|
-
}), /* @__PURE__ */ d("dd", {
|
|
503
|
-
className: "text-text-secondary",
|
|
479
|
+
}),
|
|
480
|
+
/* @__PURE__ */ l(C, {
|
|
481
|
+
className: "text-sm text-text-secondary",
|
|
504
482
|
children: e.nullable ? "Yes" : "No"
|
|
505
|
-
})
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
className: "
|
|
508
|
-
children:
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
483
|
+
}),
|
|
484
|
+
/* @__PURE__ */ l(C, {
|
|
485
|
+
className: "text-sm text-text-secondary",
|
|
486
|
+
children: e.provenance || "—"
|
|
487
|
+
}),
|
|
488
|
+
/* @__PURE__ */ l(C, { children: /* @__PURE__ */ u("div", {
|
|
489
|
+
className: "flex justify-end gap-1",
|
|
490
|
+
children: [/* @__PURE__ */ l(m, {
|
|
491
|
+
type: "button",
|
|
492
|
+
variant: "outline",
|
|
493
|
+
size: "sm",
|
|
494
|
+
"aria-label": `Edit field ${e.name}`,
|
|
495
|
+
onClick: () => St(e),
|
|
496
|
+
children: /* @__PURE__ */ l(d, { className: "size-4" })
|
|
497
|
+
}), /* @__PURE__ */ l(m, {
|
|
498
|
+
type: "button",
|
|
499
|
+
variant: "outline",
|
|
500
|
+
size: "sm",
|
|
501
|
+
"aria-label": `Remove field ${e.name}`,
|
|
502
|
+
onClick: () => H(e.id),
|
|
503
|
+
children: /* @__PURE__ */ l(Ie, { className: "size-4" })
|
|
504
|
+
})]
|
|
505
|
+
}) })
|
|
506
|
+
]
|
|
507
|
+
}, e.id)) })] })
|
|
508
|
+
}), /* @__PURE__ */ l("div", {
|
|
509
|
+
className: "space-y-2 md:hidden",
|
|
510
|
+
children: $.map((e) => /* @__PURE__ */ u("div", {
|
|
511
|
+
"aria-current": A === e.id ? "true" : void 0,
|
|
512
|
+
className: A === e.id ? "rounded-card border border-border-focus bg-bg-sunken p-3" : "rounded-card border border-border-default bg-bg-elevated p-3",
|
|
513
|
+
children: [
|
|
514
|
+
/* @__PURE__ */ u("div", {
|
|
515
|
+
className: "flex items-start justify-between gap-2",
|
|
516
|
+
children: [/* @__PURE__ */ l("button", {
|
|
517
|
+
type: "button",
|
|
518
|
+
onClick: () => Ze(e.id),
|
|
519
|
+
"aria-pressed": A === e.id,
|
|
520
|
+
className: "text-left font-medium text-text-primary underline-offset-2 hover:underline",
|
|
521
|
+
children: e.name
|
|
522
|
+
}), /* @__PURE__ */ l(p, {
|
|
523
|
+
variant: "secondary",
|
|
524
|
+
children: s(e.fieldType)
|
|
525
|
+
})]
|
|
526
|
+
}),
|
|
527
|
+
e.description ? /* @__PURE__ */ l("p", {
|
|
528
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
529
|
+
children: e.description
|
|
530
|
+
}) : null,
|
|
531
|
+
/* @__PURE__ */ u("dl", {
|
|
532
|
+
className: "mt-2 grid grid-cols-2 gap-2 text-xs",
|
|
533
|
+
children: [
|
|
534
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("dt", {
|
|
535
|
+
className: "text-text-tertiary",
|
|
536
|
+
children: "Unit"
|
|
537
|
+
}), /* @__PURE__ */ l("dd", {
|
|
538
|
+
className: "text-text-secondary",
|
|
539
|
+
children: e.unit ? e.unit : E(e) ? /* @__PURE__ */ u("span", {
|
|
540
|
+
className: "inline-flex items-center gap-1 text-status-warning-text",
|
|
541
|
+
children: [/* @__PURE__ */ l(f, {
|
|
542
|
+
className: "size-3",
|
|
543
|
+
"aria-hidden": "true"
|
|
544
|
+
}), "Not set"]
|
|
545
|
+
}) : "—"
|
|
546
|
+
})] }),
|
|
547
|
+
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("dt", {
|
|
548
|
+
className: "text-text-tertiary",
|
|
549
|
+
children: "Nullable"
|
|
550
|
+
}), /* @__PURE__ */ l("dd", {
|
|
551
|
+
className: "text-text-secondary",
|
|
552
|
+
children: e.nullable ? "Yes" : "No"
|
|
553
|
+
})] }),
|
|
554
|
+
/* @__PURE__ */ u("div", {
|
|
555
|
+
className: "col-span-2",
|
|
556
|
+
children: [/* @__PURE__ */ l("dt", {
|
|
557
|
+
className: "text-text-tertiary",
|
|
558
|
+
children: "Provenance"
|
|
559
|
+
}), /* @__PURE__ */ l("dd", {
|
|
560
|
+
className: "text-text-secondary",
|
|
561
|
+
children: e.provenance || "—"
|
|
562
|
+
})]
|
|
563
|
+
})
|
|
564
|
+
]
|
|
565
|
+
}),
|
|
566
|
+
/* @__PURE__ */ u("div", {
|
|
567
|
+
className: "mt-2 flex gap-1",
|
|
568
|
+
children: [/* @__PURE__ */ l(m, {
|
|
569
|
+
type: "button",
|
|
570
|
+
variant: "outline",
|
|
571
|
+
size: "sm",
|
|
572
|
+
"aria-label": `Edit field ${e.name}`,
|
|
573
|
+
onClick: () => St(e),
|
|
574
|
+
children: /* @__PURE__ */ l(d, { className: "size-4" })
|
|
575
|
+
}), /* @__PURE__ */ l(m, {
|
|
576
|
+
type: "button",
|
|
577
|
+
variant: "outline",
|
|
578
|
+
size: "sm",
|
|
579
|
+
"aria-label": `Remove field ${e.name}`,
|
|
580
|
+
onClick: () => H(e.id),
|
|
581
|
+
children: /* @__PURE__ */ l(Ie, { className: "size-4" })
|
|
514
582
|
})]
|
|
515
583
|
})
|
|
516
584
|
]
|
|
517
|
-
})
|
|
518
|
-
]
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
"
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
className: "space-y-3",
|
|
558
|
-
children: [/* @__PURE__ */ f("div", {
|
|
559
|
-
className: "flex items-center gap-2",
|
|
560
|
-
children: [/* @__PURE__ */ d(Ee, {
|
|
561
|
-
className: "size-5 text-text-secondary",
|
|
562
|
-
"aria-hidden": "true"
|
|
563
|
-
}), /* @__PURE__ */ d("h2", {
|
|
564
|
-
className: "text-lg font-semibold text-text-primary",
|
|
565
|
-
children: "Discussion"
|
|
585
|
+
}, e.id))
|
|
586
|
+
})] }),
|
|
587
|
+
/* @__PURE__ */ l(ge, {
|
|
588
|
+
datasetId: M.id,
|
|
589
|
+
onAccepted: () => void j()
|
|
590
|
+
})
|
|
591
|
+
]
|
|
592
|
+
}),
|
|
593
|
+
/* @__PURE__ */ u("section", {
|
|
594
|
+
className: "space-y-3 rounded-card border border-border-default bg-bg-elevated p-5",
|
|
595
|
+
children: [/* @__PURE__ */ l(pe, {
|
|
596
|
+
value: Y,
|
|
597
|
+
onChange: Et,
|
|
598
|
+
label: "Dataset tags",
|
|
599
|
+
disabled: N || P
|
|
600
|
+
}), kt ? /* @__PURE__ */ l("div", {
|
|
601
|
+
className: "flex justify-end",
|
|
602
|
+
children: /* @__PURE__ */ l(m, {
|
|
603
|
+
type: "button",
|
|
604
|
+
size: "sm",
|
|
605
|
+
onClick: () => void Jt(),
|
|
606
|
+
disabled: N || P,
|
|
607
|
+
children: N || P ? "Saving…" : "Save tags"
|
|
608
|
+
})
|
|
609
|
+
}) : null]
|
|
610
|
+
}),
|
|
611
|
+
/* @__PURE__ */ u("section", {
|
|
612
|
+
className: "space-y-3",
|
|
613
|
+
children: [/* @__PURE__ */ u("div", {
|
|
614
|
+
className: "flex items-center gap-2",
|
|
615
|
+
children: [/* @__PURE__ */ l(je, {
|
|
616
|
+
className: "size-5 text-text-secondary",
|
|
617
|
+
"aria-hidden": "true"
|
|
618
|
+
}), /* @__PURE__ */ l("h2", {
|
|
619
|
+
className: "text-lg font-semibold text-text-primary",
|
|
620
|
+
children: "Activity"
|
|
621
|
+
})]
|
|
622
|
+
}), /* @__PURE__ */ l(de, {
|
|
623
|
+
resourceId: M.id,
|
|
624
|
+
resourceType: "cosmicintersection-dataset"
|
|
566
625
|
})]
|
|
567
|
-
}),
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
children: /* @__PURE__ */ f(Ne, { children: [
|
|
579
|
-
/* @__PURE__ */ f(Ie, { children: [/* @__PURE__ */ d(Le, { children: "Add schema field" }), /* @__PURE__ */ f(Pe, { children: [
|
|
580
|
-
"Document a column in “",
|
|
581
|
-
j.name,
|
|
582
|
-
"” — its type, unit and provenance."
|
|
583
|
-
] })] }),
|
|
584
|
-
/* @__PURE__ */ f("div", {
|
|
585
|
-
className: "space-y-4",
|
|
586
|
-
children: [
|
|
587
|
-
/* @__PURE__ */ f("div", {
|
|
588
|
-
className: "space-y-1.5",
|
|
589
|
-
children: [/* @__PURE__ */ d(v, {
|
|
590
|
-
htmlFor: "cos-field-name",
|
|
591
|
-
children: "Name"
|
|
592
|
-
}), /* @__PURE__ */ d(_, {
|
|
593
|
-
id: "cos-field-name",
|
|
594
|
-
value: q,
|
|
595
|
-
onChange: (e) => J(e.target.value),
|
|
596
|
-
placeholder: "e.g. right_ascension",
|
|
597
|
-
required: !0
|
|
626
|
+
}),
|
|
627
|
+
/* @__PURE__ */ u("section", {
|
|
628
|
+
className: "space-y-3",
|
|
629
|
+
children: [/* @__PURE__ */ u("div", {
|
|
630
|
+
className: "flex items-center gap-2",
|
|
631
|
+
children: [/* @__PURE__ */ l(Me, {
|
|
632
|
+
className: "size-5 text-text-secondary",
|
|
633
|
+
"aria-hidden": "true"
|
|
634
|
+
}), /* @__PURE__ */ l("h2", {
|
|
635
|
+
className: "text-lg font-semibold text-text-primary",
|
|
636
|
+
children: "Discussion"
|
|
598
637
|
})]
|
|
599
|
-
}),
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
638
|
+
}), /* @__PURE__ */ l(fe, {
|
|
639
|
+
entityType: "cosmicintersection-dataset",
|
|
640
|
+
entityId: M.id,
|
|
641
|
+
title: M.name,
|
|
642
|
+
widgetKey: "dataset-discussion"
|
|
643
|
+
})]
|
|
644
|
+
})
|
|
645
|
+
]
|
|
646
|
+
}),
|
|
647
|
+
/* @__PURE__ */ l(h, {
|
|
648
|
+
open: At,
|
|
649
|
+
onOpenChange: Q,
|
|
650
|
+
children: /* @__PURE__ */ u(g, { children: [
|
|
651
|
+
/* @__PURE__ */ u(y, { children: [/* @__PURE__ */ l(b, { children: "Add schema field" }), /* @__PURE__ */ u(_, { children: [
|
|
652
|
+
"Document a column in “",
|
|
653
|
+
M.name,
|
|
654
|
+
"” — its type, unit and provenance."
|
|
655
|
+
] })] }),
|
|
656
|
+
/* @__PURE__ */ u("div", {
|
|
657
|
+
className: "space-y-4",
|
|
658
|
+
children: [
|
|
659
|
+
/* @__PURE__ */ u("div", {
|
|
603
660
|
className: "space-y-1.5",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
605
|
-
htmlFor: "cos-field-
|
|
606
|
-
children: "
|
|
607
|
-
}), /* @__PURE__ */
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
children: /* @__PURE__ */ d(He, {})
|
|
614
|
-
}), /* @__PURE__ */ d(ze, { children: qe.map((e) => /* @__PURE__ */ d(Be, {
|
|
615
|
-
value: e,
|
|
616
|
-
children: l(e)
|
|
617
|
-
}, e)) })]
|
|
661
|
+
children: [/* @__PURE__ */ l(S, {
|
|
662
|
+
htmlFor: "cos-field-name",
|
|
663
|
+
children: "Name"
|
|
664
|
+
}), /* @__PURE__ */ l(x, {
|
|
665
|
+
id: "cos-field-name",
|
|
666
|
+
value: Z,
|
|
667
|
+
onChange: (e) => Mt(e.target.value),
|
|
668
|
+
placeholder: "e.g. right_ascension",
|
|
669
|
+
required: !0
|
|
618
670
|
})]
|
|
619
|
-
}),
|
|
671
|
+
}),
|
|
672
|
+
/* @__PURE__ */ u("div", {
|
|
673
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
674
|
+
children: [/* @__PURE__ */ u("div", {
|
|
675
|
+
className: "space-y-1.5",
|
|
676
|
+
children: [/* @__PURE__ */ l(S, {
|
|
677
|
+
htmlFor: "cos-field-type",
|
|
678
|
+
children: "Type"
|
|
679
|
+
}), /* @__PURE__ */ u(Re, {
|
|
680
|
+
value: Nt,
|
|
681
|
+
onValueChange: (e) => Pt(e),
|
|
682
|
+
children: [/* @__PURE__ */ l(Ve, {
|
|
683
|
+
id: "cos-field-type",
|
|
684
|
+
"aria-label": "Field type",
|
|
685
|
+
children: /* @__PURE__ */ l(He, {})
|
|
686
|
+
}), /* @__PURE__ */ l(ze, { children: Je.map((e) => /* @__PURE__ */ l(Be, {
|
|
687
|
+
value: e,
|
|
688
|
+
children: s(e)
|
|
689
|
+
}, e)) })]
|
|
690
|
+
})]
|
|
691
|
+
}), /* @__PURE__ */ u("div", {
|
|
692
|
+
className: "space-y-1.5",
|
|
693
|
+
children: [/* @__PURE__ */ l(S, {
|
|
694
|
+
htmlFor: "cos-field-unit",
|
|
695
|
+
children: "Unit"
|
|
696
|
+
}), /* @__PURE__ */ l(x, {
|
|
697
|
+
id: "cos-field-unit",
|
|
698
|
+
value: Ft,
|
|
699
|
+
onChange: (e) => It(e.target.value),
|
|
700
|
+
placeholder: "e.g. deg, mag, Jy"
|
|
701
|
+
})]
|
|
702
|
+
})]
|
|
703
|
+
}),
|
|
704
|
+
/* @__PURE__ */ u("div", {
|
|
620
705
|
className: "space-y-1.5",
|
|
621
|
-
children: [/* @__PURE__ */
|
|
622
|
-
htmlFor: "cos-field-
|
|
623
|
-
children: "
|
|
624
|
-
}), /* @__PURE__ */
|
|
625
|
-
id: "cos-field-
|
|
626
|
-
value:
|
|
627
|
-
onChange: (e) =>
|
|
628
|
-
|
|
706
|
+
children: [/* @__PURE__ */ l(S, {
|
|
707
|
+
htmlFor: "cos-field-desc",
|
|
708
|
+
children: "Description"
|
|
709
|
+
}), /* @__PURE__ */ l(qe, {
|
|
710
|
+
id: "cos-field-desc",
|
|
711
|
+
value: Lt,
|
|
712
|
+
onChange: (e) => Rt(e.target.value),
|
|
713
|
+
rows: 2
|
|
629
714
|
})]
|
|
630
|
-
})
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
})
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
})
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
]
|
|
664
|
-
})
|
|
665
|
-
|
|
715
|
+
}),
|
|
716
|
+
/* @__PURE__ */ u("div", {
|
|
717
|
+
className: "space-y-1.5",
|
|
718
|
+
children: [/* @__PURE__ */ l(S, {
|
|
719
|
+
htmlFor: "cos-field-prov",
|
|
720
|
+
children: "Provenance"
|
|
721
|
+
}), /* @__PURE__ */ l(x, {
|
|
722
|
+
id: "cos-field-prov",
|
|
723
|
+
value: zt,
|
|
724
|
+
onChange: (e) => Bt(e.target.value),
|
|
725
|
+
placeholder: "Where this field comes from"
|
|
726
|
+
})]
|
|
727
|
+
}),
|
|
728
|
+
/* @__PURE__ */ u("label", {
|
|
729
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
730
|
+
children: [/* @__PURE__ */ l(Le, {
|
|
731
|
+
checked: Vt,
|
|
732
|
+
onCheckedChange: (e) => Ht(e === !0)
|
|
733
|
+
}), "Nullable (may contain empty values)"]
|
|
734
|
+
})
|
|
735
|
+
]
|
|
736
|
+
}),
|
|
737
|
+
/* @__PURE__ */ u(v, { children: [/* @__PURE__ */ l(m, {
|
|
738
|
+
type: "button",
|
|
739
|
+
variant: "outline",
|
|
740
|
+
onClick: () => Q(!1),
|
|
741
|
+
disabled: F,
|
|
742
|
+
children: "Cancel"
|
|
743
|
+
}), /* @__PURE__ */ l(m, {
|
|
744
|
+
type: "button",
|
|
745
|
+
onClick: () => void Yt(),
|
|
746
|
+
disabled: F,
|
|
747
|
+
children: F ? "Adding…" : "Add field"
|
|
748
|
+
})] })
|
|
749
|
+
] })
|
|
750
|
+
}),
|
|
751
|
+
/* @__PURE__ */ l(h, {
|
|
752
|
+
open: R != null,
|
|
753
|
+
onOpenChange: (e) => !e && z(null),
|
|
754
|
+
children: /* @__PURE__ */ u(g, { children: [
|
|
755
|
+
/* @__PURE__ */ u(y, { children: [/* @__PURE__ */ l(b, { children: "Edit schema field" }), /* @__PURE__ */ l(_, { children: "Correct the column documentation. The change is recorded against the dataset’s schema immediately." })] }),
|
|
756
|
+
/* @__PURE__ */ u("div", {
|
|
757
|
+
className: "space-y-4",
|
|
758
|
+
children: [
|
|
759
|
+
/* @__PURE__ */ u("div", {
|
|
760
|
+
className: "space-y-1.5",
|
|
761
|
+
children: [/* @__PURE__ */ l(S, {
|
|
762
|
+
htmlFor: "cos-edit-field-name",
|
|
763
|
+
children: "Name"
|
|
764
|
+
}), /* @__PURE__ */ l(x, {
|
|
765
|
+
id: "cos-edit-field-name",
|
|
766
|
+
value: B,
|
|
767
|
+
onChange: (e) => dt(e.target.value),
|
|
768
|
+
required: !0
|
|
769
|
+
})]
|
|
770
|
+
}),
|
|
771
|
+
/* @__PURE__ */ u("div", {
|
|
772
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
773
|
+
children: [/* @__PURE__ */ u("div", {
|
|
774
|
+
className: "space-y-1.5",
|
|
775
|
+
children: [/* @__PURE__ */ l(S, {
|
|
776
|
+
htmlFor: "cos-edit-field-type",
|
|
777
|
+
children: "Type"
|
|
778
|
+
}), /* @__PURE__ */ u(Re, {
|
|
779
|
+
value: ft,
|
|
780
|
+
onValueChange: (e) => pt(e),
|
|
781
|
+
children: [/* @__PURE__ */ l(Ve, {
|
|
782
|
+
id: "cos-edit-field-type",
|
|
783
|
+
"aria-label": "Field type",
|
|
784
|
+
children: /* @__PURE__ */ l(He, {})
|
|
785
|
+
}), /* @__PURE__ */ l(ze, { children: Je.map((e) => /* @__PURE__ */ l(Be, {
|
|
786
|
+
value: e,
|
|
787
|
+
children: s(e)
|
|
788
|
+
}, e)) })]
|
|
789
|
+
})]
|
|
790
|
+
}), /* @__PURE__ */ u("div", {
|
|
791
|
+
className: "space-y-1.5",
|
|
792
|
+
children: [/* @__PURE__ */ l(S, {
|
|
793
|
+
htmlFor: "cos-edit-field-unit",
|
|
794
|
+
children: "Unit"
|
|
795
|
+
}), /* @__PURE__ */ l(x, {
|
|
796
|
+
id: "cos-edit-field-unit",
|
|
797
|
+
value: mt,
|
|
798
|
+
onChange: (e) => ht(e.target.value),
|
|
799
|
+
placeholder: "e.g. deg, mag, Jy"
|
|
800
|
+
})]
|
|
801
|
+
})]
|
|
802
|
+
}),
|
|
803
|
+
/* @__PURE__ */ u("div", {
|
|
804
|
+
className: "space-y-1.5",
|
|
805
|
+
children: [/* @__PURE__ */ l(S, {
|
|
806
|
+
htmlFor: "cos-edit-field-desc",
|
|
807
|
+
children: "Description"
|
|
808
|
+
}), /* @__PURE__ */ l(qe, {
|
|
809
|
+
id: "cos-edit-field-desc",
|
|
810
|
+
value: gt,
|
|
811
|
+
onChange: (e) => _t(e.target.value),
|
|
812
|
+
rows: 2
|
|
813
|
+
})]
|
|
814
|
+
}),
|
|
815
|
+
/* @__PURE__ */ u("div", {
|
|
816
|
+
className: "space-y-1.5",
|
|
817
|
+
children: [/* @__PURE__ */ l(S, {
|
|
818
|
+
htmlFor: "cos-edit-field-prov",
|
|
819
|
+
children: "Provenance"
|
|
820
|
+
}), /* @__PURE__ */ l(x, {
|
|
821
|
+
id: "cos-edit-field-prov",
|
|
822
|
+
value: vt,
|
|
823
|
+
onChange: (e) => yt(e.target.value),
|
|
824
|
+
placeholder: "Where this field comes from"
|
|
825
|
+
})]
|
|
826
|
+
}),
|
|
827
|
+
/* @__PURE__ */ u("label", {
|
|
828
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
829
|
+
children: [/* @__PURE__ */ l(Le, {
|
|
830
|
+
checked: bt,
|
|
831
|
+
onCheckedChange: (e) => xt(e === !0)
|
|
832
|
+
}), "Nullable (may contain empty values)"]
|
|
833
|
+
})
|
|
834
|
+
]
|
|
835
|
+
}),
|
|
836
|
+
/* @__PURE__ */ u(v, { children: [/* @__PURE__ */ l(m, {
|
|
837
|
+
type: "button",
|
|
838
|
+
variant: "outline",
|
|
839
|
+
onClick: () => z(null),
|
|
840
|
+
disabled: I,
|
|
841
|
+
children: "Cancel"
|
|
842
|
+
}), /* @__PURE__ */ l(m, {
|
|
843
|
+
type: "button",
|
|
844
|
+
onClick: () => void Ct(),
|
|
845
|
+
disabled: I,
|
|
846
|
+
children: I ? "Saving…" : "Save changes"
|
|
847
|
+
})] })
|
|
848
|
+
] })
|
|
849
|
+
}),
|
|
850
|
+
/* @__PURE__ */ l(h, {
|
|
851
|
+
open: V != null,
|
|
852
|
+
onOpenChange: (e) => !e && H(null),
|
|
853
|
+
children: /* @__PURE__ */ u(g, { children: [/* @__PURE__ */ u(y, { children: [/* @__PURE__ */ l(b, { children: "Remove schema field?" }), /* @__PURE__ */ l(_, { children: "The field is removed from this dataset’s schema. This is the revert half of the review loop — use it when a wrongly accepted proposal needs undoing." })] }), /* @__PURE__ */ u(v, { children: [/* @__PURE__ */ l(m, {
|
|
666
854
|
type: "button",
|
|
667
855
|
variant: "outline",
|
|
668
|
-
onClick: () =>
|
|
856
|
+
onClick: () => H(null),
|
|
669
857
|
disabled: L,
|
|
670
858
|
children: "Cancel"
|
|
671
|
-
}), /* @__PURE__ */
|
|
859
|
+
}), /* @__PURE__ */ l(m, {
|
|
672
860
|
type: "button",
|
|
673
|
-
|
|
861
|
+
variant: "destructive",
|
|
862
|
+
onClick: () => void wt(),
|
|
674
863
|
disabled: L,
|
|
675
|
-
children: L ? "
|
|
676
|
-
})] })
|
|
677
|
-
|
|
678
|
-
|
|
864
|
+
children: L ? "Removing…" : "Remove field"
|
|
865
|
+
})] })] })
|
|
866
|
+
})
|
|
867
|
+
]
|
|
679
868
|
});
|
|
680
869
|
}
|
|
681
870
|
//#endregion
|
|
682
|
-
export {
|
|
871
|
+
export { k as default };
|
|
683
872
|
|
|
684
873
|
//# sourceMappingURL=DatasetDetailPage.js.map
|