@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,34 +1,35 @@
1
- import { jsxs as a, jsx as t, Fragment as Ke } from "react/jsx-runtime";
2
- import { useQueryClient as Pe, useQuery as L, useMutation as ue } from "@tanstack/react-query";
3
- import { RefreshCw as Qe, Plus as me, AlertTriangle as Te, Upload as Fe, Ban as ye, MoreHorizontal as Be, ScrollText as ze, RotateCcw as Oe } from "lucide-react";
4
- import { useState as c, useEffect as pe, useMemo as he, useRef as Ue } from "react";
5
- import { useNivaroClient as $e, useItemEditAuth as je, useNavigation as He, useItemNavigation as Ve } from "../../context.js";
6
- import { useDebounced as We } from "../../hooks/useDebounced.js";
7
- import { get as M, post as xe } from "../../lib/commands.js";
8
- import { useLiveEvent as Ge } from "../../lib/live.js";
9
- import { formatNumber as N, cn as D, formatRelative as Ye, formatDateTime as Ze } from "../../lib/utils.js";
10
- import { DataTable as Xe } from "../DataTable.js";
1
+ import { jsxs as a, jsx as t, Fragment as Qe } from "react/jsx-runtime";
2
+ import { useQueryClient as Pe, useQuery as L, useMutation as he } from "@tanstack/react-query";
3
+ import { RefreshCw as Te, Plus as xe, AlertTriangle as Fe, Upload as Be, Ban as ke, MoreHorizontal as ze, ScrollText as Oe, RotateCcw as Ue } from "lucide-react";
4
+ import { useState as u, useEffect as U, useMemo as $, useRef as $e } from "react";
5
+ import { useNivaroClient as je, useItemEditAuth as He, useNavigation as Ve, useItemNavigation as We } from "../../context.js";
6
+ import { useDebounced as Ge } from "../../hooks/useDebounced.js";
7
+ import { get as M, post as ge } from "../../lib/commands.js";
8
+ import { useLiveEvent as Ye } from "../../lib/live.js";
9
+ import { createCoalescer as Ze } from "../../lib/live-counts.js";
10
+ import { formatNumber as N, cn as D, formatRelative as Xe, formatDateTime as Je } from "../../lib/utils.js";
11
+ import { DataTable as et } from "../DataTable.js";
11
12
  import { Button as k } from "../ui/button.js";
12
- import { DropdownMenu as Je, DropdownMenuTrigger as et, DropdownMenuContent as tt, DropdownMenuItem as O } from "../ui/dropdown-menu.js";
13
- import { CollectionImportPanel as rt } from "./CollectionImportPanel.js";
14
- import { DefinitionHealthPanel as at } from "./DefinitionHealthPanel.js";
15
- import { DefinitionsPanel as nt } from "./DefinitionsPanel.js";
16
- import { DownloadSampleButton as ot } from "./DownloadSampleButton.js";
17
- import { NewImportDialog as st } from "./NewImportDialog.js";
18
- import { RunDetailSheet as it } from "./RunDetailSheet.js";
19
- import { LIVE_POLL_MS as ge, queueStanding as fe, STATUS_STYLE as ke, useElapsed as lt, StatusPill as Ne } from "./run-parts.js";
20
- import { RUN_STATUSES as dt, formatDuration as $, definitionTitle as ct, runnerName as ut } from "./types.js";
21
- const be = 25, mt = 3e4, pt = [
13
+ import { DropdownMenu as tt, DropdownMenuTrigger as rt, DropdownMenuContent as at, DropdownMenuItem as j } from "../ui/dropdown-menu.js";
14
+ import { CollectionImportPanel as nt } from "./CollectionImportPanel.js";
15
+ import { DefinitionHealthPanel as ot } from "./DefinitionHealthPanel.js";
16
+ import { DefinitionsPanel as st } from "./DefinitionsPanel.js";
17
+ import { DownloadSampleButton as it } from "./DownloadSampleButton.js";
18
+ import { NewImportDialog as lt } from "./NewImportDialog.js";
19
+ import { RunDetailSheet as dt } from "./RunDetailSheet.js";
20
+ import { LIVE_POLL_MS as fe, queueStanding as be, STATUS_STYLE as Ne, useElapsed as ct, StatusPill as we } from "./run-parts.js";
21
+ import { RUN_STATUSES as ut, formatDuration as V, definitionTitle as mt, runnerName as pt } from "./types.js";
22
+ const ve = 25, ht = 3e4, xt = [
22
23
  { value: "7", label: "7d" },
23
24
  { value: "30", label: "30d" },
24
25
  { value: "90", label: "90d" },
25
26
  { value: "0", label: "All" }
26
- ], ht = {
27
+ ], gt = {
27
28
  runs: "Staged imports",
28
29
  collection: "Collection imports",
29
30
  definitions: "Definitions"
30
31
  };
31
- function U({
32
+ function H({
32
33
  label: o,
33
34
  value: i,
34
35
  sub: l
@@ -39,11 +40,11 @@ function U({
39
40
  l && /* @__PURE__ */ t("p", { className: "mt-1 text-[10.5px] leading-none text-slate-400", children: l })
40
41
  ] });
41
42
  }
42
- function ve({
43
+ function ye({
43
44
  label: o,
44
45
  count: i,
45
46
  status: l,
46
- active: m,
47
+ active: p,
47
48
  onClick: w
48
49
  }) {
49
50
  return /* @__PURE__ */ a(
@@ -51,32 +52,32 @@ function ve({
51
52
  {
52
53
  type: "button",
53
54
  onClick: w,
54
- "aria-pressed": m,
55
+ "aria-pressed": p,
55
56
  className: D(
56
57
  "flex items-center gap-1.5 px-3 py-2 text-left transition-colors hover:bg-slate-50 dark:hover:bg-muted/40",
57
- m && "bg-nvr-cyan/10 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/15",
58
- !m && i === 0 && "opacity-45"
58
+ p && "bg-nvr-cyan/10 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/15",
59
+ !p && i === 0 && "opacity-45"
59
60
  ),
60
61
  children: [
61
- l && /* @__PURE__ */ t("span", { className: D("h-1.5 w-1.5 shrink-0 rounded-full", ke[l].dot) }),
62
+ l && /* @__PURE__ */ t("span", { className: D("h-1.5 w-1.5 shrink-0 rounded-full", Ne[l].dot) }),
62
63
  /* @__PURE__ */ t("span", { className: "text-[14px] font-semibold leading-none tabular-nums text-slate-900 dark:text-foreground", children: i == null ? "—" : N(i) }),
63
64
  /* @__PURE__ */ t("span", { className: "text-[11px] font-medium leading-none text-slate-400 dark:text-muted-foreground", children: o })
64
65
  ]
65
66
  }
66
67
  );
67
68
  }
68
- function xt({
69
+ function ft({
69
70
  run: o,
70
71
  queuedCount: i,
71
72
  stage: l,
72
- standing: m,
73
+ standing: p,
73
74
  canManage: w,
74
75
  onOpen: _,
75
76
  onCancel: I
76
77
  }) {
77
- const d = o.status === "running", p = lt(o.started_at ?? o.created_at, d);
78
+ const d = o.status === "running", c = ct(o.started_at ?? o.created_at, d);
78
79
  return /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-lg border border-[#7ad9f2] bg-nvr-cyan/10 px-3.5 py-2.5 dark:border-[#0e5c72] dark:bg-nvr-cyan/10", children: [
79
- /* @__PURE__ */ t(Ne, { status: d ? "running" : "queued" }),
80
+ /* @__PURE__ */ t(we, { status: d ? "running" : "queued" }),
80
81
  /* @__PURE__ */ t(
81
82
  "button",
82
83
  {
@@ -86,12 +87,12 @@ function xt({
86
87
  children: o.import_key
87
88
  }
88
89
  ),
89
- d && p != null && /* @__PURE__ */ a("span", { className: "font-mono text-[12px] tabular-nums text-slate-600 dark:text-muted-foreground", children: [
90
- $(p),
90
+ d && c != null && /* @__PURE__ */ a("span", { className: "font-mono text-[12px] tabular-nums text-slate-600 dark:text-muted-foreground", children: [
91
+ V(c),
91
92
  " elapsed"
92
93
  ] }),
93
94
  l && /* @__PURE__ */ t("span", { className: "text-[12px] text-slate-600 dark:text-muted-foreground", children: l }),
94
- !d && m && /* @__PURE__ */ t("span", { className: "text-[12px] text-slate-600 dark:text-muted-foreground", children: m }),
95
+ !d && p && /* @__PURE__ */ t("span", { className: "text-[12px] text-slate-600 dark:text-muted-foreground", children: p }),
95
96
  o.row_count != null && /* @__PURE__ */ a("span", { className: "text-[12px] tabular-nums text-slate-500 dark:text-muted-foreground", children: [
96
97
  N(o.row_count),
97
98
  " rows"
@@ -102,105 +103,108 @@ function xt({
102
103
  " more queued"
103
104
  ] }),
104
105
  w && /* @__PURE__ */ a(k, { variant: "ghost", size: "sm", className: "ml-auto h-7 px-2", onClick: I, children: [
105
- /* @__PURE__ */ t(ye, { className: "h-3.5 w-3.5" }),
106
+ /* @__PURE__ */ t(ke, { className: "h-3.5 w-3.5" }),
106
107
  "Stop"
107
108
  ] })
108
109
  ] });
109
110
  }
110
- function Qt({
111
+ function Bt({
111
112
  realtime: o,
112
113
  defaultTab: i = "runs",
113
114
  initialJobId: l,
114
- onJobOpen: m,
115
+ onJobOpen: p,
115
116
  initialRunId: w = null,
116
117
  onRunOpen: _,
117
118
  initialDefinitionKey: I = null
118
119
  }) {
119
- var ie, le, de, ce;
120
- const d = $e(), p = Pe(), { isAdmin: s } = je(), j = He(), { open: we } = Ve(), _e = !!j.itemUrl || !!j.openItem, [b, H] = c(() => l ? "collection" : I && s ? "definitions" : i !== "runs" && !s ? "runs" : i), [h, R] = c("all"), [x, K] = c(""), [V, W] = c(""), [P, G] = c(1), [g, Y] = c("30"), [C, Ce] = c(w), S = (e) => {
121
- Ce(e), _ == null || _(e);
122
- }, [Se, Q] = c(!1), [Z, A] = c(null), [X, qe] = c({}), q = We(V, 300);
123
- pe(() => G(1), [h, x, q, g]);
120
+ var ce, ue, me, pe;
121
+ const d = je(), c = Pe(), { isAdmin: s } = He(), W = Ve(), { open: _e } = We(), Ce = !!W.itemUrl || !!W.openItem, [b, G] = u(() => l ? "collection" : I && s ? "definitions" : i !== "runs" && !s ? "runs" : i), [h, R] = u("all"), [x, K] = u(""), [Y, Z] = u(""), [Q, X] = u(1), [g, J] = u("30"), [C, Se] = u(w), S = (e) => {
122
+ Se(e), _ == null || _(e);
123
+ }, [qe, P] = u(!1), [ee, A] = u(null), [te, De] = u({}), q = Ge(Y, 300);
124
+ U(() => X(1), [h, x, q, g]);
124
125
  const T = L({
125
126
  queryKey: ["staged-import-definitions"],
126
127
  queryFn: () => d.request(
127
128
  M("/staged-imports/definitions", { all: !0 })
128
129
  )
129
- }), f = he(
130
+ }), f = $(
130
131
  () => {
131
132
  var e;
132
133
  return ((e = T.data) == null ? void 0 : e.data) ?? [];
133
134
  },
134
- [(ie = T.data) == null ? void 0 : ie.data]
135
- ), J = L({
135
+ [(ce = T.data) == null ? void 0 : ce.data]
136
+ ), re = L({
136
137
  queryKey: ["staged-import-stats", g],
137
138
  queryFn: () => d.request(M("/staged-imports/stats", { days: g }))
138
- }), r = (le = J.data) == null ? void 0 : le.data, De = ((r == null ? void 0 : r.active.length) ?? 0) > 0 ? ge : mt, v = L({
139
- queryKey: ["staged-import-runs", h, x, q, P, g],
139
+ }), r = (ue = re.data) == null ? void 0 : ue.data, Ie = ((r == null ? void 0 : r.active.length) ?? 0) > 0 ? fe : ht, v = L({
140
+ queryKey: ["staged-import-runs", h, x, q, Q, g],
140
141
  queryFn: () => d.request(
141
142
  M("/staged-imports", {
142
- page: P,
143
- limit: be,
143
+ page: Q,
144
+ limit: ve,
144
145
  days: g,
145
146
  ...h === "all" ? {} : { status: h },
146
147
  ...x ? { key: x } : {},
147
148
  ...q.trim() ? { search: q.trim() } : {}
148
149
  })
149
150
  ),
150
- refetchInterval: De,
151
+ refetchInterval: Ie,
151
152
  // Refetching must not blank the table out from under someone reading it.
152
153
  placeholderData: (e) => e
153
- }), ee = ((de = v.data) == null ? void 0 : de.data) ?? [];
154
+ }), ae = ((me = v.data) == null ? void 0 : me.data) ?? [];
154
155
  function y() {
155
- p.invalidateQueries({ queryKey: ["staged-import-runs"] }), p.invalidateQueries({ queryKey: ["staged-import-stats"] }), p.invalidateQueries({ queryKey: ["collection-import-jobs"] });
156
+ c.invalidateQueries({ queryKey: ["staged-import-runs"] }), c.invalidateQueries({ queryKey: ["staged-import-stats"] }), c.invalidateQueries({ queryKey: ["collection-import-jobs"] });
156
157
  }
157
- const te = Ue(y);
158
- te.current = y, pe(() => {
158
+ const ne = $e(y);
159
+ ne.current = y, U(() => {
159
160
  if (o)
160
161
  return o.subscribe((e) => {
161
- qe((n) => ({
162
+ De((n) => ({
162
163
  ...n,
163
164
  [e.id]: e.stage === "row_count" ? `${N(e.row_count ?? 0)} rows read` : e.stage === "preparing" ? "Preparing the staging table" : e.stage === "importing" ? "Importing the rows" : e.stage === "completed" ? "Completed" : typeof e.error == "string" && e.error ? e.error : "Failed"
164
- })), te.current();
165
+ })), ne.current();
165
166
  });
166
167
  }, [o]);
167
- const Ie = (r == null ? void 0 : r.by_status) ?? {}, E = (r == null ? void 0 : r.active) ?? [], u = E.find((e) => e.status === "running") ?? E[0], Ae = E.filter((e) => e.id !== (u == null ? void 0 : u.id)).length, re = (r == null ? void 0 : r.by_key) ?? {}, ae = E.some((e) => e.status === "queued"), ne = L({
168
+ const Ae = (r == null ? void 0 : r.by_status) ?? {}, E = (r == null ? void 0 : r.active) ?? [], m = E.find((e) => e.status === "running") ?? E[0], Ee = E.filter((e) => e.id !== (m == null ? void 0 : m.id)).length, oe = (r == null ? void 0 : r.by_key) ?? {}, se = E.some((e) => e.status === "queued"), ie = L({
168
169
  queryKey: ["staged-import-queue"],
169
170
  queryFn: () => d.request(M("/staged-imports/queue")).then((e) => e.data ?? []),
170
- enabled: ae,
171
- refetchInterval: ae ? ge * 2 : !1,
171
+ enabled: se,
172
+ refetchInterval: se ? fe * 2 : !1,
172
173
  placeholderData: (e) => e
173
- }), F = he(
174
- () => new Map((ne.data ?? []).map((e) => [e.id, e])),
175
- [ne.data]
174
+ }), F = $(
175
+ () => new Map((ie.data ?? []).map((e) => [e.id, e])),
176
+ [ie.data]
177
+ ), B = $(
178
+ () => Ze(() => void c.invalidateQueries({ queryKey: ["staged-import-stats"] })),
179
+ [c]
176
180
  );
177
- Ge(
181
+ U(() => () => B.cancel(), [B]), Ye(
178
182
  "job:progress",
179
183
  () => {
180
- p.invalidateQueries({ queryKey: ["staged-import-queue"] }), p.invalidateQueries({ queryKey: ["staged-import-runs"] });
184
+ c.invalidateQueries({ queryKey: ["staged-import-queue"] }), c.invalidateQueries({ queryKey: ["staged-import-runs"] }), B.poke();
181
185
  },
182
186
  { match: (e) => (e == null ? void 0 : e.kind) === "import", debounceMs: 400, includeOwn: !0 }
183
187
  );
184
- const oe = ue({
185
- mutationFn: (e) => d.request(xe(`/staged-imports/${e}/requeue`)),
188
+ const le = he({
189
+ mutationFn: (e) => d.request(ge(`/staged-imports/${e}/requeue`)),
186
190
  onSuccess: () => {
187
191
  A(null), y();
188
192
  },
189
193
  onError: (e) => A(e.message)
190
- }), B = ue({
191
- mutationFn: (e) => d.request(xe(`/staged-imports/${e}/cancel`)),
194
+ }), z = he({
195
+ mutationFn: (e) => d.request(ge(`/staged-imports/${e}/cancel`)),
192
196
  onSuccess: () => {
193
197
  A(null), y();
194
198
  },
195
199
  onError: (e) => A(e.message)
196
- }), Ee = [
200
+ }), Le = [
197
201
  {
198
202
  key: "status",
199
203
  header: "Status",
200
204
  className: "w-[150px]",
201
205
  render: (e) => /* @__PURE__ */ a("div", { className: "min-w-0", children: [
202
- /* @__PURE__ */ t(Ne, { status: e.status }),
203
- e.status === "queued" && F.has(e.id) && /* @__PURE__ */ t("p", { className: "mt-0.5 whitespace-normal text-[10.5px] leading-tight text-slate-500 dark:text-muted-foreground", children: fe(F.get(e.id)) })
206
+ /* @__PURE__ */ t(we, { status: e.status }),
207
+ e.status === "queued" && F.has(e.id) && /* @__PURE__ */ t("p", { className: "mt-0.5 whitespace-normal text-[10.5px] leading-tight text-slate-500 dark:text-muted-foreground", children: be(F.get(e.id)) })
204
208
  ] })
205
209
  },
206
210
  {
@@ -239,20 +243,20 @@ function Qt({
239
243
  header: "Duration",
240
244
  className: "w-[90px] text-right",
241
245
  headerClassName: "text-right",
242
- render: (e) => /* @__PURE__ */ t("span", { className: "font-mono text-[11.5px] tabular-nums text-slate-600 dark:text-muted-foreground", children: $(e.duration) })
246
+ render: (e) => /* @__PURE__ */ t("span", { className: "font-mono text-[11.5px] tabular-nums text-slate-600 dark:text-muted-foreground", children: V(e.duration) })
243
247
  },
244
248
  {
245
249
  key: "created_by",
246
250
  header: "Queued by",
247
251
  className: "w-[150px]",
248
252
  render: (e) => {
249
- const n = ut(e);
250
- return n ? e.created_by && _e ? /* @__PURE__ */ t(
253
+ const n = pt(e);
254
+ return n ? e.created_by && Ce ? /* @__PURE__ */ t(
251
255
  "button",
252
256
  {
253
257
  type: "button",
254
- onClick: (Re) => {
255
- Re.stopPropagation(), we({ collection: "nivaro_users", itemId: e.created_by });
258
+ onClick: (Ke) => {
259
+ Ke.stopPropagation(), _e({ collection: "nivaro_users", itemId: e.created_by });
256
260
  },
257
261
  className: "truncate text-[12px] text-slate-600 underline-offset-2 hover:text-nvr-navy hover:underline dark:text-muted-foreground dark:hover:text-nvr-cyan",
258
262
  children: n
@@ -268,8 +272,8 @@ function Qt({
268
272
  "span",
269
273
  {
270
274
  className: "text-[12px] text-slate-500 dark:text-muted-foreground",
271
- title: e.created_at ? Ze(e.created_at) : void 0,
272
- children: e.created_at ? Ye(e.created_at) : "—"
275
+ title: e.created_at ? Je(e.created_at) : void 0,
276
+ children: e.created_at ? Xe(e.created_at) : "—"
273
277
  }
274
278
  )
275
279
  },
@@ -277,39 +281,39 @@ function Qt({
277
281
  key: "__actions__",
278
282
  header: "",
279
283
  className: "w-[44px]",
280
- render: (e) => /* @__PURE__ */ t("div", { onClick: (n) => n.stopPropagation(), onKeyDown: (n) => n.stopPropagation(), children: /* @__PURE__ */ a(Je, { children: [
281
- /* @__PURE__ */ t(et, { asChild: !0, children: /* @__PURE__ */ t(
284
+ render: (e) => /* @__PURE__ */ t("div", { onClick: (n) => n.stopPropagation(), onKeyDown: (n) => n.stopPropagation(), children: /* @__PURE__ */ a(tt, { children: [
285
+ /* @__PURE__ */ t(rt, { asChild: !0, children: /* @__PURE__ */ t(
282
286
  "button",
283
287
  {
284
288
  type: "button",
285
289
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted",
286
290
  "aria-label": `Actions for run ${e.id}`,
287
- children: /* @__PURE__ */ t(Be, { className: "h-4 w-4" })
291
+ children: /* @__PURE__ */ t(ze, { className: "h-4 w-4" })
288
292
  }
289
293
  ) }),
290
- /* @__PURE__ */ a(tt, { align: "end", className: "text-[12.5px]", children: [
291
- /* @__PURE__ */ a(O, { onSelect: () => S(e.id), children: [
292
- /* @__PURE__ */ t(ze, { className: "h-3.5 w-3.5" }),
294
+ /* @__PURE__ */ a(at, { align: "end", className: "text-[12.5px]", children: [
295
+ /* @__PURE__ */ a(j, { onSelect: () => S(e.id), children: [
296
+ /* @__PURE__ */ t(Oe, { className: "h-3.5 w-3.5" }),
293
297
  " View details"
294
298
  ] }),
295
299
  s && /* @__PURE__ */ a(
296
- O,
300
+ j,
297
301
  {
298
302
  disabled: e.status === "running" || !e.file,
299
- onSelect: () => oe.mutate(e.id),
303
+ onSelect: () => le.mutate(e.id),
300
304
  children: [
301
- /* @__PURE__ */ t(Oe, { className: "h-3.5 w-3.5" }),
305
+ /* @__PURE__ */ t(Ue, { className: "h-3.5 w-3.5" }),
302
306
  " Re-queue"
303
307
  ]
304
308
  }
305
309
  ),
306
310
  s && /* @__PURE__ */ a(
307
- O,
311
+ j,
308
312
  {
309
313
  disabled: e.status === "completed",
310
- onSelect: () => B.mutate(e.id),
314
+ onSelect: () => z.mutate(e.id),
311
315
  children: [
312
- /* @__PURE__ */ t(ye, { className: "h-3.5 w-3.5" }),
316
+ /* @__PURE__ */ t(ke, { className: "h-3.5 w-3.5" }),
313
317
  " Cancel"
314
318
  ]
315
319
  }
@@ -317,19 +321,19 @@ function Qt({
317
321
  ] })
318
322
  ] }) })
319
323
  }
320
- ], z = h !== "all" || !!x || !!q.trim(), se = ((r == null ? void 0 : r.all_time_total) ?? 0) === 0 && !J.isLoading, Le = !z && !se && ((r == null ? void 0 : r.total) ?? 0) === 0 && g !== "0", Me = C != null ? ee.find((e) => e.id === C) : void 0;
324
+ ], O = h !== "all" || !!x || !!q.trim(), de = ((r == null ? void 0 : r.all_time_total) ?? 0) === 0 && !re.isLoading, Me = !O && !de && ((r == null ? void 0 : r.total) ?? 0) === 0 && g !== "0", Re = C != null ? ae.find((e) => e.id === C) : void 0;
321
325
  return /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col gap-3", children: [
322
326
  /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
323
327
  /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-1", children: ["runs", "collection", "definitions"].filter((e) => e === "runs" || s).map((e) => /* @__PURE__ */ t(
324
328
  "button",
325
329
  {
326
330
  type: "button",
327
- onClick: () => H(e),
331
+ onClick: () => G(e),
328
332
  className: D(
329
333
  "whitespace-nowrap rounded-md px-2.5 py-1 text-[12.5px] font-medium transition-colors",
330
334
  b === e ? "bg-nvr-cyan/15 text-nvr-navy dark:bg-nvr-cyan/20 dark:text-nvr-cyan" : "text-slate-500 hover:bg-slate-100 hover:text-slate-800 dark:text-muted-foreground dark:hover:bg-muted"
331
335
  ),
332
- children: ht[e]
336
+ children: gt[e]
333
337
  },
334
338
  e
335
339
  )) }),
@@ -343,7 +347,7 @@ function Qt({
343
347
  onClick: y,
344
348
  "aria-label": "Refresh",
345
349
  children: /* @__PURE__ */ t(
346
- Qe,
350
+ Te,
347
351
  {
348
352
  className: D(
349
353
  "h-3.5 w-3.5",
@@ -353,40 +357,40 @@ function Qt({
353
357
  )
354
358
  }
355
359
  ),
356
- s && b === "runs" && /* @__PURE__ */ t(ot, { definitions: f.filter((e) => e.is_active) }),
357
- s && b === "runs" && /* @__PURE__ */ a(k, { size: "sm", className: "h-7", onClick: () => Q(!0), children: [
358
- /* @__PURE__ */ t(me, { className: "h-3.5 w-3.5" }),
360
+ s && b === "runs" && /* @__PURE__ */ t(it, { definitions: f.filter((e) => e.is_active) }),
361
+ s && b === "runs" && /* @__PURE__ */ a(k, { size: "sm", className: "h-7", onClick: () => P(!0), children: [
362
+ /* @__PURE__ */ t(xe, { className: "h-3.5 w-3.5" }),
359
363
  "New import"
360
364
  ] })
361
365
  ] })
362
366
  ] }),
363
- Z && /* @__PURE__ */ a("p", { className: "flex items-center gap-1.5 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-[12px] text-red-700 dark:border-red-900 dark:bg-red-950/40 dark:text-red-400", children: [
364
- /* @__PURE__ */ t(Te, { className: "h-3.5 w-3.5 shrink-0" }),
365
- Z
367
+ ee && /* @__PURE__ */ a("p", { className: "flex items-center gap-1.5 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-[12px] text-red-700 dark:border-red-900 dark:bg-red-950/40 dark:text-red-400", children: [
368
+ /* @__PURE__ */ t(Fe, { className: "h-3.5 w-3.5 shrink-0" }),
369
+ ee
366
370
  ] }),
367
- b === "collection" ? /* @__PURE__ */ t(rt, { initialJobId: l, onJobOpen: m }) : b === "definitions" ? /* @__PURE__ */ t(
368
- nt,
371
+ b === "collection" ? /* @__PURE__ */ t(nt, { initialJobId: l, onJobOpen: p }) : b === "definitions" ? /* @__PURE__ */ t(
372
+ st,
369
373
  {
370
374
  definitions: f,
371
- runCounts: re,
375
+ runCounts: oe,
372
376
  isLoading: T.isLoading,
373
377
  initialKey: I
374
378
  }
375
- ) : /* @__PURE__ */ a(Ke, { children: [
376
- u && /* @__PURE__ */ t(
377
- xt,
379
+ ) : /* @__PURE__ */ a(Qe, { children: [
380
+ m && /* @__PURE__ */ t(
381
+ ft,
378
382
  {
379
- run: u,
380
- queuedCount: Ae,
381
- stage: X[u.id] ?? null,
382
- standing: fe(F.get(u.id)),
383
+ run: m,
384
+ queuedCount: Ee,
385
+ stage: te[m.id] ?? null,
386
+ standing: be(F.get(m.id)),
383
387
  canManage: s,
384
- onOpen: () => S(u.id),
385
- onCancel: () => B.mutate(u.id)
388
+ onOpen: () => S(m.id),
389
+ onCancel: () => z.mutate(m.id)
386
390
  }
387
391
  ),
388
392
  s && f.length > 0 && /* @__PURE__ */ t(
389
- at,
393
+ ot,
390
394
  {
391
395
  definitions: f,
392
396
  selectedKey: x,
@@ -395,7 +399,7 @@ function Qt({
395
399
  ),
396
400
  /* @__PURE__ */ a("div", { className: "flex flex-wrap items-stretch divide-x divide-slate-200 overflow-hidden rounded-lg border border-slate-200 bg-white dark:divide-border dark:border-border dark:bg-card", children: [
397
401
  /* @__PURE__ */ t(
398
- ve,
402
+ ye,
399
403
  {
400
404
  label: "All",
401
405
  count: (r == null ? void 0 : r.total) ?? null,
@@ -403,12 +407,12 @@ function Qt({
403
407
  onClick: () => R("all")
404
408
  }
405
409
  ),
406
- dt.map((e) => /* @__PURE__ */ t(
407
- ve,
410
+ ut.map((e) => /* @__PURE__ */ t(
411
+ ye,
408
412
  {
409
- label: ke[e].label,
413
+ label: Ne[e].label,
410
414
  status: e,
411
- count: Ie[e] ?? 0,
415
+ count: Ae[e] ?? 0,
412
416
  active: h === e,
413
417
  onClick: () => R(h === e ? "all" : e)
414
418
  },
@@ -416,7 +420,7 @@ function Qt({
416
420
  )),
417
421
  /* @__PURE__ */ a("div", { className: "ml-auto flex flex-wrap items-stretch divide-x divide-slate-200 dark:divide-border", children: [
418
422
  /* @__PURE__ */ t(
419
- U,
423
+ H,
420
424
  {
421
425
  label: "Success rate",
422
426
  value: (r == null ? void 0 : r.success_rate) == null ? "—" : `${Math.round(r.success_rate * 100)}%`,
@@ -424,25 +428,25 @@ function Qt({
424
428
  }
425
429
  ),
426
430
  /* @__PURE__ */ t(
427
- U,
431
+ H,
428
432
  {
429
433
  label: "Rows imported",
430
434
  value: r ? N(r.rows_imported) : "—"
431
435
  }
432
436
  ),
433
437
  /* @__PURE__ */ t(
434
- U,
438
+ H,
435
439
  {
436
440
  label: "Median run",
437
- value: $(r == null ? void 0 : r.median_duration),
441
+ value: V(r == null ? void 0 : r.median_duration),
438
442
  sub: "completed runs"
439
443
  }
440
444
  ),
441
- /* @__PURE__ */ t("div", { className: "flex items-center gap-0.5 px-2.5 py-2", children: pt.map((e) => /* @__PURE__ */ t(
445
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-0.5 px-2.5 py-2", children: xt.map((e) => /* @__PURE__ */ t(
442
446
  "button",
443
447
  {
444
448
  type: "button",
445
- onClick: () => Y(e.value),
449
+ onClick: () => J(e.value),
446
450
  className: D(
447
451
  "whitespace-nowrap rounded px-1.5 py-1 text-[11px] font-medium transition-colors",
448
452
  g === e.value ? "bg-nvr-cyan/15 text-nvr-navy dark:bg-nvr-cyan/20 dark:text-nvr-cyan" : "text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted"
@@ -453,19 +457,19 @@ function Qt({
453
457
  )) })
454
458
  ] })
455
459
  ] }),
456
- se ? /* @__PURE__ */ t("div", { className: "rounded-lg border border-dashed border-slate-300 bg-white px-6 py-12 dark:border-border dark:bg-card", children: /* @__PURE__ */ a("div", { className: "max-w-[58ch]", children: [
457
- /* @__PURE__ */ t(Fe, { className: "h-5 w-5 text-slate-300" }),
460
+ de ? /* @__PURE__ */ t("div", { className: "rounded-lg border border-dashed border-slate-300 bg-white px-6 py-12 dark:border-border dark:bg-card", children: /* @__PURE__ */ a("div", { className: "max-w-[58ch]", children: [
461
+ /* @__PURE__ */ t(Be, { className: "h-5 w-5 text-slate-300" }),
458
462
  /* @__PURE__ */ t("h3", { className: "mt-3 text-[15px] font-semibold text-slate-900 dark:text-foreground", children: "No imports have run yet" }),
459
463
  /* @__PURE__ */ t("p", { className: "mt-1.5 text-[12.5px] leading-relaxed text-slate-500 dark:text-muted-foreground", children: "An import reads a file and brings its rows into the records it is defined for. Runs are queued here and picked up by the worker within a few seconds. Runs that share a staging table go one at a time; others run side by side." }),
460
464
  s && /* @__PURE__ */ a("div", { className: "mt-4 flex items-center gap-2", children: [
461
- /* @__PURE__ */ a(k, { size: "sm", onClick: () => Q(!0), children: [
462
- /* @__PURE__ */ t(me, { className: "h-3.5 w-3.5" }),
465
+ /* @__PURE__ */ a(k, { size: "sm", onClick: () => P(!0), children: [
466
+ /* @__PURE__ */ t(xe, { className: "h-3.5 w-3.5" }),
463
467
  " Queue an import"
464
468
  ] }),
465
- f.length === 0 && /* @__PURE__ */ t(k, { variant: "ghost", size: "sm", onClick: () => H("definitions"), children: "Define one first" })
469
+ f.length === 0 && /* @__PURE__ */ t(k, { variant: "ghost", size: "sm", onClick: () => G("definitions"), children: "Define one first" })
466
470
  ] })
467
471
  ] }) }) : /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col gap-2", children: [
468
- Le && /* @__PURE__ */ a("p", { className: "flex flex-wrap items-center gap-2 rounded-md border border-slate-200 bg-white px-3 py-2 text-[12px] text-slate-600 dark:border-border dark:bg-card dark:text-muted-foreground", children: [
472
+ Me && /* @__PURE__ */ a("p", { className: "flex flex-wrap items-center gap-2 rounded-md border border-slate-200 bg-white px-3 py-2 text-[12px] text-slate-600 dark:border-border dark:bg-card dark:text-muted-foreground", children: [
469
473
  "Nothing ran in this window. All ",
470
474
  N((r == null ? void 0 : r.all_time_total) ?? 0),
471
475
  " runs on record are older than it.",
@@ -473,28 +477,28 @@ function Qt({
473
477
  "button",
474
478
  {
475
479
  type: "button",
476
- onClick: () => Y("0"),
480
+ onClick: () => J("0"),
477
481
  className: "font-medium text-nvr-navy underline underline-offset-2 dark:text-nvr-cyan",
478
482
  children: "Show all time"
479
483
  }
480
484
  )
481
485
  ] }),
482
486
  /* @__PURE__ */ t(
483
- Xe,
487
+ et,
484
488
  {
485
- columns: Ee,
486
- rows: ee,
489
+ columns: Le,
490
+ rows: ae,
487
491
  rowKey: (e) => String(e.id),
488
- total: ((ce = v.data) == null ? void 0 : ce.total) ?? 0,
489
- page: P,
490
- limit: be,
491
- onPageChange: G,
492
+ total: ((pe = v.data) == null ? void 0 : pe.total) ?? 0,
493
+ page: Q,
494
+ limit: ve,
495
+ onPageChange: X,
492
496
  isLoading: v.isLoading,
493
497
  isError: v.isError,
494
498
  errorMessage: "Those runs could not be loaded.",
495
499
  onRetry: () => void v.refetch(),
496
- searchValue: V,
497
- onSearchChange: W,
500
+ searchValue: Y,
501
+ onSearchChange: Z,
498
502
  searchPlaceholder: "Search imports, files, run ids…",
499
503
  filterDefs: [
500
504
  {
@@ -503,7 +507,7 @@ function Qt({
503
507
  // placeholder as its own clear-selection item, and a second
504
508
  // option with an empty value is what Radix rejects.
505
509
  placeholder: "All imports",
506
- options: f.map((e) => ({ label: ct(e), value: e.key }))
510
+ options: f.map((e) => ({ label: mt(e), value: e.key }))
507
511
  }
508
512
  ],
509
513
  filterValues: { key: x },
@@ -511,16 +515,16 @@ function Qt({
511
515
  onRowClick: (e) => S(e.id),
512
516
  nowrapCells: !0,
513
517
  minBodyHeight: 280,
514
- emptyMessage: z ? "No runs match these filters." : "No runs in this window — widen it above.",
518
+ emptyMessage: O ? "No runs match these filters." : "No runs in this window — widen it above.",
515
519
  rowClassName: (e) => e.status === "running" ? "bg-nvr-cyan/5 dark:bg-nvr-cyan/10" : void 0,
516
- toolbarRight: z ? /* @__PURE__ */ t(
520
+ toolbarRight: O ? /* @__PURE__ */ t(
517
521
  k,
518
522
  {
519
523
  variant: "ghost",
520
524
  size: "sm",
521
525
  className: "h-7 px-2 text-[12px]",
522
526
  onClick: () => {
523
- R("all"), K(""), W("");
527
+ R("all"), K(""), Z("");
524
528
  },
525
529
  children: "Clear filters"
526
530
  }
@@ -530,24 +534,24 @@ function Qt({
530
534
  ] })
531
535
  ] }),
532
536
  /* @__PURE__ */ t(
533
- it,
537
+ dt,
534
538
  {
535
- run: Me,
539
+ run: Re,
536
540
  runId: C,
537
- stage: C != null ? X[C] ?? null : null,
541
+ stage: C != null ? te[C] ?? null : null,
538
542
  isAdmin: s,
539
543
  onClose: () => S(null),
540
- onRequeue: (e) => oe.mutate(e),
541
- onCancel: (e) => B.mutate(e)
544
+ onRequeue: (e) => le.mutate(e),
545
+ onCancel: (e) => z.mutate(e)
542
546
  }
543
547
  ),
544
548
  s && /* @__PURE__ */ t(
545
- st,
549
+ lt,
546
550
  {
547
- open: Se,
548
- onOpenChange: Q,
551
+ open: qe,
552
+ onOpenChange: P,
549
553
  definitions: f.filter((e) => e.is_active),
550
- runCounts: re,
554
+ runCounts: oe,
551
555
  onQueued: (e) => {
552
556
  y(), S(e);
553
557
  }
@@ -556,5 +560,5 @@ function Qt({
556
560
  ] });
557
561
  }
558
562
  export {
559
- Qt as ImportConsole
563
+ Bt as ImportConsole
560
564
  };