@nivaro/react 0.3.136 → 0.3.138

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 (50) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +95 -4
  4. package/dist/index.js +748 -743
  5. package/dist/shared/components/CollectionBrowserView.js +392 -389
  6. package/dist/shared/components/DelegateCoverLine.js +80 -87
  7. package/dist/shared/components/ItemEditForm.js +589 -588
  8. package/dist/shared/components/MyWorkView.js +284 -286
  9. package/dist/shared/components/NotificationBell.js +251 -205
  10. package/dist/shared/components/ai/AiAnalyticsView.js +878 -417
  11. package/dist/shared/components/ai/AiPlanCard.js +164 -122
  12. package/dist/shared/components/ai/AiPlanUndo.js +291 -0
  13. package/dist/shared/components/ai/call-log/CallDrawer.js +357 -0
  14. package/dist/shared/components/ai/call-log/RawJson.js +126 -0
  15. package/dist/shared/components/ai/call-log/ThreadView.js +223 -0
  16. package/dist/shared/components/ai/call-log/TranscriptView.js +227 -0
  17. package/dist/shared/components/ai/call-log/controls.js +364 -0
  18. package/dist/shared/components/ai/call-log/format.js +46 -0
  19. package/dist/shared/components/ai/call-log/url.js +105 -0
  20. package/dist/shared/components/chat/ChatPanel.js +86 -86
  21. package/dist/shared/components/chat/chat-core.js +422 -346
  22. package/dist/shared/components/integrations/IntegrationObligationsView.js +98 -98
  23. package/dist/shared/components/integrations/RecordIntegrationPreview.js +102 -93
  24. package/dist/shared/components/integrations/console/api.js +11 -1
  25. package/dist/shared/components/item-edit/HeaderRollupExplainer.js +5 -1
  26. package/dist/shared/components/item-edit/RecordLiveSync.js +241 -229
  27. package/dist/shared/components/item-edit/RecordRecapChanges.js +166 -0
  28. package/dist/shared/components/item-edit/RecordRecapStrip.js +254 -84
  29. package/dist/shared/components/item-edit/live-related.js +34 -18
  30. package/dist/shared/components/panels/RevisionsPanel.js +735 -683
  31. package/dist/shared/components/queue/QueueWorklist.js +323 -316
  32. package/dist/shared/components/support/SupportRequestDialog.js +198 -181
  33. package/dist/shared/components/trackers/use-tracker-link.js +74 -65
  34. package/dist/shared/lib/config-update-refresh.js +34 -0
  35. package/dist/shared/lib/config-watch.js +17 -17
  36. package/dist/shared/lib/gap-refresh.js +49 -0
  37. package/dist/shared/lib/integration-dots.js +8 -8
  38. package/dist/shared/lib/live-ops.js +26 -23
  39. package/dist/shared/lib/live-pickers.js +1 -1
  40. package/dist/shared/lib/live-queries.js +223 -195
  41. package/dist/shared/lib/live.js +56 -51
  42. package/dist/shared/lib/obligation-banner.js +11 -10
  43. package/dist/shared/lib/obligation-filters.js +22 -18
  44. package/dist/shared/lib/obligation-reason-text.js +18 -8
  45. package/dist/shared/lib/presence-hooks.js +133 -132
  46. package/dist/shared/lib/reconnect-resync.js +90 -0
  47. package/dist/shared/lib/record-room-holds.js +43 -0
  48. package/dist/shared/lib/socket-realtime.js +116 -105
  49. package/dist/shared/lib/user-sync.js +1 -6
  50. package/package.json +1 -1
@@ -1,11 +1,12 @@
1
- import { jsxs as n, jsx as t, Fragment as z } from "react/jsx-runtime";
2
- import { useQuery as K, useQueryClient as M } from "@tanstack/react-query";
3
- import { Loader2 as V, Send as Z, CheckCircle2 as S, AlertTriangle as L, Zap as X, ChevronDown as Y, ChevronRight as I, PencilLine as J } from "lucide-react";
4
- import { useState as Q, useEffect as ee } from "react";
5
- import { useNivaroClient as W } from "../../context.js";
6
- import { get as _ } from "../../lib/commands.js";
7
- import { cn as k, formatRelative as te, formatDateTime as ae } from "../../lib/utils.js";
8
- import { Popover as re, PopoverTrigger as se, PopoverContent as ne } from "../ui/popover.js";
1
+ import { jsxs as n, jsx as t, Fragment as M } from "react/jsx-runtime";
2
+ import { useQuery as K, useQueryClient as V } from "@tanstack/react-query";
3
+ import { Loader2 as Z, Send as X, CheckCircle2 as S, AlertTriangle as L, Zap as Y, ChevronDown as I, ChevronRight as J, PencilLine as ee } from "lucide-react";
4
+ import { useState as Q, useEffect as te } from "react";
5
+ import { useNivaroClient as R } from "../../context.js";
6
+ import { get as C } from "../../lib/commands.js";
7
+ import { plainObligationReason as W } from "../../lib/obligation-reason-text.js";
8
+ import { cn as k, formatRelative as ae, formatDateTime as re } from "../../lib/utils.js";
9
+ import { Popover as se, PopoverTrigger as ne, PopoverContent as le } from "../ui/popover.js";
9
10
  function P(r) {
10
11
  typeof window > "u" || window.dispatchEvent(new CustomEvent("nvr:record-focus", { detail: r }));
11
12
  }
@@ -16,14 +17,14 @@ function A({
16
17
  onJump: o
17
18
  }) {
18
19
  return /* @__PURE__ */ t("ul", { className: "space-y-1.5", "data-preflight-issues": !0, children: r.map((l, d) => {
19
- var u;
20
+ var p;
20
21
  return /* @__PURE__ */ n(
21
22
  "li",
22
23
  {
23
24
  "data-preflight-issue": l.severity,
24
25
  className: "flex items-start gap-2 text-[12px]",
25
26
  children: [
26
- l.severity === "ask" ? /* @__PURE__ */ t(J, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-slate-400 dark:text-slate-500" }) : /* @__PURE__ */ t(
27
+ l.severity === "ask" ? /* @__PURE__ */ t(ee, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-slate-400 dark:text-slate-500" }) : /* @__PURE__ */ t(
27
28
  L,
28
29
  {
29
30
  className: k(
@@ -60,7 +61,7 @@ function A({
60
61
  " more"
61
62
  ] })
62
63
  ] }),
63
- l.field && !((u = l.rows) != null && u.length) && /* @__PURE__ */ t(
64
+ l.field && !((p = l.rows) != null && p.length) && /* @__PURE__ */ t(
64
65
  "button",
65
66
  {
66
67
  type: "button",
@@ -79,59 +80,59 @@ function A({
79
80
  );
80
81
  }) });
81
82
  }
82
- function R(r, s) {
83
- const h = M();
84
- ee(() => {
83
+ function H(r, s) {
84
+ const h = V();
85
+ te(() => {
85
86
  let o = null;
86
87
  const l = (e) => {
87
- const m = e == null ? void 0 : e[0];
88
- return m === "item" && (e == null ? void 0 : e[1]) === r && String(e == null ? void 0 : e[2]) === String(s) || typeof m == "string" && m.startsWith("o2m-rows") && String(e == null ? void 0 : e[3]) === s || m === "erp-submissions" && (e == null ? void 0 : e[1]) === r && String(e == null ? void 0 : e[2]) === s;
88
+ const g = e == null ? void 0 : e[0];
89
+ return g === "item" && (e == null ? void 0 : e[1]) === r && String(e == null ? void 0 : e[2]) === String(s) || typeof g == "string" && g.startsWith("o2m-rows") && String(e == null ? void 0 : e[3]) === s || g === "erp-submissions" && (e == null ? void 0 : e[1]) === r && String(e == null ? void 0 : e[2]) === s;
89
90
  }, d = /* @__PURE__ */ new Map();
90
91
  for (const e of h.getQueryCache().getAll())
91
92
  l(e.queryKey) && d.set(e.queryHash, e.state.data);
92
- const u = h.getQueryCache().subscribe((e) => {
93
- var y;
94
- if (e.type !== "updated" || ((y = e.action) == null ? void 0 : y.type) !== "success" || !l(e.query.queryKey)) return;
95
- const m = d.has(e.query.queryHash), a = d.get(e.query.queryHash);
96
- d.set(e.query.queryHash, e.query.state.data), !(e.query.state.dataUpdateCount <= 1) && (m && a === e.query.state.data || (o && clearTimeout(o), o = setTimeout(() => {
93
+ const p = h.getQueryCache().subscribe((e) => {
94
+ var a;
95
+ if (e.type !== "updated" || ((a = e.action) == null ? void 0 : a.type) !== "success" || !l(e.query.queryKey)) return;
96
+ const g = d.has(e.query.queryHash), u = d.get(e.query.queryHash);
97
+ d.set(e.query.queryHash, e.query.state.data), !(e.query.state.dataUpdateCount <= 1) && (g && u === e.query.state.data || (o && clearTimeout(o), o = setTimeout(() => {
97
98
  h.invalidateQueries({ queryKey: ["push-preflight", r, s] }), h.invalidateQueries({ queryKey: ["outbound-preview", r, s] });
98
99
  }, 600)));
99
100
  });
100
101
  return () => {
101
- u(), o && clearTimeout(o);
102
+ p(), o && clearTimeout(o);
102
103
  };
103
104
  }, [h, r, s]);
104
105
  }
105
- function v(r) {
106
+ function y(r) {
106
107
  return r.length <= 1 ? r[0] ?? "" : `${r.slice(0, -1).join(", ")} and ${r[r.length - 1]}`;
107
108
  }
108
- const le = "absolute -right-1.5 -top-1.5 z-[1] inline-flex items-center justify-center rounded-full ring-2 ring-white dark:ring-card";
109
- function ie({
109
+ const ie = "absolute -right-1.5 -top-1.5 z-[1] inline-flex items-center justify-center rounded-full ring-2 ring-white dark:ring-card";
110
+ function de({
110
111
  collection: r,
111
112
  itemId: s,
112
113
  transitionId: h,
113
114
  itemActionId: o,
114
115
  label: l,
115
116
  compact: d = !1,
116
- onJump: u
117
+ onJump: p
117
118
  }) {
118
- const e = W(), [m, a] = Q(!1);
119
- R(r, s);
120
- const y = h ? "t" : "a", x = h ?? o ?? "", { data: c, isLoading: H, isError: U } = K({
121
- queryKey: ["push-preflight", r, s, y, x],
119
+ const e = R(), [g, u] = Q(!1);
120
+ H(r, s);
121
+ const a = h ? "t" : "a", f = h ?? o ?? "", { data: c, isLoading: U, isError: D } = K({
122
+ queryKey: ["push-preflight", r, s, a, f],
122
123
  queryFn: () => e.request(
123
- h ? _(`/integration-preview/${r}/${encodeURIComponent(s)}/preflight`, {
124
+ h ? C(`/integration-preview/${r}/${encodeURIComponent(s)}/preflight`, {
124
125
  transition_id: h
125
- }) : _(`/item-actions/${encodeURIComponent(x)}/preflight`, {
126
+ }) : C(`/item-actions/${encodeURIComponent(f)}/preflight`, {
126
127
  collection: r,
127
128
  item: s
128
129
  })
129
130
  ).then((i) => i.data),
130
- enabled: !!x && !!s && s !== "new",
131
+ enabled: !!f && !!s && s !== "new",
131
132
  staleTime: 2e4
132
133
  });
133
- if (!x || s === "new") return null;
134
- if (H)
134
+ if (!f || s === "new") return null;
135
+ if (U)
135
136
  return d ? /* @__PURE__ */ t("span", { "data-push-readiness": "loading", role: "status", className: "sr-only", children: "Checking whether this can be sent" }) : /* @__PURE__ */ t(
136
137
  "span",
137
138
  {
@@ -139,92 +140,92 @@ function ie({
139
140
  role: "status",
140
141
  className: "inline-flex items-center self-center",
141
142
  "aria-label": "Checking whether this can be sent",
142
- children: /* @__PURE__ */ t(V, { className: "h-3 w-3 animate-spin text-slate-400" })
143
+ children: /* @__PURE__ */ t(Z, { className: "h-3 w-3 animate-spin text-slate-400" })
143
144
  }
144
145
  );
145
146
  if ((c == null ? void 0 : c.supported) === !1) return null;
146
- const D = U || !!(c != null && c.error), q = (c == null ? void 0 : c.issues) ?? [], f = q.filter((i) => i.severity === "ask"), g = q.filter((i) => i.severity !== "ask"), T = g.filter((i) => i.severity === "block"), p = D ? "error" : T.length > 0 ? "block" : g.length > 0 ? "warn" : "ready", w = c == null ? void 0 : c.pushes, N = [
147
- ...new Set((w ?? []).filter((i) => i.status === "would_push").map((i) => i.api_name))
148
- ], b = [
149
- ...new Set((w ?? []).filter((i) => i.status === "unchanged").map((i) => i.api_name))
150
- ], O = !!w && N.length === 0, F = w ? N.length > 0 ? `Will send to ${v(N)}` : b.length > 0 ? `Nothing new for ${v(b)}` : "Sends nothing for this record" : "Nothing missing", j = p === "ready" ? F : p === "error" ? "Could not check" : (T[0] ?? g[0]).message, C = g.length > 1 ? ` +${g.length - 1}` : "", B = f.length > 0 ? ` It asks for ${f.map((i) => i.message.replace(/^Asks for /, "")).join("; ")} when you press it.` : "", $ = p === "ready" ? (w ? N.length > 0 ? `${l} will send to ${v(N)}; everything it needs is filled in` : b.length > 0 ? `${l} won't resend to ${v(b)}; nothing it watches has changed` : `${l} sends nothing to a partner for this record` : `${l}: everything it needs is filled in`) + B : `${l}: ${j}${C ? ` (and ${g.length - 1} more)` : ""}`;
151
- return d && p === "ready" && O ? null : /* @__PURE__ */ n(re, { open: m, onOpenChange: a, children: [
152
- /* @__PURE__ */ t(se, { asChild: !0, children: d ? /* @__PURE__ */ t(
147
+ const F = D || !!(c != null && c.error), q = (c == null ? void 0 : c.issues) ?? [], b = q.filter((i) => i.severity === "ask"), x = q.filter((i) => i.severity !== "ask"), O = x.filter((i) => i.severity === "block"), m = F ? "error" : O.length > 0 ? "block" : x.length > 0 ? "warn" : "ready", N = c == null ? void 0 : c.pushes, v = [
148
+ ...new Set((N ?? []).filter((i) => i.status === "would_push").map((i) => i.api_name))
149
+ ], w = [
150
+ ...new Set((N ?? []).filter((i) => i.status === "unchanged").map((i) => i.api_name))
151
+ ], T = !!N && v.length === 0, B = N ? v.length > 0 ? `Will send to ${y(v)}` : w.length > 0 ? `Nothing new for ${y(w)}` : "Sends nothing for this record" : "Nothing missing", j = m === "ready" ? B : m === "error" ? "Could not check" : (O[0] ?? x[0]).message, $ = x.length > 1 ? ` +${x.length - 1}` : "", G = b.length > 0 ? ` It asks for ${b.map((i) => i.message.replace(/^Asks for /, "")).join("; ")} when you press it.` : "", _ = m === "ready" ? (N ? v.length > 0 ? `${l} will send to ${y(v)}; everything it needs is filled in` : w.length > 0 ? `${l} won't resend to ${y(w)}; nothing it watches has changed` : `${l} sends nothing to a partner for this record` : `${l}: everything it needs is filled in`) + G : `${l}: ${j}${$ ? ` (and ${x.length - 1} more)` : ""}`;
152
+ return d && m === "ready" && T ? null : /* @__PURE__ */ n(se, { open: g, onOpenChange: u, children: [
153
+ /* @__PURE__ */ t(ne, { asChild: !0, children: d ? /* @__PURE__ */ t(
153
154
  "button",
154
155
  {
155
156
  type: "button",
156
- "data-push-readiness": p,
157
- "data-push-readiness-for": x,
158
- "aria-label": $,
159
- "data-tip": $,
157
+ "data-push-readiness": m,
158
+ "data-push-readiness-for": f,
159
+ "aria-label": _,
160
+ "data-tip": _,
160
161
  className: k(
161
- le,
162
+ ie,
162
163
  // A larger invisible hit area than the 14–16px disc.
163
164
  "after:absolute after:-inset-1.5 after:content-['']",
164
165
  "text-white transition-[filter,transform] duration-150 ease-out hover:brightness-110 active:scale-90",
165
166
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan",
166
167
  // Ready to send = a neutral send disc, never a green ✓ that reads
167
168
  // as "approved / recommended" on an order button (army 11 a2 F2).
168
- p === "ready" ? "h-3.5 w-3.5 bg-[#475569] dark:bg-[#64748b]" : p === "block" ? "h-4 min-w-4 px-1 bg-[#dc2626]" : "h-4 min-w-4 px-1 bg-[#b45309]"
169
+ m === "ready" ? "h-3.5 w-3.5 bg-[#475569] dark:bg-[#64748b]" : m === "block" ? "h-4 min-w-4 px-1 bg-[#dc2626]" : "h-4 min-w-4 px-1 bg-[#b45309]"
169
170
  ),
170
- children: p === "ready" ? /* @__PURE__ */ t(Z, { className: "h-2 w-2", strokeWidth: 3, "aria-hidden": !0 }) : g.length > 0 ? /* @__PURE__ */ t("span", { className: "text-[10px] font-semibold leading-none tabular-nums", children: g.length > 9 ? "9+" : g.length }) : /* @__PURE__ */ t("span", { className: "text-[10px] font-bold leading-none", children: "!" })
171
+ children: m === "ready" ? /* @__PURE__ */ t(X, { className: "h-2 w-2", strokeWidth: 3, "aria-hidden": !0 }) : x.length > 0 ? /* @__PURE__ */ t("span", { className: "text-[10px] font-semibold leading-none tabular-nums", children: x.length > 9 ? "9+" : x.length }) : /* @__PURE__ */ t("span", { className: "text-[10px] font-bold leading-none", children: "!" })
171
172
  }
172
173
  ) : /* @__PURE__ */ n(
173
174
  "button",
174
175
  {
175
176
  type: "button",
176
- "data-push-readiness": p,
177
- "data-push-readiness-for": x,
177
+ "data-push-readiness": m,
178
+ "data-push-readiness-for": f,
178
179
  className: k(
179
180
  "inline-flex max-w-[260px] shrink-0 items-center gap-1 self-center rounded-full border px-1.5 py-px text-[10.5px] font-medium transition-colors",
180
- p === "ready" ? "border-emerald-200 bg-emerald-50 text-emerald-800 hover:bg-emerald-100 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-300" : p === "block" ? "border-red-200 bg-red-50 text-red-800 hover:bg-red-100 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-300" : "border-amber-200 bg-amber-50 text-amber-800 hover:bg-amber-100 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-300"
181
+ m === "ready" ? "border-emerald-200 bg-emerald-50 text-emerald-800 hover:bg-emerald-100 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-300" : m === "block" ? "border-red-200 bg-red-50 text-red-800 hover:bg-red-100 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-300" : "border-amber-200 bg-amber-50 text-amber-800 hover:bg-amber-100 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-300"
181
182
  ),
182
- "data-tip": $,
183
+ "data-tip": _,
183
184
  children: [
184
- p === "ready" ? /* @__PURE__ */ t(S, { className: "h-3 w-3 shrink-0" }) : /* @__PURE__ */ t(L, { className: "h-3 w-3 shrink-0" }),
185
+ m === "ready" ? /* @__PURE__ */ t(S, { className: "h-3 w-3 shrink-0" }) : /* @__PURE__ */ t(L, { className: "h-3 w-3 shrink-0" }),
185
186
  /* @__PURE__ */ t("span", { className: "truncate", children: j }),
186
- C && /* @__PURE__ */ t("span", { className: "shrink-0 opacity-70", children: C })
187
+ $ && /* @__PURE__ */ t("span", { className: "shrink-0 opacity-70", children: $ })
187
188
  ]
188
189
  }
189
190
  ) }),
190
- /* @__PURE__ */ n(ne, { align: "end", className: "w-[380px] max-w-[92vw] p-3", children: [
191
+ /* @__PURE__ */ n(le, { align: "end", className: "w-[380px] max-w-[92vw] p-3", children: [
191
192
  /* @__PURE__ */ n("p", { className: "text-[11px] font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400", children: [
192
193
  "Before “",
193
194
  l,
194
195
  "”"
195
196
  ] }),
196
- p === "error" ? /* @__PURE__ */ n("p", { className: "mt-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
197
+ m === "error" ? /* @__PURE__ */ n("p", { className: "mt-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
197
198
  (c == null ? void 0 : c.error) ?? "The check could not run.",
198
199
  " Nothing is assumed ready."
199
- ] }) : g.length === 0 ? /* @__PURE__ */ n("p", { className: "mt-2 flex items-center gap-1.5 text-[12px] text-emerald-800 dark:text-emerald-300", children: [
200
+ ] }) : x.length === 0 ? /* @__PURE__ */ n("p", { className: "mt-2 flex items-center gap-1.5 text-[12px] text-emerald-800 dark:text-emerald-300", children: [
200
201
  /* @__PURE__ */ t(S, { className: "h-3.5 w-3.5" }),
201
- O ? b.length > 0 ? `Nothing new to send: ${v(b)} already has these values.` : "Nothing goes to a partner from this record." : f.length > 0 ? "Nothing stands in the way." : "Everything it needs is filled in."
202
+ T ? w.length > 0 ? `Nothing new to send: ${y(w)} already has these values.` : "Nothing goes to a partner from this record." : b.length > 0 ? "Nothing stands in the way." : "Everything it needs is filled in."
202
203
  ] }) : /* @__PURE__ */ t("div", { className: "mt-2", children: /* @__PURE__ */ t(
203
204
  A,
204
205
  {
205
- issues: g,
206
+ issues: x,
206
207
  collection: r,
207
208
  itemId: s,
208
209
  onJump: () => {
209
- a(!1), u == null || u();
210
+ u(!1), p == null || p();
210
211
  }
211
212
  }
212
213
  ) }),
213
- p !== "error" && f.length > 0 && /* @__PURE__ */ n(
214
+ m !== "error" && b.length > 0 && /* @__PURE__ */ n(
214
215
  "div",
215
216
  {
216
217
  className: "mt-3 border-t border-slate-100 pt-2 dark:border-border",
217
- "data-preflight-asks": f.length,
218
+ "data-preflight-asks": b.length,
218
219
  children: [
219
220
  /* @__PURE__ */ t("p", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Asked for when you press it" }),
220
221
  /* @__PURE__ */ t("div", { className: "mt-1.5", children: /* @__PURE__ */ t(
221
222
  A,
222
223
  {
223
- issues: f,
224
+ issues: b,
224
225
  collection: r,
225
226
  itemId: s,
226
227
  onJump: () => {
227
- a(!1), u == null || u();
228
+ u(!1), p == null || p();
228
229
  }
229
230
  }
230
231
  ) })
@@ -233,17 +234,17 @@ function ie({
233
234
  ),
234
235
  (c == null ? void 0 : c.pushes) && c.pushes.length > 0 && /* @__PURE__ */ n("div", { className: "mt-3 border-t border-slate-100 pt-2 dark:border-border", children: [
235
236
  /* @__PURE__ */ t("p", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "What it sends" }),
236
- /* @__PURE__ */ t("ul", { className: "mt-1 space-y-0.5 text-[11.5px]", children: c.pushes.map((i, G) => /* @__PURE__ */ n(
237
+ /* @__PURE__ */ t("ul", { className: "mt-1 space-y-0.5 text-[11.5px]", children: c.pushes.map((i, z) => /* @__PURE__ */ n(
237
238
  "li",
238
239
  {
239
240
  className: "flex items-baseline gap-1.5 text-slate-600 dark:text-slate-300",
240
241
  "data-preflight-push": i.status,
241
242
  children: [
242
243
  /* @__PURE__ */ t("span", { className: "font-medium text-slate-800 dark:text-slate-100", children: i.api_name }),
243
- /* @__PURE__ */ t("span", { className: "text-slate-500 dark:text-slate-400", children: i.status === "would_push" ? "will be sent" : i.status === "unchanged" ? "held back — nothing it watches changed" : i.status === "not_applicable" ? "does not apply to this record" : i.reason ?? "will not be sent" })
244
+ /* @__PURE__ */ t("span", { className: "text-slate-500 dark:text-slate-400", children: i.status === "would_push" ? "will be sent" : i.status === "unchanged" ? "held back — nothing it watches changed" : i.status === "not_applicable" ? "does not apply to this record" : i.status === "send_skip" ? `will not receive this record${i.reason ? ` — ${W(i.reason)}` : ""}` : i.reason ?? "will not be sent" })
244
245
  ]
245
246
  },
246
- G
247
+ z
247
248
  )) })
248
249
  ] })
249
250
  ] })
@@ -255,24 +256,25 @@ function E(r) {
255
256
  const s = String(r);
256
257
  return s.length > 80 ? `${s.slice(0, 80)}…` : s;
257
258
  }
258
- function de({
259
+ function oe({
259
260
  integration: r,
260
261
  collection: s,
261
262
  itemId: h,
262
263
  onShowRequest: o,
263
264
  onJump: l
264
265
  }) {
265
- const [d, u] = Q(!1), e = r, m = !e.first_push && e.changes.length === 0;
266
+ const [d, p] = Q(!1), e = r, g = !e.first_push && e.changes.length === 0, u = e.not_sending ?? null;
266
267
  return /* @__PURE__ */ n(
267
268
  "div",
268
269
  {
269
270
  className: "rounded-lg border border-slate-200 bg-white p-2.5 dark:border-border dark:bg-card",
270
271
  "data-outbound-preview": e.api_name,
271
272
  "data-outbound-changes": e.changes.length,
273
+ "data-outbound-not-sending": u ? "1" : void 0,
272
274
  children: [
273
275
  /* @__PURE__ */ n("div", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-0.5", children: [
274
276
  /* @__PURE__ */ t("span", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: e.api_name }),
275
- /* @__PURE__ */ t("span", { className: "text-[12px] text-slate-600 dark:text-slate-300", children: e.first_push ? "has not received anything from this record yet — the next push is its first" : m ? "already has everything the next push would send" : /* @__PURE__ */ n(z, { children: [
277
+ /* @__PURE__ */ t("span", { className: "text-[12px] text-slate-600 dark:text-slate-300", children: u ? `will not receive this record: ${u}` : e.first_push ? "has not received anything from this record yet — the next push is its first" : g ? "already has everything the next push would send" : /* @__PURE__ */ n(M, { children: [
276
278
  "will receive on next push:",
277
279
  " ",
278
280
  /* @__PURE__ */ t("span", { className: "font-medium text-slate-800 dark:text-slate-100", children: e.summary.join(", ") })
@@ -283,10 +285,10 @@ function de({
283
285
  type: "button",
284
286
  onClick: () => o == null ? void 0 : o(e.last.submission_id),
285
287
  className: "ml-auto text-[11px] text-slate-500 hover:underline dark:text-slate-400",
286
- "data-tip": `Compared with the push that landed ${ae(e.last.at)}`,
288
+ "data-tip": `Compared with the push that landed ${re(e.last.at)}`,
287
289
  children: [
288
290
  "vs. last sent ",
289
- te(e.last.at)
291
+ ae(e.last.at)
290
292
  ]
291
293
  }
292
294
  )
@@ -300,7 +302,7 @@ function de({
300
302
  a.available ? "text-slate-600 dark:text-slate-300" : "text-slate-400 dark:text-slate-500"
301
303
  ),
302
304
  children: [
303
- a.auto ? /* @__PURE__ */ t(X, { className: "h-3 w-3 text-nvr-cyan", "aria-label": "Automatic" }) : /* @__PURE__ */ t("span", { className: "h-1 w-1 rounded-full bg-slate-400", "aria-hidden": !0 }),
305
+ a.auto ? /* @__PURE__ */ t(Y, { className: "h-3 w-3 text-nvr-cyan", "aria-label": "Automatic" }) : /* @__PURE__ */ t("span", { className: "h-1 w-1 rounded-full bg-slate-400", "aria-hidden": !0 }),
304
306
  /* @__PURE__ */ n("span", { className: "font-medium", children: [
305
307
  a.auto ? "Automatically on" : "On",
306
308
  " “",
@@ -308,7 +310,14 @@ function de({
308
310
  "”",
309
311
  a.to_state_label ? ` → ${a.to_state_label}` : ""
310
312
  ] }),
311
- /* @__PURE__ */ n("span", { children: [
313
+ a.status === "send_skip" ? (
314
+ // Its send rule leaves the record out: say so, never "sent every time".
315
+ /* @__PURE__ */ n("span", { "data-outbound-trigger-skip": !0, children: [
316
+ "· not sent to ",
317
+ e.api_name,
318
+ !u && a.reason ? `: ${W(a.reason)}` : ""
319
+ ] })
320
+ ) : /* @__PURE__ */ n("span", { children: [
312
321
  "· ",
313
322
  a.when
314
323
  ] }),
@@ -323,7 +332,7 @@ function de({
323
332
  ] }),
324
333
  !a.available && /* @__PURE__ */ t("span", { children: "· not available yet (its conditions are not met)" }),
325
334
  !a.auto && a.available && /* @__PURE__ */ t("span", { className: "ml-auto", children: /* @__PURE__ */ t(
326
- ie,
335
+ de,
327
336
  {
328
337
  collection: s,
329
338
  itemId: h,
@@ -341,11 +350,11 @@ function de({
341
350
  "button",
342
351
  {
343
352
  type: "button",
344
- onClick: () => u((a) => !a),
353
+ onClick: () => p((a) => !a),
345
354
  "data-outbound-toggle": !0,
346
355
  className: "inline-flex items-center gap-1 text-[11px] text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100",
347
356
  children: [
348
- d ? /* @__PURE__ */ t(Y, { className: "h-3 w-3" }) : /* @__PURE__ */ t(I, { className: "h-3 w-3" }),
357
+ d ? /* @__PURE__ */ t(I, { className: "h-3 w-3" }) : /* @__PURE__ */ t(J, { className: "h-3 w-3" }),
349
358
  e.changes.length,
350
359
  e.truncated ? "+" : "",
351
360
  " value",
@@ -379,29 +388,29 @@ function de({
379
388
  }
380
389
  );
381
390
  }
382
- function fe({
391
+ function we({
383
392
  collection: r,
384
393
  itemId: s,
385
394
  onShowRequest: h,
386
395
  onJump: o
387
396
  }) {
388
- const l = W();
389
- R(r, s);
390
- const { data: d, isLoading: u, isError: e } = K({
397
+ const l = R();
398
+ H(r, s);
399
+ const { data: d, isLoading: p, isError: e } = K({
391
400
  queryKey: ["outbound-preview", r, s],
392
- queryFn: () => l.request(_(`/integration-preview/${r}/${encodeURIComponent(s)}/outbound`)).then((a) => a.data),
401
+ queryFn: () => l.request(C(`/integration-preview/${r}/${encodeURIComponent(s)}/outbound`)).then((u) => u.data),
393
402
  enabled: !!s && s !== "new",
394
403
  staleTime: 2e4
395
404
  });
396
- if (u)
405
+ if (p)
397
406
  return /* @__PURE__ */ n("div", { className: "space-y-1.5 pb-2", "data-outbound-preview-section": "loading", children: [
398
407
  /* @__PURE__ */ t("div", { className: "h-3 w-40 animate-pulse rounded bg-[hsl(var(--nvr-skeleton))]" }),
399
408
  /* @__PURE__ */ t("div", { className: "h-14 animate-pulse rounded-lg bg-[hsl(var(--nvr-skeleton))]" })
400
409
  ] });
401
410
  if (e)
402
411
  return /* @__PURE__ */ t("p", { className: "pb-2 text-[12px] text-red-700 dark:text-red-400", children: "Could not work out what the next push would send." });
403
- const m = (d == null ? void 0 : d.integrations) ?? [];
404
- return m.length === 0 ? null : /* @__PURE__ */ n("div", { className: "space-y-1.5 pb-2", "data-outbound-preview-section": !0, children: [
412
+ const g = (d == null ? void 0 : d.integrations) ?? [];
413
+ return g.length === 0 ? null : /* @__PURE__ */ n("div", { className: "space-y-1.5 pb-2", "data-outbound-preview-section": !0, children: [
405
414
  /* @__PURE__ */ n("p", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: [
406
415
  "What goes out next",
407
416
  (d == null ? void 0 : d.state) && /* @__PURE__ */ n("span", { className: "ml-1 font-normal normal-case tracking-normal", children: [
@@ -410,21 +419,21 @@ function fe({
410
419
  "”"
411
420
  ] })
412
421
  ] }),
413
- m.map((a) => /* @__PURE__ */ t(
414
- de,
422
+ g.map((u) => /* @__PURE__ */ t(
423
+ oe,
415
424
  {
416
- integration: a,
425
+ integration: u,
417
426
  collection: r,
418
427
  itemId: s,
419
428
  onShowRequest: h,
420
429
  onJump: o
421
430
  },
422
- `${a.api_id}|${a.endpoint_path}`
431
+ `${u.api_id}|${u.endpoint_path}`
423
432
  ))
424
433
  ] });
425
434
  }
426
435
  export {
427
- fe as OutboundPreviewSection,
428
- ie as PushReadinessChip,
436
+ we as OutboundPreviewSection,
437
+ de as PushReadinessChip,
429
438
  P as focusRecordTarget
430
439
  };
@@ -267,7 +267,17 @@ function ne() {
267
267
  function te() {
268
268
  I({
269
269
  topic: "integrations",
270
- keys: [["integration-signals"], ["integration-partners"], ["integration-events"]],
270
+ // rt-fix C (admin #9): the partner drill-down (`integration-partner`, its submissions list
271
+ // `['erp-submissions', 'partner', …]`) and the ERP tab (`erp-submissions`,
272
+ // `erp-submissions-search`) follow retries by the cron or a colleague too.
273
+ keys: [
274
+ ["integration-signals"],
275
+ ["integration-partners"],
276
+ ["integration-events"],
277
+ ["integration-partner"],
278
+ ["erp-submissions"],
279
+ ["erp-submissions-search"]
280
+ ],
271
281
  quietMs: 3e3,
272
282
  maxWaitMs: 2e4
273
283
  });
@@ -177,7 +177,11 @@ function te({
177
177
  // The Σ alone carries the affordance in every format (Rob,
178
178
  // 2026-09-25: the inline formula ate the band's width); the
179
179
  // formula is the hover tip, the breakdown is the click.
180
- "inline-flex shrink-0 items-center self-center text-[11px] font-medium leading-none text-slate-400 hover:text-nvr-cyan dark:text-slate-500",
180
+ // self-baseline, not self-center: the value line is 20px tall
181
+ // with room below the baseline, so centring put the Σ ~3px
182
+ // under the figure's middle. On the baseline (its bottom edge,
183
+ // the button has no text) a 10px Σ centres on the digits.
184
+ "inline-flex shrink-0 items-center self-baseline text-[11px] font-medium leading-none text-slate-400 hover:text-nvr-cyan dark:text-slate-500",
181
185
  p && "text-nvr-cyan"
182
186
  ),
183
187
  "data-tip": "Where this number comes from",