@nivaro/react 0.3.117 → 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 (137) 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 +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/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 +131 -92
  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 +54 -53
  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 +94 -85
  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 +21 -22
  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/file-live.js +69 -54
  73. package/dist/shared/components/item-edit/layout-switch.js +98 -89
  74. package/dist/shared/components/item-edit/partner-needs.js +12 -12
  75. package/dist/shared/components/item-edit/removed-line.js +31 -25
  76. package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
  77. package/dist/shared/components/list/ListViewers.js +46 -35
  78. package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
  79. package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
  80. package/dist/shared/components/panels/AlertBanners.js +82 -72
  81. package/dist/shared/components/panels/BranchLanes.js +22 -22
  82. package/dist/shared/components/panels/CommentImages.js +123 -102
  83. package/dist/shared/components/panels/CommentPanel.js +186 -185
  84. package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
  85. package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
  86. package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
  87. package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
  88. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
  89. package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
  90. package/dist/shared/components/profile/AgentNameField.js +107 -81
  91. package/dist/shared/components/profile/AgentsPanel.js +184 -184
  92. package/dist/shared/components/profile/PersonAccess.js +599 -495
  93. package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
  94. package/dist/shared/components/profile/SignedInDevices.js +17 -17
  95. package/dist/shared/components/profile/primitives.js +1 -1
  96. package/dist/shared/components/queue/OwnerAvatars.js +91 -54
  97. package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
  98. package/dist/shared/components/queue/QueueWorklist.js +1002 -983
  99. package/dist/shared/components/support/AssignRules.js +1733 -0
  100. package/dist/shared/components/support/PersonPick.js +88 -0
  101. package/dist/shared/components/support/RequestList.js +790 -0
  102. package/dist/shared/components/support/ScreenShare.js +158 -152
  103. package/dist/shared/components/support/SupportRequestDialog.js +50 -48
  104. package/dist/shared/components/support/SupportView.js +140 -246
  105. package/dist/shared/components/support/TicketDetailSheet.js +82 -75
  106. package/dist/shared/components/support/TicketSlowScreens.js +9 -9
  107. package/dist/shared/components/support/assign-rules-text.js +171 -0
  108. package/dist/shared/components/support/support-list.js +125 -0
  109. package/dist/shared/components/ui/SimpleSelect.js +28 -20
  110. package/dist/shared/components/ui/checkbox.js +6 -6
  111. package/dist/shared/components/ui/select.js +43 -39
  112. package/dist/shared/components/ui/sheet.js +9 -9
  113. package/dist/shared/components/ui/switch.js +12 -11
  114. package/dist/shared/components/watch-list/WatchDock.js +532 -459
  115. package/dist/shared/components/watch-list/WatchExtras.js +332 -286
  116. package/dist/shared/components/watch-list/WatchRows.js +164 -140
  117. package/dist/shared/lib/activity-sentence.js +103 -91
  118. package/dist/shared/lib/agent-presence.js +27 -21
  119. package/dist/shared/lib/approval-progress.js +2 -2
  120. package/dist/shared/lib/copy-rules.js +31 -24
  121. package/dist/shared/lib/derived-causes.js +113 -78
  122. package/dist/shared/lib/grid-cursors.js +26 -26
  123. package/dist/shared/lib/label-flash.js +27 -0
  124. package/dist/shared/lib/list-return.js +137 -125
  125. package/dist/shared/lib/live-deltas.js +40 -34
  126. package/dist/shared/lib/live-groups.js +56 -52
  127. package/dist/shared/lib/live-preference.js +64 -59
  128. package/dist/shared/lib/live-screen.js +223 -192
  129. package/dist/shared/lib/partner-failure.js +11 -11
  130. package/dist/shared/lib/rollup-recalc.js +68 -64
  131. package/dist/shared/lib/screen-refresh.js +74 -68
  132. package/dist/shared/lib/screen-share.js +108 -104
  133. package/dist/shared/lib/send-status.js +77 -61
  134. package/dist/shared/lib/text-diff-window.js +29 -0
  135. package/dist/shared/lib/watch-list.js +210 -209
  136. package/dist/shared/lib/widget-image-render.js +72 -49
  137. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
1
  import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
- import { useQueryClient as _, useQuery as z, useMutation as G } from "@tanstack/react-query";
3
- import { Loader2 as U, Paperclip as H, X } from "lucide-react";
4
- import { useState as l, useRef as W, useEffect as I } from "react";
5
- import { useNivaroClient as B } from "../../context.js";
6
- import { get as J, post as V } from "../../lib/commands.js";
7
- import { invalidateRecordTasks as Z } from "../../lib/record-tasks.js";
8
- import { prepareReplayClip as O } from "../../lib/replay-capture.js";
9
- import { installReplayTail as ee } from "../../lib/replay-tail.js";
10
- import { Dialog as te, DialogContent as re, DialogHeader as ae, DialogTitle as ne, DialogDescription as le } from "../ui/dialog.js";
11
- import { collectSupportContext as se } from "./support-context.js";
12
- function ye({
2
+ import { useQueryClient as z, useQuery as G, useMutation as H } from "@tanstack/react-query";
3
+ import { Loader2 as W, Paperclip as X, X as B } from "lucide-react";
4
+ import { useState as l, useRef as $, useEffect as I } from "react";
5
+ import { useNivaroClient as J } from "../../context.js";
6
+ import { get as V, post as Z } from "../../lib/commands.js";
7
+ import { invalidateRecordTasks as O } from "../../lib/record-tasks.js";
8
+ import { prepareReplayClip as ee } from "../../lib/replay-capture.js";
9
+ import { installReplayTail as te } from "../../lib/replay-tail.js";
10
+ import { Dialog as re, DialogContent as ae, DialogHeader as ne, DialogTitle as le, DialogDescription as se } from "../ui/dialog.js";
11
+ import { collectSupportContext as oe } from "./support-context.js";
12
+ function be({
13
13
  open: s,
14
14
  onOpenChange: c,
15
15
  collection: d,
@@ -17,11 +17,12 @@ function ye({
17
17
  recordLabel: A,
18
18
  initialTitle: f,
19
19
  initialDescription: g,
20
+ source: Q,
20
21
  onCreated: y
21
22
  }) {
22
- const m = B(), i = _(), n = !!d && p != null && p !== "", [u, Q] = l(null), [b, v] = l(""), [T, k] = l(""), [w, N] = l([]), [E, K] = l(!1), [F, x] = l(null), [M, P] = l(!0), q = W(null), C = W(!1);
23
+ const m = J(), i = z(), n = !!d && p != null && p !== "", [u, T] = l(null), [b, v] = l(""), [E, k] = l(""), [w, N] = l([]), [K, F] = l(!1), [M, x] = l(null), [P, j] = l(!0), q = $(null), C = $(!1);
23
24
  I(() => {
24
- ee();
25
+ te();
25
26
  }, []), I(() => {
26
27
  s && (f && v((e) => e || f), g && k((e) => e || g));
27
28
  }, [s, f, g]), I(() => {
@@ -30,46 +31,47 @@ function ye({
30
31
  return;
31
32
  }
32
33
  q.current = {
33
- clip: O("support"),
34
+ clip: ee("support"),
34
35
  route: typeof window < "u" ? window.location.pathname : ""
35
36
  };
36
37
  }, [s]);
37
- const { data: S = [] } = z({
38
+ const { data: S = [] } = G({
38
39
  queryKey: ["support-categories", n ? d : null],
39
40
  queryFn: () => m.request(
40
- J("/support/categories", n ? { collection: d } : void 0)
41
+ V("/support/categories", n ? { collection: d } : void 0)
41
42
  ).then((e) => e.data ?? []),
42
43
  enabled: s
43
44
  }), R = () => {
44
- Q(null), v(""), k(""), N([]), x(null), P(!0);
45
+ T(null), v(""), k(""), N([]), x(null), j(!0);
45
46
  };
46
- async function $() {
47
- if (!M) return { fileId: null, replay: null };
47
+ async function L() {
48
+ if (!P) return { fileId: null, replay: null };
48
49
  const e = q.current;
49
- return se({
50
+ return oe({
50
51
  clip: (e == null ? void 0 : e.clip) ?? null,
51
52
  route: (e == null ? void 0 : e.route) ?? (typeof window < "u" ? window.location.pathname : ""),
52
53
  upload: (r) => m.upload(r, { title: "Technical details" }),
53
54
  userAgent: typeof navigator < "u" ? navigator.userAgent : null
54
55
  });
55
56
  }
56
- const D = G({
57
+ const D = H({
57
58
  mutationFn: async () => {
58
- const e = await $();
59
+ const e = await L();
59
60
  return m.request(
60
- V("/support/tickets", {
61
+ Z("/support/tickets", {
61
62
  title: b.trim(),
62
- description: T.trim() || null,
63
+ description: E.trim() || null,
63
64
  category_id: u,
64
65
  collection: n ? d : null,
65
66
  item: n ? String(p) : null,
66
67
  attachments: [...w.map((r) => r.id), ...e.fileId ? [e.fileId] : []],
67
- ...e.replay ? { replay: e.replay } : {}
68
+ ...e.replay ? { replay: e.replay } : {},
69
+ ...Q ? { source: Q } : {}
68
70
  })
69
71
  );
70
72
  },
71
73
  onSuccess: (e) => {
72
- i.invalidateQueries({ queryKey: ["support-tickets"] }), i.invalidateQueries({ queryKey: ["support-summary"] }), n && Z(i, d, p), y == null || y(e.data), R(), c(!1);
74
+ i.invalidateQueries({ queryKey: ["support-tickets"] }), i.invalidateQueries({ queryKey: ["support-summary"] }), n && O(i, d, p), y == null || y(e.data), R(), c(!1);
73
75
  },
74
76
  onError: (e) => {
75
77
  var o;
@@ -84,40 +86,40 @@ function ye({
84
86
  C.current = !1;
85
87
  }
86
88
  });
87
- async function L(e) {
89
+ async function Y(e) {
88
90
  if (e != null && e.length) {
89
- K(!0), x(null);
91
+ F(!0), x(null);
90
92
  try {
91
93
  for (const r of Array.from(e).slice(0, 10)) {
92
94
  const o = await m.upload(r);
93
- N((Y) => [...Y, { id: String(o.id), name: r.name }]);
95
+ N((_) => [..._, { id: String(o.id), name: r.name }]);
94
96
  }
95
97
  } catch {
96
98
  x("A file could not be uploaded");
97
99
  } finally {
98
- K(!1);
100
+ F(!1);
99
101
  }
100
102
  }
101
103
  }
102
- const h = S.find((e) => e.id === u) ?? null, j = b.trim().length > 0 && !D.isPending && !E;
104
+ const h = S.find((e) => e.id === u) ?? null, U = b.trim().length > 0 && !D.isPending && !K;
103
105
  return /* @__PURE__ */ t(
104
- te,
106
+ re,
105
107
  {
106
108
  open: s,
107
109
  onOpenChange: (e) => {
108
110
  e || R(), c(e);
109
111
  },
110
- children: /* @__PURE__ */ a(re, { className: "max-w-xl dark:bg-card", "data-support-request": !0, children: [
111
- /* @__PURE__ */ a(ae, { className: "px-6 pt-5", children: [
112
- /* @__PURE__ */ t(ne, { className: "text-[15px] font-semibold text-slate-900 dark:text-slate-100", children: n ? `Request a change${A ? ` · ${A}` : ""}` : "Get help" }),
113
- /* @__PURE__ */ t(le, { className: "text-[12.5px] text-slate-500 dark:text-muted-foreground", children: n ? "Tell the administrators what needs to change on this record. You can follow the request under My requests." : "Ask the administrators for help. You can follow the request under My requests." })
112
+ children: /* @__PURE__ */ a(ae, { className: "max-w-xl dark:bg-card", "data-support-request": !0, children: [
113
+ /* @__PURE__ */ a(ne, { className: "px-6 pt-5", children: [
114
+ /* @__PURE__ */ t(le, { className: "text-[15px] font-semibold text-slate-900 dark:text-slate-100", children: n ? `Request a change${A ? ` · ${A}` : ""}` : "Get help" }),
115
+ /* @__PURE__ */ t(se, { className: "text-[12.5px] text-slate-500 dark:text-muted-foreground", children: n ? "Tell the administrators what needs to change on this record. You can follow the request under My requests." : "Ask the administrators for help. You can follow the request under My requests." })
114
116
  ] }),
115
117
  /* @__PURE__ */ a(
116
118
  "form",
117
119
  {
118
120
  className: "space-y-4 px-6 pb-5 pt-3",
119
121
  onSubmit: (e) => {
120
- e.preventDefault(), !(!j || C.current) && (C.current = !0, D.mutate());
122
+ e.preventDefault(), !(!U || C.current) && (C.current = !0, D.mutate());
121
123
  },
122
124
  children: [
123
125
  S.length > 0 && /* @__PURE__ */ a("fieldset", { children: [
@@ -128,7 +130,7 @@ function ye({
128
130
  type: "button",
129
131
  "data-support-type": e.id,
130
132
  "aria-pressed": u === e.id,
131
- onClick: () => Q(u === e.id ? null : e.id),
133
+ onClick: () => T(u === e.id ? null : e.id),
132
134
  className: u === e.id ? "rounded-full border border-nvr-cyan/60 bg-nvr-cyan/10 px-2.5 py-1 text-[12px] font-medium text-nvr-navy dark:text-nvr-cyan" : "rounded-full border border-slate-200 px-2.5 py-1 text-[12px] text-slate-600 hover:border-slate-300 dark:border-border dark:text-slate-300",
133
135
  children: e.name
134
136
  },
@@ -156,7 +158,7 @@ function ye({
156
158
  "textarea",
157
159
  {
158
160
  "data-support-description": !0,
159
- value: T,
161
+ value: E,
160
162
  onChange: (e) => k(e.target.value),
161
163
  rows: 5,
162
164
  placeholder: "What should change, and why",
@@ -166,7 +168,7 @@ function ye({
166
168
  ] }),
167
169
  /* @__PURE__ */ a("div", { children: [
168
170
  /* @__PURE__ */ a("label", { className: "inline-flex cursor-pointer items-center gap-1.5 text-[12px] font-medium text-slate-600 hover:text-slate-900 dark:text-slate-300 dark:hover:text-slate-100", children: [
169
- E ? /* @__PURE__ */ t(U, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(H, { className: "h-3.5 w-3.5" }),
171
+ K ? /* @__PURE__ */ t(W, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(X, { className: "h-3.5 w-3.5" }),
170
172
  "Attach files",
171
173
  /* @__PURE__ */ t(
172
174
  "input",
@@ -176,7 +178,7 @@ function ye({
176
178
  className: "hidden",
177
179
  "data-support-files": !0,
178
180
  onChange: (e) => {
179
- L(e.target.files), e.target.value = "";
181
+ Y(e.target.files), e.target.value = "";
180
182
  }
181
183
  }
182
184
  )
@@ -194,7 +196,7 @@ function ye({
194
196
  "aria-label": `Remove ${e.name}`,
195
197
  onClick: () => N((r) => r.filter((o) => o.id !== e.id)),
196
198
  className: "text-slate-400 hover:text-slate-700 dark:hover:text-slate-100",
197
- children: /* @__PURE__ */ t(X, { className: "h-3 w-3" })
199
+ children: /* @__PURE__ */ t(B, { className: "h-3 w-3" })
198
200
  }
199
201
  )
200
202
  ]
@@ -212,8 +214,8 @@ function ye({
212
214
  "input",
213
215
  {
214
216
  type: "checkbox",
215
- checked: M,
216
- onChange: (e) => P(e.target.checked),
217
+ checked: P,
218
+ onChange: (e) => j(e.target.checked),
217
219
  className: "mt-0.5 accent-[#00ceff]"
218
220
  }
219
221
  ),
@@ -224,7 +226,7 @@ function ye({
224
226
  ]
225
227
  }
226
228
  ),
227
- F && /* @__PURE__ */ t("p", { className: "text-[12px] text-red-600 dark:text-red-400", role: "alert", children: F }),
229
+ M && /* @__PURE__ */ t("p", { className: "text-[12px] text-red-600 dark:text-red-400", role: "alert", children: M }),
228
230
  /* @__PURE__ */ a("div", { className: "flex justify-end gap-2 pt-1", children: [
229
231
  /* @__PURE__ */ t(
230
232
  "button",
@@ -240,10 +242,10 @@ function ye({
240
242
  {
241
243
  type: "submit",
242
244
  "data-support-send": !0,
243
- disabled: !j,
245
+ disabled: !U,
244
246
  className: "inline-flex h-8 items-center gap-1.5 rounded-md border border-nvr-cyan/60 bg-nvr-cyan/10 px-3 text-[12.5px] font-medium text-nvr-navy hover:bg-nvr-cyan/15 disabled:opacity-50 dark:text-nvr-cyan",
245
247
  children: [
246
- D.isPending && /* @__PURE__ */ t(U, { className: "h-3.5 w-3.5 animate-spin" }),
248
+ D.isPending && /* @__PURE__ */ t(W, { className: "h-3.5 w-3.5 animate-spin" }),
247
249
  "Send request"
248
250
  ]
249
251
  }
@@ -257,5 +259,5 @@ function ye({
257
259
  );
258
260
  }
259
261
  export {
260
- ye as SupportRequestDialog
262
+ be as SupportRequestDialog
261
263
  };