@nivaro/react 0.3.139 → 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 (87) hide show
  1. package/dist/components/InlineGridField.js +95 -92
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +36 -2
  4. package/dist/shared/components/AudienceConfirmPanel.js +19 -19
  5. package/dist/shared/components/BroadcastView.js +213 -211
  6. package/dist/shared/components/CollectionBrowserView.js +2677 -2658
  7. package/dist/shared/components/ConfigHistory.js +45 -45
  8. package/dist/shared/components/ConformanceView.js +110 -110
  9. package/dist/shared/components/DataTable.js +51 -51
  10. package/dist/shared/components/FilePreviewLightbox.js +26 -25
  11. package/dist/shared/components/ItemEditForm.js +3038 -3027
  12. package/dist/shared/components/LiveCount.js +27 -23
  13. package/dist/shared/components/LiveTraceView.js +62 -61
  14. package/dist/shared/components/PageRenderer.js +422 -410
  15. package/dist/shared/components/ProfileView.js +199 -199
  16. package/dist/shared/components/QualityRulesView.js +70 -70
  17. package/dist/shared/components/QueryTable.js +131 -130
  18. package/dist/shared/components/RecordGraph.js +98 -98
  19. package/dist/shared/components/RecordReadView.js +287 -288
  20. package/dist/shared/components/ReportView.js +1279 -1259
  21. package/dist/shared/components/SlaRulesView.js +73 -74
  22. package/dist/shared/components/WidgetSlot.js +73 -73
  23. package/dist/shared/components/ai/AiChart.js +36 -32
  24. package/dist/shared/components/ai/AiMarkdown.js +136 -129
  25. package/dist/shared/components/ai/TaskDo.js +87 -87
  26. package/dist/shared/components/ai/answer-formats.js +37 -30
  27. package/dist/shared/components/ai/call-log/format.js +17 -16
  28. package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
  29. package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
  30. package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
  31. package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
  32. package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
  33. package/dist/shared/components/bulk/bulk-field-options.js +10 -10
  34. package/dist/shared/components/cbv/column-totals.js +53 -51
  35. package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
  36. package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
  37. package/dist/shared/components/command-center/announce.js +7 -6
  38. package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
  39. package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
  40. package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
  41. package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
  42. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  43. package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
  44. package/dist/shared/components/integrations/console/EventsView.js +35 -35
  45. package/dist/shared/components/integrations/console/FirefightView.js +15 -14
  46. package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
  47. package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
  48. package/dist/shared/components/integrations/console/SignalCard.js +67 -67
  49. package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
  50. package/dist/shared/components/item-edit/ChangesTray.js +88 -74
  51. package/dist/shared/components/item-edit/FilePickerField.js +123 -123
  52. package/dist/shared/components/item-edit/GroupSection.js +301 -292
  53. package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
  54. package/dist/shared/components/item-edit/InlineGridField.js +45 -36
  55. package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
  56. package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
  57. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
  58. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
  59. package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
  60. package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
  61. package/dist/shared/components/ops-report/format.js +37 -36
  62. package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
  63. package/dist/shared/components/panels/RevisionsPanel.js +306 -305
  64. package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
  65. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
  66. package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
  67. package/dist/shared/components/pipeline/TeamsView.js +189 -130
  68. package/dist/shared/components/profile/AgentsPanel.js +6 -6
  69. package/dist/shared/components/profile/DelegationCard.js +13 -12
  70. package/dist/shared/components/profile/PersonActivity.js +48 -48
  71. package/dist/shared/components/profile/PersonExtras.js +107 -107
  72. package/dist/shared/components/profile/PersonWeek.js +9 -9
  73. package/dist/shared/components/queue/QueueBulkBar.js +19 -18
  74. package/dist/shared/components/queue/QueueBulkMove.js +21 -20
  75. package/dist/shared/components/queue/QueueItemSheet.js +136 -131
  76. package/dist/shared/components/queue/QueueWorklist.js +671 -670
  77. package/dist/shared/components/queue/worklist-helpers.js +36 -21
  78. package/dist/shared/components/support/RequestList.js +121 -121
  79. package/dist/shared/components/support/SupportAnalytics.js +29 -29
  80. package/dist/shared/lib/activity-sentence.js +251 -229
  81. package/dist/shared/lib/format-value.js +5 -4
  82. package/dist/shared/lib/number-format.js +87 -0
  83. package/dist/shared/lib/number-kind.js +133 -0
  84. package/dist/shared/lib/utils.js +24 -20
  85. package/dist/shared/lib/watch-list.js +1 -1
  86. package/dist/shared/lib/widget-value-format.js +26 -12
  87. package/package.json +1 -1
@@ -1,21 +1,21 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
- import { useQueryClient as ie, useQuery as V, useQueries as Se, useMutation as Ce } from "@tanstack/react-query";
3
- import { Code2 as _e, ChevronDown as qe, Loader2 as Oe, Send as Ee } from "lucide-react";
4
- import { useState as E, useRef as Fe, useEffect as X, useMemo as y, Fragment as Le } from "react";
5
- import { toast as Z } from "sonner";
6
- import { useNivaroClient as le, useItemNavigation as Te, useNavigation as Ke } from "../../context.js";
7
- import { get as Y, post as se } from "../../lib/commands.js";
8
- import { obligationQueryParams as Ie, obligationTabsFor as je, toneForOutcome as Pe, toneForObligation as De, isRoutableRecord as Re, attemptsLabel as Ae, lastResponseLabel as He, lastResponseFull as Me } from "../../lib/obligation-filters.js";
9
- import { plainObligationReason as ee } from "../../lib/obligation-reason-text.js";
10
- import { serverNow as Qe } from "../../lib/server-clock.js";
11
- import { titleCase as de, cn as d, formatRelative as ce, humanHours as $e } from "../../lib/utils.js";
12
- import { EmptyState as te } from "../EmptyState.js";
13
- import { ErrorSurface as oe } from "../ErrorSurface.js";
14
- import { colorPair as ne } from "../QueryTable.js";
15
- import { TipLayer as Be } from "../TipLayer.js";
16
- import { SimpleSelectXs as P } from "../ui/SimpleSelect.js";
17
- import { SendCurrentDataButton as Ue } from "./SendCurrentData.js";
18
- const D = {
2
+ import { useQueryClient as le, useQuery as X, useQueries as Ce, useMutation as _e } from "@tanstack/react-query";
3
+ import { Code2 as qe, ChevronDown as Oe, Loader2 as Ee, Send as Fe } from "lucide-react";
4
+ import { useState as E, useRef as Le, useEffect as Z, useMemo as y, Fragment as Te } from "react";
5
+ import { toast as Y } from "sonner";
6
+ import { useNivaroClient as se, useItemNavigation as Ke, useNavigation as Ie } from "../../context.js";
7
+ import { get as ee, post as de } from "../../lib/commands.js";
8
+ import { obligationQueryParams as je, obligationTabsFor as Pe, toneForOutcome as De, toneForObligation as Re, isRoutableRecord as Ae, attemptsLabel as He, lastResponseLabel as Me, lastResponseFull as Qe } from "../../lib/obligation-filters.js";
9
+ import { plainObligationReason as te } from "../../lib/obligation-reason-text.js";
10
+ import { serverNow as $e } from "../../lib/server-clock.js";
11
+ import { titleCase as ce, cn as d, formatRelative as ue, formatNumber as P, humanHours as Be } from "../../lib/utils.js";
12
+ import { EmptyState as oe } from "../EmptyState.js";
13
+ import { ErrorSurface as ne } from "../ErrorSurface.js";
14
+ import { colorPair as ae } from "../QueryTable.js";
15
+ import { TipLayer as Ue } from "../TipLayer.js";
16
+ import { SimpleSelectXs as D } from "../ui/SimpleSelect.js";
17
+ import { SendCurrentDataButton as Je } from "./SendCurrentData.js";
18
+ const R = {
19
19
  overdue: "Overdue",
20
20
  failed: "Failed",
21
21
  pending: "Pending",
@@ -23,7 +23,7 @@ const D = {
23
23
  sent: "Sent",
24
24
  missing: "Missing",
25
25
  superseded: "Superseded"
26
- }, Je = [
26
+ }, We = [
27
27
  "overdue",
28
28
  "failed",
29
29
  "pending",
@@ -32,25 +32,25 @@ const D = {
32
32
  "missing",
33
33
  "superseded"
34
34
  ];
35
- function ae(n) {
35
+ function re(n) {
36
36
  return n === "danger" ? "negative" : n === "warning" ? "warning" : n === "positive" ? "positive" : null;
37
37
  }
38
- function We(n) {
39
- const b = new Date(n).getTime() - Qe();
40
- return b > 0 ? `due in ${$e(b / 36e5)}` : ce(n);
38
+ function ze(n) {
39
+ const b = new Date(n).getTime() - $e();
40
+ return b > 0 ? `due in ${Be(b / 36e5)}` : ue(n);
41
41
  }
42
- function ze({ obligationId: n }) {
43
- const b = le(), c = ie(), [p, g] = E(!1), a = Ce({
42
+ function Ge({ obligationId: n }) {
43
+ const b = se(), c = le(), [p, g] = E(!1), a = _e({
44
44
  mutationFn: () => b.request(
45
- se(`/integration-obligations/${n}/send`)
45
+ de(`/integration-obligations/${n}/send`)
46
46
  ),
47
47
  onSuccess: (l) => {
48
48
  var u;
49
- Z.message(((u = l == null ? void 0 : l.data) == null ? void 0 : u.detail) ?? "Sent"), c.invalidateQueries({ queryKey: ["integration-obligations", "summary"] }), c.invalidateQueries({ queryKey: ["integration-obligations", "list"] });
49
+ Y.message(((u = l == null ? void 0 : l.data) == null ? void 0 : u.detail) ?? "Sent"), c.invalidateQueries({ queryKey: ["integration-obligations", "summary"] }), c.invalidateQueries({ queryKey: ["integration-obligations", "list"] });
50
50
  },
51
51
  onError: (l) => {
52
52
  const u = l == null ? void 0 : l.response;
53
- Z.error((u == null ? void 0 : u.error) ?? "Send now failed", { duration: 8e3 });
53
+ Y.error((u == null ? void 0 : u.error) ?? "Send now failed", { duration: 8e3 });
54
54
  },
55
55
  onSettled: () => g(!1)
56
56
  });
@@ -72,13 +72,13 @@ function ze({ obligationId: n }) {
72
72
  p ? "border-nvr-cyan bg-nvr-cyan/10 text-nvr-cyan dark:border-nvr-cyan dark:bg-nvr-cyan/15" : "border-slate-200 text-slate-500 hover:border-slate-300 hover:bg-slate-50 dark:border-border dark:text-muted-foreground dark:hover:bg-muted"
73
73
  ),
74
74
  children: [
75
- a.isPending ? /* @__PURE__ */ t(Oe, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(Ee, { className: "h-3 w-3" }),
75
+ a.isPending ? /* @__PURE__ */ t(Ee, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(Fe, { className: "h-3 w-3" }),
76
76
  p ? "Confirm?" : "Send now"
77
77
  ]
78
78
  }
79
79
  );
80
80
  }
81
- function Ge({ open: n, onToggle: b }) {
81
+ function Ve({ open: n, onToggle: b }) {
82
82
  return /* @__PURE__ */ r(
83
83
  "button",
84
84
  {
@@ -89,15 +89,15 @@ function Ge({ open: n, onToggle: b }) {
89
89
  },
90
90
  className: "inline-flex shrink-0 items-center gap-1 rounded-full border border-slate-200 px-2 py-0.5 text-[10.5px] font-medium text-slate-500 transition-colors hover:border-slate-300 hover:bg-slate-50 dark:border-border dark:text-muted-foreground dark:hover:bg-muted",
91
91
  children: [
92
- /* @__PURE__ */ t(_e, { className: "h-3 w-3" }),
92
+ /* @__PURE__ */ t(qe, { className: "h-3 w-3" }),
93
93
  n ? "Hide request" : "Show request",
94
- /* @__PURE__ */ t(qe, { className: d("h-3 w-3 transition-transform", n && "rotate-180") })
94
+ /* @__PURE__ */ t(Oe, { className: d("h-3 w-3 transition-transform", n && "rotate-180") })
95
95
  ]
96
96
  }
97
97
  );
98
98
  }
99
- function Ve() {
100
- const n = Ke(), b = "/settings?section=integrations", c = n.consoleUrl ? n.consoleUrl(b) : b;
99
+ function Xe() {
100
+ const n = Ie(), b = "/settings?section=integrations", c = n.consoleUrl ? n.consoleUrl(b) : b;
101
101
  if (!c) return null;
102
102
  const p = /^https?:\/\//.test(c);
103
103
  return /* @__PURE__ */ t(
@@ -114,10 +114,10 @@ function Ve() {
114
114
  }
115
115
  );
116
116
  }
117
- function re(n) {
118
- return n.record_label ? n.record_label : /^(nivaro|directus)_/i.test(n.collection) ? n.item : de(n.collection).replace(/s$/, "");
117
+ function ie(n) {
118
+ return n.record_label ? n.record_label : /^(nivaro|directus)_/i.test(n.collection) ? n.item : ce(n.collection).replace(/s$/, "");
119
119
  }
120
- function Xe(n) {
120
+ function Ze(n) {
121
121
  return n.submission_attempts == null ? null : {
122
122
  attempts: n.submission_attempts,
123
123
  status: n.submission_status,
@@ -125,7 +125,7 @@ function Xe(n) {
125
125
  response: n.submission_response
126
126
  };
127
127
  }
128
- function Ze(n) {
128
+ function Ye(n) {
129
129
  if (!n) return null;
130
130
  try {
131
131
  return JSON.stringify(JSON.parse(n), null, 2);
@@ -134,83 +134,83 @@ function Ze(n) {
134
134
  }
135
135
  }
136
136
  const _ = 50;
137
- function ht({ api: n, className: b }) {
138
- const c = le(), p = ie(), g = Te(), [a, l] = E({
137
+ function xt({ api: n, className: b }) {
138
+ const c = se(), p = le(), g = Ke(), [a, l] = E({
139
139
  api: n ?? null,
140
140
  kind: null,
141
141
  collection: null,
142
142
  outcome: ["overdue", "failed", "missing"],
143
143
  ageHours: null
144
- }), [u, F] = E(1), [ue, R] = E(null), A = Fe(n ?? null);
145
- X(() => {
144
+ }), [u, F] = E(1), [me, A] = E(null), H = Le(n ?? null);
145
+ Z(() => {
146
146
  const e = n ?? null;
147
- e !== A.current && (A.current = e, l((o) => ({ ...o, api: e })));
147
+ e !== H.current && (H.current = e, l((o) => ({ ...o, api: e })));
148
148
  }, [n]);
149
149
  const {
150
150
  data: m,
151
- isLoading: H,
152
- isError: me
153
- } = V({
151
+ isLoading: M,
152
+ isError: be
153
+ } = X({
154
154
  queryKey: ["integration-obligations", "summary"],
155
- queryFn: () => c.request(Y("/integration-obligations/summary")),
155
+ queryFn: () => c.request(ee("/integration-obligations/summary")),
156
156
  staleTime: 3e4
157
- }), S = (m == null ? void 0 : m.remediation_enabled) === !0, be = (m == null ? void 0 : m.notifications_enabled) === !0, M = H ? [] : [
158
- !be && "notifications off",
157
+ }), S = (m == null ? void 0 : m.remediation_enabled) === !0, pe = (m == null ? void 0 : m.notifications_enabled) === !0, Q = M ? [] : [
158
+ !pe && "notifications off",
159
159
  !S && "remediation off"
160
- ].filter((e) => !!e), pe = a.outcome.join(",");
161
- X(() => {
162
- F(1), R(null);
163
- }, [a.api, a.kind, a.collection, pe, a.ageHours]);
164
- const Q = y(
160
+ ].filter((e) => !!e), ge = a.outcome.join(",");
161
+ Z(() => {
162
+ F(1), A(null);
163
+ }, [a.api, a.kind, a.collection, ge, a.ageHours]);
164
+ const $ = y(
165
165
  () => ({
166
- ...Ie(a),
166
+ ...je(a),
167
167
  page: String(u),
168
168
  limit: String(_)
169
169
  }),
170
170
  [a, u]
171
171
  ), {
172
172
  data: N,
173
- isLoading: ge,
174
- isFetching: he,
175
- isError: xe
176
- } = V({
177
- queryKey: ["integration-obligations", "list", Q],
178
- queryFn: () => c.request(Y("/integration-obligations", Q)),
173
+ isLoading: he,
174
+ isFetching: xe,
175
+ isError: fe
176
+ } = X({
177
+ queryKey: ["integration-obligations", "list", $],
178
+ queryFn: () => c.request(ee("/integration-obligations", $)),
179
179
  staleTime: 15e3,
180
180
  placeholderData: (e) => e
181
- }), $ = (m == null ? void 0 : m.data.apis) ?? [], B = n ? $.filter((e) => e.api === n) : $, w = (m == null ? void 0 : m.data.kinds) ?? [], L = a.api ? w.filter((e) => e.api === a.api) : w, fe = y(() => {
181
+ }), B = (m == null ? void 0 : m.data.apis) ?? [], U = n ? B.filter((e) => e.api === n) : B, w = (m == null ? void 0 : m.data.kinds) ?? [], L = a.api ? w.filter((e) => e.api === a.api) : w, ve = y(() => {
182
182
  const e = /* @__PURE__ */ new Map();
183
183
  for (const o of w) e.has(o.kind) || e.set(o.kind, o.label);
184
184
  return e;
185
- }, [w]), ve = y(() => {
185
+ }, [w]), ke = y(() => {
186
186
  const e = /* @__PURE__ */ new Map();
187
187
  for (const o of L)
188
- e.has(o.collection) || e.set(o.collection, de(o.collection));
188
+ e.has(o.collection) || e.set(o.collection, ce(o.collection));
189
189
  return [...e.entries()].map(([o, i]) => ({ value: o, label: i })).sort((o, i) => o.label.localeCompare(i.label));
190
- }, [L]), f = y(() => je(w, a.api), [w, a.api]), U = y(
190
+ }, [L]), f = y(() => Pe(w, a.api), [w, a.api]), J = y(
191
191
  () => new Set(
192
192
  (a.kind ?? "").split(",").map((e) => e.trim()).filter(Boolean)
193
193
  ),
194
194
  [a.kind]
195
- ), J = (e) => e.length > 0 && e.length === U.size && e.every((o) => U.has(o)), s = J(f.waiting) ? "waiting" : J(f.inbound) ? "inbound" : "all", T = (e) => {
195
+ ), W = (e) => e.length > 0 && e.length === J.size && e.every((o) => J.has(o)), s = W(f.waiting) ? "waiting" : W(f.inbound) ? "inbound" : "all", T = (e) => {
196
196
  const o = e === "waiting" ? f.waiting : e === "inbound" ? f.inbound : [];
197
197
  l((i) => ({ ...i, kind: o.length > 0 ? o.join(",") : null }));
198
198
  }, C = (N == null ? void 0 : N.data) ?? [], q = (N == null ? void 0 : N.total) ?? 0, K = y(
199
199
  () => s === "waiting" ? [...new Set(C.map((e) => e.collection))] : [],
200
200
  [s, C]
201
- ), I = Se({
201
+ ), I = Ce({
202
202
  queries: K.map((e) => {
203
203
  const o = C.filter((i) => i.collection === e).map((i) => i.item);
204
204
  return {
205
205
  queryKey: ["integration-obligations", "owners", e, o.slice().sort().join(",")],
206
206
  queryFn: () => c.request(
207
- se(`/pipelines/instance/${e}/owners/batch`, { ids: o })
207
+ de(`/pipelines/instance/${e}/owners/batch`, { ids: o })
208
208
  ).then((i) => i.data ?? {}),
209
209
  enabled: o.length > 0,
210
210
  staleTime: 6e4
211
211
  };
212
212
  })
213
- }), W = y(() => {
213
+ }), z = y(() => {
214
214
  const e = {};
215
215
  return K.forEach((o, i) => {
216
216
  var v;
@@ -219,33 +219,33 @@ function ht({ api: n, className: b }) {
219
219
  for (const [x, k] of Object.entries(h))
220
220
  e[`${o}:${x}`] = k.map((O) => O.name).join(", ");
221
221
  }), e;
222
- }, [K, I]), ke = I.some((e) => e.isLoading), ye = (e) => {
222
+ }, [K, I]), ye = I.some((e) => e.isLoading), Ne = (e) => {
223
223
  const o = `${e.collection}:${e.item}`;
224
- return o in W ? W[o] || "—" : ke ? "…" : "—";
225
- }, Ne = 7 + (s === "waiting" ? 1 : 0) + (s === "inbound" ? 1 : 0) + (S ? 1 : 0), z = (e) => l((o) => ({
224
+ return o in z ? z[o] || "—" : ye ? "…" : "—";
225
+ }, we = 7 + (s === "waiting" ? 1 : 0) + (s === "inbound" ? 1 : 0) + (S ? 1 : 0), G = (e) => l((o) => ({
226
226
  ...o,
227
227
  outcome: o.outcome.includes(e) ? o.outcome.filter((i) => i !== e) : [...o.outcome, e]
228
- })), we = (e) => l((o) => ({ ...o, api: o.api === e ? null : e }));
228
+ })), Se = (e) => l((o) => ({ ...o, api: o.api === e ? null : e }));
229
229
  return /* @__PURE__ */ r("div", { className: d("space-y-4", b), "data-obligations-board": !0, children: [
230
- M.length > 0 && /* @__PURE__ */ r(
230
+ Q.length > 0 && /* @__PURE__ */ r(
231
231
  "p",
232
232
  {
233
233
  "data-obligations-switch-status": !0,
234
234
  className: "text-[11px] text-slate-400 dark:text-muted-foreground",
235
235
  children: [
236
- M.join(" · "),
236
+ Q.join(" · "),
237
237
  " — ",
238
- /* @__PURE__ */ t(Ve, {})
238
+ /* @__PURE__ */ t(Xe, {})
239
239
  ]
240
240
  }
241
241
  ),
242
- me ? /* @__PURE__ */ t(oe, { variant: "500", detail: "Could not load the obligations summary." }) : H ? /* @__PURE__ */ t("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: [1, 2, 3].map((e) => /* @__PURE__ */ t("div", { className: "h-24 animate-pulse rounded-xl bg-[hsl(var(--nvr-skeleton))]" }, e)) }) : B.length === 0 ? /* @__PURE__ */ t(
243
- te,
242
+ be ? /* @__PURE__ */ t(ne, { variant: "500", detail: "Could not load the obligations summary." }) : M ? /* @__PURE__ */ t("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: [1, 2, 3].map((e) => /* @__PURE__ */ t("div", { className: "h-24 animate-pulse rounded-xl bg-[hsl(var(--nvr-skeleton))]" }, e)) }) : U.length === 0 ? /* @__PURE__ */ t(
243
+ oe,
244
244
  {
245
245
  title: "No obligations recorded yet",
246
246
  detail: "The reconcile sweep runs every 15 minutes — once an integration has a registered obligation kind and a message comes due, it shows up here."
247
247
  }
248
- ) : /* @__PURE__ */ t("div", { className: "space-y-3", children: B.map((e) => /* @__PURE__ */ r(
248
+ ) : /* @__PURE__ */ t("div", { className: "space-y-3", children: U.map((e) => /* @__PURE__ */ r(
249
249
  "div",
250
250
  {
251
251
  "data-obligation-api": e.api,
@@ -257,7 +257,7 @@ function ht({ api: n, className: b }) {
257
257
  {
258
258
  type: "button",
259
259
  "aria-pressed": a.api === e.api,
260
- onClick: () => we(e.api),
260
+ onClick: () => Se(e.api),
261
261
  "data-tip": a.api === e.api ? "Showing only this partner — click to show all" : void 0,
262
262
  className: d(
263
263
  "text-[13px] font-semibold hover:underline",
@@ -268,11 +268,11 @@ function ht({ api: n, className: b }) {
268
268
  ),
269
269
  e.oldest_unmet && /* @__PURE__ */ r("span", { className: "text-[11px] text-slate-400 dark:text-muted-foreground", children: [
270
270
  "oldest unmet ",
271
- ce(e.oldest_unmet)
271
+ ue(e.oldest_unmet)
272
272
  ] })
273
273
  ] }),
274
274
  /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-2", children: e.tiles.map((o) => {
275
- const i = ae(Pe(o.outcome)), [h, v] = i ? ne(i) : [null, null], x = a.api === e.api && a.outcome.includes(o.outcome);
275
+ const i = re(De(o.outcome)), [h, v] = i ? ae(i) : [null, null], x = a.api === e.api && a.outcome.includes(o.outcome);
276
276
  return /* @__PURE__ */ r(
277
277
  "button",
278
278
  {
@@ -280,7 +280,7 @@ function ht({ api: n, className: b }) {
280
280
  "data-obligation-tile": o.outcome,
281
281
  "aria-pressed": x,
282
282
  onClick: () => {
283
- l((k) => ({ ...k, api: e.api })), z(o.outcome);
283
+ l((k) => ({ ...k, api: e.api })), G(o.outcome);
284
284
  },
285
285
  style: h ? {
286
286
  "--obt": h,
@@ -303,7 +303,7 @@ function ht({ api: n, className: b }) {
303
303
  children: o.count
304
304
  }
305
305
  ),
306
- /* @__PURE__ */ t("span", { className: "block text-[10px] uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: D[o.outcome] ?? o.outcome })
306
+ /* @__PURE__ */ t("span", { className: "block text-[10px] uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: R[o.outcome] ?? o.outcome })
307
307
  ]
308
308
  },
309
309
  o.outcome
@@ -317,7 +317,7 @@ function ht({ api: n, className: b }) {
317
317
  /* @__PURE__ */ r("div", { "data-obligation-filter": "kind", className: "flex items-center gap-1.5", children: [
318
318
  /* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400 dark:text-muted-foreground", children: "Kind" }),
319
319
  /* @__PURE__ */ t(
320
- P,
320
+ D,
321
321
  {
322
322
  ariaLabel: "Filter by obligation kind",
323
323
  value: a.kind ?? "",
@@ -332,19 +332,19 @@ function ht({ api: n, className: b }) {
332
332
  /* @__PURE__ */ r("div", { "data-obligations-collection-filter": !0, className: "flex items-center gap-1.5", children: [
333
333
  /* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400 dark:text-muted-foreground", children: "Collection" }),
334
334
  /* @__PURE__ */ t(
335
- P,
335
+ D,
336
336
  {
337
337
  ariaLabel: "Filter by collection",
338
338
  value: a.collection ?? "",
339
339
  onChange: (e) => l((o) => ({ ...o, collection: e || null })),
340
- options: [{ value: "", label: "Every collection" }, ...ve]
340
+ options: [{ value: "", label: "Every collection" }, ...ke]
341
341
  }
342
342
  )
343
343
  ] }),
344
344
  /* @__PURE__ */ r("div", { "data-obligation-filter": "age", className: "flex items-center gap-1.5", children: [
345
345
  /* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400 dark:text-muted-foreground", children: "Age" }),
346
346
  /* @__PURE__ */ t(
347
- P,
347
+ D,
348
348
  {
349
349
  ariaLabel: "Filter by obligation age",
350
350
  value: a.ageHours != null ? String(a.ageHours) : "",
@@ -360,19 +360,19 @@ function ht({ api: n, className: b }) {
360
360
  ] }),
361
361
  /* @__PURE__ */ r("div", { "data-obligation-filter": "outcome", className: "flex flex-wrap items-center gap-1", children: [
362
362
  /* @__PURE__ */ t("span", { className: "mr-0.5 text-[11px] text-slate-400 dark:text-muted-foreground", children: "Outcome" }),
363
- Je.map((e) => {
363
+ We.map((e) => {
364
364
  const o = a.outcome.includes(e);
365
365
  return /* @__PURE__ */ t(
366
366
  "button",
367
367
  {
368
368
  type: "button",
369
369
  "aria-pressed": o,
370
- onClick: () => z(e),
370
+ onClick: () => G(e),
371
371
  className: d(
372
372
  "inline-flex h-6 items-center rounded-full border px-2 text-[10.5px] font-medium transition-colors",
373
373
  o ? "border-slate-400 bg-slate-100 text-slate-900 dark:border-slate-500 dark:bg-slate-700 dark:text-slate-100" : "border-transparent text-slate-500 hover:border-slate-300 hover:bg-slate-50 dark:text-muted-foreground dark:hover:border-slate-600 dark:hover:bg-slate-800"
374
374
  ),
375
- children: D[e] ?? e
375
+ children: R[e] ?? e
376
376
  },
377
377
  e
378
378
  );
@@ -438,13 +438,13 @@ function ht({ api: n, className: b }) {
438
438
  }
439
439
  )
440
440
  ] }),
441
- xe ? /* @__PURE__ */ t(oe, { variant: "500", detail: "Could not load obligations for this filter." }) : ge ? /* @__PURE__ */ t("div", { className: "h-24 animate-pulse rounded-xl bg-[hsl(var(--nvr-skeleton))]" }) : C.length === 0 ? /* @__PURE__ */ t(
441
+ fe ? /* @__PURE__ */ t(ne, { variant: "500", detail: "Could not load obligations for this filter." }) : he ? /* @__PURE__ */ t("div", { className: "h-24 animate-pulse rounded-xl bg-[hsl(var(--nvr-skeleton))]" }) : C.length === 0 ? /* @__PURE__ */ t(
442
442
  "div",
443
443
  {
444
444
  className: "rounded-xl border border-slate-200 bg-white dark:border-border dark:bg-card",
445
445
  "data-obligations-empty": !0,
446
446
  children: /* @__PURE__ */ t(
447
- te,
447
+ oe,
448
448
  {
449
449
  title: "Nothing outstanding for this filter",
450
450
  detail: "Every message the partner expects, for this outcome, has landed."
@@ -456,7 +456,7 @@ function ht({ api: n, className: b }) {
456
456
  {
457
457
  className: d(
458
458
  "overflow-x-auto rounded-xl border border-slate-200 dark:border-border",
459
- he && "opacity-60 transition-opacity"
459
+ xe && "opacity-60 transition-opacity"
460
460
  ),
461
461
  children: [
462
462
  /* @__PURE__ */ r("table", { className: "w-full text-[12px] tabular-nums", children: [
@@ -473,8 +473,8 @@ function ht({ api: n, className: b }) {
473
473
  S && /* @__PURE__ */ t("th", { className: "px-3 py-1.5 font-medium" })
474
474
  ] }) }),
475
475
  /* @__PURE__ */ t("tbody", { children: C.map((e) => {
476
- const o = ae(De(e)), [i, h] = o ? ne(o) : [null, null], v = S && (e.outcome === "failed" || e.outcome === "missing" || e.outcome === "overdue"), x = Re(e.collection), k = Xe(e), O = s === "inbound" && ue === e.id, G = Ze(e.detail);
477
- return /* @__PURE__ */ r(Le, { children: [
476
+ const o = re(Re(e)), [i, h] = o ? ae(o) : [null, null], v = S && (e.outcome === "failed" || e.outcome === "missing" || e.outcome === "overdue"), x = Ae(e.collection), k = Ze(e), O = s === "inbound" && me === e.id, V = Ye(e.detail);
477
+ return /* @__PURE__ */ r(Te, { children: [
478
478
  /* @__PURE__ */ r(
479
479
  "tr",
480
480
  {
@@ -499,13 +499,13 @@ function ht({ api: n, className: b }) {
499
499
  j.stopPropagation(), g.open({ collection: e.collection, itemId: e.item });
500
500
  },
501
501
  className: "rounded text-left underline decoration-slate-300 underline-offset-2 hover:decoration-slate-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:decoration-slate-600 dark:hover:decoration-slate-400",
502
- children: re(e)
502
+ children: ie(e)
503
503
  }
504
- ) : re(e)
504
+ ) : ie(e)
505
505
  }
506
506
  ),
507
- /* @__PURE__ */ t("td", { className: "px-3 py-1.5 text-slate-600 dark:text-slate-300", children: fe.get(e.kind) ?? e.kind }),
508
- /* @__PURE__ */ t("td", { className: "px-3 py-1.5 text-slate-500 dark:text-muted-foreground", children: We(e.due_at) }),
507
+ /* @__PURE__ */ t("td", { className: "px-3 py-1.5 text-slate-600 dark:text-slate-300", children: ve.get(e.kind) ?? e.kind }),
508
+ /* @__PURE__ */ t("td", { className: "px-3 py-1.5 text-slate-500 dark:text-muted-foreground", children: ze(e.due_at) }),
509
509
  /* @__PURE__ */ t("td", { className: "px-3 py-1.5", "data-obligation-outcome": e.outcome, children: /* @__PURE__ */ r(
510
510
  "span",
511
511
  {
@@ -528,7 +528,7 @@ function ht({ api: n, className: b }) {
528
528
  )
529
529
  }
530
530
  ),
531
- e.not_needed ? "Not needed" : D[e.outcome] ?? e.outcome
531
+ e.not_needed ? "Not needed" : R[e.outcome] ?? e.outcome
532
532
  ]
533
533
  }
534
534
  ) }),
@@ -537,8 +537,8 @@ function ht({ api: n, className: b }) {
537
537
  {
538
538
  className: "max-w-[38ch] truncate px-3 py-1.5 text-slate-500 dark:text-muted-foreground",
539
539
  "data-obligation-reason": !0,
540
- "data-tip": e.reason ? ee(e.reason) : void 0,
541
- children: e.reason ? ee(e.reason) : "—"
540
+ "data-tip": e.reason ? te(e.reason) : void 0,
541
+ children: e.reason ? te(e.reason) : "—"
542
542
  }
543
543
  ),
544
544
  /* @__PURE__ */ t(
@@ -546,7 +546,7 @@ function ht({ api: n, className: b }) {
546
546
  {
547
547
  className: "hidden px-3 py-1.5 text-slate-500 dark:text-muted-foreground lg:table-cell",
548
548
  "data-obligations-col-attempts": !0,
549
- children: Ae(k, e.reason)
549
+ children: He(k, e.reason)
550
550
  }
551
551
  ),
552
552
  /* @__PURE__ */ t(
@@ -554,8 +554,8 @@ function ht({ api: n, className: b }) {
554
554
  {
555
555
  className: "hidden max-w-[28ch] truncate px-3 py-1.5 text-slate-500 dark:text-muted-foreground lg:table-cell",
556
556
  "data-obligations-last-response": !0,
557
- "data-tip": Me(k) ?? void 0,
558
- children: He(e.outcome, k)
557
+ "data-tip": Qe(k) ?? void 0,
558
+ children: Me(e.outcome, k)
559
559
  }
560
560
  ),
561
561
  s === "waiting" && /* @__PURE__ */ t(
@@ -563,20 +563,20 @@ function ht({ api: n, className: b }) {
563
563
  {
564
564
  className: "px-3 py-1.5 text-slate-600 dark:text-slate-300",
565
565
  "data-obligations-owner": !0,
566
- children: ye(e)
566
+ children: Ne(e)
567
567
  }
568
568
  ),
569
569
  s === "inbound" && /* @__PURE__ */ t("td", { className: "px-3 py-1.5 text-right", children: /* @__PURE__ */ t(
570
- Ge,
570
+ Ve,
571
571
  {
572
572
  open: O,
573
- onToggle: () => R((j) => j === e.id ? null : e.id)
573
+ onToggle: () => A((j) => j === e.id ? null : e.id)
574
574
  }
575
575
  ) }),
576
576
  S && /* @__PURE__ */ r("td", { className: "px-3 py-1.5 text-right", children: [
577
- v && e.can_resend !== !1 && /* @__PURE__ */ t(ze, { obligationId: e.id }),
577
+ v && e.can_resend !== !1 && /* @__PURE__ */ t(Ge, { obligationId: e.id }),
578
578
  v && e.can_send_current === !0 && /* @__PURE__ */ t(
579
- Ue,
579
+ Je,
580
580
  {
581
581
  obligationId: e.id,
582
582
  api: e.api,
@@ -601,10 +601,10 @@ function ht({ api: n, className: b }) {
601
601
  children: /* @__PURE__ */ t(
602
602
  "td",
603
603
  {
604
- colSpan: Ne,
604
+ colSpan: we,
605
605
  className: "bg-slate-50 px-3 py-2 dark:bg-muted",
606
606
  "data-obligations-detail": !0,
607
- children: G ? /* @__PURE__ */ t("pre", { className: "max-h-56 overflow-auto whitespace-pre-wrap break-words rounded-md border border-slate-200 bg-white p-2 font-mono text-[10.5px] leading-4 text-slate-700 dark:border-slate-700 dark:bg-slate-900/40 dark:text-slate-300", children: G }) : /* @__PURE__ */ t("p", { className: "text-[11px] italic text-slate-400 dark:text-muted-foreground", children: "No request detail was stored for this rejection — the reason column above is everything the ledger recorded." })
607
+ children: V ? /* @__PURE__ */ t("pre", { className: "max-h-56 overflow-auto whitespace-pre-wrap break-words rounded-md border border-slate-200 bg-white p-2 font-mono text-[10.5px] leading-4 text-slate-700 dark:border-slate-700 dark:bg-slate-900/40 dark:text-slate-300", children: V }) : /* @__PURE__ */ t("p", { className: "text-[11px] italic text-slate-400 dark:text-muted-foreground", children: "No request detail was stored for this rejection — the reason column above is everything the ledger recorded." })
608
608
  }
609
609
  )
610
610
  },
@@ -615,11 +615,11 @@ function ht({ api: n, className: b }) {
615
615
  ] }),
616
616
  q > _ && /* @__PURE__ */ r("div", { className: "flex items-center justify-between border-t border-slate-200 px-3 py-1.5 text-[11px] text-slate-400 dark:border-border dark:text-muted-foreground", children: [
617
617
  /* @__PURE__ */ r("span", { children: [
618
- (u - 1) * _ + 1,
618
+ P((u - 1) * _ + 1),
619
619
  "–",
620
- Math.min(u * _, q),
620
+ P(Math.min(u * _, q)),
621
621
  " of ",
622
- q
622
+ P(q)
623
623
  ] }),
624
624
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
625
625
  /* @__PURE__ */ t(
@@ -647,11 +647,11 @@ function ht({ api: n, className: b }) {
647
647
  ]
648
648
  }
649
649
  ),
650
- /* @__PURE__ */ t(Be, {})
650
+ /* @__PURE__ */ t(Ue, {})
651
651
  ] });
652
652
  }
653
653
  export {
654
- ht as IntegrationObligationsView,
655
- re as obligationRecordText,
656
- ae as roleForTone
654
+ xt as IntegrationObligationsView,
655
+ ie as obligationRecordText,
656
+ re as roleForTone
657
657
  };