@nivaro/react 0.3.139 → 0.3.141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/InlineGridField.js +95 -92
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +39 -2
- package/dist/shared/components/AudienceConfirmPanel.js +19 -19
- package/dist/shared/components/BroadcastView.js +213 -211
- package/dist/shared/components/CollectionBrowserView.js +2702 -2671
- package/dist/shared/components/ConfigHistory.js +45 -45
- package/dist/shared/components/ConformanceView.js +110 -110
- package/dist/shared/components/DataTable.js +51 -51
- package/dist/shared/components/FilePreviewLightbox.js +26 -25
- package/dist/shared/components/ItemEditForm.js +3475 -3458
- package/dist/shared/components/LiveCount.js +27 -23
- package/dist/shared/components/LiveTraceView.js +62 -61
- package/dist/shared/components/PageRenderer.js +422 -410
- package/dist/shared/components/ProfileView.js +199 -199
- package/dist/shared/components/QualityRulesView.js +70 -70
- package/dist/shared/components/QueryTable.js +131 -130
- package/dist/shared/components/RecordGraph.js +98 -98
- package/dist/shared/components/RecordReadView.js +287 -288
- package/dist/shared/components/ReportView.js +1279 -1259
- package/dist/shared/components/RowPresence.js +83 -76
- package/dist/shared/components/SlaRulesView.js +73 -74
- package/dist/shared/components/UnseenDot.js +183 -22
- package/dist/shared/components/WidgetSlot.js +73 -73
- package/dist/shared/components/ai/AiChart.js +36 -32
- package/dist/shared/components/ai/AiMarkdown.js +136 -129
- package/dist/shared/components/ai/TaskDo.js +87 -87
- package/dist/shared/components/ai/answer-formats.js +37 -30
- package/dist/shared/components/ai/call-log/format.js +17 -16
- package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
- package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
- package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
- package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
- package/dist/shared/components/bulk/bulk-field-options.js +10 -10
- package/dist/shared/components/cbv/column-totals.js +53 -51
- package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
- package/dist/shared/components/command-center/announce.js +7 -6
- package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
- package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
- package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
- package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
- package/dist/shared/components/delivery-analytics/drill.js +32 -32
- package/dist/shared/components/imports/RunDetailSheet.js +1 -1
- package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
- package/dist/shared/components/integrations/console/EventsView.js +35 -35
- package/dist/shared/components/integrations/console/FirefightView.js +15 -14
- package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
- package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
- package/dist/shared/components/integrations/console/SignalCard.js +67 -67
- package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
- package/dist/shared/components/item-edit/ChangesTray.js +88 -74
- package/dist/shared/components/item-edit/FilePickerField.js +123 -123
- package/dist/shared/components/item-edit/GroupSection.js +301 -292
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
- package/dist/shared/components/item-edit/InlineGridField.js +45 -36
- package/dist/shared/components/item-edit/InlineTableField.js +1390 -1376
- package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
- package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
- package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
- package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
- package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
- package/dist/shared/components/layout-editor/settings/controls.js +98 -90
- package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
- package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
- package/dist/shared/components/ops-report/format.js +37 -36
- package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
- package/dist/shared/components/panels/RevisionsPanel.js +306 -305
- package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
- package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
- package/dist/shared/components/pipeline/TeamsView.js +189 -130
- package/dist/shared/components/profile/AgentsPanel.js +6 -6
- package/dist/shared/components/profile/DelegationCard.js +13 -12
- package/dist/shared/components/profile/PersonActivity.js +48 -48
- package/dist/shared/components/profile/PersonExtras.js +107 -107
- package/dist/shared/components/profile/PersonWeek.js +9 -9
- package/dist/shared/components/queue/QueueBulkBar.js +19 -18
- package/dist/shared/components/queue/QueueBulkMove.js +21 -20
- package/dist/shared/components/queue/QueueItemSheet.js +136 -131
- package/dist/shared/components/queue/QueueWorklist.js +884 -872
- package/dist/shared/components/queue/worklist-helpers.js +36 -21
- package/dist/shared/components/support/RequestList.js +123 -123
- package/dist/shared/components/support/SupportAnalytics.js +29 -29
- package/dist/shared/lib/activity-sentence.js +251 -229
- package/dist/shared/lib/format-value.js +5 -4
- package/dist/shared/lib/layout-resolve.js +64 -48
- package/dist/shared/lib/number-format.js +87 -0
- package/dist/shared/lib/number-kind.js +133 -0
- package/dist/shared/lib/utils.js +24 -20
- package/dist/shared/lib/watch-list.js +1 -1
- package/dist/shared/lib/widget-value-format.js +26 -12
- package/package.json +1 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsxs as s, jsx as n, Fragment as
|
|
2
|
-
import { Loader2 as
|
|
3
|
-
import { useState as w, useMemo as
|
|
4
|
-
import { toast as
|
|
5
|
-
import { useItemNavigation as
|
|
6
|
-
import { toastError as
|
|
7
|
-
import { cn as h } from "../../../lib/utils.js";
|
|
8
|
-
import { QueryErrorState as
|
|
9
|
-
import { SimpleSelect as
|
|
10
|
-
import { useReadyBoard as
|
|
11
|
-
import { Segment as
|
|
12
|
-
import { agoText as
|
|
13
|
-
const
|
|
1
|
+
import { jsxs as s, jsx as n, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { Loader2 as M, Play as J, Clock as U, CheckCircle2 as Z, RefreshCw as ee } from "lucide-react";
|
|
3
|
+
import { useState as w, useMemo as O } from "react";
|
|
4
|
+
import { toast as C } from "sonner";
|
|
5
|
+
import { useItemNavigation as re } from "../../../context.js";
|
|
6
|
+
import { toastError as Q } from "../../../lib/error-toast.js";
|
|
7
|
+
import { formatNumber as v, cn as h } from "../../../lib/utils.js";
|
|
8
|
+
import { QueryErrorState as ne } from "../../QueryErrorState.js";
|
|
9
|
+
import { SimpleSelect as W } from "../../ui/SimpleSelect.js";
|
|
10
|
+
import { useReadyBoard as te, useRunReadyCheck as se, useCheckReadyRecord as oe } from "./api.js";
|
|
11
|
+
import { Segment as ae } from "./EventsView.js";
|
|
12
|
+
import { agoText as _, exactTime as ie, TONE_TEXT as N, TONE_SOFT as X, TONE_BORDER as le, TONE_FILL as Y } from "./tone.js";
|
|
13
|
+
const S = {
|
|
14
14
|
block: { tone: "negative", label: "Would be refused", short: "Refused" },
|
|
15
15
|
warn: { tone: "warning", label: "Would send incomplete", short: "Incomplete" },
|
|
16
16
|
ask: { tone: "info", label: "Asks for something when sent", short: "Asks on send" }
|
|
17
|
-
},
|
|
18
|
-
function
|
|
17
|
+
}, $ = 50, R = (e, o, l = `${o}s`) => `${e} ${e === 1 ? o : l}`;
|
|
18
|
+
function de(e, o, l) {
|
|
19
19
|
return e.filter(
|
|
20
20
|
(i) => (!o.partner || i.partners.includes(o.partner) || i.issues.some((d) => d.partner === o.partner)) && (!o.problem || i.issues.some((d) => l(d) === o.problem)) && (!o.severity || i.worst === o.severity)
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
function
|
|
25
|
-
var
|
|
26
|
-
const o =
|
|
27
|
-
() =>
|
|
23
|
+
const ce = (e) => `${e.severity}|${e.message.replace(/\bon \d+ lines?\b/, "on some lines").trim()}`;
|
|
24
|
+
function Re({ onOpenRecord: e }) {
|
|
25
|
+
var F, I, K;
|
|
26
|
+
const o = te(), l = se(), [i, d] = w(null), [c, b] = w(null), [u, y] = w(""), [a, x] = w($), t = o.data, p = O(() => (t == null ? void 0 : t.entries) ?? [], [t]), g = O(
|
|
27
|
+
() => de(p, { partner: i, problem: c, severity: u }, ce),
|
|
28
28
|
[p, i, c, u]
|
|
29
|
-
),
|
|
30
|
-
if (
|
|
29
|
+
), E = `${i}|${c}|${u}`, [q, z] = w(E);
|
|
30
|
+
if (q !== E && (z(E), x($)), o.isLoading)
|
|
31
31
|
return /* @__PURE__ */ s("div", { className: "space-y-3", "aria-busy": !0, "data-ic-ready-loading": !0, children: [
|
|
32
32
|
/* @__PURE__ */ n("div", { className: "h-5 w-80 animate-pulse rounded bg-[hsl(var(--nvr-skeleton))]" }),
|
|
33
33
|
/* @__PURE__ */ s("div", { className: "grid gap-5 lg:grid-cols-[260px_minmax(0,1fr)]", children: [
|
|
@@ -37,78 +37,78 @@ function Ce({ onOpenRecord: e }) {
|
|
|
37
37
|
] });
|
|
38
38
|
if (o.isError || !t)
|
|
39
39
|
return /* @__PURE__ */ n(
|
|
40
|
-
|
|
40
|
+
ne,
|
|
41
41
|
{
|
|
42
42
|
error: o.error,
|
|
43
43
|
what: "the ready-to-send board",
|
|
44
44
|
onRetry: () => o.refetch()
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
const
|
|
48
|
-
onSuccess: () =>
|
|
49
|
-
onError: (r) =>
|
|
50
|
-
}),
|
|
47
|
+
const H = () => l.mutate(void 0, {
|
|
48
|
+
onSuccess: () => C.success("Checking every record that sends next. The board fills in when it is done."),
|
|
49
|
+
onError: (r) => Q(r, "Could not start the check")
|
|
50
|
+
}), A = t.can_run ? /* @__PURE__ */ s(
|
|
51
51
|
"button",
|
|
52
52
|
{
|
|
53
53
|
type: "button",
|
|
54
54
|
"data-ic-ready-run": !0,
|
|
55
55
|
disabled: l.isPending || t.running,
|
|
56
|
-
onClick:
|
|
56
|
+
onClick: H,
|
|
57
57
|
className: "inline-flex h-8 shrink-0 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",
|
|
58
58
|
children: [
|
|
59
|
-
l.isPending || t.running ? /* @__PURE__ */ n(
|
|
59
|
+
l.isPending || t.running ? /* @__PURE__ */ n(M, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ n(J, { className: "h-3.5 w-3.5" }),
|
|
60
60
|
t.running ? "Checking…" : "Run now"
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
63
|
) : null;
|
|
64
64
|
if (!t.run)
|
|
65
65
|
return /* @__PURE__ */ s("div", { className: "space-y-4", "data-ic-ready-empty": !0, children: [
|
|
66
|
-
/* @__PURE__ */ s(
|
|
66
|
+
/* @__PURE__ */ s(D, { runButton: A, children: [
|
|
67
67
|
/* @__PURE__ */ n("span", { className: "font-medium text-foreground", children: t.running ? "The first check is running" : "Not checked yet" }),
|
|
68
|
-
t.running && ((
|
|
68
|
+
t.running && ((F = t.progress) != null && F.total) ? ` · ${v(t.progress.checked)} of ${v(t.progress.total)} records so far` : ""
|
|
69
69
|
] }),
|
|
70
70
|
/* @__PURE__ */ n("div", { className: "rounded-lg border border-border bg-card px-5 py-6", children: /* @__PURE__ */ n("p", { className: "max-w-[68ch] text-[12.5px] leading-relaxed text-muted-foreground", children: "Every night, each open record whose next step sends to a partner is checked the way its Push readiness check does: missing values, conditions, and what the partner needs. What would be refused shows up here, so it can be fixed before someone presses the button." }) })
|
|
71
71
|
] });
|
|
72
|
-
const f = t.totals ?? { records: 0, refused: 0, warnings: 0, asks: 0 },
|
|
72
|
+
const f = t.totals ?? { records: 0, refused: 0, warnings: 0, asks: 0 }, j = t.run.generated_at, m = t.coverage, L = !!(i || c || u), B = m ? Math.max(0, m.checked - m.ready - m.errors - f.records) : 0;
|
|
73
73
|
return /* @__PURE__ */ s("div", { className: "space-y-4", "data-ic-ready": !0, children: [
|
|
74
|
-
/* @__PURE__ */ s(
|
|
75
|
-
f.records === 0 ? /* @__PURE__ */ n("span", { className: "font-medium text-foreground", children: "Nothing in the way of the next sends" }) : /* @__PURE__ */ s(
|
|
76
|
-
/* @__PURE__ */ n(
|
|
74
|
+
/* @__PURE__ */ s(D, { runButton: A, children: [
|
|
75
|
+
f.records === 0 ? /* @__PURE__ */ n("span", { className: "font-medium text-foreground", children: "Nothing in the way of the next sends" }) : /* @__PURE__ */ s(k, { children: [
|
|
76
|
+
/* @__PURE__ */ n(T, { n: f.refused, tone: "negative" }),
|
|
77
77
|
" would be refused",
|
|
78
78
|
" · ",
|
|
79
|
-
/* @__PURE__ */ n(
|
|
79
|
+
/* @__PURE__ */ n(T, { n: f.warnings, tone: "warning" }),
|
|
80
80
|
" would send incomplete",
|
|
81
81
|
" · ",
|
|
82
|
-
/* @__PURE__ */ n(
|
|
82
|
+
/* @__PURE__ */ n(T, { n: f.asks, tone: "info" }),
|
|
83
83
|
" ask for something when sent"
|
|
84
84
|
] }),
|
|
85
85
|
" · ",
|
|
86
|
-
/* @__PURE__ */ s("span", { "data-tip":
|
|
86
|
+
/* @__PURE__ */ s("span", { "data-tip": ie(j), children: [
|
|
87
87
|
"checked ",
|
|
88
|
-
|
|
88
|
+
_(j)
|
|
89
89
|
] }),
|
|
90
|
-
m && /* @__PURE__ */ s(
|
|
90
|
+
m && /* @__PURE__ */ s(k, { children: [
|
|
91
91
|
" · ",
|
|
92
92
|
/* @__PURE__ */ s("span", { "data-ic-ready-coverage": !0, children: [
|
|
93
|
-
|
|
93
|
+
R(m.checked, "record"),
|
|
94
94
|
" with a send next",
|
|
95
95
|
m.ready > 0 ? `, ${m.ready} ready` : "",
|
|
96
96
|
m.errors > 0 ? `, ${m.errors} could not be checked` : "",
|
|
97
|
-
|
|
97
|
+
B > 0 ? `, ${B} not shown to you` : ""
|
|
98
98
|
] })
|
|
99
99
|
] })
|
|
100
100
|
] }),
|
|
101
101
|
t.running && /* @__PURE__ */ s(
|
|
102
|
-
|
|
102
|
+
G,
|
|
103
103
|
{
|
|
104
104
|
tone: "info",
|
|
105
|
-
icon: /* @__PURE__ */ n(
|
|
105
|
+
icon: /* @__PURE__ */ n(M, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 animate-spin" }),
|
|
106
106
|
"data-ic-ready-running": !0,
|
|
107
107
|
children: [
|
|
108
108
|
"A new check is running",
|
|
109
|
-
(
|
|
109
|
+
(I = t.progress) != null && I.total ? ` (${v(t.progress.checked)} of ${v(t.progress.total)} records so far)` : "",
|
|
110
110
|
". This board is from the last complete check and updates when it finishes.",
|
|
111
|
-
(
|
|
111
|
+
(K = t.progress) != null && K.total ? /* @__PURE__ */ n(
|
|
112
112
|
"span",
|
|
113
113
|
{
|
|
114
114
|
className: "mt-2 block h-1 w-full max-w-[320px] overflow-hidden rounded-full bg-black/10 dark:bg-white/15",
|
|
@@ -132,14 +132,14 @@ function Ce({ onOpenRecord: e }) {
|
|
|
132
132
|
}
|
|
133
133
|
),
|
|
134
134
|
!t.running && t.stopped_short && /* @__PURE__ */ s(
|
|
135
|
-
|
|
135
|
+
G,
|
|
136
136
|
{
|
|
137
137
|
tone: "warning",
|
|
138
|
-
icon: /* @__PURE__ */ n(
|
|
138
|
+
icon: /* @__PURE__ */ n(U, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }),
|
|
139
139
|
"data-ic-ready-stopped": !0,
|
|
140
140
|
children: [
|
|
141
141
|
"The latest check stopped before it finished",
|
|
142
|
-
t.stopped ? ` (at ${t.stopped.checked}${t.stopped.total != null ? ` of ${t.stopped.total}` : ""} records${t.stopped.at ? `, started ${
|
|
142
|
+
t.stopped ? ` (at ${t.stopped.checked}${t.stopped.total != null ? ` of ${t.stopped.total}` : ""} records${t.stopped.at ? `, started ${_(t.stopped.at)}` : ""})` : "",
|
|
143
143
|
", so this board is from the last complete check. The next check starts from the beginning."
|
|
144
144
|
]
|
|
145
145
|
}
|
|
@@ -151,7 +151,7 @@ function Ce({ onOpenRecord: e }) {
|
|
|
151
151
|
className: "flex flex-col items-start gap-1 rounded-lg border border-border bg-card px-5 py-6",
|
|
152
152
|
children: [
|
|
153
153
|
/* @__PURE__ */ s("p", { className: "flex items-center gap-2 text-[14px] font-semibold text-foreground", children: [
|
|
154
|
-
/* @__PURE__ */ n(
|
|
154
|
+
/* @__PURE__ */ n(Z, { className: h("h-4 w-4", N.positive) }),
|
|
155
155
|
"Every record you can see is ready to send"
|
|
156
156
|
] }),
|
|
157
157
|
/* @__PURE__ */ n("p", { className: "text-[12.5px] text-muted-foreground", children: "Records whose next step sends to a partner show up here when something would stop or weaken that send." })
|
|
@@ -159,9 +159,9 @@ function Ce({ onOpenRecord: e }) {
|
|
|
159
159
|
}
|
|
160
160
|
) : /* @__PURE__ */ s("div", { className: "grid items-start gap-5 lg:grid-cols-[260px_minmax(0,1fr)]", children: [
|
|
161
161
|
/* @__PURE__ */ s("aside", { className: "hidden space-y-5 lg:block", "aria-label": "Group the board", children: [
|
|
162
|
-
/* @__PURE__ */ s(
|
|
162
|
+
/* @__PURE__ */ s(V, { title: "Partner", children: [
|
|
163
163
|
/* @__PURE__ */ n(
|
|
164
|
-
|
|
164
|
+
P,
|
|
165
165
|
{
|
|
166
166
|
on: !i,
|
|
167
167
|
onClick: () => d(null),
|
|
@@ -170,7 +170,7 @@ function Ce({ onOpenRecord: e }) {
|
|
|
170
170
|
}
|
|
171
171
|
),
|
|
172
172
|
(t.partners ?? []).map((r) => /* @__PURE__ */ n(
|
|
173
|
-
|
|
173
|
+
P,
|
|
174
174
|
{
|
|
175
175
|
"data-ic-ready-partner": r.partner,
|
|
176
176
|
on: i === r.partner,
|
|
@@ -187,18 +187,18 @@ function Ce({ onOpenRecord: e }) {
|
|
|
187
187
|
r.partner
|
|
188
188
|
))
|
|
189
189
|
] }),
|
|
190
|
-
/* @__PURE__ */ n(
|
|
191
|
-
|
|
190
|
+
/* @__PURE__ */ n(V, { title: "Problem", children: (t.problems ?? []).map((r) => /* @__PURE__ */ n(
|
|
191
|
+
P,
|
|
192
192
|
{
|
|
193
193
|
"data-ic-ready-problem": r.key,
|
|
194
194
|
on: c === r.key,
|
|
195
195
|
onClick: () => b(c === r.key ? null : r.key),
|
|
196
196
|
label: r.label,
|
|
197
197
|
count: r.records,
|
|
198
|
-
tone:
|
|
198
|
+
tone: S[r.severity].tone,
|
|
199
199
|
hint: [
|
|
200
|
-
|
|
201
|
-
r.lines > 0 ?
|
|
200
|
+
S[r.severity].short,
|
|
201
|
+
r.lines > 0 ? R(r.lines, "line") : "",
|
|
202
202
|
r.partners.length && !i ? r.partners.join(", ") : ""
|
|
203
203
|
].filter(Boolean).join(" · "),
|
|
204
204
|
wrap: !0
|
|
@@ -209,7 +209,7 @@ function Ce({ onOpenRecord: e }) {
|
|
|
209
209
|
/* @__PURE__ */ s("section", { className: "min-w-0 space-y-3", "aria-label": "Records", children: [
|
|
210
210
|
/* @__PURE__ */ s("div", { className: "grid grid-cols-2 gap-2 lg:hidden", "data-ic-ready-phone-groups": !0, children: [
|
|
211
211
|
/* @__PURE__ */ n(
|
|
212
|
-
|
|
212
|
+
W,
|
|
213
213
|
{
|
|
214
214
|
ariaLabel: "Partner",
|
|
215
215
|
value: i ?? "",
|
|
@@ -225,7 +225,7 @@ function Ce({ onOpenRecord: e }) {
|
|
|
225
225
|
}
|
|
226
226
|
),
|
|
227
227
|
/* @__PURE__ */ n(
|
|
228
|
-
|
|
228
|
+
W,
|
|
229
229
|
{
|
|
230
230
|
ariaLabel: "Problem",
|
|
231
231
|
value: c ?? "",
|
|
@@ -244,7 +244,7 @@ function Ce({ onOpenRecord: e }) {
|
|
|
244
244
|
] }),
|
|
245
245
|
/* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
246
246
|
/* @__PURE__ */ n(
|
|
247
|
-
|
|
247
|
+
ae,
|
|
248
248
|
{
|
|
249
249
|
label: "Show",
|
|
250
250
|
value: u,
|
|
@@ -259,10 +259,10 @@ function Ce({ onOpenRecord: e }) {
|
|
|
259
259
|
}
|
|
260
260
|
),
|
|
261
261
|
/* @__PURE__ */ s("span", { className: "text-[12px] text-muted-foreground tabular-nums", children: [
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
R(g.length, "send"),
|
|
263
|
+
L && ` of ${p.length}`
|
|
264
264
|
] }),
|
|
265
|
-
|
|
265
|
+
L && /* @__PURE__ */ n(
|
|
266
266
|
"button",
|
|
267
267
|
{
|
|
268
268
|
type: "button",
|
|
@@ -275,10 +275,10 @@ function Ce({ onOpenRecord: e }) {
|
|
|
275
275
|
)
|
|
276
276
|
] }),
|
|
277
277
|
g.length === 0 ? /* @__PURE__ */ n("p", { className: "rounded-lg border border-border bg-card px-4 py-5 text-[12.5px] text-muted-foreground", children: "Nothing matches these filters." }) : /* @__PURE__ */ n("ul", { className: "divide-y divide-border overflow-hidden rounded-lg border border-border bg-card", children: g.slice(0, a).map((r) => /* @__PURE__ */ n(
|
|
278
|
-
|
|
278
|
+
he,
|
|
279
279
|
{
|
|
280
280
|
entry: r,
|
|
281
|
-
collectionLabel:
|
|
281
|
+
collectionLabel: me(t.collections, r.collection),
|
|
282
282
|
onOpenRecord: e
|
|
283
283
|
},
|
|
284
284
|
`${r.collection}:${r.item}:${r.transition.id}`
|
|
@@ -288,11 +288,11 @@ function Ce({ onOpenRecord: e }) {
|
|
|
288
288
|
{
|
|
289
289
|
type: "button",
|
|
290
290
|
"data-ic-ready-more": !0,
|
|
291
|
-
onClick: () => x((r) => r +
|
|
291
|
+
onClick: () => x((r) => r + $),
|
|
292
292
|
className: "inline-flex h-8 items-center rounded-md border border-border bg-card px-3 text-[12.5px] font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
293
293
|
children: [
|
|
294
294
|
"Show ",
|
|
295
|
-
Math.min(
|
|
295
|
+
Math.min($, g.length - a),
|
|
296
296
|
" more of ",
|
|
297
297
|
g.length - a,
|
|
298
298
|
" left"
|
|
@@ -303,15 +303,15 @@ function Ce({ onOpenRecord: e }) {
|
|
|
303
303
|
] })
|
|
304
304
|
] });
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function ue(e) {
|
|
307
307
|
return e.replace(/^[\s·•|,–—-]+|[\s·•|,–—-]+$/g, "").trim();
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function me(e, o) {
|
|
310
310
|
var i;
|
|
311
311
|
const l = (i = e == null ? void 0 : e[o]) == null ? void 0 : i.trim();
|
|
312
312
|
return l && l !== o ? l : null;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function D({ runButton: e, children: o }) {
|
|
315
315
|
return /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-2", children: [
|
|
316
316
|
/* @__PURE__ */ n(
|
|
317
317
|
"p",
|
|
@@ -324,10 +324,10 @@ function W({ runButton: e, children: o }) {
|
|
|
324
324
|
e && /* @__PURE__ */ n("div", { className: "sm:ml-auto", children: e })
|
|
325
325
|
] });
|
|
326
326
|
}
|
|
327
|
-
function
|
|
328
|
-
return /* @__PURE__ */ n("span", { className: h("font-semibold tabular-nums", e > 0 ?
|
|
327
|
+
function T({ n: e, tone: o }) {
|
|
328
|
+
return /* @__PURE__ */ n("span", { className: h("font-semibold tabular-nums", e > 0 ? N[o] : "text-foreground"), children: e });
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function G({
|
|
331
331
|
tone: e,
|
|
332
332
|
icon: o,
|
|
333
333
|
children: l,
|
|
@@ -340,9 +340,9 @@ function D({
|
|
|
340
340
|
...i,
|
|
341
341
|
className: h(
|
|
342
342
|
"flex items-start gap-2 rounded-lg border px-4 py-2.5 text-[12.5px]",
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
343
|
+
le[e],
|
|
344
|
+
X[e],
|
|
345
|
+
N[e]
|
|
346
346
|
),
|
|
347
347
|
children: [
|
|
348
348
|
o,
|
|
@@ -351,13 +351,13 @@ function D({
|
|
|
351
351
|
}
|
|
352
352
|
);
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function V({ title: e, children: o }) {
|
|
355
355
|
return /* @__PURE__ */ s("div", { children: [
|
|
356
356
|
/* @__PURE__ */ n("h3", { className: "mb-1.5 px-2 text-[12px] font-semibold text-foreground", children: e }),
|
|
357
357
|
/* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: o })
|
|
358
358
|
] });
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function P({
|
|
361
361
|
on: e,
|
|
362
362
|
onClick: o,
|
|
363
363
|
label: l,
|
|
@@ -379,7 +379,7 @@ function T({
|
|
|
379
379
|
e ? "bg-accent text-foreground" : "text-foreground hover:bg-muted"
|
|
380
380
|
),
|
|
381
381
|
children: [
|
|
382
|
-
d && /* @__PURE__ */ n("span", { className: h("mt-[7px] h-1.5 w-1.5 shrink-0 rounded-full",
|
|
382
|
+
d && /* @__PURE__ */ n("span", { className: h("mt-[7px] h-1.5 w-1.5 shrink-0 rounded-full", Y[d]) }),
|
|
383
383
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
384
384
|
/* @__PURE__ */ n(
|
|
385
385
|
"span",
|
|
@@ -394,30 +394,30 @@ function T({
|
|
|
394
394
|
),
|
|
395
395
|
c && /* @__PURE__ */ n("span", { className: "block text-[11.5px] leading-snug text-muted-foreground", children: c })
|
|
396
396
|
] }),
|
|
397
|
-
/* @__PURE__ */ n("span", { className: "shrink-0 pt-px text-[12px] font-medium tabular-nums text-muted-foreground", children: i })
|
|
397
|
+
/* @__PURE__ */ n("span", { className: "shrink-0 pt-px text-[12px] font-medium tabular-nums text-muted-foreground", children: v(i) })
|
|
398
398
|
]
|
|
399
399
|
}
|
|
400
400
|
);
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function he({
|
|
403
403
|
entry: e,
|
|
404
404
|
collectionLabel: o,
|
|
405
405
|
onOpenRecord: l
|
|
406
406
|
}) {
|
|
407
|
-
const i =
|
|
407
|
+
const i = re(), d = oe(), c = { collection: e.collection, itemId: e.item }, b = (a) => {
|
|
408
408
|
a.metaKey || a.ctrlKey || a.shiftKey || a.button !== 0 || (a.preventDefault(), l ? l(e.collection, e.item) : i.open(c));
|
|
409
|
-
}, u =
|
|
409
|
+
}, u = S[e.worst], y = () => d.mutate(
|
|
410
410
|
{ collection: e.collection, item: e.item },
|
|
411
411
|
{
|
|
412
412
|
onSuccess: (a) => {
|
|
413
|
-
a.sending ? a.ready ?
|
|
414
|
-
`${e.label} still has ${
|
|
413
|
+
a.sending ? a.ready ? C.success(`${e.label} is ready to send`) : C.message(
|
|
414
|
+
`${e.label} still has ${R(
|
|
415
415
|
a.entries.reduce((x, t) => x + t.issues.length, 0),
|
|
416
416
|
"problem"
|
|
417
417
|
)}`
|
|
418
|
-
) :
|
|
418
|
+
) : C.success(`${e.label} no longer has a send next`);
|
|
419
419
|
},
|
|
420
|
-
onError: (a) =>
|
|
420
|
+
onError: (a) => Q(a, "Could not check this record", { retry: y })
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
423
|
return /* @__PURE__ */ s("li", { className: "px-4 py-3", "data-ic-ready-row": `${e.collection}:${e.item}`, "data-worst": e.worst, children: [
|
|
@@ -439,8 +439,8 @@ function me({
|
|
|
439
439
|
{
|
|
440
440
|
className: h(
|
|
441
441
|
"rounded px-1.5 py-px text-[11px] font-semibold",
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
X[u.tone],
|
|
443
|
+
N[u.tone]
|
|
444
444
|
),
|
|
445
445
|
children: u.short
|
|
446
446
|
}
|
|
@@ -449,7 +449,7 @@ function me({
|
|
|
449
449
|
/* @__PURE__ */ s("p", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
|
|
450
450
|
e.state ? `${e.state} → ` : "",
|
|
451
451
|
/* @__PURE__ */ n("span", { className: "text-foreground", children: e.transition.label }),
|
|
452
|
-
e.partners.length > 0 && /* @__PURE__ */ s(
|
|
452
|
+
e.partners.length > 0 && /* @__PURE__ */ s(k, { children: [
|
|
453
453
|
" · sends to ",
|
|
454
454
|
e.partners.join(", ")
|
|
455
455
|
] })
|
|
@@ -464,24 +464,24 @@ function me({
|
|
|
464
464
|
onClick: y,
|
|
465
465
|
className: "inline-flex h-7 shrink-0 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-[12px] font-medium text-foreground transition-colors hover:bg-muted disabled:opacity-70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
466
466
|
children: [
|
|
467
|
-
/* @__PURE__ */ n(
|
|
467
|
+
/* @__PURE__ */ n(ee, { className: h("h-3 w-3", d.isPending && "animate-spin") }),
|
|
468
468
|
d.isPending ? "Checking…" : "Check again"
|
|
469
469
|
]
|
|
470
470
|
}
|
|
471
471
|
)
|
|
472
472
|
] }),
|
|
473
473
|
/* @__PURE__ */ n("ul", { className: "mt-2 space-y-1", children: e.issues.map((a) => {
|
|
474
|
-
const x =
|
|
474
|
+
const x = S[a.severity].tone, t = a.rows ?? [];
|
|
475
475
|
return /* @__PURE__ */ s(
|
|
476
476
|
"li",
|
|
477
477
|
{
|
|
478
478
|
className: "flex items-start gap-2 text-[12.5px] leading-snug",
|
|
479
479
|
children: [
|
|
480
|
-
/* @__PURE__ */ n("span", { className: h("mt-[6px] h-1.5 w-1.5 shrink-0 rounded-full",
|
|
480
|
+
/* @__PURE__ */ n("span", { className: h("mt-[6px] h-1.5 w-1.5 shrink-0 rounded-full", Y[x]) }),
|
|
481
481
|
/* @__PURE__ */ s("span", { className: "min-w-0", children: [
|
|
482
|
-
/* @__PURE__ */ n("span", { className: a.severity === "ask" ? "text-foreground" :
|
|
482
|
+
/* @__PURE__ */ n("span", { className: a.severity === "ask" ? "text-foreground" : N[x], children: a.message }),
|
|
483
483
|
(() => {
|
|
484
|
-
const p = t.map((g) =>
|
|
484
|
+
const p = t.map((g) => ue(g.label)).filter(Boolean);
|
|
485
485
|
return p.length === 0 ? null : /* @__PURE__ */ s("span", { className: "text-muted-foreground", children: [
|
|
486
486
|
" — ",
|
|
487
487
|
p.slice(0, 3).join(", "),
|
|
@@ -495,25 +495,25 @@ function me({
|
|
|
495
495
|
);
|
|
496
496
|
}) }),
|
|
497
497
|
/* @__PURE__ */ s("p", { className: "mt-2 text-[11.5px] text-muted-foreground", children: [
|
|
498
|
-
e.owners.length > 0 ? /* @__PURE__ */ s(
|
|
498
|
+
e.owners.length > 0 ? /* @__PURE__ */ s(k, { children: [
|
|
499
499
|
"Step owner",
|
|
500
500
|
e.owners.length === 1 ? "" : "s",
|
|
501
501
|
": ",
|
|
502
502
|
e.owners.map((a) => a.name).join(", ")
|
|
503
503
|
] }) : "Nobody owns this step",
|
|
504
|
-
e.checked_by && /* @__PURE__ */ s(
|
|
504
|
+
e.checked_by && /* @__PURE__ */ s(k, { children: [
|
|
505
505
|
" · ",
|
|
506
506
|
"checked again by ",
|
|
507
507
|
e.checked_by,
|
|
508
508
|
" ",
|
|
509
|
-
|
|
509
|
+
_(e.checked_at)
|
|
510
510
|
] })
|
|
511
511
|
] })
|
|
512
512
|
] });
|
|
513
513
|
}
|
|
514
514
|
export {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
515
|
+
Re as ReadyToSendView,
|
|
516
|
+
de as filterReadyEntries,
|
|
517
|
+
ce as readyProblemKey,
|
|
518
|
+
ue as tidyRowLabel
|
|
519
519
|
};
|