@burdenoff/microfe-cosmicintersection 2026.704.1 → 2026.704.3
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 +45 -25
- package/dist/cosmicintersection/CosmicIntersectionRoutes.js.map +1 -1
- package/dist/cosmicintersection/api/cosmicApi.js +137 -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/FacetPanel.js +66 -0
- package/dist/cosmicintersection/components/FacetPanel.js.map +1 -0
- package/dist/cosmicintersection/components/LineageGraph.js +388 -0
- package/dist/cosmicintersection/components/LineageGraph.js.map +1 -0
- package/dist/cosmicintersection/components/ResultsChart.js +329 -0
- package/dist/cosmicintersection/components/ResultsChart.js.map +1 -0
- package/dist/cosmicintersection/components/StepDAG.js +104 -0
- package/dist/cosmicintersection/components/StepDAG.js.map +1 -0
- package/dist/cosmicintersection/components/index.js +5 -3
- package/dist/cosmicintersection/pages/access/AccessPage.js +220 -161
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +332 -172
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +167 -109
- 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 +31 -18
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +330 -184
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.js +7 -7
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js +321 -163
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +358 -0
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -0
- package/dist/cosmicintersection/pages/lineage/LineagePage.js +171 -0
- package/dist/cosmicintersection/pages/lineage/LineagePage.js.map +1 -0
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +339 -260
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js +143 -82
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js +286 -142
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js +305 -103
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js +183 -79
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +346 -204
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js +184 -136
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunsPage.js +182 -120
- package/dist/cosmicintersection/pages/runs/RunsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +234 -0
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js.map +1 -0
- package/dist/cosmicintersection/pages/sources/SourcesPage.js +250 -133
- package/dist/cosmicintersection/pages/sources/SourcesPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { notify as e } from "../../lib/toast.js";
|
|
2
2
|
import { useCosAccessGrantsQuery as t, useCosDatasetsQuery as n, useCosGrantAccessMutation as r, useCosRevokeAccessMutation as ee } from "../../api/cosmicApi.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
3
|
+
import i from "../../components/ActionMenu.js";
|
|
4
|
+
import a from "../../components/EmptyState.js";
|
|
5
|
+
import te from "../../components/ErrorState.js";
|
|
6
|
+
import ne from "../../components/LoadingState.js";
|
|
7
|
+
import re from "../../components/EntityTagsField.js";
|
|
8
|
+
import ie from "../../components/PageLayout.js";
|
|
9
|
+
import o, { formatEnumLabel as s } from "../../components/StatusBadge.js";
|
|
10
10
|
import "../../components/index.js";
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { KeyRound as
|
|
14
|
-
import { Badge as
|
|
11
|
+
import { useMemo as c, useState as l } from "react";
|
|
12
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
13
|
+
import { KeyRound as p, ShieldCheck as ae } from "lucide-react";
|
|
14
|
+
import { Badge as m, Button as h, Dialog as oe, DialogContent as se, DialogDescription as g, DialogFooter as _, DialogHeader as v, DialogTitle as y, Input as b, Label as x, Select as S, SelectContent as C, SelectItem as w, SelectTrigger as T, SelectValue as E, Table as ce, TableBody as le, TableCell as D, TableHead as O, TableHeader as ue, TableRow as k, Textarea as de } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
//#region src/cosmicintersection/pages/access/AccessPage.tsx
|
|
16
|
-
var
|
|
16
|
+
var A = "ALL", j = [
|
|
17
17
|
"PENDING",
|
|
18
18
|
"ACTIVE",
|
|
19
19
|
"EXPIRED",
|
|
20
20
|
"REVOKED"
|
|
21
21
|
];
|
|
22
|
-
function
|
|
22
|
+
function M(e) {
|
|
23
23
|
return e === "ACTIVE" || e === "PENDING";
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function N(e) {
|
|
26
26
|
if (!e) return "—";
|
|
27
27
|
let t = new Date(e);
|
|
28
28
|
return Number.isNaN(t.getTime()) ? "—" : t.toLocaleDateString(void 0, {
|
|
@@ -31,285 +31,344 @@ function P(e) {
|
|
|
31
31
|
day: "numeric"
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var P = {
|
|
35
35
|
datasetId: "",
|
|
36
36
|
granteeId: "",
|
|
37
37
|
scopes: [],
|
|
38
38
|
reason: "",
|
|
39
39
|
expiresAt: ""
|
|
40
40
|
};
|
|
41
|
-
function
|
|
42
|
-
let [
|
|
41
|
+
function F() {
|
|
42
|
+
let [F, I] = l(A), [L, R] = l(A), z = n({ pagination: {
|
|
43
43
|
limit: 50,
|
|
44
44
|
offset: 0
|
|
45
|
-
} }),
|
|
45
|
+
} }), B = c(() => z.data?.cosListDatasets.items ?? [], [z.data]), V = c(() => {
|
|
46
46
|
let e = /* @__PURE__ */ new Map();
|
|
47
|
-
for (let t of
|
|
47
|
+
for (let t of B) e.set(t.id, t.name);
|
|
48
48
|
return e;
|
|
49
|
-
}, [
|
|
50
|
-
datasetId:
|
|
51
|
-
status:
|
|
52
|
-
}),
|
|
53
|
-
|
|
54
|
-
...
|
|
55
|
-
datasetId:
|
|
56
|
-
}),
|
|
57
|
-
},
|
|
58
|
-
|
|
49
|
+
}, [B]), { data: H, loading: fe, error: U, refetch: W } = t({
|
|
50
|
+
datasetId: F === A ? void 0 : F,
|
|
51
|
+
status: L === A ? void 0 : L
|
|
52
|
+
}), G = c(() => H?.cosListAccessGrants ?? [], [H]), [pe, { loading: K }] = r(), [me] = ee(), [he, q] = l(!1), [J, Y] = l(P), ge = () => {
|
|
53
|
+
Y({
|
|
54
|
+
...P,
|
|
55
|
+
datasetId: F === A ? "" : F
|
|
56
|
+
}), q(!0);
|
|
57
|
+
}, X = (e, t) => {
|
|
58
|
+
Y((n) => ({
|
|
59
59
|
...n,
|
|
60
60
|
[e]: t
|
|
61
61
|
}));
|
|
62
|
-
},
|
|
63
|
-
if (!
|
|
62
|
+
}, _e = async () => {
|
|
63
|
+
if (!J.datasetId) {
|
|
64
64
|
e.error("Dataset is required", "Choose which dataset this grant applies to.");
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
if (!
|
|
67
|
+
if (!J.granteeId.trim()) {
|
|
68
68
|
e.error("Grantee is required", "Enter the workspace User ID to grant access to.");
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
let t;
|
|
72
|
-
if (
|
|
73
|
-
let n = new Date(
|
|
72
|
+
if (J.expiresAt) {
|
|
73
|
+
let n = new Date(J.expiresAt);
|
|
74
74
|
if (Number.isNaN(n.getTime())) {
|
|
75
75
|
e.error("Invalid expiry", "Enter a valid expiry date or leave it blank.");
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
t = n.toISOString();
|
|
79
79
|
}
|
|
80
|
-
(await
|
|
81
|
-
datasetId:
|
|
82
|
-
granteeId:
|
|
83
|
-
scopes:
|
|
84
|
-
reason:
|
|
80
|
+
(await pe({ variables: { input: {
|
|
81
|
+
datasetId: J.datasetId,
|
|
82
|
+
granteeId: J.granteeId.trim(),
|
|
83
|
+
scopes: J.scopes.length ? J.scopes : void 0,
|
|
84
|
+
reason: J.reason.trim() || void 0,
|
|
85
85
|
expiresAt: t
|
|
86
|
-
} } })).data?.cosGrantAccess?.id && (e.success("Access granted"),
|
|
87
|
-
},
|
|
88
|
-
let n = await
|
|
86
|
+
} } })).data?.cosGrantAccess?.id && (e.success("Access granted"), q(!1), Y(P), await W());
|
|
87
|
+
}, Z = async (t) => {
|
|
88
|
+
let n = await me({ variables: { id: t.id } });
|
|
89
89
|
if (n.error) throw Error(n.error.message);
|
|
90
90
|
if (!n.data?.cosRevokeAccess?.id) throw e.error("Could not revoke grant", "The server did not confirm the change."), Error("Revoke not confirmed");
|
|
91
|
-
e.success("Access revoked"), await
|
|
92
|
-
}, Q = /* @__PURE__ */
|
|
91
|
+
e.success("Access revoked"), await W();
|
|
92
|
+
}, Q = /* @__PURE__ */ f(h, {
|
|
93
93
|
type: "button",
|
|
94
|
-
onClick:
|
|
95
|
-
children: [/* @__PURE__ */
|
|
96
|
-
}), $ =
|
|
97
|
-
return /* @__PURE__ */
|
|
94
|
+
onClick: ge,
|
|
95
|
+
children: [/* @__PURE__ */ d(p, { className: "size-4" }), "Grant access"]
|
|
96
|
+
}), $ = F === A;
|
|
97
|
+
return /* @__PURE__ */ f(ie, {
|
|
98
98
|
title: "Data access",
|
|
99
99
|
description: "Govern who can reach restricted and embargoed datasets, with scoped, expiring grants.",
|
|
100
100
|
actions: Q,
|
|
101
|
-
children: [/* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ f("div", {
|
|
102
102
|
className: "space-y-4",
|
|
103
|
-
children: [/* @__PURE__ */
|
|
103
|
+
children: [/* @__PURE__ */ f("div", {
|
|
104
104
|
className: "flex flex-wrap items-center gap-3",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ d("div", {
|
|
106
106
|
className: "w-full max-w-[18rem]",
|
|
107
|
-
children: /* @__PURE__ */
|
|
108
|
-
value:
|
|
109
|
-
onValueChange:
|
|
110
|
-
children: [/* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ f(S, {
|
|
108
|
+
value: F,
|
|
109
|
+
onValueChange: I,
|
|
110
|
+
children: [/* @__PURE__ */ d(T, {
|
|
111
111
|
"aria-label": "Filter by dataset",
|
|
112
|
-
children: /* @__PURE__ */
|
|
113
|
-
}), /* @__PURE__ */
|
|
114
|
-
value:
|
|
112
|
+
children: /* @__PURE__ */ d(E, { placeholder: "All datasets" })
|
|
113
|
+
}), /* @__PURE__ */ f(C, { children: [/* @__PURE__ */ d(w, {
|
|
114
|
+
value: A,
|
|
115
115
|
children: "All datasets"
|
|
116
|
-
}),
|
|
116
|
+
}), B.map((e) => /* @__PURE__ */ d(w, {
|
|
117
117
|
value: e.id,
|
|
118
118
|
children: e.name
|
|
119
119
|
}, e.id))] })]
|
|
120
120
|
})
|
|
121
|
-
}), /* @__PURE__ */
|
|
121
|
+
}), /* @__PURE__ */ d("div", {
|
|
122
122
|
className: "w-full max-w-[14rem]",
|
|
123
|
-
children: /* @__PURE__ */
|
|
124
|
-
value:
|
|
125
|
-
onValueChange:
|
|
126
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ f(S, {
|
|
124
|
+
value: L,
|
|
125
|
+
onValueChange: R,
|
|
126
|
+
children: [/* @__PURE__ */ d(T, {
|
|
127
127
|
"aria-label": "Filter by status",
|
|
128
|
-
children: /* @__PURE__ */
|
|
129
|
-
}), /* @__PURE__ */
|
|
130
|
-
value:
|
|
128
|
+
children: /* @__PURE__ */ d(E, { placeholder: "All statuses" })
|
|
129
|
+
}), /* @__PURE__ */ f(C, { children: [/* @__PURE__ */ d(w, {
|
|
130
|
+
value: A,
|
|
131
131
|
children: "All statuses"
|
|
132
|
-
}),
|
|
132
|
+
}), j.map((e) => /* @__PURE__ */ d(w, {
|
|
133
133
|
value: e,
|
|
134
|
-
children:
|
|
134
|
+
children: s(e)
|
|
135
135
|
}, e))] })]
|
|
136
136
|
})
|
|
137
137
|
})]
|
|
138
138
|
}), (() => {
|
|
139
|
-
if (
|
|
139
|
+
if (fe) return /* @__PURE__ */ d(ne, {
|
|
140
140
|
variant: "rows",
|
|
141
141
|
rows: 6,
|
|
142
142
|
label: "Loading access grants…"
|
|
143
143
|
});
|
|
144
|
-
if (
|
|
145
|
-
message:
|
|
146
|
-
onRetry: () => void
|
|
144
|
+
if (U) return /* @__PURE__ */ d(te, {
|
|
145
|
+
message: U.message,
|
|
146
|
+
onRetry: () => void W()
|
|
147
147
|
});
|
|
148
|
-
if (
|
|
149
|
-
let e =
|
|
150
|
-
return /* @__PURE__ */
|
|
151
|
-
icon:
|
|
148
|
+
if (G.length === 0) {
|
|
149
|
+
let e = F !== A || L !== A;
|
|
150
|
+
return /* @__PURE__ */ d(a, {
|
|
151
|
+
icon: ae,
|
|
152
152
|
title: e ? "No grants match these filters" : "No access grants yet",
|
|
153
153
|
description: e ? "Try clearing the dataset or status filter to see more grants." : "Grant a workspace member scoped access to a restricted or embargoed dataset.",
|
|
154
154
|
action: e ? void 0 : Q
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
return /* @__PURE__ */
|
|
158
|
-
className: "
|
|
159
|
-
children: /* @__PURE__ */
|
|
160
|
-
$ ? /* @__PURE__ */
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
157
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", {
|
|
158
|
+
className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
|
|
159
|
+
children: /* @__PURE__ */ f(ce, { children: [/* @__PURE__ */ d(ue, { children: /* @__PURE__ */ f(k, { children: [
|
|
160
|
+
$ ? /* @__PURE__ */ d(O, { children: "Dataset" }) : null,
|
|
161
|
+
/* @__PURE__ */ d(O, { children: "Grantee" }),
|
|
162
|
+
/* @__PURE__ */ d(O, { children: "Status" }),
|
|
163
|
+
/* @__PURE__ */ d(O, { children: "Scopes" }),
|
|
164
|
+
/* @__PURE__ */ d(O, { children: "Reason" }),
|
|
165
|
+
/* @__PURE__ */ d(O, { children: "Granted" }),
|
|
166
|
+
/* @__PURE__ */ d(O, { children: "Expires" }),
|
|
167
|
+
/* @__PURE__ */ d(O, { children: "Revoked" }),
|
|
168
|
+
/* @__PURE__ */ d(O, {
|
|
169
169
|
className: "text-right",
|
|
170
170
|
children: "Actions"
|
|
171
171
|
})
|
|
172
|
-
] }) }), /* @__PURE__ */
|
|
173
|
-
$ ? /* @__PURE__ */
|
|
172
|
+
] }) }), /* @__PURE__ */ d(le, { children: G.map((e) => /* @__PURE__ */ f(k, { children: [
|
|
173
|
+
$ ? /* @__PURE__ */ d(D, {
|
|
174
174
|
className: "max-w-[12rem]",
|
|
175
|
-
children: /* @__PURE__ */
|
|
175
|
+
children: /* @__PURE__ */ d("span", {
|
|
176
176
|
className: "line-clamp-1 text-sm text-text-primary",
|
|
177
|
-
children:
|
|
177
|
+
children: V.get(e.datasetId) ?? /* @__PURE__ */ d("span", {
|
|
178
178
|
className: "font-mono text-xs text-text-secondary",
|
|
179
179
|
children: e.datasetId
|
|
180
180
|
})
|
|
181
181
|
})
|
|
182
182
|
}) : null,
|
|
183
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ d(D, {
|
|
184
184
|
className: "max-w-[12rem]",
|
|
185
|
-
children: /* @__PURE__ */
|
|
185
|
+
children: /* @__PURE__ */ d("span", {
|
|
186
186
|
className: "block truncate font-mono text-xs text-text-primary",
|
|
187
187
|
children: e.granteeId
|
|
188
188
|
})
|
|
189
189
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ d(D, { children: /* @__PURE__ */ d(o, { status: e.status }) }),
|
|
191
|
+
/* @__PURE__ */ d(D, { children: /* @__PURE__ */ d("div", {
|
|
192
192
|
className: "flex max-w-[12rem] flex-wrap gap-1",
|
|
193
|
-
children: e.scopes.length === 0 ? /* @__PURE__ */
|
|
193
|
+
children: e.scopes.length === 0 ? /* @__PURE__ */ d("span", {
|
|
194
194
|
className: "text-xs text-text-secondary",
|
|
195
195
|
children: "—"
|
|
196
|
-
}) : e.scopes.map((e) => /* @__PURE__ */
|
|
196
|
+
}) : e.scopes.map((e) => /* @__PURE__ */ d(m, {
|
|
197
197
|
variant: "outline",
|
|
198
198
|
className: "text-xs",
|
|
199
199
|
children: e
|
|
200
200
|
}, e))
|
|
201
201
|
}) }),
|
|
202
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ d(D, {
|
|
203
203
|
className: "max-w-[14rem]",
|
|
204
|
-
children: e.reason ? /* @__PURE__ */
|
|
204
|
+
children: e.reason ? /* @__PURE__ */ d("span", {
|
|
205
205
|
className: "line-clamp-1 text-sm text-text-secondary",
|
|
206
206
|
children: e.reason
|
|
207
|
-
}) : /* @__PURE__ */
|
|
207
|
+
}) : /* @__PURE__ */ d("span", {
|
|
208
208
|
className: "text-sm text-text-secondary",
|
|
209
209
|
children: "—"
|
|
210
210
|
})
|
|
211
211
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ d(D, {
|
|
213
213
|
className: "whitespace-nowrap text-sm text-text-secondary",
|
|
214
|
-
children:
|
|
214
|
+
children: N(e.grantedAt)
|
|
215
215
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ d(D, {
|
|
217
217
|
className: "whitespace-nowrap text-sm text-text-secondary",
|
|
218
|
-
children:
|
|
218
|
+
children: N(e.expiresAt)
|
|
219
219
|
}),
|
|
220
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ d(D, {
|
|
221
221
|
className: "whitespace-nowrap text-sm text-text-secondary",
|
|
222
|
-
children:
|
|
222
|
+
children: N(e.revokedAt)
|
|
223
223
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ d(D, {
|
|
225
225
|
className: "text-right",
|
|
226
|
-
children:
|
|
226
|
+
children: M(e.status) ? /* @__PURE__ */ d(i, {
|
|
227
227
|
ariaLabel: `Actions for grant to ${e.granteeId}`,
|
|
228
228
|
entityName: e.granteeId,
|
|
229
|
-
onDelete: () =>
|
|
229
|
+
onDelete: () => Z(e),
|
|
230
230
|
deleteLabel: "Revoke grant"
|
|
231
|
-
}) : /* @__PURE__ */
|
|
231
|
+
}) : /* @__PURE__ */ d("span", {
|
|
232
232
|
className: "text-xs text-text-secondary",
|
|
233
233
|
children: "—"
|
|
234
234
|
})
|
|
235
235
|
})
|
|
236
236
|
] }, e.id)) })] })
|
|
237
|
-
})
|
|
237
|
+
}), /* @__PURE__ */ d("ul", {
|
|
238
|
+
className: "space-y-3 md:hidden",
|
|
239
|
+
children: G.map((e) => /* @__PURE__ */ d("li", {
|
|
240
|
+
className: "rounded-card border border-border-default bg-bg-elevated",
|
|
241
|
+
children: /* @__PURE__ */ f("div", {
|
|
242
|
+
className: "flex items-start justify-between gap-2 p-4",
|
|
243
|
+
children: [/* @__PURE__ */ f("div", {
|
|
244
|
+
className: "min-w-0 flex-1 space-y-2",
|
|
245
|
+
children: [
|
|
246
|
+
/* @__PURE__ */ f("div", {
|
|
247
|
+
className: "flex flex-wrap items-center gap-2",
|
|
248
|
+
children: [$ ? /* @__PURE__ */ d("span", {
|
|
249
|
+
className: "truncate text-sm font-medium text-text-primary",
|
|
250
|
+
children: V.get(e.datasetId) ?? "Dataset"
|
|
251
|
+
}) : null, /* @__PURE__ */ d(o, { status: e.status })]
|
|
252
|
+
}),
|
|
253
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
254
|
+
className: "text-xs text-text-secondary",
|
|
255
|
+
children: "Grantee (User ID)"
|
|
256
|
+
}), /* @__PURE__ */ d("p", {
|
|
257
|
+
className: "truncate font-mono text-xs text-text-primary",
|
|
258
|
+
children: e.granteeId
|
|
259
|
+
})] }),
|
|
260
|
+
e.scopes.length > 0 ? /* @__PURE__ */ d("div", {
|
|
261
|
+
className: "flex flex-wrap gap-1",
|
|
262
|
+
children: e.scopes.map((e) => /* @__PURE__ */ d(m, {
|
|
263
|
+
variant: "outline",
|
|
264
|
+
className: "text-xs",
|
|
265
|
+
children: e
|
|
266
|
+
}, e))
|
|
267
|
+
}) : null,
|
|
268
|
+
e.reason ? /* @__PURE__ */ d("p", {
|
|
269
|
+
className: "line-clamp-2 text-xs text-text-secondary",
|
|
270
|
+
children: e.reason
|
|
271
|
+
}) : null,
|
|
272
|
+
/* @__PURE__ */ f("div", {
|
|
273
|
+
className: "flex flex-wrap gap-x-3 gap-y-1 text-xs text-text-secondary",
|
|
274
|
+
children: [
|
|
275
|
+
/* @__PURE__ */ f("span", { children: ["Granted ", N(e.grantedAt)] }),
|
|
276
|
+
/* @__PURE__ */ f("span", { children: ["Expires ", N(e.expiresAt)] }),
|
|
277
|
+
e.revokedAt ? /* @__PURE__ */ f("span", { children: ["Revoked ", N(e.revokedAt)] }) : null
|
|
278
|
+
]
|
|
279
|
+
})
|
|
280
|
+
]
|
|
281
|
+
}), M(e.status) ? /* @__PURE__ */ d(i, {
|
|
282
|
+
ariaLabel: `Actions for grant to ${e.granteeId}`,
|
|
283
|
+
entityName: e.granteeId,
|
|
284
|
+
onDelete: () => Z(e),
|
|
285
|
+
deleteLabel: "Revoke grant"
|
|
286
|
+
}) : null]
|
|
287
|
+
})
|
|
288
|
+
}, e.id))
|
|
289
|
+
})] });
|
|
238
290
|
})()]
|
|
239
|
-
}), /* @__PURE__ */
|
|
240
|
-
open:
|
|
241
|
-
onOpenChange: (e) =>
|
|
242
|
-
children: /* @__PURE__ */
|
|
243
|
-
className: "max-w-md",
|
|
291
|
+
}), /* @__PURE__ */ d(oe, {
|
|
292
|
+
open: he,
|
|
293
|
+
onOpenChange: (e) => q(e || K ? e : !1),
|
|
294
|
+
children: /* @__PURE__ */ f(se, {
|
|
295
|
+
className: "max-h-[85vh] max-w-md overflow-y-auto",
|
|
244
296
|
children: [
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ f(v, { children: [/* @__PURE__ */ d(y, { children: "Grant data access" }), /* @__PURE__ */ d(g, { children: "Give a workspace member scoped access to a dataset. Access is identified by the member's User ID." })] }),
|
|
298
|
+
/* @__PURE__ */ f("div", {
|
|
247
299
|
className: "space-y-4",
|
|
248
300
|
children: [
|
|
249
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ f("div", {
|
|
250
302
|
className: "space-y-1.5",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
303
|
+
children: [/* @__PURE__ */ d(x, {
|
|
252
304
|
htmlFor: "grant-dataset",
|
|
253
305
|
children: "Dataset"
|
|
254
|
-
}), /* @__PURE__ */
|
|
255
|
-
value:
|
|
256
|
-
onValueChange: (e) =>
|
|
257
|
-
children: [/* @__PURE__ */
|
|
306
|
+
}), /* @__PURE__ */ f(S, {
|
|
307
|
+
value: J.datasetId || void 0,
|
|
308
|
+
onValueChange: (e) => X("datasetId", e),
|
|
309
|
+
children: [/* @__PURE__ */ d(T, {
|
|
258
310
|
id: "grant-dataset",
|
|
259
311
|
"aria-label": "Dataset",
|
|
260
|
-
children: /* @__PURE__ */
|
|
261
|
-
}), /* @__PURE__ */
|
|
312
|
+
children: /* @__PURE__ */ d(E, { placeholder: "Select a dataset" })
|
|
313
|
+
}), /* @__PURE__ */ d(C, { children: B.map((e) => /* @__PURE__ */ d(w, {
|
|
262
314
|
value: e.id,
|
|
263
315
|
children: e.name
|
|
264
316
|
}, e.id)) })]
|
|
265
317
|
})]
|
|
266
318
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ f("div", {
|
|
268
320
|
className: "space-y-1.5",
|
|
269
|
-
children: [
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
321
|
+
children: [
|
|
322
|
+
/* @__PURE__ */ d(x, {
|
|
323
|
+
htmlFor: "grant-grantee",
|
|
324
|
+
children: "Grantee (User ID)"
|
|
325
|
+
}),
|
|
326
|
+
/* @__PURE__ */ d(b, {
|
|
327
|
+
id: "grant-grantee",
|
|
328
|
+
value: J.granteeId,
|
|
329
|
+
onChange: (e) => X("granteeId", e.target.value),
|
|
330
|
+
placeholder: "e.g. 4fe35990-…",
|
|
331
|
+
className: "font-mono"
|
|
332
|
+
}),
|
|
333
|
+
/* @__PURE__ */ d("p", {
|
|
334
|
+
className: "text-xs text-text-secondary",
|
|
335
|
+
children: "Paste the workspace member's User ID. You can copy it from the member's profile (“Get ID”) or the workspace member directory."
|
|
336
|
+
})
|
|
337
|
+
]
|
|
279
338
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
value:
|
|
282
|
-
onChange: (e) =>
|
|
339
|
+
/* @__PURE__ */ d(re, {
|
|
340
|
+
value: J.scopes,
|
|
341
|
+
onChange: (e) => X("scopes", e),
|
|
283
342
|
label: "Scopes",
|
|
284
343
|
placeholder: "e.g. read, download"
|
|
285
344
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ f("div", {
|
|
287
346
|
className: "space-y-1.5",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ d(x, {
|
|
289
348
|
htmlFor: "grant-reason",
|
|
290
349
|
children: "Reason"
|
|
291
|
-
}), /* @__PURE__ */
|
|
350
|
+
}), /* @__PURE__ */ d(de, {
|
|
292
351
|
id: "grant-reason",
|
|
293
|
-
value:
|
|
294
|
-
onChange: (e) =>
|
|
352
|
+
value: J.reason,
|
|
353
|
+
onChange: (e) => X("reason", e.target.value),
|
|
295
354
|
rows: 2,
|
|
296
355
|
placeholder: "Why this member needs access."
|
|
297
356
|
})]
|
|
298
357
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ f("div", {
|
|
300
359
|
className: "space-y-1.5",
|
|
301
360
|
children: [
|
|
302
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ d(x, {
|
|
303
362
|
htmlFor: "grant-expires",
|
|
304
363
|
children: "Expires (optional)"
|
|
305
364
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ d(b, {
|
|
307
366
|
id: "grant-expires",
|
|
308
367
|
type: "datetime-local",
|
|
309
|
-
value:
|
|
310
|
-
onChange: (e) =>
|
|
368
|
+
value: J.expiresAt,
|
|
369
|
+
onChange: (e) => X("expiresAt", e.target.value)
|
|
311
370
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ d("p", {
|
|
313
372
|
className: "text-xs text-text-secondary",
|
|
314
373
|
children: "Leave blank for an open-ended grant."
|
|
315
374
|
})
|
|
@@ -317,17 +376,17 @@ function I() {
|
|
|
317
376
|
})
|
|
318
377
|
]
|
|
319
378
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ f(_, { children: [/* @__PURE__ */ d(h, {
|
|
321
380
|
type: "button",
|
|
322
381
|
variant: "outline",
|
|
323
|
-
onClick: () =>
|
|
324
|
-
disabled:
|
|
382
|
+
onClick: () => q(!1),
|
|
383
|
+
disabled: K,
|
|
325
384
|
children: "Cancel"
|
|
326
|
-
}), /* @__PURE__ */
|
|
385
|
+
}), /* @__PURE__ */ f(h, {
|
|
327
386
|
type: "button",
|
|
328
|
-
onClick: () => void
|
|
329
|
-
disabled:
|
|
330
|
-
children: [/* @__PURE__ */
|
|
387
|
+
onClick: () => void _e(),
|
|
388
|
+
disabled: K,
|
|
389
|
+
children: [/* @__PURE__ */ d(p, { className: "size-4" }), K ? "Granting…" : "Grant access"]
|
|
331
390
|
})] })
|
|
332
391
|
]
|
|
333
392
|
})
|
|
@@ -335,6 +394,6 @@ function I() {
|
|
|
335
394
|
});
|
|
336
395
|
}
|
|
337
396
|
//#endregion
|
|
338
|
-
export {
|
|
397
|
+
export { F as default };
|
|
339
398
|
|
|
340
399
|
//# sourceMappingURL=AccessPage.js.map
|