@nivaro/react 0.3.65 → 0.3.67

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 (43) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +21 -5
  4. package/dist/shared/components/ActivityEntry.js +28 -28
  5. package/dist/shared/components/CollectionBrowserView.js +2432 -2592
  6. package/dist/shared/components/ItemEditForm.js +3912 -3773
  7. package/dist/shared/components/MyWorkView.js +124 -113
  8. package/dist/shared/components/ProfileView.js +483 -472
  9. package/dist/shared/components/RecordCompare.js +149 -129
  10. package/dist/shared/components/ReportView.js +1100 -1094
  11. package/dist/shared/components/bulk/BulkCompareButton.js +62 -0
  12. package/dist/shared/components/bulk/MessageStakeholders.js +235 -0
  13. package/dist/shared/components/integrations/IntegrationObligationsView.js +199 -187
  14. package/dist/shared/components/integrations/console/EventsView.js +22 -24
  15. package/dist/shared/components/integrations/console/SubmissionRow.js +6 -13
  16. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +29 -28
  17. package/dist/shared/components/integrations/console/tone.js +22 -21
  18. package/dist/shared/components/item-edit/CatalogPickerField.js +240 -238
  19. package/dist/shared/components/item-edit/FieldRow.js +193 -193
  20. package/dist/shared/components/item-edit/GroupSection.js +559 -542
  21. package/dist/shared/components/item-edit/M2MCombobox.js +414 -349
  22. package/dist/shared/components/item-edit/MidairCollisionDialog.js +211 -187
  23. package/dist/shared/components/item-edit/RecordInsights.js +46 -45
  24. package/dist/shared/components/item-edit/RelationCombobox.js +327 -311
  25. package/dist/shared/components/item-edit/SummaryPanel.js +146 -144
  26. package/dist/shared/components/item-edit/UserChip.js +264 -229
  27. package/dist/shared/components/item-edit/cascade-clear-notice.js +23 -19
  28. package/dist/shared/components/item-edit/header-path-preview.js +52 -0
  29. package/dist/shared/components/item-edit/line-merge.js +73 -47
  30. package/dist/shared/components/item-edit/picker-search.js +25 -21
  31. package/dist/shared/components/panels/BranchLanes.js +7 -7
  32. package/dist/shared/components/panels/CommentPanel.js +72 -72
  33. package/dist/shared/components/panels/PipelinePanel.js +261 -261
  34. package/dist/shared/components/panels/RecordIntegrityBanner.js +78 -78
  35. package/dist/shared/components/panels/RevisionsPanel.js +220 -220
  36. package/dist/shared/components/panels/TaskPanel.js +75 -75
  37. package/dist/shared/components/queue/QueueWorklist.js +1007 -979
  38. package/dist/shared/lib/compare-value.js +73 -0
  39. package/dist/shared/lib/format-value.js +19 -18
  40. package/dist/shared/lib/obligation-reason-text.js +1 -1
  41. package/dist/shared/lib/quick-filter-cascade.js +29 -19
  42. package/dist/shared/lib/utils.js +59 -57
  43. package/package.json +1 -1
@@ -1,32 +1,32 @@
1
1
  import { jsxs as s, jsx as e, Fragment as Y } from "react/jsx-runtime";
2
- import { useQueryClient as ve, useQuery as z, useMutation as L } from "@tanstack/react-query";
3
- import { MessageSquare as De, ChevronDown as Pe, ClipboardPlus as Te, Pencil as Fe, Trash2 as Re, Check as Me, X as Ie, SmilePlus as ke } from "lucide-react";
2
+ import { useQueryClient as ve, useQuery as z, useMutation as A } from "@tanstack/react-query";
3
+ import { MessageSquare as De, ChevronDown as Te, ClipboardPlus as Pe, Pencil as Fe, Trash2 as Re, Check as Me, X as Ie, SmilePlus as ke } from "lucide-react";
4
4
  import { useState as N, useRef as U, useEffect as Q, useMemo as V } from "react";
5
5
  import { createPortal as je } from "react-dom";
6
6
  import { toast as I } from "sonner";
7
- import { useNivaroClient as oe, useItemEditAuth as Oe, useDrilldown as Le } from "../../context.js";
8
- import { useDebounced as Ae } from "../../hooks/useDebounced.js";
7
+ import { useNivaroClient as oe, useItemEditAuth as Oe, useDrilldown as Ae } from "../../context.js";
8
+ import { useDebounced as Le } from "../../hooks/useDebounced.js";
9
9
  import { get as W, post as B, patch as Ke, del as Be } from "../../lib/commands.js";
10
10
  import { usePresenceOnlinePoll as Qe } from "../../lib/presence-live.js";
11
11
  import { useRecordSignalPeers as ze, useRecordSignalSender as Ue, signalSentence as We } from "../../lib/presence-signals.js";
12
12
  import { invalidateRecordTasks as Ge } from "../../lib/record-tasks.js";
13
- import { formatRelative as le, titleCase as He } from "../../lib/utils.js";
14
- import { AgentBadge as Xe } from "../AgentBadge.js";
13
+ import { formatRelative as le, titleCase as He, formatDateTime as Xe } from "../../lib/utils.js";
14
+ import { AgentBadge as Je } from "../AgentBadge.js";
15
15
  import { AutolinkedText as se } from "../AutolinkedText.js";
16
- import { InboundRequestPopover as Je } from "../integrations/InboundRequest.js";
17
- import { useFieldComments as Ve } from "../item-edit/field-comments-context.js";
18
- import { UserAvatar as Ze } from "../UserAvatar.js";
19
- import { Avatar as Ye, AvatarFallback as et } from "../ui/avatar.js";
16
+ import { InboundRequestPopover as Ve } from "../integrations/InboundRequest.js";
17
+ import { useFieldComments as Ze } from "../item-edit/field-comments-context.js";
18
+ import { UserAvatar as Ye } from "../UserAvatar.js";
19
+ import { Avatar as et, AvatarFallback as tt } from "../ui/avatar.js";
20
20
  import { Button as Z } from "../ui/button.js";
21
21
  import { Separator as fe } from "../ui/separator.js";
22
- import { Textarea as tt } from "../ui/textarea.js";
23
- import { RecordEventPathSheet as nt } from "./IntegrationActivitySection.js";
22
+ import { Textarea as nt } from "../ui/textarea.js";
23
+ import { RecordEventPathSheet as rt } from "./IntegrationActivitySection.js";
24
24
  const Ne = ["👍", "✅", "👀", "🎉", "❤️", "😂"];
25
- function rt(t) {
25
+ function at(t) {
26
26
  var d, c, h, m;
27
27
  return [(d = t.first_name) == null ? void 0 : d[0], (c = t.last_name) == null ? void 0 : c[0]].filter(Boolean).join("").toUpperCase() || ((m = (h = t.email) == null ? void 0 : h[0]) == null ? void 0 : m.toUpperCase()) || "?";
28
28
  }
29
- function at({ comment: t }) {
29
+ function st({ comment: t }) {
30
30
  const l = (t.mentions ?? []).filter(
31
31
  (d) => {
32
32
  var c;
@@ -44,7 +44,7 @@ function at({ comment: t }) {
44
44
  "span",
45
45
  {
46
46
  "data-mention-seen": d.seen_at ? "seen" : "unseen",
47
- title: d.seen_at ? `Seen ${new Date(d.seen_at).toLocaleString()}` : "Not seen yet",
47
+ title: d.seen_at ? `Seen ${Xe(d.seen_at)}` : "Not seen yet",
48
48
  className: d.seen_at ? "text-emerald-600 dark:text-emerald-400" : "text-slate-400",
49
49
  children: [
50
50
  d.seen_at ? "✓ " : "",
@@ -61,7 +61,7 @@ function at({ comment: t }) {
61
61
  function re(t) {
62
62
  return [t.first_name, t.last_name].filter(Boolean).join(" ") || t.email;
63
63
  }
64
- function st({
64
+ function ot({
65
65
  field: t,
66
66
  label: l,
67
67
  resolved: d,
@@ -84,7 +84,7 @@ function st({
84
84
  }
85
85
  ) : /* @__PURE__ */ e("span", { "data-comment-field": t, className: m, children: h });
86
86
  }
87
- function ot(t, l) {
87
+ function lt(t, l) {
88
88
  const c = t.slice(0, l).match(/(^|\s)@([a-zA-Z0-9._-]{2,})$/);
89
89
  return c ? { start: l - c[2].length - 1, query: c[2] } : null;
90
90
  }
@@ -96,7 +96,7 @@ function ae({
96
96
  onChange: l,
97
97
  ...d
98
98
  }) {
99
- const c = oe(), h = U(null), [m, C] = N(null), [y, w] = N(0), v = Ae((m == null ? void 0 : m.query) ?? "", 200), { data: q = [] } = z({
99
+ const c = oe(), h = U(null), [m, C] = N(null), [y, w] = N(0), v = Le((m == null ? void 0 : m.query) ?? "", 200), { data: q = [] } = z({
100
100
  queryKey: ["users", "mention-search", v],
101
101
  queryFn: () => c.request(
102
102
  W("/users", { limit: 8, sort: "first_name", search: v })
@@ -122,9 +122,9 @@ function ae({
122
122
  staleTime: 5 * 6e4
123
123
  }), S = m ? D.filter(
124
124
  (n) => n.name.toLowerCase().replace(/\s+/g, "-").startsWith(v.toLowerCase())
125
- ).slice(0, 3) : [], k = !!m && v.length >= 2 && "owners".startsWith(v.toLowerCase()), P = !!m && v.length >= 2 && (u.length > 0 || k || S.length > 0), o = u.length + (k ? 1 : 0) + S.length, [f, $] = N(null), O = U(null);
125
+ ).slice(0, 3) : [], k = !!m && v.length >= 2 && "owners".startsWith(v.toLowerCase()), T = !!m && v.length >= 2 && (u.length > 0 || k || S.length > 0), o = u.length + (k ? 1 : 0) + S.length, [f, $] = N(null), O = U(null);
126
126
  Q(() => {
127
- if (!P || !h.current) {
127
+ if (!T || !h.current) {
128
128
  $(null);
129
129
  return;
130
130
  }
@@ -137,23 +137,23 @@ function ae({
137
137
  return window.addEventListener("scroll", i, !0), window.addEventListener("resize", p), () => {
138
138
  window.removeEventListener("scroll", i, !0), window.removeEventListener("resize", p);
139
139
  };
140
- }, [P]);
140
+ }, [T]);
141
141
  function G(n) {
142
- const i = ot(n.value, n.selectionStart ?? n.value.length);
142
+ const i = lt(n.value, n.selectionStart ?? n.value.length);
143
143
  C(i), i || w(0);
144
144
  }
145
- function T(n) {
145
+ function P(n) {
146
146
  if (!m || !h.current) return;
147
147
  const i = h.current.selectionStart ?? t.length, p = n === "__owners__" ? "@owners " : typeof n == "object" && "role" in n ? `@${n.role.toLowerCase().replace(/\s+/g, "-")} ` : `@${ge(n)} `, b = t.slice(0, m.start) + p + t.slice(i);
148
148
  l(b), C(null), w(0);
149
149
  const g = m.start + p.length;
150
150
  requestAnimationFrame(() => {
151
- var j, A;
152
- (j = h.current) == null || j.focus(), (A = h.current) == null || A.setSelectionRange(g, g);
151
+ var j, L;
152
+ (j = h.current) == null || j.focus(), (L = h.current) == null || L.setSelectionRange(g, g);
153
153
  });
154
154
  }
155
155
  function H(n) {
156
- if (P)
156
+ if (T)
157
157
  if (n.key === "ArrowDown")
158
158
  n.preventDefault(), w((i) => (i + 1) % o);
159
159
  else if (n.key === "ArrowUp")
@@ -161,16 +161,16 @@ function ae({
161
161
  else if (n.key === "Enter" || n.key === "Tab") {
162
162
  n.preventDefault();
163
163
  const i = Math.min(y, o - 1), p = k ? 1 : 0, b = p + u.length;
164
- if (k && i === 0) T("__owners__");
164
+ if (k && i === 0) P("__owners__");
165
165
  else if (i >= b) {
166
166
  const g = S[i - b];
167
- g && T({ role: g.name });
168
- } else T(u[i - p]);
167
+ g && P({ role: g.name });
168
+ } else P(u[i - p]);
169
169
  } else n.key === "Escape" && (n.preventDefault(), C(null));
170
170
  }
171
171
  return /* @__PURE__ */ s("div", { className: "relative", children: [
172
172
  /* @__PURE__ */ e(
173
- tt,
173
+ nt,
174
174
  {
175
175
  ...d,
176
176
  ref: h,
@@ -183,7 +183,7 @@ function ae({
183
183
  onBlur: () => setTimeout(() => C(null), 150)
184
184
  }
185
185
  ),
186
- P && f && je(
186
+ T && f && je(
187
187
  /* @__PURE__ */ s(
188
188
  "div",
189
189
  {
@@ -198,7 +198,7 @@ function ae({
198
198
  {
199
199
  type: "button",
200
200
  onMouseDown: (n) => {
201
- n.preventDefault(), T("__owners__");
201
+ n.preventDefault(), P("__owners__");
202
202
  },
203
203
  onMouseEnter: () => w(0),
204
204
  className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${y === 0 ? "bg-nvr-cyan/10" : ""}`,
@@ -218,8 +218,8 @@ function ae({
218
218
  "button",
219
219
  {
220
220
  type: "button",
221
- onMouseDown: (A) => {
222
- A.preventDefault(), T(n);
221
+ onMouseDown: (L) => {
222
+ L.preventDefault(), P(n);
223
223
  },
224
224
  onMouseEnter: () => w(p),
225
225
  className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${p === y ? "bg-nvr-cyan/10" : ""}`,
@@ -262,7 +262,7 @@ function ae({
262
262
  {
263
263
  type: "button",
264
264
  onMouseDown: (b) => {
265
- b.preventDefault(), T({ role: n.name });
265
+ b.preventDefault(), P({ role: n.name });
266
266
  },
267
267
  onMouseEnter: () => w(p),
268
268
  className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${p === y ? "bg-nvr-cyan/10" : ""}`,
@@ -296,29 +296,29 @@ function ye(t) {
296
296
  return "system";
297
297
  }
298
298
  }
299
- const lt = {
299
+ const it = {
300
300
  people: "People",
301
301
  system: "System",
302
302
  integration: "Integration"
303
303
  };
304
- function it(t) {
304
+ function dt(t) {
305
305
  const l = t.kind === "comment" ? t.comment.text : t.note.text;
306
306
  return (t.kind === "comment" ? l.replace(/<[^>]*>/g, " ") : l).replace(/@\[([^\]]+)\]/g, "@$1").replace(/\s+/g, " ").trim();
307
307
  }
308
- const dt = "integrations:";
309
- function ct({
308
+ const ct = "integrations:";
309
+ function mt({
310
310
  note: t,
311
311
  collection: l,
312
312
  item: d
313
313
  }) {
314
- var P;
315
- const c = Le(), [h, m] = N(!1), C = t.source === "external" && !!t.provider && !t.provider.startsWith(dt), y = oe(), w = ve(), [v, q] = N(!1), F = L({
314
+ var T;
315
+ const c = Ae(), [h, m] = N(!1), C = t.source === "external" && !!t.provider && !t.provider.startsWith(ct), y = oe(), w = ve(), [v, q] = N(!1), F = A({
316
316
  mutationFn: (o) => y.request(B(`/comments/${t.comment_id}/reactions`, { emoji: o })),
317
317
  onSuccess: () => {
318
318
  q(!1), w.invalidateQueries({ queryKey: ["comments-related"] }), w.invalidateQueries({ queryKey: ["row-comment-counts"] });
319
319
  },
320
320
  onError: () => I.error("Failed to react")
321
- }), [E, _] = N(!1), u = L({
321
+ }), [E, _] = N(!1), u = A({
322
322
  mutationFn: () => y.request(
323
323
  B(`/integration-events/${encodeURIComponent(t.provider ?? "")}/replay`, {
324
324
  entry_id: t.id.replace(/^external:/, "")
@@ -345,7 +345,7 @@ function ct({
345
345
  return;
346
346
  }
347
347
  c == null || c.open({ collection: o.collection, itemId: o.item_id });
348
- } : null, S = t.source === "transition" ? "border-nvr-cyan/30 bg-nvr-cyan/[0.06] text-nvr-navy dark:text-nvr-cyan" : t.source === "addendum" ? "border-amber-200 bg-amber-50/60 text-amber-700 dark:border-amber-900/40 dark:bg-amber-900/10 dark:text-amber-400" : t.source === "external" || t.source === "inbound" ? "border-sky-200 bg-sky-50/70 text-sky-700 dark:border-sky-900/40 dark:bg-sky-900/10 dark:text-sky-300" : t.source === "import" ? "border-emerald-200 bg-emerald-50/70 text-emerald-700 dark:border-emerald-900/40 dark:bg-emerald-900/10 dark:text-emerald-300" : "border-slate-200 bg-slate-50/80 text-slate-600 dark:border-border dark:bg-muted/40 dark:text-slate-300", k = t.source === "import" && ((P = t.import) != null && P.file_id) ? t.import : null;
348
+ } : null, S = t.source === "transition" ? "border-nvr-cyan/30 bg-nvr-cyan/[0.06] text-nvr-navy dark:text-nvr-cyan" : t.source === "addendum" ? "border-amber-200 bg-amber-50/60 text-amber-700 dark:border-amber-900/40 dark:bg-amber-900/10 dark:text-amber-400" : t.source === "external" || t.source === "inbound" ? "border-sky-200 bg-sky-50/70 text-sky-700 dark:border-sky-900/40 dark:bg-sky-900/10 dark:text-sky-300" : t.source === "import" ? "border-emerald-200 bg-emerald-50/70 text-emerald-700 dark:border-emerald-900/40 dark:bg-emerald-900/10 dark:text-emerald-300" : "border-slate-200 bg-slate-50/80 text-slate-600 dark:border-border dark:bg-muted/40 dark:text-slate-300", k = t.source === "import" && ((T = t.import) != null && T.file_id) ? t.import : null;
349
349
  return /* @__PURE__ */ s("div", { className: "flex gap-3", "data-recorded-note": t.source, children: [
350
350
  /* @__PURE__ */ e("div", { className: "mt-1 h-8 w-8 shrink-0", "aria-hidden": !0 }),
351
351
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
@@ -375,7 +375,7 @@ function ct({
375
375
  ) : /* @__PURE__ */ e("span", { className: "truncate text-[11px] text-slate-400", children: t.context })),
376
376
  /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: le(t.created_at) }),
377
377
  t.source === "inbound" && t.inbound && /* @__PURE__ */ e(
378
- Je,
378
+ Ve,
379
379
  {
380
380
  activityId: t.inbound.activity_id,
381
381
  callerName: t.label,
@@ -460,7 +460,7 @@ function ct({
460
460
  ] })
461
461
  ] }),
462
462
  C && t.provider && /* @__PURE__ */ e(
463
- nt,
463
+ rt,
464
464
  {
465
465
  target: h ? {
466
466
  source: t.provider,
@@ -473,7 +473,7 @@ function ct({
473
473
  )
474
474
  ] });
475
475
  }
476
- function Rt({
476
+ function Mt({
477
477
  collection: t,
478
478
  item: l,
479
479
  title: d,
@@ -482,7 +482,7 @@ function Rt({
482
482
  onQueueComment: m,
483
483
  onUnsentDraft: C
484
484
  }) {
485
- const y = oe(), { userId: w } = Oe(), v = ve(), q = Ve(), [F, E] = N(!1), _ = U(!1);
485
+ const y = oe(), { userId: w } = Oe(), v = ve(), q = Ze(), [F, E] = N(!1), _ = U(!1);
486
486
  Q(() => {
487
487
  !_.current && c !== void 0 && (_.current = !0, E(c));
488
488
  }, [c]);
@@ -491,10 +491,10 @@ function Rt({
491
491
  var r;
492
492
  (r = S.current) == null || r.call(S, u);
493
493
  }, [u]);
494
- const [k, P] = N(!1), o = async () => {
494
+ const [k, T] = N(!1), o = async () => {
495
495
  var r;
496
496
  if (!(!u.trim() || k)) {
497
- P(!0);
497
+ T(!0);
498
498
  try {
499
499
  const a = await y.request(
500
500
  B("/ai/cleanup", { text: u })
@@ -502,7 +502,7 @@ function Rt({
502
502
  (r = a.data) != null && r.text && D(a.data.text);
503
503
  } catch {
504
504
  } finally {
505
- P(!1);
505
+ T(!1);
506
506
  }
507
507
  }
508
508
  }, f = ze(t, l, "note"), $ = Ue(t, l, "note"), O = U(0);
@@ -514,7 +514,7 @@ function Rt({
514
514
  const r = Date.now();
515
515
  r - O.current < 2500 || (O.current = r, $("start"));
516
516
  }, [u, $]), Q(() => () => $("stop"), [$]);
517
- const [G, T] = N(null), [H, n] = N(null), [i, p] = N(""), b = !l || l === "new", g = ["comments", t, String(l)], { data: j, isLoading: A, isError: we } = z({
517
+ const [G, P] = N(null), [H, n] = N(null), [i, p] = N(""), b = !l || l === "new", g = ["comments", t, String(l)], { data: j, isLoading: L, isError: we } = z({
518
518
  queryKey: g,
519
519
  queryFn: () => y.request(W("/comments", { collection: t, item: l })).then((r) => r.data),
520
520
  enabled: !b
@@ -536,27 +536,27 @@ function Rt({
536
536
  }, [R, X, J]), $e = (r) => Ce((a) => {
537
537
  const x = new Set(a);
538
538
  return x.has(r) ? x.delete(r) : x.add(r), x;
539
- }), qe = X.size > 0 || J.trim() !== "", te = L({
539
+ }), qe = X.size > 0 || J.trim() !== "", te = A({
540
540
  mutationFn: (r) => y.request(B("/comments", { collection: t, item: l, text: r })),
541
541
  onSuccess: () => {
542
542
  v.invalidateQueries({ queryKey: g }), D("");
543
543
  },
544
544
  onError: () => I.error("Failed to post comment")
545
- }), ue = L({
545
+ }), ue = A({
546
546
  mutationFn: ({ id: r, text: a }) => y.request(Ke(`/comments/${r}`, { text: a })),
547
547
  onSuccess: () => {
548
- v.invalidateQueries({ queryKey: g }), T(null), p("");
548
+ v.invalidateQueries({ queryKey: g }), P(null), p("");
549
549
  },
550
550
  onError: () => I.error("Failed to update comment")
551
- }), ne = L({
551
+ }), ne = A({
552
552
  mutationFn: (r) => y.request(Be(`/comments/${r}`)),
553
553
  onSuccess: () => v.invalidateQueries({ queryKey: g }),
554
554
  onError: () => I.error("Failed to delete comment")
555
- }), pe = L({
555
+ }), pe = A({
556
556
  mutationFn: ({ id: r, emoji: a }) => y.request(B(`/comments/${r}/reactions`, { emoji: a })),
557
557
  onSuccess: () => v.invalidateQueries({ queryKey: g }),
558
558
  onError: () => I.error("Failed to react")
559
- }), [xe, he] = N(null), Ee = L({
559
+ }), [xe, he] = N(null), Ee = A({
560
560
  mutationFn: (r) => y.request(
561
561
  B("/tasks", {
562
562
  collection: t,
@@ -603,14 +603,14 @@ function Rt({
603
603
  }
604
604
  ),
605
605
  /* @__PURE__ */ e(
606
- Pe,
606
+ Te,
607
607
  {
608
608
  className: `ml-auto h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform duration-150${F ? " rotate-180" : ""}`
609
609
  }
610
610
  )
611
611
  ] }),
612
612
  !F && !b && R.length > 0 && (() => {
613
- const r = R[0], a = r.kind === "comment" ? re(r.comment.user) : r.note.user_name ?? "System", x = it(r);
613
+ const r = R[0], a = r.kind === "comment" ? re(r.comment.user) : r.note.user_name ?? "System", x = dt(r);
614
614
  return x ? /* @__PURE__ */ s("span", { className: "mt-1 w-full truncate pl-6 text-[11.5px] text-slate-400", children: [
615
615
  /* @__PURE__ */ s("span", { className: "font-medium text-slate-500 dark:text-slate-400", children: [
616
616
  a,
@@ -711,7 +711,7 @@ function Rt({
711
711
  className: `inline-flex items-center gap-1 rounded-full border px-2 py-px text-[11px] font-medium transition-colors ${a ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 text-slate-400 line-through decoration-slate-300 dark:border-border"} disabled:opacity-50`,
712
712
  title: r === "people" ? "Comments and notes people wrote" : r === "system" ? "State changes, change reasons, addendums and imports" : "Events an integration recorded",
713
713
  children: [
714
- lt[r],
714
+ it[r],
715
715
  /* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] opacity-70", children: x })
716
716
  ]
717
717
  },
@@ -735,7 +735,7 @@ function Rt({
735
735
  R.length
736
736
  ] })
737
737
  ] }),
738
- A ? /* @__PURE__ */ e("div", { className: "space-y-4", children: ["a", "b"].map((r) => /* @__PURE__ */ s("div", { className: "flex gap-3", children: [
738
+ L ? /* @__PURE__ */ e("div", { className: "space-y-4", children: ["a", "b"].map((r) => /* @__PURE__ */ s("div", { className: "flex gap-3", children: [
739
739
  /* @__PURE__ */ e("div", { className: "h-8 w-8 shrink-0 animate-pulse rounded-full bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
740
740
  /* @__PURE__ */ s("div", { className: "flex-1 space-y-1.5", children: [
741
741
  /* @__PURE__ */ e("div", { className: "h-3 w-32 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
@@ -744,7 +744,7 @@ function Rt({
744
744
  ] }, r)) }) : we ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-red-500", children: "Failed to load comments." }) : R.length === 0 ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes yet." }) : ee.length === 0 ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes match — clear the search or turn a filter back on." }) : /* @__PURE__ */ e("div", { className: "nvr-stagger-direct space-y-4", children: ee.map((r) => {
745
745
  if (r.kind === "related")
746
746
  return /* @__PURE__ */ e("div", { className: "nvr-section-enter", children: /* @__PURE__ */ e(
747
- ct,
747
+ mt,
748
748
  {
749
749
  note: r.note,
750
750
  collection: t,
@@ -754,21 +754,21 @@ function Rt({
754
754
  const a = r.comment, x = w === a.user.id, K = G === a.id;
755
755
  return /* @__PURE__ */ s("div", { className: "nvr-section-enter group flex gap-3", children: [
756
756
  /* @__PURE__ */ e(
757
- Ze,
757
+ Ye,
758
758
  {
759
759
  userId: a.user.id,
760
760
  className: "h-8 w-8",
761
- fallback: /* @__PURE__ */ e(Ye, { className: "h-8 w-8 shrink-0", children: /* @__PURE__ */ e(et, { className: "bg-nvr-cyan/15 text-[11px] font-bold text-nvr-navy", children: rt(a.user) }) })
761
+ fallback: /* @__PURE__ */ e(et, { className: "h-8 w-8 shrink-0", children: /* @__PURE__ */ e(tt, { className: "bg-nvr-cyan/15 text-[11px] font-bold text-nvr-navy", children: at(a.user) }) })
762
762
  }
763
763
  ),
764
764
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
765
765
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
766
766
  /* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800", children: re(a.user) }),
767
- /* @__PURE__ */ e(Xe, { label: a.via_agent }),
767
+ /* @__PURE__ */ e(Je, { label: a.via_agent }),
768
768
  /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: le(a.created_at) }),
769
769
  a.updated_at && a.updated_at !== a.created_at && /* @__PURE__ */ e("span", { className: "text-[10px] text-slate-300", children: "(edited)" }),
770
770
  a.field && /* @__PURE__ */ e(
771
- st,
771
+ ot,
772
772
  {
773
773
  field: a.field,
774
774
  label: (q == null ? void 0 : q.labelOf(a.field)) ?? He(a.field),
@@ -789,7 +789,7 @@ function Rt({
789
789
  "aria-label": "Make a task from this comment",
790
790
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted",
791
791
  onClick: () => Ee.mutate(a),
792
- children: /* @__PURE__ */ e(Te, { className: "h-3 w-3" })
792
+ children: /* @__PURE__ */ e(Pe, { className: "h-3 w-3" })
793
793
  }
794
794
  ),
795
795
  x && (H === a.id ? /* @__PURE__ */ s(Y, { children: [
@@ -825,7 +825,7 @@ function Rt({
825
825
  "aria-label": "Edit comment",
826
826
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700",
827
827
  onClick: () => {
828
- T(a.id), p(a.text);
828
+ P(a.id), p(a.text);
829
829
  },
830
830
  children: /* @__PURE__ */ e(Fe, { className: "h-3 w-3" })
831
831
  }
@@ -877,7 +877,7 @@ function Rt({
877
877
  variant: "outline",
878
878
  className: "h-7 gap-1.5",
879
879
  onClick: () => {
880
- T(null), p("");
880
+ P(null), p("");
881
881
  },
882
882
  children: [
883
883
  /* @__PURE__ */ e(Ie, { className: "h-3 w-3" }),
@@ -887,7 +887,7 @@ function Rt({
887
887
  )
888
888
  ] })
889
889
  ] }) : /* @__PURE__ */ e("p", { className: "mt-0.5 whitespace-pre-wrap text-[13px] leading-relaxed text-slate-600", children: /* @__PURE__ */ e(se, { text: a.text }) }),
890
- !K && /* @__PURE__ */ e(at, { comment: a }),
890
+ !K && /* @__PURE__ */ e(st, { comment: a }),
891
891
  !K && /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-1", children: [
892
892
  (a.reactions ?? []).map((M) => /* @__PURE__ */ s(
893
893
  "button",
@@ -937,7 +937,7 @@ function Rt({
937
937
  );
938
938
  }
939
939
  export {
940
- Rt as CommentPanel,
940
+ Mt as CommentPanel,
941
941
  ae as MentionTextarea,
942
- it as notePreviewText
942
+ dt as notePreviewText
943
943
  };