@nivaro/react 0.3.99 → 0.3.101
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/useFormSchema.js +82 -85
- package/dist/hooks/useSessionRecorder.js +206 -175
- package/dist/index.d.ts +84 -16
- package/dist/index.js +627 -622
- package/dist/lib/commands.js +15 -11
- package/dist/shared/components/ActivityEntry.js +5 -5
- package/dist/shared/components/CollectionBrowserView.js +516 -503
- package/dist/shared/components/ItemEditForm.js +3471 -3465
- package/dist/shared/components/JobsTray.js +76 -61
- package/dist/shared/components/MyWorkView.js +133 -126
- package/dist/shared/components/NotificationBell.js +322 -289
- package/dist/shared/components/RecordCompare.js +38 -40
- package/dist/shared/components/RecordReadView.js +119 -119
- package/dist/shared/components/TipLayer.js +56 -41
- package/dist/shared/components/cbv/FoundElsewhere.js +61 -0
- package/dist/shared/components/integrations/console/SignalCard.js +40 -40
- package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +95 -73
- package/dist/shared/components/integrations/console/drill/status.js +23 -18
- package/dist/shared/components/item-edit/InlineGridField.js +45 -45
- package/dist/shared/components/item-edit/InlineTableField.js +750 -749
- package/dist/shared/components/item-edit/QuickPickerDialog.js +44 -44
- package/dist/shared/components/item-edit/RawEditSheet.js +122 -114
- package/dist/shared/components/item-edit/RecordInsights.js +86 -86
- package/dist/shared/components/item-edit/RelationCombobox.js +454 -378
- package/dist/shared/components/item-edit/SummaryPanel.js +56 -48
- package/dist/shared/components/item-edit/header-path-preview.js +46 -34
- package/dist/shared/components/item-edit/related-missing.js +75 -19
- package/dist/shared/components/notifications/DeliveryChips.js +1 -2
- package/dist/shared/components/notifications/NotificationCenterView.js +249 -226
- package/dist/shared/components/panels/AccessDeniedPanel.js +31 -28
- package/dist/shared/components/panels/BackgroundMove.js +242 -0
- package/dist/shared/components/panels/MoveAdvisory.js +204 -0
- package/dist/shared/components/panels/PipelinePanel.js +1459 -1220
- package/dist/shared/components/panels/RecordIntegrityBanner.js +113 -112
- package/dist/shared/components/profile/ActivityFeedCard.js +322 -0
- package/dist/shared/components/profile/DayTimeline.js +145 -140
- package/dist/shared/components/profile/PersonAccess.js +679 -383
- package/dist/shared/components/profile/PersonActivity.js +404 -427
- package/dist/shared/components/profile/PersonDidPanel.js +248 -134
- package/dist/shared/components/profile/PersonProfile.js +33 -32
- package/dist/shared/components/profile/journey-view.js +166 -0
- package/dist/shared/lib/activity-sentence.js +319 -236
- package/dist/shared/lib/commands.js +18 -14
- package/dist/shared/lib/error-hints.js +1 -1
- package/dist/shared/lib/job-failure-text.js +12 -0
- package/dist/shared/lib/jobs-tray.js +60 -41
- package/dist/shared/lib/move-failure.js +19 -0
- package/dist/shared/lib/obligation-banner.js +22 -21
- package/dist/shared/lib/partner-failure.js +83 -0
- package/dist/shared/lib/prefetch.js +73 -73
- package/dist/shared/lib/replay-checkout.js +18 -13
- package/dist/shared/lib/replay-context.js +90 -77
- package/dist/shared/lib/replay-idle.js +21 -0
- package/dist/shared/lib/replay-socket.js +21 -17
- package/dist/shared/lib/rum.js +56 -51
- package/dist/shared/lib/safe-error.js +17 -13
- package/dist/shared/lib/stale-chunk.js +69 -26
- package/dist/shared/lib/system-collections.js +20 -0
- package/package.json +1 -1
|
@@ -1,42 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
const [e, o] =
|
|
7
|
-
return
|
|
8
|
-
var
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
}), []),
|
|
12
|
-
if (!
|
|
13
|
-
const
|
|
14
|
-
var
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
-
o((
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, useRef as v, useEffect as m, useLayoutEffect as b } from "react";
|
|
3
|
+
import { createPortal as E } from "react-dom";
|
|
4
|
+
const c = [], L = '[data-nvr-header-menu-panel], [role="menu"]', x = 6;
|
|
5
|
+
function A() {
|
|
6
|
+
const [e, o] = g(null), [r, u] = g(!1), f = v(null);
|
|
7
|
+
return m(() => (c.push(u), c[0] === u && u(!0), () => {
|
|
8
|
+
var t;
|
|
9
|
+
const i = c.indexOf(u);
|
|
10
|
+
i < 0 || (c.splice(i, 1), i === 0 && ((t = c[0]) == null || t.call(c, !0)));
|
|
11
|
+
}), []), m(() => {
|
|
12
|
+
if (!r) return;
|
|
13
|
+
const i = (l) => {
|
|
14
|
+
var w, p;
|
|
15
|
+
const n = (p = (w = l.target) == null ? void 0 : w.closest) == null ? void 0 : p.call(w, "[data-tip]"), s = n == null ? void 0 : n.getAttribute("data-tip");
|
|
16
|
+
if (!n || !s || n.getAttribute("aria-expanded") === "true") {
|
|
17
|
+
o((a) => a && null);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const d = n.getBoundingClientRect(), h = n.closest(L);
|
|
21
|
+
if (h && h !== n) {
|
|
22
|
+
const a = h.getBoundingClientRect();
|
|
23
|
+
o({
|
|
24
|
+
x: a.left,
|
|
25
|
+
y: d.top,
|
|
26
|
+
text: s,
|
|
27
|
+
beside: { left: a.left, right: a.right, rowTop: d.top, rowHeight: d.height }
|
|
28
|
+
});
|
|
18
29
|
return;
|
|
19
30
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
window.removeEventListener("mouseover", r), window.removeEventListener("pointerdown", n, !0), window.removeEventListener("scroll", n, !0);
|
|
31
|
+
o({ x: d.left, y: d.bottom + 4, text: s });
|
|
32
|
+
}, t = () => o(null);
|
|
33
|
+
return window.addEventListener("mouseover", i), window.addEventListener("pointerdown", t, !0), window.addEventListener("scroll", t, !0), () => {
|
|
34
|
+
window.removeEventListener("mouseover", i), window.removeEventListener("pointerdown", t, !0), window.removeEventListener("scroll", t, !0);
|
|
25
35
|
};
|
|
26
|
-
}, [
|
|
36
|
+
}, [r]), b(() => {
|
|
27
37
|
if (!e) return;
|
|
28
|
-
const
|
|
29
|
-
if (!
|
|
30
|
-
const
|
|
31
|
-
let { x:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
const i = f.current;
|
|
39
|
+
if (!i) return;
|
|
40
|
+
const t = i.getBoundingClientRect();
|
|
41
|
+
let { x: l, y: n } = e;
|
|
42
|
+
if (e.beside) {
|
|
43
|
+
const s = e.beside, d = s.left - x - t.width;
|
|
44
|
+
l = d >= 8 ? d : Math.min(s.right + x, Math.max(8, window.innerWidth - t.width - 8)), n = Math.round(s.rowTop + (s.rowHeight - t.height) / 2), n = Math.max(8, Math.min(n, window.innerHeight - t.height - 8));
|
|
45
|
+
} else
|
|
46
|
+
t.right > window.innerWidth - 8 && (l = Math.max(8, window.innerWidth - t.width - 8)), t.bottom > window.innerHeight - 8 && (n = Math.max(8, e.y - t.height - 30));
|
|
47
|
+
(l !== e.x || n !== e.y) && o({ ...e, x: l, y: n });
|
|
48
|
+
}, [e]), !r || !e ? null : E(
|
|
49
|
+
/* @__PURE__ */ y(
|
|
35
50
|
"div",
|
|
36
51
|
{
|
|
37
|
-
ref:
|
|
52
|
+
ref: f,
|
|
38
53
|
style: { position: "fixed", left: e.x, top: e.y, zIndex: 120 },
|
|
39
|
-
className: "pointer-events-none max-w-[340px] whitespace-pre-wrap break-words rounded-md bg-[#0f172a] px-2 py-1 text-[11px] font-medium leading-snug text-white shadow-lg dark:bg-[#334155]",
|
|
54
|
+
className: "pointer-events-none max-w-[340px] whitespace-pre-wrap break-words rounded-md bg-[#0f172a] px-2 py-1 text-[11px] font-medium leading-snug text-white shadow-lg dark:bg-[#334155] dark:ring-1 dark:ring-white/10",
|
|
40
55
|
children: e.text
|
|
41
56
|
}
|
|
42
57
|
),
|
|
@@ -45,18 +60,18 @@ function R() {
|
|
|
45
60
|
}
|
|
46
61
|
function O(e) {
|
|
47
62
|
const o = v(null);
|
|
48
|
-
return
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
51
|
-
const
|
|
52
|
-
(
|
|
63
|
+
return b(() => {
|
|
64
|
+
const r = o.current;
|
|
65
|
+
if (!r) return;
|
|
66
|
+
const u = () => {
|
|
67
|
+
(r.scrollWidth > r.clientWidth + 1 || r.scrollHeight > r.clientHeight + 1) && e ? r.setAttribute("data-tip", e) : r.removeAttribute("data-tip");
|
|
53
68
|
};
|
|
54
|
-
if (
|
|
55
|
-
const
|
|
56
|
-
return
|
|
69
|
+
if (u(), typeof ResizeObserver > "u") return;
|
|
70
|
+
const f = new ResizeObserver(u);
|
|
71
|
+
return f.observe(r), () => f.disconnect();
|
|
57
72
|
}, [e]), o;
|
|
58
73
|
}
|
|
59
74
|
export {
|
|
60
|
-
|
|
75
|
+
A as TipLayer,
|
|
61
76
|
O as useOverflowTip
|
|
62
77
|
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as u, Fragment as b, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as k } from "@tanstack/react-query";
|
|
3
|
+
import { useNivaroClient as v, useItemNavigation as w } from "../../context.js";
|
|
4
|
+
import { get as F } from "../../lib/commands.js";
|
|
5
|
+
import { titleCase as N } from "../../lib/utils.js";
|
|
6
|
+
import { useOverflowTip as q } from "../TipLayer.js";
|
|
7
|
+
function K(r) {
|
|
8
|
+
const n = r.trim();
|
|
9
|
+
return /^[A-Za-z0-9][A-Za-z0-9._/#-]{3,63}$/.test(n) && /\d/.test(n);
|
|
10
|
+
}
|
|
11
|
+
function T({
|
|
12
|
+
term: r,
|
|
13
|
+
show: n,
|
|
14
|
+
ask: m = n,
|
|
15
|
+
collection: d,
|
|
16
|
+
fallback: p = null
|
|
17
|
+
}) {
|
|
18
|
+
var s;
|
|
19
|
+
const h = v(), { open: x, urlFor: y } = w(), l = r.trim(), { data: i } = k({
|
|
20
|
+
queryKey: ["cbv-found-elsewhere", l],
|
|
21
|
+
enabled: n && m && K(l),
|
|
22
|
+
staleTime: 6e4,
|
|
23
|
+
retry: !1,
|
|
24
|
+
queryFn: () => h.request(F("/global-search", { q: l })).then((t) => {
|
|
25
|
+
var c;
|
|
26
|
+
return ((c = t.data) == null ? void 0 : c.exact) ?? null;
|
|
27
|
+
}).catch(() => null)
|
|
28
|
+
}), e = n && i && i.id != null ? i : null, o = e ? e.label || String(e.id) : null, g = q(o);
|
|
29
|
+
if (!e) return /* @__PURE__ */ u(b, { children: p });
|
|
30
|
+
const a = { collection: e.collection, itemId: String(e.id) };
|
|
31
|
+
return /* @__PURE__ */ f(
|
|
32
|
+
"p",
|
|
33
|
+
{
|
|
34
|
+
className: "flex w-full max-w-[52ch] justify-center gap-1 whitespace-nowrap text-[12px] text-slate-600 dark:text-slate-300",
|
|
35
|
+
"data-found-elsewhere": e.collection,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ f("span", { className: "shrink-0", children: [
|
|
38
|
+
e.collection === d ? "Hidden by this list's filters" : `Found in ${((s = e.display_name) == null ? void 0 : s.trim()) || N(e.collection)}`,
|
|
39
|
+
":",
|
|
40
|
+
" "
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ u(
|
|
43
|
+
"a",
|
|
44
|
+
{
|
|
45
|
+
ref: g,
|
|
46
|
+
href: y(a),
|
|
47
|
+
onClick: (t) => {
|
|
48
|
+
t.metaKey || t.ctrlKey || t.shiftKey || t.button !== 0 || (t.preventDefault(), x(a));
|
|
49
|
+
},
|
|
50
|
+
className: "min-w-0 truncate font-medium text-[#0284a8] underline-offset-2 hover:underline dark:text-nvr-cyan",
|
|
51
|
+
children: o
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
T as FoundElsewhere,
|
|
60
|
+
K as looksLikeIdentifier
|
|
61
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as a, jsx as r, Fragment as A } from "react/jsx-runtime";
|
|
2
|
-
import { AlertOctagon as O, AlertTriangle as W, ChevronRight as
|
|
2
|
+
import { AlertOctagon as O, AlertTriangle as W, ChevronRight as E, Loader2 as M, ChevronDown as G, ExternalLink as V } from "lucide-react";
|
|
3
3
|
import { useState as L, useMemo as X, useId as q, useRef as H } from "react";
|
|
4
4
|
import { useItemEditAuth as J } from "../../../context.js";
|
|
5
|
-
import { userErrorMessage as
|
|
5
|
+
import { userErrorMessage as I } from "../../../lib/safe-error.js";
|
|
6
6
|
import { cn as x, titleCase as Q } from "../../../lib/utils.js";
|
|
7
7
|
import { ExplainButton as Y } from "../../ai/ExplainButton.js";
|
|
8
8
|
import { useDrillWindows as Z, DrillTag as ee } from "../../chaos/DrillTag.js";
|
|
@@ -24,7 +24,7 @@ function De({
|
|
|
24
24
|
onExplain: p,
|
|
25
25
|
canExplain: l
|
|
26
26
|
}) {
|
|
27
|
-
const
|
|
27
|
+
const f = t.severity === "critical", v = f ? "negative" : "warning", S = f ? O : W, y = pe(t), z = Z(), $ = t.rows.reduce(
|
|
28
28
|
(N, D) => !N || D.first_seen > N ? D.first_seen : N,
|
|
29
29
|
null
|
|
30
30
|
), k = t.rows[0], [b, C] = L(!1), _ = `ic-signal-body-${t.id.replace(/[^a-z0-9]/gi, "-")}`;
|
|
@@ -51,7 +51,7 @@ function De({
|
|
|
51
51
|
"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-md",
|
|
52
52
|
de[v]
|
|
53
53
|
),
|
|
54
|
-
"data-tip":
|
|
54
|
+
"data-tip": f ? "Critical — something is failing now" : "Worth a look",
|
|
55
55
|
children: /* @__PURE__ */ r(S, { className: x("h-3.5 w-3.5", T[v]), "aria-hidden": !0 })
|
|
56
56
|
}
|
|
57
57
|
),
|
|
@@ -77,7 +77,7 @@ function De({
|
|
|
77
77
|
/* @__PURE__ */ r("span", { className: "mt-0.5 block truncate text-[12px] text-muted-foreground", children: t.error ? t.error : k ? `${k.title}${k.detail ? ` — ${K(k.detail)}` : ""}` : t.description })
|
|
78
78
|
] }),
|
|
79
79
|
/* @__PURE__ */ r(
|
|
80
|
-
|
|
80
|
+
E,
|
|
81
81
|
{
|
|
82
82
|
className: x(
|
|
83
83
|
"mt-1 h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200",
|
|
@@ -96,7 +96,7 @@ function De({
|
|
|
96
96
|
] }) : /* @__PURE__ */ a(A, { children: [
|
|
97
97
|
/* @__PURE__ */ r("p", { className: "max-w-[80ch] px-4 pb-1 pt-3 text-[12px] leading-relaxed text-muted-foreground", children: t.description }),
|
|
98
98
|
/* @__PURE__ */ r(
|
|
99
|
-
|
|
99
|
+
he,
|
|
100
100
|
{
|
|
101
101
|
signal: t,
|
|
102
102
|
rows: t.rows,
|
|
@@ -124,7 +124,7 @@ function De({
|
|
|
124
124
|
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
125
|
children: [
|
|
126
126
|
/* @__PURE__ */ r(
|
|
127
|
-
|
|
127
|
+
E,
|
|
128
128
|
{
|
|
129
129
|
className: x("h-3.5 w-3.5 transition-transform", b && "rotate-90")
|
|
130
130
|
}
|
|
@@ -142,14 +142,14 @@ function De({
|
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function he({
|
|
146
146
|
signal: t,
|
|
147
147
|
rows: e,
|
|
148
148
|
onOpenRecord: m,
|
|
149
149
|
onExplain: g,
|
|
150
150
|
canExplain: p
|
|
151
151
|
}) {
|
|
152
|
-
const l = te(),
|
|
152
|
+
const l = te(), f = ne(), [v, S] = L({}), [y, z] = L(/* @__PURE__ */ new Set()), [$, k] = L(/* @__PURE__ */ new Set()), b = X(() => {
|
|
153
153
|
if (!e.some((s) => s.group)) return null;
|
|
154
154
|
const o = /* @__PURE__ */ new Map();
|
|
155
155
|
for (const s of e) {
|
|
@@ -165,15 +165,15 @@ function fe({
|
|
|
165
165
|
const c = await l.mutateAsync({ signal: t.id, row_keys: i, action: o });
|
|
166
166
|
S((n) => {
|
|
167
167
|
const u = { ...n };
|
|
168
|
-
for (const
|
|
168
|
+
for (const h of c) u[h.key] = h;
|
|
169
169
|
return u;
|
|
170
170
|
}), k((n) => new Set([...n].filter((u) => !i.includes(u))));
|
|
171
171
|
} catch (c) {
|
|
172
|
-
const n = ((d = c == null ? void 0 : c.response) == null ? void 0 : d.error) ??
|
|
172
|
+
const n = ((d = c == null ? void 0 : c.response) == null ? void 0 : d.error) ?? I(c, "The action failed");
|
|
173
173
|
S((u) => {
|
|
174
|
-
const
|
|
175
|
-
for (const w of i)
|
|
176
|
-
return
|
|
174
|
+
const h = { ...u };
|
|
175
|
+
for (const w of i) h[w] = { key: w, ok: !1, message: n };
|
|
176
|
+
return h;
|
|
177
177
|
});
|
|
178
178
|
} finally {
|
|
179
179
|
z((c) => new Set([...c].filter((n) => !i.includes(n))));
|
|
@@ -183,12 +183,12 @@ function fe({
|
|
|
183
183
|
const s = o.map((d) => d.key);
|
|
184
184
|
z((d) => /* @__PURE__ */ new Set([...d, ...s]));
|
|
185
185
|
try {
|
|
186
|
-
await
|
|
186
|
+
await f.mutateAsync({ signal: t.id, row_keys: s }), k((d) => new Set([...d].filter((c) => !s.includes(c))));
|
|
187
187
|
} catch (d) {
|
|
188
|
-
const c = ((i = d == null ? void 0 : d.response) == null ? void 0 : i.error) ??
|
|
188
|
+
const c = ((i = d == null ? void 0 : d.response) == null ? void 0 : i.error) ?? I(d, "Could not dismiss");
|
|
189
189
|
S((n) => {
|
|
190
190
|
const u = { ...n };
|
|
191
|
-
for (const
|
|
191
|
+
for (const h of s) u[h] = { key: h, ok: !1, message: c };
|
|
192
192
|
return u;
|
|
193
193
|
});
|
|
194
194
|
} finally {
|
|
@@ -197,8 +197,8 @@ function fe({
|
|
|
197
197
|
}, N = (o, s) => {
|
|
198
198
|
var i, d, c, n;
|
|
199
199
|
if (o.kind === "open") {
|
|
200
|
-
const u = ((i = o.payload) == null ? void 0 : i.collection) ?? ((d = s.record) == null ? void 0 : d.collection),
|
|
201
|
-
u &&
|
|
200
|
+
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
|
+
u && h && (m == null || m(u, String(h)));
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
204
|
if (o.kind === "explain") {
|
|
@@ -207,7 +207,7 @@ function fe({
|
|
|
207
207
|
}
|
|
208
208
|
C(o, [s]);
|
|
209
209
|
}, D = (o, s) => /* @__PURE__ */ r(
|
|
210
|
-
|
|
210
|
+
fe,
|
|
211
211
|
{
|
|
212
212
|
signal: t,
|
|
213
213
|
row: o,
|
|
@@ -266,12 +266,12 @@ function fe({
|
|
|
266
266
|
const s = o.rows.filter((n) => $.has(n.key)), i = o.rows.length > 0 && s.length === o.rows.length, d = /* @__PURE__ */ new Map();
|
|
267
267
|
for (const n of s) {
|
|
268
268
|
const u = /* @__PURE__ */ new Set();
|
|
269
|
-
for (const
|
|
270
|
-
if (!ue.includes(
|
|
271
|
-
const w = me(
|
|
269
|
+
for (const h of n.actions) {
|
|
270
|
+
if (!ue.includes(h.kind)) continue;
|
|
271
|
+
const w = me(h);
|
|
272
272
|
if (u.has(w)) continue;
|
|
273
273
|
u.add(w);
|
|
274
|
-
const B = d.get(w) ?? { action:
|
|
274
|
+
const B = d.get(w) ?? { action: h, rows: [] };
|
|
275
275
|
B.rows.push(n), d.set(w, B);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -287,10 +287,10 @@ function fe({
|
|
|
287
287
|
n && (n.indeterminate = s.length > 0 && !i);
|
|
288
288
|
},
|
|
289
289
|
onChange: (n) => k((u) => {
|
|
290
|
-
const
|
|
290
|
+
const h = new Set(u);
|
|
291
291
|
for (const w of o.rows)
|
|
292
|
-
n.target.checked ?
|
|
293
|
-
return
|
|
292
|
+
n.target.checked ? h.add(w.key) : h.delete(w.key);
|
|
293
|
+
return h;
|
|
294
294
|
}),
|
|
295
295
|
"aria-label": `Select every problem in ${o.label}`,
|
|
296
296
|
"data-ic-group-select": o.key,
|
|
@@ -347,17 +347,17 @@ function fe({
|
|
|
347
347
|
] }, o.key);
|
|
348
348
|
}) });
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function P(t) {
|
|
351
351
|
return t.label ? t.label : `${Q(t.collection).replace(/s$/, "")} ${t.id}`;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function fe({
|
|
354
354
|
signal: t,
|
|
355
355
|
row: e,
|
|
356
356
|
result: m,
|
|
357
357
|
busy: g,
|
|
358
358
|
selectable: p,
|
|
359
359
|
selected: l,
|
|
360
|
-
onSelect:
|
|
360
|
+
onSelect: f,
|
|
361
361
|
onAction: v,
|
|
362
362
|
onOpenRecord: S,
|
|
363
363
|
canExplain: y
|
|
@@ -385,7 +385,7 @@ function he({
|
|
|
385
385
|
{
|
|
386
386
|
type: "checkbox",
|
|
387
387
|
checked: l,
|
|
388
|
-
onChange: (n) =>
|
|
388
|
+
onChange: (n) => f(n.target.checked),
|
|
389
389
|
"aria-label": `Select ${e.title}`,
|
|
390
390
|
"data-ic-select-row": e.key,
|
|
391
391
|
className: "mt-1 h-3.5 w-3.5 shrink-0 accent-[rgb(var(--nvr-cyan-rgb))]"
|
|
@@ -509,7 +509,7 @@ function he({
|
|
|
509
509
|
{
|
|
510
510
|
kind: "signal-row",
|
|
511
511
|
params: { signal: t.id, row_key: e.key },
|
|
512
|
-
label: "Explain this failure"
|
|
512
|
+
label: t.id.startsWith("core:unanswered-") ? "Explain this" : "Explain this failure"
|
|
513
513
|
}
|
|
514
514
|
) }),
|
|
515
515
|
b && D && e.drill && // Esc anywhere inside the open drill collapses it.
|
|
@@ -559,11 +559,11 @@ function R({
|
|
|
559
559
|
onClick: () => m(e.collection, e.id),
|
|
560
560
|
className: "inline-flex max-w-full items-center gap-1 truncate font-medium text-foreground underline decoration-border underline-offset-2 hover:decoration-foreground",
|
|
561
561
|
children: [
|
|
562
|
-
|
|
562
|
+
P(e),
|
|
563
563
|
/* @__PURE__ */ r(V, { className: "h-3 w-3 shrink-0 opacity-60", "aria-hidden": !0 })
|
|
564
564
|
]
|
|
565
565
|
}
|
|
566
|
-
) : /* @__PURE__ */ r("span", { className: "font-medium text-foreground", children:
|
|
566
|
+
) : /* @__PURE__ */ r("span", { className: "font-medium text-foreground", children: P(e) })
|
|
567
567
|
] })
|
|
568
568
|
] });
|
|
569
569
|
}
|
|
@@ -574,9 +574,9 @@ function be({ signal: t }) {
|
|
|
574
574
|
const l = m.get(p.snooze.id) ?? [];
|
|
575
575
|
l.push(p), m.set(p.snooze.id, l);
|
|
576
576
|
}
|
|
577
|
-
const g = (p) => new Set(p.map((
|
|
577
|
+
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 “${t.label}”`;
|
|
578
578
|
return /* @__PURE__ */ r("ul", { className: "divide-y divide-border border-t border-border bg-muted/30", children: t.snoozed.map((p) => {
|
|
579
|
-
const l = p.snooze,
|
|
579
|
+
const l = p.snooze, f = l ? m.get(l.id) ?? [] : [], v = 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, {
|
|
580
580
|
month: "short",
|
|
581
581
|
day: "numeric",
|
|
582
582
|
hour: "numeric",
|
|
@@ -587,7 +587,7 @@ function be({ signal: t }) {
|
|
|
587
587
|
/* @__PURE__ */ r("p", { className: "truncate text-[12.5px] text-foreground", children: p.title }),
|
|
588
588
|
/* @__PURE__ */ a("p", { className: "text-[11.5px] text-muted-foreground", children: [
|
|
589
589
|
v,
|
|
590
|
-
|
|
590
|
+
f.length > 1 ? ` with ${g(f)}` : "",
|
|
591
591
|
l != null && l.note ? ` — “${l.note}”` : ""
|
|
592
592
|
] })
|
|
593
593
|
] }),
|
|
@@ -596,12 +596,12 @@ function be({ signal: t }) {
|
|
|
596
596
|
{
|
|
597
597
|
type: "button",
|
|
598
598
|
"data-ic-unsnooze": l.id,
|
|
599
|
-
"data-ic-unsnooze-count":
|
|
600
|
-
"data-tip":
|
|
599
|
+
"data-ic-unsnooze-count": f.length,
|
|
600
|
+
"data-tip": f.length > 1 ? `This snooze covers ${f.length} problems (${g(f)}) — they all come back` : void 0,
|
|
601
601
|
disabled: e.isPending && e.variables === l.id,
|
|
602
602
|
onClick: () => e.mutate(l.id),
|
|
603
603
|
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",
|
|
604
|
-
children:
|
|
604
|
+
children: f.length > 1 ? `Unsnooze all ${f.length}` : l != null && l.until_occurrence ? "Undo" : "Unsnooze"
|
|
605
605
|
}
|
|
606
606
|
)
|
|
607
607
|
] }, p.key);
|