@nivaro/react 0.3.139 → 0.3.141

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 (100) hide show
  1. package/dist/components/InlineGridField.js +95 -92
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +39 -2
  5. package/dist/shared/components/AudienceConfirmPanel.js +19 -19
  6. package/dist/shared/components/BroadcastView.js +213 -211
  7. package/dist/shared/components/CollectionBrowserView.js +2702 -2671
  8. package/dist/shared/components/ConfigHistory.js +45 -45
  9. package/dist/shared/components/ConformanceView.js +110 -110
  10. package/dist/shared/components/DataTable.js +51 -51
  11. package/dist/shared/components/FilePreviewLightbox.js +26 -25
  12. package/dist/shared/components/ItemEditForm.js +3475 -3458
  13. package/dist/shared/components/LiveCount.js +27 -23
  14. package/dist/shared/components/LiveTraceView.js +62 -61
  15. package/dist/shared/components/PageRenderer.js +422 -410
  16. package/dist/shared/components/ProfileView.js +199 -199
  17. package/dist/shared/components/QualityRulesView.js +70 -70
  18. package/dist/shared/components/QueryTable.js +131 -130
  19. package/dist/shared/components/RecordGraph.js +98 -98
  20. package/dist/shared/components/RecordReadView.js +287 -288
  21. package/dist/shared/components/ReportView.js +1279 -1259
  22. package/dist/shared/components/RowPresence.js +83 -76
  23. package/dist/shared/components/SlaRulesView.js +73 -74
  24. package/dist/shared/components/UnseenDot.js +183 -22
  25. package/dist/shared/components/WidgetSlot.js +73 -73
  26. package/dist/shared/components/ai/AiChart.js +36 -32
  27. package/dist/shared/components/ai/AiMarkdown.js +136 -129
  28. package/dist/shared/components/ai/TaskDo.js +87 -87
  29. package/dist/shared/components/ai/answer-formats.js +37 -30
  30. package/dist/shared/components/ai/call-log/format.js +17 -16
  31. package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
  32. package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
  33. package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
  34. package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
  35. package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
  36. package/dist/shared/components/bulk/bulk-field-options.js +10 -10
  37. package/dist/shared/components/cbv/column-totals.js +53 -51
  38. package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
  39. package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
  40. package/dist/shared/components/command-center/announce.js +7 -6
  41. package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
  42. package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
  43. package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
  44. package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
  45. package/dist/shared/components/delivery-analytics/drill.js +32 -32
  46. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  47. package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
  48. package/dist/shared/components/integrations/console/EventsView.js +35 -35
  49. package/dist/shared/components/integrations/console/FirefightView.js +15 -14
  50. package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
  51. package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
  52. package/dist/shared/components/integrations/console/SignalCard.js +67 -67
  53. package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
  54. package/dist/shared/components/item-edit/ChangesTray.js +88 -74
  55. package/dist/shared/components/item-edit/FilePickerField.js +123 -123
  56. package/dist/shared/components/item-edit/GroupSection.js +301 -292
  57. package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
  58. package/dist/shared/components/item-edit/InlineGridField.js +45 -36
  59. package/dist/shared/components/item-edit/InlineTableField.js +1390 -1376
  60. package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
  61. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
  62. package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
  63. package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
  64. package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
  65. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
  66. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  67. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
  68. package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
  69. package/dist/shared/components/layout-editor/settings/controls.js +98 -90
  70. package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
  71. package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
  72. package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
  73. package/dist/shared/components/ops-report/format.js +37 -36
  74. package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
  75. package/dist/shared/components/panels/RevisionsPanel.js +306 -305
  76. package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
  77. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
  78. package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
  79. package/dist/shared/components/pipeline/TeamsView.js +189 -130
  80. package/dist/shared/components/profile/AgentsPanel.js +6 -6
  81. package/dist/shared/components/profile/DelegationCard.js +13 -12
  82. package/dist/shared/components/profile/PersonActivity.js +48 -48
  83. package/dist/shared/components/profile/PersonExtras.js +107 -107
  84. package/dist/shared/components/profile/PersonWeek.js +9 -9
  85. package/dist/shared/components/queue/QueueBulkBar.js +19 -18
  86. package/dist/shared/components/queue/QueueBulkMove.js +21 -20
  87. package/dist/shared/components/queue/QueueItemSheet.js +136 -131
  88. package/dist/shared/components/queue/QueueWorklist.js +884 -872
  89. package/dist/shared/components/queue/worklist-helpers.js +36 -21
  90. package/dist/shared/components/support/RequestList.js +123 -123
  91. package/dist/shared/components/support/SupportAnalytics.js +29 -29
  92. package/dist/shared/lib/activity-sentence.js +251 -229
  93. package/dist/shared/lib/format-value.js +5 -4
  94. package/dist/shared/lib/layout-resolve.js +64 -48
  95. package/dist/shared/lib/number-format.js +87 -0
  96. package/dist/shared/lib/number-kind.js +133 -0
  97. package/dist/shared/lib/utils.js +24 -20
  98. package/dist/shared/lib/watch-list.js +1 -1
  99. package/dist/shared/lib/widget-value-format.js +26 -12
  100. package/package.json +1 -1
@@ -1,154 +1,156 @@
1
- import { jsxs as n, jsx as r, Fragment as ie } from "react/jsx-runtime";
2
- import { useQueryClient as le, useQuery as W, useMutation as U } from "@tanstack/react-query";
3
- import { ExternalLink as de, ArrowRight as z } from "lucide-react";
4
- import { useState as K, useEffect as ce } from "react";
1
+ import { jsxs as n, jsx as r, Fragment as le } from "react/jsx-runtime";
2
+ import { useQueryClient as de, useQuery as U, useMutation as z } from "@tanstack/react-query";
3
+ import { ExternalLink as ce, ArrowRight as G } from "lucide-react";
4
+ import { useState as I, useEffect as me } from "react";
5
5
  import { toast as k } from "sonner";
6
- import { useNivaroClient as me, useItemNavigation as ue } from "../../context.js";
7
- import { get as G, post as J } from "../../lib/commands.js";
8
- import { formatMultiValue as pe } from "../../lib/format-value.js";
9
- import { useLiveRecord as be, batchTouches as M, LIVE_ASPECTS as I } from "../../lib/live.js";
10
- import { usePresence as xe } from "../../lib/presence-hooks.js";
11
- import { userErrorMessage as he } from "../../lib/safe-error.js";
12
- import { cn as X, formatRelative as fe, humanHours as ge } from "../../lib/utils.js";
13
- import { lockedMoveOffer as ye, transitionRequirementsFromError as ve } from "../panels/PipelinePanel.js";
14
- import { TransitionRequirementsDialog as ke } from "../panels/TransitionRequirementsDialog.js";
15
- import { Badge as Ne } from "../ui/badge.js";
16
- import { Sheet as we, SheetContent as _e, SheetHeader as qe, SheetTitle as Ce } from "../ui/sheet.js";
17
- import { OwnerAvatars as Se } from "./OwnerAvatars.js";
18
- import { pathHeader as Te } from "./path-label.js";
19
- import { useTransitionNote as Ke, needsTransitionNote as Me } from "./transition-note.js";
20
- function Ie(t) {
6
+ import { useNivaroClient as ue, useItemNavigation as pe } from "../../context.js";
7
+ import { get as J, post as X } from "../../lib/commands.js";
8
+ import { formatMultiValue as be } from "../../lib/format-value.js";
9
+ import { useLiveRecord as xe, batchTouches as P, LIVE_ASPECTS as A } from "../../lib/live.js";
10
+ import { usePresence as he } from "../../lib/presence-hooks.js";
11
+ import { userErrorMessage as fe } from "../../lib/safe-error.js";
12
+ import { cn as Y, formatRelative as ge, humanHours as ye } from "../../lib/utils.js";
13
+ import { lockedMoveOffer as ve, transitionRequirementsFromError as ke } from "../panels/PipelinePanel.js";
14
+ import { TransitionRequirementsDialog as Ne } from "../panels/TransitionRequirementsDialog.js";
15
+ import { Badge as we } from "../ui/badge.js";
16
+ import { Sheet as _e, SheetContent as qe, SheetHeader as Ce, SheetTitle as Se } from "../ui/sheet.js";
17
+ import { OwnerAvatars as Te } from "./OwnerAvatars.js";
18
+ import { pathHeader as Ke } from "./path-label.js";
19
+ import { useTransitionNote as Ie, needsTransitionNote as Pe } from "./transition-note.js";
20
+ import { extraValueText as Ae } from "./worklist-helpers.js";
21
+ function $e(t) {
21
22
  return (t ?? []).filter((c) => c.in_row_menu !== !1);
22
23
  }
23
- function Pe(t) {
24
- return ge(t);
24
+ function Ee(t) {
25
+ return ye(t);
25
26
  }
26
- const Ae = Te;
27
- function h({ label: t, children: c }) {
27
+ const Me = Ke;
28
+ function f({ label: t, children: c }) {
28
29
  return /* @__PURE__ */ n("div", { className: "bg-white px-3 py-2.5 dark:bg-card", children: [
29
30
  /* @__PURE__ */ r("p", { className: "mb-0.5 text-[10px] font-medium uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: t }),
30
31
  /* @__PURE__ */ r("div", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: c })
31
32
  ] });
32
33
  }
33
- function $e(t, c, N) {
34
+ function Qe(t, c, N) {
34
35
  return {
35
36
  transition_id: t,
36
37
  ...c ? { comment: c } : {},
37
38
  ...N ? { lock_ack: !0 } : {}
38
39
  };
39
40
  }
40
- function et({
41
+ function at({
41
42
  item: t,
42
43
  onOpenChange: c,
43
44
  onClaim: N,
44
- onRelease: Y,
45
- workNextActive: Z,
46
- onNext: P,
47
- refetchItems: A,
45
+ onRelease: Z,
46
+ workNextActive: L,
47
+ onNext: $,
48
+ refetchItems: E,
48
49
  stateLabels: w,
49
- collectionLabel: $,
50
- claimsEnabled: L = !0,
51
- columnFormats: g,
52
- fieldLabel: _,
53
- width: ee,
54
- itemLayout: E,
55
- onOpenRecord: Q
50
+ collectionLabel: M,
51
+ claimsEnabled: ee = !0,
52
+ columnFormats: y,
53
+ extraMeta: _,
54
+ fieldLabel: q,
55
+ width: te,
56
+ itemLayout: Q,
57
+ onOpenRecord: R
56
58
  }) {
57
- var H;
58
- const f = le(), y = me(), { open: te, urlFor: re } = ue(), [q, R] = K(""), [m, C] = K(null), [S, p] = K(null), j = Ke(), o = t == null ? void 0 : t.collection, s = t == null ? void 0 : t.item_id;
59
- ce(() => p(null), [o, s]);
60
- const { data: l } = W({
61
- queryKey: ["queue-sheet-instance", o, s],
62
- queryFn: () => y.request(G(`/pipelines/instance/${o}/${s}`)).then((e) => e.data),
63
- enabled: !!o && !!s
64
- }), { data: b } = W({
65
- queryKey: ["queue-sheet-comments", o, s],
66
- queryFn: () => y.request(G("/comments", { collection: o, item: s })).then((e) => ({ data: (e.data ?? []).filter((a) => !a.deleted) })).catch(() => ({ data: [] })),
67
- enabled: !!o && !!s
68
- }), { viewers: x } = xe(o, s), i = U({
59
+ var O;
60
+ const g = de(), v = ue(), { open: re, urlFor: ae } = pe(), [C, j] = I(""), [m, S] = I(null), [T, p] = I(null), F = Ie(), o = t == null ? void 0 : t.collection, i = t == null ? void 0 : t.item_id;
61
+ me(() => p(null), [o, i]);
62
+ const { data: l } = U({
63
+ queryKey: ["queue-sheet-instance", o, i],
64
+ queryFn: () => v.request(J(`/pipelines/instance/${o}/${i}`)).then((e) => e.data),
65
+ enabled: !!o && !!i
66
+ }), { data: b } = U({
67
+ queryKey: ["queue-sheet-comments", o, i],
68
+ queryFn: () => v.request(J("/comments", { collection: o, item: i })).then((e) => ({ data: (e.data ?? []).filter((a) => !a.deleted) })).catch(() => ({ data: [] })),
69
+ enabled: !!o && !!i
70
+ }), { viewers: x } = he(o, i), s = z({
69
71
  mutationFn: ({
70
72
  transitionId: e,
71
73
  comment: a,
72
- lockAck: v
73
- }) => y.request(
74
- J(
75
- `/pipelines/instance/${o}/${s}/transition`,
76
- $e(e, a, v)
74
+ lockAck: h
75
+ }) => v.request(
76
+ X(
77
+ `/pipelines/instance/${o}/${i}/transition`,
78
+ Qe(e, a, h)
77
79
  )
78
80
  ),
79
81
  onSuccess: () => {
80
- C(null), p(null), f.invalidateQueries({ queryKey: ["queue-sheet-instance", o, s] }), A(), k.success("Transitioned");
82
+ S(null), p(null), g.invalidateQueries({ queryKey: ["queue-sheet-instance", o, i] }), E(), k.success("Transitioned");
81
83
  },
82
- onError: (e, { transitionId: a, comment: v }) => {
84
+ onError: (e, { transitionId: a, comment: h }) => {
83
85
  p(null);
84
- const O = ye(e);
85
- if (O) {
86
- const u = ((l == null ? void 0 : l.available_transitions) ?? []).find((se) => se.id === a), oe = (u == null ? void 0 : u.label) || "Move";
87
- k.warning(O.message, {
88
- id: `nvr-locked-move:${o}:${String(s)}`,
86
+ const V = ve(e);
87
+ if (V) {
88
+ const u = ((l == null ? void 0 : l.available_transitions) ?? []).find((se) => se.id === a), ie = (u == null ? void 0 : u.label) || "Move";
89
+ k.warning(V.message, {
90
+ id: `nvr-locked-move:${o}:${String(i)}`,
89
91
  duration: 2e4,
90
92
  action: {
91
- label: `${oe} anyway`,
92
- onClick: () => i.mutate({ transitionId: a, comment: v, lockAck: !0 })
93
+ label: `${ie} anyway`,
94
+ onClick: () => s.mutate({ transitionId: a, comment: h, lockAck: !0 })
93
95
  },
94
96
  cancel: { label: "Wait", onClick: () => {
95
97
  } }
96
98
  });
97
99
  return;
98
100
  }
99
- const V = ve(e);
100
- if (V) {
101
- C((u) => ({
102
- payload: V,
101
+ const W = ke(e);
102
+ if (W) {
103
+ S((u) => ({
104
+ payload: W,
103
105
  transitionId: a,
104
- comment: v,
106
+ comment: h,
105
107
  revision: ((u == null ? void 0 : u.revision) ?? 0) + 1
106
108
  }));
107
109
  return;
108
110
  }
109
- k.error(he(e, "Transition failed"));
111
+ k.error(fe(e, "Transition failed"));
110
112
  }
111
- }), F = U({
112
- mutationFn: (e) => y.request(J("/comments", { collection: o, item: s, text: e })),
113
+ }), B = z({
114
+ mutationFn: (e) => v.request(X("/comments", { collection: o, item: i, text: e })),
113
115
  onSuccess: () => {
114
- R(""), f.invalidateQueries({ queryKey: ["queue-sheet-comments", o, s] });
116
+ j(""), g.invalidateQueries({ queryKey: ["queue-sheet-comments", o, i] });
115
117
  },
116
118
  onError: () => k.error("Failed to post comment")
117
119
  });
118
- be(o, s, (e) => {
119
- M(e, I.state) ? (f.invalidateQueries({ queryKey: ["queue-sheet-instance", o, s] }), e.own || A()) : M(e, I.owners) && f.invalidateQueries({ queryKey: ["queue-sheet-instance", o, s] }), M(e, I.comments) && f.invalidateQueries({ queryKey: ["queue-sheet-comments", o, s] });
120
+ xe(o, i, (e) => {
121
+ P(e, A.state) ? (g.invalidateQueries({ queryKey: ["queue-sheet-instance", o, i] }), e.own || E()) : P(e, A.owners) && g.invalidateQueries({ queryKey: ["queue-sheet-instance", o, i] }), P(e, A.comments) && g.invalidateQueries({ queryKey: ["queue-sheet-comments", o, i] });
120
122
  });
121
- const T = Ie(l == null ? void 0 : l.available_transitions), d = S && T.some((e) => e.id === S.id) ? S : null, B = new Map(((l == null ? void 0 : l.states) ?? []).map((e) => [e.id, e])), D = (e) => {
122
- const a = B.get(e.to_state);
123
+ const K = $e(l == null ? void 0 : l.available_transitions), d = T && K.some((e) => e.id === T.id) ? T : null, D = new Map(((l == null ? void 0 : l.states) ?? []).map((e) => [e.id, e])), H = (e) => {
124
+ const a = D.get(e.to_state);
123
125
  return e.label || (a == null ? void 0 : a.label) || (a == null ? void 0 : a.key) || "Move";
124
- }, ae = (e) => {
125
- const a = B.get(e.to_state);
126
+ }, ne = (e) => {
127
+ const a = D.get(e.to_state);
126
128
  return (a == null ? void 0 : a.label) || (a == null ? void 0 : a.key) || e.label || "the next step";
127
- }, ne = async (e) => {
128
- if (!i.isPending) {
129
- if (Me(e)) {
129
+ }, oe = async (e) => {
130
+ if (!s.isPending) {
131
+ if (Pe(e)) {
130
132
  p(null);
131
- const a = await j.ask(D(e));
133
+ const a = await F.ask(H(e));
132
134
  if (!a) return;
133
- i.mutate({ transitionId: e.id, comment: a });
135
+ s.mutate({ transitionId: e.id, comment: a });
134
136
  return;
135
137
  }
136
138
  p(e);
137
139
  }
138
140
  };
139
- return /* @__PURE__ */ n(we, { open: !!t, onOpenChange: c, children: [
141
+ return /* @__PURE__ */ n(_e, { open: !!t, onOpenChange: c, children: [
140
142
  /* @__PURE__ */ r(
141
- _e,
143
+ qe,
142
144
  {
143
145
  side: "right",
144
146
  className: "flex max-w-full flex-col gap-0 p-0",
145
- style: { width: ee ?? 480, maxWidth: "96vw" },
146
- children: t && /* @__PURE__ */ n(ie, { children: [
147
- /* @__PURE__ */ r(qe, { className: "shrink-0 border-b border-slate-200 px-5 py-4 dark:border-border", children: /* @__PURE__ */ n("div", { className: "flex items-start justify-between gap-3 pr-6", children: [
147
+ style: { width: te ?? 480, maxWidth: "96vw" },
148
+ children: t && /* @__PURE__ */ n(le, { children: [
149
+ /* @__PURE__ */ r(Ce, { className: "shrink-0 border-b border-slate-200 px-5 py-4 dark:border-border", children: /* @__PURE__ */ n("div", { className: "flex items-start justify-between gap-3 pr-6", children: [
148
150
  /* @__PURE__ */ n("div", { className: "min-w-0", children: [
149
- /* @__PURE__ */ r(Ce, { className: "truncate text-[15px] font-semibold", children: t.label }),
151
+ /* @__PURE__ */ r(Se, { className: "truncate text-[15px] font-semibold", children: t.label }),
150
152
  /* @__PURE__ */ n("div", { className: "mt-1.5 flex items-center gap-2", children: [
151
- /* @__PURE__ */ r(Ne, { variant: "outline", children: $ ? $(t.collection) : t.collection }),
153
+ /* @__PURE__ */ r(we, { variant: "outline", children: M ? M(t.collection) : t.collection }),
152
154
  x.length > 0 && /* @__PURE__ */ n(
153
155
  "span",
154
156
  {
@@ -178,60 +180,63 @@ function et({
178
180
  /* @__PURE__ */ n(
179
181
  "a",
180
182
  {
181
- href: re({
183
+ href: ae({
182
184
  collection: t.collection,
183
185
  itemId: t.item_id,
184
- layoutSlug: E ?? null
186
+ layoutSlug: Q ?? null
185
187
  }),
186
188
  onClick: (e) => {
187
- e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0 || (e.preventDefault(), Q ? Q(t) : te({
189
+ e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0 || (e.preventDefault(), R ? R(t) : re({
188
190
  collection: t.collection,
189
191
  itemId: t.item_id,
190
- layoutSlug: E ?? null
192
+ layoutSlug: Q ?? null
191
193
  }));
192
194
  },
193
195
  className: "flex shrink-0 items-center gap-1 text-[12px] font-medium text-nvr-navy hover:underline dark:text-nvr-cyan",
194
196
  children: [
195
197
  "Open ",
196
- /* @__PURE__ */ r(de, { className: "h-3 w-3" })
198
+ /* @__PURE__ */ r(ce, { className: "h-3 w-3" })
197
199
  ]
198
200
  }
199
201
  )
200
202
  ] }) }),
201
203
  /* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
202
204
  /* @__PURE__ */ n("div", { className: "mb-4 grid grid-cols-2 gap-px overflow-hidden rounded-lg border border-slate-200 bg-slate-200 dark:border-border dark:bg-border", children: [
203
- /* @__PURE__ */ r(h, { label: "Owners", children: /* @__PURE__ */ r(Se, { owners: t.owners, max: 6 }) }),
204
- /* @__PURE__ */ r(h, { label: "Claimed by", children: ((H = t.claimed_by) == null ? void 0 : H.name) ?? "—" }),
205
- /* @__PURE__ */ r(h, { label: "SLA", children: t.sla_status ? /* @__PURE__ */ r(
205
+ /* @__PURE__ */ r(f, { label: "Owners", children: /* @__PURE__ */ r(Te, { owners: t.owners, max: 6 }) }),
206
+ /* @__PURE__ */ r(f, { label: "Claimed by", children: ((O = t.claimed_by) == null ? void 0 : O.name) ?? "—" }),
207
+ /* @__PURE__ */ r(f, { label: "SLA", children: t.sla_status ? /* @__PURE__ */ r(
206
208
  "span",
207
209
  {
208
- className: X(
210
+ className: Y(
209
211
  "rounded px-1.5 py-0.5 text-[11px] font-medium",
210
212
  t.sla_status === "breached" ? "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400" : t.sla_status === "warning" ? "bg-amber-50 text-amber-600 dark:bg-amber-500/10 dark:text-amber-400" : "bg-emerald-50 text-emerald-600 dark:bg-emerald-500/10 dark:text-emerald-400"
211
213
  ),
212
214
  children: t.sla_status
213
215
  }
214
216
  ) : "—" }),
215
- /* @__PURE__ */ r(h, { label: "Aging", children: Pe(t.aging_hours) }),
216
- t.at_risk && /* @__PURE__ */ r(h, { label: "Risk", children: /* @__PURE__ */ r("span", { className: "text-red-500", children: "⚑ At risk" }) }),
217
- Object.entries(t.extra ?? {}).map(([e, a]) => /* @__PURE__ */ r(h, { label: (_ == null ? void 0 : _(e)) || Ae(e), children: a == null || a === "" ? "—" : g != null && g[e] ? pe(String(a), g[e]) : String(a) }, e))
217
+ /* @__PURE__ */ r(f, { label: "Aging", children: Ee(t.aging_hours) }),
218
+ t.at_risk && /* @__PURE__ */ r(f, { label: "Risk", children: /* @__PURE__ */ r("span", { className: "text-red-500", children: "⚑ At risk" }) }),
219
+ Object.entries(t.extra ?? {}).map(([e, a]) => /* @__PURE__ */ r(f, { label: (q == null ? void 0 : q(e)) || Me(e), children: a == null || a === "" ? "—" : y != null && y[e] ? be(String(a), y[e]) : Ae(
220
+ _ == null ? void 0 : _.find((h) => h.path === e),
221
+ String(a)
222
+ ) }, e))
218
223
  ] }),
219
- T.length > 0 && /* @__PURE__ */ n("div", { className: "mb-4", children: [
224
+ K.length > 0 && /* @__PURE__ */ n("div", { className: "mb-4", children: [
220
225
  /* @__PURE__ */ r("p", { className: "mb-1.5 text-[11px] font-medium uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: "Transitions" }),
221
- /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1.5", children: T.map((e) => /* @__PURE__ */ n(
226
+ /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1.5", children: K.map((e) => /* @__PURE__ */ n(
222
227
  "button",
223
228
  {
224
229
  type: "button",
225
- disabled: i.isPending,
230
+ disabled: s.isPending,
226
231
  "aria-pressed": (d == null ? void 0 : d.id) === e.id,
227
- onClick: () => void ne(e),
228
- className: X(
232
+ onClick: () => void oe(e),
233
+ className: Y(
229
234
  "flex items-center gap-1 rounded-md border border-slate-200 bg-white px-2.5 py-1.5 text-[12px] font-medium text-slate-700 hover:border-nvr-cyan hover:text-nvr-navy disabled:opacity-50 dark:border-border dark:bg-card dark:text-slate-200 dark:hover:text-nvr-cyan",
230
235
  (d == null ? void 0 : d.id) === e.id && "border-nvr-cyan"
231
236
  ),
232
237
  children: [
233
- D(e),
234
- /* @__PURE__ */ r(z, { className: "h-3 w-3 text-slate-400" })
238
+ H(e),
239
+ /* @__PURE__ */ r(G, { className: "h-3 w-3 text-slate-400" })
235
240
  ]
236
241
  },
237
242
  e.id
@@ -249,7 +254,7 @@ function et({
249
254
  /* @__PURE__ */ r("span", { className: "font-semibold", children: t.label }),
250
255
  " to",
251
256
  " ",
252
- /* @__PURE__ */ r("span", { className: "font-semibold", children: ae(d) }),
257
+ /* @__PURE__ */ r("span", { className: "font-semibold", children: ne(d) }),
253
258
  "?"
254
259
  ] }),
255
260
  /* @__PURE__ */ n("div", { className: "mt-2 flex gap-2", children: [
@@ -257,17 +262,17 @@ function et({
257
262
  "button",
258
263
  {
259
264
  type: "button",
260
- disabled: i.isPending,
261
- onClick: () => i.mutate({ transitionId: d.id }),
265
+ disabled: s.isPending,
266
+ onClick: () => s.mutate({ transitionId: d.id }),
262
267
  className: "h-7 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white disabled:opacity-50",
263
- children: i.isPending ? "Moving…" : "Confirm"
268
+ children: s.isPending ? "Moving…" : "Confirm"
264
269
  }
265
270
  ),
266
271
  /* @__PURE__ */ r(
267
272
  "button",
268
273
  {
269
274
  type: "button",
270
- disabled: i.isPending,
275
+ disabled: s.isPending,
271
276
  onClick: () => p(null),
272
277
  className: "h-7 rounded-md border border-slate-200 bg-white px-3 text-[12px] text-slate-600 hover:bg-muted disabled:opacity-50 dark:border-border dark:bg-card dark:text-slate-300",
273
278
  children: "Keep"
@@ -278,11 +283,11 @@ function et({
278
283
  }
279
284
  )
280
285
  ] }),
281
- (L || t.claimed_by) && /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
286
+ (ee || t.claimed_by) && /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
282
287
  "button",
283
288
  {
284
289
  type: "button",
285
- onClick: () => t.claimed_by ? Y(t) : N(t),
290
+ onClick: () => t.claimed_by ? Z(t) : N(t),
286
291
  className: "rounded-md bg-nvr-cyan px-3 py-1.5 text-[12px] font-medium text-white hover:bg-nvr-cyan/90",
287
292
  children: t.claimed_by ? "Release claim" : "Claim this item"
288
293
  }
@@ -293,7 +298,7 @@ function et({
293
298
  ((b == null ? void 0 : b.data) ?? []).map((e) => /* @__PURE__ */ n("div", { className: "rounded-md bg-slate-50 px-3 py-2 dark:bg-muted/40", children: [
294
299
  /* @__PURE__ */ n("p", { className: "text-[11px] font-medium text-slate-500 dark:text-muted-foreground", children: [
295
300
  [e.first_name, e.last_name].filter(Boolean).join(" ") || e.email || "—",
296
- /* @__PURE__ */ r("span", { className: "ml-1.5 font-normal text-slate-400", children: fe(e.created_at) })
301
+ /* @__PURE__ */ r("span", { className: "ml-1.5 font-normal text-slate-400", children: ge(e.created_at) })
297
302
  ] }),
298
303
  /* @__PURE__ */ r("p", { className: "mt-0.5 whitespace-pre-wrap text-[12px] text-slate-700 dark:text-slate-200", children: e.text })
299
304
  ] }, e.id)),
@@ -303,8 +308,8 @@ function et({
303
308
  /* @__PURE__ */ r(
304
309
  "textarea",
305
310
  {
306
- value: q,
307
- onChange: (e) => R(e.target.value),
311
+ value: C,
312
+ onChange: (e) => j(e.target.value),
308
313
  placeholder: "Add a comment…",
309
314
  rows: 2,
310
315
  className: "w-full rounded-md border border-slate-200 bg-white px-2.5 py-1.5 text-[12px] focus:border-nvr-cyan focus:outline-none dark:border-border dark:bg-card"
@@ -314,8 +319,8 @@ function et({
314
319
  "button",
315
320
  {
316
321
  type: "button",
317
- disabled: !q.trim() || F.isPending,
318
- onClick: () => F.mutate(q.trim()),
322
+ disabled: !C.trim() || B.isPending,
323
+ onClick: () => B.mutate(C.trim()),
319
324
  className: "mt-1 rounded-md border border-slate-200 px-2.5 py-1 text-[12px] font-medium text-slate-600 hover:text-slate-800 disabled:opacity-50 dark:border-border dark:text-slate-300",
320
325
  children: "Post"
321
326
  }
@@ -323,15 +328,15 @@ function et({
323
328
  ] })
324
329
  ] })
325
330
  ] }),
326
- Z && P && /* @__PURE__ */ r("div", { className: "shrink-0 border-t border-slate-200 px-5 py-3 dark:border-border", children: /* @__PURE__ */ n(
331
+ L && $ && /* @__PURE__ */ r("div", { className: "shrink-0 border-t border-slate-200 px-5 py-3 dark:border-border", children: /* @__PURE__ */ n(
327
332
  "button",
328
333
  {
329
334
  type: "button",
330
- onClick: P,
335
+ onClick: $,
331
336
  className: "flex w-full items-center justify-center gap-1.5 rounded-md bg-nvr-cyan px-3 py-2 text-[13px] font-semibold text-white hover:bg-nvr-cyan/90",
332
337
  children: [
333
338
  "Next ",
334
- /* @__PURE__ */ r(z, { className: "h-3.5 w-3.5" })
339
+ /* @__PURE__ */ r(G, { className: "h-3.5 w-3.5" })
335
340
  ]
336
341
  }
337
342
  ) })
@@ -339,25 +344,25 @@ function et({
339
344
  }
340
345
  ),
341
346
  m && /* @__PURE__ */ r(
342
- ke,
347
+ Ne,
343
348
  {
344
349
  payload: m.payload,
345
350
  transitionId: m.transitionId,
346
351
  isRetry: m.revision > 1,
347
- onSubmitted: () => i.mutate({
352
+ onSubmitted: () => s.mutate({
348
353
  transitionId: m.transitionId,
349
354
  comment: m.comment
350
355
  }),
351
- executing: i.isPending,
352
- onClose: () => C(null)
356
+ executing: s.isPending,
357
+ onClose: () => S(null)
353
358
  },
354
359
  m.revision
355
360
  ),
356
- j.dialog
361
+ F.dialog
357
362
  ] });
358
363
  }
359
364
  export {
360
- et as QueueItemSheet,
361
- Ie as peekTransitions,
362
- $e as sheetTransitionBody
365
+ at as QueueItemSheet,
366
+ $e as peekTransitions,
367
+ Qe as sheetTransitionBody
363
368
  };