@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,23 +1,23 @@
1
- import { jsxs as n, Fragment as Se, jsx as e } from "react/jsx-runtime";
2
- import { useQueryClient as qe, useQuery as O, useMutation as _e } from "@tanstack/react-query";
3
- import { UserRound as Pe, Search as $e, X as ue, SlidersHorizontal as Le, LifeBuoy as Re, ArrowUp as Te, ArrowDown as Ae, AlertTriangle as Fe } from "lucide-react";
4
- import { useState as v, useEffect as Ee, useMemo as re, useCallback as Me } from "react";
5
- import { useNivaroClient as Ue } from "../../context.js";
6
- import { get as D, post as Be } from "../../lib/commands.js";
7
- import { toastError as Ie } from "../../lib/error-toast.js";
8
- import { useSettledRows as ze, useLiveFade as Oe } from "../../lib/live-screen.js";
9
- import { useBackgroundArm as De } from "../../lib/live-views.js";
10
- import { useBelowMd as Ge } from "../../lib/use-below-md.js";
11
- import { cn as g } from "../../lib/utils.js";
12
- import { ErrorNotice as Ke } from "../ErrorNotice.js";
13
- import { ConfirmButton as se } from "../profile/primitives.js";
14
- import { DropdownMenu as ne, DropdownMenuTrigger as le, DropdownMenuContent as ie, DropdownMenuItem as oe } from "../ui/dropdown-menu.js";
1
+ import { jsxs as n, Fragment as qe, jsx as e } from "react/jsx-runtime";
2
+ import { useQueryClient as _e, useQuery as O, useMutation as Pe } from "@tanstack/react-query";
3
+ import { UserRound as $e, Search as Le, X as pe, SlidersHorizontal as Re, LifeBuoy as Te, ArrowUp as Ae, ArrowDown as Fe, AlertTriangle as Ee } from "lucide-react";
4
+ import { useState as v, useEffect as Me, useMemo as se, useCallback as Ue } from "react";
5
+ import { useNivaroClient as Be } from "../../context.js";
6
+ import { get as D, post as Ie } from "../../lib/commands.js";
7
+ import { toastError as ze } from "../../lib/error-toast.js";
8
+ import { useSettledRows as Oe, useLiveFade as De } from "../../lib/live-screen.js";
9
+ import { useBackgroundArm as Ge } from "../../lib/live-views.js";
10
+ import { useBelowMd as Ke } from "../../lib/use-below-md.js";
11
+ import { cn as g, formatNumber as G } from "../../lib/utils.js";
12
+ import { ErrorNotice as je } from "../ErrorNotice.js";
13
+ import { ConfirmButton as ne } from "../profile/primitives.js";
14
+ import { DropdownMenu as le, DropdownMenuTrigger as ie, DropdownMenuContent as oe, DropdownMenuItem as de } from "../ui/dropdown-menu.js";
15
15
  import { SimpleSelect as R } from "../ui/SimpleSelect.js";
16
- import { PersonPick as pe, PersonDisc as K, PickCaret as F, PICK_TRIGGER as de } from "./PersonPick.js";
17
- import { readFilters as je, listParams as We, bulkResultLine as Qe, activeFilterCount as Ye, STATUS_FILTERS as He, PRIORITY_FILTERS as Je, SORTS as Xe, writeFilters as Ve, defaultFilters as Ze, shortAgo as me, exactTime as G } from "./support-list.js";
18
- import { StatusPill as ge } from "./TicketDetailSheet.js";
19
- const _ = 50, et = /* @__PURE__ */ new Set(["done", "cancelled"]);
20
- function ce() {
16
+ import { PersonPick as me, PersonDisc as j, PickCaret as F, PICK_TRIGGER as ce } from "./PersonPick.js";
17
+ import { readFilters as We, listParams as Qe, bulkResultLine as Ye, activeFilterCount as He, STATUS_FILTERS as Je, PRIORITY_FILTERS as Xe, SORTS as Ve, writeFilters as Ze, defaultFilters as et, shortAgo as ge, exactTime as K } from "./support-list.js";
18
+ import { StatusPill as he } from "./TicketDetailSheet.js";
19
+ const _ = 50, tt = /* @__PURE__ */ new Set(["done", "cancelled"]);
20
+ function ue() {
21
21
  try {
22
22
  return typeof window > "u" ? null : window.localStorage;
23
23
  } catch {
@@ -25,40 +25,40 @@ function ce() {
25
25
  }
26
26
  }
27
27
  const T = "h-8 w-auto max-w-[12rem] gap-1.5 rounded-md border-slate-200 bg-white px-2.5 text-[12.5px] text-slate-700 dark:border-border dark:bg-background dark:text-slate-200";
28
- function Ct({
28
+ function St({
29
29
  tab: a,
30
30
  openId: s,
31
31
  onOpen: c
32
32
  }) {
33
- var te, ae;
34
- const l = Ue(), u = qe(), o = Ge(), i = a === "desk", [r, b] = v(() => je(a, ce())), [f, E] = v(""), [C, P] = v(1), [j, ke] = v(!1), [h, S] = v(() => /* @__PURE__ */ new Set()), [W, Q] = v(null), y = (t) => {
33
+ var ae, re;
34
+ const l = Be(), u = _e(), o = Ke(), i = a === "desk", [r, b] = v(() => We(a, ue())), [f, E] = v(""), [C, P] = v(1), [W, ye] = v(!1), [h, S] = v(() => /* @__PURE__ */ new Set()), [Q, Y] = v(null), y = (t) => {
35
35
  b((d) => {
36
36
  const p = { ...d, ...t };
37
- return Ve(a, p, ce()), p;
37
+ return Ze(a, p, ue()), p;
38
38
  }), P(1);
39
- }, M = { ...We(a, r, f), page: String(C), limit: String(_) }, U = JSON.stringify(M), k = O({
39
+ }, M = { ...Qe(a, r, f), page: String(C), limit: String(_) }, U = JSON.stringify(M), k = O({
40
40
  queryKey: ["support-tickets", M],
41
41
  queryFn: () => l.request(D("/support/tickets", M))
42
42
  }), { data: m } = O({
43
43
  queryKey: ["support-workload"],
44
44
  queryFn: () => l.request(D("/support/workload")).then((t) => t.data),
45
45
  enabled: i
46
- }), { data: ye = [] } = O({
46
+ }), { data: Ne = [] } = O({
47
47
  queryKey: ["support-categories", "any"],
48
48
  queryFn: () => l.request(D("/support/categories", { any: "1" })).then((t) => t.data ?? [])
49
49
  });
50
- Ee(() => {
51
- S(/* @__PURE__ */ new Set()), Q(null);
50
+ Me(() => {
51
+ S(/* @__PURE__ */ new Set()), Y(null);
52
52
  }, [U]);
53
- const Ne = re(() => [...h].map(String), [h]), $ = ze((te = k.data) == null ? void 0 : te.data, (t) => String(t.id), {
53
+ const we = se(() => [...h].map(String), [h]), $ = Oe((ae = k.data) == null ? void 0 : ae.data, (t) => String(t.id), {
54
54
  resetKey: U,
55
- held: Ne
56
- }), Y = Oe(De(k.dataUpdatedAt, U)), we = Me(
55
+ held: we
56
+ }), H = De(Ge(k.dataUpdatedAt, U)), ve = Ue(
57
57
  (t) => {
58
- $.containerRef(t), Y(t);
58
+ $.containerRef(t), H(t);
59
59
  },
60
- [$.containerRef, Y]
61
- ), H = re(() => {
60
+ [$.containerRef, H]
61
+ ), J = se(() => {
62
62
  const t = new Map(((m == null ? void 0 : m.assignees) ?? []).map((d) => [d.id, d.open]));
63
63
  return ((m == null ? void 0 : m.workers) ?? []).map((d) => ({
64
64
  value: d.id,
@@ -66,16 +66,16 @@ function Ct({
66
66
  person: !0,
67
67
  hint: t.get(d.id) ? `${t.get(d.id)} open` : void 0
68
68
  }));
69
- }, [m]), J = (t) => {
69
+ }, [m]), X = (t) => {
70
70
  var d, p;
71
71
  return t === "me" ? "Me" : t === "unassigned" ? "Unassigned" : ((d = m == null ? void 0 : m.workers.find((x) => x.id === t)) == null ? void 0 : d.name) ?? ((p = m == null ? void 0 : m.assignees.find((x) => x.id === t)) == null ? void 0 : p.name) ?? "Someone";
72
- }, X = _e({
72
+ }, V = Pe({
73
73
  mutationFn: ({
74
74
  ids: t,
75
75
  body: d
76
- }) => l.request(Be("/support/tickets/bulk", { ids: t, ...d })).then((p) => p.data),
76
+ }) => l.request(Ie("/support/tickets/bulk", { ids: t, ...d })).then((p) => p.data),
77
77
  onSuccess: (t, d) => {
78
- Q(Qe(d.action, t));
78
+ Y(Ye(d.action, t));
79
79
  const p = t.results.filter((x) => x.outcome !== "refused").map((x) => String(x.id));
80
80
  $.release(p), S(/* @__PURE__ */ new Set());
81
81
  for (const x of [
@@ -86,37 +86,37 @@ function Ct({
86
86
  ])
87
87
  u.invalidateQueries({ queryKey: [x] });
88
88
  },
89
- onError: (t) => Ie(t, "Could not change those requests")
90
- }), ve = (t) => {
89
+ onError: (t) => ze(t, "Could not change those requests")
90
+ }), Ce = (t) => {
91
91
  const d = [...h];
92
92
  if (!d.length) return;
93
93
  const p = t.kind === "status" ? { status: t.status } : t.kind === "assign" ? { assignee: t.assignee } : { priority: t.priority };
94
- X.mutate({ ids: d, body: p, action: t });
95
- }, L = $.rows, B = L.filter((t) => t.state !== "departed").map((t) => t.row.id), I = B.length > 0 && B.every((t) => h.has(t)), V = (t) => S((d) => {
94
+ V.mutate({ ids: d, body: p, action: t });
95
+ }, L = $.rows, B = L.filter((t) => t.state !== "departed").map((t) => t.row.id), I = B.length > 0 && B.every((t) => h.has(t)), Z = (t) => S((d) => {
96
96
  const p = new Set(d);
97
97
  return p.has(t) ? p.delete(t) : p.add(t), p;
98
- }), Ce = () => S(I ? /* @__PURE__ */ new Set() : new Set(B)), w = Ye(a, r), z = () => {
99
- const t = Ze(a);
98
+ }), Se = () => S(I ? /* @__PURE__ */ new Set() : new Set(B)), w = He(a, r), z = () => {
99
+ const t = et(a);
100
100
  y({
101
101
  status: t.status,
102
102
  assignee: t.assignee,
103
103
  category: t.category,
104
104
  priority: t.priority
105
105
  }), E("");
106
- }, q = (t) => y({ sort: t }), N = ((ae = k.data) == null ? void 0 : ae.total) ?? 0, Z = Math.max(1, Math.ceil(N / _)), ee = /* @__PURE__ */ n(Se, { children: [
106
+ }, q = (t) => y({ sort: t }), N = ((re = k.data) == null ? void 0 : re.total) ?? 0, ee = Math.max(1, Math.ceil(N / _)), te = /* @__PURE__ */ n(qe, { children: [
107
107
  /* @__PURE__ */ e(
108
108
  R,
109
109
  {
110
110
  value: r.status,
111
111
  onChange: (t) => y({ status: t }),
112
- options: He,
112
+ options: Je,
113
113
  ariaLabel: "Status",
114
114
  className: g(T, o && "w-full max-w-none"),
115
115
  triggerProps: { "data-support-filter": "status" }
116
116
  }
117
117
  ),
118
118
  i && /* @__PURE__ */ e(
119
- pe,
119
+ me,
120
120
  {
121
121
  value: r.assignee,
122
122
  ariaLabel: "Assignee",
@@ -125,24 +125,24 @@ function Ct({
125
125
  { value: "me", label: "Me" },
126
126
  { value: "unassigned", label: "Unassigned" }
127
127
  ],
128
- people: H,
128
+ people: J,
129
129
  onPick: (t) => y({ assignee: t }),
130
130
  trigger: /* @__PURE__ */ n(
131
131
  "button",
132
132
  {
133
133
  type: "button",
134
134
  "data-support-filter": "assignee",
135
- className: g(de, o && "w-full max-w-none"),
135
+ className: g(ce, o && "w-full max-w-none"),
136
136
  children: [
137
137
  r.assignee && r.assignee !== "unassigned" && r.assignee !== "me" ? /* @__PURE__ */ e(
138
- K,
138
+ j,
139
139
  {
140
140
  id: r.assignee,
141
- name: J(r.assignee),
141
+ name: X(r.assignee),
142
142
  size: 16
143
143
  }
144
- ) : /* @__PURE__ */ e(Pe, { className: "h-3.5 w-3.5 shrink-0 opacity-60" }),
145
- /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: r.assignee ? J(r.assignee) : "Anyone" }),
144
+ ) : /* @__PURE__ */ e($e, { className: "h-3.5 w-3.5 shrink-0 opacity-60" }),
145
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: r.assignee ? X(r.assignee) : "Anyone" }),
146
146
  /* @__PURE__ */ e(F, {})
147
147
  ]
148
148
  }
@@ -156,7 +156,7 @@ function Ct({
156
156
  onChange: (t) => y({ category: t }),
157
157
  options: [
158
158
  { value: "", label: "Any type" },
159
- ...ye.map((t) => ({ value: String(t.id), label: t.name }))
159
+ ...Ne.map((t) => ({ value: String(t.id), label: t.name }))
160
160
  ],
161
161
  ariaLabel: "Type",
162
162
  className: g(T, o && "w-full max-w-none"),
@@ -168,7 +168,7 @@ function Ct({
168
168
  {
169
169
  value: r.priority,
170
170
  onChange: (t) => y({ priority: t }),
171
- options: Je,
171
+ options: Xe,
172
172
  ariaLabel: "Priority",
173
173
  className: g(T, o && "w-full max-w-none"),
174
174
  triggerProps: { "data-support-filter": "priority" }
@@ -185,7 +185,7 @@ function Ct({
185
185
  o && "basis-full"
186
186
  ),
187
187
  children: [
188
- /* @__PURE__ */ e($e, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
188
+ /* @__PURE__ */ e(Le, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
189
189
  /* @__PURE__ */ e(
190
190
  "input",
191
191
  {
@@ -205,7 +205,7 @@ function Ct({
205
205
  onClick: () => E(""),
206
206
  "aria-label": "Clear search",
207
207
  className: "rounded p-0.5 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",
208
- children: /* @__PURE__ */ e(ue, { className: "h-3 w-3" })
208
+ children: /* @__PURE__ */ e(pe, { className: "h-3 w-3" })
209
209
  }
210
210
  )
211
211
  ]
@@ -216,19 +216,19 @@ function Ct({
216
216
  {
217
217
  type: "button",
218
218
  "data-support-filters-toggle": !0,
219
- "aria-expanded": j,
220
- onClick: () => ke((t) => !t),
219
+ "aria-expanded": W,
220
+ onClick: () => ye((t) => !t),
221
221
  className: g(
222
- de,
222
+ ce,
223
223
  w > 0 && "border-nvr-cyan/60 text-nvr-navy dark:text-nvr-cyan"
224
224
  ),
225
225
  children: [
226
- /* @__PURE__ */ e(Le, { className: "h-3.5 w-3.5" }),
226
+ /* @__PURE__ */ e(Re, { className: "h-3.5 w-3.5" }),
227
227
  "Filters",
228
228
  w > 0 && /* @__PURE__ */ e("span", { className: "rounded-full bg-nvr-cyan/15 px-1.5 text-[10.5px] font-semibold tabular-nums", children: w })
229
229
  ]
230
230
  }
231
- ) : ee,
231
+ ) : te,
232
232
  !o && w + (f ? 1 : 0) > 0 && /* @__PURE__ */ e(
233
233
  "button",
234
234
  {
@@ -246,7 +246,7 @@ function Ct({
246
246
  {
247
247
  value: r.sort,
248
248
  onChange: (t) => q(t),
249
- options: Xe,
249
+ options: Ve,
250
250
  ariaLabel: "Sort",
251
251
  className: T,
252
252
  triggerProps: { "data-support-sort": r.sort }
@@ -254,13 +254,13 @@ function Ct({
254
254
  )
255
255
  ] })
256
256
  ] }),
257
- o && j && /* @__PURE__ */ n(
257
+ o && W && /* @__PURE__ */ n(
258
258
  "div",
259
259
  {
260
260
  className: "mt-2 grid grid-cols-1 gap-2 rounded-lg border border-slate-200 bg-white p-3 dark:border-border dark:bg-card",
261
261
  "data-support-filters-panel": !0,
262
262
  children: [
263
- ee,
263
+ te,
264
264
  w > 0 && /* @__PURE__ */ e(
265
265
  "button",
266
266
  {
@@ -274,7 +274,7 @@ function Ct({
274
274
  }
275
275
  ),
276
276
  i && m && /* @__PURE__ */ e(
277
- rt,
277
+ st,
278
278
  {
279
279
  workload: m,
280
280
  active: r.assignee,
@@ -284,24 +284,24 @@ function Ct({
284
284
  /* @__PURE__ */ e(
285
285
  "div",
286
286
  {
287
- ref: we,
287
+ ref: ve,
288
288
  className: "mt-3 overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card",
289
289
  children: k.isLoading ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", "aria-busy": !0, children: [0, 1, 2, 3].map((t) => /* @__PURE__ */ e("div", { className: "h-9 animate-pulse rounded bg-[hsl(var(--nvr-skeleton))]" }, t)) }) : k.isError && !k.data ? /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e(
290
- Ke,
290
+ je,
291
291
  {
292
292
  error: k.error,
293
293
  what: "the requests",
294
294
  onRetry: () => void k.refetch()
295
295
  }
296
296
  ) }) : L.length ? o ? /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", "data-support-list": !0, children: L.map(({ row: t, state: d }) => /* @__PURE__ */ e(
297
- at,
297
+ rt,
298
298
  {
299
299
  t,
300
300
  desk: i,
301
301
  departed: d === "departed",
302
302
  open: s === t.id,
303
303
  selected: h.has(t.id),
304
- onToggle: () => V(t.id),
304
+ onToggle: () => Z(t.id),
305
305
  onOpen: () => c(t.id)
306
306
  },
307
307
  t.id
@@ -312,7 +312,7 @@ function Ct({
312
312
  {
313
313
  type: "checkbox",
314
314
  checked: I,
315
- onChange: Ce,
315
+ onChange: Se,
316
316
  "aria-label": I ? "Clear selection" : "Select every request on this page",
317
317
  className: "h-3.5 w-3.5 cursor-pointer align-middle accent-nvr-navy dark:accent-nvr-cyan"
318
318
  }
@@ -329,7 +329,7 @@ function Ct({
329
329
  }
330
330
  ),
331
331
  /* @__PURE__ */ e("th", { className: "px-3 py-2 font-medium", children: "Request" }),
332
- i && /* @__PURE__ */ e("th", { className: "hidden w-[15%] px-3 py-2 font-medium lg:table-cell", children: "Requester" }),
332
+ i && /* @__PURE__ */ e("th", { className: "w-[15%] px-3 py-2 font-medium max-lg:hidden", children: "Requester" }),
333
333
  /* @__PURE__ */ e("th", { className: "w-[17%] px-3 py-2 font-medium", children: i ? "Assignee" : "With" }),
334
334
  /* @__PURE__ */ e("th", { className: "w-28 px-3 py-2 font-medium", children: "Status" }),
335
335
  /* @__PURE__ */ e(
@@ -368,20 +368,20 @@ function Ct({
368
368
  )
369
369
  ] }) }),
370
370
  /* @__PURE__ */ e("tbody", { className: "divide-y divide-slate-100 dark:divide-border/60", children: L.map(({ row: t, state: d }) => /* @__PURE__ */ e(
371
- tt,
371
+ at,
372
372
  {
373
373
  t,
374
374
  desk: i,
375
375
  departed: d === "departed",
376
376
  open: s === t.id,
377
377
  selected: h.has(t.id),
378
- onToggle: () => V(t.id),
378
+ onToggle: () => Z(t.id),
379
379
  onOpen: () => c(t.id)
380
380
  },
381
381
  t.id
382
382
  )) })
383
383
  ] }) : /* @__PURE__ */ e(
384
- nt,
384
+ lt,
385
385
  {
386
386
  tab: a,
387
387
  filtered: w > 0 || !!f.trim(),
@@ -393,8 +393,8 @@ function Ct({
393
393
  }
394
394
  ),
395
395
  N > 0 && /* @__PURE__ */ n("div", { className: "mt-2 flex items-center gap-3 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
396
- /* @__PURE__ */ e("span", { className: "tabular-nums", children: N <= _ ? `${N} request${N === 1 ? "" : "s"}` : `${(C - 1) * _ + 1}–${Math.min(C * _, N)} of ${N}` }),
397
- Z > 1 && /* @__PURE__ */ n("span", { className: "flex items-center gap-1", children: [
396
+ /* @__PURE__ */ e("span", { className: "tabular-nums", children: N <= _ ? `${N} request${N === 1 ? "" : "s"}` : `${G((C - 1) * _ + 1)}–${G(Math.min(C * _, N))} of ${G(N)}` }),
397
+ ee > 1 && /* @__PURE__ */ n("span", { className: "flex items-center gap-1", children: [
398
398
  /* @__PURE__ */ e(
399
399
  "button",
400
400
  {
@@ -409,30 +409,30 @@ function Ct({
409
409
  "button",
410
410
  {
411
411
  type: "button",
412
- disabled: C >= Z,
412
+ disabled: C >= ee,
413
413
  onClick: () => P((t) => t + 1),
414
414
  className: "rounded px-1.5 py-0.5 hover:bg-slate-100 disabled:opacity-40 dark:hover:bg-white/5",
415
415
  children: "Next"
416
416
  }
417
417
  )
418
418
  ] }),
419
- W && !h.size && /* @__PURE__ */ e(
419
+ Q && !h.size && /* @__PURE__ */ e(
420
420
  "span",
421
421
  {
422
422
  className: "text-slate-700 dark:text-slate-200",
423
423
  "data-support-bulk-result": !0,
424
424
  role: "status",
425
- children: W
425
+ children: Q
426
426
  }
427
427
  )
428
428
  ] }),
429
429
  i && h.size > 0 && /* @__PURE__ */ e(
430
- st,
430
+ nt,
431
431
  {
432
432
  count: h.size,
433
- busy: X.isPending,
434
- people: H,
435
- onRun: ve,
433
+ busy: V.isPending,
434
+ people: J,
435
+ onRun: Ce,
436
436
  onClear: () => S(/* @__PURE__ */ new Set())
437
437
  }
438
438
  )
@@ -447,7 +447,7 @@ function A({
447
447
  className: o,
448
448
  right: i
449
449
  }) {
450
- const r = c === "asc" ? Te : Ae;
450
+ const r = c === "asc" ? Ae : Fe;
451
451
  return /* @__PURE__ */ e(
452
452
  "th",
453
453
  {
@@ -473,8 +473,8 @@ function A({
473
473
  }
474
474
  );
475
475
  }
476
- function he({ t: a, desk: s }) {
477
- const c = et.has(a.status), l = c ? a.completed_at ?? a.updated_at ?? a.created_at : s ? a.waiting_since ?? a.created_at : a.updated_at ?? a.created_at, u = c ? `Closed ${G(l)}` : s ? `Waiting since ${G(l)}` : `Updated ${G(l)}`;
476
+ function xe({ t: a, desk: s }) {
477
+ const c = tt.has(a.status), l = c ? a.completed_at ?? a.updated_at ?? a.created_at : s ? a.waiting_since ?? a.created_at : a.updated_at ?? a.created_at, u = c ? `Closed ${K(l)}` : s ? `Waiting since ${K(l)}` : `Updated ${K(l)}`;
478
478
  return /* @__PURE__ */ n(
479
479
  "time",
480
480
  {
@@ -482,7 +482,7 @@ function he({ t: a, desk: s }) {
482
482
  "data-tip": u,
483
483
  className: "relative tabular-nums text-slate-500 dark:text-muted-foreground",
484
484
  children: [
485
- me(l),
485
+ ge(l),
486
486
  /* @__PURE__ */ n("span", { className: "sr-only", children: [
487
487
  " (",
488
488
  u,
@@ -492,19 +492,19 @@ function he({ t: a, desk: s }) {
492
492
  }
493
493
  );
494
494
  }
495
- function xe({ p: a }) {
495
+ function be({ p: a }) {
496
496
  return a === "urgent" ? /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 font-medium text-red-600 dark:text-red-400", children: [
497
- /* @__PURE__ */ e(Fe, { className: "h-3 w-3" }),
497
+ /* @__PURE__ */ e(Ee, { className: "h-3 w-3" }),
498
498
  " Urgent"
499
499
  ] }) : /* @__PURE__ */ e("span", { className: "text-slate-500 capitalize dark:text-muted-foreground", children: a });
500
500
  }
501
- function be({ t: a }) {
501
+ function fe({ t: a }) {
502
502
  return a.assignee ? /* @__PURE__ */ n("span", { className: "flex min-w-0 items-center gap-1.5", children: [
503
- /* @__PURE__ */ e(K, { id: a.assignee, name: a.assignee_name }),
503
+ /* @__PURE__ */ e(j, { id: a.assignee, name: a.assignee_name }),
504
504
  /* @__PURE__ */ e("span", { className: "truncate text-slate-700 dark:text-slate-200", children: a.assignee_name ?? "Someone" })
505
505
  ] }) : /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded-full border border-dashed border-slate-300 px-2 py-px text-[11.5px] text-slate-500 dark:border-slate-600 dark:text-muted-foreground", children: "Unassigned" });
506
506
  }
507
- function fe(a, s) {
507
+ function ke(a, s) {
508
508
  return [
509
509
  a.record_label ?? "General Support",
510
510
  a.category_name,
@@ -512,7 +512,7 @@ function fe(a, s) {
512
512
  a.replies ? `${a.replies} repl${a.replies === 1 ? "y" : "ies"}` : null
513
513
  ].filter(Boolean).join(" · ");
514
514
  }
515
- function tt({ t: a, desk: s, departed: c, open: l, selected: u, onToggle: o, onOpen: i }) {
515
+ function at({ t: a, desk: s, departed: c, open: l, selected: u, onToggle: o, onOpen: i }) {
516
516
  return /* @__PURE__ */ n(
517
517
  "tr",
518
518
  {
@@ -548,20 +548,20 @@ function tt({ t: a, desk: s, departed: c, open: l, selected: u, onToggle: o, onO
548
548
  className: "block w-full min-w-0 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan rounded",
549
549
  children: [
550
550
  /* @__PURE__ */ e("span", { className: "block truncate text-[13px] font-medium text-slate-900 dark:text-slate-100", children: a.title }),
551
- /* @__PURE__ */ e("span", { className: "mt-0.5 block truncate text-[11.5px] text-slate-500 dark:text-muted-foreground", children: fe(a, !1) })
551
+ /* @__PURE__ */ e("span", { className: "mt-0.5 block truncate text-[11.5px] text-slate-500 dark:text-muted-foreground", children: ke(a, !1) })
552
552
  ]
553
553
  }
554
554
  ) }),
555
- s && /* @__PURE__ */ e("td", { className: "hidden truncate px-3 py-2 text-slate-700 lg:table-cell dark:text-slate-200", children: a.requester_name ?? "—" }),
556
- /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(be, { t: a }) }),
557
- /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(ge, { status: a.status, label: a.status_label }) }),
558
- /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(xe, { p: a.priority }) }),
559
- /* @__PURE__ */ e("td", { className: "py-2 pl-3 pr-4 text-right", children: /* @__PURE__ */ e(he, { t: a, desk: s }) })
555
+ s && /* @__PURE__ */ e("td", { className: "truncate px-3 py-2 text-slate-700 max-lg:hidden dark:text-slate-200", children: a.requester_name ?? "—" }),
556
+ /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(fe, { t: a }) }),
557
+ /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(he, { status: a.status, label: a.status_label }) }),
558
+ /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(be, { p: a.priority }) }),
559
+ /* @__PURE__ */ e("td", { className: "py-2 pl-3 pr-4 text-right", children: /* @__PURE__ */ e(xe, { t: a, desk: s }) })
560
560
  ]
561
561
  }
562
562
  );
563
563
  }
564
- function at({ t: a, desk: s, departed: c, open: l, selected: u, onToggle: o, onOpen: i }) {
564
+ function rt({ t: a, desk: s, departed: c, open: l, selected: u, onToggle: o, onOpen: i }) {
565
565
  return /* @__PURE__ */ n(
566
566
  "li",
567
567
  {
@@ -590,21 +590,21 @@ function at({ t: a, desk: s, departed: c, open: l, selected: u, onToggle: o, onO
590
590
  "#",
591
591
  a.id
592
592
  ] }),
593
- a.priority === "urgent" && /* @__PURE__ */ e(xe, { p: "urgent" }),
593
+ a.priority === "urgent" && /* @__PURE__ */ e(be, { p: "urgent" }),
594
594
  /* @__PURE__ */ n("span", { className: "ml-auto flex items-center gap-2", children: [
595
- /* @__PURE__ */ e(he, { t: a, desk: s }),
596
- /* @__PURE__ */ e(ge, { status: a.status, label: a.status_label })
595
+ /* @__PURE__ */ e(xe, { t: a, desk: s }),
596
+ /* @__PURE__ */ e(he, { status: a.status, label: a.status_label })
597
597
  ] })
598
598
  ] }),
599
599
  /* @__PURE__ */ e("span", { className: "mt-1 line-clamp-2 block text-[13.5px] font-medium text-slate-900 dark:text-slate-100", children: a.title }),
600
- /* @__PURE__ */ e("span", { className: "mt-0.5 block truncate text-[12px] text-slate-500 dark:text-muted-foreground", children: fe(a, s) }),
601
- /* @__PURE__ */ e("span", { className: "mt-1.5 block text-[12px]", children: /* @__PURE__ */ e(be, { t: a }) })
600
+ /* @__PURE__ */ e("span", { className: "mt-0.5 block truncate text-[12px] text-slate-500 dark:text-muted-foreground", children: ke(a, s) }),
601
+ /* @__PURE__ */ e("span", { className: "mt-1.5 block text-[12px]", children: /* @__PURE__ */ e(fe, { t: a }) })
602
602
  ] })
603
603
  ]
604
604
  }
605
605
  );
606
606
  }
607
- function rt({
607
+ function st({
608
608
  workload: a,
609
609
  active: s,
610
610
  onPick: c
@@ -615,7 +615,7 @@ function rt({
615
615
  ), u = (r) => /* @__PURE__ */ e("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-slate-100", children: r }), o = (r, b, f) => [
616
616
  `${r} open`,
617
617
  b ? `${b} urgent` : null,
618
- f ? `longest waiting ${me(f)}` : null
618
+ f ? `longest waiting ${ge(f)}` : null
619
619
  ].filter(Boolean).join(" · "), i = a.unassigned;
620
620
  return !i.open && !a.assignees.length ? null : /* @__PURE__ */ n(
621
621
  "div",
@@ -650,7 +650,7 @@ function rt({
650
650
  onClick: () => c(r.id),
651
651
  className: g(l(s === r.id), !r.active && "opacity-70"),
652
652
  children: [
653
- /* @__PURE__ */ e(K, { id: r.id, name: r.name, size: 20 }),
653
+ /* @__PURE__ */ e(j, { id: r.id, name: r.name, size: 20 }),
654
654
  /* @__PURE__ */ e("span", { className: "max-w-[9rem] truncate", children: r.name }),
655
655
  u(r.open),
656
656
  r.urgent > 0 && /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 rounded-full bg-red-500", "aria-hidden": !0 })
@@ -662,7 +662,7 @@ function rt({
662
662
  }
663
663
  );
664
664
  }
665
- function st({
665
+ function nt({
666
666
  count: a,
667
667
  busy: s,
668
668
  people: c,
@@ -690,13 +690,13 @@ function st({
690
690
  "data-tip": "Clear selection",
691
691
  "aria-label": "Clear selection",
692
692
  className: "ml-1 inline-flex h-6 w-6 items-center justify-center rounded text-slate-500 hover:bg-slate-100 hover:text-slate-800 dark:text-muted-foreground dark:hover:bg-white/10 dark:hover:text-slate-100",
693
- children: /* @__PURE__ */ e(ue, { className: "h-3.5 w-3.5" })
693
+ children: /* @__PURE__ */ e(pe, { className: "h-3.5 w-3.5" })
694
694
  }
695
695
  )
696
696
  ] }),
697
697
  /* @__PURE__ */ e("span", { className: "mx-1 h-5 w-px bg-slate-200 dark:bg-border", "aria-hidden": !0 }),
698
698
  /* @__PURE__ */ e(
699
- se,
699
+ ne,
700
700
  {
701
701
  onConfirm: () => l({ kind: "status", status: "done" }),
702
702
  disabled: s,
@@ -708,7 +708,7 @@ function st({
708
708
  }
709
709
  ),
710
710
  /* @__PURE__ */ e(
711
- se,
711
+ ne,
712
712
  {
713
713
  onConfirm: () => l({ kind: "status", status: "cancelled" }),
714
714
  disabled: s,
@@ -720,7 +720,7 @@ function st({
720
720
  }
721
721
  ),
722
722
  /* @__PURE__ */ e(
723
- pe,
723
+ me,
724
724
  {
725
725
  value: "",
726
726
  ariaLabel: "Assign to",
@@ -739,31 +739,31 @@ function st({
739
739
  ] })
740
740
  }
741
741
  ),
742
- /* @__PURE__ */ n(ne, { children: [
743
- /* @__PURE__ */ e(le, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", disabled: s, className: o, children: [
742
+ /* @__PURE__ */ n(le, { children: [
743
+ /* @__PURE__ */ e(ie, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", disabled: s, className: o, children: [
744
744
  "Status ",
745
745
  /* @__PURE__ */ e(F, {})
746
746
  ] }) }),
747
- /* @__PURE__ */ e(ie, { align: "start", className: "text-[12.5px]", children: [
747
+ /* @__PURE__ */ e(oe, { align: "start", className: "text-[12.5px]", children: [
748
748
  ["open", "Open"],
749
749
  ["in_progress", "In progress"],
750
750
  ["done", "Done"],
751
751
  ["cancelled", "Cancelled"]
752
- ].map(([r, b]) => /* @__PURE__ */ e(oe, { onSelect: () => l({ kind: "status", status: r }), children: b }, r)) })
752
+ ].map(([r, b]) => /* @__PURE__ */ e(de, { onSelect: () => l({ kind: "status", status: r }), children: b }, r)) })
753
753
  ] }),
754
- /* @__PURE__ */ n(ne, { children: [
755
- /* @__PURE__ */ e(le, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", disabled: s, className: o, children: [
754
+ /* @__PURE__ */ n(le, { children: [
755
+ /* @__PURE__ */ e(ie, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", disabled: s, className: o, children: [
756
756
  "Priority ",
757
757
  /* @__PURE__ */ e(F, {})
758
758
  ] }) }),
759
- /* @__PURE__ */ e(ie, { align: "start", className: "text-[12.5px]", children: ["urgent", "normal", "low"].map((r) => /* @__PURE__ */ e(oe, { onSelect: () => l({ kind: "priority", priority: r }), children: /* @__PURE__ */ e("span", { className: "capitalize", children: r }) }, r)) })
759
+ /* @__PURE__ */ e(oe, { align: "start", className: "text-[12.5px]", children: ["urgent", "normal", "low"].map((r) => /* @__PURE__ */ e(de, { onSelect: () => l({ kind: "priority", priority: r }), children: /* @__PURE__ */ e("span", { className: "capitalize", children: r }) }, r)) })
760
760
  ] })
761
761
  ]
762
762
  }
763
763
  ) })
764
764
  );
765
765
  }
766
- function nt({
766
+ function lt({
767
767
  tab: a,
768
768
  filtered: s,
769
769
  unassignedOnly: c,
@@ -771,7 +771,7 @@ function nt({
771
771
  onClear: u
772
772
  }) {
773
773
  return /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-2 px-6 py-12 text-center", "data-support-empty": !0, children: [
774
- /* @__PURE__ */ e(Re, { className: "h-6 w-6 text-slate-300 dark:text-slate-600" }),
774
+ /* @__PURE__ */ e(Te, { className: "h-6 w-6 text-slate-300 dark:text-slate-600" }),
775
775
  /* @__PURE__ */ e("p", { className: "text-[13px] font-medium text-slate-700 dark:text-slate-200", children: a === "desk" ? c ? "Every request has been picked up." : s ? "No requests match these filters." : l ? "Nothing closed yet." : "No open requests. The desk is clear." : s ? "None of your requests match." : l ? "No closed requests yet." : "You have no open requests." }),
776
776
  a === "mine" && !s && /* @__PURE__ */ e("p", { className: "max-w-sm text-[12px] text-slate-500 dark:text-muted-foreground", children: "Use Get help for anything general, or Request help on a record (beside Save) to ask for a change to that record." }),
777
777
  s && /* @__PURE__ */ e(
@@ -786,5 +786,5 @@ function nt({
786
786
  ] });
787
787
  }
788
788
  export {
789
- Ct as RequestList
789
+ St as RequestList
790
790
  };