@burdenoff/microfe-auth 2026.828.2 → 2026.830.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 (64) hide show
  1. package/dist/auth/AuthRoot.js +43 -41
  2. package/dist/auth/AuthRoot.js.map +1 -1
  3. package/dist/auth/components/AuthLayout.js +65 -67
  4. package/dist/auth/components/AuthLayout.js.map +1 -1
  5. package/dist/auth/components/CaptchaV2.js +21 -24
  6. package/dist/auth/components/CaptchaV2.js.map +1 -1
  7. package/dist/auth/components/ConfirmActionDialog.js +33 -32
  8. package/dist/auth/components/ConfirmActionDialog.js.map +1 -1
  9. package/dist/auth/components/profile/UserProfileMenu.js +44 -46
  10. package/dist/auth/components/profile/UserProfileMenu.js.map +1 -1
  11. package/dist/auth/components/workspace/WorkspaceSelector.js +62 -68
  12. package/dist/auth/components/workspace/WorkspaceSelector.js.map +1 -1
  13. package/dist/auth/pages/AuditLogPage.js +65 -68
  14. package/dist/auth/pages/AuditLogPage.js.map +1 -1
  15. package/dist/auth/pages/EmailVerifyPage.js +51 -54
  16. package/dist/auth/pages/EmailVerifyPage.js.map +1 -1
  17. package/dist/auth/pages/LoginPage.js +223 -225
  18. package/dist/auth/pages/LoginPage.js.map +1 -1
  19. package/dist/auth/pages/MagicLinkPage.js +67 -69
  20. package/dist/auth/pages/MagicLinkPage.js.map +1 -1
  21. package/dist/auth/pages/MfaSetupPage.js +85 -88
  22. package/dist/auth/pages/MfaSetupPage.js.map +1 -1
  23. package/dist/auth/pages/MfaVerifyPage.js +60 -63
  24. package/dist/auth/pages/MfaVerifyPage.js.map +1 -1
  25. package/dist/auth/pages/OAuthCallbackPage.js +37 -40
  26. package/dist/auth/pages/OAuthCallbackPage.js.map +1 -1
  27. package/dist/auth/pages/PasswordResetPage.js +102 -105
  28. package/dist/auth/pages/PasswordResetPage.js.map +1 -1
  29. package/dist/auth/pages/ReactivatePage.js +54 -57
  30. package/dist/auth/pages/ReactivatePage.js.map +1 -1
  31. package/dist/auth/pages/RegisterPage.js +171 -174
  32. package/dist/auth/pages/RegisterPage.js.map +1 -1
  33. package/dist/auth/pages/SSOClearPage.js +21 -20
  34. package/dist/auth/pages/SSOClearPage.js.map +1 -1
  35. package/dist/auth/pages/SSODepositPage.js +27 -26
  36. package/dist/auth/pages/SSODepositPage.js.map +1 -1
  37. package/dist/auth/pages/SSORelayCallbackPage.js +19 -18
  38. package/dist/auth/pages/SSORelayCallbackPage.js.map +1 -1
  39. package/dist/auth/pages/SecurityPage.js +247 -250
  40. package/dist/auth/pages/SecurityPage.js.map +1 -1
  41. package/dist/auth/pages/SessionsPage.js +95 -98
  42. package/dist/auth/pages/SessionsPage.js.map +1 -1
  43. package/dist/auth/pages/SsoCallbackPage.js +53 -56
  44. package/dist/auth/pages/SsoCallbackPage.js.map +1 -1
  45. package/dist/auth/pages/SsoConfigPage.js +296 -299
  46. package/dist/auth/pages/SsoConfigPage.js.map +1 -1
  47. package/dist/auth/pages/SsoLoginPage.js +65 -68
  48. package/dist/auth/pages/SsoLoginPage.js.map +1 -1
  49. package/dist/auth/pages/UserDetailsPage.js +124 -127
  50. package/dist/auth/pages/UserDetailsPage.js.map +1 -1
  51. package/dist/auth/pages/UserProfilePage.js +171 -174
  52. package/dist/auth/pages/UserProfilePage.js.map +1 -1
  53. package/dist/auth/pages/UsersPage.js +322 -325
  54. package/dist/auth/pages/UsersPage.js.map +1 -1
  55. package/dist/index.d.ts +1 -0
  56. package/dist/index.js +2 -1
  57. package/dist/shared/hooks/index.d.ts +1 -6
  58. package/dist/shared/hooks/useTr.d.ts +16 -0
  59. package/dist/shared/hooks/useTr.js +14 -0
  60. package/dist/shared/hooks/useTr.js.map +1 -0
  61. package/dist/translations/en.d.ts +806 -248
  62. package/dist/translations/en.js +870 -0
  63. package/dist/translations/en.js.map +1 -0
  64. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import { useAuthStore as e } from "../store/authStore.js";
2
- import { AlertIcon as t, SpinnerIcon as n } from "../components/AuthIcons.js";
3
- import { useUserOperations as r } from "../hooks/useUserOperations.js";
4
- import { useAuthPermissions as i } from "../hooks/useAuthPermissions.js";
5
- import { ConfirmActionDialog as a } from "../components/ConfirmActionDialog.js";
6
- import { useCreateAuthExportJobMutation as o } from "../../generated/wspace-operations.js";
7
- import { useEffect as s, useState as c } from "react";
8
- import { useNavigate as l, useParams as u } from "react-router";
9
- import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell";
2
+ import { useTr as t } from "../../shared/hooks/useTr.js";
3
+ import { AlertIcon as n, SpinnerIcon as r } from "../components/AuthIcons.js";
4
+ import { useUserOperations as i } from "../hooks/useUserOperations.js";
5
+ import { useAuthPermissions as a } from "../hooks/useAuthPermissions.js";
6
+ import { ConfirmActionDialog as o } from "../components/ConfirmActionDialog.js";
7
+ import { useCreateAuthExportJobMutation as s } from "../../generated/wspace-operations.js";
8
+ import { useEffect as c, useState as l } from "react";
9
+ import { useNavigate as u, useParams as d } from "react-router";
10
10
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
11
11
  import { isQuotaExhaustedError as h } from "@burdenoff/fe-libs/shared/utils";
12
12
  import { EmphasisPanel as g, IllustratedEmptyState as _, NextSteps as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
@@ -31,58 +31,55 @@ var b = (e) => {
31
31
  }
32
32
  };
33
33
  function S() {
34
- let { id: S } = u(), C = l(), { t: w } = d(), T = (e, t) => {
35
- let n = w(e);
36
- return n === e ? t : n;
37
- }, E = e((e) => e.isAuthenticated), D = e((e) => e.user), { canViewUsers: O, canDeleteUsers: k, isLoading: A } = i(), { getUser: j, deleteUser: M, hardDeleteUser: N } = r(), [P, F] = c(null), [I, L] = c(!0), [R, z] = c(null), [B, V] = c(null), [H, U] = c(null), [W, { loading: G }] = o(), [K, q] = c(null), [J, Y] = c(!1);
38
- s(() => {
34
+ let S = t(), { id: C } = d(), w = u(), T = e((e) => e.isAuthenticated), E = e((e) => e.user), { canViewUsers: D, canDeleteUsers: O, isLoading: k } = a(), { getUser: A, deleteUser: j, hardDeleteUser: M } = i(), [N, P] = l(null), [F, I] = l(!0), [L, R] = l(null), [z, B] = l(null), [V, H] = l(null), [U, { loading: W }] = s(), [G, K] = l(null), [q, J] = l(!1);
35
+ c(() => {
39
36
  let e = !1;
40
- if (!S) {
41
- z("Missing user id"), L(!1);
37
+ if (!C) {
38
+ R("Missing user id"), I(!1);
42
39
  return;
43
40
  }
44
- if (!E) {
45
- L(!1);
41
+ if (!T) {
42
+ I(!1);
46
43
  return;
47
44
  }
48
- return L(!0), z(null), j(S).then((t) => {
49
- e || (t ? F(t) : z(T("auth.userDetails.userNotFound", "User not found")));
45
+ return I(!0), R(null), A(C).then((t) => {
46
+ e || (t ? P(t) : R(S("auth.userDetails.userNotFound", "User not found")));
50
47
  }).catch((t) => {
51
- e || z(t instanceof Error ? t.message : "Failed to fetch user details");
48
+ e || R(t instanceof Error ? t.message : "Failed to fetch user details");
52
49
  }).finally(() => {
53
- e || L(!1);
50
+ e || I(!1);
54
51
  }), () => {
55
52
  e = !0;
56
53
  };
57
54
  }, [
58
- S,
59
- j,
60
- E
55
+ C,
56
+ A,
57
+ T
61
58
  ]);
62
- let X = async () => {
63
- if (P) try {
64
- let e = await M(P.id);
59
+ let Y = async () => {
60
+ if (N) try {
61
+ let e = await j(N.id);
65
62
  if (e.success) {
66
- V(T("auth.userDetails.userDeactivated", "User \"{email}\" has been deactivated.").replace("{email}", P.email)), U(null);
67
- let e = await j(P.id);
68
- e && F(e);
69
- } else z(e.message);
63
+ B(S("auth.userDetails.userDeactivated", "User \"{email}\" has been deactivated.").replace("{email}", N.email)), H(null);
64
+ let e = await A(N.id);
65
+ e && P(e);
66
+ } else R(e.message);
70
67
  } catch (e) {
71
- z(e instanceof Error ? e.message : "Failed to delete user");
68
+ R(e instanceof Error ? e.message : "Failed to delete user");
72
69
  }
73
- }, Z = async () => {
74
- if (P) try {
75
- let e = await N(P.id);
76
- e.success ? (U(null), C("/auth/users")) : z(e.message);
70
+ }, X = async () => {
71
+ if (N) try {
72
+ let e = await M(N.id);
73
+ e.success ? (H(null), w("/auth/users")) : R(e.message);
77
74
  } catch (e) {
78
- z(e instanceof Error ? e.message : "Failed to hard delete user");
75
+ R(e instanceof Error ? e.message : "Failed to hard delete user");
79
76
  }
80
- }, Q = async () => {
81
- if (P) {
82
- q(null);
77
+ }, Z = async () => {
78
+ if (N) {
79
+ K(null);
83
80
  try {
84
- await W({ variables: { input: {
85
- name: `User Data Export - ${P.email}`,
81
+ await U({ variables: { input: {
82
+ name: `User Data Export - ${N.email}`,
86
83
  entityTypes: [
87
84
  "user_profile",
88
85
  "user_sessions",
@@ -94,32 +91,32 @@ function S() {
94
91
  } } });
95
92
  } catch (e) {
96
93
  if (h(e)) {
97
- Y(!0), q(T("auth.userDetails.exportQuotaReached", "You have reached your export limit for this month."));
94
+ J(!0), K(S("auth.userDetails.exportQuotaReached", "You have reached your export limit for this month."));
98
95
  return;
99
96
  }
100
- q(e instanceof Error ? e.message : "Failed to start export");
97
+ K(e instanceof Error ? e.message : "Failed to start export");
101
98
  }
102
99
  }
103
100
  };
104
- return E ? A || I ? /* @__PURE__ */ p("div", {
101
+ return T ? k || F ? /* @__PURE__ */ p("div", {
105
102
  className: "max-w-4xl mx-auto p-6",
106
103
  children: /* @__PURE__ */ m("div", {
107
104
  className: "text-center py-16",
108
105
  "aria-live": "polite",
109
106
  "aria-busy": "true",
110
- children: [/* @__PURE__ */ p(n, {
107
+ children: [/* @__PURE__ */ p(r, {
111
108
  className: "size-8 mx-auto text-text-secondary animate-spin",
112
109
  "aria-hidden": "true"
113
110
  }), /* @__PURE__ */ p("p", {
114
111
  className: "mt-4 text-text-secondary",
115
- children: T("auth.userDetails.loading", "Loading user...")
112
+ children: S("auth.userDetails.loading", "Loading user...")
116
113
  })]
117
114
  })
118
- }) : O ? R || !P ? /* @__PURE__ */ m("div", {
115
+ }) : D ? L || !N ? /* @__PURE__ */ m("div", {
119
116
  className: "max-w-4xl mx-auto p-6",
120
117
  children: [/* @__PURE__ */ m("button", {
121
118
  type: "button",
122
- onClick: () => C("/auth/users"),
119
+ onClick: () => w("/auth/users"),
123
120
  className: "mb-6 flex items-center gap-2 text-text-link hover:underline font-medium",
124
121
  children: [/* @__PURE__ */ p("svg", {
125
122
  className: "size-4",
@@ -133,36 +130,36 @@ function S() {
133
130
  strokeWidth: 2,
134
131
  d: "M10 19l-7-7m0 0l7-7m-7 7h18"
135
132
  })
136
- }), T("auth.userDetails.backToUsers", "Back to Users")]
133
+ }), S("auth.userDetails.backToUsers", "Back to Users")]
137
134
  }), /* @__PURE__ */ p("div", {
138
135
  role: "alert",
139
136
  children: /* @__PURE__ */ p(_, {
140
137
  illustration: "empty-search",
141
- title: T("auth.userDetails.userNotFound", "User not found"),
142
- description: R ?? T("auth.userDetails.userNotFoundDesc", "We couldn't find this user. They may have been removed, or the link is out of date.")
138
+ title: S("auth.userDetails.userNotFound", "User not found"),
139
+ description: L ?? S("auth.userDetails.userNotFoundDesc", "We couldn't find this user. They may have been removed, or the link is out of date.")
143
140
  })
144
141
  })]
145
142
  }) : /* @__PURE__ */ m("div", {
146
143
  className: "max-w-4xl mx-auto p-6",
147
144
  children: [
148
- /* @__PURE__ */ p(a, {
149
- open: H !== null,
145
+ /* @__PURE__ */ p(o, {
146
+ open: V !== null,
150
147
  onOpenChange: (e) => {
151
- e || U(null);
148
+ e || H(null);
152
149
  },
153
- title: H === "hard-delete" ? T("auth.userDetails.hardDeleteTitle", "Permanently delete user?") : T("auth.userDetails.deactivateTitle", "Deactivate user?"),
154
- description: H === "hard-delete" ? T("auth.userDetails.hardDeleteDesc", "This permanently deletes \"{email}\" and cannot be undone.").replace("{email}", P.email) : T("auth.userDetails.deactivateDesc", "\"{email}\" will be prevented from signing in until reactivated.").replace("{email}", P.email),
155
- confirmText: H === "hard-delete" ? T("auth.userDetails.hardDeleteConfirm", "Delete permanently") : T("auth.userDetails.deactivateConfirm", "Deactivate user"),
156
- variant: H === "hard-delete" ? "danger" : "warning",
150
+ title: V === "hard-delete" ? S("auth.userDetails.hardDeleteTitle", "Permanently delete user?") : S("auth.userDetails.deactivateTitle", "Deactivate user?"),
151
+ description: V === "hard-delete" ? S("auth.userDetails.hardDeleteDesc", "This permanently deletes \"{email}\" and cannot be undone.").replace("{email}", N.email) : S("auth.userDetails.deactivateDesc", "\"{email}\" will be prevented from signing in until reactivated.").replace("{email}", N.email),
152
+ confirmText: V === "hard-delete" ? S("auth.userDetails.hardDeleteConfirm", "Delete permanently") : S("auth.userDetails.deactivateConfirm", "Deactivate user"),
153
+ variant: V === "hard-delete" ? "danger" : "warning",
157
154
  onConfirm: async () => {
158
- H === "hard-delete" ? await Z() : H === "deactivate" && await X();
155
+ V === "hard-delete" ? await X() : V === "deactivate" && await Y();
159
156
  }
160
157
  }),
161
158
  /* @__PURE__ */ m("div", {
162
159
  className: "flex items-center justify-between mb-6",
163
160
  children: [/* @__PURE__ */ m("button", {
164
161
  type: "button",
165
- onClick: () => C("/auth/users"),
162
+ onClick: () => w("/auth/users"),
166
163
  className: "flex items-center gap-2 text-text-link hover:underline font-medium",
167
164
  children: [/* @__PURE__ */ p("svg", {
168
165
  className: "size-4",
@@ -176,17 +173,17 @@ function S() {
176
173
  strokeWidth: 2,
177
174
  d: "M10 19l-7-7m0 0l7-7m-7 7h18"
178
175
  })
179
- }), T("auth.userDetails.backToUsers", "Back to Users")]
176
+ }), S("auth.userDetails.backToUsers", "Back to Users")]
180
177
  }), /* @__PURE__ */ p("button", {
181
178
  type: "button",
182
- onClick: () => void Q(),
183
- disabled: G,
184
- "aria-label": T("auth.userDetails.exportAriaLabel", "Export user data"),
179
+ onClick: () => void Z(),
180
+ disabled: W,
181
+ "aria-label": S("auth.userDetails.exportAriaLabel", "Export user data"),
185
182
  className: "flex items-center gap-2 px-4 py-2.5 rounded-xl border border-border-default text-text-primary bg-bg-surface hover:bg-bg-sunken disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",
186
- children: G ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(n, {
183
+ children: W ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(r, {
187
184
  className: "size-4 animate-spin",
188
185
  "aria-hidden": "true"
189
- }), T("auth.userDetails.exporting", "Exporting...")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("svg", {
186
+ }), S("auth.userDetails.exporting", "Exporting...")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("svg", {
190
187
  className: "size-4",
191
188
  fill: "none",
192
189
  viewBox: "0 0 24 24",
@@ -198,34 +195,34 @@ function S() {
198
195
  strokeWidth: 2,
199
196
  d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
200
197
  })
201
- }), T("auth.userDetails.exportButton", "Export User Data")] })
198
+ }), S("auth.userDetails.exportButton", "Export User Data")] })
202
199
  })]
203
200
  }),
204
201
  /* @__PURE__ */ p(y, {
205
202
  className: "mb-6",
206
- children: T("auth.userDetails.purpose", "The full record for this person — their role, status, verification, and activity. From here you can export their data, deactivate them, or (for super admins) permanently delete a removed account.")
203
+ children: S("auth.userDetails.purpose", "The full record for this person — their role, status, verification, and activity. From here you can export their data, deactivate them, or (for super admins) permanently delete a removed account.")
207
204
  }),
208
- K && /* @__PURE__ */ m("div", {
205
+ G && /* @__PURE__ */ m("div", {
209
206
  role: "alert",
210
207
  className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
211
- children: [/* @__PURE__ */ p(t, {
208
+ children: [/* @__PURE__ */ p(n, {
212
209
  className: "size-5 text-status-error-text flex-shrink-0 mt-0.5",
213
210
  "aria-hidden": "true"
214
211
  }), /* @__PURE__ */ p("p", {
215
212
  className: "text-sm text-status-error-text",
216
- children: K
213
+ children: G
217
214
  })]
218
215
  }),
219
- B && /* @__PURE__ */ m("div", {
216
+ z && /* @__PURE__ */ m("div", {
220
217
  className: "mb-6 p-4 rounded-xl bg-status-success-bg-subtle border border-status-success-border",
221
218
  children: [/* @__PURE__ */ p("p", {
222
219
  className: "text-status-success-text",
223
- children: B
220
+ children: z
224
221
  }), /* @__PURE__ */ p("button", {
225
222
  type: "button",
226
- onClick: () => V(null),
223
+ onClick: () => B(null),
227
224
  className: "mt-2 text-sm text-status-success-text hover:underline",
228
- children: T("auth.userDetails.dismiss", "Dismiss")
225
+ children: S("auth.userDetails.dismiss", "Dismiss")
229
226
  })]
230
227
  }),
231
228
  /* @__PURE__ */ m("div", {
@@ -238,25 +235,25 @@ function S() {
238
235
  children: [/* @__PURE__ */ p("div", {
239
236
  className: "auth-brand-badge flex size-20 items-center justify-center rounded-full text-3xl font-semibold",
240
237
  "aria-hidden": "true",
241
- children: (P.name || P.username || P.email).charAt(0).toUpperCase()
238
+ children: (N.name || N.username || N.email).charAt(0).toUpperCase()
242
239
  }), /* @__PURE__ */ m("div", { children: [
243
240
  /* @__PURE__ */ p("h1", {
244
241
  className: "text-2xl font-semibold text-text-primary",
245
- children: P.name || P.username
242
+ children: N.name || N.username
246
243
  }),
247
244
  /* @__PURE__ */ p("p", {
248
245
  className: "text-text-secondary",
249
246
  "data-testid": "user-email",
250
- children: P.email
247
+ children: N.email
251
248
  }),
252
249
  /* @__PURE__ */ m("div", {
253
250
  className: "flex items-center gap-2 mt-2",
254
251
  children: [/* @__PURE__ */ p("span", {
255
- className: `px-2.5 py-1 rounded-full text-xs font-medium ${b(P.role)}`,
256
- children: P.role.replace("_", " ")
252
+ className: `px-2.5 py-1 rounded-full text-xs font-medium ${b(N.role)}`,
253
+ children: N.role.replace("_", " ")
257
254
  }), /* @__PURE__ */ p("span", {
258
- className: `px-2.5 py-1 rounded-full text-xs font-medium ${x(P.status)}`,
259
- children: P.status
255
+ className: `px-2.5 py-1 rounded-full text-xs font-medium ${x(N.status)}`,
256
+ children: N.status
260
257
  })]
261
258
  })
262
259
  ] })]
@@ -269,35 +266,35 @@ function S() {
269
266
  className: "p-4 rounded-lg bg-bg-canvas/50",
270
267
  children: [/* @__PURE__ */ p("dt", {
271
268
  className: "text-sm font-medium text-text-secondary mb-1",
272
- children: T("auth.userDetails.username", "Username")
269
+ children: S("auth.userDetails.username", "Username")
273
270
  }), /* @__PURE__ */ p("dd", {
274
271
  className: "text-text-primary font-medium",
275
- children: P.username
272
+ children: N.username
276
273
  })]
277
274
  }),
278
275
  /* @__PURE__ */ m("div", {
279
276
  className: "p-4 rounded-lg bg-bg-canvas/50",
280
277
  children: [/* @__PURE__ */ p("dt", {
281
278
  className: "text-sm font-medium text-text-secondary mb-1",
282
- children: T("auth.userDetails.email", "Email")
279
+ children: S("auth.userDetails.email", "Email")
283
280
  }), /* @__PURE__ */ p("dd", {
284
281
  className: "text-text-primary font-medium",
285
- children: P.email
282
+ children: N.email
286
283
  })]
287
284
  }),
288
285
  /* @__PURE__ */ m("div", {
289
286
  className: "p-4 rounded-lg bg-bg-canvas/50",
290
287
  children: [/* @__PURE__ */ p("dt", {
291
288
  className: "text-sm font-medium text-text-secondary mb-1",
292
- children: T("auth.userDetails.emailVerified", "Email Verified")
289
+ children: S("auth.userDetails.emailVerified", "Email Verified")
293
290
  }), /* @__PURE__ */ p("dd", {
294
291
  className: "text-text-primary font-medium",
295
- children: P.emailVerified ? /* @__PURE__ */ p("span", {
292
+ children: N.emailVerified ? /* @__PURE__ */ p("span", {
296
293
  className: "text-status-success-text",
297
- children: T("auth.userDetails.yes", "Yes")
294
+ children: S("auth.userDetails.yes", "Yes")
298
295
  }) : /* @__PURE__ */ p("span", {
299
296
  className: "text-status-warning-text",
300
- children: T("auth.userDetails.no", "No")
297
+ children: S("auth.userDetails.no", "No")
301
298
  })
302
299
  })]
303
300
  }),
@@ -305,72 +302,72 @@ function S() {
305
302
  className: "p-4 rounded-lg bg-bg-canvas/50",
306
303
  children: [/* @__PURE__ */ p("dt", {
307
304
  className: "text-sm font-medium text-text-secondary mb-1",
308
- children: T("auth.userDetails.mfaEnabled", "MFA Enabled")
305
+ children: S("auth.userDetails.mfaEnabled", "MFA Enabled")
309
306
  }), /* @__PURE__ */ p("dd", {
310
307
  className: "text-text-primary font-medium",
311
- children: P.mfaEnabled ? /* @__PURE__ */ p("span", {
308
+ children: N.mfaEnabled ? /* @__PURE__ */ p("span", {
312
309
  className: "text-status-success-text",
313
- children: T("auth.userDetails.yes", "Yes")
310
+ children: S("auth.userDetails.yes", "Yes")
314
311
  }) : /* @__PURE__ */ p("span", {
315
312
  className: "text-text-secondary",
316
- children: T("auth.userDetails.no", "No")
313
+ children: S("auth.userDetails.no", "No")
317
314
  })
318
315
  })]
319
316
  }),
320
- P.phoneNumber && /* @__PURE__ */ m("div", {
317
+ N.phoneNumber && /* @__PURE__ */ m("div", {
321
318
  className: "p-4 rounded-lg bg-bg-canvas/50",
322
319
  children: [/* @__PURE__ */ p("dt", {
323
320
  className: "text-sm font-medium text-text-secondary mb-1",
324
- children: T("auth.userDetails.phoneNumber", "Phone Number")
321
+ children: S("auth.userDetails.phoneNumber", "Phone Number")
325
322
  }), /* @__PURE__ */ p("dd", {
326
323
  className: "text-text-primary font-medium",
327
- children: P.phoneNumber
324
+ children: N.phoneNumber
328
325
  })]
329
326
  }),
330
327
  /* @__PURE__ */ m("div", {
331
328
  className: "p-4 rounded-lg bg-bg-canvas/50",
332
329
  children: [/* @__PURE__ */ p("dt", {
333
330
  className: "text-sm font-medium text-text-secondary mb-1",
334
- children: T("auth.userDetails.lastLogin", "Last Login")
331
+ children: S("auth.userDetails.lastLogin", "Last Login")
335
332
  }), /* @__PURE__ */ p("dd", {
336
333
  className: "text-text-primary font-medium",
337
- children: P.lastLoginAt ? new Date(P.lastLoginAt).toLocaleString() : T("auth.userDetails.never", "Never")
334
+ children: N.lastLoginAt ? new Date(N.lastLoginAt).toLocaleString() : S("auth.userDetails.never", "Never")
338
335
  })]
339
336
  }),
340
337
  /* @__PURE__ */ m("div", {
341
338
  className: "p-4 rounded-lg bg-bg-canvas/50",
342
339
  children: [/* @__PURE__ */ p("dt", {
343
340
  className: "text-sm font-medium text-text-secondary mb-1",
344
- children: T("auth.userDetails.created", "Created")
341
+ children: S("auth.userDetails.created", "Created")
345
342
  }), /* @__PURE__ */ p("dd", {
346
343
  className: "text-text-primary font-medium",
347
- children: new Date(P.createdAt).toLocaleString()
344
+ children: new Date(N.createdAt).toLocaleString()
348
345
  })]
349
346
  }),
350
347
  /* @__PURE__ */ m("div", {
351
348
  className: "p-4 rounded-lg bg-bg-canvas/50",
352
349
  children: [/* @__PURE__ */ p("dt", {
353
350
  className: "text-sm font-medium text-text-secondary mb-1",
354
- children: T("auth.userDetails.lastUpdated", "Last Updated")
351
+ children: S("auth.userDetails.lastUpdated", "Last Updated")
355
352
  }), /* @__PURE__ */ p("dd", {
356
353
  className: "text-text-primary font-medium",
357
- children: new Date(P.updatedAt).toLocaleString()
354
+ children: new Date(N.updatedAt).toLocaleString()
358
355
  })]
359
356
  })
360
357
  ]
361
358
  }),
362
359
  /* @__PURE__ */ m("div", {
363
360
  className: "mt-8 pt-6 border-t border-border-subtle flex gap-3",
364
- children: [P.status !== "DELETED" && k && /* @__PURE__ */ p("button", {
361
+ children: [N.status !== "DELETED" && O && /* @__PURE__ */ p("button", {
365
362
  type: "button",
366
- onClick: () => U("deactivate"),
363
+ onClick: () => H("deactivate"),
367
364
  className: "px-4 py-2.5 rounded-xl border border-status-error-border text-status-error-text font-medium hover:bg-status-error-bg-subtle transition-colors",
368
- children: T("auth.userDetails.deactivateUser", "Deactivate User")
369
- }), k && P.status === "DELETED" && D?.role === "SUPER_ADMIN" && /* @__PURE__ */ p("button", {
365
+ children: S("auth.userDetails.deactivateUser", "Deactivate User")
366
+ }), O && N.status === "DELETED" && E?.role === "SUPER_ADMIN" && /* @__PURE__ */ p("button", {
370
367
  type: "button",
371
- onClick: () => U("hard-delete"),
368
+ onClick: () => H("hard-delete"),
372
369
  className: "px-4 py-2.5 rounded-xl bg-status-error-bg text-white font-medium hover:bg-status-error-bg-hover transition-colors",
373
- children: T("auth.userDetails.permanentlyDelete", "Permanently Delete")
370
+ children: S("auth.userDetails.permanentlyDelete", "Permanently Delete")
374
371
  })]
375
372
  }),
376
373
  /* @__PURE__ */ p(v, {
@@ -378,23 +375,23 @@ function S() {
378
375
  storageKey: "auth-user-details",
379
376
  steps: [{
380
377
  id: "back-to-users",
381
- label: T("auth.userDetails.nextBack", "Return to the user list"),
382
- description: T("auth.userDetails.nextBackDesc", "Browse or search everyone in your organization."),
383
- onClick: () => C("/auth/users")
378
+ label: S("auth.userDetails.nextBack", "Return to the user list"),
379
+ description: S("auth.userDetails.nextBackDesc", "Browse or search everyone in your organization."),
380
+ onClick: () => w("/auth/users")
384
381
  }, {
385
382
  id: "export-user",
386
- label: T("auth.userDetails.nextExport", "Export this user's data"),
387
- description: T("auth.userDetails.nextExportDesc", "Download their profile, sessions, and audit history as CSV."),
388
- onClick: () => void Q()
383
+ label: S("auth.userDetails.nextExport", "Export this user's data"),
384
+ description: S("auth.userDetails.nextExportDesc", "Download their profile, sessions, and audit history as CSV."),
385
+ onClick: () => void Z()
389
386
  }]
390
387
  }),
391
- /* @__PURE__ */ p(a, {
392
- open: J,
393
- onOpenChange: Y,
394
- title: T("auth.userDetails.exportQuotaTitle", "Export Limit Reached"),
395
- description: T("auth.userDetails.exportQuotaDescription", "You have reached your export limit for this month."),
396
- confirmText: T("auth.userDetails.exportQuotaViewBilling", "View Billing"),
397
- cancelText: T("auth.userDetails.exportQuotaDismiss", "Dismiss"),
388
+ /* @__PURE__ */ p(o, {
389
+ open: q,
390
+ onOpenChange: J,
391
+ title: S("auth.userDetails.exportQuotaTitle", "Export Limit Reached"),
392
+ description: S("auth.userDetails.exportQuotaDescription", "You have reached your export limit for this month."),
393
+ confirmText: S("auth.userDetails.exportQuotaViewBilling", "View Billing"),
394
+ cancelText: S("auth.userDetails.exportQuotaDismiss", "Dismiss"),
398
395
  variant: "warning",
399
396
  onConfirm: () => window.location.assign("/billing")
400
397
  })
@@ -405,15 +402,15 @@ function S() {
405
402
  className: "max-w-4xl mx-auto p-6",
406
403
  children: /* @__PURE__ */ p(_, {
407
404
  illustration: "empty-generic",
408
- title: T("auth.userDetails.adminRequired", "Admin Access Required"),
409
- description: T("auth.userDetails.adminRequiredDesc", "You need administrator privileges to view user details.")
405
+ title: S("auth.userDetails.adminRequired", "Admin Access Required"),
406
+ description: S("auth.userDetails.adminRequiredDesc", "You need administrator privileges to view user details.")
410
407
  })
411
408
  }) : /* @__PURE__ */ p("div", {
412
409
  className: "max-w-4xl mx-auto p-6",
413
410
  children: /* @__PURE__ */ p(_, {
414
411
  illustration: "empty-generic",
415
- title: T("auth.userDetails.authRequired", "Authentication Required"),
416
- description: T("auth.userDetails.signInToView", "Please sign in to view user details")
412
+ title: S("auth.userDetails.authRequired", "Authentication Required"),
413
+ description: S("auth.userDetails.signInToView", "Please sign in to view user details")
417
414
  })
418
415
  });
419
416
  }