@nivaro/react 0.3.117 → 0.3.118
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +136 -14
- package/dist/index.js +488 -485
- package/dist/shared/components/ActivityEntry.js +130 -125
- package/dist/shared/components/AgentPresenceChip.js +36 -26
- package/dist/shared/components/CellCopyLayer.js +50 -45
- package/dist/shared/components/CollectionBrowserView.js +3757 -3695
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4220 -4175
- package/dist/shared/components/JobsTray.js +8 -8
- package/dist/shared/components/LiveNewMatchesPill.js +21 -14
- package/dist/shared/components/LiveOffNote.js +3 -2
- package/dist/shared/components/LiveRowMark.js +53 -23
- package/dist/shared/components/LiveTraceView.js +162 -123
- package/dist/shared/components/MyWorkView.js +320 -299
- package/dist/shared/components/NotificationBell.js +14 -14
- package/dist/shared/components/OverflowRail.js +1 -1
- package/dist/shared/components/PageRenderer.js +120 -116
- package/dist/shared/components/ProfileView.js +203 -202
- package/dist/shared/components/RealtimeStatusBanner.js +31 -29
- package/dist/shared/components/RecordDrilldownSheet.js +7 -7
- package/dist/shared/components/RecordHoverCard.js +102 -84
- package/dist/shared/components/RecordReadView.js +146 -146
- package/dist/shared/components/ScreenRefreshButton.js +34 -32
- package/dist/shared/components/TipLayer.js +65 -58
- package/dist/shared/components/WidgetImageMenu.js +83 -43
- package/dist/shared/components/activity/RecordActivityStream.js +175 -173
- package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
- package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
- package/dist/shared/components/collections-directory/page-model.js +72 -67
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
- package/dist/shared/components/integrations/SendStatus.js +65 -59
- package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
- package/dist/shared/components/integrations/console/SignalCard.js +237 -230
- package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +131 -92
- package/dist/shared/components/item-edit/CloneDialog.js +191 -161
- package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
- package/dist/shared/components/item-edit/FieldComments.js +54 -53
- package/dist/shared/components/item-edit/FieldPointer.js +82 -67
- package/dist/shared/components/item-edit/FieldRow.js +106 -100
- package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
- package/dist/shared/components/item-edit/FilePickerField.js +452 -387
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
- package/dist/shared/components/item-edit/HeaderTools.js +94 -85
- package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
- package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
- package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
- package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
- package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
- package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
- package/dist/shared/components/item-edit/RecalcValue.js +57 -32
- package/dist/shared/components/item-edit/RecordHelpChip.js +21 -22
- package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
- package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
- package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
- package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
- package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
- package/dist/shared/components/item-edit/SectionPresence.js +18 -10
- package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
- package/dist/shared/components/item-edit/UserChip.js +1 -1
- package/dist/shared/components/item-edit/file-live.js +69 -54
- package/dist/shared/components/item-edit/layout-switch.js +98 -89
- package/dist/shared/components/item-edit/partner-needs.js +12 -12
- package/dist/shared/components/item-edit/removed-line.js +31 -25
- package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
- package/dist/shared/components/list/ListViewers.js +46 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
- package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
- package/dist/shared/components/panels/AlertBanners.js +82 -72
- package/dist/shared/components/panels/BranchLanes.js +22 -22
- package/dist/shared/components/panels/CommentImages.js +123 -102
- package/dist/shared/components/panels/CommentPanel.js +186 -185
- package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
- package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
- package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
- package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
- package/dist/shared/components/profile/AgentNameField.js +107 -81
- package/dist/shared/components/profile/AgentsPanel.js +184 -184
- package/dist/shared/components/profile/PersonAccess.js +599 -495
- package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
- package/dist/shared/components/profile/SignedInDevices.js +17 -17
- package/dist/shared/components/profile/primitives.js +1 -1
- package/dist/shared/components/queue/OwnerAvatars.js +91 -54
- package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
- package/dist/shared/components/queue/QueueWorklist.js +1002 -983
- package/dist/shared/components/support/AssignRules.js +1733 -0
- package/dist/shared/components/support/PersonPick.js +88 -0
- package/dist/shared/components/support/RequestList.js +790 -0
- package/dist/shared/components/support/ScreenShare.js +158 -152
- package/dist/shared/components/support/SupportRequestDialog.js +50 -48
- package/dist/shared/components/support/SupportView.js +140 -246
- package/dist/shared/components/support/TicketDetailSheet.js +82 -75
- package/dist/shared/components/support/TicketSlowScreens.js +9 -9
- package/dist/shared/components/support/assign-rules-text.js +171 -0
- package/dist/shared/components/support/support-list.js +125 -0
- package/dist/shared/components/ui/SimpleSelect.js +28 -20
- package/dist/shared/components/ui/checkbox.js +6 -6
- package/dist/shared/components/ui/select.js +43 -39
- package/dist/shared/components/ui/sheet.js +9 -9
- package/dist/shared/components/ui/switch.js +12 -11
- package/dist/shared/components/watch-list/WatchDock.js +532 -459
- package/dist/shared/components/watch-list/WatchExtras.js +332 -286
- package/dist/shared/components/watch-list/WatchRows.js +164 -140
- package/dist/shared/lib/activity-sentence.js +103 -91
- package/dist/shared/lib/agent-presence.js +27 -21
- package/dist/shared/lib/approval-progress.js +2 -2
- package/dist/shared/lib/copy-rules.js +31 -24
- package/dist/shared/lib/derived-causes.js +113 -78
- package/dist/shared/lib/grid-cursors.js +26 -26
- package/dist/shared/lib/label-flash.js +27 -0
- package/dist/shared/lib/list-return.js +137 -125
- package/dist/shared/lib/live-deltas.js +40 -34
- package/dist/shared/lib/live-groups.js +56 -52
- package/dist/shared/lib/live-preference.js +64 -59
- package/dist/shared/lib/live-screen.js +223 -192
- package/dist/shared/lib/partner-failure.js +11 -11
- package/dist/shared/lib/rollup-recalc.js +68 -64
- package/dist/shared/lib/screen-refresh.js +74 -68
- package/dist/shared/lib/screen-share.js +108 -104
- package/dist/shared/lib/send-status.js +77 -61
- package/dist/shared/lib/text-diff-window.js +29 -0
- package/dist/shared/lib/watch-list.js +210 -209
- package/dist/shared/lib/widget-image-render.js +72 -49
- package/package.json +1 -1
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import { jsxs as d, jsx as
|
|
1
|
+
import { jsxs as d, jsx as t, Fragment as O } from "react/jsx-runtime";
|
|
2
2
|
import { useQueryClient as j, useMutation as A, useQuery as B } from "@tanstack/react-query";
|
|
3
|
-
import { Satellite as
|
|
3
|
+
import { Satellite as k, Unplug as U, RefreshCw as V, Plug as W } from "lucide-react";
|
|
4
4
|
import { useState as v, useEffect as R } from "react";
|
|
5
|
-
import { toast as
|
|
5
|
+
import { toast as b } 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 { sendStatusWords as
|
|
11
|
-
import { cn as
|
|
12
|
-
import { SubmissionRow as
|
|
13
|
-
import { useRecordObligations as E, IntegrationStatusLines as
|
|
14
|
-
import { OutboundPreviewSection as
|
|
15
|
-
import { useRecordSendStatus as
|
|
16
|
-
import { Dialog as
|
|
17
|
-
import { RecordEventPathSheet as
|
|
18
|
-
function $(
|
|
7
|
+
import { post as H, get as I } from "../../lib/commands.js";
|
|
8
|
+
import { integrationChipSummary as J, externalRequestsShown as z } from "../../lib/integration-chip.js";
|
|
9
|
+
import { useLiveRefetchInterval as G } from "../../lib/live-queries.js";
|
|
10
|
+
import { sendStatusWords as X } from "../../lib/send-status.js";
|
|
11
|
+
import { cn as N, formatRelative as Y } from "../../lib/utils.js";
|
|
12
|
+
import { SubmissionRow as Z } from "../integrations/console/SubmissionRow.js";
|
|
13
|
+
import { useRecordObligations as E, IntegrationStatusLines as ee } from "../integrations/IntegrationStatusLines.js";
|
|
14
|
+
import { OutboundPreviewSection as te } from "../integrations/RecordIntegrationPreview.js";
|
|
15
|
+
import { useRecordSendStatus as re } from "../integrations/SendStatus.js";
|
|
16
|
+
import { Dialog as se, DialogContent as ae, DialogHeader as ne, DialogTitle as ie, DialogBody as oe } from "../ui/dialog.js";
|
|
17
|
+
import { RecordEventPathSheet as de } from "./IntegrationActivitySection.js";
|
|
18
|
+
function $(r, s, u, i = !0) {
|
|
19
19
|
const m = C();
|
|
20
20
|
return B({
|
|
21
|
-
queryKey: ["erp-submissions",
|
|
21
|
+
queryKey: ["erp-submissions", r, String(s)],
|
|
22
22
|
queryFn: () => m.request(
|
|
23
|
-
|
|
24
|
-
).then((
|
|
25
|
-
enabled:
|
|
23
|
+
I(`/erp-submissions/${r}/${encodeURIComponent(s)}`)
|
|
24
|
+
).then((n) => n.data ?? []),
|
|
25
|
+
enabled: i && !!r && !!s,
|
|
26
26
|
staleTime: 15e3,
|
|
27
27
|
refetchInterval: u
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
const q = /* @__PURE__ */ new Map();
|
|
31
|
-
function
|
|
32
|
-
var
|
|
33
|
-
const
|
|
31
|
+
function Re(r, s, u) {
|
|
32
|
+
var c;
|
|
33
|
+
const i = u && !!s, m = $(r, s ?? "", void 0, i), n = E(r, i ? s ?? "" : ""), g = z({
|
|
34
34
|
layoutOn: u,
|
|
35
35
|
// A viewer refused the record's integrations has nothing to see here.
|
|
36
|
-
partnerIntegration:
|
|
37
|
-
obligations:
|
|
38
|
-
submissions: m.isError ? 0 : ((
|
|
36
|
+
partnerIntegration: n.isError ? !1 : n.partnerIntegration,
|
|
37
|
+
obligations: n.isError ? 0 : n.obligationCount,
|
|
38
|
+
submissions: m.isError ? 0 : ((c = m.data) == null ? void 0 : c.length) ?? null
|
|
39
39
|
});
|
|
40
40
|
return R(() => {
|
|
41
|
-
|
|
42
|
-
}, [
|
|
41
|
+
g !== null && u && q.set(r, g);
|
|
42
|
+
}, [g, r, u]), i ? g ?? q.get(r) ?? !1 : !1;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
collection:
|
|
44
|
+
function Ce({
|
|
45
|
+
collection: r,
|
|
46
46
|
itemId: s
|
|
47
47
|
}) {
|
|
48
|
-
const u = C(),
|
|
48
|
+
const u = C(), i = j(), [m, n] = v(!1), [g, c] = v(null), [h, w] = v(null);
|
|
49
49
|
R(() => {
|
|
50
50
|
if (!m || h == null) return;
|
|
51
51
|
const e = document.querySelector(`[data-submission-id="${h}"]`);
|
|
52
52
|
e == null || e.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
53
53
|
}, [m, h]);
|
|
54
|
-
const P =
|
|
55
|
-
mutationFn: (e) => u.request(
|
|
54
|
+
const P = G(6e4), { data: Q, isLoading: D } = $(r, s, P), { data: K } = re(r, s), x = A({
|
|
55
|
+
mutationFn: (e) => u.request(H(`/erp-submissions/${e}/retry`)),
|
|
56
56
|
onSuccess: (e) => {
|
|
57
|
-
var
|
|
58
|
-
const l = (
|
|
59
|
-
l && l !== "failed" ?
|
|
60
|
-
queryKey: ["integration-obligations", "record",
|
|
57
|
+
var S;
|
|
58
|
+
const l = (S = e == null ? void 0 : e.data) == null ? void 0 : S.status;
|
|
59
|
+
l && l !== "failed" ? b.success("Submission retried successfully") : b.error("Retry failed — expand the request for the error"), i.invalidateQueries({ queryKey: ["erp-submissions", r, String(s)] }), i.invalidateQueries({ queryKey: ["erp-submission-attempts"] }), i.invalidateQueries({
|
|
60
|
+
queryKey: ["integration-obligations", "record", r, String(s)]
|
|
61
61
|
});
|
|
62
62
|
},
|
|
63
|
-
onError: () =>
|
|
63
|
+
onError: () => b.error("Retry failed")
|
|
64
64
|
}), {
|
|
65
|
-
lines:
|
|
65
|
+
lines: f,
|
|
66
66
|
remediationEnabled: L,
|
|
67
67
|
isLoading: F
|
|
68
|
-
} = E(
|
|
68
|
+
} = E(r, s), p = Q ?? [];
|
|
69
69
|
if (D || F)
|
|
70
70
|
return /* @__PURE__ */ d(
|
|
71
71
|
"span",
|
|
@@ -73,41 +73,41 @@ function Ne({
|
|
|
73
73
|
className: "flex shrink-0 items-center gap-1.5 self-center rounded-md border border-slate-200 px-2 py-1 text-[11px] text-slate-400 dark:border-border",
|
|
74
74
|
"data-nvr-external-requests": "loading",
|
|
75
75
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ t(k, { className: "h-3.5 w-3.5 opacity-60" }),
|
|
77
|
+
/* @__PURE__ */ t("span", { className: "h-2.5 w-16 animate-pulse rounded bg-[hsl(var(--nvr-skeleton))]" })
|
|
78
78
|
]
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
81
|
const _ = new Set(
|
|
82
|
-
(K ?? []).filter((e) => !!
|
|
83
|
-
),
|
|
84
|
-
|
|
82
|
+
(K ?? []).filter((e) => !!X(e).retry_at).map((e) => e.api)
|
|
83
|
+
), a = J(
|
|
84
|
+
f,
|
|
85
85
|
p,
|
|
86
|
-
(e) => e ?
|
|
86
|
+
(e) => e ? Y(e) : "",
|
|
87
87
|
_
|
|
88
|
-
),
|
|
88
|
+
), y = /* @__PURE__ */ new Map();
|
|
89
89
|
for (const e of p) {
|
|
90
90
|
const l = (e.external_api_name ?? (e.external_api != null ? `#${e.external_api}` : "External")).toLowerCase();
|
|
91
|
-
|
|
91
|
+
y.has(l) || y.set(l, { id: e.id, status: e.status });
|
|
92
92
|
}
|
|
93
|
-
const T = p.length === 0 &&
|
|
93
|
+
const T = p.length === 0 && a.partners.length === 0, M = {
|
|
94
94
|
ok: "bg-emerald-500",
|
|
95
95
|
attention: "bg-red-500",
|
|
96
96
|
retrying: "bg-amber-500",
|
|
97
97
|
pending: "bg-sky-500",
|
|
98
98
|
neutral: "bg-slate-400 dark:bg-slate-500"
|
|
99
|
-
},
|
|
99
|
+
}, o = a.attention;
|
|
100
100
|
return /* @__PURE__ */ d(O, { children: [
|
|
101
101
|
T ? /* @__PURE__ */ d(
|
|
102
102
|
"button",
|
|
103
103
|
{
|
|
104
104
|
type: "button",
|
|
105
|
-
onClick: () =>
|
|
105
|
+
onClick: () => n(!0),
|
|
106
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",
|
|
107
107
|
"data-nvr-external-requests": "none",
|
|
108
108
|
"data-tip": "Nothing from this record has been sent to an outside system yet. Click to see what the first push would carry.",
|
|
109
109
|
children: [
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ t(k, { className: "h-3.5 w-3.5 opacity-60" }),
|
|
111
111
|
"No external requests"
|
|
112
112
|
]
|
|
113
113
|
}
|
|
@@ -115,26 +115,18 @@ function Ne({
|
|
|
115
115
|
"button",
|
|
116
116
|
{
|
|
117
117
|
type: "button",
|
|
118
|
-
onClick: () =>
|
|
118
|
+
onClick: () => n(!0),
|
|
119
119
|
"data-nvr-external-requests": !0,
|
|
120
|
-
"data-integrations-ok":
|
|
121
|
-
"data-integrations-attention":
|
|
122
|
-
className:
|
|
120
|
+
"data-integrations-ok": a.ok,
|
|
121
|
+
"data-integrations-attention": o,
|
|
122
|
+
className: N(
|
|
123
123
|
"flex shrink-0 items-center gap-1.5 self-center rounded-md border px-2 py-1 text-[11px] font-medium transition-colors",
|
|
124
|
-
|
|
124
|
+
o > 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" : a.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"
|
|
125
125
|
),
|
|
126
|
-
title:
|
|
126
|
+
title: o > 0 ? `${o} integration ${o === 1 ? "issue needs" : "issues need"} attention — click for details` : a.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",
|
|
127
127
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
|
|
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(
|
|
128
|
+
o > 0 ? /* @__PURE__ */ t(U, { "aria-hidden": !0, className: "h-3.5 w-3.5 text-red-500" }) : a.retrying > 0 ? /* @__PURE__ */ t(V, { "aria-hidden": !0, className: "h-3.5 w-3.5 text-amber-500" }) : /* @__PURE__ */ t(W, { "aria-hidden": !0, className: "h-3.5 w-3.5 text-slate-500 dark:text-slate-400" }),
|
|
129
|
+
a.partners.length <= 3 ? a.partners.map((e) => /* @__PURE__ */ d(
|
|
138
130
|
"span",
|
|
139
131
|
{
|
|
140
132
|
className: "inline-flex items-center gap-1",
|
|
@@ -142,134 +134,134 @@ function Ne({
|
|
|
142
134
|
"data-integration-status": e.status,
|
|
143
135
|
"data-tip": e.tip,
|
|
144
136
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ t("span", { className: N("h-1.5 w-1.5 rounded-full", M[e.status]) }),
|
|
146
138
|
e.name
|
|
147
139
|
]
|
|
148
140
|
},
|
|
149
141
|
e.name
|
|
150
|
-
)) : /* @__PURE__ */
|
|
151
|
-
|
|
142
|
+
)) : /* @__PURE__ */ t("span", { children: "Integrations" }),
|
|
143
|
+
a.partners.length > 3 && a.ok > 0 && /* @__PURE__ */ t(
|
|
152
144
|
"span",
|
|
153
145
|
{
|
|
154
146
|
"data-integrations-badge": "ok",
|
|
155
147
|
className: "rounded bg-emerald-50 px-1 text-[10.5px] font-semibold text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400",
|
|
156
|
-
children:
|
|
148
|
+
children: a.ok
|
|
157
149
|
}
|
|
158
150
|
),
|
|
159
|
-
|
|
151
|
+
a.partners.length > 3 && a.pending > 0 && /* @__PURE__ */ t(
|
|
160
152
|
"span",
|
|
161
153
|
{
|
|
162
154
|
"data-integrations-badge": "pending",
|
|
163
155
|
className: "rounded bg-sky-50 px-1 text-[10.5px] font-semibold text-sky-700 dark:bg-sky-500/10 dark:text-sky-400",
|
|
164
|
-
children:
|
|
156
|
+
children: a.pending
|
|
165
157
|
}
|
|
166
158
|
),
|
|
167
|
-
|
|
159
|
+
a.partners.length > 3 && o > 0 && /* @__PURE__ */ t(
|
|
168
160
|
"span",
|
|
169
161
|
{
|
|
170
162
|
"data-integrations-badge": "attention",
|
|
171
163
|
className: "rounded bg-red-50 px-1 text-[10.5px] font-semibold text-red-700 dark:bg-red-500/10 dark:text-red-400",
|
|
172
|
-
children:
|
|
164
|
+
children: o
|
|
173
165
|
}
|
|
174
166
|
)
|
|
175
167
|
]
|
|
176
168
|
}
|
|
177
169
|
),
|
|
178
|
-
m && /* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
170
|
+
m && /* @__PURE__ */ t(se, { open: !0, onOpenChange: (e) => !e && n(!1), children: /* @__PURE__ */ d(ae, { className: "p-5", style: { width: "75%", maxWidth: "75%" }, children: [
|
|
171
|
+
/* @__PURE__ */ t(ne, { children: /* @__PURE__ */ d(ie, { className: "flex items-center gap-2 text-[15px]", children: [
|
|
172
|
+
/* @__PURE__ */ t(k, { className: "h-4 w-4 text-nvr-cyan" }),
|
|
181
173
|
"Integrations",
|
|
182
174
|
/* @__PURE__ */ d("span", { className: "text-[12px] font-normal text-slate-400", children: [
|
|
183
|
-
|
|
175
|
+
a.partners.length,
|
|
184
176
|
" partner",
|
|
185
|
-
|
|
177
|
+
a.partners.length !== 1 ? "s" : "",
|
|
186
178
|
" ·",
|
|
187
179
|
" ",
|
|
188
180
|
p.length,
|
|
189
181
|
" request",
|
|
190
182
|
p.length !== 1 ? "s" : "",
|
|
191
|
-
|
|
183
|
+
o > 0 && /* @__PURE__ */ d("span", { className: "ml-1 text-red-600 dark:text-red-400", children: [
|
|
192
184
|
"· ",
|
|
193
|
-
|
|
185
|
+
o,
|
|
194
186
|
" need",
|
|
195
|
-
|
|
187
|
+
o === 1 ? "s" : "",
|
|
196
188
|
" attention"
|
|
197
189
|
] })
|
|
198
190
|
] })
|
|
199
191
|
] }) }),
|
|
200
|
-
/* @__PURE__ */ d(
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
|
|
192
|
+
/* @__PURE__ */ d(oe, { className: "max-h-[65vh] space-y-2 overflow-y-auto", children: [
|
|
193
|
+
/* @__PURE__ */ t(
|
|
194
|
+
te,
|
|
203
195
|
{
|
|
204
|
-
collection:
|
|
196
|
+
collection: r,
|
|
205
197
|
itemId: String(s),
|
|
206
|
-
onShowRequest: (e) =>
|
|
207
|
-
onJump: () =>
|
|
198
|
+
onShowRequest: (e) => w(e),
|
|
199
|
+
onJump: () => n(!1)
|
|
208
200
|
}
|
|
209
201
|
),
|
|
210
|
-
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
|
|
202
|
+
f.length > 0 && /* @__PURE__ */ d("div", { className: "space-y-1.5 pb-2", "data-integrations-partner-status": !0, children: [
|
|
203
|
+
/* @__PURE__ */ t("p", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Partner status" }),
|
|
204
|
+
/* @__PURE__ */ t(
|
|
205
|
+
ee,
|
|
214
206
|
{
|
|
215
|
-
collection:
|
|
207
|
+
collection: r,
|
|
216
208
|
itemId: s,
|
|
217
|
-
lines:
|
|
209
|
+
lines: f,
|
|
218
210
|
remediationEnabled: L,
|
|
219
211
|
actions: {
|
|
220
|
-
newestSubmissionByApi:
|
|
221
|
-
onRetry: (e) =>
|
|
222
|
-
onView: (e) =>
|
|
212
|
+
newestSubmissionByApi: y,
|
|
213
|
+
onRetry: (e) => x.mutate(e),
|
|
214
|
+
onView: (e) => w(e),
|
|
223
215
|
onCheck: () => {
|
|
224
|
-
|
|
216
|
+
i.invalidateQueries({
|
|
225
217
|
queryKey: [
|
|
226
218
|
"integration-obligations",
|
|
227
219
|
"record",
|
|
228
|
-
|
|
220
|
+
r,
|
|
229
221
|
String(s)
|
|
230
222
|
]
|
|
231
|
-
}),
|
|
232
|
-
queryKey: ["erp-submissions",
|
|
233
|
-
}),
|
|
223
|
+
}), i.invalidateQueries({
|
|
224
|
+
queryKey: ["erp-submissions", r, String(s)]
|
|
225
|
+
}), b.message("Checking with the partner status…");
|
|
234
226
|
},
|
|
235
227
|
// The pipeline panel takes over (save, requirements
|
|
236
228
|
// dialog, run) — this dialog gets out of its way.
|
|
237
|
-
onRanTransition: () =>
|
|
229
|
+
onRanTransition: () => n(!1)
|
|
238
230
|
}
|
|
239
231
|
}
|
|
240
232
|
)
|
|
241
233
|
] }),
|
|
242
|
-
p.length > 0 && /* @__PURE__ */
|
|
243
|
-
p.length === 0 && /* @__PURE__ */
|
|
244
|
-
p.map((e) => /* @__PURE__ */
|
|
245
|
-
|
|
234
|
+
p.length > 0 && /* @__PURE__ */ t("p", { className: "pt-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Requests sent" }),
|
|
235
|
+
p.length === 0 && /* @__PURE__ */ t("p", { className: "text-[12px] text-slate-500 dark:text-muted-foreground", children: "No request has been sent from this record yet." }),
|
|
236
|
+
p.map((e) => /* @__PURE__ */ t(
|
|
237
|
+
Z,
|
|
246
238
|
{
|
|
247
239
|
sub: e,
|
|
248
240
|
initialOpen: h === e.id,
|
|
249
|
-
onRetry: (l) =>
|
|
250
|
-
retrying:
|
|
241
|
+
onRetry: (l) => x.mutate(l),
|
|
242
|
+
retrying: x.isPending,
|
|
251
243
|
onShowPath: (l) => {
|
|
252
|
-
|
|
244
|
+
n(!1), c(l);
|
|
253
245
|
}
|
|
254
246
|
},
|
|
255
247
|
`${e.id}:${h === e.id ? "focus" : ""}`
|
|
256
248
|
))
|
|
257
249
|
] })
|
|
258
250
|
] }) }),
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
-
|
|
251
|
+
/* @__PURE__ */ t(
|
|
252
|
+
de,
|
|
261
253
|
{
|
|
262
|
-
target:
|
|
254
|
+
target: g != null ? {
|
|
263
255
|
source: "core:outbound",
|
|
264
|
-
id: String(
|
|
265
|
-
record: { collection:
|
|
256
|
+
id: String(g),
|
|
257
|
+
record: { collection: r, item: String(s) }
|
|
266
258
|
} : null,
|
|
267
|
-
onClose: () =>
|
|
259
|
+
onClose: () => c(null)
|
|
268
260
|
}
|
|
269
261
|
)
|
|
270
262
|
] });
|
|
271
263
|
}
|
|
272
264
|
export {
|
|
273
|
-
|
|
274
|
-
|
|
265
|
+
Ce as ExternalRequestsChip,
|
|
266
|
+
Re as useExternalRequestsShown
|
|
275
267
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
1
|
+
import { jsxs as u, jsx as a, Fragment as c } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery as h } from "@tanstack/react-query";
|
|
3
|
-
import { Eye as g, EyeOff as
|
|
4
|
-
import { useNivaroClient as
|
|
5
|
-
import { get as
|
|
3
|
+
import { Eye as g, EyeOff as x } from "lucide-react";
|
|
4
|
+
import { useNivaroClient as y } from "../../context.js";
|
|
5
|
+
import { get as b } from "../../lib/commands.js";
|
|
6
6
|
import { formatRelative as v, formatDateTime as d, cn as w } from "../../lib/utils.js";
|
|
7
7
|
import { UserChip as $ } from "../item-edit/UserChip.js";
|
|
8
8
|
const _ = "pipeline-owner-opened";
|
|
@@ -30,10 +30,10 @@ function A({
|
|
|
30
30
|
stateId: i,
|
|
31
31
|
className: l
|
|
32
32
|
}) {
|
|
33
|
-
const s =
|
|
33
|
+
const s = y(), { data: n } = h({
|
|
34
34
|
queryKey: [_, e, r, i],
|
|
35
35
|
queryFn: () => s.request(
|
|
36
|
-
|
|
36
|
+
b(`/pipelines/instance/${e}/${r}/owner-opened`)
|
|
37
37
|
).then((f) => f.data ?? null),
|
|
38
38
|
staleTime: 6e4,
|
|
39
39
|
retry: !1
|
|
@@ -41,7 +41,7 @@ function A({
|
|
|
41
41
|
if (!n || n.status !== "opened" && n.status !== "not_opened") return null;
|
|
42
42
|
const t = N(n);
|
|
43
43
|
if (!t) return null;
|
|
44
|
-
const o = n.status === "opened", m = o ? g :
|
|
44
|
+
const o = n.status === "opened", m = o ? g : x, p = o ? d(n.opened_at) : d(n.entered_at);
|
|
45
45
|
return /* @__PURE__ */ u(
|
|
46
46
|
"p",
|
|
47
47
|
{
|
|
@@ -51,29 +51,36 @@ function A({
|
|
|
51
51
|
l
|
|
52
52
|
),
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ a(
|
|
55
55
|
m,
|
|
56
56
|
{
|
|
57
57
|
"aria-hidden": !0,
|
|
58
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
59
|
}
|
|
60
60
|
),
|
|
61
|
-
/* @__PURE__ */ u(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
/* @__PURE__ */ u(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
className: "min-w-0 text-left",
|
|
65
|
+
"data-tip": o ? `Opened ${p}` : `In this step since ${p}`,
|
|
66
|
+
children: [
|
|
67
|
+
t.lead,
|
|
68
|
+
o && n.by ? /* @__PURE__ */ u(c, { children: [
|
|
69
|
+
/* @__PURE__ */ a($, { userId: n.by.id, children: /* @__PURE__ */ a(
|
|
70
|
+
"button",
|
|
71
|
+
{
|
|
72
|
+
type: "button",
|
|
73
|
+
"aria-label": `${n.by.name} — profile`,
|
|
74
|
+
className: "inline rounded p-0 text-left align-baseline 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",
|
|
75
|
+
children: t.name
|
|
76
|
+
}
|
|
77
|
+
) }),
|
|
78
|
+
t.group ? ` (${t.group})` : null
|
|
79
|
+
] }) : null,
|
|
80
|
+
t.tail
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
)
|
|
77
84
|
]
|
|
78
85
|
}
|
|
79
86
|
);
|