@nivaro/react 0.3.117 → 0.3.119
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 +4451 -4385
- 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 +135 -94
- 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 +88 -85
- 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 +245 -141
- 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 +15 -16
- 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/addendum-view.js +6 -0
- 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 +151 -130
- 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,11 +1,11 @@
|
|
|
1
|
-
import { titleCase as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
1
|
+
import { titleCase as j } from "../../lib/utils.js";
|
|
2
|
+
const u = (i) => i.display_name ?? j(i.collection);
|
|
3
|
+
function R(i, t) {
|
|
4
4
|
if (!t) return !0;
|
|
5
5
|
const n = t.trim().toLowerCase();
|
|
6
|
-
return n ? i.collection.toLowerCase().includes(n) ||
|
|
6
|
+
return n ? i.collection.toLowerCase().includes(n) || u(i).toLowerCase().includes(n) : !0;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function P(i, t, n) {
|
|
9
9
|
switch (t) {
|
|
10
10
|
case "has_records":
|
|
11
11
|
return ((n == null ? void 0 : n.rows) ?? 0) > 0;
|
|
@@ -25,7 +25,7 @@ function H(i, t, n) {
|
|
|
25
25
|
return ((n == null ? void 0 : n.forms) ?? 0) > 0;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const T = [
|
|
29
29
|
"has_records",
|
|
30
30
|
"empty",
|
|
31
31
|
"hidden",
|
|
@@ -35,88 +35,93 @@ const N = [
|
|
|
35
35
|
"pipeline",
|
|
36
36
|
"form"
|
|
37
37
|
];
|
|
38
|
-
function
|
|
39
|
-
const
|
|
40
|
-
i.filter((e) =>
|
|
41
|
-
),
|
|
42
|
-
const o =
|
|
43
|
-
return { key: e, label: o ?
|
|
38
|
+
function G(i, t, n, c, h, f = !!t) {
|
|
39
|
+
const r = new Set(i.map((e) => e.group).filter((e) => !!e)), l = new Map(
|
|
40
|
+
i.filter((e) => r.has(e.collection)).map((e) => [e.collection, e])
|
|
41
|
+
), d = i.filter((e) => !r.has(e.collection)), p = (e) => t == null ? void 0 : t[e.collection], H = [...r].map((e) => {
|
|
42
|
+
const o = l.get(e);
|
|
43
|
+
return { key: e, label: o ? u(o) : j(e), color: (o == null ? void 0 : o.color) ?? null };
|
|
44
44
|
}).sort((e, o) => {
|
|
45
|
-
var
|
|
46
|
-
const
|
|
47
|
-
return
|
|
48
|
-
}),
|
|
45
|
+
var C, k;
|
|
46
|
+
const s = ((C = l.get(e.key)) == null ? void 0 : C.sort) ?? 9999, a = ((k = l.get(o.key)) == null ? void 0 : k.sort) ?? 9999;
|
|
47
|
+
return s !== a ? s - a : e.label.localeCompare(o.label);
|
|
48
|
+
}), S = (e) => n.chips.includes(e), b = n.showHidden || S("hidden"), L = n.showLinks || S("link"), w = (e) => {
|
|
49
49
|
var o;
|
|
50
|
-
return !!((o =
|
|
51
|
-
}, M = (e) => !!e.hidden && !
|
|
52
|
-
total:
|
|
53
|
-
hidden:
|
|
54
|
-
links:
|
|
50
|
+
return !!((o = p(e)) != null && o.link);
|
|
51
|
+
}, M = (e) => !!e.hidden && !w(e), _ = !f, D = {
|
|
52
|
+
total: d.length,
|
|
53
|
+
hidden: d.filter(M).length,
|
|
54
|
+
links: d.filter(w).length,
|
|
55
55
|
chip: Object.fromEntries(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
T.map((e) => [
|
|
57
|
+
e,
|
|
58
|
+
// Unknown link facts: no Hidden / Link table chip numbers (they would be wrong).
|
|
59
|
+
_ && (e === "hidden" || e === "link") ? 0 : d.filter((o) => P(o, e, p(o))).length
|
|
60
|
+
])
|
|
61
|
+
),
|
|
62
|
+
pending: _
|
|
63
|
+
}, O = (e) => n.chips.every((o) => P(e, o, p(e))), v = d.filter((e) => R(e, c) && O(e)), x = {
|
|
59
64
|
hidden: b ? [] : v.filter(M),
|
|
60
|
-
links: L ? [] : v.filter(
|
|
61
|
-
},
|
|
65
|
+
links: L ? [] : v.filter(w)
|
|
66
|
+
}, z = (e) => w(e) ? L : b || !e.hidden, y = v.filter(z), A = L ? [] : v.filter(w).sort((e, o) => u(e).localeCompare(u(o))), g = (e, o) => u(e).localeCompare(u(o)), E = (e, o) => (e.sort ?? 9999) - (o.sort ?? 9999) || g(e, o), F = !!c.trim() || n.chips.length > 0, I = H.map((e) => {
|
|
62
67
|
var o;
|
|
63
68
|
return {
|
|
64
69
|
folder: e,
|
|
65
|
-
sort: ((o =
|
|
66
|
-
cols: y.filter((
|
|
67
|
-
hiddenCount: b ? 0 :
|
|
70
|
+
sort: ((o = l.get(e.key)) == null ? void 0 : o.sort) ?? 9999,
|
|
71
|
+
cols: y.filter((s) => s.group === e.key).sort(E),
|
|
72
|
+
hiddenCount: b ? 0 : d.filter((s) => s.group === e.key && M(s)).length
|
|
68
73
|
};
|
|
69
|
-
}).filter((e) => e.cols.length > 0 || !
|
|
70
|
-
let
|
|
71
|
-
return n.view !== "folders" && (
|
|
72
|
-
var
|
|
73
|
-
const
|
|
74
|
-
return (Date.parse(((
|
|
75
|
-
}) : n.view === "records" ?
|
|
76
|
-
var
|
|
77
|
-
return (((
|
|
78
|
-
}) : n.view === "used" &&
|
|
79
|
-
(e, o) => (h.counts[o.collection] ?? 0) - (h.counts[e.collection] ?? 0) ||
|
|
74
|
+
}).filter((e) => e.cols.length > 0 || !F && e.hiddenCount > 0).map((e) => _ ? { ...e, hiddenCount: 0 } : e), N = y.filter((e) => !e.group || !r.has(e.group)).sort(g);
|
|
75
|
+
let m = [];
|
|
76
|
+
return n.view !== "folders" && (m = [...y], n.view === "az" ? m.sort(g) : n.view === "recent" ? m.sort((e, o) => {
|
|
77
|
+
var C, k;
|
|
78
|
+
const s = Date.parse(((C = p(e)) == null ? void 0 : C.changed_at) ?? "") || 0;
|
|
79
|
+
return (Date.parse(((k = p(o)) == null ? void 0 : k.changed_at) ?? "") || 0) - s || g(e, o);
|
|
80
|
+
}) : n.view === "records" ? m.sort((e, o) => {
|
|
81
|
+
var s, a;
|
|
82
|
+
return (((s = p(o)) == null ? void 0 : s.rows) ?? -1) - (((a = p(e)) == null ? void 0 : a.rows) ?? -1) || g(e, o);
|
|
83
|
+
}) : n.view === "used" && m.sort(
|
|
84
|
+
(e, o) => (h.counts[o.collection] ?? 0) - (h.counts[e.collection] ?? 0) || g(e, o)
|
|
80
85
|
)), {
|
|
81
|
-
folders:
|
|
82
|
-
real:
|
|
83
|
-
sections:
|
|
84
|
-
loose:
|
|
85
|
-
linkTables:
|
|
86
|
-
flat:
|
|
86
|
+
folders: H,
|
|
87
|
+
real: d,
|
|
88
|
+
sections: I,
|
|
89
|
+
loose: N,
|
|
90
|
+
linkTables: A,
|
|
91
|
+
flat: m,
|
|
87
92
|
shownCount: y.length,
|
|
88
|
-
counts:
|
|
89
|
-
foldedMatches:
|
|
93
|
+
counts: D,
|
|
94
|
+
foldedMatches: x
|
|
90
95
|
};
|
|
91
96
|
}
|
|
92
|
-
function
|
|
97
|
+
function q(i, t, n = 4) {
|
|
93
98
|
if (Math.abs(i.length - t.length) > n) return n + 1;
|
|
94
|
-
const
|
|
99
|
+
const c = Array.from({ length: t.length + 1 }, (h, f) => f);
|
|
95
100
|
for (let h = 1; h <= i.length; h++) {
|
|
96
|
-
let
|
|
97
|
-
|
|
98
|
-
let r =
|
|
101
|
+
let f = c[0];
|
|
102
|
+
c[0] = h;
|
|
103
|
+
let r = c[0];
|
|
99
104
|
for (let l = 1; l <= t.length; l++) {
|
|
100
|
-
const d =
|
|
101
|
-
|
|
105
|
+
const d = c[l];
|
|
106
|
+
c[l] = Math.min(c[l] + 1, c[l - 1] + 1, f + (i[h - 1] === t[l - 1] ? 0 : 1)), f = d, r = Math.min(r, c[l]);
|
|
102
107
|
}
|
|
103
108
|
if (r > n) return n + 1;
|
|
104
109
|
}
|
|
105
|
-
return
|
|
110
|
+
return c[t.length];
|
|
106
111
|
}
|
|
107
|
-
function
|
|
108
|
-
const
|
|
109
|
-
if (
|
|
110
|
-
const h =
|
|
112
|
+
function J(i, t, n = 3) {
|
|
113
|
+
const c = i.trim().toLowerCase();
|
|
114
|
+
if (c.length < 3) return [];
|
|
115
|
+
const h = c.length <= 5 ? 2 : 3;
|
|
111
116
|
return t.map((r) => {
|
|
112
|
-
const l = [r.collection,
|
|
117
|
+
const l = [r.collection, u(r), ...r.collection.split("_"), ...u(r).split(/\s+/)], d = Math.min(...l.map((p) => q(c, p.toLowerCase(), h)));
|
|
113
118
|
return { c: r, best: d };
|
|
114
|
-
}).filter((r) => r.best <= h).sort((r, l) => r.best - l.best ||
|
|
119
|
+
}).filter((r) => r.best <= h).sort((r, l) => r.best - l.best || u(r.c).localeCompare(u(l.c))).slice(0, n).map((r) => r.c);
|
|
115
120
|
}
|
|
116
121
|
export {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
G as buildPageModel,
|
|
123
|
+
u as label,
|
|
124
|
+
P as matchesChip,
|
|
125
|
+
R as matchesFilter,
|
|
126
|
+
J as nearSpellings
|
|
122
127
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as n, jsx as t, Fragment as
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { Loader2 as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useNivaroClient as
|
|
1
|
+
import { jsxs as n, jsx as t, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as K, useQueryClient as M } from "@tanstack/react-query";
|
|
3
|
+
import { Loader2 as V, Send as Z, CheckCircle2 as S, AlertTriangle as L, Zap as X, ChevronDown as Y, ChevronRight as I, PencilLine as J } from "lucide-react";
|
|
4
|
+
import { useState as Q, useEffect as ee } from "react";
|
|
5
|
+
import { useNivaroClient as W } from "../../context.js";
|
|
6
6
|
import { get as _ } from "../../lib/commands.js";
|
|
7
|
-
import { cn as
|
|
8
|
-
import { Popover as
|
|
7
|
+
import { cn as k, formatRelative as te, formatDateTime as ae } from "../../lib/utils.js";
|
|
8
|
+
import { Popover as re, PopoverTrigger as se, PopoverContent as ne } from "../ui/popover.js";
|
|
9
9
|
function P(r) {
|
|
10
10
|
typeof window > "u" || window.dispatchEvent(new CustomEvent("nvr:record-focus", { detail: r }));
|
|
11
11
|
}
|
|
@@ -23,10 +23,10 @@ function A({
|
|
|
23
23
|
"data-preflight-issue": l.severity,
|
|
24
24
|
className: "flex items-start gap-2 text-[12px]",
|
|
25
25
|
children: [
|
|
26
|
-
l.severity === "ask" ? /* @__PURE__ */ t(
|
|
27
|
-
|
|
26
|
+
l.severity === "ask" ? /* @__PURE__ */ t(J, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-slate-400 dark:text-slate-500" }) : /* @__PURE__ */ t(
|
|
27
|
+
L,
|
|
28
28
|
{
|
|
29
|
-
className:
|
|
29
|
+
className: k(
|
|
30
30
|
"mt-0.5 h-3.5 w-3.5 shrink-0",
|
|
31
31
|
l.severity === "block" ? "text-red-600 dark:text-red-400" : "text-amber-600 dark:text-amber-400"
|
|
32
32
|
)
|
|
@@ -79,9 +79,9 @@ function A({
|
|
|
79
79
|
);
|
|
80
80
|
}) });
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
const h =
|
|
84
|
-
|
|
82
|
+
function R(r, s) {
|
|
83
|
+
const h = M();
|
|
84
|
+
ee(() => {
|
|
85
85
|
let o = null;
|
|
86
86
|
const l = (e) => {
|
|
87
87
|
const m = e == null ? void 0 : e[0];
|
|
@@ -90,8 +90,8 @@ function H(r, s) {
|
|
|
90
90
|
for (const e of h.getQueryCache().getAll())
|
|
91
91
|
l(e.queryKey) && d.set(e.queryHash, e.state.data);
|
|
92
92
|
const u = h.getQueryCache().subscribe((e) => {
|
|
93
|
-
var
|
|
94
|
-
if (e.type !== "updated" || ((
|
|
93
|
+
var y;
|
|
94
|
+
if (e.type !== "updated" || ((y = e.action) == null ? void 0 : y.type) !== "success" || !l(e.query.queryKey)) return;
|
|
95
95
|
const m = d.has(e.query.queryHash), a = d.get(e.query.queryHash);
|
|
96
96
|
d.set(e.query.queryHash, e.query.state.data), !(e.query.state.dataUpdateCount <= 1) && (m && a === e.query.state.data || (o && clearTimeout(o), o = setTimeout(() => {
|
|
97
97
|
h.invalidateQueries({ queryKey: ["push-preflight", r, s] }), h.invalidateQueries({ queryKey: ["outbound-preview", r, s] });
|
|
@@ -105,7 +105,7 @@ function H(r, s) {
|
|
|
105
105
|
function v(r) {
|
|
106
106
|
return r.length <= 1 ? r[0] ?? "" : `${r.slice(0, -1).join(", ")} and ${r[r.length - 1]}`;
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const le = "absolute -right-1.5 -top-1.5 z-[1] inline-flex items-center justify-center rounded-full ring-2 ring-white dark:ring-card";
|
|
109
109
|
function ie({
|
|
110
110
|
collection: r,
|
|
111
111
|
itemId: s,
|
|
@@ -115,10 +115,10 @@ function ie({
|
|
|
115
115
|
compact: d = !1,
|
|
116
116
|
onJump: u
|
|
117
117
|
}) {
|
|
118
|
-
const e =
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
queryKey: ["push-preflight", r, s,
|
|
118
|
+
const e = W(), [m, a] = Q(!1);
|
|
119
|
+
R(r, s);
|
|
120
|
+
const y = h ? "t" : "a", x = h ?? o ?? "", { data: c, isLoading: H, isError: U } = K({
|
|
121
|
+
queryKey: ["push-preflight", r, s, y, x],
|
|
122
122
|
queryFn: () => e.request(
|
|
123
123
|
h ? _(`/integration-preview/${r}/${encodeURIComponent(s)}/preflight`, {
|
|
124
124
|
transition_id: h
|
|
@@ -131,33 +131,25 @@ function ie({
|
|
|
131
131
|
staleTime: 2e4
|
|
132
132
|
});
|
|
133
133
|
if (!x || s === "new") return null;
|
|
134
|
-
if (
|
|
135
|
-
return d ? /* @__PURE__ */ t(
|
|
136
|
-
"span",
|
|
137
|
-
{
|
|
138
|
-
"data-push-readiness": "loading",
|
|
139
|
-
role: "status",
|
|
140
|
-
className: y(E, "h-2.5 w-2.5 animate-pulse bg-slate-300 dark:bg-slate-600"),
|
|
141
|
-
"aria-label": "Checking whether this can be sent"
|
|
142
|
-
}
|
|
143
|
-
) : /* @__PURE__ */ t(
|
|
134
|
+
if (H)
|
|
135
|
+
return d ? /* @__PURE__ */ t("span", { "data-push-readiness": "loading", role: "status", className: "sr-only", children: "Checking whether this can be sent" }) : /* @__PURE__ */ t(
|
|
144
136
|
"span",
|
|
145
137
|
{
|
|
146
138
|
"data-push-readiness": "loading",
|
|
147
139
|
role: "status",
|
|
148
140
|
className: "inline-flex items-center self-center",
|
|
149
141
|
"aria-label": "Checking whether this can be sent",
|
|
150
|
-
children: /* @__PURE__ */ t(
|
|
142
|
+
children: /* @__PURE__ */ t(V, { className: "h-3 w-3 animate-spin text-slate-400" })
|
|
151
143
|
}
|
|
152
144
|
);
|
|
153
145
|
if ((c == null ? void 0 : c.supported) === !1) return null;
|
|
154
|
-
const
|
|
146
|
+
const D = U || !!(c != null && c.error), q = (c == null ? void 0 : c.issues) ?? [], f = q.filter((i) => i.severity === "ask"), g = q.filter((i) => i.severity !== "ask"), T = g.filter((i) => i.severity === "block"), p = D ? "error" : T.length > 0 ? "block" : g.length > 0 ? "warn" : "ready", w = c == null ? void 0 : c.pushes, N = [
|
|
155
147
|
...new Set((w ?? []).filter((i) => i.status === "would_push").map((i) => i.api_name))
|
|
156
148
|
], b = [
|
|
157
149
|
...new Set((w ?? []).filter((i) => i.status === "unchanged").map((i) => i.api_name))
|
|
158
|
-
], O = !!w && N.length === 0,
|
|
159
|
-
return d && p === "ready" && O ? null : /* @__PURE__ */ n(
|
|
160
|
-
/* @__PURE__ */ t(
|
|
150
|
+
], O = !!w && N.length === 0, F = w ? N.length > 0 ? `Will send to ${v(N)}` : b.length > 0 ? `Nothing new for ${v(b)}` : "Sends nothing for this record" : "Nothing missing", j = p === "ready" ? F : p === "error" ? "Could not check" : (T[0] ?? g[0]).message, C = g.length > 1 ? ` +${g.length - 1}` : "", B = f.length > 0 ? ` It asks for ${f.map((i) => i.message.replace(/^Asks for /, "")).join("; ")} when you press it.` : "", $ = p === "ready" ? (w ? N.length > 0 ? `${l} will send to ${v(N)}; everything it needs is filled in` : b.length > 0 ? `${l} won't resend to ${v(b)}; nothing it watches has changed` : `${l} sends nothing to a partner for this record` : `${l}: everything it needs is filled in`) + B : `${l}: ${j}${C ? ` (and ${g.length - 1} more)` : ""}`;
|
|
151
|
+
return d && p === "ready" && O ? null : /* @__PURE__ */ n(re, { open: m, onOpenChange: a, children: [
|
|
152
|
+
/* @__PURE__ */ t(se, { asChild: !0, children: d ? /* @__PURE__ */ t(
|
|
161
153
|
"button",
|
|
162
154
|
{
|
|
163
155
|
type: "button",
|
|
@@ -165,8 +157,8 @@ function ie({
|
|
|
165
157
|
"data-push-readiness-for": x,
|
|
166
158
|
"aria-label": $,
|
|
167
159
|
"data-tip": $,
|
|
168
|
-
className:
|
|
169
|
-
|
|
160
|
+
className: k(
|
|
161
|
+
le,
|
|
170
162
|
// A larger invisible hit area than the 14–16px disc.
|
|
171
163
|
"after:absolute after:-inset-1.5 after:content-['']",
|
|
172
164
|
"text-white transition-[filter,transform] duration-150 ease-out hover:brightness-110 active:scale-90",
|
|
@@ -175,7 +167,7 @@ function ie({
|
|
|
175
167
|
// as "approved / recommended" on an order button (army 11 a2 F2).
|
|
176
168
|
p === "ready" ? "h-3.5 w-3.5 bg-[#475569] dark:bg-[#64748b]" : p === "block" ? "h-4 min-w-4 px-1 bg-[#dc2626]" : "h-4 min-w-4 px-1 bg-[#b45309]"
|
|
177
169
|
),
|
|
178
|
-
children: p === "ready" ? /* @__PURE__ */ t(
|
|
170
|
+
children: p === "ready" ? /* @__PURE__ */ t(Z, { className: "h-2 w-2", strokeWidth: 3, "aria-hidden": !0 }) : g.length > 0 ? /* @__PURE__ */ t("span", { className: "text-[10px] font-semibold leading-none tabular-nums", children: g.length > 9 ? "9+" : g.length }) : /* @__PURE__ */ t("span", { className: "text-[10px] font-bold leading-none", children: "!" })
|
|
179
171
|
}
|
|
180
172
|
) : /* @__PURE__ */ n(
|
|
181
173
|
"button",
|
|
@@ -183,19 +175,19 @@ function ie({
|
|
|
183
175
|
type: "button",
|
|
184
176
|
"data-push-readiness": p,
|
|
185
177
|
"data-push-readiness-for": x,
|
|
186
|
-
className:
|
|
178
|
+
className: k(
|
|
187
179
|
"inline-flex max-w-[260px] shrink-0 items-center gap-1 self-center rounded-full border px-1.5 py-px text-[10.5px] font-medium transition-colors",
|
|
188
180
|
p === "ready" ? "border-emerald-200 bg-emerald-50 text-emerald-800 hover:bg-emerald-100 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-300" : p === "block" ? "border-red-200 bg-red-50 text-red-800 hover:bg-red-100 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-300" : "border-amber-200 bg-amber-50 text-amber-800 hover:bg-amber-100 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-300"
|
|
189
181
|
),
|
|
190
182
|
"data-tip": $,
|
|
191
183
|
children: [
|
|
192
|
-
p === "ready" ? /* @__PURE__ */ t(S, { className: "h-3 w-3 shrink-0" }) : /* @__PURE__ */ t(
|
|
184
|
+
p === "ready" ? /* @__PURE__ */ t(S, { className: "h-3 w-3 shrink-0" }) : /* @__PURE__ */ t(L, { className: "h-3 w-3 shrink-0" }),
|
|
193
185
|
/* @__PURE__ */ t("span", { className: "truncate", children: j }),
|
|
194
186
|
C && /* @__PURE__ */ t("span", { className: "shrink-0 opacity-70", children: C })
|
|
195
187
|
]
|
|
196
188
|
}
|
|
197
189
|
) }),
|
|
198
|
-
/* @__PURE__ */ n(
|
|
190
|
+
/* @__PURE__ */ n(ne, { align: "end", className: "w-[380px] max-w-[92vw] p-3", children: [
|
|
199
191
|
/* @__PURE__ */ n("p", { className: "text-[11px] font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400", children: [
|
|
200
192
|
"Before “",
|
|
201
193
|
l,
|
|
@@ -241,7 +233,7 @@ function ie({
|
|
|
241
233
|
),
|
|
242
234
|
(c == null ? void 0 : c.pushes) && c.pushes.length > 0 && /* @__PURE__ */ n("div", { className: "mt-3 border-t border-slate-100 pt-2 dark:border-border", children: [
|
|
243
235
|
/* @__PURE__ */ t("p", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "What it sends" }),
|
|
244
|
-
/* @__PURE__ */ t("ul", { className: "mt-1 space-y-0.5 text-[11.5px]", children: c.pushes.map((i,
|
|
236
|
+
/* @__PURE__ */ t("ul", { className: "mt-1 space-y-0.5 text-[11.5px]", children: c.pushes.map((i, G) => /* @__PURE__ */ n(
|
|
245
237
|
"li",
|
|
246
238
|
{
|
|
247
239
|
className: "flex items-baseline gap-1.5 text-slate-600 dark:text-slate-300",
|
|
@@ -251,13 +243,13 @@ function ie({
|
|
|
251
243
|
/* @__PURE__ */ t("span", { className: "text-slate-500 dark:text-slate-400", children: i.status === "would_push" ? "will be sent" : i.status === "unchanged" ? "held back — nothing it watches changed" : i.status === "not_applicable" ? "does not apply to this record" : i.reason ?? "will not be sent" })
|
|
252
244
|
]
|
|
253
245
|
},
|
|
254
|
-
|
|
246
|
+
G
|
|
255
247
|
)) })
|
|
256
248
|
] })
|
|
257
249
|
] })
|
|
258
250
|
] });
|
|
259
251
|
}
|
|
260
|
-
function
|
|
252
|
+
function E(r) {
|
|
261
253
|
if (r == null || r === "") return "—";
|
|
262
254
|
if (typeof r == "object") return JSON.stringify(r);
|
|
263
255
|
const s = String(r);
|
|
@@ -270,7 +262,7 @@ function de({
|
|
|
270
262
|
onShowRequest: o,
|
|
271
263
|
onJump: l
|
|
272
264
|
}) {
|
|
273
|
-
const [d, u] =
|
|
265
|
+
const [d, u] = Q(!1), e = r, m = !e.first_push && e.changes.length === 0;
|
|
274
266
|
return /* @__PURE__ */ n(
|
|
275
267
|
"div",
|
|
276
268
|
{
|
|
@@ -280,7 +272,7 @@ function de({
|
|
|
280
272
|
children: [
|
|
281
273
|
/* @__PURE__ */ n("div", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-0.5", children: [
|
|
282
274
|
/* @__PURE__ */ t("span", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: e.api_name }),
|
|
283
|
-
/* @__PURE__ */ t("span", { className: "text-[12px] text-slate-600 dark:text-slate-300", children: e.first_push ? "has not received anything from this record yet — the next push is its first" : m ? "already has everything the next push would send" : /* @__PURE__ */ n(
|
|
275
|
+
/* @__PURE__ */ t("span", { className: "text-[12px] text-slate-600 dark:text-slate-300", children: e.first_push ? "has not received anything from this record yet — the next push is its first" : m ? "already has everything the next push would send" : /* @__PURE__ */ n(z, { children: [
|
|
284
276
|
"will receive on next push:",
|
|
285
277
|
" ",
|
|
286
278
|
/* @__PURE__ */ t("span", { className: "font-medium text-slate-800 dark:text-slate-100", children: e.summary.join(", ") })
|
|
@@ -291,10 +283,10 @@ function de({
|
|
|
291
283
|
type: "button",
|
|
292
284
|
onClick: () => o == null ? void 0 : o(e.last.submission_id),
|
|
293
285
|
className: "ml-auto text-[11px] text-slate-500 hover:underline dark:text-slate-400",
|
|
294
|
-
"data-tip": `Compared with the push that landed ${
|
|
286
|
+
"data-tip": `Compared with the push that landed ${ae(e.last.at)}`,
|
|
295
287
|
children: [
|
|
296
288
|
"vs. last sent ",
|
|
297
|
-
|
|
289
|
+
te(e.last.at)
|
|
298
290
|
]
|
|
299
291
|
}
|
|
300
292
|
)
|
|
@@ -303,12 +295,12 @@ function de({
|
|
|
303
295
|
"li",
|
|
304
296
|
{
|
|
305
297
|
"data-outbound-trigger": a.transition_id,
|
|
306
|
-
className:
|
|
298
|
+
className: k(
|
|
307
299
|
"flex flex-wrap items-center gap-x-1.5 text-[11.5px]",
|
|
308
300
|
a.available ? "text-slate-600 dark:text-slate-300" : "text-slate-400 dark:text-slate-500"
|
|
309
301
|
),
|
|
310
302
|
children: [
|
|
311
|
-
a.auto ? /* @__PURE__ */ t(
|
|
303
|
+
a.auto ? /* @__PURE__ */ t(X, { className: "h-3 w-3 text-nvr-cyan", "aria-label": "Automatic" }) : /* @__PURE__ */ t("span", { className: "h-1 w-1 rounded-full bg-slate-400", "aria-hidden": !0 }),
|
|
312
304
|
/* @__PURE__ */ n("span", { className: "font-medium", children: [
|
|
313
305
|
a.auto ? "Automatically on" : "On",
|
|
314
306
|
" “",
|
|
@@ -353,7 +345,7 @@ function de({
|
|
|
353
345
|
"data-outbound-toggle": !0,
|
|
354
346
|
className: "inline-flex items-center gap-1 text-[11px] text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100",
|
|
355
347
|
children: [
|
|
356
|
-
d ? /* @__PURE__ */ t(
|
|
348
|
+
d ? /* @__PURE__ */ t(Y, { className: "h-3 w-3" }) : /* @__PURE__ */ t(I, { className: "h-3 w-3" }),
|
|
357
349
|
e.changes.length,
|
|
358
350
|
e.truncated ? "+" : "",
|
|
359
351
|
" value",
|
|
@@ -375,8 +367,8 @@ function de({
|
|
|
375
367
|
"data-outbound-change": a.path,
|
|
376
368
|
children: [
|
|
377
369
|
/* @__PURE__ */ t("td", { className: "truncate px-2 py-1 font-mono text-slate-600 dark:text-slate-300", children: /* @__PURE__ */ t("span", { "data-tip": a.path, children: a.path }) }),
|
|
378
|
-
/* @__PURE__ */ t("td", { className: "truncate px-2 py-1 text-slate-500 line-through decoration-slate-300 dark:text-slate-400 dark:decoration-slate-600", children:
|
|
379
|
-
/* @__PURE__ */ t("td", { className: "truncate px-2 py-1 font-medium text-slate-800 dark:text-slate-100", children:
|
|
370
|
+
/* @__PURE__ */ t("td", { className: "truncate px-2 py-1 text-slate-500 line-through decoration-slate-300 dark:text-slate-400 dark:decoration-slate-600", children: E(a.from) }),
|
|
371
|
+
/* @__PURE__ */ t("td", { className: "truncate px-2 py-1 font-medium text-slate-800 dark:text-slate-100", children: E(a.to) })
|
|
380
372
|
]
|
|
381
373
|
},
|
|
382
374
|
a.path
|
|
@@ -393,9 +385,9 @@ function fe({
|
|
|
393
385
|
onShowRequest: h,
|
|
394
386
|
onJump: o
|
|
395
387
|
}) {
|
|
396
|
-
const l =
|
|
397
|
-
|
|
398
|
-
const { data: d, isLoading: u, isError: e } =
|
|
388
|
+
const l = W();
|
|
389
|
+
R(r, s);
|
|
390
|
+
const { data: d, isLoading: u, isError: e } = K({
|
|
399
391
|
queryKey: ["outbound-preview", r, s],
|
|
400
392
|
queryFn: () => l.request(_(`/integration-preview/${r}/${encodeURIComponent(s)}/outbound`)).then((a) => a.data),
|
|
401
393
|
enabled: !!s && s !== "new",
|