@nivaro/react 0.3.114 → 0.3.116

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 (293) 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 +1728 -22
  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 +4909 -4182
  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 +612 -551
  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/OverflowRail.js +326 -0
  39. package/dist/shared/components/PageRenderer.js +636 -599
  40. package/dist/shared/components/PresenceDot.js +21 -0
  41. package/dist/shared/components/ProfileView.js +656 -536
  42. package/dist/shared/components/RealtimeStatusBanner.js +25 -25
  43. package/dist/shared/components/RecentRecordsRail.js +51 -48
  44. package/dist/shared/components/RecordCompare.js +241 -150
  45. package/dist/shared/components/RecordDrilldownSheet.js +66 -64
  46. package/dist/shared/components/RecordGridEditor.js +350 -311
  47. package/dist/shared/components/RecordHoverCard.js +147 -0
  48. package/dist/shared/components/RecordPeekHost.js +111 -0
  49. package/dist/shared/components/RecordReadView.js +414 -412
  50. package/dist/shared/components/RelativeTime.js +16 -0
  51. package/dist/shared/components/ReportView.js +1396 -1304
  52. package/dist/shared/components/ScreenRefreshButton.js +77 -0
  53. package/dist/shared/components/TabCountHost.js +10 -0
  54. package/dist/shared/components/TickerNumber.js +19 -18
  55. package/dist/shared/components/TipLayer.js +70 -58
  56. package/dist/shared/components/WidgetImageMenu.js +59 -0
  57. package/dist/shared/components/WidgetSlot.js +571 -524
  58. package/dist/shared/components/activity/RecordActivityStream.js +317 -0
  59. package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
  60. package/dist/shared/components/cbv/approval-changed.js +20 -0
  61. package/dist/shared/components/cbv/changed-by-others.js +251 -0
  62. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  63. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  65. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  66. package/dist/shared/components/change-proposals/types.js +4 -0
  67. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  68. package/dist/shared/components/chat/Composer.js +276 -298
  69. package/dist/shared/components/chat/room-due.js +13 -0
  70. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  71. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  72. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  73. package/dist/shared/components/imports/ImportConsole.js +159 -155
  74. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  75. package/dist/shared/components/integrations/SendStatus.js +202 -0
  76. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  77. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  78. package/dist/shared/components/integrations/console/SignalCard.js +84 -77
  79. package/dist/shared/components/integrations/console/api.js +161 -117
  80. package/dist/shared/components/integrations/console/tone.js +15 -12
  81. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  82. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  83. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  84. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  85. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  86. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  87. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  88. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  89. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  90. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  91. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  92. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  93. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  94. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  95. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  96. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  97. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  98. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  99. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  100. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  101. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  102. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  103. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  104. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  105. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  106. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  107. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  108. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  109. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  110. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  111. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  112. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  113. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  114. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  115. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  116. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  117. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  118. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  119. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  120. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  121. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  122. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  123. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  124. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  125. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  126. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  127. package/dist/shared/components/item-edit/file-live.js +77 -0
  128. package/dist/shared/components/item-edit/file-processing.js +87 -0
  129. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  130. package/dist/shared/components/item-edit/live-related.js +23 -0
  131. package/dist/shared/components/item-edit/live-title.js +66 -0
  132. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  133. package/dist/shared/components/item-edit/removed-line.js +58 -0
  134. package/dist/shared/components/item-edit/render-stability.js +70 -59
  135. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  136. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  137. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  138. package/dist/shared/components/list/InlineEdit.js +504 -208
  139. package/dist/shared/components/list/ListViewers.js +81 -0
  140. package/dist/shared/components/list/PhonePager.js +50 -0
  141. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  142. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  143. package/dist/shared/components/merge/merge-values.js +110 -0
  144. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  145. package/dist/shared/components/notifications/NotificationCenterView.js +389 -323
  146. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  147. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  148. package/dist/shared/components/notifications/bundles.js +21 -19
  149. package/dist/shared/components/notifications/resolved-line.js +25 -0
  150. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  151. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  152. package/dist/shared/components/panels/AlertBanners.js +132 -0
  153. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  154. package/dist/shared/components/panels/BranchLanes.js +82 -54
  155. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  156. package/dist/shared/components/panels/CommentImages.js +219 -0
  157. package/dist/shared/components/panels/CommentPanel.js +649 -530
  158. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  159. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  160. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  161. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  162. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  163. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  164. package/dist/shared/components/panels/SlaClock.js +130 -99
  165. package/dist/shared/components/panels/TaskPanel.js +308 -287
  166. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  167. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  168. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  169. package/dist/shared/components/pipeline/PipelineEditorView.js +2050 -1942
  170. package/dist/shared/components/profile/AgentNameField.js +141 -0
  171. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  172. package/dist/shared/components/profile/PersonAccess.js +398 -330
  173. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  174. package/dist/shared/components/profile/PersonProfile.js +81 -73
  175. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  176. package/dist/shared/components/queue/OwnerAvatars.js +9 -9
  177. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  178. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  179. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  180. package/dist/shared/components/queue/QueueWorklist.js +2407 -1950
  181. package/dist/shared/components/queue/worklist-helpers.js +10 -6
  182. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  183. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  184. package/dist/shared/components/support/ReportProblem.js +1 -0
  185. package/dist/shared/components/support/ScreenShare.js +554 -0
  186. package/dist/shared/components/support/SupportView.js +160 -129
  187. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  188. package/dist/shared/components/ui/popover.js +53 -29
  189. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  190. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  191. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  192. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  193. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  194. package/dist/shared/lib/activity-sentence.js +87 -75
  195. package/dist/shared/lib/agent-presence.js +46 -0
  196. package/dist/shared/lib/approval-progress.js +49 -0
  197. package/dist/shared/lib/attention-prefs.js +27 -0
  198. package/dist/shared/lib/cell-locks.js +56 -0
  199. package/dist/shared/lib/co-edit.js +166 -0
  200. package/dist/shared/lib/coedit-registry.js +44 -0
  201. package/dist/shared/lib/comment-awareness.js +124 -0
  202. package/dist/shared/lib/comment-images.js +45 -0
  203. package/dist/shared/lib/config-watch.js +94 -0
  204. package/dist/shared/lib/copy-rules.js +65 -0
  205. package/dist/shared/lib/count-step.js +30 -0
  206. package/dist/shared/lib/deadline-ticker.js +68 -0
  207. package/dist/shared/lib/derived-causes.js +115 -0
  208. package/dist/shared/lib/draft-store.js +114 -85
  209. package/dist/shared/lib/error-hints.js +1 -0
  210. package/dist/shared/lib/field-merge.js +126 -0
  211. package/dist/shared/lib/filter-sentence.js +10 -10
  212. package/dist/shared/lib/focus-mode.js +16 -12
  213. package/dist/shared/lib/grid-cursors.js +77 -0
  214. package/dist/shared/lib/grid-presence.js +182 -0
  215. package/dist/shared/lib/idle-reload.js +100 -73
  216. package/dist/shared/lib/in-step.js +45 -0
  217. package/dist/shared/lib/integration-chip.js +19 -18
  218. package/dist/shared/lib/keep-row-focus.js +43 -0
  219. package/dist/shared/lib/line-locks.js +141 -0
  220. package/dist/shared/lib/line-split.js +41 -0
  221. package/dist/shared/lib/linked-changes.js +150 -0
  222. package/dist/shared/lib/list-return.js +231 -0
  223. package/dist/shared/lib/list-viewers.js +52 -0
  224. package/dist/shared/lib/live-announcer.js +86 -0
  225. package/dist/shared/lib/live-counts.js +85 -0
  226. package/dist/shared/lib/live-data-changed.js +108 -0
  227. package/dist/shared/lib/live-deltas.js +81 -0
  228. package/dist/shared/lib/live-findings.js +113 -0
  229. package/dist/shared/lib/live-groups.js +122 -0
  230. package/dist/shared/lib/live-link-labels.js +162 -0
  231. package/dist/shared/lib/live-list-flow.js +334 -0
  232. package/dist/shared/lib/live-list.js +143 -129
  233. package/dist/shared/lib/live-moves.js +51 -0
  234. package/dist/shared/lib/live-ops.js +26 -26
  235. package/dist/shared/lib/live-pickers.js +7 -0
  236. package/dist/shared/lib/live-preference.js +184 -0
  237. package/dist/shared/lib/live-queries.js +226 -181
  238. package/dist/shared/lib/live-screen.js +333 -0
  239. package/dist/shared/lib/live-search.js +108 -0
  240. package/dist/shared/lib/live-seen.js +35 -0
  241. package/dist/shared/lib/live-views.js +100 -0
  242. package/dist/shared/lib/live.js +159 -133
  243. package/dist/shared/lib/missed-updates.js +198 -0
  244. package/dist/shared/lib/newer-file.js +56 -0
  245. package/dist/shared/lib/notification-sound.js +42 -20
  246. package/dist/shared/lib/obligation-banner.js +17 -17
  247. package/dist/shared/lib/own-writes.js +59 -41
  248. package/dist/shared/lib/picker-badges.js +94 -0
  249. package/dist/shared/lib/presence-signals.js +131 -84
  250. package/dist/shared/lib/rail-menu-context.js +9 -0
  251. package/dist/shared/lib/realtime.js +49 -24
  252. package/dist/shared/lib/record-gaps.js +85 -0
  253. package/dist/shared/lib/record-outbox.js +369 -222
  254. package/dist/shared/lib/record-peek.js +75 -0
  255. package/dist/shared/lib/record-tabs.js +92 -72
  256. package/dist/shared/lib/relative-ticker.js +42 -0
  257. package/dist/shared/lib/request-gate.js +119 -119
  258. package/dist/shared/lib/rollup-recalc.js +107 -0
  259. package/dist/shared/lib/room-gaps.js +40 -36
  260. package/dist/shared/lib/row-surface.js +7 -0
  261. package/dist/shared/lib/rum.js +137 -87
  262. package/dist/shared/lib/save-progress.js +20 -0
  263. package/dist/shared/lib/scheduled-countdown.js +67 -0
  264. package/dist/shared/lib/screen-refresh.js +160 -0
  265. package/dist/shared/lib/screen-share.js +234 -0
  266. package/dist/shared/lib/seen-since.js +74 -0
  267. package/dist/shared/lib/selection-watch.js +205 -0
  268. package/dist/shared/lib/send-status.js +132 -0
  269. package/dist/shared/lib/send-view.js +23 -0
  270. package/dist/shared/lib/socket-liveness.js +155 -0
  271. package/dist/shared/lib/socket-realtime.js +168 -140
  272. package/dist/shared/lib/state-census.js +53 -0
  273. package/dist/shared/lib/summary-mode.js +61 -39
  274. package/dist/shared/lib/tab-attention.js +143 -32
  275. package/dist/shared/lib/table-density.js +64 -0
  276. package/dist/shared/lib/table-pins.js +20 -18
  277. package/dist/shared/lib/track-travel.js +40 -0
  278. package/dist/shared/lib/unseen-changes.js +68 -0
  279. package/dist/shared/lib/upload-file.js +62 -0
  280. package/dist/shared/lib/upload-presence.js +127 -0
  281. package/dist/shared/lib/urgent-chime.js +65 -0
  282. package/dist/shared/lib/use-below-md.js +29 -0
  283. package/dist/shared/lib/use-online-users.js +32 -11
  284. package/dist/shared/lib/user-sync.js +155 -39
  285. package/dist/shared/lib/waiting-count.js +44 -0
  286. package/dist/shared/lib/watch-desktop.js +83 -0
  287. package/dist/shared/lib/watch-list.js +447 -0
  288. package/dist/shared/lib/widget-image-render.js +64 -0
  289. package/dist/shared/lib/widget-image.js +111 -0
  290. package/dist/shared/lib/worker-socket.js +130 -104
  291. package/dist/shared/lib/write-to-screen.js +133 -0
  292. package/package.json +1 -1
  293. package/styles.css +49 -1
@@ -1,8 +1,8 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
2
  import { RotateCcw as F } from "lucide-react";
3
- import { useState as Y } from "react";
3
+ import { useState as W } from "react";
4
4
  import { cn as M } from "../../lib/utils.js";
5
- import { SimpleSelectXs as D } from "../ui/SimpleSelect.js";
5
+ import { SimpleSelectXs as Y } from "../ui/SimpleSelect.js";
6
6
  const Q = [
7
7
  {
8
8
  key: "mentions",
@@ -14,6 +14,16 @@ const Q = [
14
14
  label: "Workflow & approvals",
15
15
  help: "A record you own or follow moves state, needs your approval, is sent back, or an approval chain reaches your step. Also support requests you work on the desk (new, assigned, replied)."
16
16
  },
17
+ {
18
+ key: "proposals",
19
+ label: "Change proposals",
20
+ help: "Someone proposed new values on a locked record whose step you own (to accept or decline), and whether a change you proposed was accepted or declined."
21
+ },
22
+ {
23
+ key: "approval_changes",
24
+ label: "Changed after approval",
25
+ help: "A record you approved was changed afterwards (by an administrator, a process or an accepted proposal). One notice per burst of changes, never for your own."
26
+ },
17
27
  {
18
28
  key: "sla",
19
29
  label: "SLA & escalations",
@@ -24,6 +34,11 @@ const Q = [
24
34
  label: "Watches",
25
35
  help: "Something you explicitly watch fired: field watches, per-record subscriptions, and watched stock parts (Stock Planning)."
26
36
  },
37
+ {
38
+ key: "watch_list",
39
+ label: "Watch list alerts",
40
+ help: "Alerts you set on records in your watch list: when one reaches a step, when a field changes, or when it is overdue. Also the daily email of what changed on your pinned records, when you turn it on."
41
+ },
27
42
  {
28
43
  key: "alerts",
29
44
  label: "Alerts",
@@ -64,6 +79,11 @@ const Q = [
64
79
  label: "App crashes",
65
80
  help: "A crash that is new in the current release reached several times or more than one person within 15 minutes. Only administrators get these."
66
81
  },
82
+ {
83
+ key: "views",
84
+ label: "Views sent to you",
85
+ help: "A colleague used Send my view to hand you a record, list or queue they were looking at. When you have the app open it arrives as a small card instead."
86
+ },
67
87
  {
68
88
  key: "system",
69
89
  label: "System & digests",
@@ -78,42 +98,42 @@ const Q = [
78
98
  function le(a, l) {
79
99
  return a === "role" || l ? Q : Q.filter((i) => !ae.has(i.key));
80
100
  }
81
- const oe = ["inapp", "push", "teams", "email", "quiet_override"], W = ["push_after_min", "email_after_min"], q = (a) => !!a && (a.quiet_start !== void 0 || a.quiet_end !== void 0);
101
+ const oe = ["inapp", "push", "teams", "email", "quiet_override"], H = ["push_after_min", "email_after_min"], A = (a) => !!a && (a.quiet_start !== void 0 || a.quiet_end !== void 0);
82
102
  function se(a, l) {
83
- var b, h, p, w, E, _, R, T;
84
- const i = {}, m = q(a) ? a : q(l) ? l : null;
103
+ var b, h, p, N, E, _, R, T;
104
+ const i = {}, m = A(a) ? a : A(l) ? l : null;
85
105
  (m == null ? void 0 : m.quiet_start) !== void 0 && (i.quiet_start = m.quiet_start), (m == null ? void 0 : m.quiet_end) !== void 0 && (i.quiet_end = m.quiet_end);
86
106
  const O = {};
87
- for (const f of /* @__PURE__ */ new Set([
107
+ for (const y of /* @__PURE__ */ new Set([
88
108
  ...Object.keys((l == null ? void 0 : l.matrix) ?? {}),
89
109
  ...Object.keys((a == null ? void 0 : a.matrix) ?? {})
90
110
  ])) {
91
111
  const v = {};
92
- for (const y of oe) {
93
- const x = ((h = (b = a == null ? void 0 : a.matrix) == null ? void 0 : b[f]) == null ? void 0 : h[y]) ?? ((w = (p = l == null ? void 0 : l.matrix) == null ? void 0 : p[f]) == null ? void 0 : w[y]);
94
- x !== void 0 && (v[y] = x);
112
+ for (const f of oe) {
113
+ const x = ((h = (b = a == null ? void 0 : a.matrix) == null ? void 0 : b[y]) == null ? void 0 : h[f]) ?? ((N = (p = l == null ? void 0 : l.matrix) == null ? void 0 : p[y]) == null ? void 0 : N[f]);
114
+ x !== void 0 && (v[f] = x);
95
115
  }
96
- O[f] = v;
116
+ O[y] = v;
97
117
  }
98
118
  i.matrix = O;
99
- const A = {};
100
- for (const f of /* @__PURE__ */ new Set([
119
+ const q = {};
120
+ for (const y of /* @__PURE__ */ new Set([
101
121
  ...Object.keys((l == null ? void 0 : l.escalation) ?? {}),
102
122
  ...Object.keys((a == null ? void 0 : a.escalation) ?? {})
103
123
  ])) {
104
124
  const v = {};
105
- for (const y of W) {
106
- const x = ((_ = (E = a == null ? void 0 : a.escalation) == null ? void 0 : E[f]) == null ? void 0 : _[y]) ?? ((T = (R = l == null ? void 0 : l.escalation) == null ? void 0 : R[f]) == null ? void 0 : T[y]);
107
- x !== void 0 && (v[y] = x);
125
+ for (const f of H) {
126
+ const x = ((_ = (E = a == null ? void 0 : a.escalation) == null ? void 0 : E[y]) == null ? void 0 : _[f]) ?? ((T = (R = l == null ? void 0 : l.escalation) == null ? void 0 : R[y]) == null ? void 0 : T[f]);
127
+ x !== void 0 && (v[f] = x);
108
128
  }
109
- A[f] = v;
129
+ q[y] = v;
110
130
  }
111
- return i.escalation = A, i;
131
+ return i.escalation = q, i;
112
132
  }
113
- function H(a, l, i) {
133
+ function D(a, l, i) {
114
134
  return i(a) !== void 0 ? "person" : i(l) !== void 0 ? "role" : "system";
115
135
  }
116
- function N({ text: a }) {
136
+ function w({ text: a }) {
117
137
  return /* @__PURE__ */ t(
118
138
  "span",
119
139
  {
@@ -147,14 +167,14 @@ function ue({
147
167
  inheritedName: i,
148
168
  legacyEmail: m = "instant",
149
169
  onCommit: O,
150
- onLegacyEmail: A,
170
+ onLegacyEmail: q,
151
171
  saving: b,
152
172
  subject: h,
153
173
  teams: p,
154
- extraColumn: w,
174
+ extraColumn: N,
155
175
  isAdmin: E = !0
156
176
  }) {
157
- const _ = se(a, l), R = le(h, E), [T, f] = Y(null), [v, y] = Y(null), x = T ?? _.quiet_start ?? "", P = v ?? _.quiet_end ?? "", U = q(a) ? "person" : q(l) ? "role" : "system", k = h === "person" && !!l, C = (e) => {
177
+ const _ = se(a, l), R = le(h, E), [T, y] = W(null), [v, f] = W(null), x = T ?? _.quiet_start ?? "", P = v ?? _.quiet_end ?? "", U = A(a) ? "person" : A(l) ? "role" : "system", k = h === "person" && !!l, C = (e) => {
158
178
  const o = {
159
179
  ...a,
160
180
  matrix: { ...a.matrix ?? {} },
@@ -167,18 +187,18 @@ function ue({
167
187
  s === void 0 ? delete n[o] : n[o] = s;
168
188
  const u = d.matrix ?? {};
169
189
  Object.keys(n).length ? u[e] = n : delete u[e], d.matrix = u;
170
- }), X = (e) => {
190
+ }), V = (e) => {
171
191
  var o;
172
192
  return ((o = l == null ? void 0 : l.matrix) == null ? void 0 : o[e]) ?? {};
173
- }, z = (e) => {
193
+ }, X = (e) => {
174
194
  var o, s, d, n;
175
195
  return ((s = (o = a.matrix) == null ? void 0 : o[e]) == null ? void 0 : s.email) ?? (m === "daily" ? "daily" : ((n = (d = l == null ? void 0 : l.matrix) == null ? void 0 : d[e]) == null ? void 0 : n.email) ?? m);
176
- }, K = (e) => {
196
+ }, z = (e) => {
177
197
  var o, s, d, n;
178
198
  return ((s = (o = a.matrix) == null ? void 0 : o[e]) == null ? void 0 : s.email) !== void 0 || m === "daily" ? "person" : ((n = (d = l == null ? void 0 : l.matrix) == null ? void 0 : d[e]) == null ? void 0 : n.email) !== void 0 ? "role" : "system";
179
199
  }, $ = (e, o) => C((s) => {
180
200
  e === void 0 && o === void 0 ? (delete s.quiet_start, delete s.quiet_end) : (s.quiet_start = e ?? "", s.quiet_end = o ?? "");
181
- }), V = (e, o, s) => C((d) => {
201
+ }), K = (e, o, s) => C((d) => {
182
202
  var c, g, I;
183
203
  const n = { ...((c = d.escalation) == null ? void 0 : c[e]) ?? {} };
184
204
  s ? n[o] = s : (I = (g = l == null ? void 0 : l.escalation) == null ? void 0 : g[e]) != null && I[o] ? n[o] = 0 : delete n[o];
@@ -190,7 +210,7 @@ function ue({
190
210
  }), J = (e) => C((o) => {
191
211
  var s;
192
212
  (s = o.escalation) == null || delete s[e];
193
- }), Z = q(a) || Object.keys(a.matrix ?? {}).length > 0 || Object.keys(a.escalation ?? {}).length > 0, ee = [
213
+ }), Z = A(a) || Object.keys(a.matrix ?? {}).length > 0 || Object.keys(a.escalation ?? {}).length > 0, ee = [
194
214
  { value: "", label: "never" },
195
215
  { value: "15", label: "15 min" },
196
216
  { value: "60", label: "1 hour" },
@@ -239,7 +259,7 @@ function ue({
239
259
  {
240
260
  type: "time",
241
261
  value: x,
242
- onChange: (e) => f(e.target.value),
262
+ onChange: (e) => y(e.target.value),
243
263
  onBlur: () => {
244
264
  T != null && $(x || "", P || "");
245
265
  },
@@ -253,7 +273,7 @@ function ue({
253
273
  {
254
274
  type: "time",
255
275
  value: P,
256
- onChange: (e) => y(e.target.value),
276
+ onChange: (e) => f(e.target.value),
257
277
  onBlur: () => {
258
278
  v != null && $(x || "", P || "");
259
279
  },
@@ -267,18 +287,18 @@ function ue({
267
287
  {
268
288
  type: "button",
269
289
  onClick: () => {
270
- f(""), y(""), q(l) ? $("", "") : $(void 0, void 0);
290
+ y(""), f(""), A(l) ? $("", "") : $(void 0, void 0);
271
291
  },
272
292
  className: "text-[11.5px] text-slate-400 underline decoration-dotted underline-offset-2",
273
293
  children: "Clear"
274
294
  }
275
295
  ),
276
- k && U === "person" && q(l) && /* @__PURE__ */ r(
296
+ k && U === "person" && A(l) && /* @__PURE__ */ r(
277
297
  "button",
278
298
  {
279
299
  type: "button",
280
300
  onClick: () => {
281
- f(null), y(null), $(void 0, void 0);
301
+ y(null), f(null), $(void 0, void 0);
282
302
  },
283
303
  className: "text-[11.5px] text-slate-400 underline decoration-dotted underline-offset-2",
284
304
  children: [
@@ -296,26 +316,26 @@ function ue({
296
316
  /* @__PURE__ */ t("th", { className: "py-1 font-semibold", children: "Category" }),
297
317
  /* @__PURE__ */ r("th", { className: "py-1 text-center font-semibold", children: [
298
318
  "In-app",
299
- /* @__PURE__ */ t(N, { text: "The notification itself: the bell badge and the Notifications inbox in the app. Off = no row is written for this category, so nothing shows anywhere in the app." })
319
+ /* @__PURE__ */ t(w, { text: "The notification itself: the bell badge and the Notifications inbox in the app. Off = no row is written for this category, so nothing shows anywhere in the app." })
300
320
  ] }),
301
321
  /* @__PURE__ */ r("th", { className: "py-1 text-center font-semibold", children: [
302
322
  "Push",
303
- /* @__PURE__ */ t(N, { text: "A browser / device alert (the popup you get even with the tab closed) on devices where notifications are allowed. Off keeps the in-app row but stops the device alert. Quiet hours pause pushes too." })
323
+ /* @__PURE__ */ t(w, { text: "A browser / device alert (the popup you get even with the tab closed) on devices where notifications are allowed. Off keeps the in-app row but stops the device alert. Quiet hours pause pushes too." })
304
324
  ] }),
305
325
  /* @__PURE__ */ r("th", { className: "py-1 text-center font-semibold", children: [
306
326
  "Email",
307
- /* @__PURE__ */ t(N, { text: "Individual email = one message as each event happens. Daily summary = held and delivered once a day in the action summary. No email = never emailed for this category (in-app and push are unaffected)." })
327
+ /* @__PURE__ */ t(w, { text: "Individual email = one message as each event happens. Daily summary = held and delivered once a day in the action summary. No email = never emailed for this category (in-app and push are unaffected)." })
308
328
  ] }),
309
329
  (p == null ? void 0 : p.available) && /* @__PURE__ */ r("th", { className: "py-1 text-center font-semibold", "data-teams-column": "", children: [
310
330
  "Teams",
311
- /* @__PURE__ */ t(N, { text: "A message from the Nivaro bot in Microsoft Teams. Off by default: connect Teams, then turn on the categories wanted there." }),
331
+ /* @__PURE__ */ t(w, { text: "A message from the Nivaro bot in Microsoft Teams. Off by default: connect Teams, then turn on the categories wanted there." }),
312
332
  p.header
313
333
  ] }),
314
- w && /* @__PURE__ */ t("th", { className: "py-1 text-center font-semibold", children: w.header }),
334
+ N && /* @__PURE__ */ t("th", { className: "py-1 text-center font-semibold", children: N.header }),
315
335
  /* @__PURE__ */ r("th", { className: "py-1 text-center font-semibold", children: [
316
336
  "Quiet hours",
317
337
  /* @__PURE__ */ t(
318
- N,
338
+ w,
319
339
  {
320
340
  text: "Ticked = this category still pushes and emails during quiet hours (the in-app row always lands either way). Critical alerts always get through."
321
341
  }
@@ -325,14 +345,14 @@ function ue({
325
345
  ] }) }),
326
346
  /* @__PURE__ */ t("tbody", { children: R.map((e) => {
327
347
  var n, u;
328
- const o = ((n = _.matrix) == null ? void 0 : n[e.key]) ?? {}, s = (c) => k && H(a, l, (g) => {
348
+ const o = ((n = _.matrix) == null ? void 0 : n[e.key]) ?? {}, s = (c) => k && D(a, l, (g) => {
329
349
  var I, B;
330
350
  return (B = (I = g == null ? void 0 : g.matrix) == null ? void 0 : I[e.key]) == null ? void 0 : B[c];
331
351
  }) === "role", d = (u = a.matrix) == null ? void 0 : u[e.key];
332
352
  return /* @__PURE__ */ r("tr", { className: "border-t border-slate-100 dark:border-border", children: [
333
353
  /* @__PURE__ */ r("td", { className: "py-1.5 text-slate-700 dark:text-foreground", children: [
334
354
  e.label,
335
- /* @__PURE__ */ t(N, { text: e.help })
355
+ /* @__PURE__ */ t(w, { text: e.help })
336
356
  ] }),
337
357
  ["inapp", "push"].map((c) => /* @__PURE__ */ r("td", { className: "py-1.5 text-center", children: [
338
358
  /* @__PURE__ */ t(
@@ -351,10 +371,10 @@ function ue({
351
371
  ] }, c)),
352
372
  /* @__PURE__ */ t("td", { className: "py-1 text-center", children: /* @__PURE__ */ r("div", { className: "inline-flex items-center", children: [
353
373
  /* @__PURE__ */ t(
354
- D,
374
+ Y,
355
375
  {
356
376
  ariaLabel: `Email for ${e.label}`,
357
- value: z(e.key),
377
+ value: X(e.key),
358
378
  options: j,
359
379
  onChange: (c) => L(e.key, "email", c)
360
380
  }
@@ -362,7 +382,7 @@ function ue({
362
382
  /* @__PURE__ */ t(
363
383
  S,
364
384
  {
365
- show: k && K(e.key) === "role",
385
+ show: k && z(e.key) === "role",
366
386
  roleName: i
367
387
  }
368
388
  )
@@ -383,7 +403,7 @@ function ue({
383
403
  ),
384
404
  /* @__PURE__ */ t(S, { show: s("teams"), roleName: i })
385
405
  ] }),
386
- w && /* @__PURE__ */ t("td", { className: "py-1 text-center", children: w.cell(e.key, e.label) }),
406
+ N && /* @__PURE__ */ t("td", { className: "py-1 text-center", children: N.cell(e.key, e.label) }),
387
407
  /* @__PURE__ */ r("td", { className: "py-1.5 text-center", children: [
388
408
  /* @__PURE__ */ t(
389
409
  "input",
@@ -393,7 +413,7 @@ function ue({
393
413
  onChange: () => L(
394
414
  e.key,
395
415
  "quiet_override",
396
- o.quiet_override === !0 ? X(e.key).quiet_override === !0 ? !1 : void 0 : !0
416
+ o.quiet_override === !0 ? V(e.key).quiet_override === !0 ? !1 : void 0 : !0
397
417
  ),
398
418
  disabled: b,
399
419
  "aria-label": `Let ${e.label} through quiet hours`,
@@ -434,7 +454,7 @@ function ue({
434
454
  for (const d of Q)
435
455
  s[d.key] = { ...s[d.key] ?? {}, email: e.value };
436
456
  o.matrix = s;
437
- }), e.value !== "off" && (A == null || A(e.value));
457
+ }), e.value !== "off" && (q == null || q(e.value));
438
458
  },
439
459
  className: "rounded border border-slate-200 px-2 py-0.5 hover:border-slate-400 hover:text-slate-800 dark:border-border dark:hover:text-foreground",
440
460
  children: e.label
@@ -459,7 +479,7 @@ function ue({
459
479
  /* @__PURE__ */ r("th", { className: "py-1 font-semibold", children: [
460
480
  "Push after",
461
481
  /* @__PURE__ */ t(
462
- N,
482
+ w,
463
483
  {
464
484
  text: `Still unread after this long → a browser / device push (needs a registered device; quiet hours do not apply to escalations ${te} asked for).`
465
485
  }
@@ -467,7 +487,7 @@ function ue({
467
487
  ] }),
468
488
  /* @__PURE__ */ r("th", { className: "py-1 font-semibold", children: [
469
489
  "Email after",
470
- /* @__PURE__ */ t(N, { text: "Still unread after this long → one email with the notification, regardless of the Email column above." })
490
+ /* @__PURE__ */ t(w, { text: "Still unread after this long → one email with the notification, regardless of the Email column above." })
471
491
  ] }),
472
492
  k && /* @__PURE__ */ t("th", { className: "w-6 py-1", "aria-label": "Reset" })
473
493
  ] }) }),
@@ -476,20 +496,20 @@ function ue({
476
496
  const o = ((s = _.escalation) == null ? void 0 : s[e.key]) ?? {};
477
497
  return /* @__PURE__ */ r("tr", { className: "border-t border-slate-100 dark:border-border", children: [
478
498
  /* @__PURE__ */ t("td", { className: "py-1 text-slate-700 dark:text-foreground", children: e.label }),
479
- W.map((n) => /* @__PURE__ */ t("td", { className: "py-1", children: /* @__PURE__ */ r("span", { className: "inline-flex items-center", children: [
499
+ H.map((n) => /* @__PURE__ */ t("td", { className: "py-1", children: /* @__PURE__ */ r("span", { className: "inline-flex items-center", children: [
480
500
  /* @__PURE__ */ t(
481
- D,
501
+ Y,
482
502
  {
483
503
  ariaLabel: `${n === "push_after_min" ? "Push" : "Email"} after for ${e.label}`,
484
504
  value: o[n] ? String(o[n]) : "",
485
505
  options: ee,
486
- onChange: (u) => V(e.key, n, u ? Number(u) : null)
506
+ onChange: (u) => K(e.key, n, u ? Number(u) : null)
487
507
  }
488
508
  ),
489
509
  /* @__PURE__ */ t(
490
510
  S,
491
511
  {
492
- show: k && H(a, l, (u) => {
512
+ show: k && D(a, l, (u) => {
493
513
  var c, g;
494
514
  return (g = (c = u == null ? void 0 : u.escalation) == null ? void 0 : c[e.key]) == null ? void 0 : g[n];
495
515
  }) === "role",
@@ -6,13 +6,15 @@ function f(e) {
6
6
  url: e.url
7
7
  };
8
8
  }
9
- function y(e) {
10
- const l = e.count;
11
- return `${l} thing${l === 1 ? "" : "s"} on ${e.label}`;
9
+ function p(e) {
10
+ const o = e.count;
11
+ return `${o} thing${o === 1 ? "" : "s"} on ${e.label}`;
12
12
  }
13
13
  const u = {
14
14
  mentions: "Mentions",
15
15
  workflow: "Workflow",
16
+ proposals: "Change proposals",
17
+ approval_changes: "Changed after approval",
16
18
  sla: "SLA",
17
19
  watch: "Watches",
18
20
  alerts: "Alerts",
@@ -23,10 +25,10 @@ const u = {
23
25
  other: "Other"
24
26
  };
25
27
  function h(e) {
26
- const l = u[e];
27
- return l || e.replace(/_/g, " ").replace(/\b\w/g, (r) => r.toUpperCase());
28
+ const o = u[e];
29
+ return o || e.replace(/_/g, " ").replace(/\b\w/g, (r) => r.toUpperCase());
28
30
  }
29
- function x(e) {
31
+ function y(e) {
30
32
  return e === "critical" ? {
31
33
  dot: "bg-red-500",
32
34
  text: "text-red-700 dark:text-red-400",
@@ -41,20 +43,20 @@ function x(e) {
41
43
  chip: "bg-nvr-cyan/10 text-nvr-navy dark:bg-nvr-cyan/15 dark:text-nvr-cyan"
42
44
  };
43
45
  }
44
- function m(e) {
45
- const l = /* @__PURE__ */ new Map();
46
+ function x(e) {
47
+ const o = /* @__PURE__ */ new Map();
46
48
  for (const t of e) {
47
49
  if (!t.collection || !t.item || t.collection.startsWith("__")) continue;
48
- const o = `${t.collection}:${t.item}`;
49
- l.set(o, [...l.get(o) ?? [], t]);
50
+ const l = `${t.collection}:${t.item}`;
51
+ o.set(l, [...o.get(l) ?? [], t]);
50
52
  }
51
- const r = /* @__PURE__ */ new Set(), c = [], i = { critical: 0, needs_you: 1, fyi: 2 };
52
- for (const t of l.values()) {
53
+ const r = /* @__PURE__ */ new Set(), c = [], a = { critical: 0, needs_you: 1, fyi: 2 };
54
+ for (const t of o.values()) {
53
55
  if (t.length < 2) continue;
54
56
  for (const n of t) r.add(n.id);
55
- const o = t.filter((n) => !n.read), d = (o.length > 0 ? o : t).reduce((n, a) => {
56
- const s = a.lane && a.lane in i ? a.lane : "needs_you";
57
- return i[s] < i[n] ? s : n;
57
+ const l = t.filter((n) => !n.read), d = (l.length > 0 ? l : t).reduce((n, i) => {
58
+ const s = i.lane && i.lane in a ? i.lane : "needs_you";
59
+ return a[s] < a[n] ? s : n;
58
60
  }, "fyi");
59
61
  c.push({
60
62
  collection: String(t[0].collection),
@@ -63,7 +65,7 @@ function m(e) {
63
65
  deleted: !1,
64
66
  collection_label: null,
65
67
  count: t.length,
66
- unread: o.length,
68
+ unread: l.length,
67
69
  lane: d,
68
70
  categories: [...new Set(t.map((n) => n.category).filter(Boolean))],
69
71
  newest: t[0].created_at ?? null,
@@ -76,8 +78,8 @@ function m(e) {
76
78
  }
77
79
  export {
78
80
  f as bundleAsNotification,
79
- y as bundleHeadline,
80
- m as bundleLocally,
81
+ p as bundleHeadline,
82
+ x as bundleLocally,
81
83
  h as categoryChipLabel,
82
- x as laneTone
84
+ y as laneTone
83
85
  };
@@ -0,0 +1,25 @@
1
+ import { getDisplayTimezone as c } from "../../lib/utils.js";
2
+ function y(t, n = /* @__PURE__ */ new Date()) {
3
+ if (!(t != null && t.text)) return null;
4
+ const e = new Date(t.at);
5
+ if (Number.isNaN(e.getTime())) return t.text;
6
+ const i = c(), m = i ? { timeZone: i } : {}, a = (o) => new Intl.DateTimeFormat("en-US", {
7
+ ...m,
8
+ year: "numeric",
9
+ month: "numeric",
10
+ day: "numeric"
11
+ }).format(o), r = a(e) === a(n), u = new Intl.DateTimeFormat("en-US", {
12
+ ...m,
13
+ ...r ? {} : { month: "short", day: "numeric" },
14
+ hour: "numeric",
15
+ minute: "2-digit"
16
+ }).format(e);
17
+ return `${t.text} · ${u}`;
18
+ }
19
+ function D(t) {
20
+ return !t || !Array.isArray(t.items) || t.count < 2 ? [] : [...t.items].sort((n, e) => new Date(e.at).getTime() - new Date(n.at).getTime());
21
+ }
22
+ export {
23
+ D as foldItems,
24
+ y as resolvedLabel
25
+ };
@@ -3,6 +3,7 @@ import { useQuery as f, useQueryClient as q, useMutation as k } from "@tanstack/
3
3
  import { useMemo as L, useState as g, useEffect as y } from "react";
4
4
  import { useNivaroClient as p } from "../../context.js";
5
5
  import { get as N, post as v } from "../../lib/commands.js";
6
+ import { useLiveJobs as R } from "../../lib/live-views.js";
6
7
  import { formatRelative as w } from "../../lib/utils.js";
7
8
  const _ = {
8
9
  running: "bg-sky-100 text-sky-800 dark:bg-sky-900/40 dark:text-sky-200",
@@ -10,21 +11,21 @@ const _ = {
10
11
  error: "bg-rose-100 text-rose-800 dark:bg-rose-900/40 dark:text-rose-200",
11
12
  cancelled: "bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-200"
12
13
  };
13
- function R({ id: t, onDone: i }) {
14
- const d = p(), c = f({
14
+ function S({ id: t, onDone: c }) {
15
+ const u = p(), o = f({
15
16
  queryKey: ["ops-task-run", t],
16
- queryFn: () => d.request(N(`/ops-tasks/runs/${t}`)).then((l) => l.data),
17
- refetchInterval: (l) => {
18
- var o;
19
- return ((o = l.state.data) == null ? void 0 : o.status) === "running" ? 1500 : !1;
17
+ queryFn: () => u.request(N(`/ops-tasks/runs/${t}`)).then((n) => n.data),
18
+ refetchInterval: (n) => {
19
+ var l;
20
+ return ((l = n.state.data) == null ? void 0 : l.status) === "running" ? 1500 : !1;
20
21
  }
21
- }), e = c.data;
22
+ }), e = o.data;
22
23
  y(() => {
23
- e && e.status !== "running" && i();
24
+ e && e.status !== "running" && c();
24
25
  }, [e == null ? void 0 : e.status]);
25
- const n = k({
26
- mutationFn: () => d.request(v(`/ops-tasks/runs/${t}/cancel`, {})),
27
- onSuccess: () => c.refetch()
26
+ const i = k({
27
+ mutationFn: () => u.request(v(`/ops-tasks/runs/${t}/cancel`, {})),
28
+ onSuccess: () => o.refetch()
28
29
  });
29
30
  return e ? /* @__PURE__ */ a(
30
31
  "div",
@@ -55,7 +56,7 @@ function R({ id: t, onDone: i }) {
55
56
  {
56
57
  type: "button",
57
58
  className: "ml-auto text-[11px] text-rose-600 underline-offset-2 hover:underline dark:text-rose-300",
58
- onClick: () => n.mutate(),
59
+ onClick: () => i.mutate(),
59
60
  "data-ops-task-cancel": !0,
60
61
  children: "Cancel"
61
62
  }
@@ -63,17 +64,17 @@ function R({ id: t, onDone: i }) {
63
64
  ] }),
64
65
  e.outcome && /* @__PURE__ */ a("div", { className: "mt-2 text-[12px] text-slate-800 dark:text-slate-100", "data-ops-task-outcome": !0, children: [
65
66
  /* @__PURE__ */ s("div", { className: "font-medium", children: e.outcome.summary }),
66
- e.outcome.counts && /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap gap-2", children: Object.entries(e.outcome.counts).map(([l, o]) => /* @__PURE__ */ a(
67
+ e.outcome.counts && /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap gap-2", children: Object.entries(e.outcome.counts).map(([n, l]) => /* @__PURE__ */ a(
67
68
  "span",
68
69
  {
69
70
  className: "rounded bg-white px-2 py-0.5 text-[11px] text-slate-700 ring-1 ring-slate-200 dark:bg-slate-800 dark:text-slate-200 dark:ring-slate-700",
70
71
  children: [
71
- /* @__PURE__ */ s("span", { className: "font-semibold tabular-nums", children: o.toLocaleString() }),
72
+ /* @__PURE__ */ s("span", { className: "font-semibold tabular-nums", children: l.toLocaleString() }),
72
73
  " ",
73
- l.replace(/_/g, " ")
74
+ n.replace(/_/g, " ")
74
75
  ]
75
76
  },
76
- l
77
+ n
77
78
  )) }),
78
79
  e.outcome.backup_tables && e.outcome.backup_tables.length > 0 && /* @__PURE__ */ a("div", { className: "mt-1 text-[11px] text-slate-500", children: [
79
80
  "Backups: ",
@@ -98,22 +99,22 @@ function R({ id: t, onDone: i }) {
98
99
  }
99
100
  ) : /* @__PURE__ */ s("div", { className: "text-[12px] text-slate-500", children: "Loading run…" });
100
101
  }
101
- function S({ task: t, onNotice: i }) {
102
+ function T({ task: t, onNotice: c }) {
102
103
  var x, b;
103
- const d = p(), c = q(), [e, n] = g(((x = t.running) == null ? void 0 : x.id) ?? null), [l, o] = g(!1);
104
+ const u = p(), o = q(), [e, i] = g(((x = t.running) == null ? void 0 : x.id) ?? null), [n, l] = g(!1);
104
105
  y(() => {
105
106
  var r;
106
- (r = t.running) != null && r.id && n(t.running.id);
107
+ (r = t.running) != null && r.id && i(t.running.id);
107
108
  }, [(b = t.running) == null ? void 0 : b.id]);
108
- const u = k({
109
- mutationFn: (r) => d.request(
109
+ const d = k({
110
+ mutationFn: (r) => u.request(
110
111
  v(`/ops-tasks/${encodeURIComponent(t.key)}/run`, { execute: r })
111
112
  ).then((C) => C.data),
112
113
  onSuccess: (r) => {
113
- n(r.id), o(!1), c.invalidateQueries({ queryKey: ["ops-tasks"] });
114
+ i(r.id), l(!1), o.invalidateQueries({ queryKey: ["ops-tasks"] });
114
115
  },
115
- onError: (r) => i == null ? void 0 : i((r == null ? void 0 : r.message) ?? "The task could not start")
116
- }), m = !!t.running || u.isPending;
116
+ onError: (r) => c == null ? void 0 : c((r == null ? void 0 : r.message) ?? "The task could not start")
117
+ }), m = !!t.running || d.isPending;
117
118
  return /* @__PURE__ */ a(
118
119
  "section",
119
120
  {
@@ -159,19 +160,19 @@ function S({ task: t, onNotice: i }) {
159
160
  {
160
161
  type: "button",
161
162
  disabled: !t.available || m,
162
- onClick: () => u.mutate(!1),
163
+ onClick: () => d.mutate(!1),
163
164
  className: "h-8 rounded-md border border-slate-200 bg-white px-3 text-[12px] font-medium text-slate-700 hover:bg-slate-50 disabled:opacity-50 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-100 dark:hover:bg-slate-700",
164
165
  "data-ops-task-dry": !0,
165
166
  children: "Dry run"
166
167
  }
167
168
  ),
168
- l ? /* @__PURE__ */ a(h, { children: [
169
+ n ? /* @__PURE__ */ a(h, { children: [
169
170
  /* @__PURE__ */ s(
170
171
  "button",
171
172
  {
172
173
  type: "button",
173
174
  disabled: m,
174
- onClick: () => u.mutate(!0),
175
+ onClick: () => d.mutate(!0),
175
176
  className: "h-8 rounded-md bg-rose-600 px-3 text-[12px] font-semibold text-white hover:bg-rose-700 disabled:opacity-50",
176
177
  "data-ops-task-execute-confirm": !0,
177
178
  children: "Yes, run it for real"
@@ -181,7 +182,7 @@ function S({ task: t, onNotice: i }) {
181
182
  "button",
182
183
  {
183
184
  type: "button",
184
- onClick: () => o(!1),
185
+ onClick: () => l(!1),
185
186
  className: "h-8 px-2 text-[12px] text-slate-500 hover:underline",
186
187
  children: "Cancel"
187
188
  }
@@ -191,7 +192,7 @@ function S({ task: t, onNotice: i }) {
191
192
  {
192
193
  type: "button",
193
194
  disabled: !t.available || m,
194
- onClick: () => o(!0),
195
+ onClick: () => l(!0),
195
196
  className: "h-8 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white hover:opacity-90 disabled:opacity-50",
196
197
  "data-ops-task-execute": !0,
197
198
  children: "Run"
@@ -199,7 +200,7 @@ function S({ task: t, onNotice: i }) {
199
200
  )
200
201
  ] })
201
202
  ] }),
202
- e != null && /* @__PURE__ */ s(R, { id: e, onDone: () => c.invalidateQueries({ queryKey: ["ops-tasks"] }) }),
203
+ e != null && /* @__PURE__ */ s(S, { id: e, onDone: () => o.invalidateQueries({ queryKey: ["ops-tasks"] }) }),
203
204
  t.runs.length > 0 && /* @__PURE__ */ a("details", { className: "mt-3", children: [
204
205
  /* @__PURE__ */ a("summary", { className: "cursor-pointer text-[11px] text-slate-500", children: [
205
206
  "Last ",
@@ -213,7 +214,7 @@ function S({ task: t, onNotice: i }) {
213
214
  {
214
215
  type: "button",
215
216
  className: "text-slate-700 underline-offset-2 hover:underline dark:text-slate-200",
216
- onClick: () => n(r.id),
217
+ onClick: () => i(r.id),
217
218
  children: w(r.started_at)
218
219
  }
219
220
  ),
@@ -247,26 +248,26 @@ function S({ task: t, onNotice: i }) {
247
248
  }
248
249
  );
249
250
  }
250
- function Q({ onNotice: t }) {
251
- var e;
252
- const i = p(), d = f({
251
+ function D({ onNotice: t }) {
252
+ var i;
253
+ const c = p(), u = R({ keys: [["ops-tasks"]] }), o = f({
253
254
  queryKey: ["ops-tasks"],
254
- queryFn: () => i.request(N("/ops-tasks")).then((n) => n.data),
255
+ queryFn: () => c.request(N("/ops-tasks")).then((n) => n.data),
255
256
  refetchInterval: (n) => {
256
257
  var l;
257
- return (l = n.state.data) != null && l.some((o) => o.running) ? 3e3 : !1;
258
+ return (l = n.state.data) != null && l.some((d) => d.running) ? u ? 15e3 : 3e3 : !1;
258
259
  }
259
- }), c = L(() => {
260
+ }), e = L(() => {
260
261
  const n = /* @__PURE__ */ new Map();
261
- for (const l of d.data ?? []) {
262
- const o = l.group ?? "Tasks";
263
- n.set(o, [...n.get(o) ?? [], l]);
262
+ for (const l of o.data ?? []) {
263
+ const d = l.group ?? "Tasks";
264
+ n.set(d, [...n.get(d) ?? [], l]);
264
265
  }
265
266
  return [...n.entries()];
266
- }, [d.data]);
267
- return d.isLoading ? /* @__PURE__ */ s("div", { className: "p-6 text-[12px] text-slate-500", children: "Loading tasks…" }) : (e = d.data) != null && e.length ? /* @__PURE__ */ s("div", { className: "space-y-6 p-6", "data-ops-tasks": d.data.length, children: c.map(([n, l]) => /* @__PURE__ */ a("div", { children: [
267
+ }, [o.data]);
268
+ return o.isLoading ? /* @__PURE__ */ s("div", { className: "p-6 text-[12px] text-slate-500", children: "Loading tasks…" }) : (i = o.data) != null && i.length ? /* @__PURE__ */ s("div", { className: "space-y-6 p-6", "data-ops-tasks": o.data.length, children: e.map(([n, l]) => /* @__PURE__ */ a("div", { children: [
268
269
  /* @__PURE__ */ s("h2", { className: "mb-2 text-[11px] font-semibold uppercase tracking-wide text-slate-500", children: n }),
269
- /* @__PURE__ */ s("div", { className: "space-y-3", children: l.map((o) => /* @__PURE__ */ s(S, { task: o, onNotice: t }, o.key)) })
270
+ /* @__PURE__ */ s("div", { className: "space-y-3", children: l.map((d) => /* @__PURE__ */ s(T, { task: d, onNotice: t }, d.key)) })
270
271
  ] }, n)) }) : /* @__PURE__ */ a("div", { className: "p-6 text-[13px] text-slate-600 dark:text-slate-300", "data-ops-tasks-empty": !0, children: [
271
272
  "No operational tasks are registered. An extension registers one with",
272
273
  " ",
@@ -275,5 +276,5 @@ function Q({ onNotice: t }) {
275
276
  ] });
276
277
  }
277
278
  export {
278
- Q as OpsTasksView
279
+ D as OpsTasksView
279
280
  };