@nivaro/react 0.3.137 → 0.3.139
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 +95 -4
- package/dist/index.js +748 -743
- package/dist/shared/components/CollectionBrowserView.js +392 -389
- package/dist/shared/components/DelegateCoverLine.js +80 -87
- package/dist/shared/components/ItemEditForm.js +589 -588
- package/dist/shared/components/MyWorkView.js +284 -286
- package/dist/shared/components/NotificationBell.js +251 -205
- package/dist/shared/components/ai/AiAnalyticsView.js +878 -417
- package/dist/shared/components/ai/AiPlanCard.js +164 -122
- package/dist/shared/components/ai/AiPlanUndo.js +291 -0
- package/dist/shared/components/ai/call-log/CallDrawer.js +357 -0
- package/dist/shared/components/ai/call-log/RawJson.js +126 -0
- package/dist/shared/components/ai/call-log/ThreadView.js +223 -0
- package/dist/shared/components/ai/call-log/TranscriptView.js +227 -0
- package/dist/shared/components/ai/call-log/controls.js +364 -0
- package/dist/shared/components/ai/call-log/format.js +46 -0
- package/dist/shared/components/ai/call-log/url.js +105 -0
- package/dist/shared/components/chat/chat-core.js +422 -346
- package/dist/shared/components/integrations/IntegrationObligationsView.js +98 -98
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +102 -93
- package/dist/shared/components/integrations/console/api.js +11 -1
- package/dist/shared/components/item-edit/HeaderRollupExplainer.js +5 -1
- package/dist/shared/components/item-edit/RecordLiveSync.js +241 -229
- package/dist/shared/components/item-edit/RecordRecapChanges.js +166 -0
- package/dist/shared/components/item-edit/RecordRecapStrip.js +254 -84
- package/dist/shared/components/item-edit/live-related.js +34 -18
- package/dist/shared/components/panels/RevisionsPanel.js +735 -683
- package/dist/shared/components/queue/QueueWorklist.js +323 -316
- package/dist/shared/components/support/SupportRequestDialog.js +198 -181
- package/dist/shared/components/trackers/use-tracker-link.js +74 -65
- package/dist/shared/lib/activity-sentence.js +167 -151
- package/dist/shared/lib/config-update-refresh.js +34 -0
- package/dist/shared/lib/config-watch.js +17 -17
- package/dist/shared/lib/gap-refresh.js +49 -0
- package/dist/shared/lib/integration-dots.js +8 -8
- package/dist/shared/lib/live-ops.js +26 -23
- package/dist/shared/lib/live-pickers.js +1 -1
- package/dist/shared/lib/live-queries.js +223 -195
- package/dist/shared/lib/live.js +56 -51
- package/dist/shared/lib/obligation-banner.js +11 -10
- package/dist/shared/lib/obligation-filters.js +22 -18
- package/dist/shared/lib/obligation-reason-text.js +18 -8
- package/dist/shared/lib/presence-hooks.js +133 -132
- package/dist/shared/lib/reconnect-resync.js +90 -0
- package/dist/shared/lib/record-room-holds.js +43 -0
- package/dist/shared/lib/socket-realtime.js +116 -105
- package/dist/shared/lib/user-sync.js +1 -6
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { Code2 as _e, ChevronDown as
|
|
4
|
-
import { useState as E, useRef as Fe, useEffect as X, useMemo as y, Fragment as
|
|
2
|
+
import { useQueryClient as ie, useQuery as V, useQueries as Se, useMutation as Ce } from "@tanstack/react-query";
|
|
3
|
+
import { Code2 as _e, ChevronDown as qe, Loader2 as Oe, Send as Ee } from "lucide-react";
|
|
4
|
+
import { useState as E, useRef as Fe, useEffect as X, useMemo as y, Fragment as Le } from "react";
|
|
5
5
|
import { toast as Z } from "sonner";
|
|
6
|
-
import { useNivaroClient as
|
|
7
|
-
import { get as Y, post as
|
|
8
|
-
import { obligationQueryParams as
|
|
9
|
-
import { plainObligationReason as
|
|
10
|
-
import { serverNow as
|
|
11
|
-
import { titleCase as
|
|
12
|
-
import { EmptyState as
|
|
13
|
-
import { ErrorSurface as
|
|
14
|
-
import { colorPair as
|
|
15
|
-
import { TipLayer as
|
|
6
|
+
import { useNivaroClient as le, useItemNavigation as Te, useNavigation as Ke } from "../../context.js";
|
|
7
|
+
import { get as Y, post as se } from "../../lib/commands.js";
|
|
8
|
+
import { obligationQueryParams as Ie, obligationTabsFor as je, toneForOutcome as Pe, toneForObligation as De, isRoutableRecord as Re, attemptsLabel as Ae, lastResponseLabel as He, lastResponseFull as Me } from "../../lib/obligation-filters.js";
|
|
9
|
+
import { plainObligationReason as ee } from "../../lib/obligation-reason-text.js";
|
|
10
|
+
import { serverNow as Qe } from "../../lib/server-clock.js";
|
|
11
|
+
import { titleCase as de, cn as d, formatRelative as ce, humanHours as $e } from "../../lib/utils.js";
|
|
12
|
+
import { EmptyState as te } from "../EmptyState.js";
|
|
13
|
+
import { ErrorSurface as oe } from "../ErrorSurface.js";
|
|
14
|
+
import { colorPair as ne } from "../QueryTable.js";
|
|
15
|
+
import { TipLayer as Be } from "../TipLayer.js";
|
|
16
16
|
import { SimpleSelectXs as P } from "../ui/SimpleSelect.js";
|
|
17
|
-
import { SendCurrentDataButton as
|
|
17
|
+
import { SendCurrentDataButton as Ue } from "./SendCurrentData.js";
|
|
18
18
|
const D = {
|
|
19
19
|
overdue: "Overdue",
|
|
20
20
|
failed: "Failed",
|
|
@@ -23,7 +23,7 @@ const D = {
|
|
|
23
23
|
sent: "Sent",
|
|
24
24
|
missing: "Missing",
|
|
25
25
|
superseded: "Superseded"
|
|
26
|
-
},
|
|
26
|
+
}, Je = [
|
|
27
27
|
"overdue",
|
|
28
28
|
"failed",
|
|
29
29
|
"pending",
|
|
@@ -32,17 +32,17 @@ const D = {
|
|
|
32
32
|
"missing",
|
|
33
33
|
"superseded"
|
|
34
34
|
];
|
|
35
|
-
function
|
|
35
|
+
function ae(n) {
|
|
36
36
|
return n === "danger" ? "negative" : n === "warning" ? "warning" : n === "positive" ? "positive" : null;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const b = new Date(n).getTime() -
|
|
40
|
-
return b > 0 ? `due in ${
|
|
38
|
+
function We(n) {
|
|
39
|
+
const b = new Date(n).getTime() - Qe();
|
|
40
|
+
return b > 0 ? `due in ${$e(b / 36e5)}` : ce(n);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const b =
|
|
42
|
+
function ze({ obligationId: n }) {
|
|
43
|
+
const b = le(), c = ie(), [p, g] = E(!1), a = Ce({
|
|
44
44
|
mutationFn: () => b.request(
|
|
45
|
-
|
|
45
|
+
se(`/integration-obligations/${n}/send`)
|
|
46
46
|
),
|
|
47
47
|
onSuccess: (l) => {
|
|
48
48
|
var u;
|
|
@@ -72,13 +72,13 @@ function We({ obligationId: n }) {
|
|
|
72
72
|
p ? "border-nvr-cyan bg-nvr-cyan/10 text-nvr-cyan dark:border-nvr-cyan dark:bg-nvr-cyan/15" : "border-slate-200 text-slate-500 hover:border-slate-300 hover:bg-slate-50 dark:border-border dark:text-muted-foreground dark:hover:bg-muted"
|
|
73
73
|
),
|
|
74
74
|
children: [
|
|
75
|
-
a.isPending ? /* @__PURE__ */ t(
|
|
75
|
+
a.isPending ? /* @__PURE__ */ t(Oe, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(Ee, { className: "h-3 w-3" }),
|
|
76
76
|
p ? "Confirm?" : "Send now"
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Ge({ open: n, onToggle: b }) {
|
|
82
82
|
return /* @__PURE__ */ r(
|
|
83
83
|
"button",
|
|
84
84
|
{
|
|
@@ -91,13 +91,13 @@ function ze({ open: n, onToggle: b }) {
|
|
|
91
91
|
children: [
|
|
92
92
|
/* @__PURE__ */ t(_e, { className: "h-3 w-3" }),
|
|
93
93
|
n ? "Hide request" : "Show request",
|
|
94
|
-
/* @__PURE__ */ t(
|
|
94
|
+
/* @__PURE__ */ t(qe, { className: d("h-3 w-3 transition-transform", n && "rotate-180") })
|
|
95
95
|
]
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
const n =
|
|
99
|
+
function Ve() {
|
|
100
|
+
const n = Ke(), b = "/settings?section=integrations", c = n.consoleUrl ? n.consoleUrl(b) : b;
|
|
101
101
|
if (!c) return null;
|
|
102
102
|
const p = /^https?:\/\//.test(c);
|
|
103
103
|
return /* @__PURE__ */ t(
|
|
@@ -114,10 +114,10 @@ function Ge() {
|
|
|
114
114
|
}
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
return n.record_label ? n.record_label : /^(nivaro|directus)_/i.test(n.collection) ? n.item :
|
|
117
|
+
function re(n) {
|
|
118
|
+
return n.record_label ? n.record_label : /^(nivaro|directus)_/i.test(n.collection) ? n.item : de(n.collection).replace(/s$/, "");
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Xe(n) {
|
|
121
121
|
return n.submission_attempts == null ? null : {
|
|
122
122
|
attempts: n.submission_attempts,
|
|
123
123
|
status: n.submission_status,
|
|
@@ -125,7 +125,7 @@ function Ve(n) {
|
|
|
125
125
|
response: n.submission_response
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Ze(n) {
|
|
129
129
|
if (!n) return null;
|
|
130
130
|
try {
|
|
131
131
|
return JSON.stringify(JSON.parse(n), null, 2);
|
|
@@ -133,15 +133,15 @@ function Xe(n) {
|
|
|
133
133
|
return n;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
function
|
|
138
|
-
const c =
|
|
136
|
+
const _ = 50;
|
|
137
|
+
function ht({ api: n, className: b }) {
|
|
138
|
+
const c = le(), p = ie(), g = Te(), [a, l] = E({
|
|
139
139
|
api: n ?? null,
|
|
140
140
|
kind: null,
|
|
141
141
|
collection: null,
|
|
142
142
|
outcome: ["overdue", "failed", "missing"],
|
|
143
143
|
ageHours: null
|
|
144
|
-
}), [u,
|
|
144
|
+
}), [u, F] = E(1), [ue, R] = E(null), A = Fe(n ?? null);
|
|
145
145
|
X(() => {
|
|
146
146
|
const e = n ?? null;
|
|
147
147
|
e !== A.current && (A.current = e, l((o) => ({ ...o, api: e })));
|
|
@@ -149,45 +149,45 @@ function gt({ api: n, className: b }) {
|
|
|
149
149
|
const {
|
|
150
150
|
data: m,
|
|
151
151
|
isLoading: H,
|
|
152
|
-
isError:
|
|
152
|
+
isError: me
|
|
153
153
|
} = V({
|
|
154
154
|
queryKey: ["integration-obligations", "summary"],
|
|
155
155
|
queryFn: () => c.request(Y("/integration-obligations/summary")),
|
|
156
156
|
staleTime: 3e4
|
|
157
|
-
}), S = (m == null ? void 0 : m.remediation_enabled) === !0,
|
|
158
|
-
!
|
|
157
|
+
}), S = (m == null ? void 0 : m.remediation_enabled) === !0, be = (m == null ? void 0 : m.notifications_enabled) === !0, M = H ? [] : [
|
|
158
|
+
!be && "notifications off",
|
|
159
159
|
!S && "remediation off"
|
|
160
|
-
].filter((e) => !!e),
|
|
160
|
+
].filter((e) => !!e), pe = a.outcome.join(",");
|
|
161
161
|
X(() => {
|
|
162
|
-
|
|
163
|
-
}, [a.api, a.kind, a.collection,
|
|
162
|
+
F(1), R(null);
|
|
163
|
+
}, [a.api, a.kind, a.collection, pe, a.ageHours]);
|
|
164
164
|
const Q = y(
|
|
165
165
|
() => ({
|
|
166
|
-
...
|
|
166
|
+
...Ie(a),
|
|
167
167
|
page: String(u),
|
|
168
|
-
limit: String(
|
|
168
|
+
limit: String(_)
|
|
169
169
|
}),
|
|
170
170
|
[a, u]
|
|
171
171
|
), {
|
|
172
172
|
data: N,
|
|
173
|
-
isLoading:
|
|
174
|
-
isFetching:
|
|
175
|
-
isError:
|
|
173
|
+
isLoading: ge,
|
|
174
|
+
isFetching: he,
|
|
175
|
+
isError: xe
|
|
176
176
|
} = V({
|
|
177
177
|
queryKey: ["integration-obligations", "list", Q],
|
|
178
178
|
queryFn: () => c.request(Y("/integration-obligations", Q)),
|
|
179
179
|
staleTime: 15e3,
|
|
180
180
|
placeholderData: (e) => e
|
|
181
|
-
}), $ = (m == null ? void 0 : m.data.apis) ?? [], B = n ? $.filter((e) => e.api === n) : $, w = (m == null ? void 0 : m.data.kinds) ?? [],
|
|
181
|
+
}), $ = (m == null ? void 0 : m.data.apis) ?? [], B = n ? $.filter((e) => e.api === n) : $, w = (m == null ? void 0 : m.data.kinds) ?? [], L = a.api ? w.filter((e) => e.api === a.api) : w, fe = y(() => {
|
|
182
182
|
const e = /* @__PURE__ */ new Map();
|
|
183
183
|
for (const o of w) e.has(o.kind) || e.set(o.kind, o.label);
|
|
184
184
|
return e;
|
|
185
|
-
}, [w]),
|
|
185
|
+
}, [w]), ve = y(() => {
|
|
186
186
|
const e = /* @__PURE__ */ new Map();
|
|
187
|
-
for (const o of
|
|
188
|
-
e.has(o.collection) || e.set(o.collection,
|
|
187
|
+
for (const o of L)
|
|
188
|
+
e.has(o.collection) || e.set(o.collection, de(o.collection));
|
|
189
189
|
return [...e.entries()].map(([o, i]) => ({ value: o, label: i })).sort((o, i) => o.label.localeCompare(i.label));
|
|
190
|
-
}, [
|
|
190
|
+
}, [L]), f = y(() => je(w, a.api), [w, a.api]), U = y(
|
|
191
191
|
() => new Set(
|
|
192
192
|
(a.kind ?? "").split(",").map((e) => e.trim()).filter(Boolean)
|
|
193
193
|
),
|
|
@@ -195,16 +195,16 @@ function gt({ api: n, className: b }) {
|
|
|
195
195
|
), J = (e) => e.length > 0 && e.length === U.size && e.every((o) => U.has(o)), s = J(f.waiting) ? "waiting" : J(f.inbound) ? "inbound" : "all", T = (e) => {
|
|
196
196
|
const o = e === "waiting" ? f.waiting : e === "inbound" ? f.inbound : [];
|
|
197
197
|
l((i) => ({ ...i, kind: o.length > 0 ? o.join(",") : null }));
|
|
198
|
-
}, C = (N == null ? void 0 : N.data) ?? [],
|
|
198
|
+
}, C = (N == null ? void 0 : N.data) ?? [], q = (N == null ? void 0 : N.total) ?? 0, K = y(
|
|
199
199
|
() => s === "waiting" ? [...new Set(C.map((e) => e.collection))] : [],
|
|
200
200
|
[s, C]
|
|
201
|
-
), I =
|
|
201
|
+
), I = Se({
|
|
202
202
|
queries: K.map((e) => {
|
|
203
203
|
const o = C.filter((i) => i.collection === e).map((i) => i.item);
|
|
204
204
|
return {
|
|
205
205
|
queryKey: ["integration-obligations", "owners", e, o.slice().sort().join(",")],
|
|
206
206
|
queryFn: () => c.request(
|
|
207
|
-
|
|
207
|
+
se(`/pipelines/instance/${e}/owners/batch`, { ids: o })
|
|
208
208
|
).then((i) => i.data ?? {}),
|
|
209
209
|
enabled: o.length > 0,
|
|
210
210
|
staleTime: 6e4
|
|
@@ -219,13 +219,13 @@ function gt({ api: n, className: b }) {
|
|
|
219
219
|
for (const [x, k] of Object.entries(h))
|
|
220
220
|
e[`${o}:${x}`] = k.map((O) => O.name).join(", ");
|
|
221
221
|
}), e;
|
|
222
|
-
}, [K, I]),
|
|
222
|
+
}, [K, I]), ke = I.some((e) => e.isLoading), ye = (e) => {
|
|
223
223
|
const o = `${e.collection}:${e.item}`;
|
|
224
|
-
return o in W ? W[o] || "—" :
|
|
225
|
-
},
|
|
224
|
+
return o in W ? W[o] || "—" : ke ? "…" : "—";
|
|
225
|
+
}, Ne = 7 + (s === "waiting" ? 1 : 0) + (s === "inbound" ? 1 : 0) + (S ? 1 : 0), z = (e) => l((o) => ({
|
|
226
226
|
...o,
|
|
227
227
|
outcome: o.outcome.includes(e) ? o.outcome.filter((i) => i !== e) : [...o.outcome, e]
|
|
228
|
-
})),
|
|
228
|
+
})), we = (e) => l((o) => ({ ...o, api: o.api === e ? null : e }));
|
|
229
229
|
return /* @__PURE__ */ r("div", { className: d("space-y-4", b), "data-obligations-board": !0, children: [
|
|
230
230
|
M.length > 0 && /* @__PURE__ */ r(
|
|
231
231
|
"p",
|
|
@@ -235,12 +235,12 @@ function gt({ api: n, className: b }) {
|
|
|
235
235
|
children: [
|
|
236
236
|
M.join(" · "),
|
|
237
237
|
" — ",
|
|
238
|
-
/* @__PURE__ */ t(
|
|
238
|
+
/* @__PURE__ */ t(Ve, {})
|
|
239
239
|
]
|
|
240
240
|
}
|
|
241
241
|
),
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
me ? /* @__PURE__ */ t(oe, { variant: "500", detail: "Could not load the obligations summary." }) : H ? /* @__PURE__ */ t("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: [1, 2, 3].map((e) => /* @__PURE__ */ t("div", { className: "h-24 animate-pulse rounded-xl bg-[hsl(var(--nvr-skeleton))]" }, e)) }) : B.length === 0 ? /* @__PURE__ */ t(
|
|
243
|
+
te,
|
|
244
244
|
{
|
|
245
245
|
title: "No obligations recorded yet",
|
|
246
246
|
detail: "The reconcile sweep runs every 15 minutes — once an integration has a registered obligation kind and a message comes due, it shows up here."
|
|
@@ -257,7 +257,7 @@ function gt({ api: n, className: b }) {
|
|
|
257
257
|
{
|
|
258
258
|
type: "button",
|
|
259
259
|
"aria-pressed": a.api === e.api,
|
|
260
|
-
onClick: () =>
|
|
260
|
+
onClick: () => we(e.api),
|
|
261
261
|
"data-tip": a.api === e.api ? "Showing only this partner — click to show all" : void 0,
|
|
262
262
|
className: d(
|
|
263
263
|
"text-[13px] font-semibold hover:underline",
|
|
@@ -268,11 +268,11 @@ function gt({ api: n, className: b }) {
|
|
|
268
268
|
),
|
|
269
269
|
e.oldest_unmet && /* @__PURE__ */ r("span", { className: "text-[11px] text-slate-400 dark:text-muted-foreground", children: [
|
|
270
270
|
"oldest unmet ",
|
|
271
|
-
|
|
271
|
+
ce(e.oldest_unmet)
|
|
272
272
|
] })
|
|
273
273
|
] }),
|
|
274
274
|
/* @__PURE__ */ t("div", { className: "flex flex-wrap gap-2", children: e.tiles.map((o) => {
|
|
275
|
-
const i =
|
|
275
|
+
const i = ae(Pe(o.outcome)), [h, v] = i ? ne(i) : [null, null], x = a.api === e.api && a.outcome.includes(o.outcome);
|
|
276
276
|
return /* @__PURE__ */ r(
|
|
277
277
|
"button",
|
|
278
278
|
{
|
|
@@ -324,7 +324,7 @@ function gt({ api: n, className: b }) {
|
|
|
324
324
|
onChange: (e) => l((o) => ({ ...o, kind: e || null })),
|
|
325
325
|
options: [
|
|
326
326
|
{ value: "", label: "Every kind" },
|
|
327
|
-
...
|
|
327
|
+
...L.map((e) => ({ value: e.kind, label: e.label }))
|
|
328
328
|
]
|
|
329
329
|
}
|
|
330
330
|
)
|
|
@@ -337,7 +337,7 @@ function gt({ api: n, className: b }) {
|
|
|
337
337
|
ariaLabel: "Filter by collection",
|
|
338
338
|
value: a.collection ?? "",
|
|
339
339
|
onChange: (e) => l((o) => ({ ...o, collection: e || null })),
|
|
340
|
-
options: [{ value: "", label: "Every collection" }, ...
|
|
340
|
+
options: [{ value: "", label: "Every collection" }, ...ve]
|
|
341
341
|
}
|
|
342
342
|
)
|
|
343
343
|
] }),
|
|
@@ -360,7 +360,7 @@ function gt({ api: n, className: b }) {
|
|
|
360
360
|
] }),
|
|
361
361
|
/* @__PURE__ */ r("div", { "data-obligation-filter": "outcome", className: "flex flex-wrap items-center gap-1", children: [
|
|
362
362
|
/* @__PURE__ */ t("span", { className: "mr-0.5 text-[11px] text-slate-400 dark:text-muted-foreground", children: "Outcome" }),
|
|
363
|
-
|
|
363
|
+
Je.map((e) => {
|
|
364
364
|
const o = a.outcome.includes(e);
|
|
365
365
|
return /* @__PURE__ */ t(
|
|
366
366
|
"button",
|
|
@@ -438,13 +438,13 @@ function gt({ api: n, className: b }) {
|
|
|
438
438
|
}
|
|
439
439
|
)
|
|
440
440
|
] }),
|
|
441
|
-
|
|
441
|
+
xe ? /* @__PURE__ */ t(oe, { variant: "500", detail: "Could not load obligations for this filter." }) : ge ? /* @__PURE__ */ t("div", { className: "h-24 animate-pulse rounded-xl bg-[hsl(var(--nvr-skeleton))]" }) : C.length === 0 ? /* @__PURE__ */ t(
|
|
442
442
|
"div",
|
|
443
443
|
{
|
|
444
444
|
className: "rounded-xl border border-slate-200 bg-white dark:border-border dark:bg-card",
|
|
445
445
|
"data-obligations-empty": !0,
|
|
446
446
|
children: /* @__PURE__ */ t(
|
|
447
|
-
|
|
447
|
+
te,
|
|
448
448
|
{
|
|
449
449
|
title: "Nothing outstanding for this filter",
|
|
450
450
|
detail: "Every message the partner expects, for this outcome, has landed."
|
|
@@ -456,7 +456,7 @@ function gt({ api: n, className: b }) {
|
|
|
456
456
|
{
|
|
457
457
|
className: d(
|
|
458
458
|
"overflow-x-auto rounded-xl border border-slate-200 dark:border-border",
|
|
459
|
-
|
|
459
|
+
he && "opacity-60 transition-opacity"
|
|
460
460
|
),
|
|
461
461
|
children: [
|
|
462
462
|
/* @__PURE__ */ r("table", { className: "w-full text-[12px] tabular-nums", children: [
|
|
@@ -473,8 +473,8 @@ function gt({ api: n, className: b }) {
|
|
|
473
473
|
S && /* @__PURE__ */ t("th", { className: "px-3 py-1.5 font-medium" })
|
|
474
474
|
] }) }),
|
|
475
475
|
/* @__PURE__ */ t("tbody", { children: C.map((e) => {
|
|
476
|
-
const o =
|
|
477
|
-
return /* @__PURE__ */ r(
|
|
476
|
+
const o = ae(De(e)), [i, h] = o ? ne(o) : [null, null], v = S && (e.outcome === "failed" || e.outcome === "missing" || e.outcome === "overdue"), x = Re(e.collection), k = Xe(e), O = s === "inbound" && ue === e.id, G = Ze(e.detail);
|
|
477
|
+
return /* @__PURE__ */ r(Le, { children: [
|
|
478
478
|
/* @__PURE__ */ r(
|
|
479
479
|
"tr",
|
|
480
480
|
{
|
|
@@ -499,13 +499,13 @@ function gt({ api: n, className: b }) {
|
|
|
499
499
|
j.stopPropagation(), g.open({ collection: e.collection, itemId: e.item });
|
|
500
500
|
},
|
|
501
501
|
className: "rounded text-left underline decoration-slate-300 underline-offset-2 hover:decoration-slate-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:decoration-slate-600 dark:hover:decoration-slate-400",
|
|
502
|
-
children:
|
|
502
|
+
children: re(e)
|
|
503
503
|
}
|
|
504
|
-
) :
|
|
504
|
+
) : re(e)
|
|
505
505
|
}
|
|
506
506
|
),
|
|
507
|
-
/* @__PURE__ */ t("td", { className: "px-3 py-1.5 text-slate-600 dark:text-slate-300", children:
|
|
508
|
-
/* @__PURE__ */ t("td", { className: "px-3 py-1.5 text-slate-500 dark:text-muted-foreground", children:
|
|
507
|
+
/* @__PURE__ */ t("td", { className: "px-3 py-1.5 text-slate-600 dark:text-slate-300", children: fe.get(e.kind) ?? e.kind }),
|
|
508
|
+
/* @__PURE__ */ t("td", { className: "px-3 py-1.5 text-slate-500 dark:text-muted-foreground", children: We(e.due_at) }),
|
|
509
509
|
/* @__PURE__ */ t("td", { className: "px-3 py-1.5", "data-obligation-outcome": e.outcome, children: /* @__PURE__ */ r(
|
|
510
510
|
"span",
|
|
511
511
|
{
|
|
@@ -528,7 +528,7 @@ function gt({ api: n, className: b }) {
|
|
|
528
528
|
)
|
|
529
529
|
}
|
|
530
530
|
),
|
|
531
|
-
D[e.outcome] ?? e.outcome
|
|
531
|
+
e.not_needed ? "Not needed" : D[e.outcome] ?? e.outcome
|
|
532
532
|
]
|
|
533
533
|
}
|
|
534
534
|
) }),
|
|
@@ -537,8 +537,8 @@ function gt({ api: n, className: b }) {
|
|
|
537
537
|
{
|
|
538
538
|
className: "max-w-[38ch] truncate px-3 py-1.5 text-slate-500 dark:text-muted-foreground",
|
|
539
539
|
"data-obligation-reason": !0,
|
|
540
|
-
"data-tip": e.reason ?
|
|
541
|
-
children: e.reason ?
|
|
540
|
+
"data-tip": e.reason ? ee(e.reason) : void 0,
|
|
541
|
+
children: e.reason ? ee(e.reason) : "—"
|
|
542
542
|
}
|
|
543
543
|
),
|
|
544
544
|
/* @__PURE__ */ t(
|
|
@@ -546,7 +546,7 @@ function gt({ api: n, className: b }) {
|
|
|
546
546
|
{
|
|
547
547
|
className: "hidden px-3 py-1.5 text-slate-500 dark:text-muted-foreground lg:table-cell",
|
|
548
548
|
"data-obligations-col-attempts": !0,
|
|
549
|
-
children:
|
|
549
|
+
children: Ae(k, e.reason)
|
|
550
550
|
}
|
|
551
551
|
),
|
|
552
552
|
/* @__PURE__ */ t(
|
|
@@ -554,8 +554,8 @@ function gt({ api: n, className: b }) {
|
|
|
554
554
|
{
|
|
555
555
|
className: "hidden max-w-[28ch] truncate px-3 py-1.5 text-slate-500 dark:text-muted-foreground lg:table-cell",
|
|
556
556
|
"data-obligations-last-response": !0,
|
|
557
|
-
"data-tip":
|
|
558
|
-
children:
|
|
557
|
+
"data-tip": Me(k) ?? void 0,
|
|
558
|
+
children: He(e.outcome, k)
|
|
559
559
|
}
|
|
560
560
|
),
|
|
561
561
|
s === "waiting" && /* @__PURE__ */ t(
|
|
@@ -563,20 +563,20 @@ function gt({ api: n, className: b }) {
|
|
|
563
563
|
{
|
|
564
564
|
className: "px-3 py-1.5 text-slate-600 dark:text-slate-300",
|
|
565
565
|
"data-obligations-owner": !0,
|
|
566
|
-
children:
|
|
566
|
+
children: ye(e)
|
|
567
567
|
}
|
|
568
568
|
),
|
|
569
569
|
s === "inbound" && /* @__PURE__ */ t("td", { className: "px-3 py-1.5 text-right", children: /* @__PURE__ */ t(
|
|
570
|
-
|
|
570
|
+
Ge,
|
|
571
571
|
{
|
|
572
572
|
open: O,
|
|
573
573
|
onToggle: () => R((j) => j === e.id ? null : e.id)
|
|
574
574
|
}
|
|
575
575
|
) }),
|
|
576
576
|
S && /* @__PURE__ */ r("td", { className: "px-3 py-1.5 text-right", children: [
|
|
577
|
-
v && e.can_resend !== !1 && /* @__PURE__ */ t(
|
|
577
|
+
v && e.can_resend !== !1 && /* @__PURE__ */ t(ze, { obligationId: e.id }),
|
|
578
578
|
v && e.can_send_current === !0 && /* @__PURE__ */ t(
|
|
579
|
-
|
|
579
|
+
Ue,
|
|
580
580
|
{
|
|
581
581
|
obligationId: e.id,
|
|
582
582
|
api: e.api,
|
|
@@ -601,7 +601,7 @@ function gt({ api: n, className: b }) {
|
|
|
601
601
|
children: /* @__PURE__ */ t(
|
|
602
602
|
"td",
|
|
603
603
|
{
|
|
604
|
-
colSpan:
|
|
604
|
+
colSpan: Ne,
|
|
605
605
|
className: "bg-slate-50 px-3 py-2 dark:bg-muted",
|
|
606
606
|
"data-obligations-detail": !0,
|
|
607
607
|
children: G ? /* @__PURE__ */ t("pre", { className: "max-h-56 overflow-auto whitespace-pre-wrap break-words rounded-md border border-slate-200 bg-white p-2 font-mono text-[10.5px] leading-4 text-slate-700 dark:border-slate-700 dark:bg-slate-900/40 dark:text-slate-300", children: G }) : /* @__PURE__ */ t("p", { className: "text-[11px] italic text-slate-400 dark:text-muted-foreground", children: "No request detail was stored for this rejection — the reason column above is everything the ledger recorded." })
|
|
@@ -613,13 +613,13 @@ function gt({ api: n, className: b }) {
|
|
|
613
613
|
] }, e.id);
|
|
614
614
|
}) })
|
|
615
615
|
] }),
|
|
616
|
-
|
|
616
|
+
q > _ && /* @__PURE__ */ r("div", { className: "flex items-center justify-between border-t border-slate-200 px-3 py-1.5 text-[11px] text-slate-400 dark:border-border dark:text-muted-foreground", children: [
|
|
617
617
|
/* @__PURE__ */ r("span", { children: [
|
|
618
|
-
(u - 1) *
|
|
618
|
+
(u - 1) * _ + 1,
|
|
619
619
|
"–",
|
|
620
|
-
Math.min(u *
|
|
620
|
+
Math.min(u * _, q),
|
|
621
621
|
" of ",
|
|
622
|
-
|
|
622
|
+
q
|
|
623
623
|
] }),
|
|
624
624
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
625
625
|
/* @__PURE__ */ t(
|
|
@@ -627,7 +627,7 @@ function gt({ api: n, className: b }) {
|
|
|
627
627
|
{
|
|
628
628
|
type: "button",
|
|
629
629
|
disabled: u <= 1,
|
|
630
|
-
onClick: () =>
|
|
630
|
+
onClick: () => F((e) => Math.max(1, e - 1)),
|
|
631
631
|
className: "rounded border border-slate-200 px-2 py-0.5 disabled:opacity-40 dark:border-border",
|
|
632
632
|
children: "Prev"
|
|
633
633
|
}
|
|
@@ -636,8 +636,8 @@ function gt({ api: n, className: b }) {
|
|
|
636
636
|
"button",
|
|
637
637
|
{
|
|
638
638
|
type: "button",
|
|
639
|
-
disabled: u *
|
|
640
|
-
onClick: () =>
|
|
639
|
+
disabled: u * _ >= q,
|
|
640
|
+
onClick: () => F((e) => e + 1),
|
|
641
641
|
className: "rounded border border-slate-200 px-2 py-0.5 disabled:opacity-40 dark:border-border",
|
|
642
642
|
children: "Next"
|
|
643
643
|
}
|
|
@@ -647,11 +647,11 @@ function gt({ api: n, className: b }) {
|
|
|
647
647
|
]
|
|
648
648
|
}
|
|
649
649
|
),
|
|
650
|
-
/* @__PURE__ */ t(
|
|
650
|
+
/* @__PURE__ */ t(Be, {})
|
|
651
651
|
] });
|
|
652
652
|
}
|
|
653
653
|
export {
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
654
|
+
ht as IntegrationObligationsView,
|
|
655
|
+
re as obligationRecordText,
|
|
656
|
+
ae as roleForTone
|
|
657
657
|
};
|