@nivaro/react 0.3.117 → 0.3.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +136 -14
- package/dist/index.js +488 -485
- package/dist/shared/components/ActivityEntry.js +130 -125
- package/dist/shared/components/AgentPresenceChip.js +36 -26
- package/dist/shared/components/CellCopyLayer.js +50 -45
- package/dist/shared/components/CollectionBrowserView.js +3757 -3695
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4220 -4175
- package/dist/shared/components/JobsTray.js +8 -8
- package/dist/shared/components/LiveNewMatchesPill.js +21 -14
- package/dist/shared/components/LiveOffNote.js +3 -2
- package/dist/shared/components/LiveRowMark.js +53 -23
- package/dist/shared/components/LiveTraceView.js +162 -123
- package/dist/shared/components/MyWorkView.js +320 -299
- package/dist/shared/components/NotificationBell.js +14 -14
- package/dist/shared/components/OverflowRail.js +1 -1
- package/dist/shared/components/PageRenderer.js +120 -116
- package/dist/shared/components/ProfileView.js +203 -202
- package/dist/shared/components/RealtimeStatusBanner.js +31 -29
- package/dist/shared/components/RecordDrilldownSheet.js +7 -7
- package/dist/shared/components/RecordHoverCard.js +102 -84
- package/dist/shared/components/RecordReadView.js +146 -146
- package/dist/shared/components/ScreenRefreshButton.js +34 -32
- package/dist/shared/components/TipLayer.js +65 -58
- package/dist/shared/components/WidgetImageMenu.js +83 -43
- package/dist/shared/components/activity/RecordActivityStream.js +175 -173
- package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
- package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
- package/dist/shared/components/collections-directory/page-model.js +72 -67
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
- package/dist/shared/components/integrations/SendStatus.js +65 -59
- package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
- package/dist/shared/components/integrations/console/SignalCard.js +237 -230
- package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +131 -92
- package/dist/shared/components/item-edit/CloneDialog.js +191 -161
- package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
- package/dist/shared/components/item-edit/FieldComments.js +54 -53
- package/dist/shared/components/item-edit/FieldPointer.js +82 -67
- package/dist/shared/components/item-edit/FieldRow.js +106 -100
- package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
- package/dist/shared/components/item-edit/FilePickerField.js +452 -387
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
- package/dist/shared/components/item-edit/HeaderTools.js +94 -85
- package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
- package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
- package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
- package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
- package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
- package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
- package/dist/shared/components/item-edit/RecalcValue.js +57 -32
- package/dist/shared/components/item-edit/RecordHelpChip.js +21 -22
- package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
- package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
- package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
- package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
- package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
- package/dist/shared/components/item-edit/SectionPresence.js +18 -10
- package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
- package/dist/shared/components/item-edit/UserChip.js +1 -1
- package/dist/shared/components/item-edit/file-live.js +69 -54
- package/dist/shared/components/item-edit/layout-switch.js +98 -89
- package/dist/shared/components/item-edit/partner-needs.js +12 -12
- package/dist/shared/components/item-edit/removed-line.js +31 -25
- package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
- package/dist/shared/components/list/ListViewers.js +46 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
- package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
- package/dist/shared/components/panels/AlertBanners.js +82 -72
- package/dist/shared/components/panels/BranchLanes.js +22 -22
- package/dist/shared/components/panels/CommentImages.js +123 -102
- package/dist/shared/components/panels/CommentPanel.js +186 -185
- package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
- package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
- package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
- package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
- package/dist/shared/components/profile/AgentNameField.js +107 -81
- package/dist/shared/components/profile/AgentsPanel.js +184 -184
- package/dist/shared/components/profile/PersonAccess.js +599 -495
- package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
- package/dist/shared/components/profile/SignedInDevices.js +17 -17
- package/dist/shared/components/profile/primitives.js +1 -1
- package/dist/shared/components/queue/OwnerAvatars.js +91 -54
- package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
- package/dist/shared/components/queue/QueueWorklist.js +1002 -983
- package/dist/shared/components/support/AssignRules.js +1733 -0
- package/dist/shared/components/support/PersonPick.js +88 -0
- package/dist/shared/components/support/RequestList.js +790 -0
- package/dist/shared/components/support/ScreenShare.js +158 -152
- package/dist/shared/components/support/SupportRequestDialog.js +50 -48
- package/dist/shared/components/support/SupportView.js +140 -246
- package/dist/shared/components/support/TicketDetailSheet.js +82 -75
- package/dist/shared/components/support/TicketSlowScreens.js +9 -9
- package/dist/shared/components/support/assign-rules-text.js +171 -0
- package/dist/shared/components/support/support-list.js +125 -0
- package/dist/shared/components/ui/SimpleSelect.js +28 -20
- package/dist/shared/components/ui/checkbox.js +6 -6
- package/dist/shared/components/ui/select.js +43 -39
- package/dist/shared/components/ui/sheet.js +9 -9
- package/dist/shared/components/ui/switch.js +12 -11
- package/dist/shared/components/watch-list/WatchDock.js +532 -459
- package/dist/shared/components/watch-list/WatchExtras.js +332 -286
- package/dist/shared/components/watch-list/WatchRows.js +164 -140
- package/dist/shared/lib/activity-sentence.js +103 -91
- package/dist/shared/lib/agent-presence.js +27 -21
- package/dist/shared/lib/approval-progress.js +2 -2
- package/dist/shared/lib/copy-rules.js +31 -24
- package/dist/shared/lib/derived-causes.js +113 -78
- package/dist/shared/lib/grid-cursors.js +26 -26
- package/dist/shared/lib/label-flash.js +27 -0
- package/dist/shared/lib/list-return.js +137 -125
- package/dist/shared/lib/live-deltas.js +40 -34
- package/dist/shared/lib/live-groups.js +56 -52
- package/dist/shared/lib/live-preference.js +64 -59
- package/dist/shared/lib/live-screen.js +223 -192
- package/dist/shared/lib/partner-failure.js +11 -11
- package/dist/shared/lib/rollup-recalc.js +68 -64
- package/dist/shared/lib/screen-refresh.js +74 -68
- package/dist/shared/lib/screen-share.js +108 -104
- package/dist/shared/lib/send-status.js +77 -61
- package/dist/shared/lib/text-diff-window.js +29 -0
- package/dist/shared/lib/watch-list.js +210 -209
- package/dist/shared/lib/widget-image-render.js +72 -49
- package/package.json +1 -1
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { jsxs as a, jsx as
|
|
2
|
-
import { AlertOctagon as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useItemEditAuth as
|
|
1
|
+
import { jsxs as a, jsx as r, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import { BellOff as F, AlertOctagon as W, AlertTriangle as q, ChevronRight as E, Loader2 as M, ChevronDown as G, ExternalLink as V } from "lucide-react";
|
|
3
|
+
import { useState as A, useMemo as X, useId as H, useRef as J } from "react";
|
|
4
|
+
import { useItemEditAuth as Q } from "../../../context.js";
|
|
5
5
|
import { userErrorMessage as I } from "../../../lib/safe-error.js";
|
|
6
|
-
import { cn as x, titleCase as
|
|
7
|
-
import { ExplainButton as
|
|
8
|
-
import { useDrillWindows as
|
|
9
|
-
import { useSignalAction as
|
|
10
|
-
import { canDrill as
|
|
11
|
-
import { SnoozeMenu as
|
|
12
|
-
import { plainDetail as
|
|
13
|
-
const
|
|
14
|
-
function
|
|
15
|
-
let
|
|
16
|
-
for (const m of
|
|
17
|
-
return
|
|
6
|
+
import { cn as x, titleCase as Y } from "../../../lib/utils.js";
|
|
7
|
+
import { ExplainButton as Z } from "../../ai/ExplainButton.js";
|
|
8
|
+
import { useDrillWindows as ee, DrillTag as te } from "../../chaos/DrillTag.js";
|
|
9
|
+
import { useSignalAction as ne, useDismissRows as oe, useSnooze as re } from "./api.js";
|
|
10
|
+
import { canDrill as ie, RowDrill as se } from "./drill/index.js";
|
|
11
|
+
import { SnoozeMenu as R, DismissButton as ae } from "./SnoozeMenu.js";
|
|
12
|
+
import { plainDetail as B, TONE_FILL as le, TONE_TEXT as L, agoText as de, exactTime as U, TONE_SOFT as ce, ageOf as ue } from "./tone.js";
|
|
13
|
+
const me = ["retry_submission", "extension"], pe = (e) => e.kind === "extension" ? j(e) : e.kind, j = (e) => `${e.kind}:${e.id ?? ""}`;
|
|
14
|
+
function he(e) {
|
|
15
|
+
let t = null;
|
|
16
|
+
for (const m of e.rows) (!t || m.first_seen < t) && (t = m.first_seen);
|
|
17
|
+
return t;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
signal:
|
|
21
|
-
expanded:
|
|
19
|
+
function Te({
|
|
20
|
+
signal: e,
|
|
21
|
+
expanded: t,
|
|
22
22
|
onToggle: m,
|
|
23
23
|
onOpenRecord: g,
|
|
24
24
|
onExplain: p,
|
|
25
25
|
canExplain: l
|
|
26
26
|
}) {
|
|
27
|
-
const f =
|
|
28
|
-
(N,
|
|
27
|
+
const f = e.severity === "critical", y = !e.error && e.count === 0, k = y ? "neutral" : f ? "negative" : "warning", w = y ? F : f ? W : q, v = he(e), C = ee(), S = e.rows.reduce(
|
|
28
|
+
(N, o) => !N || o.first_seen > N ? o.first_seen : N,
|
|
29
29
|
null
|
|
30
|
-
),
|
|
30
|
+
), b = e.rows[0], [z, _] = A(!1), D = `ic-signal-body-${e.id.replace(/[^a-z0-9]/gi, "-")}`;
|
|
31
31
|
return /* @__PURE__ */ a(
|
|
32
32
|
"section",
|
|
33
33
|
{
|
|
34
|
-
"data-ic-signal":
|
|
35
|
-
"data-ic-severity":
|
|
34
|
+
"data-ic-signal": e.id,
|
|
35
|
+
"data-ic-severity": e.severity,
|
|
36
36
|
className: "overflow-hidden rounded-lg border border-border bg-card",
|
|
37
37
|
children: [
|
|
38
38
|
/* @__PURE__ */ a(
|
|
@@ -40,48 +40,55 @@ function De({
|
|
|
40
40
|
{
|
|
41
41
|
type: "button",
|
|
42
42
|
onClick: m,
|
|
43
|
-
"aria-expanded":
|
|
44
|
-
"aria-controls":
|
|
43
|
+
"aria-expanded": t,
|
|
44
|
+
"aria-controls": D,
|
|
45
45
|
className: "flex w-full items-start gap-3 px-4 py-3 text-left transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
46
46
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ r(
|
|
48
48
|
"span",
|
|
49
49
|
{
|
|
50
50
|
className: x(
|
|
51
51
|
"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-md",
|
|
52
|
-
|
|
52
|
+
ce[k]
|
|
53
53
|
),
|
|
54
|
-
"data-tip": f ? "Critical — something is failing now" : "Worth a look",
|
|
55
|
-
children: /* @__PURE__ */
|
|
54
|
+
"data-tip": y ? "Nothing open — only snoozed rows" : f ? "Critical — something is failing now" : "Worth a look",
|
|
55
|
+
children: /* @__PURE__ */ r(w, { className: x("h-3.5 w-3.5", L[k]), "aria-hidden": !0 })
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
58
|
/* @__PURE__ */ a("span", { className: "min-w-0 flex-1", children: [
|
|
59
59
|
/* @__PURE__ */ a("span", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-0.5", children: [
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
/* @__PURE__ */ r("span", { className: "text-[13.5px] font-semibold text-foreground", children: e.label }),
|
|
61
|
+
S && /* @__PURE__ */ r(te, { windows: C, at: S, className: "self-center" }),
|
|
62
|
+
e.error ? /* @__PURE__ */ r("span", { className: x("text-[12px] font-medium", L.negative), children: "Couldn't evaluate" }) : /* @__PURE__ */ a("span", { className: "text-[12px] tabular-nums text-muted-foreground", children: [
|
|
63
|
+
y && e.snoozed.length > 0 ? /* @__PURE__ */ a(T, { children: [
|
|
64
|
+
/* @__PURE__ */ r("span", { className: "font-semibold text-foreground", children: e.snoozed.length }),
|
|
65
|
+
" ",
|
|
66
|
+
"snoozed · none open"
|
|
67
|
+
] }) : /* @__PURE__ */ a(T, { children: [
|
|
68
|
+
/* @__PURE__ */ r("span", { className: x("font-semibold", L[k]), children: e.count }),
|
|
69
|
+
" ",
|
|
70
|
+
"open"
|
|
71
|
+
] }),
|
|
72
|
+
v && /* @__PURE__ */ a("span", { "data-tip": `Oldest first seen ${U(v)}`, children: [
|
|
66
73
|
" ",
|
|
67
74
|
"· oldest ",
|
|
68
|
-
|
|
75
|
+
ue(v)
|
|
69
76
|
] }),
|
|
70
|
-
|
|
77
|
+
!y && e.snoozed.length > 0 && /* @__PURE__ */ a(T, { children: [
|
|
71
78
|
" · ",
|
|
72
|
-
|
|
79
|
+
e.snoozed.length,
|
|
73
80
|
" snoozed"
|
|
74
81
|
] })
|
|
75
82
|
] })
|
|
76
83
|
] }),
|
|
77
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ r("span", { className: "mt-0.5 block truncate text-[12px] text-muted-foreground", children: e.error ? e.error : b ? `${b.title}${b.detail ? ` — ${B(b.detail)}` : ""}` : e.description })
|
|
78
85
|
] }),
|
|
79
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ r(
|
|
80
87
|
E,
|
|
81
88
|
{
|
|
82
89
|
className: x(
|
|
83
90
|
"mt-1 h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200",
|
|
84
|
-
|
|
91
|
+
t && "rotate-90"
|
|
85
92
|
),
|
|
86
93
|
"aria-hidden": !0
|
|
87
94
|
}
|
|
@@ -89,155 +96,155 @@ function De({
|
|
|
89
96
|
]
|
|
90
97
|
}
|
|
91
98
|
),
|
|
92
|
-
|
|
93
|
-
|
|
99
|
+
t && /* @__PURE__ */ a("div", { id: D, className: "border-t border-border", children: [
|
|
100
|
+
e.error ? /* @__PURE__ */ a("p", { className: x("px-4 py-3 text-[12.5px]", L.negative), children: [
|
|
94
101
|
"Couldn't evaluate · ",
|
|
95
|
-
|
|
96
|
-
] }) : /* @__PURE__ */ a(
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
|
|
102
|
+
e.error
|
|
103
|
+
] }) : /* @__PURE__ */ a(T, { children: [
|
|
104
|
+
/* @__PURE__ */ r("p", { className: "max-w-[80ch] px-4 pb-1 pt-3 text-[12px] leading-relaxed text-muted-foreground", children: e.description }),
|
|
105
|
+
/* @__PURE__ */ r(
|
|
106
|
+
fe,
|
|
100
107
|
{
|
|
101
|
-
signal:
|
|
102
|
-
rows:
|
|
108
|
+
signal: e,
|
|
109
|
+
rows: e.rows,
|
|
103
110
|
onOpenRecord: g,
|
|
104
111
|
onExplain: p,
|
|
105
112
|
canExplain: l
|
|
106
113
|
}
|
|
107
114
|
),
|
|
108
|
-
|
|
115
|
+
e.count > e.shown && /* @__PURE__ */ a("p", { className: "px-4 pb-3 text-[12px] text-muted-foreground", children: [
|
|
109
116
|
"Showing ",
|
|
110
|
-
|
|
117
|
+
e.shown,
|
|
111
118
|
" of ",
|
|
112
|
-
|
|
119
|
+
e.count,
|
|
113
120
|
". The rest appear as these are cleared."
|
|
114
121
|
] })
|
|
115
122
|
] }),
|
|
116
|
-
|
|
123
|
+
e.snoozed.length > 0 && /* @__PURE__ */ a("div", { className: "border-t border-border", children: [
|
|
117
124
|
/* @__PURE__ */ a(
|
|
118
125
|
"button",
|
|
119
126
|
{
|
|
120
127
|
type: "button",
|
|
121
|
-
onClick: () =>
|
|
122
|
-
"aria-expanded":
|
|
123
|
-
"data-ic-snoozed-fold":
|
|
128
|
+
onClick: () => _((N) => !N),
|
|
129
|
+
"aria-expanded": z,
|
|
130
|
+
"data-ic-snoozed-fold": e.snoozed.length,
|
|
124
131
|
className: "flex w-full items-center gap-1.5 px-4 py-2 text-left text-[12px] font-medium text-muted-foreground hover:text-foreground",
|
|
125
132
|
children: [
|
|
126
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ r(
|
|
127
134
|
E,
|
|
128
135
|
{
|
|
129
|
-
className: x("h-3.5 w-3.5 transition-transform",
|
|
136
|
+
className: x("h-3.5 w-3.5 transition-transform", z && "rotate-90")
|
|
130
137
|
}
|
|
131
138
|
),
|
|
132
139
|
"Snoozed (",
|
|
133
|
-
|
|
140
|
+
e.snoozed.length,
|
|
134
141
|
")"
|
|
135
142
|
]
|
|
136
143
|
}
|
|
137
144
|
),
|
|
138
|
-
|
|
145
|
+
z && /* @__PURE__ */ r(ge, { signal: e })
|
|
139
146
|
] })
|
|
140
147
|
] })
|
|
141
148
|
]
|
|
142
149
|
}
|
|
143
150
|
);
|
|
144
151
|
}
|
|
145
|
-
function
|
|
146
|
-
signal:
|
|
147
|
-
rows:
|
|
152
|
+
function fe({
|
|
153
|
+
signal: e,
|
|
154
|
+
rows: t,
|
|
148
155
|
onOpenRecord: m,
|
|
149
156
|
onExplain: g,
|
|
150
157
|
canExplain: p
|
|
151
158
|
}) {
|
|
152
|
-
const l =
|
|
153
|
-
if (!
|
|
154
|
-
const
|
|
155
|
-
for (const s of
|
|
156
|
-
const i = s.group ?? "—", d =
|
|
157
|
-
d.rows.push(s),
|
|
159
|
+
const l = ne(), f = oe(), [y, k] = A({}), [w, v] = A(/* @__PURE__ */ new Set()), [C, S] = A(/* @__PURE__ */ new Set()), b = X(() => {
|
|
160
|
+
if (!t.some((s) => s.group)) return null;
|
|
161
|
+
const o = /* @__PURE__ */ new Map();
|
|
162
|
+
for (const s of t) {
|
|
163
|
+
const i = s.group ?? "—", d = o.get(i) ?? { key: i, label: s.group_label ?? s.group ?? "Other", rows: [] };
|
|
164
|
+
d.rows.push(s), o.set(i, d);
|
|
158
165
|
}
|
|
159
|
-
return [...
|
|
160
|
-
}, [
|
|
166
|
+
return [...o.values()].sort((s, i) => i.rows.length - s.rows.length);
|
|
167
|
+
}, [t]), z = async (o, s) => {
|
|
161
168
|
var d;
|
|
162
169
|
const i = s.map((c) => c.key);
|
|
163
|
-
|
|
170
|
+
v((c) => /* @__PURE__ */ new Set([...c, ...i]));
|
|
164
171
|
try {
|
|
165
|
-
const c = await l.mutateAsync({ signal:
|
|
166
|
-
|
|
172
|
+
const c = await l.mutateAsync({ signal: e.id, row_keys: i, action: o });
|
|
173
|
+
k((n) => {
|
|
167
174
|
const u = { ...n };
|
|
168
175
|
for (const h of c) u[h.key] = h;
|
|
169
176
|
return u;
|
|
170
|
-
}),
|
|
177
|
+
}), S((n) => new Set([...n].filter((u) => !i.includes(u))));
|
|
171
178
|
} catch (c) {
|
|
172
179
|
const n = ((d = c == null ? void 0 : c.response) == null ? void 0 : d.error) ?? I(c, "The action failed");
|
|
173
|
-
|
|
180
|
+
k((u) => {
|
|
174
181
|
const h = { ...u };
|
|
175
|
-
for (const
|
|
182
|
+
for (const $ of i) h[$] = { key: $, ok: !1, message: n };
|
|
176
183
|
return h;
|
|
177
184
|
});
|
|
178
185
|
} finally {
|
|
179
|
-
|
|
186
|
+
v((c) => new Set([...c].filter((n) => !i.includes(n))));
|
|
180
187
|
}
|
|
181
|
-
}, _ = async (
|
|
188
|
+
}, _ = async (o) => {
|
|
182
189
|
var i;
|
|
183
|
-
const s =
|
|
184
|
-
|
|
190
|
+
const s = o.map((d) => d.key);
|
|
191
|
+
v((d) => /* @__PURE__ */ new Set([...d, ...s]));
|
|
185
192
|
try {
|
|
186
|
-
await f.mutateAsync({ signal:
|
|
193
|
+
await f.mutateAsync({ signal: e.id, row_keys: s }), S((d) => new Set([...d].filter((c) => !s.includes(c))));
|
|
187
194
|
} catch (d) {
|
|
188
195
|
const c = ((i = d == null ? void 0 : d.response) == null ? void 0 : i.error) ?? I(d, "Could not dismiss");
|
|
189
|
-
|
|
196
|
+
k((n) => {
|
|
190
197
|
const u = { ...n };
|
|
191
198
|
for (const h of s) u[h] = { key: h, ok: !1, message: c };
|
|
192
199
|
return u;
|
|
193
200
|
});
|
|
194
201
|
} finally {
|
|
195
|
-
|
|
202
|
+
v((d) => new Set([...d].filter((c) => !s.includes(c))));
|
|
196
203
|
}
|
|
197
|
-
},
|
|
204
|
+
}, D = (o, s) => {
|
|
198
205
|
var i, d, c, n;
|
|
199
|
-
if (
|
|
200
|
-
const u = ((i =
|
|
206
|
+
if (o.kind === "open") {
|
|
207
|
+
const u = ((i = o.payload) == null ? void 0 : i.collection) ?? ((d = s.record) == null ? void 0 : d.collection), h = ((c = o.payload) == null ? void 0 : c.id) ?? ((n = s.record) == null ? void 0 : n.id);
|
|
201
208
|
u && h && (m == null || m(u, String(h)));
|
|
202
209
|
return;
|
|
203
210
|
}
|
|
204
|
-
if (
|
|
205
|
-
g == null || g(
|
|
211
|
+
if (o.kind === "explain") {
|
|
212
|
+
g == null || g(o, s);
|
|
206
213
|
return;
|
|
207
214
|
}
|
|
208
|
-
|
|
209
|
-
},
|
|
210
|
-
|
|
215
|
+
z(o, [s]);
|
|
216
|
+
}, N = (o, s) => /* @__PURE__ */ r(
|
|
217
|
+
be,
|
|
211
218
|
{
|
|
212
|
-
signal:
|
|
213
|
-
row:
|
|
214
|
-
result:
|
|
215
|
-
busy:
|
|
219
|
+
signal: e,
|
|
220
|
+
row: o,
|
|
221
|
+
result: y[o.key],
|
|
222
|
+
busy: w.has(o.key),
|
|
216
223
|
selectable: s,
|
|
217
|
-
selected:
|
|
218
|
-
onSelect: (i) =>
|
|
224
|
+
selected: C.has(o.key),
|
|
225
|
+
onSelect: (i) => S((d) => {
|
|
219
226
|
const c = new Set(d);
|
|
220
|
-
return i ? c.add(
|
|
227
|
+
return i ? c.add(o.key) : c.delete(o.key), c;
|
|
221
228
|
}),
|
|
222
|
-
onAction: (i) =>
|
|
229
|
+
onAction: (i) => D(i, o),
|
|
223
230
|
onOpenRecord: m,
|
|
224
231
|
canExplain: p
|
|
225
232
|
},
|
|
226
|
-
|
|
233
|
+
o.key
|
|
227
234
|
);
|
|
228
235
|
if (!b) {
|
|
229
|
-
const
|
|
236
|
+
const o = t.length > 0 && t.every((i) => C.has(i.key)), s = t.filter((i) => C.has(i.key));
|
|
230
237
|
return /* @__PURE__ */ a("div", { children: [
|
|
231
|
-
|
|
232
|
-
/* @__PURE__ */
|
|
238
|
+
t.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-h-9 items-center gap-2.5 bg-muted/60 px-4 py-1.5", children: [
|
|
239
|
+
/* @__PURE__ */ r(
|
|
233
240
|
"input",
|
|
234
241
|
{
|
|
235
242
|
type: "checkbox",
|
|
236
|
-
checked:
|
|
243
|
+
checked: o,
|
|
237
244
|
ref: (i) => {
|
|
238
|
-
i && (i.indeterminate = s.length > 0 && !
|
|
245
|
+
i && (i.indeterminate = s.length > 0 && !o);
|
|
239
246
|
},
|
|
240
|
-
onChange: (i) =>
|
|
247
|
+
onChange: (i) => S(new Set(i.target.checked ? t.map((d) => d.key) : [])),
|
|
241
248
|
"aria-label": "Select every problem",
|
|
242
249
|
"data-ic-select-all": !0,
|
|
243
250
|
className: "h-3.5 w-3.5 accent-[rgb(var(--nvr-cyan-rgb))]"
|
|
@@ -248,37 +255,37 @@ function he({
|
|
|
248
255
|
{
|
|
249
256
|
type: "button",
|
|
250
257
|
"data-ic-bulk-action": "dismiss",
|
|
251
|
-
disabled: s.some((i) =>
|
|
258
|
+
disabled: s.some((i) => w.has(i.key)),
|
|
252
259
|
onClick: () => void _(s),
|
|
253
260
|
className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-[12px] font-medium text-foreground hover:bg-muted disabled:opacity-60",
|
|
254
261
|
children: [
|
|
255
|
-
s.some((i) =>
|
|
262
|
+
s.some((i) => w.has(i.key)) && /* @__PURE__ */ r(M, { className: "h-3 w-3 animate-spin" }),
|
|
256
263
|
"Dismiss selected ",
|
|
257
264
|
s.length
|
|
258
265
|
]
|
|
259
266
|
}
|
|
260
|
-
) : /* @__PURE__ */
|
|
267
|
+
) : /* @__PURE__ */ r("span", { className: "text-[12px] text-muted-foreground", children: "Select problems to dismiss several at once" })
|
|
261
268
|
] }),
|
|
262
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ r("ul", { className: "divide-y divide-border", children: t.map((i) => N(i, !0)) })
|
|
263
270
|
] });
|
|
264
271
|
}
|
|
265
|
-
return /* @__PURE__ */
|
|
266
|
-
const s =
|
|
272
|
+
return /* @__PURE__ */ r("div", { className: "pb-1", children: b.map((o) => {
|
|
273
|
+
const s = o.rows.filter((n) => C.has(n.key)), i = o.rows.length > 0 && s.length === o.rows.length, d = /* @__PURE__ */ new Map();
|
|
267
274
|
for (const n of s) {
|
|
268
275
|
const u = /* @__PURE__ */ new Set();
|
|
269
276
|
for (const h of n.actions) {
|
|
270
|
-
if (!
|
|
271
|
-
const
|
|
272
|
-
if (u.has(
|
|
273
|
-
u.add(
|
|
274
|
-
const
|
|
275
|
-
|
|
277
|
+
if (!me.includes(h.kind)) continue;
|
|
278
|
+
const $ = pe(h);
|
|
279
|
+
if (u.has($)) continue;
|
|
280
|
+
u.add($);
|
|
281
|
+
const K = d.get($) ?? { action: h, rows: [] };
|
|
282
|
+
K.rows.push(n), d.set($, K);
|
|
276
283
|
}
|
|
277
284
|
}
|
|
278
|
-
const c = s.some((n) =>
|
|
279
|
-
return /* @__PURE__ */ a("div", { "data-ic-group":
|
|
285
|
+
const c = s.some((n) => w.has(n.key));
|
|
286
|
+
return /* @__PURE__ */ a("div", { "data-ic-group": o.key, className: "mt-2 first:mt-1", children: [
|
|
280
287
|
/* @__PURE__ */ a("div", { className: "flex min-h-9 items-center gap-2.5 bg-muted/60 px-4 py-1.5", children: [
|
|
281
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ r(
|
|
282
289
|
"input",
|
|
283
290
|
{
|
|
284
291
|
type: "checkbox",
|
|
@@ -286,19 +293,19 @@ function he({
|
|
|
286
293
|
ref: (n) => {
|
|
287
294
|
n && (n.indeterminate = s.length > 0 && !i);
|
|
288
295
|
},
|
|
289
|
-
onChange: (n) =>
|
|
296
|
+
onChange: (n) => S((u) => {
|
|
290
297
|
const h = new Set(u);
|
|
291
|
-
for (const
|
|
292
|
-
n.target.checked ? h.add(
|
|
298
|
+
for (const $ of o.rows)
|
|
299
|
+
n.target.checked ? h.add($.key) : h.delete($.key);
|
|
293
300
|
return h;
|
|
294
301
|
}),
|
|
295
|
-
"aria-label": `Select every problem in ${
|
|
296
|
-
"data-ic-group-select":
|
|
302
|
+
"aria-label": `Select every problem in ${o.label}`,
|
|
303
|
+
"data-ic-group-select": o.key,
|
|
297
304
|
className: "h-3.5 w-3.5 accent-[rgb(var(--nvr-cyan-rgb))]"
|
|
298
305
|
}
|
|
299
306
|
),
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ r("span", { className: "text-[12.5px] font-semibold text-foreground", children: o.label }),
|
|
308
|
+
/* @__PURE__ */ r("span", { className: "text-[12px] tabular-nums text-muted-foreground", children: o.rows.length }),
|
|
302
309
|
/* @__PURE__ */ a("span", { className: "ml-auto flex items-center gap-1", children: [
|
|
303
310
|
[...d.entries()].map(([n, u]) => /* @__PURE__ */ a(
|
|
304
311
|
"button",
|
|
@@ -306,7 +313,7 @@ function he({
|
|
|
306
313
|
type: "button",
|
|
307
314
|
"data-ic-bulk-action": u.action.kind,
|
|
308
315
|
onClick: () => {
|
|
309
|
-
|
|
316
|
+
z(u.action, u.rows);
|
|
310
317
|
},
|
|
311
318
|
className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-[12px] font-medium text-foreground hover:bg-muted",
|
|
312
319
|
children: [
|
|
@@ -326,94 +333,94 @@ function he({
|
|
|
326
333
|
onClick: () => void _(s),
|
|
327
334
|
className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-[12px] font-medium text-foreground hover:bg-muted disabled:opacity-60",
|
|
328
335
|
children: [
|
|
329
|
-
c && /* @__PURE__ */
|
|
336
|
+
c && /* @__PURE__ */ r(M, { className: "h-3 w-3 animate-spin" }),
|
|
330
337
|
"Dismiss selected ",
|
|
331
338
|
s.length
|
|
332
339
|
]
|
|
333
340
|
}
|
|
334
341
|
),
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
|
|
342
|
+
/* @__PURE__ */ r(
|
|
343
|
+
R,
|
|
337
344
|
{
|
|
338
|
-
signal:
|
|
339
|
-
signalLabel:
|
|
340
|
-
group: { key:
|
|
345
|
+
signal: e.id,
|
|
346
|
+
signalLabel: e.label,
|
|
347
|
+
group: { key: o.key, label: o.label },
|
|
341
348
|
defaultScope: "group"
|
|
342
349
|
}
|
|
343
350
|
)
|
|
344
351
|
] })
|
|
345
352
|
] }),
|
|
346
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ r(
|
|
347
354
|
"ul",
|
|
348
355
|
{
|
|
349
|
-
"data-ic-group-rows":
|
|
356
|
+
"data-ic-group-rows": o.key,
|
|
350
357
|
className: "ml-[23px] divide-y divide-border border-l border-border",
|
|
351
|
-
children:
|
|
358
|
+
children: o.rows.map((n) => N(n, !0))
|
|
352
359
|
}
|
|
353
360
|
)
|
|
354
|
-
] },
|
|
361
|
+
] }, o.key);
|
|
355
362
|
}) });
|
|
356
363
|
}
|
|
357
|
-
function P(
|
|
358
|
-
return
|
|
364
|
+
function P(e) {
|
|
365
|
+
return e.label ? e.label : `${Y(e.collection).replace(/s$/, "")} ${e.id}`;
|
|
359
366
|
}
|
|
360
|
-
function
|
|
361
|
-
signal:
|
|
362
|
-
row:
|
|
367
|
+
function be({
|
|
368
|
+
signal: e,
|
|
369
|
+
row: t,
|
|
363
370
|
result: m,
|
|
364
371
|
busy: g,
|
|
365
372
|
selectable: p,
|
|
366
373
|
selected: l,
|
|
367
374
|
onSelect: f,
|
|
368
|
-
onAction:
|
|
369
|
-
onOpenRecord:
|
|
370
|
-
canExplain:
|
|
375
|
+
onAction: y,
|
|
376
|
+
onOpenRecord: k,
|
|
377
|
+
canExplain: w
|
|
371
378
|
}) {
|
|
372
379
|
var i, d, c;
|
|
373
|
-
const
|
|
374
|
-
(n) => !(n.kind === "open" &&
|
|
375
|
-
), { isAdmin:
|
|
380
|
+
const v = t.since ?? t.first_seen, C = t.actions.filter(
|
|
381
|
+
(n) => !(n.kind === "open" && t.record) && !(n.kind === "explain" && (w == null ? void 0 : w(n)) === !1)
|
|
382
|
+
), { isAdmin: S } = Q(), [b, z] = A(!1), _ = H(), D = J(null), N = ie(t.drill), o = ((i = t.drill) == null ? void 0 : i.kind) === "submission" ? t.actions.find((n) => {
|
|
376
383
|
var u;
|
|
377
|
-
return n.kind === "retry_submission" && n.id === ((u =
|
|
384
|
+
return n.kind === "retry_submission" && n.id === ((u = t.drill) == null ? void 0 : u.id);
|
|
378
385
|
}) : void 0, s = () => {
|
|
379
386
|
var n;
|
|
380
|
-
|
|
387
|
+
z(!1), (n = D.current) == null || n.focus();
|
|
381
388
|
};
|
|
382
389
|
return /* @__PURE__ */ a(
|
|
383
390
|
"li",
|
|
384
391
|
{
|
|
385
|
-
"data-ic-row":
|
|
392
|
+
"data-ic-row": t.key,
|
|
386
393
|
"data-ic-row-open": b ? "" : void 0,
|
|
387
394
|
className: x(b && "bg-muted/30"),
|
|
388
395
|
children: [
|
|
389
396
|
/* @__PURE__ */ a("div", { className: "flex gap-3 px-4 py-2.5", children: [
|
|
390
|
-
p && /* @__PURE__ */
|
|
397
|
+
p && /* @__PURE__ */ r(
|
|
391
398
|
"input",
|
|
392
399
|
{
|
|
393
400
|
type: "checkbox",
|
|
394
401
|
checked: l,
|
|
395
402
|
onChange: (n) => f(n.target.checked),
|
|
396
|
-
"aria-label": `Select ${
|
|
397
|
-
"data-ic-select-row":
|
|
403
|
+
"aria-label": `Select ${t.title}`,
|
|
404
|
+
"data-ic-select-row": t.key,
|
|
398
405
|
className: "mt-1 h-3.5 w-3.5 shrink-0 accent-[rgb(var(--nvr-cyan-rgb))]"
|
|
399
406
|
}
|
|
400
407
|
),
|
|
401
408
|
/* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
|
|
409
|
+
/* @__PURE__ */ r("p", { className: "text-[12.5px] font-medium text-foreground", children: t.title }),
|
|
410
|
+
t.detail && /* @__PURE__ */ r(
|
|
404
411
|
"p",
|
|
405
412
|
{
|
|
406
413
|
className: "mt-0.5 line-clamp-2 break-words text-[12px] leading-snug text-muted-foreground",
|
|
407
|
-
"data-tip":
|
|
408
|
-
children:
|
|
414
|
+
"data-tip": t.detail.length > 140 || B(t.detail) !== t.detail.trim() ? t.detail.slice(0, 900) : void 0,
|
|
415
|
+
children: B(t.detail)
|
|
409
416
|
}
|
|
410
417
|
),
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
|
|
418
|
+
/* @__PURE__ */ r(
|
|
419
|
+
O,
|
|
413
420
|
{
|
|
414
|
-
since:
|
|
415
|
-
record:
|
|
416
|
-
onOpenRecord:
|
|
421
|
+
since: v,
|
|
422
|
+
record: t.record,
|
|
423
|
+
onOpenRecord: k,
|
|
417
424
|
className: "mt-1 flex-wrap gap-x-2 xl:hidden"
|
|
418
425
|
}
|
|
419
426
|
),
|
|
@@ -424,15 +431,15 @@ function fe({
|
|
|
424
431
|
"data-ic-result": m.ok ? "ok" : "failed",
|
|
425
432
|
className: x(
|
|
426
433
|
"mt-1 flex items-start gap-1.5 text-[12px] font-medium",
|
|
427
|
-
|
|
434
|
+
L[m.ok ? "positive" : "negative"]
|
|
428
435
|
),
|
|
429
436
|
children: [
|
|
430
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ r(
|
|
431
438
|
"span",
|
|
432
439
|
{
|
|
433
440
|
className: x(
|
|
434
441
|
"mt-[5px] h-1.5 w-1.5 shrink-0 rounded-full",
|
|
435
|
-
|
|
442
|
+
le[m.ok ? "positive" : "negative"]
|
|
436
443
|
)
|
|
437
444
|
}
|
|
438
445
|
),
|
|
@@ -441,28 +448,28 @@ function fe({
|
|
|
441
448
|
}
|
|
442
449
|
)
|
|
443
450
|
] }),
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
|
|
451
|
+
/* @__PURE__ */ r(
|
|
452
|
+
O,
|
|
446
453
|
{
|
|
447
|
-
since:
|
|
448
|
-
record:
|
|
449
|
-
onOpenRecord:
|
|
454
|
+
since: v,
|
|
455
|
+
record: t.record,
|
|
456
|
+
onOpenRecord: k,
|
|
450
457
|
className: "hidden w-[210px] shrink-0 flex-col items-start gap-0.5 pt-0.5 xl:flex",
|
|
451
458
|
stacked: !0
|
|
452
459
|
}
|
|
453
460
|
),
|
|
454
461
|
/* @__PURE__ */ a("div", { className: "flex shrink-0 items-start gap-1", children: [
|
|
455
|
-
|
|
462
|
+
N && /* @__PURE__ */ a(
|
|
456
463
|
"button",
|
|
457
464
|
{
|
|
458
|
-
ref:
|
|
465
|
+
ref: D,
|
|
459
466
|
type: "button",
|
|
460
|
-
"data-ic-drill-toggle": `${(d =
|
|
467
|
+
"data-ic-drill-toggle": `${(d = t.drill) == null ? void 0 : d.kind}:${(c = t.drill) == null ? void 0 : c.id}`,
|
|
461
468
|
"aria-expanded": b,
|
|
462
469
|
"aria-controls": b ? _ : void 0,
|
|
463
|
-
onClick: () =>
|
|
470
|
+
onClick: () => z((n) => !n),
|
|
464
471
|
onKeyDown: (n) => {
|
|
465
|
-
n.key === "Escape" && b && (n.preventDefault(), n.stopPropagation(),
|
|
472
|
+
n.key === "Escape" && b && (n.preventDefault(), n.stopPropagation(), z(!1));
|
|
466
473
|
},
|
|
467
474
|
className: x(
|
|
468
475
|
"inline-flex h-7 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -470,7 +477,7 @@ function fe({
|
|
|
470
477
|
),
|
|
471
478
|
children: [
|
|
472
479
|
"Details",
|
|
473
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ r(
|
|
474
481
|
G,
|
|
475
482
|
{
|
|
476
483
|
className: x(
|
|
@@ -483,58 +490,58 @@ function fe({
|
|
|
483
490
|
]
|
|
484
491
|
}
|
|
485
492
|
),
|
|
486
|
-
|
|
493
|
+
C.map((n) => /* @__PURE__ */ a(
|
|
487
494
|
"button",
|
|
488
495
|
{
|
|
489
496
|
type: "button",
|
|
490
497
|
"data-ic-action": n.kind,
|
|
491
498
|
disabled: g,
|
|
492
|
-
onClick: () =>
|
|
499
|
+
onClick: () => y(n),
|
|
493
500
|
className: "inline-flex h-7 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-60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
494
501
|
children: [
|
|
495
|
-
g && n.kind !== "explain" && /* @__PURE__ */
|
|
502
|
+
g && n.kind !== "explain" && /* @__PURE__ */ r(M, { className: "h-3 w-3 animate-spin" }),
|
|
496
503
|
n.label
|
|
497
504
|
]
|
|
498
505
|
},
|
|
499
|
-
|
|
506
|
+
j(n)
|
|
500
507
|
)),
|
|
501
|
-
/* @__PURE__ */
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
|
|
508
|
+
/* @__PURE__ */ r(ae, { signal: e.id, rowKey: t.key }),
|
|
509
|
+
/* @__PURE__ */ r(
|
|
510
|
+
R,
|
|
504
511
|
{
|
|
505
|
-
signal:
|
|
506
|
-
signalLabel:
|
|
507
|
-
rowKey:
|
|
508
|
-
group:
|
|
512
|
+
signal: e.id,
|
|
513
|
+
signalLabel: e.label,
|
|
514
|
+
rowKey: t.key,
|
|
515
|
+
group: t.group ? { key: t.group, label: t.group_label ?? t.group } : void 0,
|
|
509
516
|
compact: !0
|
|
510
517
|
}
|
|
511
518
|
)
|
|
512
519
|
] })
|
|
513
520
|
] }),
|
|
514
|
-
|
|
515
|
-
|
|
521
|
+
S && /* @__PURE__ */ r("div", { className: "pb-3 pl-11 pr-4", "data-ic-explain": t.key, children: /* @__PURE__ */ r(
|
|
522
|
+
Z,
|
|
516
523
|
{
|
|
517
524
|
kind: "signal-row",
|
|
518
|
-
params: { signal:
|
|
519
|
-
label:
|
|
525
|
+
params: { signal: e.id, row_key: t.key },
|
|
526
|
+
label: e.id.startsWith("core:unanswered-") ? "Explain this" : "Explain this failure"
|
|
520
527
|
}
|
|
521
528
|
) }),
|
|
522
|
-
b &&
|
|
523
|
-
/* @__PURE__ */
|
|
529
|
+
b && N && t.drill && // Esc anywhere inside the open drill collapses it.
|
|
530
|
+
/* @__PURE__ */ r(
|
|
524
531
|
"section",
|
|
525
532
|
{
|
|
526
533
|
id: _,
|
|
527
|
-
"aria-label": `Details: ${
|
|
534
|
+
"aria-label": `Details: ${t.title}`,
|
|
528
535
|
onKeyDown: (n) => {
|
|
529
536
|
n.key === "Escape" && !n.defaultPrevented && (n.stopPropagation(), s());
|
|
530
537
|
},
|
|
531
538
|
className: "border-t border-border pb-4 pl-11 pr-4 pt-3",
|
|
532
|
-
children: /* @__PURE__ */
|
|
533
|
-
|
|
539
|
+
children: /* @__PURE__ */ r(
|
|
540
|
+
se,
|
|
534
541
|
{
|
|
535
|
-
drill:
|
|
536
|
-
onOpenRecord:
|
|
537
|
-
onRetry:
|
|
542
|
+
drill: t.drill,
|
|
543
|
+
onOpenRecord: k,
|
|
544
|
+
onRetry: o ? () => y(o) : void 0,
|
|
538
545
|
retryBusy: g
|
|
539
546
|
}
|
|
540
547
|
)
|
|
@@ -544,46 +551,46 @@ function fe({
|
|
|
544
551
|
}
|
|
545
552
|
);
|
|
546
553
|
}
|
|
547
|
-
function
|
|
548
|
-
since:
|
|
549
|
-
record:
|
|
554
|
+
function O({
|
|
555
|
+
since: e,
|
|
556
|
+
record: t,
|
|
550
557
|
onOpenRecord: m,
|
|
551
558
|
className: g,
|
|
552
559
|
stacked: p
|
|
553
560
|
}) {
|
|
554
561
|
return /* @__PURE__ */ a("div", { className: x("flex items-center text-[11.5px] text-muted-foreground", g), children: [
|
|
555
|
-
/* @__PURE__ */ a("span", { "data-tip":
|
|
562
|
+
/* @__PURE__ */ a("span", { "data-tip": U(e), className: "tabular-nums", children: [
|
|
556
563
|
"Since ",
|
|
557
|
-
|
|
564
|
+
de(e)
|
|
558
565
|
] }),
|
|
559
|
-
|
|
560
|
-
!p && /* @__PURE__ */
|
|
566
|
+
t && /* @__PURE__ */ a(T, { children: [
|
|
567
|
+
!p && /* @__PURE__ */ r("span", { "aria-hidden": !0, children: "·" }),
|
|
561
568
|
m ? /* @__PURE__ */ a(
|
|
562
569
|
"button",
|
|
563
570
|
{
|
|
564
571
|
type: "button",
|
|
565
|
-
"data-ic-record": `${
|
|
566
|
-
onClick: () => m(
|
|
572
|
+
"data-ic-record": `${t.collection}:${t.id}`,
|
|
573
|
+
onClick: () => m(t.collection, t.id),
|
|
567
574
|
className: "inline-flex max-w-full items-center gap-1 truncate font-medium text-foreground underline decoration-border underline-offset-2 hover:decoration-foreground",
|
|
568
575
|
children: [
|
|
569
|
-
P(
|
|
570
|
-
/* @__PURE__ */
|
|
576
|
+
P(t),
|
|
577
|
+
/* @__PURE__ */ r(V, { className: "h-3 w-3 shrink-0 opacity-60", "aria-hidden": !0 })
|
|
571
578
|
]
|
|
572
579
|
}
|
|
573
|
-
) : /* @__PURE__ */
|
|
580
|
+
) : /* @__PURE__ */ r("span", { className: "font-medium text-foreground", children: P(t) })
|
|
574
581
|
] })
|
|
575
582
|
] });
|
|
576
583
|
}
|
|
577
|
-
function
|
|
578
|
-
const { remove:
|
|
579
|
-
for (const p of
|
|
584
|
+
function ge({ signal: e }) {
|
|
585
|
+
const { remove: t } = re(), m = /* @__PURE__ */ new Map();
|
|
586
|
+
for (const p of e.snoozed) {
|
|
580
587
|
if (!p.snooze) continue;
|
|
581
588
|
const l = m.get(p.snooze.id) ?? [];
|
|
582
589
|
l.push(p), m.set(p.snooze.id, l);
|
|
583
590
|
}
|
|
584
|
-
const g = (p) => new Set(p.map((f) => f.group ?? "")).size === 1 && p[0].group ? `everything in ${p[0].group_label ?? p[0].group}` : `all of “${
|
|
585
|
-
return /* @__PURE__ */
|
|
586
|
-
const l = p.snooze, f = l ? m.get(l.id) ?? [] : [],
|
|
591
|
+
const g = (p) => new Set(p.map((f) => f.group ?? "")).size === 1 && p[0].group ? `everything in ${p[0].group_label ?? p[0].group}` : `all of “${e.label}”`;
|
|
592
|
+
return /* @__PURE__ */ r("ul", { className: "divide-y divide-border border-t border-border bg-muted/30", children: e.snoozed.map((p) => {
|
|
593
|
+
const l = p.snooze, f = l ? m.get(l.id) ?? [] : [], y = l != null && l.until_occurrence ? "Dismissed — shows again if it happens again" : `Snoozed ${l != null && l.until_change ? "until it changes" : l != null && l.until ? `until ${new Date(l.until).toLocaleString(void 0, {
|
|
587
594
|
month: "short",
|
|
588
595
|
day: "numeric",
|
|
589
596
|
hour: "numeric",
|
|
@@ -591,22 +598,22 @@ function be({ signal: t }) {
|
|
|
591
598
|
})}` : ""}`;
|
|
592
599
|
return /* @__PURE__ */ a("li", { "data-ic-row": p.key, "data-ic-snoozed": !0, className: "flex gap-3 px-4 py-2", children: [
|
|
593
600
|
/* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
|
|
594
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ r("p", { className: "truncate text-[12.5px] text-foreground", children: p.title }),
|
|
595
602
|
/* @__PURE__ */ a("p", { className: "text-[11.5px] text-muted-foreground", children: [
|
|
596
|
-
|
|
603
|
+
y,
|
|
597
604
|
f.length > 1 ? ` with ${g(f)}` : "",
|
|
598
605
|
l != null && l.note ? ` — “${l.note}”` : ""
|
|
599
606
|
] })
|
|
600
607
|
] }),
|
|
601
|
-
l && /* @__PURE__ */
|
|
608
|
+
l && /* @__PURE__ */ r(
|
|
602
609
|
"button",
|
|
603
610
|
{
|
|
604
611
|
type: "button",
|
|
605
612
|
"data-ic-unsnooze": l.id,
|
|
606
613
|
"data-ic-unsnooze-count": f.length,
|
|
607
614
|
"data-tip": f.length > 1 ? `This snooze covers ${f.length} problems (${g(f)}) — they all come back` : void 0,
|
|
608
|
-
disabled:
|
|
609
|
-
onClick: () =>
|
|
615
|
+
disabled: t.isPending && t.variables === l.id,
|
|
616
|
+
onClick: () => t.mutate(l.id),
|
|
610
617
|
className: "h-7 shrink-0 rounded-md px-2.5 text-[12px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-60",
|
|
611
618
|
children: f.length > 1 ? `Unsnooze all ${f.length}` : l != null && l.until_occurrence ? "Undo" : "Unsnooze"
|
|
612
619
|
}
|
|
@@ -615,6 +622,6 @@ function be({ signal: t }) {
|
|
|
615
622
|
}) });
|
|
616
623
|
}
|
|
617
624
|
export {
|
|
618
|
-
|
|
619
|
-
|
|
625
|
+
Te as SignalCard,
|
|
626
|
+
he as oldestSeen
|
|
620
627
|
};
|