@nivaro/react 0.3.114 → 0.3.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ScreenShareHost.js +24 -0
- package/dist/full.css +50 -2
- package/dist/hooks/useSessionRecorder.js +61 -60
- package/dist/index.d.ts +1717 -21
- package/dist/index.js +1091 -950
- package/dist/shared/components/ActivityEntry.js +209 -97
- package/dist/shared/components/AgentPresenceChip.js +51 -0
- package/dist/shared/components/AnnouncementBanner.js +56 -41
- package/dist/shared/components/AutolinkedText.js +98 -85
- package/dist/shared/components/BroadcastView.js +149 -141
- package/dist/shared/components/CacheStamp.js +78 -30
- package/dist/shared/components/CollectionBrowserView.js +4088 -3592
- package/dist/shared/components/ConfigChangeStrip.js +63 -0
- package/dist/shared/components/ConfigReachNote.js +107 -0
- package/dist/shared/components/ConformanceView.js +389 -319
- package/dist/shared/components/DataTable.js +1 -0
- package/dist/shared/components/DelegateCoverLine.js +164 -0
- package/dist/shared/components/EnvironmentNotice.js +56 -65
- package/dist/shared/components/FilePreviewLightbox.js +89 -43
- package/dist/shared/components/FindingFixedMark.js +23 -0
- package/dist/shared/components/GridPresenceLine.js +100 -0
- package/dist/shared/components/IdleReloadWatcher.js +82 -43
- package/dist/shared/components/InStep.js +46 -0
- package/dist/shared/components/ItemEditForm.js +5504 -4889
- package/dist/shared/components/LiveAnnouncer.js +62 -0
- package/dist/shared/components/LiveCount.js +54 -0
- package/dist/shared/components/LiveFigure.js +28 -0
- package/dist/shared/components/LiveListControls.js +114 -0
- package/dist/shared/components/LiveNewMatchesPill.js +25 -0
- package/dist/shared/components/LiveOffNote.js +44 -0
- package/dist/shared/components/LivePreferenceHost.js +42 -0
- package/dist/shared/components/LiveRowMark.js +25 -20
- package/dist/shared/components/LiveTraceView.js +257 -0
- package/dist/shared/components/MapView.js +30 -29
- package/dist/shared/components/MatrixEditor.js +497 -462
- package/dist/shared/components/MyWorkView.js +346 -272
- package/dist/shared/components/NotificationBell.js +215 -201
- package/dist/shared/components/PageRenderer.js +636 -599
- package/dist/shared/components/PresenceDot.js +21 -0
- package/dist/shared/components/ProfileView.js +656 -536
- package/dist/shared/components/RealtimeStatusBanner.js +25 -25
- package/dist/shared/components/RecentRecordsRail.js +51 -48
- package/dist/shared/components/RecordCompare.js +241 -150
- package/dist/shared/components/RecordDrilldownSheet.js +66 -64
- package/dist/shared/components/RecordGridEditor.js +350 -311
- package/dist/shared/components/RecordHoverCard.js +147 -0
- package/dist/shared/components/RecordPeekHost.js +111 -0
- package/dist/shared/components/RecordReadView.js +414 -412
- package/dist/shared/components/RelativeTime.js +16 -0
- package/dist/shared/components/ReportView.js +1396 -1304
- package/dist/shared/components/ScreenRefreshButton.js +77 -0
- package/dist/shared/components/TabCountHost.js +10 -0
- package/dist/shared/components/TickerNumber.js +19 -18
- package/dist/shared/components/TipLayer.js +70 -58
- package/dist/shared/components/WidgetImageMenu.js +59 -0
- package/dist/shared/components/WidgetSlot.js +571 -524
- package/dist/shared/components/activity/RecordActivityStream.js +317 -0
- package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
- package/dist/shared/components/cbv/approval-changed.js +20 -0
- package/dist/shared/components/cbv/changed-by-others.js +251 -0
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
- package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
- package/dist/shared/components/change-proposals/types.js +4 -0
- package/dist/shared/components/chat/ChatPanel.js +1571 -1528
- package/dist/shared/components/chat/Composer.js +276 -298
- package/dist/shared/components/chat/room-due.js +13 -0
- package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
- package/dist/shared/components/collections-directory/directory-data.js +75 -63
- package/dist/shared/components/imports/ImportConsole.js +159 -155
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
- package/dist/shared/components/integrations/SendStatus.js +202 -0
- package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
- package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
- package/dist/shared/components/integrations/console/api.js +161 -117
- package/dist/shared/components/integrations/console/tone.js +15 -12
- package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
- package/dist/shared/components/item-edit/CloneDialog.js +208 -206
- package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
- package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
- package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
- package/dist/shared/components/item-edit/FieldComments.js +159 -116
- package/dist/shared/components/item-edit/FieldPointer.js +132 -0
- package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
- package/dist/shared/components/item-edit/FieldRow.js +519 -439
- package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
- package/dist/shared/components/item-edit/FilePickerField.js +454 -369
- package/dist/shared/components/item-edit/GroupSection.js +618 -567
- package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
- package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
- package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
- package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
- package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
- package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
- package/dist/shared/components/item-edit/PickerBadges.js +52 -0
- package/dist/shared/components/item-edit/PlanGrid.js +434 -439
- package/dist/shared/components/item-edit/RecalcValue.js +55 -0
- package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
- package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
- package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
- package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
- package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
- package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
- package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
- package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
- package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
- package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
- package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
- package/dist/shared/components/item-edit/SectionPresence.js +78 -0
- package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
- package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
- package/dist/shared/components/item-edit/coedit/collab.js +84 -0
- package/dist/shared/components/item-edit/coedit/context.js +24 -0
- package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
- package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
- package/dist/shared/components/item-edit/coedit/session.js +382 -0
- package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
- package/dist/shared/components/item-edit/file-live.js +77 -0
- package/dist/shared/components/item-edit/file-processing.js +87 -0
- package/dist/shared/components/item-edit/layout-switch.js +148 -0
- package/dist/shared/components/item-edit/live-related.js +23 -0
- package/dist/shared/components/item-edit/live-title.js +66 -0
- package/dist/shared/components/item-edit/partner-needs.js +142 -0
- package/dist/shared/components/item-edit/removed-line.js +58 -0
- package/dist/shared/components/item-edit/render-stability.js +70 -59
- package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
- package/dist/shared/components/layout-editor/CollabParts.js +72 -70
- package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
- package/dist/shared/components/list/InlineEdit.js +504 -208
- package/dist/shared/components/list/ListViewers.js +81 -0
- package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
- package/dist/shared/components/merge/MergeWithFlow.js +290 -0
- package/dist/shared/components/merge/merge-values.js +110 -0
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
- package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
- package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
- package/dist/shared/components/notifications/bundles.js +21 -19
- package/dist/shared/components/notifications/resolved-line.js +25 -0
- package/dist/shared/components/ops/OpsTasksView.js +45 -44
- package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
- package/dist/shared/components/panels/AlertBanners.js +132 -0
- package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
- package/dist/shared/components/panels/BranchLanes.js +82 -54
- package/dist/shared/components/panels/CommentAwareness.js +332 -0
- package/dist/shared/components/panels/CommentImages.js +219 -0
- package/dist/shared/components/panels/CommentPanel.js +649 -530
- package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
- package/dist/shared/components/panels/NewSinceChip.js +16 -0
- package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
- package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
- package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
- package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
- package/dist/shared/components/panels/SlaClock.js +130 -99
- package/dist/shared/components/panels/TaskPanel.js +308 -287
- package/dist/shared/components/panels/unseen-move-check.js +101 -0
- package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
- package/dist/shared/components/profile/AgentNameField.js +141 -0
- package/dist/shared/components/profile/AgentsPanel.js +55 -46
- package/dist/shared/components/profile/PersonAccess.js +398 -330
- package/dist/shared/components/profile/PersonAdminTools.js +127 -113
- package/dist/shared/components/profile/PersonProfile.js +81 -73
- package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
- package/dist/shared/components/queue/QueueBulkBar.js +101 -84
- package/dist/shared/components/queue/QueueItemSheet.js +66 -66
- package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
- package/dist/shared/components/queue/QueueWorklist.js +1927 -1635
- package/dist/shared/components/send-view/SendViewButton.js +136 -0
- package/dist/shared/components/send-view/SentViewCards.js +147 -0
- package/dist/shared/components/support/ReportProblem.js +1 -0
- package/dist/shared/components/support/ScreenShare.js +554 -0
- package/dist/shared/components/support/SupportView.js +160 -129
- package/dist/shared/components/support/TicketDetailSheet.js +101 -89
- package/dist/shared/components/watch-list/WatchDock.js +1044 -0
- package/dist/shared/components/watch-list/WatchExtras.js +723 -0
- package/dist/shared/components/watch-list/WatchListButton.js +46 -0
- package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
- package/dist/shared/components/watch-list/WatchRows.js +348 -0
- package/dist/shared/lib/activity-sentence.js +87 -75
- package/dist/shared/lib/agent-presence.js +46 -0
- package/dist/shared/lib/approval-progress.js +49 -0
- package/dist/shared/lib/attention-prefs.js +27 -0
- package/dist/shared/lib/cell-locks.js +56 -0
- package/dist/shared/lib/co-edit.js +166 -0
- package/dist/shared/lib/coedit-registry.js +44 -0
- package/dist/shared/lib/comment-awareness.js +124 -0
- package/dist/shared/lib/comment-images.js +45 -0
- package/dist/shared/lib/config-watch.js +94 -0
- package/dist/shared/lib/copy-rules.js +65 -0
- package/dist/shared/lib/count-step.js +30 -0
- package/dist/shared/lib/deadline-ticker.js +68 -0
- package/dist/shared/lib/derived-causes.js +115 -0
- package/dist/shared/lib/draft-store.js +114 -85
- package/dist/shared/lib/error-hints.js +1 -0
- package/dist/shared/lib/field-merge.js +126 -0
- package/dist/shared/lib/filter-sentence.js +10 -10
- package/dist/shared/lib/focus-mode.js +16 -12
- package/dist/shared/lib/grid-cursors.js +77 -0
- package/dist/shared/lib/grid-presence.js +182 -0
- package/dist/shared/lib/idle-reload.js +100 -73
- package/dist/shared/lib/in-step.js +45 -0
- package/dist/shared/lib/integration-chip.js +19 -18
- package/dist/shared/lib/line-locks.js +141 -0
- package/dist/shared/lib/line-split.js +41 -0
- package/dist/shared/lib/linked-changes.js +150 -0
- package/dist/shared/lib/list-return.js +231 -0
- package/dist/shared/lib/list-viewers.js +52 -0
- package/dist/shared/lib/live-announcer.js +86 -0
- package/dist/shared/lib/live-counts.js +85 -0
- package/dist/shared/lib/live-data-changed.js +108 -0
- package/dist/shared/lib/live-deltas.js +81 -0
- package/dist/shared/lib/live-findings.js +113 -0
- package/dist/shared/lib/live-groups.js +122 -0
- package/dist/shared/lib/live-link-labels.js +162 -0
- package/dist/shared/lib/live-list-flow.js +334 -0
- package/dist/shared/lib/live-list.js +143 -129
- package/dist/shared/lib/live-moves.js +51 -0
- package/dist/shared/lib/live-ops.js +26 -26
- package/dist/shared/lib/live-pickers.js +7 -0
- package/dist/shared/lib/live-preference.js +184 -0
- package/dist/shared/lib/live-queries.js +226 -181
- package/dist/shared/lib/live-screen.js +333 -0
- package/dist/shared/lib/live-search.js +108 -0
- package/dist/shared/lib/live-seen.js +35 -0
- package/dist/shared/lib/live-views.js +100 -0
- package/dist/shared/lib/live.js +159 -133
- package/dist/shared/lib/missed-updates.js +198 -0
- package/dist/shared/lib/newer-file.js +56 -0
- package/dist/shared/lib/notification-sound.js +42 -20
- package/dist/shared/lib/own-writes.js +59 -41
- package/dist/shared/lib/picker-badges.js +94 -0
- package/dist/shared/lib/presence-signals.js +131 -84
- package/dist/shared/lib/realtime.js +49 -24
- package/dist/shared/lib/record-gaps.js +85 -0
- package/dist/shared/lib/record-outbox.js +369 -222
- package/dist/shared/lib/record-peek.js +75 -0
- package/dist/shared/lib/record-tabs.js +92 -72
- package/dist/shared/lib/relative-ticker.js +42 -0
- package/dist/shared/lib/request-gate.js +119 -119
- package/dist/shared/lib/rollup-recalc.js +107 -0
- package/dist/shared/lib/room-gaps.js +40 -36
- package/dist/shared/lib/rum.js +137 -87
- package/dist/shared/lib/save-progress.js +20 -0
- package/dist/shared/lib/scheduled-countdown.js +67 -0
- package/dist/shared/lib/screen-refresh.js +160 -0
- package/dist/shared/lib/screen-share.js +234 -0
- package/dist/shared/lib/seen-since.js +74 -0
- package/dist/shared/lib/selection-watch.js +205 -0
- package/dist/shared/lib/send-status.js +132 -0
- package/dist/shared/lib/send-view.js +23 -0
- package/dist/shared/lib/socket-liveness.js +155 -0
- package/dist/shared/lib/socket-realtime.js +168 -140
- package/dist/shared/lib/state-census.js +53 -0
- package/dist/shared/lib/summary-mode.js +61 -39
- package/dist/shared/lib/tab-attention.js +143 -32
- package/dist/shared/lib/table-density.js +64 -0
- package/dist/shared/lib/track-travel.js +40 -0
- package/dist/shared/lib/unseen-changes.js +68 -0
- package/dist/shared/lib/upload-file.js +33 -0
- package/dist/shared/lib/upload-presence.js +127 -0
- package/dist/shared/lib/urgent-chime.js +65 -0
- package/dist/shared/lib/use-online-users.js +32 -11
- package/dist/shared/lib/user-sync.js +155 -39
- package/dist/shared/lib/waiting-count.js +44 -0
- package/dist/shared/lib/watch-desktop.js +83 -0
- package/dist/shared/lib/watch-list.js +447 -0
- package/dist/shared/lib/widget-image-render.js +64 -0
- package/dist/shared/lib/widget-image.js +111 -0
- package/dist/shared/lib/worker-socket.js +130 -104
- package/dist/shared/lib/write-to-screen.js +133 -0
- package/package.json +1 -1
- package/styles.css +49 -1
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { jsxs as a, jsx as t, Fragment as
|
|
2
|
-
import { useQueryClient as Pe, useQuery as L, useMutation as
|
|
3
|
-
import { RefreshCw as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { useDebounced as
|
|
7
|
-
import { get as M, post as
|
|
8
|
-
import { useLiveEvent as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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
|
|
13
|
-
import { CollectionImportPanel as
|
|
14
|
-
import { DefinitionHealthPanel as
|
|
15
|
-
import { DefinitionsPanel as
|
|
16
|
-
import { DownloadSampleButton as
|
|
17
|
-
import { NewImportDialog as
|
|
18
|
-
import { RunDetailSheet as
|
|
19
|
-
import { LIVE_POLL_MS as
|
|
20
|
-
import { RUN_STATUSES as
|
|
21
|
-
const
|
|
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
|
-
],
|
|
27
|
+
], gt = {
|
|
27
28
|
runs: "Staged imports",
|
|
28
29
|
collection: "Collection imports",
|
|
29
30
|
definitions: "Definitions"
|
|
30
31
|
};
|
|
31
|
-
function
|
|
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
|
|
43
|
+
function ye({
|
|
43
44
|
label: o,
|
|
44
45
|
count: i,
|
|
45
46
|
status: l,
|
|
46
|
-
active:
|
|
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":
|
|
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
|
-
|
|
58
|
-
!
|
|
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",
|
|
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
|
|
69
|
+
function ft({
|
|
69
70
|
run: o,
|
|
70
71
|
queuedCount: i,
|
|
71
72
|
stage: l,
|
|
72
|
-
standing:
|
|
73
|
+
standing: p,
|
|
73
74
|
canManage: w,
|
|
74
75
|
onOpen: _,
|
|
75
76
|
onCancel: I
|
|
76
77
|
}) {
|
|
77
|
-
const d = o.status === "running",
|
|
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(
|
|
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 &&
|
|
90
|
-
|
|
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 &&
|
|
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(
|
|
106
|
+
/* @__PURE__ */ t(ke, { className: "h-3.5 w-3.5" }),
|
|
106
107
|
"Stop"
|
|
107
108
|
] })
|
|
108
109
|
] });
|
|
109
110
|
}
|
|
110
|
-
function
|
|
111
|
+
function Bt({
|
|
111
112
|
realtime: o,
|
|
112
113
|
defaultTab: i = "runs",
|
|
113
114
|
initialJobId: l,
|
|
114
|
-
onJobOpen:
|
|
115
|
+
onJobOpen: p,
|
|
115
116
|
initialRunId: w = null,
|
|
116
117
|
onRunOpen: _,
|
|
117
118
|
initialDefinitionKey: I = null
|
|
118
119
|
}) {
|
|
119
|
-
var
|
|
120
|
-
const d =
|
|
121
|
-
|
|
122
|
-
}, [
|
|
123
|
-
|
|
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 =
|
|
130
|
+
}), f = $(
|
|
130
131
|
() => {
|
|
131
132
|
var e;
|
|
132
133
|
return ((e = T.data) == null ? void 0 : e.data) ?? [];
|
|
133
134
|
},
|
|
134
|
-
[(
|
|
135
|
-
),
|
|
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 = (
|
|
139
|
-
queryKey: ["staged-import-runs", h, x, q,
|
|
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:
|
|
143
|
-
limit:
|
|
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:
|
|
151
|
+
refetchInterval: Ie,
|
|
151
152
|
// Refetching must not blank the table out from under someone reading it.
|
|
152
153
|
placeholderData: (e) => e
|
|
153
|
-
}),
|
|
154
|
+
}), ae = ((me = v.data) == null ? void 0 : me.data) ?? [];
|
|
154
155
|
function y() {
|
|
155
|
-
|
|
156
|
+
c.invalidateQueries({ queryKey: ["staged-import-runs"] }), c.invalidateQueries({ queryKey: ["staged-import-stats"] }), c.invalidateQueries({ queryKey: ["collection-import-jobs"] });
|
|
156
157
|
}
|
|
157
|
-
const
|
|
158
|
-
|
|
158
|
+
const ne = $e(y);
|
|
159
|
+
ne.current = y, U(() => {
|
|
159
160
|
if (o)
|
|
160
161
|
return o.subscribe((e) => {
|
|
161
|
-
|
|
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
|
-
})),
|
|
165
|
+
})), ne.current();
|
|
165
166
|
});
|
|
166
167
|
}, [o]);
|
|
167
|
-
const
|
|
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:
|
|
171
|
-
refetchInterval:
|
|
171
|
+
enabled: se,
|
|
172
|
+
refetchInterval: se ? fe * 2 : !1,
|
|
172
173
|
placeholderData: (e) => e
|
|
173
|
-
}), F =
|
|
174
|
-
() => new Map((
|
|
175
|
-
[
|
|
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
|
-
|
|
181
|
+
U(() => () => B.cancel(), [B]), Ye(
|
|
178
182
|
"job:progress",
|
|
179
183
|
() => {
|
|
180
|
-
|
|
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
|
|
185
|
-
mutationFn: (e) => d.request(
|
|
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
|
-
}),
|
|
191
|
-
mutationFn: (e) => d.request(
|
|
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
|
-
}),
|
|
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(
|
|
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:
|
|
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:
|
|
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 =
|
|
250
|
-
return n ? e.created_by &&
|
|
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: (
|
|
255
|
-
|
|
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 ?
|
|
272
|
-
children: 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(
|
|
281
|
-
/* @__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(
|
|
291
|
+
children: /* @__PURE__ */ t(ze, { className: "h-4 w-4" })
|
|
288
292
|
}
|
|
289
293
|
) }),
|
|
290
|
-
/* @__PURE__ */ a(
|
|
291
|
-
/* @__PURE__ */ a(
|
|
292
|
-
/* @__PURE__ */ t(
|
|
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
|
-
|
|
300
|
+
j,
|
|
297
301
|
{
|
|
298
302
|
disabled: e.status === "running" || !e.file,
|
|
299
|
-
onSelect: () =>
|
|
303
|
+
onSelect: () => le.mutate(e.id),
|
|
300
304
|
children: [
|
|
301
|
-
/* @__PURE__ */ t(
|
|
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
|
-
|
|
311
|
+
j,
|
|
308
312
|
{
|
|
309
313
|
disabled: e.status === "completed",
|
|
310
|
-
onSelect: () =>
|
|
314
|
+
onSelect: () => z.mutate(e.id),
|
|
311
315
|
children: [
|
|
312
|
-
/* @__PURE__ */ t(
|
|
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
|
-
],
|
|
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: () =>
|
|
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:
|
|
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
|
-
|
|
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(
|
|
357
|
-
s && b === "runs" && /* @__PURE__ */ a(k, { size: "sm", className: "h-7", onClick: () =>
|
|
358
|
-
/* @__PURE__ */ t(
|
|
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
|
-
|
|
364
|
-
/* @__PURE__ */ t(
|
|
365
|
-
|
|
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(
|
|
368
|
-
|
|
371
|
+
b === "collection" ? /* @__PURE__ */ t(nt, { initialJobId: l, onJobOpen: p }) : b === "definitions" ? /* @__PURE__ */ t(
|
|
372
|
+
st,
|
|
369
373
|
{
|
|
370
374
|
definitions: f,
|
|
371
|
-
runCounts:
|
|
375
|
+
runCounts: oe,
|
|
372
376
|
isLoading: T.isLoading,
|
|
373
377
|
initialKey: I
|
|
374
378
|
}
|
|
375
|
-
) : /* @__PURE__ */ a(
|
|
376
|
-
|
|
377
|
-
|
|
379
|
+
) : /* @__PURE__ */ a(Qe, { children: [
|
|
380
|
+
m && /* @__PURE__ */ t(
|
|
381
|
+
ft,
|
|
378
382
|
{
|
|
379
|
-
run:
|
|
380
|
-
queuedCount:
|
|
381
|
-
stage:
|
|
382
|
-
standing:
|
|
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(
|
|
385
|
-
onCancel: () =>
|
|
388
|
+
onOpen: () => S(m.id),
|
|
389
|
+
onCancel: () => z.mutate(m.id)
|
|
386
390
|
}
|
|
387
391
|
),
|
|
388
392
|
s && f.length > 0 && /* @__PURE__ */ t(
|
|
389
|
-
|
|
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
|
-
|
|
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
|
-
|
|
407
|
-
|
|
410
|
+
ut.map((e) => /* @__PURE__ */ t(
|
|
411
|
+
ye,
|
|
408
412
|
{
|
|
409
|
-
label:
|
|
413
|
+
label: Ne[e].label,
|
|
410
414
|
status: e,
|
|
411
|
-
count:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
438
|
+
H,
|
|
435
439
|
{
|
|
436
440
|
label: "Median run",
|
|
437
|
-
value:
|
|
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:
|
|
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: () =>
|
|
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
|
-
|
|
457
|
-
/* @__PURE__ */ t(
|
|
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: () =>
|
|
462
|
-
/* @__PURE__ */ t(
|
|
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: () =>
|
|
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
|
-
|
|
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: () =>
|
|
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
|
-
|
|
487
|
+
et,
|
|
484
488
|
{
|
|
485
|
-
columns:
|
|
486
|
-
rows:
|
|
489
|
+
columns: Le,
|
|
490
|
+
rows: ae,
|
|
487
491
|
rowKey: (e) => String(e.id),
|
|
488
|
-
total: ((
|
|
489
|
-
page:
|
|
490
|
-
limit:
|
|
491
|
-
onPageChange:
|
|
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:
|
|
497
|
-
onSearchChange:
|
|
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:
|
|
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:
|
|
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:
|
|
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(""),
|
|
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
|
-
|
|
537
|
+
dt,
|
|
534
538
|
{
|
|
535
|
-
run:
|
|
539
|
+
run: Re,
|
|
536
540
|
runId: C,
|
|
537
|
-
stage: C != null ?
|
|
541
|
+
stage: C != null ? te[C] ?? null : null,
|
|
538
542
|
isAdmin: s,
|
|
539
543
|
onClose: () => S(null),
|
|
540
|
-
onRequeue: (e) =>
|
|
541
|
-
onCancel: (e) =>
|
|
544
|
+
onRequeue: (e) => le.mutate(e),
|
|
545
|
+
onCancel: (e) => z.mutate(e)
|
|
542
546
|
}
|
|
543
547
|
),
|
|
544
548
|
s && /* @__PURE__ */ t(
|
|
545
|
-
|
|
549
|
+
lt,
|
|
546
550
|
{
|
|
547
|
-
open:
|
|
548
|
-
onOpenChange:
|
|
551
|
+
open: qe,
|
|
552
|
+
onOpenChange: P,
|
|
549
553
|
definitions: f.filter((e) => e.is_active),
|
|
550
|
-
runCounts:
|
|
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
|
-
|
|
563
|
+
Bt as ImportConsole
|
|
560
564
|
};
|