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