@nivaro/react 0.3.113 → 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 +1727 -19
- 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 +544 -504
- 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/cbv/column-totals.js +75 -67
- 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 +2076 -1686
- package/dist/shared/components/queue/queue-totals.js +92 -0
- package/dist/shared/components/queue/worklist-helpers.js +18 -14
- 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-link.js +56 -50
- 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,70 +1,72 @@
|
|
|
1
|
-
import { jsxs as d, jsx as r, Fragment as
|
|
2
|
-
import { useQueryClient as
|
|
1
|
+
import { jsxs as d, jsx as r, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as j, useMutation as A, useQuery as B } from "@tanstack/react-query";
|
|
3
3
|
import { Satellite as b } from "lucide-react";
|
|
4
4
|
import { useState as v, useEffect as R } from "react";
|
|
5
5
|
import { toast as x } from "sonner";
|
|
6
6
|
import { useNivaroClient as C } from "../../context.js";
|
|
7
|
-
import { post as
|
|
8
|
-
import { integrationChipSummary as
|
|
9
|
-
import { useLiveRefetchInterval as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
import { post as V, get as W } from "../../lib/commands.js";
|
|
8
|
+
import { integrationChipSummary as H, externalRequestsShown as I } from "../../lib/integration-chip.js";
|
|
9
|
+
import { useLiveRefetchInterval as J } from "../../lib/live-queries.js";
|
|
10
|
+
import { sendStatusWords as U } from "../../lib/send-status.js";
|
|
11
|
+
import { cn as w, formatRelative as z } from "../../lib/utils.js";
|
|
12
|
+
import { SubmissionRow as G } from "../integrations/console/SubmissionRow.js";
|
|
13
|
+
import { useRecordObligations as E, IntegrationStatusLines as X } from "../integrations/IntegrationStatusLines.js";
|
|
14
|
+
import { OutboundPreviewSection as Y } from "../integrations/RecordIntegrationPreview.js";
|
|
15
|
+
import { useRecordSendStatus as Z } from "../integrations/SendStatus.js";
|
|
16
|
+
import { Dialog as ee, DialogContent as te, DialogHeader as re, DialogTitle as se, DialogBody as ne } from "../ui/dialog.js";
|
|
17
|
+
import { RecordEventPathSheet as ae } from "./IntegrationActivitySection.js";
|
|
18
|
+
function $(t, s, u, o = !0) {
|
|
19
|
+
const m = C();
|
|
20
|
+
return B({
|
|
19
21
|
queryKey: ["erp-submissions", t, String(s)],
|
|
20
|
-
queryFn: () =>
|
|
21
|
-
|
|
22
|
-
).then((
|
|
23
|
-
enabled:
|
|
22
|
+
queryFn: () => m.request(
|
|
23
|
+
W(`/erp-submissions/${t}/${encodeURIComponent(s)}`)
|
|
24
|
+
).then((a) => a.data ?? []),
|
|
25
|
+
enabled: o && !!t && !!s,
|
|
24
26
|
staleTime: 15e3,
|
|
25
27
|
refetchInterval: u
|
|
26
28
|
});
|
|
27
29
|
}
|
|
28
30
|
const q = /* @__PURE__ */ new Map();
|
|
29
|
-
function
|
|
31
|
+
function Se(t, s, u) {
|
|
30
32
|
var g;
|
|
31
|
-
const
|
|
33
|
+
const o = u && !!s, m = $(t, s ?? "", void 0, o), a = E(t, o ? s ?? "" : ""), c = I({
|
|
32
34
|
layoutOn: u,
|
|
33
35
|
// A viewer refused the record's integrations has nothing to see here.
|
|
34
|
-
partnerIntegration:
|
|
35
|
-
obligations:
|
|
36
|
-
submissions:
|
|
36
|
+
partnerIntegration: a.isError ? !1 : a.partnerIntegration,
|
|
37
|
+
obligations: a.isError ? 0 : a.obligationCount,
|
|
38
|
+
submissions: m.isError ? 0 : ((g = m.data) == null ? void 0 : g.length) ?? null
|
|
37
39
|
});
|
|
38
40
|
return R(() => {
|
|
39
41
|
c !== null && u && q.set(t, c);
|
|
40
|
-
}, [c, t, u]),
|
|
42
|
+
}, [c, t, u]), o ? c ?? q.get(t) ?? !1 : !1;
|
|
41
43
|
}
|
|
42
|
-
function
|
|
44
|
+
function Ne({
|
|
43
45
|
collection: t,
|
|
44
46
|
itemId: s
|
|
45
47
|
}) {
|
|
46
|
-
const u = C(),
|
|
48
|
+
const u = C(), o = j(), [m, a] = v(!1), [c, g] = v(null), [h, S] = v(null);
|
|
47
49
|
R(() => {
|
|
48
|
-
if (!
|
|
50
|
+
if (!m || h == null) return;
|
|
49
51
|
const e = document.querySelector(`[data-submission-id="${h}"]`);
|
|
50
52
|
e == null || e.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
51
|
-
}, [
|
|
52
|
-
const P =
|
|
53
|
-
mutationFn: (e) => u.request(
|
|
53
|
+
}, [m, h]);
|
|
54
|
+
const P = J(6e4), { data: Q, isLoading: D } = $(t, s, P), { data: K } = Z(t, s), f = A({
|
|
55
|
+
mutationFn: (e) => u.request(V(`/erp-submissions/${e}/retry`)),
|
|
54
56
|
onSuccess: (e) => {
|
|
55
|
-
var
|
|
56
|
-
const l = (
|
|
57
|
-
l && l !== "failed" ? x.success("Submission retried successfully") : x.error("Retry failed — expand the request for the error"),
|
|
57
|
+
var N;
|
|
58
|
+
const l = (N = e == null ? void 0 : e.data) == null ? void 0 : N.status;
|
|
59
|
+
l && l !== "failed" ? x.success("Submission retried successfully") : x.error("Retry failed — expand the request for the error"), o.invalidateQueries({ queryKey: ["erp-submissions", t, String(s)] }), o.invalidateQueries({ queryKey: ["erp-submission-attempts"] }), o.invalidateQueries({
|
|
58
60
|
queryKey: ["integration-obligations", "record", t, String(s)]
|
|
59
61
|
});
|
|
60
62
|
},
|
|
61
63
|
onError: () => x.error("Retry failed")
|
|
62
64
|
}), {
|
|
63
65
|
lines: y,
|
|
64
|
-
remediationEnabled:
|
|
65
|
-
isLoading:
|
|
66
|
-
} = E(t, s),
|
|
67
|
-
if (D ||
|
|
66
|
+
remediationEnabled: L,
|
|
67
|
+
isLoading: F
|
|
68
|
+
} = E(t, s), p = Q ?? [];
|
|
69
|
+
if (D || F)
|
|
68
70
|
return /* @__PURE__ */ d(
|
|
69
71
|
"span",
|
|
70
72
|
{
|
|
@@ -76,23 +78,31 @@ function fe({
|
|
|
76
78
|
]
|
|
77
79
|
}
|
|
78
80
|
);
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
+
const _ = new Set(
|
|
82
|
+
(K ?? []).filter((e) => !!U(e).retry_at).map((e) => e.api)
|
|
83
|
+
), n = H(
|
|
84
|
+
y,
|
|
85
|
+
p,
|
|
86
|
+
(e) => e ? z(e) : "",
|
|
87
|
+
_
|
|
88
|
+
), k = /* @__PURE__ */ new Map();
|
|
89
|
+
for (const e of p) {
|
|
81
90
|
const l = (e.external_api_name ?? (e.external_api != null ? `#${e.external_api}` : "External")).toLowerCase();
|
|
82
91
|
k.has(l) || k.set(l, { id: e.id, status: e.status });
|
|
83
92
|
}
|
|
84
|
-
const
|
|
93
|
+
const T = p.length === 0 && n.partners.length === 0, M = {
|
|
85
94
|
ok: "bg-emerald-500",
|
|
86
95
|
attention: "bg-red-500",
|
|
96
|
+
retrying: "bg-amber-500",
|
|
87
97
|
pending: "bg-sky-500",
|
|
88
98
|
neutral: "bg-slate-400 dark:bg-slate-500"
|
|
89
|
-
}, i =
|
|
90
|
-
return /* @__PURE__ */ d(
|
|
91
|
-
|
|
99
|
+
}, i = n.attention;
|
|
100
|
+
return /* @__PURE__ */ d(O, { children: [
|
|
101
|
+
T ? /* @__PURE__ */ d(
|
|
92
102
|
"button",
|
|
93
103
|
{
|
|
94
104
|
type: "button",
|
|
95
|
-
onClick: () =>
|
|
105
|
+
onClick: () => a(!0),
|
|
96
106
|
className: "flex shrink-0 items-center gap-1.5 self-center rounded-md border border-dashed border-slate-200 px-2 py-1 text-[11px] text-slate-500 hover:bg-slate-50 dark:border-border dark:text-slate-400 dark:hover:bg-white/5",
|
|
97
107
|
"data-nvr-external-requests": "none",
|
|
98
108
|
"data-tip": "Nothing from this record has been sent to an outside system yet. Click to see what the first push would carry.",
|
|
@@ -105,18 +115,26 @@ function fe({
|
|
|
105
115
|
"button",
|
|
106
116
|
{
|
|
107
117
|
type: "button",
|
|
108
|
-
onClick: () =>
|
|
118
|
+
onClick: () => a(!0),
|
|
109
119
|
"data-nvr-external-requests": !0,
|
|
110
|
-
"data-integrations-ok":
|
|
120
|
+
"data-integrations-ok": n.ok,
|
|
111
121
|
"data-integrations-attention": i,
|
|
112
122
|
className: w(
|
|
113
123
|
"flex shrink-0 items-center gap-1.5 self-center rounded-md border px-2 py-1 text-[11px] font-medium transition-colors",
|
|
114
|
-
i > 0 ? "border-red-200 text-slate-700 hover:bg-red-50/60 dark:border-red-500/40 dark:text-slate-200 dark:hover:bg-red-500/10" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-border dark:text-slate-300 dark:hover:bg-white/5"
|
|
124
|
+
i > 0 ? "border-red-200 text-slate-700 hover:bg-red-50/60 dark:border-red-500/40 dark:text-slate-200 dark:hover:bg-red-500/10" : n.retrying > 0 ? "border-amber-200 text-slate-700 hover:bg-amber-50/60 dark:border-amber-500/40 dark:text-slate-200 dark:hover:bg-amber-500/10" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-border dark:text-slate-300 dark:hover:bg-white/5"
|
|
115
125
|
),
|
|
116
|
-
title: i > 0 ? `${i} integration ${i === 1 ? "issue needs" : "issues need"} attention — click for details` : "Integrations for this record — partner status and every request sent",
|
|
126
|
+
title: i > 0 ? `${i} integration ${i === 1 ? "issue needs" : "issues need"} attention — click for details` : n.retrying > 0 ? "A send could not get through and will be tried again by itself — click for details" : "Integrations for this record — partner status and every request sent",
|
|
117
127
|
children: [
|
|
118
|
-
/* @__PURE__ */ r(
|
|
119
|
-
|
|
128
|
+
/* @__PURE__ */ r(
|
|
129
|
+
b,
|
|
130
|
+
{
|
|
131
|
+
className: w(
|
|
132
|
+
"h-3.5 w-3.5",
|
|
133
|
+
i > 0 ? "text-red-500" : n.retrying > 0 ? "text-amber-500" : "text-nvr-cyan"
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
n.partners.length <= 3 ? n.partners.map((e) => /* @__PURE__ */ d(
|
|
120
138
|
"span",
|
|
121
139
|
{
|
|
122
140
|
className: "inline-flex items-center gap-1",
|
|
@@ -124,29 +142,29 @@ function fe({
|
|
|
124
142
|
"data-integration-status": e.status,
|
|
125
143
|
"data-tip": e.tip,
|
|
126
144
|
children: [
|
|
127
|
-
/* @__PURE__ */ r("span", { className: w("h-1.5 w-1.5 rounded-full",
|
|
145
|
+
/* @__PURE__ */ r("span", { className: w("h-1.5 w-1.5 rounded-full", M[e.status]) }),
|
|
128
146
|
e.name
|
|
129
147
|
]
|
|
130
148
|
},
|
|
131
149
|
e.name
|
|
132
150
|
)) : /* @__PURE__ */ r("span", { children: "Integrations" }),
|
|
133
|
-
|
|
151
|
+
n.partners.length > 3 && n.ok > 0 && /* @__PURE__ */ r(
|
|
134
152
|
"span",
|
|
135
153
|
{
|
|
136
154
|
"data-integrations-badge": "ok",
|
|
137
155
|
className: "rounded bg-emerald-50 px-1 text-[10.5px] font-semibold text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400",
|
|
138
|
-
children:
|
|
156
|
+
children: n.ok
|
|
139
157
|
}
|
|
140
158
|
),
|
|
141
|
-
|
|
159
|
+
n.partners.length > 3 && n.pending > 0 && /* @__PURE__ */ r(
|
|
142
160
|
"span",
|
|
143
161
|
{
|
|
144
162
|
"data-integrations-badge": "pending",
|
|
145
163
|
className: "rounded bg-sky-50 px-1 text-[10.5px] font-semibold text-sky-700 dark:bg-sky-500/10 dark:text-sky-400",
|
|
146
|
-
children:
|
|
164
|
+
children: n.pending
|
|
147
165
|
}
|
|
148
166
|
),
|
|
149
|
-
i > 0 && /* @__PURE__ */ r(
|
|
167
|
+
n.partners.length > 3 && i > 0 && /* @__PURE__ */ r(
|
|
150
168
|
"span",
|
|
151
169
|
{
|
|
152
170
|
"data-integrations-badge": "attention",
|
|
@@ -157,19 +175,19 @@ function fe({
|
|
|
157
175
|
]
|
|
158
176
|
}
|
|
159
177
|
),
|
|
160
|
-
|
|
161
|
-
/* @__PURE__ */ r(
|
|
178
|
+
m && /* @__PURE__ */ r(ee, { open: !0, onOpenChange: (e) => !e && a(!1), children: /* @__PURE__ */ d(te, { className: "p-5", style: { width: "75%", maxWidth: "75%" }, children: [
|
|
179
|
+
/* @__PURE__ */ r(re, { children: /* @__PURE__ */ d(se, { className: "flex items-center gap-2 text-[15px]", children: [
|
|
162
180
|
/* @__PURE__ */ r(b, { className: "h-4 w-4 text-nvr-cyan" }),
|
|
163
181
|
"Integrations",
|
|
164
182
|
/* @__PURE__ */ d("span", { className: "text-[12px] font-normal text-slate-400", children: [
|
|
165
|
-
|
|
183
|
+
n.partners.length,
|
|
166
184
|
" partner",
|
|
167
|
-
|
|
185
|
+
n.partners.length !== 1 ? "s" : "",
|
|
168
186
|
" ·",
|
|
169
187
|
" ",
|
|
170
|
-
|
|
188
|
+
p.length,
|
|
171
189
|
" request",
|
|
172
|
-
|
|
190
|
+
p.length !== 1 ? "s" : "",
|
|
173
191
|
i > 0 && /* @__PURE__ */ d("span", { className: "ml-1 text-red-600 dark:text-red-400", children: [
|
|
174
192
|
"· ",
|
|
175
193
|
i,
|
|
@@ -179,59 +197,59 @@ function fe({
|
|
|
179
197
|
] })
|
|
180
198
|
] })
|
|
181
199
|
] }) }),
|
|
182
|
-
/* @__PURE__ */ d(
|
|
200
|
+
/* @__PURE__ */ d(ne, { className: "max-h-[65vh] space-y-2 overflow-y-auto", children: [
|
|
183
201
|
/* @__PURE__ */ r(
|
|
184
|
-
|
|
202
|
+
Y,
|
|
185
203
|
{
|
|
186
204
|
collection: t,
|
|
187
205
|
itemId: String(s),
|
|
188
|
-
onShowRequest: (e) =>
|
|
189
|
-
onJump: () =>
|
|
206
|
+
onShowRequest: (e) => S(e),
|
|
207
|
+
onJump: () => a(!1)
|
|
190
208
|
}
|
|
191
209
|
),
|
|
192
210
|
y.length > 0 && /* @__PURE__ */ d("div", { className: "space-y-1.5 pb-2", "data-integrations-partner-status": !0, children: [
|
|
193
211
|
/* @__PURE__ */ r("p", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Partner status" }),
|
|
194
212
|
/* @__PURE__ */ r(
|
|
195
|
-
|
|
213
|
+
X,
|
|
196
214
|
{
|
|
197
215
|
collection: t,
|
|
198
216
|
itemId: s,
|
|
199
217
|
lines: y,
|
|
200
|
-
remediationEnabled:
|
|
218
|
+
remediationEnabled: L,
|
|
201
219
|
actions: {
|
|
202
220
|
newestSubmissionByApi: k,
|
|
203
221
|
onRetry: (e) => f.mutate(e),
|
|
204
|
-
onView: (e) =>
|
|
222
|
+
onView: (e) => S(e),
|
|
205
223
|
onCheck: () => {
|
|
206
|
-
|
|
224
|
+
o.invalidateQueries({
|
|
207
225
|
queryKey: [
|
|
208
226
|
"integration-obligations",
|
|
209
227
|
"record",
|
|
210
228
|
t,
|
|
211
229
|
String(s)
|
|
212
230
|
]
|
|
213
|
-
}),
|
|
231
|
+
}), o.invalidateQueries({
|
|
214
232
|
queryKey: ["erp-submissions", t, String(s)]
|
|
215
233
|
}), x.message("Checking with the partner status…");
|
|
216
234
|
},
|
|
217
235
|
// The pipeline panel takes over (save, requirements
|
|
218
236
|
// dialog, run) — this dialog gets out of its way.
|
|
219
|
-
onRanTransition: () =>
|
|
237
|
+
onRanTransition: () => a(!1)
|
|
220
238
|
}
|
|
221
239
|
}
|
|
222
240
|
)
|
|
223
241
|
] }),
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
242
|
+
p.length > 0 && /* @__PURE__ */ r("p", { className: "pt-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Requests sent" }),
|
|
243
|
+
p.length === 0 && /* @__PURE__ */ r("p", { className: "text-[12px] text-slate-500 dark:text-muted-foreground", children: "No request has been sent from this record yet." }),
|
|
244
|
+
p.map((e) => /* @__PURE__ */ r(
|
|
245
|
+
G,
|
|
228
246
|
{
|
|
229
247
|
sub: e,
|
|
230
248
|
initialOpen: h === e.id,
|
|
231
249
|
onRetry: (l) => f.mutate(l),
|
|
232
250
|
retrying: f.isPending,
|
|
233
251
|
onShowPath: (l) => {
|
|
234
|
-
|
|
252
|
+
a(!1), g(l);
|
|
235
253
|
}
|
|
236
254
|
},
|
|
237
255
|
`${e.id}:${h === e.id ? "focus" : ""}`
|
|
@@ -239,7 +257,7 @@ function fe({
|
|
|
239
257
|
] })
|
|
240
258
|
] }) }),
|
|
241
259
|
/* @__PURE__ */ r(
|
|
242
|
-
|
|
260
|
+
ae,
|
|
243
261
|
{
|
|
244
262
|
target: c != null ? {
|
|
245
263
|
source: "core:outbound",
|
|
@@ -252,6 +270,6 @@ function fe({
|
|
|
252
270
|
] });
|
|
253
271
|
}
|
|
254
272
|
export {
|
|
255
|
-
|
|
256
|
-
|
|
273
|
+
Ne as ExternalRequestsChip,
|
|
274
|
+
Se as useExternalRequestsShown
|
|
257
275
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { newCountLabel as a } from "../../lib/seen-since.js";
|
|
3
|
+
function l({ count: e, tab: r }) {
|
|
4
|
+
const n = a(e);
|
|
5
|
+
return n ? /* @__PURE__ */ t(
|
|
6
|
+
"span",
|
|
7
|
+
{
|
|
8
|
+
"data-new-since": r,
|
|
9
|
+
className: "nvr-fade-in rounded-full bg-nvr-cyan/10 px-1.5 py-px text-[10.5px] font-semibold tabular-nums text-nvr-navy motion-reduce:animate-none dark:bg-nvr-cyan/15 dark:text-nvr-cyan",
|
|
10
|
+
children: n
|
|
11
|
+
}
|
|
12
|
+
) : null;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
l as NewSinceChip
|
|
16
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsxs as u, jsx as p, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as h } from "@tanstack/react-query";
|
|
3
|
+
import { Eye as g, EyeOff as y } from "lucide-react";
|
|
4
|
+
import { useNivaroClient as b } from "../../context.js";
|
|
5
|
+
import { get as x } from "../../lib/commands.js";
|
|
6
|
+
import { formatRelative as v, formatDateTime as d, cn as w } from "../../lib/utils.js";
|
|
7
|
+
import { UserChip as $ } from "../item-edit/UserChip.js";
|
|
8
|
+
const _ = "pipeline-owner-opened";
|
|
9
|
+
function N(e, r = v) {
|
|
10
|
+
var s, n, t;
|
|
11
|
+
if (e.status === "not_opened")
|
|
12
|
+
return {
|
|
13
|
+
lead: "Not opened yet by the owners of this step",
|
|
14
|
+
name: null,
|
|
15
|
+
group: null,
|
|
16
|
+
tail: ` · arrived ${r(e.entered_at)}`
|
|
17
|
+
};
|
|
18
|
+
if (e.status !== "opened") return null;
|
|
19
|
+
const i = e.others > 0 ? ` · ${e.others} other owner${e.others === 1 ? "" : "s"} too` : "", l = (s = e.by) != null && s.covering_for ? `covering for ${e.by.covering_for}` : null;
|
|
20
|
+
return {
|
|
21
|
+
lead: e.by ? null : e.delegate ? "Someone covering for an owner of this step" : "An owner of this step",
|
|
22
|
+
name: ((n = e.by) == null ? void 0 : n.name) ?? null,
|
|
23
|
+
group: l ?? ((t = e.by) == null ? void 0 : t.group) ?? null,
|
|
24
|
+
tail: ` opened this ${r(e.opened_at)}${i}`
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function A({
|
|
28
|
+
collection: e,
|
|
29
|
+
item: r,
|
|
30
|
+
stateId: i,
|
|
31
|
+
className: l
|
|
32
|
+
}) {
|
|
33
|
+
const s = b(), { data: n } = h({
|
|
34
|
+
queryKey: [_, e, r, i],
|
|
35
|
+
queryFn: () => s.request(
|
|
36
|
+
x(`/pipelines/instance/${e}/${r}/owner-opened`)
|
|
37
|
+
).then((f) => f.data ?? null),
|
|
38
|
+
staleTime: 6e4,
|
|
39
|
+
retry: !1
|
|
40
|
+
});
|
|
41
|
+
if (!n || n.status !== "opened" && n.status !== "not_opened") return null;
|
|
42
|
+
const t = N(n);
|
|
43
|
+
if (!t) return null;
|
|
44
|
+
const o = n.status === "opened", m = o ? g : y, a = o ? d(n.opened_at) : d(n.entered_at);
|
|
45
|
+
return /* @__PURE__ */ u(
|
|
46
|
+
"p",
|
|
47
|
+
{
|
|
48
|
+
"data-owner-opened": n.status,
|
|
49
|
+
className: w(
|
|
50
|
+
"flex items-start gap-1.5 text-[11.5px] leading-snug text-slate-500 dark:text-slate-400",
|
|
51
|
+
l
|
|
52
|
+
),
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ p(
|
|
55
|
+
m,
|
|
56
|
+
{
|
|
57
|
+
"aria-hidden": !0,
|
|
58
|
+
className: o ? "mt-px h-3.5 w-3.5 shrink-0 text-emerald-600 dark:text-emerald-400" : "mt-px h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-400"
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ u("span", { "data-tip": o ? `Opened ${a}` : `In this step since ${a}`, children: [
|
|
62
|
+
t.lead,
|
|
63
|
+
o && n.by ? /* @__PURE__ */ u(c, { children: [
|
|
64
|
+
/* @__PURE__ */ p($, { userId: n.by.id, children: /* @__PURE__ */ p(
|
|
65
|
+
"button",
|
|
66
|
+
{
|
|
67
|
+
type: "button",
|
|
68
|
+
"aria-label": `${n.by.name} — profile`,
|
|
69
|
+
className: "rounded font-medium text-slate-700 underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan dark:text-foreground",
|
|
70
|
+
children: t.name
|
|
71
|
+
}
|
|
72
|
+
) }),
|
|
73
|
+
t.group ? ` (${t.group})` : null
|
|
74
|
+
] }) : null,
|
|
75
|
+
t.tail
|
|
76
|
+
] })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
_ as OWNER_OPENED_HEAD,
|
|
83
|
+
A as OwnerOpenedLine,
|
|
84
|
+
N as ownerOpenedWords
|
|
85
|
+
};
|