@nivaro/react 0.3.117 → 0.3.119

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 (138) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +136 -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 +3757 -3695
  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 +4451 -4385
  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/ScreenRefreshButton.js +34 -32
  27. package/dist/shared/components/TipLayer.js +65 -58
  28. package/dist/shared/components/WidgetImageMenu.js +83 -43
  29. package/dist/shared/components/activity/RecordActivityStream.js +175 -173
  30. package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
  31. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
  32. package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
  33. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
  34. package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
  35. package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
  36. package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
  37. package/dist/shared/components/collections-directory/page-model.js +72 -67
  38. package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
  39. package/dist/shared/components/integrations/SendStatus.js +65 -59
  40. package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
  41. package/dist/shared/components/integrations/console/SignalCard.js +237 -230
  42. package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
  43. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +135 -94
  44. package/dist/shared/components/item-edit/CloneDialog.js +191 -161
  45. package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
  46. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
  47. package/dist/shared/components/item-edit/FieldComments.js +88 -85
  48. package/dist/shared/components/item-edit/FieldPointer.js +82 -67
  49. package/dist/shared/components/item-edit/FieldRow.js +106 -100
  50. package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
  51. package/dist/shared/components/item-edit/FilePickerField.js +452 -387
  52. package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
  53. package/dist/shared/components/item-edit/HeaderTools.js +245 -141
  54. package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
  55. package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
  56. package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
  57. package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
  58. package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
  59. package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
  60. package/dist/shared/components/item-edit/RecalcValue.js +57 -32
  61. package/dist/shared/components/item-edit/RecordHelpChip.js +15 -16
  62. package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
  63. package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
  64. package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
  65. package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
  66. package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
  67. package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
  68. package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
  69. package/dist/shared/components/item-edit/SectionPresence.js +18 -10
  70. package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
  71. package/dist/shared/components/item-edit/UserChip.js +1 -1
  72. package/dist/shared/components/item-edit/addendum-view.js +6 -0
  73. package/dist/shared/components/item-edit/file-live.js +69 -54
  74. package/dist/shared/components/item-edit/layout-switch.js +98 -89
  75. package/dist/shared/components/item-edit/partner-needs.js +12 -12
  76. package/dist/shared/components/item-edit/removed-line.js +31 -25
  77. package/dist/shared/components/layout-editor/pickers/field-picker.js +151 -130
  78. package/dist/shared/components/list/ListViewers.js +46 -35
  79. package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
  80. package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
  81. package/dist/shared/components/panels/AlertBanners.js +82 -72
  82. package/dist/shared/components/panels/BranchLanes.js +22 -22
  83. package/dist/shared/components/panels/CommentImages.js +123 -102
  84. package/dist/shared/components/panels/CommentPanel.js +186 -185
  85. package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
  86. package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
  87. package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
  88. package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
  89. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
  90. package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
  91. package/dist/shared/components/profile/AgentNameField.js +107 -81
  92. package/dist/shared/components/profile/AgentsPanel.js +184 -184
  93. package/dist/shared/components/profile/PersonAccess.js +599 -495
  94. package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
  95. package/dist/shared/components/profile/SignedInDevices.js +17 -17
  96. package/dist/shared/components/profile/primitives.js +1 -1
  97. package/dist/shared/components/queue/OwnerAvatars.js +91 -54
  98. package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
  99. package/dist/shared/components/queue/QueueWorklist.js +1002 -983
  100. package/dist/shared/components/support/AssignRules.js +1733 -0
  101. package/dist/shared/components/support/PersonPick.js +88 -0
  102. package/dist/shared/components/support/RequestList.js +790 -0
  103. package/dist/shared/components/support/ScreenShare.js +158 -152
  104. package/dist/shared/components/support/SupportRequestDialog.js +50 -48
  105. package/dist/shared/components/support/SupportView.js +140 -246
  106. package/dist/shared/components/support/TicketDetailSheet.js +82 -75
  107. package/dist/shared/components/support/TicketSlowScreens.js +9 -9
  108. package/dist/shared/components/support/assign-rules-text.js +171 -0
  109. package/dist/shared/components/support/support-list.js +125 -0
  110. package/dist/shared/components/ui/SimpleSelect.js +28 -20
  111. package/dist/shared/components/ui/checkbox.js +6 -6
  112. package/dist/shared/components/ui/select.js +43 -39
  113. package/dist/shared/components/ui/sheet.js +9 -9
  114. package/dist/shared/components/ui/switch.js +12 -11
  115. package/dist/shared/components/watch-list/WatchDock.js +532 -459
  116. package/dist/shared/components/watch-list/WatchExtras.js +332 -286
  117. package/dist/shared/components/watch-list/WatchRows.js +164 -140
  118. package/dist/shared/lib/activity-sentence.js +103 -91
  119. package/dist/shared/lib/agent-presence.js +27 -21
  120. package/dist/shared/lib/approval-progress.js +2 -2
  121. package/dist/shared/lib/copy-rules.js +31 -24
  122. package/dist/shared/lib/derived-causes.js +113 -78
  123. package/dist/shared/lib/grid-cursors.js +26 -26
  124. package/dist/shared/lib/label-flash.js +27 -0
  125. package/dist/shared/lib/list-return.js +137 -125
  126. package/dist/shared/lib/live-deltas.js +40 -34
  127. package/dist/shared/lib/live-groups.js +56 -52
  128. package/dist/shared/lib/live-preference.js +64 -59
  129. package/dist/shared/lib/live-screen.js +223 -192
  130. package/dist/shared/lib/partner-failure.js +11 -11
  131. package/dist/shared/lib/rollup-recalc.js +68 -64
  132. package/dist/shared/lib/screen-refresh.js +74 -68
  133. package/dist/shared/lib/screen-share.js +108 -104
  134. package/dist/shared/lib/send-status.js +77 -61
  135. package/dist/shared/lib/text-diff-window.js +29 -0
  136. package/dist/shared/lib/watch-list.js +210 -209
  137. package/dist/shared/lib/widget-image-render.js +72 -49
  138. package/package.json +1 -1
@@ -1,71 +1,71 @@
1
- import { jsxs as d, jsx as r, Fragment as O } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as t, Fragment as O } from "react/jsx-runtime";
2
2
  import { useQueryClient as j, useMutation as A, useQuery as B } from "@tanstack/react-query";
3
- import { Satellite as b } from "lucide-react";
3
+ import { Satellite as k, Unplug as U, RefreshCw as V, Plug as W } from "lucide-react";
4
4
  import { useState as v, useEffect as R } from "react";
5
- import { toast as x } from "sonner";
5
+ import { toast as b } from "sonner";
6
6
  import { useNivaroClient as C } from "../../context.js";
7
- import { post as V, get as W } from "../../lib/commands.js";
8
- import { integrationChipSummary as H, externalRequestsShown as I } from "../../lib/integration-chip.js";
9
- import { useLiveRefetchInterval as J } from "../../lib/live-queries.js";
10
- import { sendStatusWords as U } from "../../lib/send-status.js";
11
- import { cn as w, formatRelative as z } from "../../lib/utils.js";
12
- import { SubmissionRow as G } from "../integrations/console/SubmissionRow.js";
13
- import { useRecordObligations as E, IntegrationStatusLines as X } from "../integrations/IntegrationStatusLines.js";
14
- import { OutboundPreviewSection as Y } from "../integrations/RecordIntegrationPreview.js";
15
- import { useRecordSendStatus as Z } from "../integrations/SendStatus.js";
16
- import { Dialog as ee, DialogContent as te, DialogHeader as re, DialogTitle as se, DialogBody as ne } from "../ui/dialog.js";
17
- import { RecordEventPathSheet as ae } from "./IntegrationActivitySection.js";
18
- function $(t, s, u, o = !0) {
7
+ import { post as H, get as I } from "../../lib/commands.js";
8
+ import { integrationChipSummary as J, externalRequestsShown as z } from "../../lib/integration-chip.js";
9
+ import { useLiveRefetchInterval as G } from "../../lib/live-queries.js";
10
+ import { sendStatusWords as X } from "../../lib/send-status.js";
11
+ import { cn as N, formatRelative as Y } from "../../lib/utils.js";
12
+ import { SubmissionRow as Z } from "../integrations/console/SubmissionRow.js";
13
+ import { useRecordObligations as E, IntegrationStatusLines as ee } from "../integrations/IntegrationStatusLines.js";
14
+ import { OutboundPreviewSection as te } from "../integrations/RecordIntegrationPreview.js";
15
+ import { useRecordSendStatus as re } from "../integrations/SendStatus.js";
16
+ import { Dialog as se, DialogContent as ae, DialogHeader as ne, DialogTitle as ie, DialogBody as oe } from "../ui/dialog.js";
17
+ import { RecordEventPathSheet as de } from "./IntegrationActivitySection.js";
18
+ function $(r, s, u, i = !0) {
19
19
  const m = C();
20
20
  return B({
21
- queryKey: ["erp-submissions", t, String(s)],
21
+ queryKey: ["erp-submissions", r, String(s)],
22
22
  queryFn: () => m.request(
23
- W(`/erp-submissions/${t}/${encodeURIComponent(s)}`)
24
- ).then((a) => a.data ?? []),
25
- enabled: o && !!t && !!s,
23
+ I(`/erp-submissions/${r}/${encodeURIComponent(s)}`)
24
+ ).then((n) => n.data ?? []),
25
+ enabled: i && !!r && !!s,
26
26
  staleTime: 15e3,
27
27
  refetchInterval: u
28
28
  });
29
29
  }
30
30
  const q = /* @__PURE__ */ new Map();
31
- function Se(t, s, u) {
32
- var g;
33
- const o = u && !!s, m = $(t, s ?? "", void 0, o), a = E(t, o ? s ?? "" : ""), c = I({
31
+ function Re(r, s, u) {
32
+ var c;
33
+ const i = u && !!s, m = $(r, s ?? "", void 0, i), n = E(r, i ? s ?? "" : ""), g = z({
34
34
  layoutOn: u,
35
35
  // A viewer refused the record's integrations has nothing to see here.
36
- partnerIntegration: a.isError ? !1 : a.partnerIntegration,
37
- obligations: a.isError ? 0 : a.obligationCount,
38
- submissions: m.isError ? 0 : ((g = m.data) == null ? void 0 : g.length) ?? null
36
+ partnerIntegration: n.isError ? !1 : n.partnerIntegration,
37
+ obligations: n.isError ? 0 : n.obligationCount,
38
+ submissions: m.isError ? 0 : ((c = m.data) == null ? void 0 : c.length) ?? null
39
39
  });
40
40
  return R(() => {
41
- c !== null && u && q.set(t, c);
42
- }, [c, t, u]), o ? c ?? q.get(t) ?? !1 : !1;
41
+ g !== null && u && q.set(r, g);
42
+ }, [g, r, u]), i ? g ?? q.get(r) ?? !1 : !1;
43
43
  }
44
- function Ne({
45
- collection: t,
44
+ function Ce({
45
+ collection: r,
46
46
  itemId: s
47
47
  }) {
48
- const u = C(), o = j(), [m, a] = v(!1), [c, g] = v(null), [h, S] = v(null);
48
+ const u = C(), i = j(), [m, n] = v(!1), [g, c] = v(null), [h, w] = v(null);
49
49
  R(() => {
50
50
  if (!m || h == null) return;
51
51
  const e = document.querySelector(`[data-submission-id="${h}"]`);
52
52
  e == null || e.scrollIntoView({ block: "center", behavior: "smooth" });
53
53
  }, [m, h]);
54
- const P = J(6e4), { data: Q, isLoading: D } = $(t, s, P), { data: K } = Z(t, s), f = A({
55
- mutationFn: (e) => u.request(V(`/erp-submissions/${e}/retry`)),
54
+ const P = G(6e4), { data: Q, isLoading: D } = $(r, s, P), { data: K } = re(r, s), x = A({
55
+ mutationFn: (e) => u.request(H(`/erp-submissions/${e}/retry`)),
56
56
  onSuccess: (e) => {
57
- var N;
58
- const l = (N = e == null ? void 0 : e.data) == null ? void 0 : N.status;
59
- l && l !== "failed" ? x.success("Submission retried successfully") : x.error("Retry failed — expand the request for the error"), o.invalidateQueries({ queryKey: ["erp-submissions", t, String(s)] }), o.invalidateQueries({ queryKey: ["erp-submission-attempts"] }), o.invalidateQueries({
60
- queryKey: ["integration-obligations", "record", t, String(s)]
57
+ var S;
58
+ const l = (S = e == null ? void 0 : e.data) == null ? void 0 : S.status;
59
+ l && l !== "failed" ? b.success("Submission retried successfully") : b.error("Retry failed — expand the request for the error"), i.invalidateQueries({ queryKey: ["erp-submissions", r, String(s)] }), i.invalidateQueries({ queryKey: ["erp-submission-attempts"] }), i.invalidateQueries({
60
+ queryKey: ["integration-obligations", "record", r, String(s)]
61
61
  });
62
62
  },
63
- onError: () => x.error("Retry failed")
63
+ onError: () => b.error("Retry failed")
64
64
  }), {
65
- lines: y,
65
+ lines: f,
66
66
  remediationEnabled: L,
67
67
  isLoading: F
68
- } = E(t, s), p = Q ?? [];
68
+ } = E(r, s), p = Q ?? [];
69
69
  if (D || F)
70
70
  return /* @__PURE__ */ d(
71
71
  "span",
@@ -73,41 +73,41 @@ function Ne({
73
73
  className: "flex shrink-0 items-center gap-1.5 self-center rounded-md border border-slate-200 px-2 py-1 text-[11px] text-slate-400 dark:border-border",
74
74
  "data-nvr-external-requests": "loading",
75
75
  children: [
76
- /* @__PURE__ */ r(b, { className: "h-3.5 w-3.5 opacity-60" }),
77
- /* @__PURE__ */ r("span", { className: "h-2.5 w-16 animate-pulse rounded bg-[hsl(var(--nvr-skeleton))]" })
76
+ /* @__PURE__ */ t(k, { className: "h-3.5 w-3.5 opacity-60" }),
77
+ /* @__PURE__ */ t("span", { className: "h-2.5 w-16 animate-pulse rounded bg-[hsl(var(--nvr-skeleton))]" })
78
78
  ]
79
79
  }
80
80
  );
81
81
  const _ = new Set(
82
- (K ?? []).filter((e) => !!U(e).retry_at).map((e) => e.api)
83
- ), n = H(
84
- y,
82
+ (K ?? []).filter((e) => !!X(e).retry_at).map((e) => e.api)
83
+ ), a = J(
84
+ f,
85
85
  p,
86
- (e) => e ? z(e) : "",
86
+ (e) => e ? Y(e) : "",
87
87
  _
88
- ), k = /* @__PURE__ */ new Map();
88
+ ), y = /* @__PURE__ */ new Map();
89
89
  for (const e of p) {
90
90
  const l = (e.external_api_name ?? (e.external_api != null ? `#${e.external_api}` : "External")).toLowerCase();
91
- k.has(l) || k.set(l, { id: e.id, status: e.status });
91
+ y.has(l) || y.set(l, { id: e.id, status: e.status });
92
92
  }
93
- const T = p.length === 0 && n.partners.length === 0, M = {
93
+ const T = p.length === 0 && a.partners.length === 0, M = {
94
94
  ok: "bg-emerald-500",
95
95
  attention: "bg-red-500",
96
96
  retrying: "bg-amber-500",
97
97
  pending: "bg-sky-500",
98
98
  neutral: "bg-slate-400 dark:bg-slate-500"
99
- }, i = n.attention;
99
+ }, o = a.attention;
100
100
  return /* @__PURE__ */ d(O, { children: [
101
101
  T ? /* @__PURE__ */ d(
102
102
  "button",
103
103
  {
104
104
  type: "button",
105
- onClick: () => a(!0),
105
+ onClick: () => n(!0),
106
106
  className: "flex shrink-0 items-center gap-1.5 self-center rounded-md border border-dashed border-slate-200 px-2 py-1 text-[11px] text-slate-500 hover:bg-slate-50 dark:border-border dark:text-slate-400 dark:hover:bg-white/5",
107
107
  "data-nvr-external-requests": "none",
108
108
  "data-tip": "Nothing from this record has been sent to an outside system yet. Click to see what the first push would carry.",
109
109
  children: [
110
- /* @__PURE__ */ r(b, { className: "h-3.5 w-3.5 opacity-60" }),
110
+ /* @__PURE__ */ t(k, { className: "h-3.5 w-3.5 opacity-60" }),
111
111
  "No external requests"
112
112
  ]
113
113
  }
@@ -115,26 +115,18 @@ function Ne({
115
115
  "button",
116
116
  {
117
117
  type: "button",
118
- onClick: () => a(!0),
118
+ onClick: () => n(!0),
119
119
  "data-nvr-external-requests": !0,
120
- "data-integrations-ok": n.ok,
121
- "data-integrations-attention": i,
122
- className: w(
120
+ "data-integrations-ok": a.ok,
121
+ "data-integrations-attention": o,
122
+ className: N(
123
123
  "flex shrink-0 items-center gap-1.5 self-center rounded-md border px-2 py-1 text-[11px] font-medium transition-colors",
124
- i > 0 ? "border-red-200 text-slate-700 hover:bg-red-50/60 dark:border-red-500/40 dark:text-slate-200 dark:hover:bg-red-500/10" : n.retrying > 0 ? "border-amber-200 text-slate-700 hover:bg-amber-50/60 dark:border-amber-500/40 dark:text-slate-200 dark:hover:bg-amber-500/10" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-border dark:text-slate-300 dark:hover:bg-white/5"
124
+ o > 0 ? "border-red-200 text-slate-700 hover:bg-red-50/60 dark:border-red-500/40 dark:text-slate-200 dark:hover:bg-red-500/10" : a.retrying > 0 ? "border-amber-200 text-slate-700 hover:bg-amber-50/60 dark:border-amber-500/40 dark:text-slate-200 dark:hover:bg-amber-500/10" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-border dark:text-slate-300 dark:hover:bg-white/5"
125
125
  ),
126
- title: i > 0 ? `${i} integration ${i === 1 ? "issue needs" : "issues need"} attention — click for details` : n.retrying > 0 ? "A send could not get through and will be tried again by itself — click for details" : "Integrations for this record — partner status and every request sent",
126
+ title: o > 0 ? `${o} integration ${o === 1 ? "issue needs" : "issues need"} attention — click for details` : a.retrying > 0 ? "A send could not get through and will be tried again by itself — click for details" : "Integrations for this record — partner status and every request sent",
127
127
  children: [
128
- /* @__PURE__ */ r(
129
- b,
130
- {
131
- className: w(
132
- "h-3.5 w-3.5",
133
- i > 0 ? "text-red-500" : n.retrying > 0 ? "text-amber-500" : "text-nvr-cyan"
134
- )
135
- }
136
- ),
137
- n.partners.length <= 3 ? n.partners.map((e) => /* @__PURE__ */ d(
128
+ o > 0 ? /* @__PURE__ */ t(U, { "aria-hidden": !0, className: "h-3.5 w-3.5 text-red-500" }) : a.retrying > 0 ? /* @__PURE__ */ t(V, { "aria-hidden": !0, className: "h-3.5 w-3.5 text-amber-500" }) : /* @__PURE__ */ t(W, { "aria-hidden": !0, className: "h-3.5 w-3.5 text-slate-500 dark:text-slate-400" }),
129
+ a.partners.length <= 3 ? a.partners.map((e) => /* @__PURE__ */ d(
138
130
  "span",
139
131
  {
140
132
  className: "inline-flex items-center gap-1",
@@ -142,134 +134,134 @@ function Ne({
142
134
  "data-integration-status": e.status,
143
135
  "data-tip": e.tip,
144
136
  children: [
145
- /* @__PURE__ */ r("span", { className: w("h-1.5 w-1.5 rounded-full", M[e.status]) }),
137
+ /* @__PURE__ */ t("span", { className: N("h-1.5 w-1.5 rounded-full", M[e.status]) }),
146
138
  e.name
147
139
  ]
148
140
  },
149
141
  e.name
150
- )) : /* @__PURE__ */ r("span", { children: "Integrations" }),
151
- n.partners.length > 3 && n.ok > 0 && /* @__PURE__ */ r(
142
+ )) : /* @__PURE__ */ t("span", { children: "Integrations" }),
143
+ a.partners.length > 3 && a.ok > 0 && /* @__PURE__ */ t(
152
144
  "span",
153
145
  {
154
146
  "data-integrations-badge": "ok",
155
147
  className: "rounded bg-emerald-50 px-1 text-[10.5px] font-semibold text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400",
156
- children: n.ok
148
+ children: a.ok
157
149
  }
158
150
  ),
159
- n.partners.length > 3 && n.pending > 0 && /* @__PURE__ */ r(
151
+ a.partners.length > 3 && a.pending > 0 && /* @__PURE__ */ t(
160
152
  "span",
161
153
  {
162
154
  "data-integrations-badge": "pending",
163
155
  className: "rounded bg-sky-50 px-1 text-[10.5px] font-semibold text-sky-700 dark:bg-sky-500/10 dark:text-sky-400",
164
- children: n.pending
156
+ children: a.pending
165
157
  }
166
158
  ),
167
- n.partners.length > 3 && i > 0 && /* @__PURE__ */ r(
159
+ a.partners.length > 3 && o > 0 && /* @__PURE__ */ t(
168
160
  "span",
169
161
  {
170
162
  "data-integrations-badge": "attention",
171
163
  className: "rounded bg-red-50 px-1 text-[10.5px] font-semibold text-red-700 dark:bg-red-500/10 dark:text-red-400",
172
- children: i
164
+ children: o
173
165
  }
174
166
  )
175
167
  ]
176
168
  }
177
169
  ),
178
- m && /* @__PURE__ */ r(ee, { open: !0, onOpenChange: (e) => !e && a(!1), children: /* @__PURE__ */ d(te, { className: "p-5", style: { width: "75%", maxWidth: "75%" }, children: [
179
- /* @__PURE__ */ r(re, { children: /* @__PURE__ */ d(se, { className: "flex items-center gap-2 text-[15px]", children: [
180
- /* @__PURE__ */ r(b, { className: "h-4 w-4 text-nvr-cyan" }),
170
+ m && /* @__PURE__ */ t(se, { open: !0, onOpenChange: (e) => !e && n(!1), children: /* @__PURE__ */ d(ae, { className: "p-5", style: { width: "75%", maxWidth: "75%" }, children: [
171
+ /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ d(ie, { className: "flex items-center gap-2 text-[15px]", children: [
172
+ /* @__PURE__ */ t(k, { className: "h-4 w-4 text-nvr-cyan" }),
181
173
  "Integrations",
182
174
  /* @__PURE__ */ d("span", { className: "text-[12px] font-normal text-slate-400", children: [
183
- n.partners.length,
175
+ a.partners.length,
184
176
  " partner",
185
- n.partners.length !== 1 ? "s" : "",
177
+ a.partners.length !== 1 ? "s" : "",
186
178
  " ·",
187
179
  " ",
188
180
  p.length,
189
181
  " request",
190
182
  p.length !== 1 ? "s" : "",
191
- i > 0 && /* @__PURE__ */ d("span", { className: "ml-1 text-red-600 dark:text-red-400", children: [
183
+ o > 0 && /* @__PURE__ */ d("span", { className: "ml-1 text-red-600 dark:text-red-400", children: [
192
184
  "· ",
193
- i,
185
+ o,
194
186
  " need",
195
- i === 1 ? "s" : "",
187
+ o === 1 ? "s" : "",
196
188
  " attention"
197
189
  ] })
198
190
  ] })
199
191
  ] }) }),
200
- /* @__PURE__ */ d(ne, { className: "max-h-[65vh] space-y-2 overflow-y-auto", children: [
201
- /* @__PURE__ */ r(
202
- Y,
192
+ /* @__PURE__ */ d(oe, { className: "max-h-[65vh] space-y-2 overflow-y-auto", children: [
193
+ /* @__PURE__ */ t(
194
+ te,
203
195
  {
204
- collection: t,
196
+ collection: r,
205
197
  itemId: String(s),
206
- onShowRequest: (e) => S(e),
207
- onJump: () => a(!1)
198
+ onShowRequest: (e) => w(e),
199
+ onJump: () => n(!1)
208
200
  }
209
201
  ),
210
- y.length > 0 && /* @__PURE__ */ d("div", { className: "space-y-1.5 pb-2", "data-integrations-partner-status": !0, children: [
211
- /* @__PURE__ */ r("p", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Partner status" }),
212
- /* @__PURE__ */ r(
213
- X,
202
+ f.length > 0 && /* @__PURE__ */ d("div", { className: "space-y-1.5 pb-2", "data-integrations-partner-status": !0, children: [
203
+ /* @__PURE__ */ t("p", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Partner status" }),
204
+ /* @__PURE__ */ t(
205
+ ee,
214
206
  {
215
- collection: t,
207
+ collection: r,
216
208
  itemId: s,
217
- lines: y,
209
+ lines: f,
218
210
  remediationEnabled: L,
219
211
  actions: {
220
- newestSubmissionByApi: k,
221
- onRetry: (e) => f.mutate(e),
222
- onView: (e) => S(e),
212
+ newestSubmissionByApi: y,
213
+ onRetry: (e) => x.mutate(e),
214
+ onView: (e) => w(e),
223
215
  onCheck: () => {
224
- o.invalidateQueries({
216
+ i.invalidateQueries({
225
217
  queryKey: [
226
218
  "integration-obligations",
227
219
  "record",
228
- t,
220
+ r,
229
221
  String(s)
230
222
  ]
231
- }), o.invalidateQueries({
232
- queryKey: ["erp-submissions", t, String(s)]
233
- }), x.message("Checking with the partner status…");
223
+ }), i.invalidateQueries({
224
+ queryKey: ["erp-submissions", r, String(s)]
225
+ }), b.message("Checking with the partner status…");
234
226
  },
235
227
  // The pipeline panel takes over (save, requirements
236
228
  // dialog, run) — this dialog gets out of its way.
237
- onRanTransition: () => a(!1)
229
+ onRanTransition: () => n(!1)
238
230
  }
239
231
  }
240
232
  )
241
233
  ] }),
242
- p.length > 0 && /* @__PURE__ */ r("p", { className: "pt-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Requests sent" }),
243
- p.length === 0 && /* @__PURE__ */ r("p", { className: "text-[12px] text-slate-500 dark:text-muted-foreground", children: "No request has been sent from this record yet." }),
244
- p.map((e) => /* @__PURE__ */ r(
245
- G,
234
+ p.length > 0 && /* @__PURE__ */ t("p", { className: "pt-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Requests sent" }),
235
+ p.length === 0 && /* @__PURE__ */ t("p", { className: "text-[12px] text-slate-500 dark:text-muted-foreground", children: "No request has been sent from this record yet." }),
236
+ p.map((e) => /* @__PURE__ */ t(
237
+ Z,
246
238
  {
247
239
  sub: e,
248
240
  initialOpen: h === e.id,
249
- onRetry: (l) => f.mutate(l),
250
- retrying: f.isPending,
241
+ onRetry: (l) => x.mutate(l),
242
+ retrying: x.isPending,
251
243
  onShowPath: (l) => {
252
- a(!1), g(l);
244
+ n(!1), c(l);
253
245
  }
254
246
  },
255
247
  `${e.id}:${h === e.id ? "focus" : ""}`
256
248
  ))
257
249
  ] })
258
250
  ] }) }),
259
- /* @__PURE__ */ r(
260
- ae,
251
+ /* @__PURE__ */ t(
252
+ de,
261
253
  {
262
- target: c != null ? {
254
+ target: g != null ? {
263
255
  source: "core:outbound",
264
- id: String(c),
265
- record: { collection: t, item: String(s) }
256
+ id: String(g),
257
+ record: { collection: r, item: String(s) }
266
258
  } : null,
267
- onClose: () => g(null)
259
+ onClose: () => c(null)
268
260
  }
269
261
  )
270
262
  ] });
271
263
  }
272
264
  export {
273
- Ne as ExternalRequestsChip,
274
- Se as useExternalRequestsShown
265
+ Ce as ExternalRequestsChip,
266
+ Re as useExternalRequestsShown
275
267
  };
@@ -1,8 +1,8 @@
1
- import { jsxs as u, jsx as p, Fragment as c } from "react/jsx-runtime";
1
+ import { jsxs as u, jsx as a, Fragment as c } from "react/jsx-runtime";
2
2
  import { useQuery as h } from "@tanstack/react-query";
3
- import { Eye as g, EyeOff as y } from "lucide-react";
4
- import { useNivaroClient as b } from "../../context.js";
5
- import { get as x } from "../../lib/commands.js";
3
+ import { Eye as g, EyeOff as x } from "lucide-react";
4
+ import { useNivaroClient as y } from "../../context.js";
5
+ import { get as b } from "../../lib/commands.js";
6
6
  import { formatRelative as v, formatDateTime as d, cn as w } from "../../lib/utils.js";
7
7
  import { UserChip as $ } from "../item-edit/UserChip.js";
8
8
  const _ = "pipeline-owner-opened";
@@ -30,10 +30,10 @@ function A({
30
30
  stateId: i,
31
31
  className: l
32
32
  }) {
33
- const s = b(), { data: n } = h({
33
+ const s = y(), { data: n } = h({
34
34
  queryKey: [_, e, r, i],
35
35
  queryFn: () => s.request(
36
- x(`/pipelines/instance/${e}/${r}/owner-opened`)
36
+ b(`/pipelines/instance/${e}/${r}/owner-opened`)
37
37
  ).then((f) => f.data ?? null),
38
38
  staleTime: 6e4,
39
39
  retry: !1
@@ -41,7 +41,7 @@ function A({
41
41
  if (!n || n.status !== "opened" && n.status !== "not_opened") return null;
42
42
  const t = N(n);
43
43
  if (!t) return null;
44
- const o = n.status === "opened", m = o ? g : y, a = o ? d(n.opened_at) : d(n.entered_at);
44
+ const o = n.status === "opened", m = o ? g : x, p = o ? d(n.opened_at) : d(n.entered_at);
45
45
  return /* @__PURE__ */ u(
46
46
  "p",
47
47
  {
@@ -51,29 +51,36 @@ function A({
51
51
  l
52
52
  ),
53
53
  children: [
54
- /* @__PURE__ */ p(
54
+ /* @__PURE__ */ a(
55
55
  m,
56
56
  {
57
57
  "aria-hidden": !0,
58
58
  className: o ? "mt-px h-3.5 w-3.5 shrink-0 text-emerald-600 dark:text-emerald-400" : "mt-px h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-400"
59
59
  }
60
60
  ),
61
- /* @__PURE__ */ u("span", { "data-tip": o ? `Opened ${a}` : `In this step since ${a}`, children: [
62
- t.lead,
63
- o && n.by ? /* @__PURE__ */ u(c, { children: [
64
- /* @__PURE__ */ p($, { userId: n.by.id, children: /* @__PURE__ */ p(
65
- "button",
66
- {
67
- type: "button",
68
- "aria-label": `${n.by.name} — profile`,
69
- className: "rounded font-medium text-slate-700 underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan dark:text-foreground",
70
- children: t.name
71
- }
72
- ) }),
73
- t.group ? ` (${t.group})` : null
74
- ] }) : null,
75
- t.tail
76
- ] })
61
+ /* @__PURE__ */ u(
62
+ "span",
63
+ {
64
+ className: "min-w-0 text-left",
65
+ "data-tip": o ? `Opened ${p}` : `In this step since ${p}`,
66
+ children: [
67
+ t.lead,
68
+ o && n.by ? /* @__PURE__ */ u(c, { children: [
69
+ /* @__PURE__ */ a($, { userId: n.by.id, children: /* @__PURE__ */ a(
70
+ "button",
71
+ {
72
+ type: "button",
73
+ "aria-label": `${n.by.name} — profile`,
74
+ className: "inline rounded p-0 text-left align-baseline font-medium text-slate-700 underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan dark:text-foreground",
75
+ children: t.name
76
+ }
77
+ ) }),
78
+ t.group ? ` (${t.group})` : null
79
+ ] }) : null,
80
+ t.tail
81
+ ]
82
+ }
83
+ )
77
84
  ]
78
85
  }
79
86
  );