@nivaro/react 0.3.100 → 0.3.101

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 (30) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +46 -3
  4. package/dist/index.js +623 -620
  5. package/dist/shared/components/ActivityEntry.js +5 -5
  6. package/dist/shared/components/ItemEditForm.js +2708 -2704
  7. package/dist/shared/components/JobsTray.js +74 -63
  8. package/dist/shared/components/NotificationBell.js +80 -73
  9. package/dist/shared/components/TipLayer.js +56 -41
  10. package/dist/shared/components/integrations/console/SignalCard.js +40 -40
  11. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +95 -73
  12. package/dist/shared/components/integrations/console/drill/status.js +23 -18
  13. package/dist/shared/components/item-edit/RecordInsights.js +86 -86
  14. package/dist/shared/components/item-edit/header-path-preview.js +46 -34
  15. package/dist/shared/components/notifications/DeliveryChips.js +1 -2
  16. package/dist/shared/components/panels/BackgroundMove.js +152 -85
  17. package/dist/shared/components/panels/PipelinePanel.js +602 -594
  18. package/dist/shared/components/profile/ActivityFeedCard.js +322 -0
  19. package/dist/shared/components/profile/DayTimeline.js +145 -140
  20. package/dist/shared/components/profile/PersonAccess.js +679 -383
  21. package/dist/shared/components/profile/PersonActivity.js +404 -427
  22. package/dist/shared/components/profile/PersonDidPanel.js +248 -134
  23. package/dist/shared/components/profile/PersonProfile.js +33 -32
  24. package/dist/shared/components/profile/journey-view.js +166 -0
  25. package/dist/shared/lib/activity-sentence.js +319 -236
  26. package/dist/shared/lib/jobs-tray.js +60 -41
  27. package/dist/shared/lib/move-failure.js +16 -6
  28. package/dist/shared/lib/obligation-banner.js +16 -16
  29. package/dist/shared/lib/partner-failure.js +44 -32
  30. package/package.json +1 -1
@@ -1,188 +1,302 @@
1
- import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
- import { useQuery as f, useMutation as w } from "@tanstack/react-query";
3
- import { Download as C, ListChecks as L, ChevronRight as S } from "lucide-react";
4
- import { useState as v } from "react";
5
- import { useNivaroClient as N, useItemNavigation as T } from "../../context.js";
6
- import { get as k, post as _ } from "../../lib/commands.js";
7
- import { formatNumber as y, formatDate as D, cn as O, titleCase as q } from "../../lib/utils.js";
8
- import { SimpleSelect as U } from "../ui/SimpleSelect.js";
9
- import { SectionCard as j, EmptyLine as b } from "./primitives.js";
10
- const g = "__none__", E = [
1
+ import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
+ import { useQuery as N, useMutation as O } from "@tanstack/react-query";
3
+ import { Download as R, ListChecks as $, ChevronRight as q } from "lucide-react";
4
+ import { useState as k } from "react";
5
+ import { useNivaroClient as w, useItemNavigation as F } from "../../context.js";
6
+ import { get as L, post as U } from "../../lib/commands.js";
7
+ import { formatNumber as C, formatDate as P, cn as W, titleCase as D } from "../../lib/utils.js";
8
+ import { ErrorNotice as S } from "../ErrorNotice.js";
9
+ import { QueryErrorState as j } from "../QueryErrorState.js";
10
+ import { SimpleSelect as K } from "../ui/SimpleSelect.js";
11
+ import { SectionCard as I, EmptyLine as _ } from "./primitives.js";
12
+ const T = "__none__", g = [
11
13
  { value: "7", label: "Last 7 days" },
12
14
  { value: "30", label: "Last 30 days" },
13
15
  { value: "90", label: "Last 90 days" }
14
16
  ];
15
- function R() {
17
+ function Z() {
16
18
  try {
17
19
  return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
18
20
  } catch {
19
21
  return "UTC";
20
22
  }
21
23
  }
22
- function $(r) {
23
- return r ? q(r.replace(/^(nivaro|directus)_/, "").replace(/_/g, " ")) : "Sign-ins and other";
24
+ function Q(e) {
25
+ return e ? D(e.replace(/^(nivaro|directus)_/, "").replace(/_/g, " ")) : "Sign-ins and other";
24
26
  }
25
- function F(r) {
26
- return Object.entries(r).sort((n, s) => s[1] - n[1]).map(([n, s]) => `${s} ${n.replace(/[-_]/g, " ")}`).join(" · ");
27
+ function B(e) {
28
+ var a;
29
+ return (a = e.parts) != null && a.length ? e.parts : Object.entries(e.actions).sort((r, s) => s[1] - r[1]).map(([r, s]) => ({ verb: D(r.replace(/[-_]/g, " ")), count: s }));
27
30
  }
28
- function G({ userId: r, name: n }) {
29
- const s = N(), [i, h] = v("30"), c = R(), { data: a, isLoading: u, isError: p } = f({
30
- queryKey: ["nvr-person-did", r, i, c],
31
- queryFn: () => s.request(k(`/activity/people/${r}/summary`, { days: i, tz: c })).then((l) => l.data),
31
+ function f(e, a) {
32
+ return new Intl.DateTimeFormat("en-US", {
33
+ hour: "numeric",
34
+ minute: "2-digit",
35
+ timeZone: a
36
+ }).format(new Date(e));
37
+ }
38
+ function oe({ userId: e, name: a }) {
39
+ var p;
40
+ const r = w(), [s, c] = k("30"), m = Z(), { data: o, isLoading: u, isError: b, error: d, refetch: h } = N({
41
+ queryKey: ["nvr-person-did", e, s, m],
42
+ queryFn: () => r.request(L(`/activity/people/${e}/summary`, { days: s, tz: m })).then((i) => i.data),
32
43
  staleTime: 6e4
33
- }), d = w({
34
- mutationFn: () => s.request(
35
- _(`/activity/people/${r}/export`, { days: Number(i), tz: c })
36
- ).then((l) => l.data),
37
- onSuccess: ({ csv: l, filename: t }) => {
38
- const m = URL.createObjectURL(new Blob([l], { type: "text/csv;charset=utf-8" })), x = document.createElement("a");
39
- x.href = m, x.download = t, x.click(), setTimeout(() => URL.revokeObjectURL(m), 1e3);
44
+ }), l = O({
45
+ mutationFn: () => r.request(
46
+ U(`/activity/people/${e}/export`, { days: Number(s), tz: m })
47
+ ).then((i) => i.data),
48
+ onSuccess: ({ csv: i, filename: E }) => {
49
+ const y = URL.createObjectURL(new Blob([i], { type: "text/csv;charset=utf-8" })), v = document.createElement("a");
50
+ v.href = y, v.download = E, v.click(), setTimeout(() => URL.revokeObjectURL(y), 1e3);
40
51
  }
41
- });
42
- return /* @__PURE__ */ e(
43
- j,
52
+ }), x = ((p = g.find((i) => i.value === s)) == null ? void 0 : p.label.toLowerCase()) ?? "this window";
53
+ return /* @__PURE__ */ n(
54
+ I,
44
55
  {
45
- icon: /* @__PURE__ */ e(L, { className: "h-4 w-4" }),
46
- title: n ? `What ${n} did` : "What they did",
47
- hint: "Every recorded change, by day and collection",
56
+ icon: /* @__PURE__ */ t($, { className: "h-4 w-4" }),
57
+ title: a ? `What ${a} did` : "What they did",
58
+ hint: "What they opened and changed, day by day",
48
59
  testId: "what-they-did",
49
- actions: /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
50
- /* @__PURE__ */ e(
51
- U,
60
+ actions: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
61
+ /* @__PURE__ */ t(
62
+ K,
52
63
  {
53
- value: i,
54
- onChange: h,
55
- options: E,
64
+ value: s,
65
+ onChange: c,
66
+ options: g,
56
67
  className: "h-7 w-[130px] text-[12px]",
57
- ariaLabel: "Window"
68
+ ariaLabel: "Period"
58
69
  }
59
70
  ),
60
- /* @__PURE__ */ o(
71
+ /* @__PURE__ */ n(
61
72
  "button",
62
73
  {
63
74
  type: "button",
64
- onClick: () => d.mutate(),
65
- disabled: d.isPending || !(a != null && a.total),
66
- className: "inline-flex h-7 items-center gap-1 rounded-md border border-slate-200 px-2 text-[12px] text-slate-700 hover:bg-muted disabled:opacity-50 dark:border-border dark:text-slate-200",
75
+ onClick: () => l.mutate(),
76
+ disabled: l.isPending || !(o != null && o.total),
77
+ "data-tip": "Download every entry in this period as a spreadsheet",
78
+ className: "inline-flex h-7 items-center gap-1 rounded-md border border-slate-200 px-2 text-[12px] text-slate-700 hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 disabled:opacity-50 dark:border-border dark:text-slate-200",
67
79
  "data-person-did-export": !0,
68
80
  children: [
69
- /* @__PURE__ */ e(C, { className: "h-3.5 w-3.5" }),
70
- d.isPending ? "Exporting…" : "CSV"
81
+ /* @__PURE__ */ t(R, { className: "h-3.5 w-3.5" }),
82
+ l.isPending ? "Exporting…" : "CSV"
71
83
  ]
72
84
  }
73
85
  )
74
86
  ] }),
75
- children: u ? /* @__PURE__ */ e("div", { className: "space-y-2", "aria-busy": "true", children: [0, 1, 2].map((l) => /* @__PURE__ */ e("div", { className: "h-9 animate-pulse rounded-md bg-slate-100 dark:bg-muted" }, l)) }) : p || !a ? /* @__PURE__ */ e(b, { children: "The activity could not be loaded." }) : a.days.length === 0 ? /* @__PURE__ */ e(b, { children: "Nothing recorded in this window." }) : /* @__PURE__ */ o("div", { className: "space-y-3", "data-person-did": !0, children: [
76
- /* @__PURE__ */ o("p", { className: "text-[11.5px] text-slate-500 dark:text-slate-400", children: [
77
- y(a.total),
78
- a.truncated ? "+" : "",
79
- " entries over ",
80
- a.days.length,
81
- " active day",
82
- a.days.length === 1 ? "" : "s",
83
- a.truncated ? " — the newest are shown; export for a shorter window." : ""
84
- ] }),
85
- a.days.map((l) => /* @__PURE__ */ e(W, { userId: r, group: l, tz: a.tz }, l.day))
86
- ] })
87
+ children: [
88
+ l.isError && /* @__PURE__ */ t(
89
+ S,
90
+ {
91
+ variant: "banner",
92
+ error: l.error,
93
+ fallback: "Could not export",
94
+ onRetry: () => l.mutate(),
95
+ actionLabel: "Export activity",
96
+ className: "mb-3"
97
+ }
98
+ ),
99
+ u ? /* @__PURE__ */ t("div", { className: "space-y-4", "aria-busy": "true", "data-person-did-loading": !0, children: [0, 1].map((i) => /* @__PURE__ */ n("div", { className: "space-y-1.5", children: [
100
+ /* @__PURE__ */ t("div", { className: "h-3.5 w-28 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
101
+ /* @__PURE__ */ t("div", { className: "h-10 animate-pulse rounded-md bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
102
+ /* @__PURE__ */ t("div", { className: "h-10 animate-pulse rounded-md bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
103
+ ] }, i)) }) : b || !o ? /* @__PURE__ */ t(j, { error: d, what: "this activity", onRetry: () => void h() }) : o.days.length === 0 ? /* @__PURE__ */ n(_, { children: [
104
+ "Nothing recorded in the ",
105
+ x,
106
+ "."
107
+ ] }) : /* @__PURE__ */ n("div", { className: "space-y-5", "data-person-did": !0, children: [
108
+ /* @__PURE__ */ n("p", { className: "text-[12px] text-slate-500 dark:text-slate-400", children: [
109
+ C(o.total),
110
+ o.truncated ? "+" : "",
111
+ " recorded action",
112
+ o.total === 1 ? "" : "s",
113
+ " over",
114
+ " ",
115
+ o.days.length,
116
+ " day",
117
+ o.days.length === 1 ? "" : "s",
118
+ o.truncated ? " — the newest are shown; export for the rest." : ""
119
+ ] }),
120
+ o.days.map((i) => /* @__PURE__ */ t(M, { userId: e, group: i, tz: o.tz }, i.day))
121
+ ] })
122
+ ]
87
123
  }
88
124
  );
89
125
  }
90
- function W({ userId: r, group: n, tz: s }) {
91
- return /* @__PURE__ */ o("section", { "data-person-did-day": n.day, children: [
92
- /* @__PURE__ */ o("h4", { className: "mb-1 flex items-baseline gap-2 text-[12px] font-semibold text-slate-700 dark:text-slate-200", children: [
93
- D(n.day, { weekday: "short" }),
94
- /* @__PURE__ */ e("span", { className: "font-normal text-slate-500 dark:text-slate-400", children: y(n.total) })
95
- ] }),
96
- /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 rounded-md border border-slate-200 dark:divide-border/60 dark:border-border", children: n.collections.map((i) => /* @__PURE__ */ e(
97
- P,
126
+ function M({ userId: e, group: a, tz: r }) {
127
+ return /* @__PURE__ */ n("section", { "data-person-did-day": a.day, children: [
128
+ /* @__PURE__ */ t("h4", { className: "mb-1.5 text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: P(a.day, {
129
+ weekday: "long",
130
+ month: "long",
131
+ day: "numeric",
132
+ year: a.day.startsWith(String((/* @__PURE__ */ new Date()).getFullYear())) ? void 0 : "numeric"
133
+ }) }),
134
+ /* @__PURE__ */ t("ul", { className: "divide-y divide-slate-100 overflow-hidden rounded-md border border-slate-200 dark:divide-border/60 dark:border-border", children: a.collections.map((s) => /* @__PURE__ */ t(
135
+ Y,
98
136
  {
99
- userId: r,
100
- day: n.day,
101
- tz: s,
102
- group: i
137
+ userId: e,
138
+ day: a.day,
139
+ tz: r,
140
+ group: s
103
141
  },
104
- i.collection ?? g
142
+ s.collection ?? T
105
143
  )) })
106
144
  ] });
107
145
  }
108
- function P({
109
- userId: r,
110
- day: n,
111
- tz: s,
112
- group: i
146
+ function V({ parts: e }) {
147
+ return /* @__PURE__ */ t(
148
+ "span",
149
+ {
150
+ className: "text-[12px] leading-5 text-slate-600 dark:text-slate-400",
151
+ "data-person-did-parts": !0,
152
+ children: e.map((a, r) => /* @__PURE__ */ n("span", { children: [
153
+ /* @__PURE__ */ n("span", { className: "whitespace-nowrap", children: [
154
+ a.verb,
155
+ a.count > 1 && /* @__PURE__ */ t("span", { className: "ml-1 tabular-nums text-slate-500 dark:text-slate-400", children: C(a.count) }),
156
+ r < e.length - 1 && /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "pl-1 text-slate-300 dark:text-slate-600", children: "·" })
157
+ ] }),
158
+ r < e.length - 1 && " "
159
+ ] }, a.verb))
160
+ }
161
+ );
162
+ }
163
+ function Y({
164
+ userId: e,
165
+ day: a,
166
+ tz: r,
167
+ group: s
113
168
  }) {
114
- const h = N(), c = T(), [a, u] = v(!1), p = i.collection ?? g, { data: d, isLoading: l } = f({
115
- queryKey: ["nvr-person-did-entries", r, n, p, s],
116
- enabled: a,
117
- queryFn: () => h.request(
118
- k(`/activity/people/${r}/entries`, { day: n, collection: p, tz: s })
119
- ).then((t) => t.data),
169
+ var l, x, p;
170
+ const c = w(), [m, o] = k(!1), u = s.collection ?? T, b = s.label ?? Q(s.collection), d = N({
171
+ queryKey: ["nvr-person-did-lines", e, a, u, r],
172
+ enabled: m,
173
+ queryFn: () => c.request(
174
+ L(`/activity/people/${e}/entries`, { day: a, collection: u, tz: r })
175
+ ),
120
176
  staleTime: 6e4
121
- });
122
- return /* @__PURE__ */ o("li", { children: [
123
- /* @__PURE__ */ o(
177
+ }), h = `person-did-${a}-${u}`;
178
+ return /* @__PURE__ */ n("li", { "data-person-did-group": u, children: [
179
+ /* @__PURE__ */ n(
124
180
  "button",
125
181
  {
126
182
  type: "button",
127
- onClick: () => u((t) => !t),
128
- "aria-expanded": a,
129
- className: "flex w-full items-center gap-2 px-3 py-2 text-left text-[12.5px] hover:bg-muted",
183
+ onClick: () => o((i) => !i),
184
+ "aria-expanded": m,
185
+ "aria-controls": h,
186
+ className: "flex w-full items-start gap-2 px-3 py-2.5 text-left hover:bg-slate-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan/50 dark:hover:bg-muted/50",
130
187
  children: [
131
- /* @__PURE__ */ e(
132
- S,
188
+ /* @__PURE__ */ t(
189
+ q,
133
190
  {
134
- className: O(
135
- "h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform",
136
- a && "rotate-90"
191
+ "aria-hidden": !0,
192
+ className: W(
193
+ "mt-[3px] h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform duration-150 motion-reduce:transition-none",
194
+ m && "rotate-90"
137
195
  )
138
196
  }
139
197
  ),
140
- /* @__PURE__ */ e("span", { className: "font-medium text-slate-800 dark:text-slate-100", children: $(i.collection) }),
141
- /* @__PURE__ */ e("span", { className: "min-w-0 truncate text-[11.5px] text-slate-500 dark:text-slate-400", children: F(i.actions) }),
142
- /* @__PURE__ */ e("span", { className: "ml-auto shrink-0 tabular-nums text-slate-600 dark:text-slate-300", children: y(i.count) })
198
+ /* @__PURE__ */ n("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5 sm:flex-row sm:items-baseline sm:gap-3", children: [
199
+ /* @__PURE__ */ t("span", { className: "shrink-0 text-[13px] font-medium text-slate-800 dark:text-slate-100", children: b }),
200
+ /* @__PURE__ */ t(V, { parts: B(s) })
201
+ ] })
143
202
  ]
144
203
  }
145
204
  ),
146
- a && /* @__PURE__ */ e("div", { className: "border-t border-slate-100 bg-slate-50 px-3 py-2 dark:border-border/60 dark:bg-muted/30", children: l ? /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-slate-400", children: "Loading…" }) : /* @__PURE__ */ o("ol", { className: "space-y-1", children: [
147
- (d ?? []).map((t) => {
148
- const m = t.collection && t.item && !/^(nivaro|directus)_/.test(t.collection) ? { collection: t.collection, itemId: t.item } : null;
149
- return /* @__PURE__ */ o("li", { className: "flex items-baseline gap-2 text-[11.5px]", children: [
150
- /* @__PURE__ */ e("time", { className: "w-14 shrink-0 tabular-nums text-slate-500 dark:text-slate-400", children: new Intl.DateTimeFormat("en-US", {
151
- hour: "numeric",
152
- minute: "2-digit",
153
- timeZone: s
154
- }).format(new Date(t.timestamp)) }),
155
- /* @__PURE__ */ e("span", { className: "shrink-0 font-medium text-slate-700 dark:text-slate-200", children: t.action.replace(/[-_]/g, " ") }),
156
- t.item && (m ? /* @__PURE__ */ o(
157
- "button",
158
- {
159
- type: "button",
160
- className: "shrink-0 text-nvr-navy hover:underline dark:text-nvr-cyan",
161
- onClick: () => c.open(m),
162
- children: [
163
- "#",
164
- t.item
165
- ]
166
- }
167
- ) : /* @__PURE__ */ o("span", { className: "shrink-0 font-mono text-slate-500 dark:text-slate-400", children: [
168
- "#",
169
- t.item
170
- ] })),
171
- t.comment && /* @__PURE__ */ e(
172
- "span",
173
- {
174
- className: "min-w-0 truncate text-slate-500 dark:text-slate-400",
175
- title: t.comment,
176
- children: t.comment
177
- }
178
- )
179
- ] }, t.id);
180
- }),
181
- (d == null ? void 0 : d.length) === 500 && /* @__PURE__ */ e("li", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: "The first 500 are shown — export for all." })
182
- ] }) })
205
+ m && /* @__PURE__ */ t(
206
+ "div",
207
+ {
208
+ id: h,
209
+ className: "border-t border-slate-100 bg-slate-50/70 px-3 py-2 dark:border-border/60 dark:bg-muted/20",
210
+ children: d.isLoading ? /* @__PURE__ */ t("div", { className: "space-y-2 py-1", "aria-busy": "true", children: [0, 1, 2].map((i) => /* @__PURE__ */ n("div", { className: "flex gap-3", children: [
211
+ /* @__PURE__ */ t("div", { className: "h-3 w-14 animate-pulse rounded bg-slate-200/70 dark:bg-muted" }),
212
+ /* @__PURE__ */ t("div", { className: "h-3 flex-1 animate-pulse rounded bg-slate-200/70 dark:bg-muted" })
213
+ ] }, i)) }) : d.isError ? /* @__PURE__ */ t(
214
+ S,
215
+ {
216
+ error: d.error,
217
+ what: "these entries",
218
+ onRetry: () => void d.refetch()
219
+ }
220
+ ) : (((l = d.data) == null ? void 0 : l.data) ?? []).length === 0 ? /* @__PURE__ */ t(_, { children: "Nothing to show for this day." }) : /* @__PURE__ */ n(
221
+ "ol",
222
+ {
223
+ className: "divide-y divide-slate-200/60 dark:divide-border/40",
224
+ "data-person-did-lines": !0,
225
+ children: [
226
+ (((x = d.data) == null ? void 0 : x.data) ?? []).map((i) => /* @__PURE__ */ t(G, { line: i, tz: r }, i.key)),
227
+ ((p = d.data) == null ? void 0 : p.truncated) && /* @__PURE__ */ t("li", { className: "pt-2 text-[11.5px] text-slate-500 dark:text-slate-400", children: "The newest 300 are shown — export for the rest." })
228
+ ]
229
+ }
230
+ )
231
+ }
232
+ )
183
233
  ] });
184
234
  }
235
+ function A({ line: e, generic: a }) {
236
+ const r = F();
237
+ if (!e.record)
238
+ return /* @__PURE__ */ t("span", { className: a ? "text-slate-500 dark:text-slate-400" : void 0, children: e.target });
239
+ const s = { collection: e.record.collection, itemId: e.record.id };
240
+ return /* @__PURE__ */ t(
241
+ "a",
242
+ {
243
+ href: r.urlFor(s),
244
+ onClick: (c) => {
245
+ c.metaKey || c.ctrlKey || c.shiftKey || (c.preventDefault(), r.open(s));
246
+ },
247
+ className: "rounded-sm text-sky-800 underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:text-nvr-cyan",
248
+ children: e.target
249
+ }
250
+ );
251
+ }
252
+ function G({ line: e, tz: a }) {
253
+ const r = e.first_at && e.count > 1 ? `${e.count} times, ${f(e.first_at, a)} – ${f(e.at, a)}` : void 0, s = !e.record && /^a .+ record$/.test(e.target);
254
+ return /* @__PURE__ */ n(
255
+ "li",
256
+ {
257
+ className: "relative grid grid-cols-[4.25rem_minmax(0,1fr)] gap-x-2 py-1.5 sm:grid-cols-[4.75rem_minmax(0,1fr)]",
258
+ "data-person-did-line": e.kind,
259
+ children: [
260
+ /* @__PURE__ */ t(
261
+ "time",
262
+ {
263
+ dateTime: e.at,
264
+ className: "pt-px text-[12px] tabular-nums text-slate-500 dark:text-slate-400",
265
+ children: f(e.at, a)
266
+ }
267
+ ),
268
+ /* @__PURE__ */ n("div", { className: "min-w-0", children: [
269
+ /* @__PURE__ */ n("p", { className: "text-[12.5px] leading-5 text-slate-700 dark:text-slate-300", children: [
270
+ /* @__PURE__ */ t("span", { className: "font-medium text-slate-900 dark:text-slate-100", children: e.verb }),
271
+ e.target && " ",
272
+ e.target && /* @__PURE__ */ t(A, { line: e, generic: s }),
273
+ e.count > 1 && /* @__PURE__ */ n(
274
+ "span",
275
+ {
276
+ className: "ml-1.5 whitespace-nowrap rounded bg-slate-200/70 px-1 py-px text-[11px] font-medium tabular-nums text-slate-600 dark:bg-muted dark:text-slate-300",
277
+ "data-tip": r,
278
+ children: [
279
+ /* @__PURE__ */ n("span", { "aria-hidden": !0, children: [
280
+ e.count,
281
+ "×"
282
+ ] }),
283
+ r && /* @__PURE__ */ t("span", { className: "sr-only", children: r })
284
+ ]
285
+ }
286
+ )
287
+ ] }),
288
+ e.detail && /* @__PURE__ */ t("p", { className: "text-[12px] leading-5 text-slate-500 dark:text-slate-400", children: e.detail }),
289
+ e.note && /* @__PURE__ */ n("p", { className: "text-[12px] leading-5 text-slate-600 dark:text-slate-400", children: [
290
+ "“",
291
+ e.note,
292
+ "”"
293
+ ] })
294
+ ] })
295
+ ]
296
+ }
297
+ );
298
+ }
185
299
  export {
186
- G as PersonDidPanel,
187
- $ as collectionName
300
+ oe as PersonDidPanel,
301
+ Q as collectionName
188
302
  };
@@ -9,24 +9,25 @@ import { DelegationCard as D } from "./DelegationCard.js";
9
9
  import { MyDefaultsCard as U } from "./MyDefaultsCard.js";
10
10
  import { SuspensionBanner as F, AccessCard as M, UserScopesCard as O, UserDirectoryCard as W, SessionsCard as j, ApiTokenCard as E } from "./PersonAccess.js";
11
11
  import { AccessSummaryCard as L } from "./PersonAccessSummary.js";
12
- import { StatsCard as R, ActivityFeedCard as V, SignInsCard as B, JourneyCard as H } from "./PersonActivity.js";
13
- import { ForceReloadCard as J, SignOutEverywhereCard as q, MergeCard as z, OffboardingCard as G } from "./PersonAdminTools.js";
14
- import { PersonAiMemoryCard as K } from "./PersonAiMemory.js";
15
- import { CompareAccessCard as Q } from "./PersonCompare.js";
16
- import { PersonDidPanel as X } from "./PersonDidPanel.js";
17
- import { WorkingOnCard as Y, TeamLoadCard as Z, WhyCard as $ } from "./PersonExtras.js";
18
- import { PersonHeader as ee } from "./PersonHeader.js";
19
- import { AboutCard as re, PeopleCard as ae, AvailabilityCard as de, ResponsibilitiesCard as se } from "./PersonOverview.js";
20
- import { PersonWeekCard as te } from "./PersonWeek.js";
21
- import { SignedInDevices as ie } from "./SignedInDevices.js";
22
- import { usePersonProfile as oe, useInvalidatePerson as ne } from "./types.js";
23
- function Ue({
12
+ import { StatsCard as R, SignInsCard as V, JourneyCard as B } from "./PersonActivity.js";
13
+ import { ForceReloadCard as H, SignOutEverywhereCard as J, MergeCard as q, OffboardingCard as z } from "./PersonAdminTools.js";
14
+ import { PersonAiMemoryCard as G } from "./PersonAiMemory.js";
15
+ import { CompareAccessCard as K } from "./PersonCompare.js";
16
+ import { PersonDidPanel as Q } from "./PersonDidPanel.js";
17
+ import { WorkingOnCard as X, TeamLoadCard as Y, WhyCard as Z } from "./PersonExtras.js";
18
+ import { PersonHeader as $ } from "./PersonHeader.js";
19
+ import { AboutCard as ee, PeopleCard as re, AvailabilityCard as ae, ResponsibilitiesCard as de } from "./PersonOverview.js";
20
+ import { PersonWeekCard as se } from "./PersonWeek.js";
21
+ import { SignedInDevices as te } from "./SignedInDevices.js";
22
+ import { usePersonProfile as ie, useInvalidatePerson as oe } from "./types.js";
23
+ import { ActivityFeedCard as ne } from "./ActivityFeedCard.js";
24
+ function Fe({
24
25
  userId: o,
25
26
  className: l,
26
27
  initialTab: h = "overview"
27
28
  }) {
28
29
  var v, g, f;
29
- const t = w(), s = !!(t != null && t.isAdmin), { data: e, isLoading: y, isError: x } = oe(o), N = ne(o), [u, C] = b(h), [c, k] = b("feed");
30
+ const t = w(), s = !!(t != null && t.isAdmin), { data: e, isLoading: y, isError: x } = ie(o), N = oe(o), [u, C] = b(h), [c, k] = b("feed");
30
31
  if (y || !e && !x) return /* @__PURE__ */ r(le, { className: l });
31
32
  if (!e)
32
33
  return /* @__PURE__ */ a(
@@ -45,17 +46,17 @@ function Ue({
45
46
  );
46
47
  const _ = !!(t != null && t.userId) && !!((v = e.manager) != null && v.id) && String(e.manager.id).toUpperCase() === String(t.userId).toUpperCase(), p = /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
47
48
  /* @__PURE__ */ a("div", { className: "space-y-4", children: [
48
- /* @__PURE__ */ r(re, { profile: e, isAdmin: s }),
49
- /* @__PURE__ */ r(Y, { profile: e }),
49
+ /* @__PURE__ */ r(ee, { profile: e, isAdmin: s }),
50
+ /* @__PURE__ */ r(X, { profile: e }),
50
51
  e.direct_reports.length > 0 && /* @__PURE__ */ r(
51
- Z,
52
+ Y,
52
53
  {
53
54
  userId: e.id,
54
55
  firstName: e.first_name ?? e.name,
55
56
  expectedRows: e.direct_reports.length
56
57
  }
57
58
  ),
58
- /* @__PURE__ */ r(ae, { profile: e })
59
+ /* @__PURE__ */ r(re, { profile: e })
59
60
  ] }),
60
61
  /* @__PURE__ */ a("div", { className: "space-y-4", children: [
61
62
  s ? /* @__PURE__ */ r(
@@ -78,13 +79,13 @@ function Ue({
78
79
  coversFor: e.covers_for,
79
80
  onSaved: N
80
81
  }
81
- ) : /* @__PURE__ */ r(de, { profile: e }),
82
- /* @__PURE__ */ r(se, { profile: e, isAdmin: s }),
83
- (s || _) && /* @__PURE__ */ r(te, { profile: e })
82
+ ) : /* @__PURE__ */ r(ae, { profile: e }),
83
+ /* @__PURE__ */ r(de, { profile: e, isAdmin: s }),
84
+ (s || _) && /* @__PURE__ */ r(se, { profile: e })
84
85
  ] })
85
86
  ] });
86
87
  return /* @__PURE__ */ a("div", { className: n("flex flex-col gap-4", l), "data-nvr-person": e.id, children: [
87
- /* @__PURE__ */ r(ee, { profile: e, isAdmin: s }),
88
+ /* @__PURE__ */ r($, { profile: e, isAdmin: s }),
88
89
  s && /* @__PURE__ */ r(F, { profile: e }),
89
90
  s ? /* @__PURE__ */ a(A, { value: u, onValueChange: (d) => C(d), children: [
90
91
  /* @__PURE__ */ r(
@@ -117,13 +118,13 @@ function Ue({
117
118
  /* @__PURE__ */ r(L, { userId: e.id }),
118
119
  /* @__PURE__ */ r(I, { userId: e.id }),
119
120
  /* @__PURE__ */ r(O, { userId: e.id }),
120
- /* @__PURE__ */ r($, { profile: e }),
121
- /* @__PURE__ */ r(Q, { profile: e })
121
+ /* @__PURE__ */ r(Z, { profile: e }),
122
+ /* @__PURE__ */ r(K, { profile: e })
122
123
  ] }),
123
124
  /* @__PURE__ */ a("div", { className: "space-y-4", children: [
124
125
  /* @__PURE__ */ r(W, { profile: e }),
125
126
  /* @__PURE__ */ r(j, { userId: e.id }),
126
- /* @__PURE__ */ r(ie, { userId: e.id, name: e.first_name ?? e.name }),
127
+ /* @__PURE__ */ r(te, { userId: e.id, name: e.first_name ?? e.name }),
127
128
  /* @__PURE__ */ r(E, { profile: e })
128
129
  ] })
129
130
  ] }) }),
@@ -159,24 +160,24 @@ function Ue({
159
160
  c === "day" && s ? /* @__PURE__ */ r(T, { userId: e.id }) : /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
160
161
  /* @__PURE__ */ a("div", { className: "space-y-4", children: [
161
162
  /* @__PURE__ */ r(R, { userId: e.id }),
162
- /* @__PURE__ */ r(V, { userId: e.id })
163
+ /* @__PURE__ */ r(ne, { userId: e.id })
163
164
  ] }),
164
165
  /* @__PURE__ */ a("div", { className: "space-y-4", children: [
165
- /* @__PURE__ */ r(B, { profile: e }),
166
- /* @__PURE__ */ r(H, { userId: e.id })
166
+ /* @__PURE__ */ r(V, { profile: e }),
167
+ /* @__PURE__ */ r(B, { userId: e.id })
167
168
  ] })
168
169
  ] })
169
170
  ] }),
170
- /* @__PURE__ */ r(i, { value: "did", className: "mt-4 focus-visible:outline-none", children: u === "did" && /* @__PURE__ */ r(X, { userId: e.id, name: e.first_name ?? e.name }) }),
171
+ /* @__PURE__ */ r(i, { value: "did", className: "mt-4 focus-visible:outline-none", children: u === "did" && /* @__PURE__ */ r(Q, { userId: e.id, name: e.first_name ?? e.name }) }),
171
172
  /* @__PURE__ */ r(i, { value: "tools", className: "mt-4 focus-visible:outline-none", children: /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
172
173
  /* @__PURE__ */ a("div", { className: "space-y-4", children: [
174
+ /* @__PURE__ */ r(H, { profile: e }),
173
175
  /* @__PURE__ */ r(J, { profile: e }),
174
- /* @__PURE__ */ r(q, { profile: e }),
175
- /* @__PURE__ */ r(z, { profile: e })
176
+ /* @__PURE__ */ r(q, { profile: e })
176
177
  ] }),
177
178
  /* @__PURE__ */ a("div", { className: "space-y-4", children: [
179
+ /* @__PURE__ */ r(z, { profile: e }),
178
180
  /* @__PURE__ */ r(G, { profile: e }),
179
- /* @__PURE__ */ r(K, { profile: e }),
180
181
  /* @__PURE__ */ r(U, { userId: e.id, name: e.first_name ?? e.name })
181
182
  ] })
182
183
  ] }) })
@@ -200,5 +201,5 @@ function le({ className: o }) {
200
201
  ] });
201
202
  }
202
203
  export {
203
- Ue as PersonProfile
204
+ Fe as PersonProfile
204
205
  };