@nivaro/react 0.3.138 → 0.3.140

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 (88) 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 +36 -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 +2677 -2658
  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 +3038 -3027
  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/SlaRulesView.js +73 -74
  23. package/dist/shared/components/WidgetSlot.js +73 -73
  24. package/dist/shared/components/ai/AiChart.js +36 -32
  25. package/dist/shared/components/ai/AiMarkdown.js +136 -129
  26. package/dist/shared/components/ai/TaskDo.js +87 -87
  27. package/dist/shared/components/ai/answer-formats.js +37 -30
  28. package/dist/shared/components/ai/call-log/format.js +17 -16
  29. package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
  30. package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
  31. package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
  32. package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
  33. package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
  34. package/dist/shared/components/bulk/bulk-field-options.js +10 -10
  35. package/dist/shared/components/cbv/column-totals.js +53 -51
  36. package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
  37. package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
  38. package/dist/shared/components/command-center/announce.js +7 -6
  39. package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
  40. package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
  41. package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
  42. package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
  43. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  44. package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
  45. package/dist/shared/components/integrations/console/EventsView.js +35 -35
  46. package/dist/shared/components/integrations/console/FirefightView.js +15 -14
  47. package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
  48. package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
  49. package/dist/shared/components/integrations/console/SignalCard.js +67 -67
  50. package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
  51. package/dist/shared/components/item-edit/ChangesTray.js +88 -74
  52. package/dist/shared/components/item-edit/FilePickerField.js +123 -123
  53. package/dist/shared/components/item-edit/GroupSection.js +301 -292
  54. package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
  55. package/dist/shared/components/item-edit/InlineGridField.js +45 -36
  56. package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
  57. package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
  58. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
  59. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
  60. package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
  61. package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
  62. package/dist/shared/components/ops-report/format.js +37 -36
  63. package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
  64. package/dist/shared/components/panels/RevisionsPanel.js +306 -305
  65. package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
  66. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
  67. package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
  68. package/dist/shared/components/pipeline/TeamsView.js +189 -130
  69. package/dist/shared/components/profile/AgentsPanel.js +6 -6
  70. package/dist/shared/components/profile/DelegationCard.js +13 -12
  71. package/dist/shared/components/profile/PersonActivity.js +48 -48
  72. package/dist/shared/components/profile/PersonExtras.js +107 -107
  73. package/dist/shared/components/profile/PersonWeek.js +9 -9
  74. package/dist/shared/components/queue/QueueBulkBar.js +19 -18
  75. package/dist/shared/components/queue/QueueBulkMove.js +21 -20
  76. package/dist/shared/components/queue/QueueItemSheet.js +136 -131
  77. package/dist/shared/components/queue/QueueWorklist.js +671 -670
  78. package/dist/shared/components/queue/worklist-helpers.js +36 -21
  79. package/dist/shared/components/support/RequestList.js +121 -121
  80. package/dist/shared/components/support/SupportAnalytics.js +29 -29
  81. package/dist/shared/lib/activity-sentence.js +316 -278
  82. package/dist/shared/lib/format-value.js +5 -4
  83. package/dist/shared/lib/number-format.js +87 -0
  84. package/dist/shared/lib/number-kind.js +133 -0
  85. package/dist/shared/lib/utils.js +24 -20
  86. package/dist/shared/lib/watch-list.js +1 -1
  87. package/dist/shared/lib/widget-value-format.js +26 -12
  88. package/package.json +1 -1
@@ -1,29 +1,29 @@
1
- import { jsxs as a, jsx as e, Fragment as H } from "react/jsx-runtime";
2
- import { useQueryClient as M, useQuery as $, useMutation as w } from "@tanstack/react-query";
3
- import { Plus as V, Sparkles as X, Users2 as Y, X as G, Loader2 as J } from "lucide-react";
4
- import { useState as b, useEffect as Z } from "react";
1
+ import { jsxs as a, jsx as e, Fragment as V } from "react/jsx-runtime";
2
+ import { useQueryClient as B, useQuery as $, useMutation as w } from "@tanstack/react-query";
3
+ import { Plus as X, Sparkles as Y, Users2 as G, X as J, Loader2 as Z } from "lucide-react";
4
+ import { useState as b, useEffect as ee } from "react";
5
5
  import { toast as C } from "sonner";
6
- import { useNivaroClient as T, useItemNavigation as ee } from "../../context.js";
7
- import { get as F, post as B, patch as te, del as O } from "../../lib/commands.js";
8
- import { useLiveOps as ae } from "../../lib/live-ops.js";
9
- import { cn as _, formatRelative as R } from "../../lib/utils.js";
6
+ import { useNivaroClient as P, useItemNavigation as te } from "../../context.js";
7
+ import { get as F, post as R, patch as ae, del as W } from "../../lib/commands.js";
8
+ import { useLiveOps as se } from "../../lib/live-ops.js";
9
+ import { cn as _, formatNumber as T, formatRelative as U } from "../../lib/utils.js";
10
+ import { QueryErrorState as re } from "../QueryErrorState.js";
10
11
  import { Button as N } from "../ui/button.js";
11
12
  import { Input as j } from "../ui/input.js";
12
- import { QueryErrorState as se } from "../QueryErrorState.js";
13
- import { Textarea as U } from "../ui/textarea.js";
14
- import { MemberPickerCombobox as re } from "./OwnerMatrix.js";
15
- import { TeamScopeEditor as le } from "./TeamScopeEditor.js";
16
- import { TeamSuggestionsPanel as ne } from "./TeamSuggestions.js";
17
- function W(t) {
13
+ import { Textarea as H } from "../ui/textarea.js";
14
+ import { MemberPickerCombobox as le } from "./OwnerMatrix.js";
15
+ import { TeamScopeEditor as ne } from "./TeamScopeEditor.js";
16
+ import { TeamSuggestionsPanel as ie } from "./TeamSuggestions.js";
17
+ function M(t) {
18
18
  return [t.first_name, t.last_name].filter(Boolean).join(" ") || t.email;
19
19
  }
20
- function ie({
20
+ function de({
21
21
  onCreated: t,
22
22
  onCancel: n
23
23
  }) {
24
- const r = T(), [l, c] = b(""), [d, m] = b(""), [v, p] = b(""), f = w({
24
+ const r = P(), [l, c] = b(""), [d, m] = b(""), [v, p] = b(""), f = w({
25
25
  mutationFn: () => r.request(
26
- B("/user-groups", {
26
+ R("/user-groups", {
27
27
  name: l.trim(),
28
28
  ...d.trim() ? { slug: d.trim() } : {},
29
29
  ...v.trim() ? { description: v.trim() } : {}
@@ -41,7 +41,14 @@ function ie({
41
41
  /* @__PURE__ */ e("h2", { className: "text-[14px] font-semibold text-slate-900 dark:text-foreground", children: "New team" }),
42
42
  /* @__PURE__ */ a("div", { className: "mt-3 space-y-3", children: [
43
43
  /* @__PURE__ */ a("div", { children: [
44
- /* @__PURE__ */ e("label", { className: "mb-1 block text-[11.5px] font-medium text-slate-500", htmlFor: "tv-name", children: "Name" }),
44
+ /* @__PURE__ */ e(
45
+ "label",
46
+ {
47
+ className: "mb-1 block text-[11.5px] font-medium text-slate-500",
48
+ htmlFor: "tv-name",
49
+ children: "Name"
50
+ }
51
+ ),
45
52
  /* @__PURE__ */ e(
46
53
  j,
47
54
  {
@@ -54,11 +61,18 @@ function ie({
54
61
  )
55
62
  ] }),
56
63
  /* @__PURE__ */ a("div", { children: [
57
- /* @__PURE__ */ a("label", { className: "mb-1 block text-[11.5px] font-medium text-slate-500", htmlFor: "tv-slug", children: [
58
- "Slug",
59
- " ",
60
- /* @__PURE__ */ e("span", { className: "font-normal text-slate-400", children: "(mention handle — blank derives from the name)" })
61
- ] }),
64
+ /* @__PURE__ */ a(
65
+ "label",
66
+ {
67
+ className: "mb-1 block text-[11.5px] font-medium text-slate-500",
68
+ htmlFor: "tv-slug",
69
+ children: [
70
+ "Slug",
71
+ " ",
72
+ /* @__PURE__ */ e("span", { className: "font-normal text-slate-400", children: "(mention handle — blank derives from the name)" })
73
+ ]
74
+ }
75
+ ),
62
76
  /* @__PURE__ */ e(
63
77
  j,
64
78
  {
@@ -71,9 +85,16 @@ function ie({
71
85
  )
72
86
  ] }),
73
87
  /* @__PURE__ */ a("div", { children: [
74
- /* @__PURE__ */ e("label", { className: "mb-1 block text-[11.5px] font-medium text-slate-500", htmlFor: "tv-desc", children: "Description" }),
75
88
  /* @__PURE__ */ e(
76
- U,
89
+ "label",
90
+ {
91
+ className: "mb-1 block text-[11.5px] font-medium text-slate-500",
92
+ htmlFor: "tv-desc",
93
+ children: "Description"
94
+ }
95
+ ),
96
+ /* @__PURE__ */ e(
97
+ H,
77
98
  {
78
99
  id: "tv-desc",
79
100
  value: v,
@@ -102,7 +123,11 @@ function ie({
102
123
  function D({ children: t }) {
103
124
  return /* @__PURE__ */ e("p", { className: "text-[10px] font-semibold uppercase tracking-[0.08em] text-slate-400 dark:text-slate-500", children: t });
104
125
  }
105
- function y({ label: t, value: n, tone: r }) {
126
+ function y({
127
+ label: t,
128
+ value: n,
129
+ tone: r
130
+ }) {
106
131
  return /* @__PURE__ */ a("div", { className: "bg-white px-4 py-3 dark:bg-card", children: [
107
132
  /* @__PURE__ */ e("p", { className: "text-[10px] font-semibold uppercase tracking-[0.08em] text-slate-400 dark:text-slate-500", children: t }),
108
133
  /* @__PURE__ */ e(
@@ -117,13 +142,22 @@ function y({ label: t, value: n, tone: r }) {
117
142
  )
118
143
  ] });
119
144
  }
120
- function de({ weekly: t }) {
145
+ function ce({ weekly: t }) {
121
146
  if (t.length < 2) return null;
122
147
  const n = 220, r = 36, l = Math.max(...t.map((d) => d.count), 1), c = t.map(
123
148
  (d, m) => `${(m / (t.length - 1) * (n - 4) + 2).toFixed(1)},${(r - 4 - d.count / l * (r - 8)).toFixed(1)}`
124
149
  ).join(" ");
125
150
  return /* @__PURE__ */ a("svg", { width: n, height: r, viewBox: `0 0 ${n} ${r}`, className: "shrink-0", "aria-hidden": !0, children: [
126
- /* @__PURE__ */ e("polyline", { points: c, fill: "none", stroke: "#8b5cf6", strokeWidth: "1.5", strokeLinejoin: "round" }),
151
+ /* @__PURE__ */ e(
152
+ "polyline",
153
+ {
154
+ points: c,
155
+ fill: "none",
156
+ stroke: "#8b5cf6",
157
+ strokeWidth: "1.5",
158
+ strokeLinejoin: "round"
159
+ }
160
+ ),
127
161
  t.length > 0 && /* @__PURE__ */ e(
128
162
  "circle",
129
163
  {
@@ -135,10 +169,10 @@ function de({ weekly: t }) {
135
169
  )
136
170
  ] });
137
171
  }
138
- function ce(t) {
172
+ function oe(t) {
139
173
  return t === "breached" ? /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-red-500", title: "SLA breached" }) : t === "warning" ? /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-amber-500", title: "SLA warning" }) : null;
140
174
  }
141
- function oe({ overview: t }) {
175
+ function me({ overview: t }) {
142
176
  const n = t.cells.states;
143
177
  return n.length === 0 ? /* @__PURE__ */ a("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: [
144
178
  /* @__PURE__ */ e(D, { children: "Owns" }),
@@ -147,73 +181,90 @@ function oe({ overview: t }) {
147
181
  /* @__PURE__ */ a("div", { className: "flex items-baseline justify-between", children: [
148
182
  /* @__PURE__ */ e(D, { children: "Owns" }),
149
183
  /* @__PURE__ */ a("span", { className: "text-[11px] tabular-nums text-slate-400", children: [
150
- t.cells.total,
184
+ T(t.cells.total),
151
185
  " matrix cell",
152
186
  t.cells.total === 1 ? "" : "s"
153
187
  ] })
154
188
  ] }),
155
- /* @__PURE__ */ e("div", { className: "mt-2 divide-y divide-slate-100 dark:divide-border/60", children: n.map((r) => /* @__PURE__ */ a("div", { className: "py-2.5 first:pt-1 last:pb-0", children: [
156
- /* @__PURE__ */ a("div", { className: "flex items-baseline gap-2", children: [
157
- /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 translate-y-[-1px] rounded-full bg-violet-500" }),
158
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800 dark:text-foreground", children: r.state_label }),
159
- /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: r.template_name }),
160
- /* @__PURE__ */ a("span", { className: "ml-auto text-[11px] tabular-nums text-slate-400", children: [
161
- r.count,
162
- " cell",
163
- r.count === 1 ? "" : "s"
164
- ] })
165
- ] }),
166
- /* @__PURE__ */ e("div", { className: "mt-1.5 space-y-1 pl-3.5", children: Object.entries(r.dims).map(([l, c]) => /* @__PURE__ */ a("div", { className: "flex flex-wrap items-baseline gap-1", children: [
167
- /* @__PURE__ */ e("span", { className: "mr-0.5 text-[10.5px] font-medium text-slate-400", children: l }),
168
- c.slice(0, 8).map((d) => /* @__PURE__ */ e(
169
- "span",
170
- {
171
- className: "rounded bg-slate-100 px-1.5 py-px text-[10.5px] text-slate-600 dark:bg-muted dark:text-slate-300",
172
- children: d
173
- },
174
- d
175
- )),
176
- c.length > 8 && /* @__PURE__ */ a("span", { className: "text-[10.5px] text-slate-400", children: [
177
- "+",
178
- c.length - 8,
179
- " more"
180
- ] })
181
- ] }, l)) })
182
- ] }, `${r.template_name}:${r.state_label}`)) })
189
+ /* @__PURE__ */ e("div", { className: "mt-2 divide-y divide-slate-100 dark:divide-border/60", children: n.map((r) => /* @__PURE__ */ a(
190
+ "div",
191
+ {
192
+ className: "py-2.5 first:pt-1 last:pb-0",
193
+ children: [
194
+ /* @__PURE__ */ a("div", { className: "flex items-baseline gap-2", children: [
195
+ /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 translate-y-[-1px] rounded-full bg-violet-500" }),
196
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800 dark:text-foreground", children: r.state_label }),
197
+ /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: r.template_name }),
198
+ /* @__PURE__ */ a("span", { className: "ml-auto text-[11px] tabular-nums text-slate-400", children: [
199
+ T(r.count),
200
+ " cell",
201
+ r.count === 1 ? "" : "s"
202
+ ] })
203
+ ] }),
204
+ /* @__PURE__ */ e("div", { className: "mt-1.5 space-y-1 pl-3.5", children: Object.entries(r.dims).map(([l, c]) => /* @__PURE__ */ a("div", { className: "flex flex-wrap items-baseline gap-1", children: [
205
+ /* @__PURE__ */ e("span", { className: "mr-0.5 text-[10.5px] font-medium text-slate-400", children: l }),
206
+ c.slice(0, 8).map((d) => /* @__PURE__ */ e(
207
+ "span",
208
+ {
209
+ className: "rounded bg-slate-100 px-1.5 py-px text-[10.5px] text-slate-600 dark:bg-muted dark:text-slate-300",
210
+ children: d
211
+ },
212
+ d
213
+ )),
214
+ c.length > 8 && /* @__PURE__ */ a("span", { className: "text-[10.5px] text-slate-400", children: [
215
+ "+",
216
+ c.length - 8,
217
+ " more"
218
+ ] })
219
+ ] }, l)) })
220
+ ]
221
+ },
222
+ `${r.template_name}:${r.state_label}`
223
+ )) })
183
224
  ] });
184
225
  }
185
- function me({ workload: t, loading: n }) {
186
- const r = ee();
226
+ function ue({
227
+ workload: t,
228
+ loading: n
229
+ }) {
230
+ const r = te();
187
231
  return /* @__PURE__ */ a("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: [
188
232
  /* @__PURE__ */ a("div", { className: "flex items-baseline justify-between", children: [
189
233
  /* @__PURE__ */ e(D, { children: "Waiting on this team" }),
190
234
  n ? /* @__PURE__ */ a("span", { className: "flex items-center gap-1.5 text-[11px] text-slate-400", children: [
191
- /* @__PURE__ */ e(J, { className: "h-3 w-3 animate-spin" }),
235
+ /* @__PURE__ */ e(Z, { className: "h-3 w-3 animate-spin" }),
192
236
  " resolving live…"
193
237
  ] }) : /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "live — resolved just now" })
194
238
  ] }),
195
239
  n ? /* @__PURE__ */ a("div", { className: "mt-3 space-y-2", children: [
196
240
  /* @__PURE__ */ e("div", { className: "h-4 w-2/3 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
197
241
  /* @__PURE__ */ e("div", { className: "h-4 w-1/2 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
198
- ] }) : !t || t.total === 0 ? /* @__PURE__ */ e("p", { className: "mt-2 text-[12.5px] italic text-slate-400", children: "Nothing is waiting on this team right now." }) : /* @__PURE__ */ a(H, { children: [
242
+ ] }) : !t || t.total === 0 ? /* @__PURE__ */ e("p", { className: "mt-2 text-[12.5px] italic text-slate-400", children: "Nothing is waiting on this team right now." }) : /* @__PURE__ */ a(V, { children: [
199
243
  t.truncated && /* @__PURE__ */ e("p", { className: "mt-1.5 text-[11px] text-amber-600 dark:text-amber-400", children: "Large backlog — counts cover the newest 4,000 open records." }),
200
- /* @__PURE__ */ e("div", { className: "mt-2 divide-y divide-slate-100 dark:divide-border/60", children: t.by_state.map((l) => /* @__PURE__ */ a("div", { className: "flex items-baseline gap-2 py-1.5", children: [
201
- /* @__PURE__ */ e("span", { className: "text-[12.5px] text-slate-700 dark:text-slate-200", children: l.state_label }),
202
- /* @__PURE__ */ e("span", { className: "text-[10.5px] text-slate-400", children: l.template_name }),
203
- /* @__PURE__ */ a("span", { className: "ml-auto flex items-center gap-2 tabular-nums", children: [
204
- l.sla_breached > 0 && /* @__PURE__ */ a("span", { className: "flex items-center gap-1 text-[11px] text-red-600 dark:text-red-400", children: [
205
- /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 rounded-full bg-red-500" }),
206
- " ",
207
- l.sla_breached
208
- ] }),
209
- l.sla_warning > 0 && /* @__PURE__ */ a("span", { className: "flex items-center gap-1 text-[11px] text-amber-600 dark:text-amber-400", children: [
210
- /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 rounded-full bg-amber-500" }),
211
- " ",
212
- l.sla_warning
213
- ] }),
214
- /* @__PURE__ */ e("span", { className: "text-[12.5px] font-medium text-slate-800 dark:text-foreground", children: l.count })
215
- ] })
216
- ] }, `${l.template_name}:${l.state_label}`)) }),
244
+ /* @__PURE__ */ e("div", { className: "mt-2 divide-y divide-slate-100 dark:divide-border/60", children: t.by_state.map((l) => /* @__PURE__ */ a(
245
+ "div",
246
+ {
247
+ className: "flex items-baseline gap-2 py-1.5",
248
+ children: [
249
+ /* @__PURE__ */ e("span", { className: "text-[12.5px] text-slate-700 dark:text-slate-200", children: l.state_label }),
250
+ /* @__PURE__ */ e("span", { className: "text-[10.5px] text-slate-400", children: l.template_name }),
251
+ /* @__PURE__ */ a("span", { className: "ml-auto flex items-center gap-2 tabular-nums", children: [
252
+ l.sla_breached > 0 && /* @__PURE__ */ a("span", { className: "flex items-center gap-1 text-[11px] text-red-600 dark:text-red-400", children: [
253
+ /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 rounded-full bg-red-500" }),
254
+ " ",
255
+ l.sla_breached
256
+ ] }),
257
+ l.sla_warning > 0 && /* @__PURE__ */ a("span", { className: "flex items-center gap-1 text-[11px] text-amber-600 dark:text-amber-400", children: [
258
+ /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 rounded-full bg-amber-500" }),
259
+ " ",
260
+ l.sla_warning
261
+ ] }),
262
+ /* @__PURE__ */ e("span", { className: "text-[12.5px] font-medium text-slate-800 dark:text-foreground", children: T(l.count) })
263
+ ] })
264
+ ]
265
+ },
266
+ `${l.template_name}:${l.state_label}`
267
+ )) }),
217
268
  t.records.length > 0 && /* @__PURE__ */ a("div", { className: "mt-3", children: [
218
269
  /* @__PURE__ */ e("p", { className: "text-[10.5px] font-medium text-slate-400", children: "Waiting longest" }),
219
270
  /* @__PURE__ */ e("div", { className: "mt-1 divide-y divide-slate-100 dark:divide-border/60", children: t.records.slice(0, 8).map((l) => /* @__PURE__ */ a(
@@ -223,10 +274,10 @@ function me({ workload: t, loading: n }) {
223
274
  onClick: () => r.open({ collection: l.collection, itemId: l.item_id }),
224
275
  className: "flex w-full items-baseline gap-2 py-1.5 text-left hover:bg-muted",
225
276
  children: [
226
- ce(l.sla_status),
277
+ oe(l.sla_status),
227
278
  /* @__PURE__ */ e("span", { className: "truncate text-[12.5px] font-medium text-nvr-navy underline decoration-nvr-cyan/50 decoration-[1.5px] underline-offset-2 dark:text-nvr-cyan", children: l.label }),
228
279
  /* @__PURE__ */ e("span", { className: "truncate text-[11px] text-slate-400", children: l.state_label }),
229
- l.started_at && /* @__PURE__ */ e("span", { className: "ml-auto shrink-0 text-[11px] tabular-nums text-slate-400", children: R(l.started_at) })
280
+ l.started_at && /* @__PURE__ */ e("span", { className: "ml-auto shrink-0 text-[11px] tabular-nums text-slate-400", children: U(l.started_at) })
230
281
  ]
231
282
  },
232
283
  `${l.collection}:${l.item_id}`
@@ -235,7 +286,7 @@ function me({ workload: t, loading: n }) {
235
286
  ] })
236
287
  ] });
237
288
  }
238
- function ue({ overview: t }) {
289
+ function pe({ overview: t }) {
239
290
  const n = t.throughput;
240
291
  return /* @__PURE__ */ a("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: [
241
292
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3", children: [
@@ -248,7 +299,8 @@ function ue({ overview: t }) {
248
299
  n.total_30d === 1 ? "" : "s",
249
300
  " in 30 days",
250
301
  n.sendbacks_30d > 0 && /* @__PURE__ */ a("span", { className: "text-slate-400", children: [
251
- " · ",
302
+ " ",
303
+ "· ",
252
304
  n.sendbacks_30d,
253
305
  " send-back",
254
306
  n.sendbacks_30d === 1 ? "" : "s"
@@ -260,7 +312,7 @@ function ue({ overview: t }) {
260
312
  ] })
261
313
  ] })
262
314
  ] }),
263
- /* @__PURE__ */ e(de, { weekly: n.weekly })
315
+ /* @__PURE__ */ e(ce, { weekly: n.weekly })
264
316
  ] }),
265
317
  /* @__PURE__ */ e("div", { className: "mt-3 divide-y divide-slate-100 dark:divide-border/60", children: [...t.roster].sort((r, l) => l.actions_30d - r.actions_30d).map((r) => /* @__PURE__ */ a("div", { className: "flex items-baseline gap-2 py-1.5", children: [
266
318
  /* @__PURE__ */ e("span", { className: "text-[12.5px] text-slate-700 dark:text-slate-200", children: [r.first_name, r.last_name].filter(Boolean).join(" ") || r.email }),
@@ -270,18 +322,18 @@ function ue({ overview: t }) {
270
322
  " action",
271
323
  r.actions_30d === 1 ? "" : "s"
272
324
  ] }),
273
- /* @__PURE__ */ e("span", { className: "w-24 shrink-0 text-right text-[11px] text-slate-400", children: r.last_action_at ? R(r.last_action_at) : "no actions" })
325
+ /* @__PURE__ */ e("span", { className: "w-24 shrink-0 text-right text-[11px] text-slate-400", children: r.last_action_at ? U(r.last_action_at) : "no actions" })
274
326
  ] }, r.id)) })
275
327
  ] });
276
328
  }
277
- function pe({
329
+ function xe({
278
330
  team: t,
279
331
  canManage: n,
280
332
  onChanged: r,
281
333
  onDeleted: l
282
334
  }) {
283
- const c = T(), d = M(), [m, v] = b(t.name), [p, f] = b(t.slug), [i, h] = b(t.description ?? ""), [L, q] = b(!1);
284
- Z(() => {
335
+ const c = P(), d = B(), [m, v] = b(t.name), [p, f] = b(t.slug), [i, h] = b(t.description ?? ""), [L, q] = b(!1);
336
+ ee(() => {
285
337
  v(t.name), f(t.slug), h(t.description ?? "");
286
338
  }, [t.name, t.slug, t.description]);
287
339
  const { data: u } = $({
@@ -293,7 +345,7 @@ function pe({
293
345
  queryFn: () => c.request(F(`/user-groups/${t.id}/workload`)).then((s) => s.data),
294
346
  staleTime: 6e4
295
347
  });
296
- ae(
348
+ se(
297
349
  "team",
298
350
  () => {
299
351
  d.invalidateQueries({ queryKey: ["team-overview", t.id] }), d.invalidateQueries({ queryKey: ["team-workload", t.id] }), d.invalidateQueries({ queryKey: ["team-members", t.id] });
@@ -304,11 +356,11 @@ function pe({
304
356
  queryKey: ["team-members", t.id],
305
357
  queryFn: () => c.request(F(`/user-groups/${t.id}/members`)).then((s) => s.data)
306
358
  }), o = m.trim() !== t.name || p.trim() !== t.slug || i.trim() !== (t.description ?? ""), S = (s, K) => {
307
- var A;
308
- return C.error(((A = s == null ? void 0 : s.response) == null ? void 0 : A.error) ?? K);
309
- }, P = w({
359
+ var O;
360
+ return C.error(((O = s == null ? void 0 : s.response) == null ? void 0 : O.error) ?? K);
361
+ }, Q = w({
310
362
  mutationFn: () => c.request(
311
- te(`/user-groups/${t.id}`, {
363
+ ae(`/user-groups/${t.id}`, {
312
364
  name: m.trim(),
313
365
  slug: p.trim(),
314
366
  description: i.trim() || null
@@ -318,21 +370,21 @@ function pe({
318
370
  C.success("Team updated"), r();
319
371
  },
320
372
  onError: (s) => S(s, "Update failed")
321
- }), Q = w({
322
- mutationFn: () => c.request(O(`/user-groups/${t.id}`)),
373
+ }), E = w({
374
+ mutationFn: () => c.request(W(`/user-groups/${t.id}`)),
323
375
  onSuccess: () => {
324
376
  C.success(`Deleted ${t.name}`), l();
325
377
  },
326
378
  onError: (s) => S(s, "Delete failed")
327
- }), E = () => {
379
+ }), z = () => {
328
380
  d.invalidateQueries({ queryKey: ["team-members", t.id] }), d.invalidateQueries({ queryKey: ["team-candidates"] }), r();
329
- }, z = w({
330
- mutationFn: (s) => c.request(B(`/user-groups/${t.id}/members`, { user_ids: [s] })),
331
- onSuccess: E,
381
+ }, I = w({
382
+ mutationFn: (s) => c.request(R(`/user-groups/${t.id}/members`, { user_ids: [s] })),
383
+ onSuccess: z,
332
384
  onError: (s) => S(s, "Could not add member")
333
- }), I = w({
334
- mutationFn: (s) => c.request(O(`/user-groups/${t.id}/members/${s}`)),
335
- onSuccess: E,
385
+ }), A = w({
386
+ mutationFn: (s) => c.request(W(`/user-groups/${t.id}/members/${s}`)),
387
+ onSuccess: z,
336
388
  onError: (s) => S(s, "Could not remove member")
337
389
  });
338
390
  return /* @__PURE__ */ a("div", { className: "space-y-4 p-5", children: [
@@ -403,7 +455,7 @@ function pe({
403
455
  }
404
456
  ),
405
457
  /* @__PURE__ */ e(
406
- U,
458
+ H,
407
459
  {
408
460
  id: "tvd-desc",
409
461
  value: i,
@@ -420,8 +472,8 @@ function pe({
420
472
  {
421
473
  size: "sm",
422
474
  className: "text-[12px]",
423
- disabled: !m.trim() || !p.trim() || P.isPending,
424
- onClick: () => P.mutate(),
475
+ disabled: !m.trim() || !p.trim() || Q.isPending,
476
+ onClick: () => Q.mutate(),
425
477
  children: "Save changes"
426
478
  }
427
479
  ),
@@ -441,8 +493,8 @@ function pe({
441
493
  size: "sm",
442
494
  variant: "destructive",
443
495
  className: "h-6 text-[11px]",
444
- disabled: Q.isPending,
445
- onClick: () => Q.mutate(),
496
+ disabled: E.isPending,
497
+ onClick: () => E.mutate(),
446
498
  children: "Yes, delete"
447
499
  }
448
500
  ),
@@ -478,12 +530,19 @@ function pe({
478
530
  ] }),
479
531
  t.description && /* @__PURE__ */ e("p", { className: "mt-2 text-[12.5px] text-slate-600 dark:text-slate-300", children: t.description })
480
532
  ] }) }),
481
- u && /* @__PURE__ */ e(oe, { overview: u }),
482
- /* @__PURE__ */ e(me, { workload: x, loading: k })
533
+ u && /* @__PURE__ */ e(me, { overview: u }),
534
+ /* @__PURE__ */ e(ue, { workload: x, loading: k })
483
535
  ] }),
484
536
  /* @__PURE__ */ a("div", { className: "space-y-4", children: [
485
- u && u.roster.length > 0 && /* @__PURE__ */ e(ue, { overview: u }),
486
- n && /* @__PURE__ */ e("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: /* @__PURE__ */ e(le, { teamId: t.id, scopes: t.scopes ?? {}, onSaved: () => r() }) }),
537
+ u && u.roster.length > 0 && /* @__PURE__ */ e(pe, { overview: u }),
538
+ n && /* @__PURE__ */ e("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: /* @__PURE__ */ e(
539
+ ne,
540
+ {
541
+ teamId: t.id,
542
+ scopes: t.scopes ?? {},
543
+ onSaved: () => r()
544
+ }
545
+ ) }),
487
546
  /* @__PURE__ */ a("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: [
488
547
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3", children: [
489
548
  /* @__PURE__ */ a("h3", { className: "text-[13px] font-semibold text-slate-800 dark:text-foreground", children: [
@@ -496,12 +555,12 @@ function pe({
496
555
  ] })
497
556
  ] }),
498
557
  n && /* @__PURE__ */ e("div", { className: "w-56", children: /* @__PURE__ */ e(
499
- re,
558
+ le,
500
559
  {
501
560
  teamId: t.id,
502
561
  excludeIds: g.map((s) => s.id),
503
- isPending: z.isPending,
504
- onPick: (s) => z.mutate(s)
562
+ isPending: I.isPending,
563
+ onPick: (s) => I.mutate(s)
505
564
  }
506
565
  ) })
507
566
  ] }),
@@ -511,18 +570,18 @@ function pe({
511
570
  className: "flex items-center gap-3 border-b border-slate-100 py-2 last:border-0 dark:border-border/60",
512
571
  children: [
513
572
  /* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
514
- /* @__PURE__ */ e("p", { className: "truncate text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children: W(s) }),
573
+ /* @__PURE__ */ e("p", { className: "truncate text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children: M(s) }),
515
574
  /* @__PURE__ */ e("p", { className: "truncate text-[11px] text-slate-400", children: s.email })
516
575
  ] }),
517
576
  n && /* @__PURE__ */ e(
518
577
  "button",
519
578
  {
520
579
  type: "button",
521
- disabled: I.isPending,
522
- onClick: () => I.mutate(s.id),
580
+ disabled: A.isPending,
581
+ onClick: () => A.mutate(s.id),
523
582
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-red-50 hover:text-red-500 dark:hover:bg-red-950/30",
524
- "aria-label": `Remove ${W(s)}`,
525
- children: /* @__PURE__ */ e(G, { className: "h-3.5 w-3.5" })
583
+ "aria-label": `Remove ${M(s)}`,
584
+ children: /* @__PURE__ */ e(J, { className: "h-3.5 w-3.5" })
526
585
  }
527
586
  )
528
587
  ]
@@ -534,12 +593,12 @@ function pe({
534
593
  ] })
535
594
  ] });
536
595
  }
537
- function je({
596
+ function De({
538
597
  canManage: t = !0,
539
598
  compact: n = !1,
540
599
  initialTeamId: r = null
541
600
  }) {
542
- const l = T(), c = M(), [d, m] = b(r), [v, p] = b(!1), [f, i] = b(!1), {
601
+ const l = P(), c = B(), [d, m] = b(r), [v, p] = b(!1), [f, i] = b(!1), {
543
602
  data: h = [],
544
603
  isLoading: L,
545
604
  isError: q,
@@ -571,7 +630,7 @@ function je({
571
630
  p(!0), i(!1), m(null);
572
631
  },
573
632
  children: [
574
- /* @__PURE__ */ e(V, { className: "h-3.5 w-3.5" }),
633
+ /* @__PURE__ */ e(X, { className: "h-3.5 w-3.5" }),
575
634
  " New team"
576
635
  ]
577
636
  }
@@ -590,14 +649,14 @@ function je({
590
649
  },
591
650
  "data-team-suggestions-open": !0,
592
651
  children: [
593
- /* @__PURE__ */ e(X, { className: "h-3.5 w-3.5" }),
652
+ /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5" }),
594
653
  " Suggested teams"
595
654
  ]
596
655
  }
597
656
  )
598
657
  ] }),
599
658
  /* @__PURE__ */ e("div", { className: "min-h-0 flex-1 overflow-y-auto", children: L ? /* @__PURE__ */ e("p", { className: "p-4 text-[12.5px] text-slate-400", children: "Loading…" }) : q && h.length === 0 ? /* @__PURE__ */ e(
600
- se,
659
+ re,
601
660
  {
602
661
  error: u,
603
662
  what: "teams",
@@ -642,14 +701,14 @@ function je({
642
701
  }
643
702
  ),
644
703
  /* @__PURE__ */ e("div", { className: "min-h-0 flex-1 overflow-y-auto bg-slate-50 dark:bg-background", children: f && t ? /* @__PURE__ */ e(
645
- ne,
704
+ ie,
646
705
  {
647
706
  onApplied: (o) => {
648
707
  i(!1), m(o), g();
649
708
  }
650
709
  }
651
710
  ) : v && t ? /* @__PURE__ */ e(
652
- ie,
711
+ de,
653
712
  {
654
713
  onCreated: (o) => {
655
714
  p(!1), m(o), g();
@@ -657,7 +716,7 @@ function je({
657
716
  onCancel: () => p(!1)
658
717
  }
659
718
  ) : k ? /* @__PURE__ */ e(
660
- pe,
719
+ xe,
661
720
  {
662
721
  team: k,
663
722
  canManage: t,
@@ -668,11 +727,11 @@ function je({
668
727
  },
669
728
  k.id
670
729
  ) : /* @__PURE__ */ a("div", { className: "pt-24 text-center text-slate-400", children: [
671
- /* @__PURE__ */ e(Y, { className: "mx-auto h-8 w-8 opacity-40" }),
730
+ /* @__PURE__ */ e(G, { className: "mx-auto h-8 w-8 opacity-40" }),
672
731
  /* @__PURE__ */ e("p", { className: "mt-3 text-[13px]", children: h.length === 0 ? t ? "Create your first team to get started." : "No teams have been created yet." : "Select a team to view its members and scope." })
673
732
  ] }) })
674
733
  ] });
675
734
  }
676
735
  export {
677
- je as TeamsView
736
+ De as TeamsView
678
737
  };
@@ -358,19 +358,19 @@ function Se({
358
358
  o.activity_id
359
359
  )) }),
360
360
  /* @__PURE__ */ a("p", { className: "mt-1 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
361
- e.api_calls,
361
+ g(e.api_calls),
362
362
  " request",
363
363
  e.api_calls === 1 ? "" : "s",
364
- " into Nivaro · ",
365
- e.ms,
366
- " ms"
364
+ " into Nivaro ·",
365
+ " ",
366
+ e.ms >= 1e3 ? `${(e.ms / 1e3).toFixed(1)} s` : `${e.ms} ms`
367
367
  ] })
368
368
  ] })
369
369
  ] })
370
370
  ] });
371
371
  }
372
372
  function Oe({ className: e }) {
373
- var P, L, R, $, F, I;
373
+ var P, $, L, R, F, I;
374
374
  const r = le(), s = G(), [l, d] = v(""), c = re(null), [u, x] = v(null), p = H({
375
375
  queryKey: K("mine"),
376
376
  queryFn: () => r.request(q("/mcp-connections/mine")).then((n) => n.data)
@@ -402,7 +402,7 @@ function Oe({ className: e }) {
402
402
  }), b = ((P = p.data) == null ? void 0 : P.connections) ?? [], f = D(() => {
403
403
  var n;
404
404
  return ((n = i.data) == null ? void 0 : n.pages.flatMap((m) => m.calls)) ?? [];
405
- }, [i.data]), V = ((L = p.data) == null ? void 0 : L.logged) !== !1 && (($ = (R = i.data) == null ? void 0 : R.pages[0]) == null ? void 0 : $.logged) !== !1, S = D(
405
+ }, [i.data]), V = (($ = p.data) == null ? void 0 : $.logged) !== !1 && ((R = (L = i.data) == null ? void 0 : L.pages[0]) == null ? void 0 : R.logged) !== !1, S = D(
406
406
  () => [
407
407
  { value: "", label: "Every app" },
408
408
  ...b.filter((n) => {