@nivaro/react 0.3.116 → 0.3.118

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 (142) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +140 -14
  4. package/dist/index.js +488 -485
  5. package/dist/shared/components/ActivityEntry.js +130 -125
  6. package/dist/shared/components/AgentPresenceChip.js +36 -26
  7. package/dist/shared/components/CellCopyLayer.js +50 -45
  8. package/dist/shared/components/CollectionBrowserView.js +3855 -3785
  9. package/dist/shared/components/FilePreviewLightbox.js +96 -58
  10. package/dist/shared/components/InStep.js +18 -17
  11. package/dist/shared/components/ItemEditForm.js +4220 -4175
  12. package/dist/shared/components/JobsTray.js +8 -8
  13. package/dist/shared/components/LiveNewMatchesPill.js +21 -14
  14. package/dist/shared/components/LiveOffNote.js +3 -2
  15. package/dist/shared/components/LiveRowMark.js +53 -23
  16. package/dist/shared/components/LiveTraceView.js +162 -123
  17. package/dist/shared/components/MyWorkView.js +320 -299
  18. package/dist/shared/components/NotificationBell.js +14 -14
  19. package/dist/shared/components/OverflowRail.js +1 -1
  20. package/dist/shared/components/PageRenderer.js +120 -116
  21. package/dist/shared/components/ProfileView.js +203 -202
  22. package/dist/shared/components/RealtimeStatusBanner.js +31 -29
  23. package/dist/shared/components/RecordDrilldownSheet.js +7 -7
  24. package/dist/shared/components/RecordHoverCard.js +102 -84
  25. package/dist/shared/components/RecordReadView.js +146 -146
  26. package/dist/shared/components/ReportView.js +1086 -1091
  27. package/dist/shared/components/ScreenRefreshButton.js +34 -32
  28. package/dist/shared/components/TipLayer.js +65 -58
  29. package/dist/shared/components/WidgetImageMenu.js +83 -43
  30. package/dist/shared/components/activity/RecordActivityStream.js +175 -173
  31. package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
  32. package/dist/shared/components/cbv/column-totals.js +62 -57
  33. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
  34. package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
  35. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
  36. package/dist/shared/components/charts/category-axis.js +93 -0
  37. package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
  38. package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
  39. package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
  40. package/dist/shared/components/collections-directory/page-model.js +72 -67
  41. package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
  42. package/dist/shared/components/integrations/SendStatus.js +65 -59
  43. package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
  44. package/dist/shared/components/integrations/console/SignalCard.js +237 -230
  45. package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
  46. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +131 -92
  47. package/dist/shared/components/item-edit/CloneDialog.js +191 -161
  48. package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
  49. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
  50. package/dist/shared/components/item-edit/FieldComments.js +54 -53
  51. package/dist/shared/components/item-edit/FieldPointer.js +82 -67
  52. package/dist/shared/components/item-edit/FieldRow.js +106 -100
  53. package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
  54. package/dist/shared/components/item-edit/FilePickerField.js +452 -387
  55. package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
  56. package/dist/shared/components/item-edit/HeaderTools.js +94 -85
  57. package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
  58. package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
  59. package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
  60. package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
  61. package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
  62. package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
  63. package/dist/shared/components/item-edit/RecalcValue.js +57 -32
  64. package/dist/shared/components/item-edit/RecordHelpChip.js +21 -22
  65. package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
  66. package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
  67. package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
  68. package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
  69. package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
  70. package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
  71. package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
  72. package/dist/shared/components/item-edit/SectionPresence.js +18 -10
  73. package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
  74. package/dist/shared/components/item-edit/UserChip.js +1 -1
  75. package/dist/shared/components/item-edit/file-live.js +69 -54
  76. package/dist/shared/components/item-edit/layout-switch.js +98 -89
  77. package/dist/shared/components/item-edit/partner-needs.js +12 -12
  78. package/dist/shared/components/item-edit/removed-line.js +31 -25
  79. package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
  80. package/dist/shared/components/list/ListViewers.js +46 -35
  81. package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
  82. package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
  83. package/dist/shared/components/panels/AlertBanners.js +82 -72
  84. package/dist/shared/components/panels/BranchLanes.js +22 -22
  85. package/dist/shared/components/panels/CommentImages.js +123 -102
  86. package/dist/shared/components/panels/CommentPanel.js +186 -185
  87. package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
  88. package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
  89. package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
  90. package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
  91. package/dist/shared/components/pipeline/BindingStartStateSettings.js +163 -0
  92. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
  93. package/dist/shared/components/pipeline/PipelineEditorView.js +320 -299
  94. package/dist/shared/components/profile/AgentNameField.js +107 -81
  95. package/dist/shared/components/profile/AgentsPanel.js +184 -184
  96. package/dist/shared/components/profile/PersonAccess.js +599 -495
  97. package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
  98. package/dist/shared/components/profile/SignedInDevices.js +17 -17
  99. package/dist/shared/components/profile/primitives.js +1 -1
  100. package/dist/shared/components/queue/OwnerAvatars.js +91 -54
  101. package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
  102. package/dist/shared/components/queue/QueueWorklist.js +1002 -983
  103. package/dist/shared/components/support/AssignRules.js +1733 -0
  104. package/dist/shared/components/support/PersonPick.js +88 -0
  105. package/dist/shared/components/support/RequestList.js +790 -0
  106. package/dist/shared/components/support/ScreenShare.js +158 -152
  107. package/dist/shared/components/support/SupportRequestDialog.js +50 -48
  108. package/dist/shared/components/support/SupportView.js +140 -246
  109. package/dist/shared/components/support/TicketDetailSheet.js +82 -75
  110. package/dist/shared/components/support/TicketSlowScreens.js +9 -9
  111. package/dist/shared/components/support/assign-rules-text.js +171 -0
  112. package/dist/shared/components/support/support-list.js +125 -0
  113. package/dist/shared/components/ui/SimpleSelect.js +28 -20
  114. package/dist/shared/components/ui/checkbox.js +6 -6
  115. package/dist/shared/components/ui/select.js +43 -39
  116. package/dist/shared/components/ui/sheet.js +9 -9
  117. package/dist/shared/components/ui/switch.js +12 -11
  118. package/dist/shared/components/watch-list/WatchDock.js +532 -459
  119. package/dist/shared/components/watch-list/WatchExtras.js +332 -286
  120. package/dist/shared/components/watch-list/WatchRows.js +164 -140
  121. package/dist/shared/lib/activity-sentence.js +103 -91
  122. package/dist/shared/lib/agent-presence.js +27 -21
  123. package/dist/shared/lib/approval-progress.js +2 -2
  124. package/dist/shared/lib/copy-rules.js +31 -24
  125. package/dist/shared/lib/derived-causes.js +113 -78
  126. package/dist/shared/lib/grid-cursors.js +26 -26
  127. package/dist/shared/lib/label-flash.js +27 -0
  128. package/dist/shared/lib/list-return.js +137 -125
  129. package/dist/shared/lib/live-deltas.js +40 -34
  130. package/dist/shared/lib/live-groups.js +56 -52
  131. package/dist/shared/lib/live-preference.js +64 -59
  132. package/dist/shared/lib/live-screen.js +223 -192
  133. package/dist/shared/lib/partner-failure.js +11 -11
  134. package/dist/shared/lib/rollup-recalc.js +68 -64
  135. package/dist/shared/lib/screen-refresh.js +74 -68
  136. package/dist/shared/lib/screen-share.js +108 -104
  137. package/dist/shared/lib/send-status.js +77 -61
  138. package/dist/shared/lib/text-diff-window.js +29 -0
  139. package/dist/shared/lib/use-query-entry.js +17 -0
  140. package/dist/shared/lib/watch-list.js +210 -209
  141. package/dist/shared/lib/widget-image-render.js +72 -49
  142. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { titleCase as S } from "../../lib/utils.js";
2
- const p = (i) => i.display_name ?? S(i.collection);
3
- function I(i, t) {
1
+ import { titleCase as j } from "../../lib/utils.js";
2
+ const u = (i) => i.display_name ?? j(i.collection);
3
+ function R(i, t) {
4
4
  if (!t) return !0;
5
5
  const n = t.trim().toLowerCase();
6
- return n ? i.collection.toLowerCase().includes(n) || p(i).toLowerCase().includes(n) : !0;
6
+ return n ? i.collection.toLowerCase().includes(n) || u(i).toLowerCase().includes(n) : !0;
7
7
  }
8
- function H(i, t, n) {
8
+ function P(i, t, n) {
9
9
  switch (t) {
10
10
  case "has_records":
11
11
  return ((n == null ? void 0 : n.rows) ?? 0) > 0;
@@ -25,7 +25,7 @@ function H(i, t, n) {
25
25
  return ((n == null ? void 0 : n.forms) ?? 0) > 0;
26
26
  }
27
27
  }
28
- const N = [
28
+ const T = [
29
29
  "has_records",
30
30
  "empty",
31
31
  "hidden",
@@ -35,88 +35,93 @@ const N = [
35
35
  "pipeline",
36
36
  "form"
37
37
  ];
38
- function q(i, t, n, s, h) {
39
- const u = new Set(i.map((e) => e.group).filter((e) => !!e)), r = new Map(
40
- i.filter((e) => u.has(e.collection)).map((e) => [e.collection, e])
41
- ), l = i.filter((e) => !u.has(e.collection)), d = (e) => t == null ? void 0 : t[e.collection], k = [...u].map((e) => {
42
- const o = r.get(e);
43
- return { key: e, label: o ? p(o) : S(e), color: (o == null ? void 0 : o.color) ?? null };
38
+ function G(i, t, n, c, h, f = !!t) {
39
+ const r = new Set(i.map((e) => e.group).filter((e) => !!e)), l = new Map(
40
+ i.filter((e) => r.has(e.collection)).map((e) => [e.collection, e])
41
+ ), d = i.filter((e) => !r.has(e.collection)), p = (e) => t == null ? void 0 : t[e.collection], H = [...r].map((e) => {
42
+ const o = l.get(e);
43
+ return { key: e, label: o ? u(o) : j(e), color: (o == null ? void 0 : o.color) ?? null };
44
44
  }).sort((e, o) => {
45
- var w, C;
46
- const c = ((w = r.get(e.key)) == null ? void 0 : w.sort) ?? 9999, m = ((C = r.get(o.key)) == null ? void 0 : C.sort) ?? 9999;
47
- return c !== m ? c - m : e.label.localeCompare(o.label);
48
- }), _ = (e) => n.chips.includes(e), b = n.showHidden || _("hidden"), L = n.showLinks || _("link"), a = (e) => {
45
+ var C, k;
46
+ const s = ((C = l.get(e.key)) == null ? void 0 : C.sort) ?? 9999, a = ((k = l.get(o.key)) == null ? void 0 : k.sort) ?? 9999;
47
+ return s !== a ? s - a : e.label.localeCompare(o.label);
48
+ }), S = (e) => n.chips.includes(e), b = n.showHidden || S("hidden"), L = n.showLinks || S("link"), w = (e) => {
49
49
  var o;
50
- return !!((o = d(e)) != null && o.link);
51
- }, M = (e) => !!e.hidden && !a(e), P = {
52
- total: l.length,
53
- hidden: l.filter(M).length,
54
- links: l.filter(a).length,
50
+ return !!((o = p(e)) != null && o.link);
51
+ }, M = (e) => !!e.hidden && !w(e), _ = !f, D = {
52
+ total: d.length,
53
+ hidden: d.filter(M).length,
54
+ links: d.filter(w).length,
55
55
  chip: Object.fromEntries(
56
- N.map((e) => [e, l.filter((o) => H(o, e, d(o))).length])
57
- )
58
- }, j = (e) => n.chips.every((o) => H(e, o, d(e))), v = l.filter((e) => I(e, s) && j(e)), D = {
56
+ T.map((e) => [
57
+ e,
58
+ // Unknown link facts: no Hidden / Link table chip numbers (they would be wrong).
59
+ _ && (e === "hidden" || e === "link") ? 0 : d.filter((o) => P(o, e, p(o))).length
60
+ ])
61
+ ),
62
+ pending: _
63
+ }, O = (e) => n.chips.every((o) => P(e, o, p(e))), v = d.filter((e) => R(e, c) && O(e)), x = {
59
64
  hidden: b ? [] : v.filter(M),
60
- links: L ? [] : v.filter(a)
61
- }, O = (e) => a(e) ? L : b || !e.hidden, y = v.filter(O), x = L ? [] : v.filter(a).sort((e, o) => p(e).localeCompare(p(o))), f = (e, o) => p(e).localeCompare(p(o)), z = (e, o) => (e.sort ?? 9999) - (o.sort ?? 9999) || f(e, o), A = !!s.trim() || n.chips.length > 0, E = k.map((e) => {
65
+ links: L ? [] : v.filter(w)
66
+ }, z = (e) => w(e) ? L : b || !e.hidden, y = v.filter(z), A = L ? [] : v.filter(w).sort((e, o) => u(e).localeCompare(u(o))), g = (e, o) => u(e).localeCompare(u(o)), E = (e, o) => (e.sort ?? 9999) - (o.sort ?? 9999) || g(e, o), F = !!c.trim() || n.chips.length > 0, I = H.map((e) => {
62
67
  var o;
63
68
  return {
64
69
  folder: e,
65
- sort: ((o = r.get(e.key)) == null ? void 0 : o.sort) ?? 9999,
66
- cols: y.filter((c) => c.group === e.key).sort(z),
67
- hiddenCount: b ? 0 : l.filter((c) => c.group === e.key && M(c)).length
70
+ sort: ((o = l.get(e.key)) == null ? void 0 : o.sort) ?? 9999,
71
+ cols: y.filter((s) => s.group === e.key).sort(E),
72
+ hiddenCount: b ? 0 : d.filter((s) => s.group === e.key && M(s)).length
68
73
  };
69
- }).filter((e) => e.cols.length > 0 || !A && e.hiddenCount > 0), F = y.filter((e) => !e.group || !u.has(e.group)).sort(f);
70
- let g = [];
71
- return n.view !== "folders" && (g = [...y], n.view === "az" ? g.sort(f) : n.view === "recent" ? g.sort((e, o) => {
72
- var w, C;
73
- const c = Date.parse(((w = d(e)) == null ? void 0 : w.changed_at) ?? "") || 0;
74
- return (Date.parse(((C = d(o)) == null ? void 0 : C.changed_at) ?? "") || 0) - c || f(e, o);
75
- }) : n.view === "records" ? g.sort((e, o) => {
76
- var c, m;
77
- return (((c = d(o)) == null ? void 0 : c.rows) ?? -1) - (((m = d(e)) == null ? void 0 : m.rows) ?? -1) || f(e, o);
78
- }) : n.view === "used" && g.sort(
79
- (e, o) => (h.counts[o.collection] ?? 0) - (h.counts[e.collection] ?? 0) || f(e, o)
74
+ }).filter((e) => e.cols.length > 0 || !F && e.hiddenCount > 0).map((e) => _ ? { ...e, hiddenCount: 0 } : e), N = y.filter((e) => !e.group || !r.has(e.group)).sort(g);
75
+ let m = [];
76
+ return n.view !== "folders" && (m = [...y], n.view === "az" ? m.sort(g) : n.view === "recent" ? m.sort((e, o) => {
77
+ var C, k;
78
+ const s = Date.parse(((C = p(e)) == null ? void 0 : C.changed_at) ?? "") || 0;
79
+ return (Date.parse(((k = p(o)) == null ? void 0 : k.changed_at) ?? "") || 0) - s || g(e, o);
80
+ }) : n.view === "records" ? m.sort((e, o) => {
81
+ var s, a;
82
+ return (((s = p(o)) == null ? void 0 : s.rows) ?? -1) - (((a = p(e)) == null ? void 0 : a.rows) ?? -1) || g(e, o);
83
+ }) : n.view === "used" && m.sort(
84
+ (e, o) => (h.counts[o.collection] ?? 0) - (h.counts[e.collection] ?? 0) || g(e, o)
80
85
  )), {
81
- folders: k,
82
- real: l,
83
- sections: E,
84
- loose: F,
85
- linkTables: x,
86
- flat: g,
86
+ folders: H,
87
+ real: d,
88
+ sections: I,
89
+ loose: N,
90
+ linkTables: A,
91
+ flat: m,
87
92
  shownCount: y.length,
88
- counts: P,
89
- foldedMatches: D
93
+ counts: D,
94
+ foldedMatches: x
90
95
  };
91
96
  }
92
- function R(i, t, n = 4) {
97
+ function q(i, t, n = 4) {
93
98
  if (Math.abs(i.length - t.length) > n) return n + 1;
94
- const s = Array.from({ length: t.length + 1 }, (h, u) => u);
99
+ const c = Array.from({ length: t.length + 1 }, (h, f) => f);
95
100
  for (let h = 1; h <= i.length; h++) {
96
- let u = s[0];
97
- s[0] = h;
98
- let r = s[0];
101
+ let f = c[0];
102
+ c[0] = h;
103
+ let r = c[0];
99
104
  for (let l = 1; l <= t.length; l++) {
100
- const d = s[l];
101
- s[l] = Math.min(s[l] + 1, s[l - 1] + 1, u + (i[h - 1] === t[l - 1] ? 0 : 1)), u = d, r = Math.min(r, s[l]);
105
+ const d = c[l];
106
+ c[l] = Math.min(c[l] + 1, c[l - 1] + 1, f + (i[h - 1] === t[l - 1] ? 0 : 1)), f = d, r = Math.min(r, c[l]);
102
107
  }
103
108
  if (r > n) return n + 1;
104
109
  }
105
- return s[t.length];
110
+ return c[t.length];
106
111
  }
107
- function B(i, t, n = 3) {
108
- const s = i.trim().toLowerCase();
109
- if (s.length < 3) return [];
110
- const h = s.length <= 5 ? 2 : 3;
112
+ function J(i, t, n = 3) {
113
+ const c = i.trim().toLowerCase();
114
+ if (c.length < 3) return [];
115
+ const h = c.length <= 5 ? 2 : 3;
111
116
  return t.map((r) => {
112
- const l = [r.collection, p(r), ...r.collection.split("_"), ...p(r).split(/\s+/)], d = Math.min(...l.map((k) => R(s, k.toLowerCase(), h)));
117
+ const l = [r.collection, u(r), ...r.collection.split("_"), ...u(r).split(/\s+/)], d = Math.min(...l.map((p) => q(c, p.toLowerCase(), h)));
113
118
  return { c: r, best: d };
114
- }).filter((r) => r.best <= h).sort((r, l) => r.best - l.best || p(r.c).localeCompare(p(l.c))).slice(0, n).map((r) => r.c);
119
+ }).filter((r) => r.best <= h).sort((r, l) => r.best - l.best || u(r.c).localeCompare(u(l.c))).slice(0, n).map((r) => r.c);
115
120
  }
116
121
  export {
117
- q as buildPageModel,
118
- p as label,
119
- H as matchesChip,
120
- I as matchesFilter,
121
- B as nearSpellings
122
+ G as buildPageModel,
123
+ u as label,
124
+ P as matchesChip,
125
+ R as matchesFilter,
126
+ J as nearSpellings
122
127
  };
@@ -1,11 +1,11 @@
1
- import { jsxs as n, jsx as t, Fragment as M } from "react/jsx-runtime";
2
- import { useQuery as L, useQueryClient as V } from "@tanstack/react-query";
3
- import { Loader2 as Z, Send as X, CheckCircle2 as S, AlertTriangle as Q, Zap as Y, ChevronDown as I, ChevronRight as J, PencilLine as ee } from "lucide-react";
4
- import { useState as W, useEffect as te } from "react";
5
- import { useNivaroClient as R } from "../../context.js";
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
6
  import { get as _ } from "../../lib/commands.js";
7
- import { cn as y, formatRelative as ae, formatDateTime as re } from "../../lib/utils.js";
8
- import { Popover as se, PopoverTrigger as ne, PopoverContent as le } from "../ui/popover.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";
9
9
  function P(r) {
10
10
  typeof window > "u" || window.dispatchEvent(new CustomEvent("nvr:record-focus", { detail: r }));
11
11
  }
@@ -23,10 +23,10 @@ function A({
23
23
  "data-preflight-issue": l.severity,
24
24
  className: "flex items-start gap-2 text-[12px]",
25
25
  children: [
26
- 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
- Q,
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,
28
28
  {
29
- className: y(
29
+ className: k(
30
30
  "mt-0.5 h-3.5 w-3.5 shrink-0",
31
31
  l.severity === "block" ? "text-red-600 dark:text-red-400" : "text-amber-600 dark:text-amber-400"
32
32
  )
@@ -79,9 +79,9 @@ function A({
79
79
  );
80
80
  }) });
81
81
  }
82
- function H(r, s) {
83
- const h = V();
84
- te(() => {
82
+ function R(r, s) {
83
+ const h = M();
84
+ ee(() => {
85
85
  let o = null;
86
86
  const l = (e) => {
87
87
  const m = e == null ? void 0 : e[0];
@@ -90,8 +90,8 @@ function H(r, s) {
90
90
  for (const e of h.getQueryCache().getAll())
91
91
  l(e.queryKey) && d.set(e.queryHash, e.state.data);
92
92
  const u = h.getQueryCache().subscribe((e) => {
93
- var k;
94
- if (e.type !== "updated" || ((k = e.action) == null ? void 0 : k.type) !== "success" || !l(e.query.queryKey)) return;
93
+ var y;
94
+ if (e.type !== "updated" || ((y = e.action) == null ? void 0 : y.type) !== "success" || !l(e.query.queryKey)) return;
95
95
  const m = d.has(e.query.queryHash), a = d.get(e.query.queryHash);
96
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(() => {
97
97
  h.invalidateQueries({ queryKey: ["push-preflight", r, s] }), h.invalidateQueries({ queryKey: ["outbound-preview", r, s] });
@@ -105,7 +105,7 @@ function H(r, s) {
105
105
  function v(r) {
106
106
  return r.length <= 1 ? r[0] ?? "" : `${r.slice(0, -1).join(", ")} and ${r[r.length - 1]}`;
107
107
  }
108
- const E = "absolute -right-1.5 -top-1.5 z-[1] inline-flex items-center justify-center rounded-full ring-2 ring-white dark:ring-card";
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
109
  function ie({
110
110
  collection: r,
111
111
  itemId: s,
@@ -115,10 +115,10 @@ function ie({
115
115
  compact: d = !1,
116
116
  onJump: u
117
117
  }) {
118
- const e = R(), [m, a] = W(!1);
119
- H(r, s);
120
- const k = h ? "t" : "a", x = h ?? o ?? "", { data: c, isLoading: U, isError: D } = L({
121
- queryKey: ["push-preflight", r, s, k, x],
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],
122
122
  queryFn: () => e.request(
123
123
  h ? _(`/integration-preview/${r}/${encodeURIComponent(s)}/preflight`, {
124
124
  transition_id: h
@@ -131,33 +131,25 @@ function ie({
131
131
  staleTime: 2e4
132
132
  });
133
133
  if (!x || s === "new") return null;
134
- if (U)
135
- return d ? /* @__PURE__ */ t(
136
- "span",
137
- {
138
- "data-push-readiness": "loading",
139
- role: "status",
140
- className: y(E, "h-2.5 w-2.5 animate-pulse bg-slate-300 dark:bg-slate-600"),
141
- "aria-label": "Checking whether this can be sent"
142
- }
143
- ) : /* @__PURE__ */ t(
134
+ if (H)
135
+ return d ? /* @__PURE__ */ t("span", { "data-push-readiness": "loading", role: "status", className: "sr-only", children: "Checking whether this can be sent" }) : /* @__PURE__ */ t(
144
136
  "span",
145
137
  {
146
138
  "data-push-readiness": "loading",
147
139
  role: "status",
148
140
  className: "inline-flex items-center self-center",
149
141
  "aria-label": "Checking whether this can be sent",
150
- children: /* @__PURE__ */ t(Z, { className: "h-3 w-3 animate-spin text-slate-400" })
142
+ children: /* @__PURE__ */ t(V, { className: "h-3 w-3 animate-spin text-slate-400" })
151
143
  }
152
144
  );
153
145
  if ((c == null ? void 0 : c.supported) === !1) return null;
154
- const F = D || !!(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 = F ? "error" : T.length > 0 ? "block" : g.length > 0 ? "warn" : "ready", w = c == null ? void 0 : c.pushes, N = [
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 = [
155
147
  ...new Set((w ?? []).filter((i) => i.status === "would_push").map((i) => i.api_name))
156
148
  ], b = [
157
149
  ...new Set((w ?? []).filter((i) => i.status === "unchanged").map((i) => i.api_name))
158
- ], O = !!w && N.length === 0, B = 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" ? B : p === "error" ? "Could not check" : (T[0] ?? g[0]).message, C = g.length > 1 ? ` +${g.length - 1}` : "", G = 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`) + G : `${l}: ${j}${C ? ` (and ${g.length - 1} more)` : ""}`;
159
- return d && p === "ready" && O ? null : /* @__PURE__ */ n(se, { open: m, onOpenChange: a, children: [
160
- /* @__PURE__ */ t(ne, { asChild: !0, children: d ? /* @__PURE__ */ t(
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(
161
153
  "button",
162
154
  {
163
155
  type: "button",
@@ -165,8 +157,8 @@ function ie({
165
157
  "data-push-readiness-for": x,
166
158
  "aria-label": $,
167
159
  "data-tip": $,
168
- className: y(
169
- E,
160
+ className: k(
161
+ le,
170
162
  // A larger invisible hit area than the 14–16px disc.
171
163
  "after:absolute after:-inset-1.5 after:content-['']",
172
164
  "text-white transition-[filter,transform] duration-150 ease-out hover:brightness-110 active:scale-90",
@@ -175,7 +167,7 @@ function ie({
175
167
  // as "approved / recommended" on an order button (army 11 a2 F2).
176
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]"
177
169
  ),
178
- children: p === "ready" ? /* @__PURE__ */ t(X, { 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: "!" })
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: "!" })
179
171
  }
180
172
  ) : /* @__PURE__ */ n(
181
173
  "button",
@@ -183,19 +175,19 @@ function ie({
183
175
  type: "button",
184
176
  "data-push-readiness": p,
185
177
  "data-push-readiness-for": x,
186
- className: y(
178
+ className: k(
187
179
  "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",
188
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"
189
181
  ),
190
182
  "data-tip": $,
191
183
  children: [
192
- p === "ready" ? /* @__PURE__ */ t(S, { className: "h-3 w-3 shrink-0" }) : /* @__PURE__ */ t(Q, { className: "h-3 w-3 shrink-0" }),
184
+ p === "ready" ? /* @__PURE__ */ t(S, { className: "h-3 w-3 shrink-0" }) : /* @__PURE__ */ t(L, { className: "h-3 w-3 shrink-0" }),
193
185
  /* @__PURE__ */ t("span", { className: "truncate", children: j }),
194
186
  C && /* @__PURE__ */ t("span", { className: "shrink-0 opacity-70", children: C })
195
187
  ]
196
188
  }
197
189
  ) }),
198
- /* @__PURE__ */ n(le, { align: "end", className: "w-[380px] max-w-[92vw] p-3", children: [
190
+ /* @__PURE__ */ n(ne, { align: "end", className: "w-[380px] max-w-[92vw] p-3", children: [
199
191
  /* @__PURE__ */ n("p", { className: "text-[11px] font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400", children: [
200
192
  "Before “",
201
193
  l,
@@ -241,7 +233,7 @@ function ie({
241
233
  ),
242
234
  (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: [
243
235
  /* @__PURE__ */ t("p", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "What it sends" }),
244
- /* @__PURE__ */ t("ul", { className: "mt-1 space-y-0.5 text-[11.5px]", children: c.pushes.map((i, z) => /* @__PURE__ */ n(
236
+ /* @__PURE__ */ t("ul", { className: "mt-1 space-y-0.5 text-[11.5px]", children: c.pushes.map((i, G) => /* @__PURE__ */ n(
245
237
  "li",
246
238
  {
247
239
  className: "flex items-baseline gap-1.5 text-slate-600 dark:text-slate-300",
@@ -251,13 +243,13 @@ function ie({
251
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" })
252
244
  ]
253
245
  },
254
- z
246
+ G
255
247
  )) })
256
248
  ] })
257
249
  ] })
258
250
  ] });
259
251
  }
260
- function K(r) {
252
+ function E(r) {
261
253
  if (r == null || r === "") return "—";
262
254
  if (typeof r == "object") return JSON.stringify(r);
263
255
  const s = String(r);
@@ -270,7 +262,7 @@ function de({
270
262
  onShowRequest: o,
271
263
  onJump: l
272
264
  }) {
273
- const [d, u] = W(!1), e = r, m = !e.first_push && e.changes.length === 0;
265
+ const [d, u] = Q(!1), e = r, m = !e.first_push && e.changes.length === 0;
274
266
  return /* @__PURE__ */ n(
275
267
  "div",
276
268
  {
@@ -280,7 +272,7 @@ function de({
280
272
  children: [
281
273
  /* @__PURE__ */ n("div", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-0.5", children: [
282
274
  /* @__PURE__ */ t("span", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: e.api_name }),
283
- /* @__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(M, { children: [
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: [
284
276
  "will receive on next push:",
285
277
  " ",
286
278
  /* @__PURE__ */ t("span", { className: "font-medium text-slate-800 dark:text-slate-100", children: e.summary.join(", ") })
@@ -291,10 +283,10 @@ function de({
291
283
  type: "button",
292
284
  onClick: () => o == null ? void 0 : o(e.last.submission_id),
293
285
  className: "ml-auto text-[11px] text-slate-500 hover:underline dark:text-slate-400",
294
- "data-tip": `Compared with the push that landed ${re(e.last.at)}`,
286
+ "data-tip": `Compared with the push that landed ${ae(e.last.at)}`,
295
287
  children: [
296
288
  "vs. last sent ",
297
- ae(e.last.at)
289
+ te(e.last.at)
298
290
  ]
299
291
  }
300
292
  )
@@ -303,12 +295,12 @@ function de({
303
295
  "li",
304
296
  {
305
297
  "data-outbound-trigger": a.transition_id,
306
- className: y(
298
+ className: k(
307
299
  "flex flex-wrap items-center gap-x-1.5 text-[11.5px]",
308
300
  a.available ? "text-slate-600 dark:text-slate-300" : "text-slate-400 dark:text-slate-500"
309
301
  ),
310
302
  children: [
311
- 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 }),
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 }),
312
304
  /* @__PURE__ */ n("span", { className: "font-medium", children: [
313
305
  a.auto ? "Automatically on" : "On",
314
306
  " “",
@@ -353,7 +345,7 @@ function de({
353
345
  "data-outbound-toggle": !0,
354
346
  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",
355
347
  children: [
356
- d ? /* @__PURE__ */ t(I, { className: "h-3 w-3" }) : /* @__PURE__ */ t(J, { className: "h-3 w-3" }),
348
+ d ? /* @__PURE__ */ t(Y, { className: "h-3 w-3" }) : /* @__PURE__ */ t(I, { className: "h-3 w-3" }),
357
349
  e.changes.length,
358
350
  e.truncated ? "+" : "",
359
351
  " value",
@@ -375,8 +367,8 @@ function de({
375
367
  "data-outbound-change": a.path,
376
368
  children: [
377
369
  /* @__PURE__ */ t("td", { className: "truncate px-2 py-1 font-mono text-slate-600 dark:text-slate-300", children: /* @__PURE__ */ t("span", { "data-tip": a.path, children: a.path }) }),
378
- /* @__PURE__ */ t("td", { className: "truncate px-2 py-1 text-slate-500 line-through decoration-slate-300 dark:text-slate-400 dark:decoration-slate-600", children: K(a.from) }),
379
- /* @__PURE__ */ t("td", { className: "truncate px-2 py-1 font-medium text-slate-800 dark:text-slate-100", children: K(a.to) })
370
+ /* @__PURE__ */ t("td", { className: "truncate px-2 py-1 text-slate-500 line-through decoration-slate-300 dark:text-slate-400 dark:decoration-slate-600", children: E(a.from) }),
371
+ /* @__PURE__ */ t("td", { className: "truncate px-2 py-1 font-medium text-slate-800 dark:text-slate-100", children: E(a.to) })
380
372
  ]
381
373
  },
382
374
  a.path
@@ -393,9 +385,9 @@ function fe({
393
385
  onShowRequest: h,
394
386
  onJump: o
395
387
  }) {
396
- const l = R();
397
- H(r, s);
398
- const { data: d, isLoading: u, isError: e } = L({
388
+ const l = W();
389
+ R(r, s);
390
+ const { data: d, isLoading: u, isError: e } = K({
399
391
  queryKey: ["outbound-preview", r, s],
400
392
  queryFn: () => l.request(_(`/integration-preview/${r}/${encodeURIComponent(s)}/outbound`)).then((a) => a.data),
401
393
  enabled: !!s && s !== "new",