@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,34 +1,34 @@
1
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
2
- import { useQueryClient as ce } from "@tanstack/react-query";
3
- import { EyeOff as le, ArrowLeft as me, Trash2 as fe, Copy as pe, FileUp as ye, Bot as ge, UploadCloud as he } from "lucide-react";
4
- import { useState as _, useRef as h, useEffect as K } from "react";
1
+ import { jsx as d, jsxs as u } from "react/jsx-runtime";
2
+ import { useQueryClient as fe } from "@tanstack/react-query";
3
+ import { EyeOff as he, ArrowLeft as ye, Trash2 as ge, Copy as be, FileUp as ve, Bot as xe, UploadCloud as I } from "lucide-react";
4
+ import { useState as N, useRef as b, useEffect as E } from "react";
5
5
  import { toast as B } from "sonner";
6
- import { useNivaroClient as be, useRecordSurface as ve, useItemEditAuth as we } from "../../context.js";
7
- import { get as F, post as xe } from "../../lib/commands.js";
8
- import { useLiveRecord as ke, useLiveEvent as I, useLiveRecordEvent as ee, LIVE_ASPECTS as l, batchTouches as Se } from "../../lib/live.js";
9
- import { useOptionalRealtime as Ne } from "../../lib/realtime.js";
10
- import { useRecordTabsSignal as Re, useRecordTabs as Te, otherTabNote as _e } from "../../lib/record-tabs.js";
11
- import { userErrorMessage as Ke } from "../../lib/safe-error.js";
12
- import { useRemoteUploads as Ee, UPLOAD_STATE_EVENT as re, uploadSentence as Qe, applyRemoteUpload as qe } from "../../lib/upload-presence.js";
13
- import { formatRelative as Ae, cn as te } from "../../lib/utils.js";
14
- import { CollectionImportBanner as $e } from "../CollectionImportBanner.js";
15
- import { markLiveRecordWrite as se } from "./live-record-marks.js";
16
- import { wideSpreadDelay as Le, fileQueryOfRecord as Oe, relatedQueryOfRecord as Ce } from "./live-related.js";
17
- function De(e, r, u) {
6
+ import { useNivaroClient as we, useRecordSurface as ke, useItemEditAuth as Se } from "../../context.js";
7
+ import { get as j, post as Ne } from "../../lib/commands.js";
8
+ import { useLiveRecord as Re, useLiveEvent as ee, useLiveRecordEvent as re, LIVE_ASPECTS as m, batchTouches as Te } from "../../lib/live.js";
9
+ import { useOptionalRealtime as _e } from "../../lib/realtime.js";
10
+ import { useRecordTabsSignal as Ke, useRecordTabs as Ee, otherTabNote as Qe } from "../../lib/record-tabs.js";
11
+ import { userErrorMessage as qe } from "../../lib/safe-error.js";
12
+ import { useRemoteUploads as Ae, UPLOAD_STATE_EVENT as te, uploadSentence as ne, applyRemoteUpload as $e } from "../../lib/upload-presence.js";
13
+ import { formatRelative as Le, cn as se } from "../../lib/utils.js";
14
+ import { CollectionImportBanner as Oe } from "../CollectionImportBanner.js";
15
+ import { markLiveRecordWrite as ae } from "./live-record-marks.js";
16
+ import { wideSpreadDelay as Ce, fileQueryOfRecord as De, relatedQueryOfRecord as Me } from "./live-related.js";
17
+ function Ue(e, t, c) {
18
18
  var y;
19
- if (u.active)
20
- return { text: e ? `${e} moved this to ${r}` : `This record moved to ${r}` };
21
- const b = ((y = u.label) == null ? void 0 : y.trim()) || "A record in your tabs";
19
+ if (c.active)
20
+ return { text: e ? `${e} moved this to ${t}` : `This record moved to ${t}` };
21
+ const v = ((y = c.label) == null ? void 0 : y.trim()) || "A record in your tabs";
22
22
  return {
23
- text: e ? `${e} moved ${b} to ${r}` : `${b} moved to ${r}`,
24
- open: u.open
23
+ text: e ? `${e} moved ${v} to ${t}` : `${v} moved to ${t}`,
24
+ open: c.open
25
25
  };
26
26
  }
27
- function Me(e, r) {
28
- const u = e == null ? void 0 : e.user_id;
29
- return typeof u == "string" && !!r && u.toUpperCase() === String(r).toUpperCase();
27
+ function Be(e, t) {
28
+ const c = e == null ? void 0 : e.user_id;
29
+ return typeof c == "string" && !!t && c.toUpperCase() === String(t).toUpperCase();
30
30
  }
31
- const Ue = 8e3, ne = [
31
+ const je = 8e3, ie = [
32
32
  "item",
33
33
  "rrv-record",
34
34
  "revisions",
@@ -55,33 +55,33 @@ const Ue = 8e3, ne = [
55
55
  // The SLA clock (SlaClock.tsx slaStatusKey).
56
56
  "sla-breach"
57
57
  ];
58
- function Be(e, r, u) {
59
- const b = new Set(ne), y = String(u);
58
+ function Fe(e, t, c) {
59
+ const v = new Set(ie), y = String(c);
60
60
  e.removeQueries({
61
- predicate: (c) => b.has(c.queryKey[0]) && c.queryKey[1] === r && String(c.queryKey[2]) === y
61
+ predicate: (l) => v.has(l.queryKey[0]) && l.queryKey[1] === t && String(l.queryKey[2]) === y
62
62
  });
63
63
  }
64
- function ar(e, r, u) {
65
- if (!r || u.length === 0) return;
66
- const b = new Set(ne), y = new Set(u.map(String));
64
+ function or(e, t, c) {
65
+ if (!t || c.length === 0) return;
66
+ const v = new Set(ie), y = new Set(c.map(String));
67
67
  e.invalidateQueries({
68
- predicate: (c) => b.has(c.queryKey[0]) && c.queryKey[1] === r && y.has(String(c.queryKey[2]))
68
+ predicate: (l) => v.has(l.queryKey[0]) && l.queryKey[1] === t && y.has(String(l.queryKey[2]))
69
69
  });
70
70
  }
71
- function Fe({ onBack: e }) {
72
- return /* @__PURE__ */ d("div", { className: "p-6", children: /* @__PURE__ */ f(
71
+ function Pe({ onBack: e }) {
72
+ return /* @__PURE__ */ d("div", { className: "p-6", children: /* @__PURE__ */ u(
73
73
  "div",
74
74
  {
75
75
  "data-record-gone": "access",
76
76
  role: "alert",
77
77
  className: "flex items-center gap-3 rounded-lg border border-amber-300 bg-amber-50 px-3.5 py-2.5 dark:border-amber-500/40 dark:bg-amber-500/10",
78
78
  children: [
79
- /* @__PURE__ */ d(le, { className: "h-4 w-4 shrink-0 text-amber-500" }),
80
- /* @__PURE__ */ f("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", children: [
79
+ /* @__PURE__ */ d(he, { className: "h-4 w-4 shrink-0 text-amber-500" }),
80
+ /* @__PURE__ */ u("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", children: [
81
81
  /* @__PURE__ */ d("span", { className: "font-semibold", children: "You no longer have access to this record." }),
82
82
  " A role, scope or filter change hid it while you had it open."
83
83
  ] }),
84
- /* @__PURE__ */ f(
84
+ /* @__PURE__ */ u(
85
85
  "button",
86
86
  {
87
87
  type: "button",
@@ -89,7 +89,7 @@ function Fe({ onBack: e }) {
89
89
  "data-record-gone-back": !0,
90
90
  className: "inline-flex h-7 shrink-0 items-center gap-1 rounded-md border border-amber-300 bg-white px-2.5 text-[11.5px] font-medium text-amber-800 hover:bg-amber-100 dark:border-amber-500/40 dark:bg-transparent dark:text-amber-300 dark:hover:bg-amber-500/10",
91
91
  children: [
92
- /* @__PURE__ */ d(me, { className: "h-3.5 w-3.5" }),
92
+ /* @__PURE__ */ d(ye, { className: "h-3.5 w-3.5" }),
93
93
  "Back"
94
94
  ]
95
95
  }
@@ -98,194 +98,198 @@ function Fe({ onBack: e }) {
98
98
  }
99
99
  ) });
100
100
  }
101
- const je = (e) => {
102
- var r;
103
- return (e == null ? void 0 : e.status) ?? ((r = e == null ? void 0 : e.response) == null ? void 0 : r.status);
101
+ const Ye = (e) => {
102
+ var t;
103
+ return (e == null ? void 0 : e.status) ?? ((t = e == null ? void 0 : e.response) == null ? void 0 : t.status);
104
104
  };
105
- function ir({
105
+ function dr({
106
106
  collection: e,
107
- itemId: r,
108
- dirty: u = !1,
109
- loadDenied: b = !1,
107
+ itemId: t,
108
+ dirty: c = !1,
109
+ loadDenied: v = !1,
110
110
  onGoneChange: y
111
111
  }) {
112
- const c = Ne(), E = be(), p = ce(), [$, j] = _(!1), L = Ee(e, String(r), "unclaimed"), [o, ae] = _(null), [ie, O] = _({}), [P, Y] = _(!1), [V, W] = _(!1), S = h(null), N = h(null), R = h(null), Q = h(Date.now()), C = h(null), q = h(y);
113
- q.current = y;
114
- const w = h(null), H = ve(), z = h(H);
112
+ const l = _e(), Q = we(), h = fe(), [L, F] = N(!1), [oe, de] = N(null), x = Ae(e, String(t), "unclaimed"), [o, ue] = N(null), [ce, O] = N({}), [P, Y] = N(!1), [V, W] = N(!1), R = b(null), T = b(null), _ = b(null), q = b(Date.now()), C = b(null), A = b(y);
113
+ A.current = y;
114
+ const w = b(null), H = ke(), z = b(H);
115
115
  z.current = H;
116
- const T = (t) => {
117
- var s;
118
- w.current = t, ae(t), (s = q.current) == null || s.call(q, t), (t == null ? void 0 : t.kind) === "access" && setTimeout(() => Be(p, e, r), 0);
116
+ const K = (r) => {
117
+ var n;
118
+ w.current = r, ue(r), (n = A.current) == null || n.call(A, r), (r == null ? void 0 : r.kind) === "access" && setTimeout(() => Fe(h, e, t), 0);
119
119
  };
120
- K(() => {
121
- Q.current = Date.now(), C.current = null, O({}), w.current && T(null);
122
- }, [e, r]);
123
- const m = (t) => {
124
- for (const s of t) p.invalidateQueries({ queryKey: s });
125
- }, D = async (t) => {
126
- let s = null;
120
+ E(() => {
121
+ q.current = Date.now(), C.current = null, O({}), w.current && K(null);
122
+ }, [e, t]);
123
+ const p = (r) => {
124
+ for (const n of r) h.invalidateQueries({ queryKey: n });
125
+ }, D = async (r) => {
126
+ let n = null;
127
127
  try {
128
- s = (await E.request(
129
- F("/trash/record", { collection: e, item: r })
128
+ n = (await Q.request(
129
+ j("/trash/record", { collection: e, item: t })
130
130
  )).data;
131
131
  } catch {
132
- s = null;
132
+ n = null;
133
133
  }
134
- const i = !!(s != null && s.deleted_at) && new Date(s.deleted_at).getTime() >= Q.current - 6e4;
135
- T(i || t === "deleted" && !s ? {
134
+ const i = !!(n != null && n.deleted_at) && new Date(n.deleted_at).getTime() >= q.current - 6e4;
135
+ K(i || r === "deleted" && !n ? {
136
136
  kind: "deleted",
137
- by: (s == null ? void 0 : s.deleted_by_name) ?? null,
138
- at: (s == null ? void 0 : s.deleted_at) ?? (/* @__PURE__ */ new Date()).toISOString(),
139
- trashId: (s == null ? void 0 : s.trash_id) ?? null,
140
- canRestore: !!(s != null && s.can_restore)
137
+ by: (n == null ? void 0 : n.deleted_by_name) ?? null,
138
+ at: (n == null ? void 0 : n.deleted_at) ?? (/* @__PURE__ */ new Date()).toISOString(),
139
+ trashId: (n == null ? void 0 : n.trash_id) ?? null,
140
+ canRestore: !!(n != null && n.can_restore)
141
141
  } : { kind: "access" });
142
- }, oe = async () => {
143
- var t;
142
+ }, le = async () => {
143
+ var r;
144
144
  try {
145
- const s = (await E.request(
146
- F(`/pipelines/instance/${e}/${r}`)
147
- )).data, i = (t = s == null ? void 0 : s.history) == null ? void 0 : t[0];
148
- if (!i || i.id === C.current || i.timestamp && new Date(i.timestamp).getTime() < Q.current - 5e3 || (C.current = i.id, typeof document < "u" && document.visibilityState === "hidden")) return;
149
- const v = [i.first_name, i.last_name].filter(Boolean).join(" ") || i.user_email || null, g = i.to_state_label ?? "a new state", a = De(v, g, z.current);
145
+ const n = (await Q.request(
146
+ j(`/pipelines/instance/${e}/${t}`)
147
+ )).data, i = (r = n == null ? void 0 : n.history) == null ? void 0 : r[0];
148
+ if (!i || i.id === C.current || i.timestamp && new Date(i.timestamp).getTime() < q.current - 5e3 || (C.current = i.id, typeof document < "u" && document.visibilityState === "hidden")) return;
149
+ const f = [i.first_name, i.last_name].filter(Boolean).join(" ") || i.user_email || null, g = i.to_state_label ?? "a new state", a = Ue(f, g, z.current);
150
150
  B.info(
151
151
  a.text,
152
152
  a.open ? { action: { label: "Open", onClick: a.open } } : {}
153
153
  );
154
154
  } catch {
155
155
  }
156
- }, de = (t) => {
157
- var i, v, g, a;
158
- if (t.deleted) {
156
+ }, me = (r) => {
157
+ var i, f, g, a;
158
+ if (r.deleted) {
159
159
  D("deleted");
160
160
  return;
161
161
  }
162
162
  if (w.current) return;
163
- t.events.some((n) => n.source === "import" && !n.own) && (W(!0), S.current && clearTimeout(S.current), S.current = setTimeout(() => W(!1), Ue));
164
- const s = (n) => Se(t, n);
165
- if (s(l.state) && (m([
166
- ["pipeline-instance", e, r],
167
- ["pipeline-all-owners", e, r],
168
- ["pipeline-instance-owners", e, r],
169
- ["pipeline-owners-resolved", e, r],
170
- ["approval-brief", e, r]
171
- ]), (i = t.changedFields) != null && i.includes(l.state) && oe()), s(l.owners) && !s(l.state) && m([
172
- ["pipeline-all-owners", e, r],
173
- ["pipeline-instance-owners", e, r],
174
- ["pipeline-owners-resolved", e, r],
175
- ["approval-brief", e, r]
176
- ]), !(t.aspectsOnly && ((v = t.changedFields) != null && v.every((n) => n === l.owners)))) {
177
- if (s(l.addendums) && m([["addendums", e, r]]), s(l.comments) ? m([
178
- ["comments", e, r],
179
- ["comments-related", e, r]
180
- ]) : (s(l.state) || s(l.integrations) || s(l.addendums) || !t.aspectsOnly) && m([["comments-related", e, r]]), s(l.tasks) && m([["tasks", e, r]]), s(l.integrations) && m([
181
- ["erp-submissions", e, r],
182
- ["record-integrations", e, r]
183
- ]), s(l.files)) {
184
- const n = Oe(e, String(r));
185
- p.invalidateQueries({ predicate: (k) => n(k.queryKey) });
163
+ r.events.some((s) => s.source === "import" && !s.own) && (W(!0), R.current && clearTimeout(R.current), R.current = setTimeout(() => W(!1), je));
164
+ const n = (s) => Te(r, s);
165
+ if (n(m.state) && (p([
166
+ ["pipeline-instance", e, t],
167
+ ["pipeline-all-owners", e, t],
168
+ ["pipeline-instance-owners", e, t],
169
+ ["pipeline-owners-resolved", e, t],
170
+ ["approval-brief", e, t]
171
+ ]), (i = r.changedFields) != null && i.includes(m.state) && le()), n(m.owners) && !n(m.state) && p([
172
+ ["pipeline-all-owners", e, t],
173
+ ["pipeline-instance-owners", e, t],
174
+ ["pipeline-owners-resolved", e, t],
175
+ ["approval-brief", e, t]
176
+ ]), !(r.aspectsOnly && ((f = r.changedFields) != null && f.every((s) => s === m.owners)))) {
177
+ if (n(m.addendums) && p([["addendums", e, t]]), n(m.comments) ? p([
178
+ ["comments", e, t],
179
+ ["comments-related", e, t]
180
+ ]) : (n(m.state) || n(m.integrations) || n(m.addendums) || !r.aspectsOnly) && p([["comments-related", e, t]]), n(m.tasks) && p([["tasks", e, t]]), n(m.integrations) && p([
181
+ ["erp-submissions", e, t],
182
+ ["record-integrations", e, t]
183
+ ]), n(m.files)) {
184
+ const s = De(e, String(t));
185
+ h.invalidateQueries({ predicate: (S) => s(S.queryKey) });
186
186
  }
187
- if (s(l.related)) {
188
- const n = Ce(e, String(r)), k = () => void p.invalidateQueries({ predicate: (U) => n(U.queryKey) });
189
- t.ids.length > 0 && t.ids.every((U) => U === "*") ? (R.current && clearTimeout(R.current), R.current = setTimeout(k, Le())) : k();
187
+ if (n(m.related)) {
188
+ const s = Me(e, String(t)), S = () => void h.invalidateQueries({ predicate: (U) => s(U.queryKey) });
189
+ r.ids.length > 0 && r.ids.every((U) => U === "*") ? (_.current && clearTimeout(_.current), _.current = setTimeout(S, Ce())) : S();
190
190
  }
191
- if (p.invalidateQueries({
192
- predicate: (n) => (n.queryKey[0] === "child-summary" || n.queryKey[0] === "field-lineage") && n.queryKey[1] === e && String(n.queryKey[2]) === String(r)
193
- }), (g = t.changedFields) != null && g.includes(l.related) && p.invalidateQueries({
194
- predicate: (n) => n.queryKey[0] === "o2m-rows" && String(n.queryKey[3]) === String(r)
195
- }), !t.aspectsOnly) {
196
- if (t.ids.length > 0 && t.ids.every((n) => n === "*")) {
197
- m([
198
- ["item", e, r],
199
- ["pipeline-instance", e, r]
191
+ if (h.invalidateQueries({
192
+ predicate: (s) => (s.queryKey[0] === "child-summary" || s.queryKey[0] === "field-lineage") && s.queryKey[1] === e && String(s.queryKey[2]) === String(t)
193
+ }), (g = r.changedFields) != null && g.includes(m.related) && h.invalidateQueries({
194
+ predicate: (s) => s.queryKey[0] === "o2m-rows" && String(s.queryKey[3]) === String(t)
195
+ }), !r.aspectsOnly) {
196
+ if (r.ids.length > 0 && r.ids.every((s) => s === "*")) {
197
+ p([
198
+ ["item", e, t],
199
+ ["pipeline-instance", e, t]
200
200
  ]);
201
201
  return;
202
202
  }
203
- p.invalidateQueries({
204
- predicate: (n) => n.queryKey[0] === "o2m-rows" && String(n.queryKey[3]) === String(r) || n.queryKey[0] === "o2m-compare"
205
- }), se(
203
+ h.invalidateQueries({
204
+ predicate: (s) => s.queryKey[0] === "o2m-rows" && String(s.queryKey[3]) === String(t) || s.queryKey[0] === "o2m-compare"
205
+ }), ae(
206
206
  e,
207
- r,
208
- ((a = t.changedFields) == null ? void 0 : a.filter((n) => !n.startsWith("$"))) ?? null
207
+ t,
208
+ ((a = r.changedFields) == null ? void 0 : a.filter((s) => !s.startsWith("$"))) ?? null
209
209
  ), G(!0);
210
210
  }
211
211
  }
212
- }, G = async (t) => {
213
- m([
214
- ["item", e, r],
212
+ }, G = async (r) => {
213
+ p([
214
+ ["item", e, t],
215
215
  // Summary mode reads its own copy (#1869) — it diffs + highlights.
216
- ["rrv-record", e, r],
217
- ["field-touch", e, r],
218
- ["revisions", e, r]
216
+ ["rrv-record", e, t],
217
+ ["field-touch", e, t],
218
+ ["revisions", e, t]
219
219
  ]);
220
- const s = ["last-touch", e, String(r)];
221
- await p.invalidateQueries({ queryKey: s }).catch(() => {
222
- }), !(!t || Me(p.getQueryData(s), J.current)) && (j(!0), N.current && clearTimeout(N.current), N.current = setTimeout(() => j(!1), 4e3));
220
+ const n = ["last-touch", e, String(t)];
221
+ await h.invalidateQueries({ queryKey: n }).catch(() => {
222
+ });
223
+ const i = h.getQueryData(n);
224
+ if (!r || Be(i, J.current)) return;
225
+ const f = i == null ? void 0 : i.user_name;
226
+ de(typeof f == "string" && f.trim() ? f.trim() : null), F(!0), T.current && clearTimeout(T.current), T.current = setTimeout(() => F(!1), 4e3);
223
227
  };
224
- ke(e, r, de);
225
- const { userId: A } = we(), J = h(A);
226
- J.current = A, Re(A, "saved", e, r, ({ fields: t }) => {
227
- w.current || (t && se(e, String(r), t), G(!1), m([
228
- ["pipeline-instance", e, r],
229
- ["comments", e, r],
230
- ["tasks", e, r],
228
+ Re(e, t, me);
229
+ const { userId: $ } = Se(), J = b($);
230
+ J.current = $, Ke($, "saved", e, t, ({ fields: r }) => {
231
+ w.current || (r && ae(e, String(t), r), G(!1), p([
232
+ ["pipeline-instance", e, t],
233
+ ["comments", e, t],
234
+ ["tasks", e, t],
231
235
  // Lines and links saved with it (the keys are per relation, not per record).
232
236
  ["o2m-rows"],
233
237
  ["m2m-items"]
234
238
  ]));
235
- }), K(
239
+ }), E(
236
240
  () => () => {
237
- N.current && clearTimeout(N.current), S.current && clearTimeout(S.current), R.current && clearTimeout(R.current);
241
+ T.current && clearTimeout(T.current), R.current && clearTimeout(R.current), _.current && clearTimeout(_.current);
238
242
  },
239
243
  []
240
- ), I(
244
+ ), ee(
241
245
  "owners:changed",
242
- (t) => {
243
- w.current || t != null && t.checked || t != null && t.queues || Array.isArray(t == null ? void 0 : t.collections) && !t.collections.includes(e) || m([
244
- ["pipeline-instance-owners", e, r],
245
- ["pipeline-owners-resolved", e, r],
246
- ["pipeline-all-owners", e, r],
247
- ["approval-brief", e, r]
246
+ (r) => {
247
+ w.current || r != null && r.checked || r != null && r.queues || Array.isArray(r == null ? void 0 : r.collections) && !r.collections.includes(e) || p([
248
+ ["pipeline-instance-owners", e, t],
249
+ ["pipeline-owners-resolved", e, t],
250
+ ["pipeline-all-owners", e, t],
251
+ ["approval-brief", e, t]
248
252
  ]);
249
253
  },
250
254
  { debounceMs: 400 }
251
- ), ee(
255
+ ), re(
252
256
  "record:integrity",
253
257
  e,
254
- r,
255
- () => m([["record-integrity", e, r]])
258
+ t,
259
+ () => p([["record-integrity", e, t]])
256
260
  );
257
- const X = h(/* @__PURE__ */ new Map());
258
- ee("record:automation", e, r, (t) => {
259
- const s = String((t == null ? void 0 : t.flow_id) ?? "");
260
- if (!s) return;
261
- const i = X.current, v = i.get(s);
262
- v && clearTimeout(v), i.delete(s);
261
+ const X = b(/* @__PURE__ */ new Map());
262
+ re("record:automation", e, t, (r) => {
263
+ const n = String((r == null ? void 0 : r.flow_id) ?? "");
264
+ if (!n) return;
265
+ const i = X.current, f = i.get(n);
266
+ f && clearTimeout(f), i.delete(n);
263
267
  const g = () => O((a) => {
264
- const { [s]: n, ...k } = a;
265
- return k;
268
+ const { [n]: s, ...S } = a;
269
+ return S;
266
270
  });
267
- if ((t == null ? void 0 : t.state) === "end") {
271
+ if ((r == null ? void 0 : r.state) === "end") {
268
272
  g();
269
273
  return;
270
274
  }
271
- O((a) => ({ ...a, [s]: String((t == null ? void 0 : t.flow_name) || "An automation") })), i.set(s, setTimeout(g, 5 * 6e4));
272
- }), K(() => {
273
- const t = X.current;
275
+ O((a) => ({ ...a, [n]: String((r == null ? void 0 : r.flow_name) || "An automation") })), i.set(n, setTimeout(g, 5 * 6e4));
276
+ }), E(() => {
277
+ const r = X.current;
274
278
  return () => {
275
- for (const s of t.values()) clearTimeout(s);
276
- t.clear();
279
+ for (const n of r.values()) clearTimeout(n);
280
+ r.clear();
277
281
  };
278
- }, []), I(
282
+ }, []), ee(
279
283
  "access:changed",
280
284
  () => {
281
285
  setTimeout(
282
286
  () => {
283
- var t;
284
- ((t = w.current) == null ? void 0 : t.kind) !== "deleted" && E.request(F(`/items/${e}/${r}`, { fields: "id" })).then(() => {
285
- var s;
286
- ((s = w.current) == null ? void 0 : s.kind) === "access" && (T(null), m([["item", e, r]]));
287
- }).catch((s) => {
288
- const i = je(s);
287
+ var r;
288
+ ((r = w.current) == null ? void 0 : r.kind) !== "deleted" && Q.request(j(`/items/${e}/${t}`, { fields: "id" })).then(() => {
289
+ var n;
290
+ ((n = w.current) == null ? void 0 : n.kind) === "access" && (K(null), p([["item", e, t]]));
291
+ }).catch((n) => {
292
+ const i = Ye(n);
289
293
  (i === 403 || i === 404) && D("access");
290
294
  });
291
295
  },
@@ -293,51 +297,51 @@ function ir({
293
297
  );
294
298
  },
295
299
  { debounceMs: 300 }
296
- ), K(() => {
297
- b && !w.current && D("access");
298
- }, [b]);
299
- const Z = Te(e, r, u, A), x = o ? null : _e({ otherDirty: Z.otherDirty, dirty: u });
300
- K(() => {
301
- if (!c) return;
302
- const t = (a) => {
303
- const n = a.detail;
304
- n != null && n.name && (n.collection && (n.collection !== e || String(n.item) !== String(r)) || c.emit("record:uploading", { ...n, collection: e, item: String(r) }));
300
+ ), E(() => {
301
+ v && !w.current && D("access");
302
+ }, [v]);
303
+ const Z = Ee(e, t, c, $), k = o ? null : Qe({ otherDirty: Z.otherDirty, dirty: c });
304
+ E(() => {
305
+ if (!l) return;
306
+ const r = (a) => {
307
+ const s = a.detail;
308
+ s != null && s.name && (s.collection && (s.collection !== e || String(s.item) !== String(t)) || l.emit("record:uploading", { ...s, collection: e, item: String(t) }));
305
309
  };
306
- window.addEventListener(re, t);
307
- const s = (a) => {
308
- (a == null ? void 0 : a.collection) !== e || String(a == null ? void 0 : a.item) !== String(r) || qe(a);
309
- }, i = c.on("record:uploading", s), v = c.on("record:comment", (a) => {
310
- (a == null ? void 0 : a.collection) !== e || String(a == null ? void 0 : a.item) !== String(r) || (p.invalidateQueries({ queryKey: ["comments", e, r] }), p.invalidateQueries({ queryKey: ["comments-related", e, r] }));
311
- }), g = (a) => s(a.detail);
310
+ window.addEventListener(te, r);
311
+ const n = (a) => {
312
+ (a == null ? void 0 : a.collection) !== e || String(a == null ? void 0 : a.item) !== String(t) || $e(a);
313
+ }, i = l.on("record:uploading", n), f = l.on("record:comment", (a) => {
314
+ (a == null ? void 0 : a.collection) !== e || String(a == null ? void 0 : a.item) !== String(t) || (h.invalidateQueries({ queryKey: ["comments", e, t] }), h.invalidateQueries({ queryKey: ["comments-related", e, t] }));
315
+ }), g = (a) => n(a.detail);
312
316
  return window.addEventListener("nvr:record-uploading", g), () => {
313
- window.removeEventListener(re, t), window.removeEventListener("nvr:record-uploading", g), i(), v();
317
+ window.removeEventListener(te, r), window.removeEventListener("nvr:record-uploading", g), i(), f();
314
318
  };
315
- }, [c, e, r, p]);
316
- const ue = async () => {
319
+ }, [l, e, t, h]);
320
+ const pe = async () => {
317
321
  if (o != null && o.trashId) {
318
322
  Y(!0);
319
323
  try {
320
- await E.request(xe(`/trash/${o.trashId}/restore`, {})), T(null), Q.current = Date.now(), m([["item", e, r]]), B.success("Record restored");
321
- } catch (t) {
322
- B.error(Ke(t, "Restore failed"));
324
+ await Q.request(Ne(`/trash/${o.trashId}/restore`, {})), K(null), q.current = Date.now(), p([["item", e, t]]), B.success("Record restored");
325
+ } catch (r) {
326
+ B.error(qe(r, "Restore failed"));
323
327
  } finally {
324
328
  Y(!1);
325
329
  }
326
330
  }
327
- }, M = Object.values(ie);
328
- return !o && M.length === 0 && !x && !V && (!c || !$ && L.length === 0) ? null : /* @__PURE__ */ f("div", { className: "space-y-2", children: [
329
- (o == null ? void 0 : o.kind) === "deleted" && /* @__PURE__ */ f(
331
+ }, M = Object.values(ce);
332
+ return !o && M.length === 0 && !k && !V && (!l || !L && x.length === 0) ? null : /* @__PURE__ */ u("div", { className: "space-y-2", children: [
333
+ (o == null ? void 0 : o.kind) === "deleted" && /* @__PURE__ */ u(
330
334
  "div",
331
335
  {
332
336
  "data-record-gone": "deleted",
333
337
  role: "alert",
334
338
  className: "flex items-center gap-3 rounded-lg border border-rose-300 bg-rose-50 px-3.5 py-2.5 dark:border-rose-500/40 dark:bg-rose-500/10",
335
339
  children: [
336
- /* @__PURE__ */ d(fe, { className: "h-4 w-4 shrink-0 text-rose-500" }),
337
- /* @__PURE__ */ f("p", { className: "min-w-0 flex-1 text-[12px] text-rose-800 dark:text-rose-300", children: [
340
+ /* @__PURE__ */ d(ge, { className: "h-4 w-4 shrink-0 text-rose-500" }),
341
+ /* @__PURE__ */ u("p", { className: "min-w-0 flex-1 text-[12px] text-rose-800 dark:text-rose-300", children: [
338
342
  /* @__PURE__ */ d("span", { className: "font-semibold", children: "This record was deleted" }),
339
343
  o.by ? ` by ${o.by}` : "",
340
- o.at ? ` ${Ae(o.at)}` : "",
344
+ o.at ? ` ${Le(o.at)}` : "",
341
345
  ". Saving is turned off",
342
346
  o.canRestore ? " — restore it to keep working." : "."
343
347
  ] }),
@@ -345,7 +349,7 @@ function ir({
345
349
  "button",
346
350
  {
347
351
  type: "button",
348
- onClick: () => void ue(),
352
+ onClick: () => void pe(),
349
353
  disabled: P,
350
354
  className: "h-7 shrink-0 rounded-md border border-rose-300 bg-white px-2.5 text-[11.5px] font-medium text-rose-700 hover:bg-rose-100 disabled:opacity-50 dark:border-rose-500/40 dark:bg-transparent dark:text-rose-300 dark:hover:bg-rose-500/10",
351
355
  children: P ? "Restoring…" : "Restore"
@@ -354,28 +358,28 @@ function ir({
354
358
  ]
355
359
  }
356
360
  ),
357
- (o == null ? void 0 : o.kind) === "access" && !y && /* @__PURE__ */ d(Fe, { onBack: () => window.history.back() }),
358
- x && /* @__PURE__ */ f(
361
+ (o == null ? void 0 : o.kind) === "access" && !y && /* @__PURE__ */ d(Pe, { onBack: () => window.history.back() }),
362
+ k && /* @__PURE__ */ u(
359
363
  "p",
360
364
  {
361
- "data-record-other-tab": x.tone,
365
+ "data-record-other-tab": k.tone,
362
366
  role: "status",
363
- className: te(
367
+ className: se(
364
368
  "flex flex-wrap items-center gap-x-2 gap-y-0.5 px-0.5 text-[11.5px] leading-5",
365
- x.tone === "both" ? "text-amber-800 dark:text-amber-300" : "text-muted-foreground"
369
+ k.tone === "both" ? "text-amber-800 dark:text-amber-300" : "text-muted-foreground"
366
370
  ),
367
371
  children: [
368
372
  /* @__PURE__ */ d(
369
- pe,
373
+ be,
370
374
  {
371
- className: te(
375
+ className: se(
372
376
  "h-3.5 w-3.5 shrink-0",
373
- x.tone === "both" ? "text-amber-500" : "text-muted-foreground/70"
377
+ k.tone === "both" ? "text-amber-500" : "text-muted-foreground/70"
374
378
  ),
375
379
  "aria-hidden": !0
376
380
  }
377
381
  ),
378
- /* @__PURE__ */ d("span", { className: "min-w-0", children: x.text }),
382
+ /* @__PURE__ */ d("span", { className: "min-w-0", children: k.text }),
379
383
  /* @__PURE__ */ d(
380
384
  "button",
381
385
  {
@@ -388,32 +392,32 @@ function ir({
388
392
  ]
389
393
  }
390
394
  ),
391
- V && !o && /* @__PURE__ */ f(
395
+ V && !o && /* @__PURE__ */ u(
392
396
  "div",
393
397
  {
394
398
  "data-record-importing": !0,
395
399
  role: "status",
396
400
  className: "flex items-center gap-3 rounded-lg border border-amber-300 bg-amber-50 px-3.5 py-2.5 dark:border-amber-500/40 dark:bg-amber-500/10",
397
401
  children: [
398
- /* @__PURE__ */ d(ye, { className: "h-4 w-4 shrink-0 animate-pulse text-amber-500" }),
399
- /* @__PURE__ */ f("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", children: [
402
+ /* @__PURE__ */ d(ve, { className: "h-4 w-4 shrink-0 animate-pulse text-amber-500" }),
403
+ /* @__PURE__ */ u("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", children: [
400
404
  /* @__PURE__ */ d("span", { className: "font-semibold", children: "An import is updating this record" }),
401
405
  " — the changed fields refresh here as it goes.",
402
- u ? " Your unsaved edits may be out of date; check them before saving." : ""
406
+ c ? " Your unsaved edits may be out of date; check them before saving." : ""
403
407
  ] })
404
408
  ]
405
409
  }
406
410
  ),
407
- !o && /* @__PURE__ */ d($e, { collection: e, scope: "record" }),
408
- M.length > 0 && !o && /* @__PURE__ */ f(
411
+ !o && /* @__PURE__ */ d(Oe, { collection: e, scope: "record" }),
412
+ M.length > 0 && !o && /* @__PURE__ */ u(
409
413
  "div",
410
414
  {
411
415
  "data-record-automation": !0,
412
416
  role: "status",
413
417
  className: "flex items-center gap-3 rounded-lg border border-nvr-cyan/40 bg-nvr-cyan/10 px-3.5 py-2.5",
414
418
  children: [
415
- /* @__PURE__ */ d(ge, { className: "h-4 w-4 shrink-0 animate-pulse text-nvr-cyan" }),
416
- /* @__PURE__ */ f("p", { className: "min-w-0 flex-1 text-[12px] text-[#0e7490] dark:text-slate-200", children: [
419
+ /* @__PURE__ */ d(xe, { className: "h-4 w-4 shrink-0 animate-pulse text-nvr-cyan" }),
420
+ /* @__PURE__ */ u("p", { className: "min-w-0 flex-1 text-[12px] text-[#0e7490] dark:text-slate-200", children: [
417
421
  /* @__PURE__ */ d("span", { className: "font-semibold", children: "Automation is updating this record" }),
418
422
  " —",
419
423
  " ",
@@ -423,32 +427,80 @@ function ir({
423
427
  ]
424
428
  }
425
429
  ),
426
- c && ($ || L.length > 0) && /* @__PURE__ */ f("div", { className: "flex flex-wrap items-center gap-2", children: [
427
- $ && /* @__PURE__ */ f("span", { className: "inline-flex items-center gap-1.5 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/10 px-2.5 py-0.5 text-[11px] font-medium text-[#0e7490] dark:text-slate-200", children: [
428
- /* @__PURE__ */ d("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-nvr-cyan" }),
429
- "Updated just now by someone else"
430
- ] }),
431
- L.map((t) => /* @__PURE__ */ f(
430
+ l && (L || x.length > 0) && /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-2", children: [
431
+ L && /* @__PURE__ */ u(
432
432
  "span",
433
433
  {
434
- "data-remote-upload-chip": t.key,
435
- className: "inline-flex items-center gap-1.5 rounded-full border border-slate-200 bg-white px-2.5 py-0.5 text-[11px] text-slate-600 dark:border-border dark:bg-card dark:text-slate-300",
434
+ "data-record-updated-by": !0,
435
+ className: "inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-md border border-nvr-cyan/40 bg-nvr-cyan/10 px-2.5 py-0.5 text-[11px] font-medium text-[#0e7490] dark:text-slate-200",
436
436
  children: [
437
- /* @__PURE__ */ d(he, { className: "h-3 w-3 animate-pulse text-nvr-cyan motion-reduce:animate-none" }),
438
- Qe(t)
437
+ /* @__PURE__ */ d("span", { className: "h-1.5 w-1.5 shrink-0 animate-pulse rounded-full bg-nvr-cyan" }),
438
+ /* @__PURE__ */ u("span", { className: "min-w-0", children: [
439
+ "Updated just now by ",
440
+ oe ?? "someone else"
441
+ ] })
439
442
  ]
440
- },
441
- t.key
442
- ))
443
+ }
444
+ ),
445
+ (x.length > 2 ? [] : x).map((r) => {
446
+ const n = ne({ ...r, pct: null });
447
+ return /* @__PURE__ */ u(
448
+ "span",
449
+ {
450
+ "data-remote-upload-chip": r.key,
451
+ "data-tip": n,
452
+ className: "inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-full border border-slate-200 bg-white px-2.5 py-0.5 text-[11px] text-slate-600 dark:border-border dark:bg-card dark:text-slate-300",
453
+ children: [
454
+ /* @__PURE__ */ d(
455
+ I,
456
+ {
457
+ className: "h-3 w-3 shrink-0 text-cyan-700 dark:text-nvr-cyan",
458
+ "aria-hidden": !0
459
+ }
460
+ ),
461
+ /* @__PURE__ */ d("span", { className: "min-w-0 truncate", children: n }),
462
+ r.pct != null && r.pct > 0 && r.pct < 100 && /* @__PURE__ */ u("span", { className: "shrink-0 tabular-nums text-slate-500 dark:text-slate-400", children: [
463
+ r.pct,
464
+ "%"
465
+ ] })
466
+ ]
467
+ },
468
+ r.key
469
+ );
470
+ }),
471
+ x.length > 2 && /* @__PURE__ */ u(
472
+ "span",
473
+ {
474
+ "data-remote-upload-chip": "many",
475
+ "data-tip": x.map((r) => ne(r)).join(`
476
+ `),
477
+ className: "inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-full border border-slate-200 bg-white px-2.5 py-0.5 text-[11px] text-slate-600 dark:border-border dark:bg-card dark:text-slate-300",
478
+ children: [
479
+ /* @__PURE__ */ d(
480
+ I,
481
+ {
482
+ className: "h-3 w-3 shrink-0 text-cyan-700 dark:text-nvr-cyan",
483
+ "aria-hidden": !0
484
+ }
485
+ ),
486
+ /* @__PURE__ */ u("span", { className: "min-w-0 truncate", children: [
487
+ x.length,
488
+ " uploads in progress ·",
489
+ " ",
490
+ [...new Set(x.map((r) => r.user))].join(", ")
491
+ ] })
492
+ ]
493
+ }
494
+ )
443
495
  ] })
444
496
  ] });
445
497
  }
446
498
  export {
447
- ne as RECORD_QUERY_HEADS,
448
- Fe as RecordAccessLostPanel,
449
- ir as RecordLiveSync,
450
- ar as invalidateRecordQueries,
451
- De as moveNotice,
452
- Be as purgeRecordQueries,
453
- Me as writtenBySelf
499
+ ie as RECORD_QUERY_HEADS,
500
+ Pe as RecordAccessLostPanel,
501
+ dr as RecordLiveSync,
502
+ or as invalidateRecordQueries,
503
+ Ue as moveNotice,
504
+ Fe as purgeRecordQueries,
505
+ Be as writtenBySelf
454
506
  };