@nivaro/react 0.3.65 → 0.3.67
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 +21 -5
- package/dist/shared/components/ActivityEntry.js +28 -28
- package/dist/shared/components/CollectionBrowserView.js +2432 -2592
- package/dist/shared/components/ItemEditForm.js +3912 -3773
- package/dist/shared/components/MyWorkView.js +124 -113
- package/dist/shared/components/ProfileView.js +483 -472
- package/dist/shared/components/RecordCompare.js +149 -129
- package/dist/shared/components/ReportView.js +1100 -1094
- package/dist/shared/components/bulk/BulkCompareButton.js +62 -0
- package/dist/shared/components/bulk/MessageStakeholders.js +235 -0
- package/dist/shared/components/integrations/IntegrationObligationsView.js +199 -187
- package/dist/shared/components/integrations/console/EventsView.js +22 -24
- package/dist/shared/components/integrations/console/SubmissionRow.js +6 -13
- package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +29 -28
- package/dist/shared/components/integrations/console/tone.js +22 -21
- package/dist/shared/components/item-edit/CatalogPickerField.js +240 -238
- package/dist/shared/components/item-edit/FieldRow.js +193 -193
- package/dist/shared/components/item-edit/GroupSection.js +559 -542
- package/dist/shared/components/item-edit/M2MCombobox.js +414 -349
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +211 -187
- package/dist/shared/components/item-edit/RecordInsights.js +46 -45
- package/dist/shared/components/item-edit/RelationCombobox.js +327 -311
- package/dist/shared/components/item-edit/SummaryPanel.js +146 -144
- package/dist/shared/components/item-edit/UserChip.js +264 -229
- package/dist/shared/components/item-edit/cascade-clear-notice.js +23 -19
- package/dist/shared/components/item-edit/header-path-preview.js +52 -0
- package/dist/shared/components/item-edit/line-merge.js +73 -47
- package/dist/shared/components/item-edit/picker-search.js +25 -21
- package/dist/shared/components/panels/BranchLanes.js +7 -7
- package/dist/shared/components/panels/CommentPanel.js +72 -72
- package/dist/shared/components/panels/PipelinePanel.js +261 -261
- package/dist/shared/components/panels/RecordIntegrityBanner.js +78 -78
- package/dist/shared/components/panels/RevisionsPanel.js +220 -220
- package/dist/shared/components/panels/TaskPanel.js +75 -75
- package/dist/shared/components/queue/QueueWorklist.js +1007 -979
- package/dist/shared/lib/compare-value.js +73 -0
- package/dist/shared/lib/format-value.js +19 -18
- package/dist/shared/lib/obligation-reason-text.js +1 -1
- package/dist/shared/lib/quick-filter-cascade.js +29 -19
- package/dist/shared/lib/utils.js +59 -57
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { RefreshCw as ie, Search as Se, X as Pe, ArrowUpRight as Ee, ArrowDownLe
|
|
|
3
3
|
import { useState as g, useId as Oe, useEffect as L, useMemo as S } from "react";
|
|
4
4
|
import { toast as ne } from "sonner";
|
|
5
5
|
import { useDebounced as Te } from "../../../hooks/useDebounced.js";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as N } from "../../../lib/utils.js";
|
|
7
7
|
import { Checkbox as Ie } from "../../ui/checkbox.js";
|
|
8
8
|
import { SimpleSelect as K } from "../../ui/SimpleSelect.js";
|
|
9
9
|
import { useIntegrationEvents as Re, useReplayEvent as Ae } from "./api.js";
|
|
@@ -89,7 +89,7 @@ function se({
|
|
|
89
89
|
"aria-pressed": h,
|
|
90
90
|
"data-value": m || "all",
|
|
91
91
|
onClick: () => i(m),
|
|
92
|
-
className:
|
|
92
|
+
className: N(
|
|
93
93
|
"px-2.5 text-[12px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
94
94
|
h ? "bg-[#1e293b] text-[#f2f2f2] dark:bg-nvr-cyan/20 dark:text-foreground dark:ring-1 dark:ring-inset dark:ring-nvr-cyan/40" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
95
95
|
),
|
|
@@ -129,7 +129,7 @@ function Xe({ event: t }) {
|
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
},
|
|
132
|
-
className:
|
|
132
|
+
className: N(
|
|
133
133
|
"h-7 shrink-0 whitespace-nowrap rounded-md px-2.5 text-[12px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-70",
|
|
134
134
|
i ? (
|
|
135
135
|
// Tinted brand fill + foreground ink: raw brand cyan under white
|
|
@@ -212,7 +212,7 @@ function He({
|
|
|
212
212
|
/* @__PURE__ */ r(
|
|
213
213
|
"span",
|
|
214
214
|
{
|
|
215
|
-
className:
|
|
215
|
+
className: N("h-2 w-2 shrink-0 rounded-full", Fe[m]),
|
|
216
216
|
role: "img",
|
|
217
217
|
"aria-label": oe[c] ?? "Info",
|
|
218
218
|
"data-tip": oe[c] ?? "Info"
|
|
@@ -242,7 +242,7 @@ function He({
|
|
|
242
242
|
c === "error" && /* @__PURE__ */ r(
|
|
243
243
|
"span",
|
|
244
244
|
{
|
|
245
|
-
className:
|
|
245
|
+
className: N(
|
|
246
246
|
"rounded-full px-1.5 py-px text-[11px] font-medium",
|
|
247
247
|
ue.negative,
|
|
248
248
|
de.negative
|
|
@@ -275,7 +275,7 @@ function M({ title: t, children: o }) {
|
|
|
275
275
|
}
|
|
276
276
|
function at({ onOpenRecord: t }) {
|
|
277
277
|
var V, z, G, J, Q, Z;
|
|
278
|
-
const [o, i] = g(""), [a, d] = g(""), [c, m] = g(""), [u, h] = g(""), [f, b] = g(""), [U, I] = g(""), [R, A] = g(!1), [
|
|
278
|
+
const [o, i] = g(""), [a, d] = g(""), [c, m] = g(""), [u, h] = g(""), [f, b] = g(""), [U, I] = g(""), [R, A] = g(!1), [w, $] = g(null), v = Te(U.trim(), 350), Y = Oe(), [j, pe] = g([]), B = j.filter((e) => e.can_list), W = o ? B.filter((e) => e.direction === o) : B, me = a || (o && W.length === 1 ? W[0].id : ""), l = Re({
|
|
279
279
|
provider: me,
|
|
280
280
|
status: c,
|
|
281
281
|
partner: u || void 0,
|
|
@@ -295,7 +295,7 @@ function at({ onOpenRecord: t }) {
|
|
|
295
295
|
const e = /* @__PURE__ */ new Map();
|
|
296
296
|
for (const n of F) n.direction && e.set(n.id, n.direction);
|
|
297
297
|
return e;
|
|
298
|
-
}, [F]), H = (e) => e.direction ?? q.get(O(e)) ?? null,
|
|
298
|
+
}, [F]), H = (e) => e.direction ?? q.get(O(e)) ?? null, k = ((J = (G = l.data) == null ? void 0 : G.pages[0]) == null ? void 0 : J.record) ?? null, y = S(() => {
|
|
299
299
|
var p;
|
|
300
300
|
const e = /* @__PURE__ */ new Set(), n = [];
|
|
301
301
|
for (const x of ((p = l.data) == null ? void 0 : p.pages) ?? [])
|
|
@@ -305,23 +305,23 @@ function at({ onOpenRecord: t }) {
|
|
|
305
305
|
}
|
|
306
306
|
return n;
|
|
307
307
|
}, [l.data]), _ = S(
|
|
308
|
-
() => o && !a ?
|
|
309
|
-
[
|
|
308
|
+
() => o && !a ? y.filter((e) => H(e) === o) : y,
|
|
309
|
+
[y, o, a, q]
|
|
310
310
|
), he = S(() => {
|
|
311
311
|
const e = /* @__PURE__ */ new Set();
|
|
312
|
-
for (const n of
|
|
312
|
+
for (const n of y) n.partner && e.add(n.partner);
|
|
313
313
|
return u && e.add(u), [
|
|
314
314
|
{ value: "", label: "All partners" },
|
|
315
315
|
...[...e].sort((n, p) => n.localeCompare(p)).map((n) => ({ value: n, label: n }))
|
|
316
316
|
];
|
|
317
|
-
}, [
|
|
317
|
+
}, [y, u]), be = S(() => {
|
|
318
318
|
const e = /* @__PURE__ */ new Map();
|
|
319
|
-
for (const n of
|
|
319
|
+
for (const n of y) n.caller && !e.has(n.caller) && e.set(n.caller, n.label);
|
|
320
320
|
return f && !e.has(f) && e.set(f, "Selected caller"), [
|
|
321
321
|
{ value: "", label: "All callers" },
|
|
322
322
|
...[...e.entries()].sort((n, p) => n[1].localeCompare(p[1])).map(([n, p]) => ({ value: n, label: p }))
|
|
323
323
|
];
|
|
324
|
-
}, [
|
|
324
|
+
}, [y, f]), xe = S(() => {
|
|
325
325
|
const e = [];
|
|
326
326
|
for (const n of _) {
|
|
327
327
|
const p = We(n.created_at), x = e[e.length - 1];
|
|
@@ -359,7 +359,7 @@ function at({ onOpenRecord: t }) {
|
|
|
359
359
|
"data-tip": D ? `Updated ${ce(D)}` : void 0,
|
|
360
360
|
className: "inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-card px-3 text-[12.5px] font-medium text-foreground transition-colors hover:bg-muted disabled:opacity-70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
361
361
|
children: [
|
|
362
|
-
/* @__PURE__ */ r(ie, { className:
|
|
362
|
+
/* @__PURE__ */ r(ie, { className: N("h-3.5 w-3.5", ye && "animate-spin") }),
|
|
363
363
|
D ? `Updated ${le(D)}` : "Refresh"
|
|
364
364
|
]
|
|
365
365
|
}
|
|
@@ -461,16 +461,14 @@ function at({ onOpenRecord: t }) {
|
|
|
461
461
|
"p",
|
|
462
462
|
{
|
|
463
463
|
className: "flex flex-wrap items-center gap-2 text-[12.5px] text-muted-foreground",
|
|
464
|
-
"data-ic-events-record":
|
|
464
|
+
"data-ic-events-record": k ? `${k.collection}:${k.item}` : "none",
|
|
465
465
|
children: [
|
|
466
|
-
|
|
466
|
+
k ? /* @__PURE__ */ s(re, { children: [
|
|
467
467
|
"Events that touched ",
|
|
468
468
|
/* @__PURE__ */ r("span", { className: "font-medium text-foreground", children: v }),
|
|
469
469
|
/* @__PURE__ */ s("span", { className: "text-[12px]", children: [
|
|
470
470
|
"(",
|
|
471
|
-
|
|
472
|
-
" ",
|
|
473
|
-
y.item,
|
|
471
|
+
k.collection.replace(/_/g, " "),
|
|
474
472
|
")"
|
|
475
473
|
] })
|
|
476
474
|
] }) : /* @__PURE__ */ s(re, { children: [
|
|
@@ -514,7 +512,7 @@ function at({ onOpenRecord: t }) {
|
|
|
514
512
|
C = /* @__PURE__ */ s(
|
|
515
513
|
"p",
|
|
516
514
|
{
|
|
517
|
-
className:
|
|
515
|
+
className: N(
|
|
518
516
|
"rounded-lg border px-4 py-3 text-[12.5px]",
|
|
519
517
|
$e.negative,
|
|
520
518
|
ue.negative,
|
|
@@ -535,7 +533,7 @@ function at({ onOpenRecord: t }) {
|
|
|
535
533
|
/* @__PURE__ */ r("code", { className: "font-mono text-[12px] text-foreground", children: "list" }),
|
|
536
534
|
" function; its events then appear here, newest first, with Replay where the source can re-apply one."
|
|
537
535
|
] }) : _.length === 0 ? C = ve ? /* @__PURE__ */ s(M, { title: "Nothing matches", children: [
|
|
538
|
-
v && !
|
|
536
|
+
v && !k ? `No record matches “${v}”. ` : "No events match these filters. ",
|
|
539
537
|
/* @__PURE__ */ r(
|
|
540
538
|
"button",
|
|
541
539
|
{
|
|
@@ -549,7 +547,7 @@ function at({ onOpenRecord: t }) {
|
|
|
549
547
|
] }) : /* @__PURE__ */ r(M, { title: "No events yet", children: "The sources are connected but have not reported anything. Events appear here as partners send them." }) : C = /* @__PURE__ */ s(
|
|
550
548
|
"div",
|
|
551
549
|
{
|
|
552
|
-
className:
|
|
550
|
+
className: N("space-y-5 transition-opacity", l.isPlaceholderData && "opacity-60"),
|
|
553
551
|
"aria-busy": l.isPlaceholderData || void 0,
|
|
554
552
|
children: [
|
|
555
553
|
xe.map((e) => /* @__PURE__ */ s("section", { "data-ic-events-day": e.key, "aria-label": e.label, children: [
|
|
@@ -599,8 +597,8 @@ function at({ onOpenRecord: t }) {
|
|
|
599
597
|
/* @__PURE__ */ r(
|
|
600
598
|
Le,
|
|
601
599
|
{
|
|
602
|
-
target: (
|
|
603
|
-
event:
|
|
600
|
+
target: (w == null ? void 0 : w.target) ?? null,
|
|
601
|
+
event: w == null ? void 0 : w.event,
|
|
604
602
|
onClose: () => $(null),
|
|
605
603
|
onOpenRecord: t,
|
|
606
604
|
onOpenEvent: (e) => $({ target: e, event: null })
|
|
@@ -4,10 +4,10 @@ import { useState as _ } from "react";
|
|
|
4
4
|
import { formatRelative as y, cn as N, titleCase as w } from "../../../lib/utils.js";
|
|
5
5
|
import { Button as v } from "../../ui/button.js";
|
|
6
6
|
import { AttemptHistory as g } from "./drill/attempts.js";
|
|
7
|
-
import { pretty as
|
|
7
|
+
import { pretty as s, CodeBlock as i } from "./drill/json.js";
|
|
8
8
|
import { StatusPill as L } from "./drill/status.js";
|
|
9
9
|
import { ErrorExplanation as d } from "./ErrorExplanation.js";
|
|
10
|
-
function
|
|
10
|
+
function u(e, n) {
|
|
11
11
|
return `${w(e).replace(/s$/, "")} · ${n}`;
|
|
12
12
|
}
|
|
13
13
|
function q({
|
|
@@ -17,7 +17,7 @@ function q({
|
|
|
17
17
|
onShowPath: o,
|
|
18
18
|
initialOpen: p = !1
|
|
19
19
|
}) {
|
|
20
|
-
const [r, m] = _(p), c =
|
|
20
|
+
const [r, m] = _(p), c = s(e.payload), x = s(e.response);
|
|
21
21
|
return /* @__PURE__ */ a(
|
|
22
22
|
"div",
|
|
23
23
|
{
|
|
@@ -35,14 +35,7 @@ function q({
|
|
|
35
35
|
/* @__PURE__ */ t(L, { status: e.status }),
|
|
36
36
|
e.external_api_name && /* @__PURE__ */ t("span", { className: "shrink-0 text-[11.5px] font-semibold text-slate-700 dark:text-slate-200", children: e.external_api_name }),
|
|
37
37
|
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate font-mono text-[11.5px] text-slate-500 dark:text-slate-400", children: e.endpoint_path ?? "—" }),
|
|
38
|
-
e.record_label && /* @__PURE__ */ t(
|
|
39
|
-
"span",
|
|
40
|
-
{
|
|
41
|
-
className: "shrink-0 rounded bg-slate-100 px-1.5 py-0.5 text-[10.5px] font-medium text-slate-600 dark:bg-muted dark:text-slate-300",
|
|
42
|
-
"data-tip": `${e.collection}/${e.item}`,
|
|
43
|
-
children: C(e.collection, e.record_label)
|
|
44
|
-
}
|
|
45
|
-
),
|
|
38
|
+
e.record_label && /* @__PURE__ */ t("span", { className: "shrink-0 rounded bg-slate-100 px-1.5 py-0.5 text-[10.5px] font-medium text-slate-600 dark:bg-muted dark:text-slate-300", children: u(e.collection, e.record_label) }),
|
|
46
39
|
e.external_ref && /* @__PURE__ */ t("span", { className: "shrink-0 rounded bg-slate-100 px-1.5 py-0.5 font-mono text-[10.5px] text-slate-600 dark:bg-muted dark:text-slate-300", children: e.external_ref }),
|
|
47
40
|
/* @__PURE__ */ t(
|
|
48
41
|
"span",
|
|
@@ -103,13 +96,13 @@ function q({
|
|
|
103
96
|
] }),
|
|
104
97
|
e.last_error && /* @__PURE__ */ t(d, { explanation: e.explanation, raw: e.last_error }),
|
|
105
98
|
/* @__PURE__ */ t(
|
|
106
|
-
|
|
99
|
+
i,
|
|
107
100
|
{
|
|
108
101
|
label: e.attempts > 1 ? "Latest request" : "Request payload",
|
|
109
102
|
value: c
|
|
110
103
|
}
|
|
111
104
|
),
|
|
112
|
-
/* @__PURE__ */ t(
|
|
105
|
+
/* @__PURE__ */ t(i, { label: e.attempts > 1 ? "Latest response" : "Response", value: x }),
|
|
113
106
|
e.attempts > 1 && /* @__PURE__ */ t(g, { submissionId: e.id }),
|
|
114
107
|
e.status === "failed" && /* @__PURE__ */ a(v, { size: "sm", variant: "outline", disabled: l, onClick: () => n(e.id), children: [
|
|
115
108
|
l ? /* @__PURE__ */ t(f, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(k, { className: "h-3 w-3" }),
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as D } from "react/jsx-runtime";
|
|
2
2
|
import { ExternalLink as _, ArrowRight as P, Loader2 as U, RefreshCw as $ } from "lucide-react";
|
|
3
3
|
import { useMemo as W } from "react";
|
|
4
|
-
import { useNavigation as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { useNavigation as O } from "../../../../context.js";
|
|
5
|
+
import { plainObligationReason as A } from "../../../../lib/obligation-reason-text.js";
|
|
6
|
+
import { cn as m, titleCase as F } from "../../../../lib/utils.js";
|
|
7
|
+
import { useSubmissionDetail as M, useRetrySubmission as j } from "../api.js";
|
|
8
|
+
import { ErrorExplanation as B } from "../ErrorExplanation.js";
|
|
8
9
|
import { TONE_TEXT as d, TONE_SOFT as w, agoText as C, exactTime as y } from "../tone.js";
|
|
9
|
-
import { AttemptHistory as
|
|
10
|
+
import { AttemptHistory as z } from "./attempts.js";
|
|
10
11
|
import { CodeBlock as q, pretty as E } from "./json.js";
|
|
11
12
|
import { RequesterChip as S } from "./requester.js";
|
|
12
|
-
import { StatusPill as
|
|
13
|
-
function
|
|
14
|
-
const t =
|
|
13
|
+
import { StatusPill as H } from "./status.js";
|
|
14
|
+
function I() {
|
|
15
|
+
const t = O();
|
|
15
16
|
return (i) => i ? t.consoleUrl ? t.consoleUrl(i) : i : null;
|
|
16
17
|
}
|
|
17
18
|
function T(t, i) {
|
|
@@ -32,11 +33,11 @@ function b({ label: t, children: i }) {
|
|
|
32
33
|
function N() {
|
|
33
34
|
return /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "text-muted-foreground", children: "·" });
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function X(t, i) {
|
|
36
37
|
var o, c, l, u;
|
|
37
38
|
return (o = t.user) != null && o.id || (c = i.user) != null && c.id ? ((l = t.user) == null ? void 0 : l.id) === ((u = i.user) == null ? void 0 : u.id) : t.kind === i.kind && t.label === i.label;
|
|
38
39
|
}
|
|
39
|
-
const
|
|
40
|
+
const G = {
|
|
40
41
|
transient: "Temporary failure",
|
|
41
42
|
rate_limited: "Rate limited",
|
|
42
43
|
auth: "Credentials refused",
|
|
@@ -52,7 +53,7 @@ const X = {
|
|
|
52
53
|
skipped: "neutral",
|
|
53
54
|
superseded: "neutral"
|
|
54
55
|
};
|
|
55
|
-
function
|
|
56
|
+
function J() {
|
|
56
57
|
return /* @__PURE__ */ n("div", { className: "space-y-2.5", "aria-busy": !0, children: [
|
|
57
58
|
[72, 96, 60, 84].map((t) => /* @__PURE__ */ e(
|
|
58
59
|
"div",
|
|
@@ -65,10 +66,10 @@ function G() {
|
|
|
65
66
|
/* @__PURE__ */ e("div", { className: "h-16 animate-pulse rounded-md bg-[hsl(var(--nvr-skeleton))]" })
|
|
66
67
|
] });
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
+
function de({ id: t, onOpenRecord: i, onRetry: o, retryBusy: c }) {
|
|
69
70
|
var g, f, x;
|
|
70
|
-
const { data: l, isLoading: u, isError: v, error: r } =
|
|
71
|
-
if (u) return /* @__PURE__ */ e(
|
|
71
|
+
const { data: l, isLoading: u, isError: v, error: r } = M(t), p = j();
|
|
72
|
+
if (u) return /* @__PURE__ */ e(J, {});
|
|
72
73
|
if (v || !l) {
|
|
73
74
|
const s = ((g = r == null ? void 0 : r.response) == null ? void 0 : g.error) ?? (r instanceof Error ? r.message : null);
|
|
74
75
|
return /* @__PURE__ */ n("p", { className: m("rounded-md px-3 py-2 text-[12px]", w.negative, d.negative), children: [
|
|
@@ -78,7 +79,7 @@ function oe({ id: t, onOpenRecord: i, onRetry: o, retryBusy: c }) {
|
|
|
78
79
|
] });
|
|
79
80
|
}
|
|
80
81
|
return /* @__PURE__ */ e(
|
|
81
|
-
|
|
82
|
+
K,
|
|
82
83
|
{
|
|
83
84
|
d: l,
|
|
84
85
|
onOpenRecord: i,
|
|
@@ -88,18 +89,18 @@ function oe({ id: t, onOpenRecord: i, onRetry: o, retryBusy: c }) {
|
|
|
88
89
|
}
|
|
89
90
|
);
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
+
function K({
|
|
92
93
|
d: t,
|
|
93
94
|
onOpenRecord: i,
|
|
94
95
|
onRetry: o,
|
|
95
96
|
retryBusy: c,
|
|
96
97
|
retryError: l
|
|
97
98
|
}) {
|
|
98
|
-
const u =
|
|
99
|
+
const u = O(), v = I(), r = t.submission, p = W(
|
|
99
100
|
() => new Map(t.attempt_requesters.map((a) => [a.attempt, a.requester])),
|
|
100
101
|
[t.attempt_requesters]
|
|
101
|
-
), g =
|
|
102
|
-
(a) => a.attempt > 1 && a.requester.kind !== "unknown" && !
|
|
102
|
+
), g = F(r.collection).replace(/s$/, ""), f = v(t.trigger.link), x = t.partner.id != null ? v(`/external-apis/${t.partner.id}`) : null, s = t.obligation, k = t.attempt_requesters.filter(
|
|
103
|
+
(a) => a.attempt > 1 && a.requester.kind !== "unknown" && !X(a.requester, t.triggered_by)
|
|
103
104
|
);
|
|
104
105
|
return /* @__PURE__ */ n("div", { className: "space-y-4", "data-ic-drill": `submission:${r.id}`, children: [
|
|
105
106
|
/* @__PURE__ */ n(
|
|
@@ -136,7 +137,7 @@ function J({
|
|
|
136
137
|
r.record_label
|
|
137
138
|
] }),
|
|
138
139
|
/* @__PURE__ */ e(N, {}),
|
|
139
|
-
/* @__PURE__ */ e(
|
|
140
|
+
/* @__PURE__ */ e(H, { status: r.status }),
|
|
140
141
|
r.error_class && /* @__PURE__ */ e(
|
|
141
142
|
"span",
|
|
142
143
|
{
|
|
@@ -146,7 +147,7 @@ function J({
|
|
|
146
147
|
d.warning
|
|
147
148
|
),
|
|
148
149
|
"data-tip": `Error class: ${r.error_class}`,
|
|
149
|
-
children:
|
|
150
|
+
children: G[r.error_class] ?? r.error_class
|
|
150
151
|
}
|
|
151
152
|
),
|
|
152
153
|
/* @__PURE__ */ e(N, {}),
|
|
@@ -171,7 +172,7 @@ function J({
|
|
|
171
172
|
}
|
|
172
173
|
),
|
|
173
174
|
(r.last_error || (s == null ? void 0 : s.reason)) && /* @__PURE__ */ n(h, { name: "error", title: "What went wrong", children: [
|
|
174
|
-
r.last_error && r.explanation && /* @__PURE__ */ e(
|
|
175
|
+
r.last_error && r.explanation && /* @__PURE__ */ e(B, { explanation: r.explanation, raw: r.last_error }),
|
|
175
176
|
r.last_error && !r.explanation && /* @__PURE__ */ e(
|
|
176
177
|
"p",
|
|
177
178
|
{
|
|
@@ -186,10 +187,10 @@ function J({
|
|
|
186
187
|
(s == null ? void 0 : s.reason) && s.reason !== r.last_error && /* @__PURE__ */ n("p", { className: "mt-1.5 max-w-[80ch] text-[12px] leading-relaxed text-muted-foreground", children: [
|
|
187
188
|
/* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: "Obligation:" }),
|
|
188
189
|
" ",
|
|
189
|
-
s.reason
|
|
190
|
+
A(s.reason)
|
|
190
191
|
] })
|
|
191
192
|
] }),
|
|
192
|
-
/* @__PURE__ */ e(h, { name: "attempts", title: "Attempts", children: /* @__PURE__ */ e(
|
|
193
|
+
/* @__PURE__ */ e(h, { name: "attempts", title: "Attempts", children: /* @__PURE__ */ e(z, { submissionId: r.id, requesters: p, title: null }) }),
|
|
193
194
|
/* @__PURE__ */ e(
|
|
194
195
|
h,
|
|
195
196
|
{
|
|
@@ -255,7 +256,7 @@ function J({
|
|
|
255
256
|
] }) }),
|
|
256
257
|
/* @__PURE__ */ n(h, { name: "calls", title: "Call log", children: [
|
|
257
258
|
t.call_logs.length === 0 ? /* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: "No partner calls matched this push — the writer that sent it does not log its calls." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-border rounded-md border border-border", children: t.call_logs.map((a) => {
|
|
258
|
-
const
|
|
259
|
+
const L = a.error != null || (a.status ?? 0) >= 400;
|
|
259
260
|
return /* @__PURE__ */ n(
|
|
260
261
|
"li",
|
|
261
262
|
{
|
|
@@ -276,7 +277,7 @@ function J({
|
|
|
276
277
|
{
|
|
277
278
|
className: m(
|
|
278
279
|
"font-mono font-medium",
|
|
279
|
-
|
|
280
|
+
L ? d.negative : d.positive
|
|
280
281
|
),
|
|
281
282
|
children: a.status ?? "no response"
|
|
282
283
|
}
|
|
@@ -348,6 +349,6 @@ function J({
|
|
|
348
349
|
] });
|
|
349
350
|
}
|
|
350
351
|
export {
|
|
351
|
-
|
|
352
|
-
|
|
352
|
+
de as SubmissionDrill,
|
|
353
|
+
X as sameRequester
|
|
353
354
|
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import { plainObligationReason as v } from "../../../lib/obligation-reason-text.js";
|
|
2
|
+
const b = {
|
|
2
3
|
negative: "text-[color:var(--nvr-role-negative,#dc2626)] dark:text-[color:var(--nvr-role-negative-dark,#e08383)]",
|
|
3
4
|
warning: "text-[color:var(--nvr-role-warning,#b45309)] dark:text-[color:var(--nvr-role-warning-dark,#d4936a)]",
|
|
4
5
|
positive: "text-[color:var(--nvr-role-positive,#15803d)] dark:text-[color:var(--nvr-role-positive-dark,#9fbf8a)]",
|
|
5
6
|
info: "text-[color:var(--nvr-role-info,#4f46e5)] dark:text-[color:var(--nvr-role-info-dark,#8fa6c9)]",
|
|
6
7
|
neutral: "text-muted-foreground"
|
|
7
|
-
},
|
|
8
|
+
}, m = {
|
|
8
9
|
negative: "bg-[color:color-mix(in_srgb,var(--nvr-role-negative,#dc2626)_9%,transparent)] dark:bg-[color:color-mix(in_srgb,var(--nvr-role-negative-dark,#e08383)_14%,transparent)]",
|
|
9
10
|
warning: "bg-[color:color-mix(in_srgb,var(--nvr-role-warning,#b45309)_9%,transparent)] dark:bg-[color:color-mix(in_srgb,var(--nvr-role-warning-dark,#d4936a)_14%,transparent)]",
|
|
10
11
|
positive: "bg-[color:color-mix(in_srgb,var(--nvr-role-positive,#15803d)_9%,transparent)] dark:bg-[color:color-mix(in_srgb,var(--nvr-role-positive-dark,#9fbf8a)_14%,transparent)]",
|
|
11
12
|
info: "bg-[color:color-mix(in_srgb,var(--nvr-role-info,#4f46e5)_8%,transparent)] dark:bg-[color:color-mix(in_srgb,var(--nvr-role-info-dark,#8fa6c9)_14%,transparent)]",
|
|
12
13
|
neutral: "bg-muted"
|
|
13
|
-
},
|
|
14
|
+
}, u = {
|
|
14
15
|
negative: "bg-[color:var(--nvr-role-negative,#dc2626)] dark:bg-[color:var(--nvr-role-negative-dark,#e08383)]",
|
|
15
16
|
warning: "bg-[color:var(--nvr-role-warning,#b45309)] dark:bg-[color:var(--nvr-role-warning-dark,#d4936a)]",
|
|
16
17
|
positive: "bg-[color:var(--nvr-role-positive,#15803d)] dark:bg-[color:var(--nvr-role-positive-dark,#9fbf8a)]",
|
|
17
18
|
info: "bg-[color:var(--nvr-role-info,#4f46e5)] dark:bg-[color:var(--nvr-role-info-dark,#8fa6c9)]",
|
|
18
19
|
neutral: "bg-muted-foreground/40"
|
|
19
|
-
},
|
|
20
|
+
}, p = {
|
|
20
21
|
negative: "border-[color:color-mix(in_srgb,var(--nvr-role-negative,#dc2626)_35%,transparent)] dark:border-[color:color-mix(in_srgb,var(--nvr-role-negative-dark,#e08383)_35%,transparent)]",
|
|
21
22
|
warning: "border-[color:color-mix(in_srgb,var(--nvr-role-warning,#b45309)_35%,transparent)] dark:border-[color:color-mix(in_srgb,var(--nvr-role-warning-dark,#d4936a)_35%,transparent)]"
|
|
22
23
|
};
|
|
23
|
-
function
|
|
24
|
+
function g(n, r = Date.now()) {
|
|
24
25
|
if (!n) return null;
|
|
25
26
|
const e = new Date(n).getTime();
|
|
26
27
|
if (Number.isNaN(e)) return null;
|
|
@@ -36,18 +37,18 @@ function v(n, r = Date.now()) {
|
|
|
36
37
|
const l = Math.floor(a / 12), c = a - l * 12;
|
|
37
38
|
return c > 0 ? `${l}y ${c}mo` : `${l}y`;
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
const r =
|
|
40
|
+
function _(n) {
|
|
41
|
+
const r = g(n);
|
|
41
42
|
return r ? r === "just now" ? r : `${r} ago` : "never";
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function k(n) {
|
|
44
45
|
if (!n) return "";
|
|
45
46
|
const r = new Date(n);
|
|
46
47
|
return Number.isNaN(r.getTime()) ? "" : `${r.toLocaleString()} · ${r.toISOString()}`;
|
|
47
48
|
}
|
|
48
|
-
const
|
|
49
|
-
function
|
|
50
|
-
let r = String(n ?? "").trim();
|
|
49
|
+
const s = /\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?/g, d = /:?\s*\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
50
|
+
function x(n) {
|
|
51
|
+
let r = v(String(n ?? "").trim());
|
|
51
52
|
if (!r) return "";
|
|
52
53
|
if (r.startsWith("{") && r.endsWith("}"))
|
|
53
54
|
try {
|
|
@@ -55,7 +56,7 @@ function p(n) {
|
|
|
55
56
|
typeof o == "string" && o.trim() && (r = o.trim().replace(/\s*-\s*$/, ""));
|
|
56
57
|
} catch {
|
|
57
58
|
}
|
|
58
|
-
return r = r.replace(
|
|
59
|
+
return r = r.replace(s, (e) => {
|
|
59
60
|
const o = new Date(e);
|
|
60
61
|
return Number.isNaN(o.getTime()) ? e : o.toLocaleString("en-US", {
|
|
61
62
|
month: "short",
|
|
@@ -64,15 +65,15 @@ function p(n) {
|
|
|
64
65
|
hour: "numeric",
|
|
65
66
|
minute: "2-digit"
|
|
66
67
|
});
|
|
67
|
-
}), r.replace(
|
|
68
|
+
}), r.replace(d, "").replace(/\s{2,}/g, " ").trim();
|
|
68
69
|
}
|
|
69
70
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
p as TONE_BORDER,
|
|
72
|
+
u as TONE_FILL,
|
|
73
|
+
m as TONE_SOFT,
|
|
74
|
+
b as TONE_TEXT,
|
|
75
|
+
g as ageOf,
|
|
76
|
+
_ as agoText,
|
|
77
|
+
k as exactTime,
|
|
78
|
+
x as plainDetail
|
|
78
79
|
};
|