@nivaro/react 0.3.114 → 0.3.115

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 (281) hide show
  1. package/dist/components/ScreenShareHost.js +24 -0
  2. package/dist/full.css +50 -2
  3. package/dist/hooks/useSessionRecorder.js +61 -60
  4. package/dist/index.d.ts +1717 -21
  5. package/dist/index.js +1091 -950
  6. package/dist/shared/components/ActivityEntry.js +209 -97
  7. package/dist/shared/components/AgentPresenceChip.js +51 -0
  8. package/dist/shared/components/AnnouncementBanner.js +56 -41
  9. package/dist/shared/components/AutolinkedText.js +98 -85
  10. package/dist/shared/components/BroadcastView.js +149 -141
  11. package/dist/shared/components/CacheStamp.js +78 -30
  12. package/dist/shared/components/CollectionBrowserView.js +4088 -3592
  13. package/dist/shared/components/ConfigChangeStrip.js +63 -0
  14. package/dist/shared/components/ConfigReachNote.js +107 -0
  15. package/dist/shared/components/ConformanceView.js +389 -319
  16. package/dist/shared/components/DataTable.js +1 -0
  17. package/dist/shared/components/DelegateCoverLine.js +164 -0
  18. package/dist/shared/components/EnvironmentNotice.js +56 -65
  19. package/dist/shared/components/FilePreviewLightbox.js +89 -43
  20. package/dist/shared/components/FindingFixedMark.js +23 -0
  21. package/dist/shared/components/GridPresenceLine.js +100 -0
  22. package/dist/shared/components/IdleReloadWatcher.js +82 -43
  23. package/dist/shared/components/InStep.js +46 -0
  24. package/dist/shared/components/ItemEditForm.js +5504 -4889
  25. package/dist/shared/components/LiveAnnouncer.js +62 -0
  26. package/dist/shared/components/LiveCount.js +54 -0
  27. package/dist/shared/components/LiveFigure.js +28 -0
  28. package/dist/shared/components/LiveListControls.js +114 -0
  29. package/dist/shared/components/LiveNewMatchesPill.js +25 -0
  30. package/dist/shared/components/LiveOffNote.js +44 -0
  31. package/dist/shared/components/LivePreferenceHost.js +42 -0
  32. package/dist/shared/components/LiveRowMark.js +25 -20
  33. package/dist/shared/components/LiveTraceView.js +257 -0
  34. package/dist/shared/components/MapView.js +30 -29
  35. package/dist/shared/components/MatrixEditor.js +497 -462
  36. package/dist/shared/components/MyWorkView.js +346 -272
  37. package/dist/shared/components/NotificationBell.js +215 -201
  38. package/dist/shared/components/PageRenderer.js +636 -599
  39. package/dist/shared/components/PresenceDot.js +21 -0
  40. package/dist/shared/components/ProfileView.js +656 -536
  41. package/dist/shared/components/RealtimeStatusBanner.js +25 -25
  42. package/dist/shared/components/RecentRecordsRail.js +51 -48
  43. package/dist/shared/components/RecordCompare.js +241 -150
  44. package/dist/shared/components/RecordDrilldownSheet.js +66 -64
  45. package/dist/shared/components/RecordGridEditor.js +350 -311
  46. package/dist/shared/components/RecordHoverCard.js +147 -0
  47. package/dist/shared/components/RecordPeekHost.js +111 -0
  48. package/dist/shared/components/RecordReadView.js +414 -412
  49. package/dist/shared/components/RelativeTime.js +16 -0
  50. package/dist/shared/components/ReportView.js +1396 -1304
  51. package/dist/shared/components/ScreenRefreshButton.js +77 -0
  52. package/dist/shared/components/TabCountHost.js +10 -0
  53. package/dist/shared/components/TickerNumber.js +19 -18
  54. package/dist/shared/components/TipLayer.js +70 -58
  55. package/dist/shared/components/WidgetImageMenu.js +59 -0
  56. package/dist/shared/components/WidgetSlot.js +571 -524
  57. package/dist/shared/components/activity/RecordActivityStream.js +317 -0
  58. package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
  59. package/dist/shared/components/cbv/approval-changed.js +20 -0
  60. package/dist/shared/components/cbv/changed-by-others.js +251 -0
  61. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  62. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  63. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  65. package/dist/shared/components/change-proposals/types.js +4 -0
  66. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  67. package/dist/shared/components/chat/Composer.js +276 -298
  68. package/dist/shared/components/chat/room-due.js +13 -0
  69. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  70. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  71. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  72. package/dist/shared/components/imports/ImportConsole.js +159 -155
  73. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  74. package/dist/shared/components/integrations/SendStatus.js +202 -0
  75. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  76. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  77. package/dist/shared/components/integrations/console/api.js +161 -117
  78. package/dist/shared/components/integrations/console/tone.js +15 -12
  79. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  80. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  81. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  82. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  83. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  84. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  85. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  86. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  87. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  88. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  89. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  90. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  91. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  92. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  93. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  94. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  95. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  96. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  97. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  98. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  99. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  100. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  101. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  102. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  103. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  104. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  105. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  106. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  107. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  108. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  109. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  110. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  111. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  112. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  113. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  114. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  115. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  116. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  117. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  118. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  119. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  120. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  121. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  122. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  123. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  124. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  125. package/dist/shared/components/item-edit/file-live.js +77 -0
  126. package/dist/shared/components/item-edit/file-processing.js +87 -0
  127. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  128. package/dist/shared/components/item-edit/live-related.js +23 -0
  129. package/dist/shared/components/item-edit/live-title.js +66 -0
  130. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  131. package/dist/shared/components/item-edit/removed-line.js +58 -0
  132. package/dist/shared/components/item-edit/render-stability.js +70 -59
  133. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  134. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  135. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  136. package/dist/shared/components/list/InlineEdit.js +504 -208
  137. package/dist/shared/components/list/ListViewers.js +81 -0
  138. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  139. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  140. package/dist/shared/components/merge/merge-values.js +110 -0
  141. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  142. package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
  143. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  144. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  145. package/dist/shared/components/notifications/bundles.js +21 -19
  146. package/dist/shared/components/notifications/resolved-line.js +25 -0
  147. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  148. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  149. package/dist/shared/components/panels/AlertBanners.js +132 -0
  150. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  151. package/dist/shared/components/panels/BranchLanes.js +82 -54
  152. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  153. package/dist/shared/components/panels/CommentImages.js +219 -0
  154. package/dist/shared/components/panels/CommentPanel.js +649 -530
  155. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  156. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  157. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  158. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  159. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  160. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  161. package/dist/shared/components/panels/SlaClock.js +130 -99
  162. package/dist/shared/components/panels/TaskPanel.js +308 -287
  163. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  164. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  165. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  166. package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
  167. package/dist/shared/components/profile/AgentNameField.js +141 -0
  168. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  169. package/dist/shared/components/profile/PersonAccess.js +398 -330
  170. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  171. package/dist/shared/components/profile/PersonProfile.js +81 -73
  172. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  173. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  174. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  175. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  176. package/dist/shared/components/queue/QueueWorklist.js +1927 -1635
  177. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  178. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  179. package/dist/shared/components/support/ReportProblem.js +1 -0
  180. package/dist/shared/components/support/ScreenShare.js +554 -0
  181. package/dist/shared/components/support/SupportView.js +160 -129
  182. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  183. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  184. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  185. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  186. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  187. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  188. package/dist/shared/lib/activity-sentence.js +87 -75
  189. package/dist/shared/lib/agent-presence.js +46 -0
  190. package/dist/shared/lib/approval-progress.js +49 -0
  191. package/dist/shared/lib/attention-prefs.js +27 -0
  192. package/dist/shared/lib/cell-locks.js +56 -0
  193. package/dist/shared/lib/co-edit.js +166 -0
  194. package/dist/shared/lib/coedit-registry.js +44 -0
  195. package/dist/shared/lib/comment-awareness.js +124 -0
  196. package/dist/shared/lib/comment-images.js +45 -0
  197. package/dist/shared/lib/config-watch.js +94 -0
  198. package/dist/shared/lib/copy-rules.js +65 -0
  199. package/dist/shared/lib/count-step.js +30 -0
  200. package/dist/shared/lib/deadline-ticker.js +68 -0
  201. package/dist/shared/lib/derived-causes.js +115 -0
  202. package/dist/shared/lib/draft-store.js +114 -85
  203. package/dist/shared/lib/error-hints.js +1 -0
  204. package/dist/shared/lib/field-merge.js +126 -0
  205. package/dist/shared/lib/filter-sentence.js +10 -10
  206. package/dist/shared/lib/focus-mode.js +16 -12
  207. package/dist/shared/lib/grid-cursors.js +77 -0
  208. package/dist/shared/lib/grid-presence.js +182 -0
  209. package/dist/shared/lib/idle-reload.js +100 -73
  210. package/dist/shared/lib/in-step.js +45 -0
  211. package/dist/shared/lib/integration-chip.js +19 -18
  212. package/dist/shared/lib/line-locks.js +141 -0
  213. package/dist/shared/lib/line-split.js +41 -0
  214. package/dist/shared/lib/linked-changes.js +150 -0
  215. package/dist/shared/lib/list-return.js +231 -0
  216. package/dist/shared/lib/list-viewers.js +52 -0
  217. package/dist/shared/lib/live-announcer.js +86 -0
  218. package/dist/shared/lib/live-counts.js +85 -0
  219. package/dist/shared/lib/live-data-changed.js +108 -0
  220. package/dist/shared/lib/live-deltas.js +81 -0
  221. package/dist/shared/lib/live-findings.js +113 -0
  222. package/dist/shared/lib/live-groups.js +122 -0
  223. package/dist/shared/lib/live-link-labels.js +162 -0
  224. package/dist/shared/lib/live-list-flow.js +334 -0
  225. package/dist/shared/lib/live-list.js +143 -129
  226. package/dist/shared/lib/live-moves.js +51 -0
  227. package/dist/shared/lib/live-ops.js +26 -26
  228. package/dist/shared/lib/live-pickers.js +7 -0
  229. package/dist/shared/lib/live-preference.js +184 -0
  230. package/dist/shared/lib/live-queries.js +226 -181
  231. package/dist/shared/lib/live-screen.js +333 -0
  232. package/dist/shared/lib/live-search.js +108 -0
  233. package/dist/shared/lib/live-seen.js +35 -0
  234. package/dist/shared/lib/live-views.js +100 -0
  235. package/dist/shared/lib/live.js +159 -133
  236. package/dist/shared/lib/missed-updates.js +198 -0
  237. package/dist/shared/lib/newer-file.js +56 -0
  238. package/dist/shared/lib/notification-sound.js +42 -20
  239. package/dist/shared/lib/own-writes.js +59 -41
  240. package/dist/shared/lib/picker-badges.js +94 -0
  241. package/dist/shared/lib/presence-signals.js +131 -84
  242. package/dist/shared/lib/realtime.js +49 -24
  243. package/dist/shared/lib/record-gaps.js +85 -0
  244. package/dist/shared/lib/record-outbox.js +369 -222
  245. package/dist/shared/lib/record-peek.js +75 -0
  246. package/dist/shared/lib/record-tabs.js +92 -72
  247. package/dist/shared/lib/relative-ticker.js +42 -0
  248. package/dist/shared/lib/request-gate.js +119 -119
  249. package/dist/shared/lib/rollup-recalc.js +107 -0
  250. package/dist/shared/lib/room-gaps.js +40 -36
  251. package/dist/shared/lib/rum.js +137 -87
  252. package/dist/shared/lib/save-progress.js +20 -0
  253. package/dist/shared/lib/scheduled-countdown.js +67 -0
  254. package/dist/shared/lib/screen-refresh.js +160 -0
  255. package/dist/shared/lib/screen-share.js +234 -0
  256. package/dist/shared/lib/seen-since.js +74 -0
  257. package/dist/shared/lib/selection-watch.js +205 -0
  258. package/dist/shared/lib/send-status.js +132 -0
  259. package/dist/shared/lib/send-view.js +23 -0
  260. package/dist/shared/lib/socket-liveness.js +155 -0
  261. package/dist/shared/lib/socket-realtime.js +168 -140
  262. package/dist/shared/lib/state-census.js +53 -0
  263. package/dist/shared/lib/summary-mode.js +61 -39
  264. package/dist/shared/lib/tab-attention.js +143 -32
  265. package/dist/shared/lib/table-density.js +64 -0
  266. package/dist/shared/lib/track-travel.js +40 -0
  267. package/dist/shared/lib/unseen-changes.js +68 -0
  268. package/dist/shared/lib/upload-file.js +33 -0
  269. package/dist/shared/lib/upload-presence.js +127 -0
  270. package/dist/shared/lib/urgent-chime.js +65 -0
  271. package/dist/shared/lib/use-online-users.js +32 -11
  272. package/dist/shared/lib/user-sync.js +155 -39
  273. package/dist/shared/lib/waiting-count.js +44 -0
  274. package/dist/shared/lib/watch-desktop.js +83 -0
  275. package/dist/shared/lib/watch-list.js +447 -0
  276. package/dist/shared/lib/widget-image-render.js +64 -0
  277. package/dist/shared/lib/widget-image.js +111 -0
  278. package/dist/shared/lib/worker-socket.js +130 -104
  279. package/dist/shared/lib/write-to-screen.js +133 -0
  280. package/package.json +1 -1
  281. package/styles.css +49 -1
@@ -1,32 +1,34 @@
1
- import { jsx as d, jsxs as m } from "react/jsx-runtime";
1
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
2
2
  import { useQueryClient as ce } from "@tanstack/react-query";
3
- import { EyeOff as me, ArrowLeft as le, Trash2 as pe, Copy as fe, FileUp as be, Bot as he, UploadCloud as ge } from "lucide-react";
4
- import { useState as w, useRef as v, useEffect as k } from "react";
5
- import { toast as O } from "sonner";
6
- import { useNivaroClient as ve, useRecordSurface as ye, useItemEditAuth as xe } from "../../context.js";
7
- import { get as U, post as we } from "../../lib/commands.js";
8
- import { useLiveRecord as ke, useLiveEvent as ee, useLiveRecordEvent as re, LIVE_ASPECTS as y, batchTouches as Se } from "../../lib/live.js";
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";
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
9
  import { useOptionalRealtime as Ne } from "../../lib/realtime.js";
10
- import { useRecordTabsSignal as Re, useRecordTabs as Te } from "../../lib/record-tabs.js";
11
- import { userErrorMessage as _e } from "../../lib/safe-error.js";
12
- import { formatRelative as $e } from "../../lib/utils.js";
13
- import { CollectionImportBanner as Ke } from "../CollectionImportBanner.js";
14
- import { markLiveRecordWrite as Ee } from "./live-record-marks.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";
15
17
  function De(e, r, u) {
16
- var p;
18
+ var y;
17
19
  if (u.active)
18
20
  return { text: e ? `${e} moved this to ${r}` : `This record moved to ${r}` };
19
- const f = ((p = u.label) == null ? void 0 : p.trim()) || "A record in your tabs";
21
+ const b = ((y = u.label) == null ? void 0 : y.trim()) || "A record in your tabs";
20
22
  return {
21
- text: e ? `${e} moved ${f} to ${r}` : `${f} moved to ${r}`,
23
+ text: e ? `${e} moved ${b} to ${r}` : `${b} moved to ${r}`,
22
24
  open: u.open
23
25
  };
24
26
  }
25
- function Qe(e, r) {
27
+ function Me(e, r) {
26
28
  const u = e == null ? void 0 : e.user_id;
27
29
  return typeof u == "string" && !!r && u.toUpperCase() === String(r).toUpperCase();
28
30
  }
29
- const qe = 8e3, te = [
31
+ const Ue = 8e3, ne = [
30
32
  "item",
31
33
  "rrv-record",
32
34
  "revisions",
@@ -42,40 +44,44 @@ const qe = 8e3, te = [
42
44
  "pipeline-instance-owners",
43
45
  "pipeline-owners-resolved",
44
46
  "approval-brief",
47
+ // rt8 #12: what changed since a send back.
48
+ "resubmission",
45
49
  "erp-submissions",
46
50
  "record-integrations",
47
51
  "record-integrity",
48
52
  // Per-state extension actions (Push to Fusion): someone else's move changes them (army 11 F-12).
49
53
  "item-actions",
50
- "ext-item-actions"
54
+ "ext-item-actions",
55
+ // The SLA clock (SlaClock.tsx slaStatusKey).
56
+ "sla-breach"
51
57
  ];
52
- function Ce(e, r, u) {
53
- const f = new Set(te), p = String(u);
58
+ function Be(e, r, u) {
59
+ const b = new Set(ne), y = String(u);
54
60
  e.removeQueries({
55
- predicate: (c) => f.has(c.queryKey[0]) && c.queryKey[1] === r && String(c.queryKey[2]) === p
61
+ predicate: (c) => b.has(c.queryKey[0]) && c.queryKey[1] === r && String(c.queryKey[2]) === y
56
62
  });
57
63
  }
58
- function Xe(e, r, u) {
64
+ function ar(e, r, u) {
59
65
  if (!r || u.length === 0) return;
60
- const f = new Set(te), p = new Set(u.map(String));
66
+ const b = new Set(ne), y = new Set(u.map(String));
61
67
  e.invalidateQueries({
62
- predicate: (c) => f.has(c.queryKey[0]) && c.queryKey[1] === r && p.has(String(c.queryKey[2]))
68
+ predicate: (c) => b.has(c.queryKey[0]) && c.queryKey[1] === r && y.has(String(c.queryKey[2]))
63
69
  });
64
70
  }
65
- function Le({ onBack: e }) {
66
- return /* @__PURE__ */ d("div", { className: "p-6", children: /* @__PURE__ */ m(
71
+ function Fe({ onBack: e }) {
72
+ return /* @__PURE__ */ d("div", { className: "p-6", children: /* @__PURE__ */ f(
67
73
  "div",
68
74
  {
69
75
  "data-record-gone": "access",
70
76
  role: "alert",
71
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",
72
78
  children: [
73
- /* @__PURE__ */ d(me, { className: "h-4 w-4 shrink-0 text-amber-500" }),
74
- /* @__PURE__ */ m("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", 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: [
75
81
  /* @__PURE__ */ d("span", { className: "font-semibold", children: "You no longer have access to this record." }),
76
82
  " A role, scope or filter change hid it while you had it open."
77
83
  ] }),
78
- /* @__PURE__ */ m(
84
+ /* @__PURE__ */ f(
79
85
  "button",
80
86
  {
81
87
  type: "button",
@@ -83,7 +89,7 @@ function Le({ onBack: e }) {
83
89
  "data-record-gone-back": !0,
84
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",
85
91
  children: [
86
- /* @__PURE__ */ d(le, { className: "h-3.5 w-3.5" }),
92
+ /* @__PURE__ */ d(me, { className: "h-3.5 w-3.5" }),
87
93
  "Back"
88
94
  ]
89
95
  }
@@ -92,116 +98,133 @@ function Le({ onBack: e }) {
92
98
  }
93
99
  ) });
94
100
  }
95
- const Ae = (e) => {
101
+ const je = (e) => {
96
102
  var r;
97
103
  return (e == null ? void 0 : e.status) ?? ((r = e == null ? void 0 : e.response) == null ? void 0 : r.status);
98
104
  };
99
- function Ze({
105
+ function ir({
100
106
  collection: e,
101
107
  itemId: r,
102
108
  dirty: u = !1,
103
- loadDenied: f = !1,
104
- onGoneChange: p
109
+ loadDenied: b = !1,
110
+ onGoneChange: y
105
111
  }) {
106
- const c = Ne(), T = ve(), b = ce(), [D, B] = w(!1), [Q, se] = w([]), [i, ae] = w(null), [ne, q] = w({}), [j, F] = w(!1), [P, Y] = w(!1), S = v(null), N = v(null), _ = v(Date.now()), C = v(null), $ = v(p);
107
- $.current = p;
108
- const x = v(null), W = ye(), H = v(W);
109
- H.current = W;
110
- const R = (s) => {
111
- var t;
112
- x.current = s, ae(s), (t = $.current) == null || t.call($, s), (s == null ? void 0 : s.kind) === "access" && setTimeout(() => Ce(b, e, r), 0);
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);
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);
113
119
  };
114
- k(() => {
115
- _.current = Date.now(), C.current = null, q({}), x.current && R(null);
120
+ K(() => {
121
+ Q.current = Date.now(), C.current = null, O({}), w.current && T(null);
116
122
  }, [e, r]);
117
- const l = (s) => {
118
- for (const t of s) b.invalidateQueries({ queryKey: t });
119
- }, L = async (s) => {
120
- let t = null;
123
+ const m = (t) => {
124
+ for (const s of t) p.invalidateQueries({ queryKey: s });
125
+ }, D = async (t) => {
126
+ let s = null;
121
127
  try {
122
- t = (await T.request(
123
- U("/trash/record", { collection: e, item: r })
128
+ s = (await E.request(
129
+ F("/trash/record", { collection: e, item: r })
124
130
  )).data;
125
131
  } catch {
126
- t = null;
132
+ s = null;
127
133
  }
128
- const o = !!(t != null && t.deleted_at) && new Date(t.deleted_at).getTime() >= _.current - 6e4;
129
- R(o || s === "deleted" && !t ? {
134
+ const i = !!(s != null && s.deleted_at) && new Date(s.deleted_at).getTime() >= Q.current - 6e4;
135
+ T(i || t === "deleted" && !s ? {
130
136
  kind: "deleted",
131
- by: (t == null ? void 0 : t.deleted_by_name) ?? null,
132
- at: (t == null ? void 0 : t.deleted_at) ?? (/* @__PURE__ */ new Date()).toISOString(),
133
- trashId: (t == null ? void 0 : t.trash_id) ?? null,
134
- canRestore: !!(t != null && t.can_restore)
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)
135
141
  } : { kind: "access" });
136
142
  }, oe = async () => {
137
- var s;
143
+ var t;
138
144
  try {
139
- const t = (await T.request(
140
- U(`/pipelines/instance/${e}/${r}`)
141
- )).data, o = (s = t == null ? void 0 : t.history) == null ? void 0 : s[0];
142
- if (!o || o.id === C.current || o.timestamp && new Date(o.timestamp).getTime() < _.current - 5e3 || (C.current = o.id, typeof document < "u" && document.visibilityState === "hidden")) return;
143
- const h = [o.first_name, o.last_name].filter(Boolean).join(" ") || o.user_email || null, n = o.to_state_label ?? "a new state", a = De(h, n, H.current);
144
- O.info(
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);
150
+ B.info(
145
151
  a.text,
146
152
  a.open ? { action: { label: "Open", onClick: a.open } } : {}
147
153
  );
148
154
  } catch {
149
155
  }
150
- }, ie = (s) => {
151
- var o, h;
152
- if (s.deleted) {
153
- L("deleted");
156
+ }, de = (t) => {
157
+ var i, v, g, a;
158
+ if (t.deleted) {
159
+ D("deleted");
154
160
  return;
155
161
  }
156
- if (x.current) return;
157
- s.events.some((n) => n.source === "import" && !n.own) && (Y(!0), S.current && clearTimeout(S.current), S.current = setTimeout(() => Y(!1), qe));
158
- const t = (n) => Se(s, n);
159
- if (t(y.state) && (l([
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([
160
166
  ["pipeline-instance", e, r],
161
167
  ["pipeline-all-owners", e, r],
162
168
  ["pipeline-instance-owners", e, r],
163
169
  ["pipeline-owners-resolved", e, r],
164
170
  ["approval-brief", e, r]
165
- ]), (o = s.changedFields) != null && o.includes(y.state) && oe()), t(y.addendums) && l([["addendums", e, r]]), t(y.comments) ? l([
166
- ["comments", e, r],
167
- ["comments-related", e, r]
168
- ]) : (t(y.state) || t(y.integrations) || t(y.addendums) || !s.aspectsOnly) && l([["comments-related", e, r]]), t(y.tasks) && l([["tasks", e, r]]), t(y.integrations) && l([
169
- ["erp-submissions", e, r],
170
- ["record-integrations", e, r]
171
- ]), b.invalidateQueries({
172
- predicate: (n) => (n.queryKey[0] === "child-summary" || n.queryKey[0] === "field-lineage") && n.queryKey[1] === e && String(n.queryKey[2]) === String(r)
173
- }), !s.aspectsOnly) {
174
- if (s.ids.length > 0 && s.ids.every((n) => n === "*")) {
175
- l([
176
- ["item", e, r],
177
- ["pipeline-instance", e, r]
178
- ]);
179
- return;
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) });
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();
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]
200
+ ]);
201
+ return;
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(
206
+ e,
207
+ r,
208
+ ((a = t.changedFields) == null ? void 0 : a.filter((n) => !n.startsWith("$"))) ?? null
209
+ ), G(!0);
180
210
  }
181
- b.invalidateQueries({
182
- predicate: (n) => n.queryKey[0] === "o2m-rows" && String(n.queryKey[3]) === String(r) || n.queryKey[0] === "o2m-compare"
183
- }), Ee(
184
- e,
185
- r,
186
- ((h = s.changedFields) == null ? void 0 : h.filter((n) => !n.startsWith("$"))) ?? null
187
- ), V(!0);
188
211
  }
189
- }, V = async (s) => {
190
- l([
212
+ }, G = async (t) => {
213
+ m([
191
214
  ["item", e, r],
192
215
  // Summary mode reads its own copy (#1869) — it diffs + highlights.
193
216
  ["rrv-record", e, r],
194
217
  ["field-touch", e, r],
195
218
  ["revisions", e, r]
196
219
  ]);
197
- const t = ["last-touch", e, String(r)];
198
- await b.invalidateQueries({ queryKey: t }).catch(() => {
199
- }), !(!s || Qe(b.getQueryData(t), z.current)) && (B(!0), N.current && clearTimeout(N.current), N.current = setTimeout(() => B(!1), 4e3));
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));
200
223
  };
201
- ke(e, r, ie);
202
- const { userId: K } = xe(), z = v(K);
203
- z.current = K, Re(K, "saved", e, r, () => {
204
- x.current || (V(!1), l([
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([
205
228
  ["pipeline-instance", e, r],
206
229
  ["comments", e, r],
207
230
  ["tasks", e, r],
@@ -209,15 +232,15 @@ function Ze({
209
232
  ["o2m-rows"],
210
233
  ["m2m-items"]
211
234
  ]));
212
- }), k(
235
+ }), K(
213
236
  () => () => {
214
- N.current && clearTimeout(N.current), S.current && clearTimeout(S.current);
237
+ N.current && clearTimeout(N.current), S.current && clearTimeout(S.current), R.current && clearTimeout(R.current);
215
238
  },
216
239
  []
217
- ), ee(
240
+ ), I(
218
241
  "owners:changed",
219
- () => {
220
- x.current || l([
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([
221
244
  ["pipeline-instance-owners", e, r],
222
245
  ["pipeline-owners-resolved", e, r],
223
246
  ["pipeline-all-owners", e, r],
@@ -225,163 +248,155 @@ function Ze({
225
248
  ]);
226
249
  },
227
250
  { debounceMs: 400 }
228
- ), re(
251
+ ), ee(
229
252
  "record:integrity",
230
253
  e,
231
254
  r,
232
- () => l([["record-integrity", e, r]])
255
+ () => m([["record-integrity", e, r]])
233
256
  );
234
- const G = v(/* @__PURE__ */ new Map());
235
- re("record:automation", e, r, (s) => {
236
- const t = String((s == null ? void 0 : s.flow_id) ?? "");
237
- if (!t) return;
238
- const o = G.current, h = o.get(t);
239
- h && clearTimeout(h), o.delete(t);
240
- const n = () => q((a) => {
241
- const { [t]: g, ...M } = a;
242
- return M;
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);
263
+ const g = () => O((a) => {
264
+ const { [s]: n, ...k } = a;
265
+ return k;
243
266
  });
244
- if ((s == null ? void 0 : s.state) === "end") {
245
- n();
267
+ if ((t == null ? void 0 : t.state) === "end") {
268
+ g();
246
269
  return;
247
270
  }
248
- q((a) => ({ ...a, [t]: String((s == null ? void 0 : s.flow_name) || "An automation") })), o.set(t, setTimeout(n, 5 * 6e4));
249
- }), k(() => {
250
- const s = G.current;
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;
251
274
  return () => {
252
- for (const t of s.values()) clearTimeout(t);
253
- s.clear();
275
+ for (const s of t.values()) clearTimeout(s);
276
+ t.clear();
254
277
  };
255
- }, []), ee(
278
+ }, []), I(
256
279
  "access:changed",
257
280
  () => {
258
281
  setTimeout(
259
282
  () => {
260
- var s;
261
- ((s = x.current) == null ? void 0 : s.kind) !== "deleted" && T.request(U(`/items/${e}/${r}`, { fields: "id" })).then(() => {
262
- var t;
263
- ((t = x.current) == null ? void 0 : t.kind) === "access" && (R(null), l([["item", e, r]]));
264
- }).catch((t) => {
265
- const o = Ae(t);
266
- (o === 403 || o === 404) && L("access");
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);
289
+ (i === 403 || i === 404) && D("access");
267
290
  });
268
291
  },
269
292
  Math.floor(Math.random() * 1500)
270
293
  );
271
294
  },
272
295
  { debounceMs: 300 }
273
- ), k(() => {
274
- f && !x.current && L("access");
275
- }, [f]);
276
- const E = Te(e, r, u, K), [de, J] = w(!1);
277
- k(() => {
278
- E.otherDirty || J(!1);
279
- }, [E.otherDirty]), k(() => {
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(() => {
280
301
  if (!c) return;
281
- const s = (a) => {
282
- const g = a.detail;
283
- g != null && g.name && c.emit("record:uploading", {
284
- collection: e,
285
- item: String(r),
286
- name: g.name,
287
- state: g.state
288
- });
289
- };
290
- window.addEventListener("nvr:upload-state", s);
291
302
  const t = (a) => {
292
- if ((a == null ? void 0 : a.collection) !== e || String(a == null ? void 0 : a.item) !== String(r)) return;
293
- const g = String(a.user_name ?? a.user ?? "Someone");
294
- se((M) => {
295
- const Z = M.filter((I) => !(I.user === g && I.name === a.name));
296
- return a.state === "start" ? [...Z, { user: g, name: String(a.name) }] : Z;
297
- });
298
- }, o = c.on("record:uploading", t), h = c.on("record:comment", (a) => {
299
- (a == null ? void 0 : a.collection) !== e || String(a == null ? void 0 : a.item) !== String(r) || (b.invalidateQueries({ queryKey: ["comments", e, r] }), b.invalidateQueries({ queryKey: ["comments-related", e, r] }));
300
- }), n = (a) => t(a.detail);
301
- return window.addEventListener("nvr:record-uploading", n), () => {
302
- window.removeEventListener("nvr:upload-state", s), window.removeEventListener("nvr:record-uploading", n), o(), h();
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) }));
305
+ };
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);
312
+ return window.addEventListener("nvr:record-uploading", g), () => {
313
+ window.removeEventListener(re, t), window.removeEventListener("nvr:record-uploading", g), i(), v();
303
314
  };
304
- }, [c, e, r, b]);
315
+ }, [c, e, r, p]);
305
316
  const ue = async () => {
306
- if (i != null && i.trashId) {
307
- F(!0);
317
+ if (o != null && o.trashId) {
318
+ Y(!0);
308
319
  try {
309
- await T.request(we(`/trash/${i.trashId}/restore`, {})), R(null), _.current = Date.now(), l([["item", e, r]]), O.success("Record restored");
310
- } catch (s) {
311
- O.error(_e(s, "Restore failed"));
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"));
312
323
  } finally {
313
- F(!1);
324
+ Y(!1);
314
325
  }
315
326
  }
316
- }, A = Object.values(ne), X = E.otherDirty && !de && !u && !i;
317
- return !i && A.length === 0 && !X && !P && (!c || !D && Q.length === 0) ? null : /* @__PURE__ */ m("div", { className: "space-y-2", children: [
318
- (i == null ? void 0 : i.kind) === "deleted" && /* @__PURE__ */ m(
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(
319
330
  "div",
320
331
  {
321
332
  "data-record-gone": "deleted",
322
333
  role: "alert",
323
334
  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",
324
335
  children: [
325
- /* @__PURE__ */ d(pe, { className: "h-4 w-4 shrink-0 text-rose-500" }),
326
- /* @__PURE__ */ m("p", { className: "min-w-0 flex-1 text-[12px] text-rose-800 dark:text-rose-300", 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: [
327
338
  /* @__PURE__ */ d("span", { className: "font-semibold", children: "This record was deleted" }),
328
- i.by ? ` by ${i.by}` : "",
329
- i.at ? ` ${$e(i.at)}` : "",
339
+ o.by ? ` by ${o.by}` : "",
340
+ o.at ? ` ${Ae(o.at)}` : "",
330
341
  ". Saving is turned off",
331
- i.canRestore ? " — restore it to keep working." : "."
342
+ o.canRestore ? " — restore it to keep working." : "."
332
343
  ] }),
333
- i.canRestore && i.trashId != null && /* @__PURE__ */ d(
344
+ o.canRestore && o.trashId != null && /* @__PURE__ */ d(
334
345
  "button",
335
346
  {
336
347
  type: "button",
337
348
  onClick: () => void ue(),
338
- disabled: j,
349
+ disabled: P,
339
350
  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",
340
- children: j ? "Restoring…" : "Restore"
351
+ children: P ? "Restoring…" : "Restore"
341
352
  }
342
353
  )
343
354
  ]
344
355
  }
345
356
  ),
346
- (i == null ? void 0 : i.kind) === "access" && !p && /* @__PURE__ */ d(Le, { onBack: () => window.history.back() }),
347
- X && /* @__PURE__ */ m(
348
- "div",
357
+ (o == null ? void 0 : o.kind) === "access" && !y && /* @__PURE__ */ d(Fe, { onBack: () => window.history.back() }),
358
+ x && /* @__PURE__ */ f(
359
+ "p",
349
360
  {
350
- "data-record-other-tab": !0,
351
- 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",
361
+ "data-record-other-tab": x.tone,
362
+ role: "status",
363
+ className: te(
364
+ "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"
366
+ ),
352
367
  children: [
353
- /* @__PURE__ */ d(fe, { className: "h-4 w-4 shrink-0 text-amber-500" }),
354
- /* @__PURE__ */ d("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", children: "This record is open with unsaved changes in another tab — editing it here too may overwrite them." }),
355
368
  /* @__PURE__ */ d(
356
- "button",
369
+ pe,
357
370
  {
358
- type: "button",
359
- onClick: E.focusOther,
360
- className: "h-7 shrink-0 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",
361
- children: "Switch to that tab"
371
+ className: te(
372
+ "h-3.5 w-3.5 shrink-0",
373
+ x.tone === "both" ? "text-amber-500" : "text-muted-foreground/70"
374
+ ),
375
+ "aria-hidden": !0
362
376
  }
363
377
  ),
378
+ /* @__PURE__ */ d("span", { className: "min-w-0", children: x.text }),
364
379
  /* @__PURE__ */ d(
365
380
  "button",
366
381
  {
367
382
  type: "button",
368
- onClick: () => J(!0),
369
- className: "h-7 shrink-0 rounded-md px-2 text-[11.5px] text-amber-700 hover:bg-amber-100 dark:text-amber-300 dark:hover:bg-amber-500/10",
370
- children: "Dismiss"
383
+ onClick: Z.focusOther,
384
+ className: "shrink-0 rounded font-medium underline decoration-dotted underline-offset-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan",
385
+ children: "Switch to it"
371
386
  }
372
387
  )
373
388
  ]
374
389
  }
375
390
  ),
376
- P && !i && /* @__PURE__ */ m(
391
+ V && !o && /* @__PURE__ */ f(
377
392
  "div",
378
393
  {
379
394
  "data-record-importing": !0,
380
395
  role: "status",
381
396
  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",
382
397
  children: [
383
- /* @__PURE__ */ d(be, { className: "h-4 w-4 shrink-0 animate-pulse text-amber-500" }),
384
- /* @__PURE__ */ m("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", 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: [
385
400
  /* @__PURE__ */ d("span", { className: "font-semibold", children: "An import is updating this record" }),
386
401
  " — the changed fields refresh here as it goes.",
387
402
  u ? " Your unsaved edits may be out of date; check them before saving." : ""
@@ -389,53 +404,51 @@ function Ze({
389
404
  ]
390
405
  }
391
406
  ),
392
- !i && /* @__PURE__ */ d(Ke, { collection: e, scope: "record" }),
393
- A.length > 0 && !i && /* @__PURE__ */ m(
407
+ !o && /* @__PURE__ */ d($e, { collection: e, scope: "record" }),
408
+ M.length > 0 && !o && /* @__PURE__ */ f(
394
409
  "div",
395
410
  {
396
411
  "data-record-automation": !0,
397
412
  role: "status",
398
413
  className: "flex items-center gap-3 rounded-lg border border-nvr-cyan/40 bg-nvr-cyan/10 px-3.5 py-2.5",
399
414
  children: [
400
- /* @__PURE__ */ d(he, { className: "h-4 w-4 shrink-0 animate-pulse text-nvr-cyan" }),
401
- /* @__PURE__ */ m("p", { className: "min-w-0 flex-1 text-[12px] text-[#0e7490] dark:text-slate-200", 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: [
402
417
  /* @__PURE__ */ d("span", { className: "font-semibold", children: "Automation is updating this record" }),
403
418
  " —",
404
419
  " ",
405
- A.join(", "),
420
+ M.join(", "),
406
421
  ". Its changes appear here when it finishes."
407
422
  ] })
408
423
  ]
409
424
  }
410
425
  ),
411
- c && (D || Q.length > 0) && /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-2", children: [
412
- D && /* @__PURE__ */ m("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: [
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: [
413
428
  /* @__PURE__ */ d("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-nvr-cyan" }),
414
429
  "Updated just now by someone else"
415
430
  ] }),
416
- Q.map((s) => /* @__PURE__ */ m(
431
+ L.map((t) => /* @__PURE__ */ f(
417
432
  "span",
418
433
  {
434
+ "data-remote-upload-chip": t.key,
419
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",
420
436
  children: [
421
- /* @__PURE__ */ d(ge, { className: "h-3 w-3 animate-pulse text-nvr-cyan" }),
422
- s.user,
423
- " is uploading “",
424
- s.name.length > 32 ? `${s.name.slice(0, 32)}…` : s.name,
425
- "”"
437
+ /* @__PURE__ */ d(he, { className: "h-3 w-3 animate-pulse text-nvr-cyan motion-reduce:animate-none" }),
438
+ Qe(t)
426
439
  ]
427
440
  },
428
- `${s.user}:${s.name}`
441
+ t.key
429
442
  ))
430
443
  ] })
431
444
  ] });
432
445
  }
433
446
  export {
434
- te as RECORD_QUERY_HEADS,
435
- Le as RecordAccessLostPanel,
436
- Ze as RecordLiveSync,
437
- Xe as invalidateRecordQueries,
447
+ ne as RECORD_QUERY_HEADS,
448
+ Fe as RecordAccessLostPanel,
449
+ ir as RecordLiveSync,
450
+ ar as invalidateRecordQueries,
438
451
  De as moveNotice,
439
- Ce as purgeRecordQueries,
440
- Qe as writtenBySelf
452
+ Be as purgeRecordQueries,
453
+ Me as writtenBySelf
441
454
  };