@danxbot/ui 20.4.2 → 20.4.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/index.js CHANGED
@@ -50983,50 +50983,53 @@ function e7({
50983
50983
  function t7({
50984
50984
  apiKey: e,
50985
50985
  busy: t,
50986
- onRevokeGrant: n
50986
+ onRevokeGrant: n,
50987
+ renderName: r,
50988
+ renderStatus: o
50987
50989
  }) {
50988
- const r = e.grants ?? [];
50990
+ const s = e.grants ?? [], i = o?.(e);
50989
50991
  return /* @__PURE__ */ R("div", { className: "flex min-w-0 flex-col gap-2", children: [
50990
- /* @__PURE__ */ u(tf, { primary: e.name, secondary: `Created ${xr(e.createdAt)}` }),
50991
- r.length > 0 && /* @__PURE__ */ u("ul", { "aria-label": `Permissions added to ${e.name}`, className: "flex min-w-0 flex-col gap-1.5", children: r.map((o) => /* @__PURE__ */ u(e7, { apiKey: e, grant: o, busy: t, onRevokeGrant: n }, o.id)) })
50992
+ /* @__PURE__ */ u(tf, { primary: r?.(e) ?? e.name, secondary: `Created ${xr(e.createdAt)}` }),
50993
+ i,
50994
+ s.length > 0 && /* @__PURE__ */ u("ul", { "aria-label": `Permissions added to ${e.name}`, className: "flex min-w-0 flex-col gap-1.5", children: s.map((a) => /* @__PURE__ */ u(e7, { apiKey: e, grant: a, busy: t, onRevokeGrant: n }, a.id)) })
50992
50995
  ] });
50993
50996
  }
50994
- function n7(e, t, n, r) {
50997
+ function n7(e, t, n, r, o, s) {
50995
50998
  return [
50996
50999
  {
50997
51000
  id: "key",
50998
51001
  header: "Key",
50999
- accessorFn: (o) => o.name,
51000
- cell: ({ row: o }) => /* @__PURE__ */ u(t7, { apiKey: o.original, busy: e === o.original.id, onRevokeGrant: r })
51002
+ accessorFn: (i) => i.name,
51003
+ cell: ({ row: i }) => /* @__PURE__ */ u(t7, { apiKey: i.original, busy: e === i.original.id, onRevokeGrant: r, renderName: o, renderStatus: s })
51001
51004
  },
51002
51005
  {
51003
51006
  id: "role",
51004
51007
  header: "Role",
51005
- accessorFn: (o) => o.roleLabel,
51006
- cell: ({ row: o }) => /* @__PURE__ */ u(Q9, { apiKey: o.original, busy: e === o.original.id, editor: n })
51008
+ accessorFn: (i) => i.roleLabel,
51009
+ cell: ({ row: i }) => /* @__PURE__ */ u(Q9, { apiKey: i.original, busy: e === i.original.id, editor: n })
51007
51010
  },
51008
51011
  {
51009
51012
  id: "lastUsed",
51010
51013
  header: "Last used",
51011
- accessorFn: (o) => o.lastUsedAt ?? "",
51012
- cell: ({ row: o }) => /* @__PURE__ */ u("span", { className: "text-secondary", children: o.original.lastUsedAt ? xr(o.original.lastUsedAt) : "Never" })
51014
+ accessorFn: (i) => i.lastUsedAt ?? "",
51015
+ cell: ({ row: i }) => /* @__PURE__ */ u("span", { className: "text-secondary", children: i.original.lastUsedAt ? xr(i.original.lastUsedAt) : "Never" })
51013
51016
  },
51014
51017
  {
51015
51018
  id: "expires",
51016
51019
  header: "Expires",
51017
- accessorFn: (o) => o.expiresAt ?? "",
51018
- cell: ({ row: o }) => /* @__PURE__ */ u("span", { className: "text-secondary", children: o.original.expiresAt ? di(o.original.expiresAt) : "Never" })
51020
+ accessorFn: (i) => i.expiresAt ?? "",
51021
+ cell: ({ row: i }) => /* @__PURE__ */ u("span", { className: "text-secondary", children: i.original.expiresAt ? di(i.original.expiresAt) : "Never" })
51019
51022
  },
51020
51023
  {
51021
51024
  id: "actions",
51022
51025
  header: "",
51023
51026
  enableSorting: !1,
51024
- cell: ({ row: o }) => /* @__PURE__ */ u("div", { className: "flex justify-end", children: /* @__PURE__ */ u(J9, { apiKey: o.original, busy: e === o.original.id, onRevoke: t }) })
51027
+ cell: ({ row: i }) => /* @__PURE__ */ u("div", { className: "flex justify-end", children: /* @__PURE__ */ u(J9, { apiKey: i.original, busy: e === i.original.id, onRevoke: t }) })
51025
51028
  }
51026
51029
  ];
51027
51030
  }
51028
- function AT({ keys: e, onRevoke: t, busyId: n, roleEditor: r, onRevokeGrant: o, className: s }) {
51029
- return /* @__PURE__ */ u(ef, { columns: n7(n, t, r, o), data: e, getRowId: (i) => String(i.id), className: s });
51031
+ function AT({ keys: e, onRevoke: t, busyId: n, roleEditor: r, onRevokeGrant: o, renderName: s, renderStatus: i, className: a }) {
51032
+ return /* @__PURE__ */ u(ef, { columns: n7(n, t, r, o, s, i), data: e, getRowId: (c) => String(c.id), className: a });
51030
51033
  }
51031
51034
  function UQ({
51032
51035
  keys: e,
@@ -51180,15 +51183,15 @@ function UQ({
51180
51183
  )
51181
51184
  ] });
51182
51185
  }
51183
- function jQ({ keys: e, onRevoke: t, busyId: n, roleEditor: r, onRevokeGrant: o, emptyState: s, className: i }) {
51184
- return e.length === 0 ? s ?? /* @__PURE__ */ u(
51186
+ function jQ({ keys: e, onRevoke: t, busyId: n, roleEditor: r, onRevokeGrant: o, renderName: s, renderStatus: i, emptyState: a, className: c }) {
51187
+ return e.length === 0 ? a ?? /* @__PURE__ */ u(
51185
51188
  Mi,
51186
51189
  {
51187
51190
  icon: /* @__PURE__ */ u(ae, { name: "bot", size: "lg", className: "text-tertiary" }),
51188
51191
  title: "No agent sessions",
51189
51192
  description: "Claude Code sessions, workers and dispatches that act as you appear here once you approve their access."
51190
51193
  }
51191
- ) : /* @__PURE__ */ u(AT, { keys: e, onRevoke: t, busyId: n, roleEditor: r, onRevokeGrant: o, className: i });
51194
+ ) : /* @__PURE__ */ u(AT, { keys: e, onRevoke: t, busyId: n, roleEditor: r, onRevokeGrant: o, renderName: s, renderStatus: i, className: c });
51192
51195
  }
51193
51196
  const r7 = {
51194
51197
  pending: { tone: "warning", label: "Pending" },