@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,141 +1,216 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { Lock as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { toast as
|
|
6
|
-
import { useNivaroClient as
|
|
7
|
-
import {
|
|
8
|
-
import { hasRecordExtras as
|
|
9
|
-
const
|
|
1
|
+
import { jsx as s, jsxs as n, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as v, useMutation as $ } from "@tanstack/react-query";
|
|
3
|
+
import { Lock as q, ArrowLeft as C, Check as A, Send as L } from "lucide-react";
|
|
4
|
+
import { useState as b } from "react";
|
|
5
|
+
import { toast as f } from "sonner";
|
|
6
|
+
import { useNivaroClient as g } from "../../context.js";
|
|
7
|
+
import { get as _, post as S } from "../../lib/commands.js";
|
|
8
|
+
import { hasRecordExtras as R } from "../../lib/system-collections.js";
|
|
9
|
+
const T = {
|
|
10
10
|
access: !1,
|
|
11
11
|
reasons: [{ type: "not_found", message: "There is no record with this id." }]
|
|
12
12
|
};
|
|
13
|
-
function
|
|
13
|
+
function j(t) {
|
|
14
14
|
var r;
|
|
15
|
-
const e =
|
|
15
|
+
const e = t;
|
|
16
16
|
return ((e == null ? void 0 : e.status) ?? ((r = e == null ? void 0 : e.response) == null ? void 0 : r.status)) === 404;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
const r =
|
|
18
|
+
function E(t, e) {
|
|
19
|
+
const a = e == null ? void 0 : e.trim();
|
|
20
|
+
if (a) return a.toLowerCase();
|
|
21
|
+
const r = t.replace(/_/g, " ").trim();
|
|
22
22
|
return /ies$/i.test(r) ? r.replace(/ies$/i, "y") : /[^su]s$/i.test(r) ? r.slice(0, -1) : r || "record";
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
function
|
|
26
|
-
|
|
24
|
+
const x = 300;
|
|
25
|
+
function k({
|
|
26
|
+
title: t,
|
|
27
|
+
subtitle: e,
|
|
28
|
+
children: a
|
|
29
|
+
}) {
|
|
30
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-1 items-start justify-center px-4 py-10 sm:px-6 sm:py-16", children: /* @__PURE__ */ n(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: "w-full max-w-[560px] rounded-xl border border-slate-200 bg-white p-5 sm:p-8 dark:border-border dark:bg-card",
|
|
34
|
+
"data-access-denied": !0,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
|
|
37
|
+
/* @__PURE__ */ s("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-slate-100 dark:bg-muted", children: /* @__PURE__ */ s(q, { className: "h-[18px] w-[18px] text-slate-500 dark:text-slate-400", "aria-hidden": !0 }) }),
|
|
38
|
+
/* @__PURE__ */ n("div", { className: "min-w-0 pt-0.5", children: [
|
|
39
|
+
/* @__PURE__ */ s("h2", { className: "text-[15px] font-semibold text-slate-800 dark:text-slate-100", children: t }),
|
|
40
|
+
/* @__PURE__ */ s("p", { className: "mt-0.5 text-[12.5px] leading-snug text-slate-600 dark:text-slate-400", children: e })
|
|
41
|
+
] })
|
|
42
|
+
] }),
|
|
43
|
+
a
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
) });
|
|
47
|
+
}
|
|
48
|
+
function y({
|
|
49
|
+
collection: t,
|
|
27
50
|
itemId: e,
|
|
28
|
-
noun:
|
|
29
|
-
|
|
51
|
+
noun: a,
|
|
52
|
+
placeholder: r,
|
|
53
|
+
onBack: l
|
|
30
54
|
}) {
|
|
31
|
-
const
|
|
32
|
-
mutationFn: () =>
|
|
33
|
-
|
|
34
|
-
collection:
|
|
35
|
-
item: String(e),
|
|
36
|
-
...
|
|
55
|
+
const m = g(), [i, h] = b(!1), [o, c] = b(""), d = $({
|
|
56
|
+
mutationFn: () => m.request(
|
|
57
|
+
S("/access-requests", {
|
|
58
|
+
collection: t,
|
|
59
|
+
...e ? { item: String(e) } : {},
|
|
60
|
+
...o.trim() ? { note: o.trim().slice(0, x) } : {}
|
|
37
61
|
})
|
|
38
62
|
),
|
|
39
63
|
onSuccess: () => {
|
|
40
|
-
|
|
64
|
+
h(!0), f.success("Access request sent — an administrator has been notified");
|
|
41
65
|
},
|
|
42
|
-
onError: () =>
|
|
43
|
-
}),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
T(`/access-explain/${s}/${encodeURIComponent(e)}`)
|
|
47
|
-
).then((a) => a.data ?? null).catch((a) => R(a) ? E : null),
|
|
48
|
-
// "Why can't I see this" is refused for system tables by name: the plain message stands.
|
|
49
|
-
enabled: _(s),
|
|
50
|
-
staleTime: 3e4
|
|
51
|
-
}), p = (m == null ? void 0 : m.reasons) ?? [], l = p.some((a) => a.type === "not_found");
|
|
52
|
-
return /* @__PURE__ */ t("div", { className: "flex flex-1 items-start justify-center px-6 py-16", children: /* @__PURE__ */ n("div", { className: "w-full max-w-[560px] rounded-xl border border-slate-200 bg-white p-8 dark:border-border dark:bg-card", children: [
|
|
53
|
-
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
54
|
-
/* @__PURE__ */ t("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-slate-100 dark:bg-muted", children: /* @__PURE__ */ t($, { className: "h-[18px] w-[18px] text-slate-500 dark:text-slate-400" }) }),
|
|
55
|
-
/* @__PURE__ */ n("div", { children: [
|
|
56
|
-
/* @__PURE__ */ t("h2", { className: "text-[15px] font-semibold text-slate-800 dark:text-slate-100", children: l ? `${d.charAt(0).toUpperCase()}${d.slice(1)} not found` : `You can't view this ${d}` }),
|
|
57
|
-
/* @__PURE__ */ t("p", { className: "text-[12px] text-slate-500 dark:text-slate-400", children: l ? "The link may be wrong, or it was removed." : "It is outside what your access lets you see." })
|
|
58
|
-
] })
|
|
59
|
-
] }),
|
|
60
|
-
/* @__PURE__ */ t("div", { className: "mt-5 space-y-2.5", children: x ? /* @__PURE__ */ n(h, { children: [
|
|
61
|
-
/* @__PURE__ */ t("div", { className: "animate-pulse h-4 w-3/4 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
62
|
-
/* @__PURE__ */ t("div", { className: "animate-pulse h-4 w-1/2 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" })
|
|
63
|
-
] }) : l ? null : p.length > 0 ? (
|
|
64
|
-
// A missing record is said once, in the heading (army11 f3: the
|
|
65
|
-
// page gave two different reasons for the same thing).
|
|
66
|
-
p.map((a, v) => /* @__PURE__ */ t(
|
|
67
|
-
"div",
|
|
68
|
-
{
|
|
69
|
-
className: "rounded-lg border border-slate-200 bg-slate-50 px-3.5 py-2.5 text-[13px] leading-relaxed text-slate-700 dark:border-border dark:bg-muted/40 dark:text-slate-300",
|
|
70
|
-
children: a.message
|
|
71
|
-
},
|
|
72
|
-
`${a.type}-${a.dimension ?? v}`
|
|
73
|
-
))
|
|
74
|
-
) : /* @__PURE__ */ t("div", { className: "rounded-lg border border-slate-200 bg-slate-50 px-3.5 py-2.5 text-[13px] leading-relaxed text-slate-700 dark:border-border dark:bg-muted/40 dark:text-slate-300", children: "This record could not be loaded. It may have been deleted, or an access rule may be hiding it." }) }),
|
|
75
|
-
!l && !x && !i && /* @__PURE__ */ n("div", { className: "mt-4", children: [
|
|
66
|
+
onError: () => f.error("Could not send the request")
|
|
67
|
+
}), u = `access-note-${t}-${e ?? "list"}`;
|
|
68
|
+
return /* @__PURE__ */ n(p, { children: [
|
|
69
|
+
!i && /* @__PURE__ */ n("div", { className: "mt-5", children: [
|
|
76
70
|
/* @__PURE__ */ n(
|
|
77
71
|
"label",
|
|
78
72
|
{
|
|
79
|
-
htmlFor:
|
|
73
|
+
htmlFor: u,
|
|
80
74
|
className: "block text-[12px] font-medium text-slate-700 dark:text-slate-300",
|
|
81
75
|
children: [
|
|
82
|
-
"Need it? Say what for
|
|
83
|
-
|
|
76
|
+
"Need it? Say what for",
|
|
77
|
+
" ",
|
|
78
|
+
/* @__PURE__ */ s("span", { className: "font-normal text-slate-500 dark:text-slate-400", children: "(optional)" })
|
|
84
79
|
]
|
|
85
80
|
}
|
|
86
81
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ s(
|
|
88
83
|
"textarea",
|
|
89
84
|
{
|
|
90
|
-
id:
|
|
91
|
-
value:
|
|
92
|
-
onChange: (
|
|
85
|
+
id: u,
|
|
86
|
+
value: o,
|
|
87
|
+
onChange: (w) => c(w.target.value.slice(0, x)),
|
|
93
88
|
rows: 2,
|
|
94
|
-
maxLength:
|
|
95
|
-
placeholder:
|
|
96
|
-
className: "mt-1.5 w-full resize-y rounded-md border border-slate-200 bg-white px-2.5 py-1.5 text-[13px] text-slate-800 placeholder:text-slate-
|
|
89
|
+
maxLength: x,
|
|
90
|
+
placeholder: r,
|
|
91
|
+
className: "mt-1.5 w-full resize-y rounded-md border border-slate-200 bg-white px-2.5 py-1.5 text-[13px] text-slate-800 placeholder:text-slate-500 focus:border-nvr-cyan focus:outline-none focus:ring-2 focus:ring-nvr-cyan/30 dark:border-border dark:bg-background dark:text-slate-100 dark:placeholder:text-slate-500",
|
|
97
92
|
"data-request-access-note": !0
|
|
98
93
|
}
|
|
99
94
|
),
|
|
100
95
|
/* @__PURE__ */ n("p", { className: "mt-1 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
|
|
101
96
|
"Every administrator gets your request with this ",
|
|
102
|
-
|
|
97
|
+
a,
|
|
103
98
|
" and your note."
|
|
104
99
|
] })
|
|
105
100
|
] }),
|
|
106
|
-
|
|
107
|
-
|
|
101
|
+
/* @__PURE__ */ n("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
|
|
102
|
+
/* @__PURE__ */ s(
|
|
103
|
+
"button",
|
|
104
|
+
{
|
|
105
|
+
type: "button",
|
|
106
|
+
disabled: i || d.isPending,
|
|
107
|
+
onClick: () => d.mutate(),
|
|
108
|
+
className: "inline-flex h-8 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[12.5px] font-medium text-white hover:brightness-110 disabled:opacity-60",
|
|
109
|
+
"data-request-access": !0,
|
|
110
|
+
children: i ? /* @__PURE__ */ n(p, { children: [
|
|
111
|
+
/* @__PURE__ */ s(A, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
112
|
+
" Request sent"
|
|
113
|
+
] }) : /* @__PURE__ */ n(p, { children: [
|
|
114
|
+
/* @__PURE__ */ s(L, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
115
|
+
d.isPending ? "Sending…" : "Request access"
|
|
116
|
+
] })
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
l && /* @__PURE__ */ s(N, { onBack: l })
|
|
120
|
+
] })
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
123
|
+
function N({ onBack: t }) {
|
|
124
|
+
return /* @__PURE__ */ n(
|
|
125
|
+
"button",
|
|
126
|
+
{
|
|
127
|
+
type: "button",
|
|
128
|
+
onClick: t,
|
|
129
|
+
className: "inline-flex h-8 items-center gap-1.5 rounded-md border border-slate-200 px-3 text-[12.5px] font-medium text-slate-700 hover:bg-slate-50 dark:border-border dark:text-slate-300 dark:hover:bg-white/[0.04]",
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ s(C, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
132
|
+
"Go back"
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
function F(t, e) {
|
|
138
|
+
const a = `${t.charAt(0).toUpperCase()}${t.slice(1)}`;
|
|
139
|
+
return e != null && e.some((r) => r.type === "not_found") ? {
|
|
140
|
+
kind: "not_found",
|
|
141
|
+
title: `${a} not found`,
|
|
142
|
+
subtitle: "The link may be wrong, or it was removed."
|
|
143
|
+
} : e && e.length > 0 ? {
|
|
144
|
+
kind: "denied",
|
|
145
|
+
title: `You can't view this ${t}`,
|
|
146
|
+
subtitle: "It is outside what your access lets you see."
|
|
147
|
+
} : {
|
|
148
|
+
kind: "unknown",
|
|
149
|
+
title: `This ${t} could not be opened`,
|
|
150
|
+
subtitle: "It may have been deleted, or your access may not reach it."
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function z({
|
|
154
|
+
collection: t,
|
|
155
|
+
itemId: e,
|
|
156
|
+
noun: a,
|
|
157
|
+
onBack: r
|
|
158
|
+
}) {
|
|
159
|
+
const l = E(t, a), m = g(), { data: i, isLoading: h } = v({
|
|
160
|
+
queryKey: ["access-explain", t, String(e)],
|
|
161
|
+
queryFn: () => m.request(
|
|
162
|
+
_(`/access-explain/${t}/${encodeURIComponent(e)}`)
|
|
163
|
+
).then((d) => d.data ?? null).catch((d) => j(d) ? T : null),
|
|
164
|
+
// "Why can't I see this" is refused for system tables by name: the plain message stands.
|
|
165
|
+
enabled: R(t),
|
|
166
|
+
staleTime: 3e4
|
|
167
|
+
});
|
|
168
|
+
if (h)
|
|
169
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-1 items-start justify-center px-4 py-10 sm:px-6 sm:py-16", children: /* @__PURE__ */ n("div", { className: "w-full max-w-[560px] space-y-2.5 rounded-xl border border-slate-200 bg-white p-5 sm:p-8 dark:border-border dark:bg-card", children: [
|
|
170
|
+
/* @__PURE__ */ s("div", { className: "h-4 w-1/2 animate-pulse rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
171
|
+
/* @__PURE__ */ s("div", { className: "h-4 w-3/4 animate-pulse rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" })
|
|
172
|
+
] }) });
|
|
173
|
+
const o = (i == null ? void 0 : i.reasons) ?? null, c = F(l, o);
|
|
174
|
+
return /* @__PURE__ */ n(k, { title: c.title, subtitle: c.subtitle, children: [
|
|
175
|
+
c.kind === "denied" && o && /* @__PURE__ */ s("div", { className: "mt-5 space-y-2", children: o.map((d, u) => /* @__PURE__ */ s(
|
|
176
|
+
"div",
|
|
108
177
|
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
" Request sent"
|
|
117
|
-
] }) : /* @__PURE__ */ n(h, { children: [
|
|
118
|
-
/* @__PURE__ */ t(A, { className: "h-3.5 w-3.5" }),
|
|
119
|
-
u.isPending ? "Sending…" : "Request access"
|
|
120
|
-
] })
|
|
121
|
-
}
|
|
122
|
-
),
|
|
123
|
-
r && /* @__PURE__ */ n(
|
|
124
|
-
"button",
|
|
178
|
+
className: "rounded-lg border border-slate-200 bg-slate-50 px-3.5 py-2.5 text-[13px] leading-relaxed text-slate-700 dark:border-border dark:bg-muted/40 dark:text-slate-300",
|
|
179
|
+
children: d.message
|
|
180
|
+
},
|
|
181
|
+
`${d.type}-${d.dimension ?? u}`
|
|
182
|
+
)) }),
|
|
183
|
+
c.kind === "not_found" ? r && /* @__PURE__ */ s("div", { className: "mt-5", children: /* @__PURE__ */ s(N, { onBack: r }) }) : /* @__PURE__ */ s(
|
|
184
|
+
y,
|
|
125
185
|
{
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"Go back"
|
|
132
|
-
]
|
|
186
|
+
collection: t,
|
|
187
|
+
itemId: e,
|
|
188
|
+
noun: l,
|
|
189
|
+
placeholder: `e.g. I approve this ${l} for my team`,
|
|
190
|
+
onBack: r
|
|
133
191
|
}
|
|
134
192
|
)
|
|
135
|
-
] })
|
|
193
|
+
] });
|
|
194
|
+
}
|
|
195
|
+
function G({
|
|
196
|
+
collection: t,
|
|
197
|
+
label: e,
|
|
198
|
+
onBack: a
|
|
199
|
+
}) {
|
|
200
|
+
return /* @__PURE__ */ s(k, { title: `You can't see ${e}`, subtitle: "Your access does not include this list.", children: /* @__PURE__ */ s(
|
|
201
|
+
y,
|
|
202
|
+
{
|
|
203
|
+
collection: t,
|
|
204
|
+
noun: "list",
|
|
205
|
+
placeholder: `e.g. I review ${e.toLowerCase()} for my team`,
|
|
206
|
+
onBack: a
|
|
207
|
+
}
|
|
208
|
+
) });
|
|
136
209
|
}
|
|
137
210
|
export {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
211
|
+
z as AccessDeniedPanel,
|
|
212
|
+
G as ListAccessDenied,
|
|
213
|
+
F as deniedWording,
|
|
214
|
+
j as explainMissing,
|
|
215
|
+
E as recordNoun
|
|
141
216
|
};
|
|
@@ -1,132 +1,142 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { Gauge as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { get as
|
|
7
|
-
import { toastError as
|
|
8
|
-
import { useLiveCollection as
|
|
9
|
-
import { formatRelative as
|
|
10
|
-
import { liveMotionAllowed as
|
|
11
|
-
const
|
|
12
|
-
function
|
|
13
|
-
const n = (t ?? "").trim(),
|
|
14
|
-
return !n || n === "count" ?
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as L, useQuery as A, useMutation as E } from "@tanstack/react-query";
|
|
3
|
+
import { Gauge as F, X as M } from "lucide-react";
|
|
4
|
+
import { useState as Q, useMemo as R, useRef as N, Fragment as S } from "react";
|
|
5
|
+
import { useNivaroClient as D } from "../../context.js";
|
|
6
|
+
import { get as K, post as T } from "../../lib/commands.js";
|
|
7
|
+
import { toastError as U } from "../../lib/error-toast.js";
|
|
8
|
+
import { useLiveCollection as j, batchTouches as B, LIVE_ASPECTS as G } from "../../lib/live.js";
|
|
9
|
+
import { formatRelative as H } from "../../lib/utils.js";
|
|
10
|
+
import { liveMotionAllowed as P } from "../../lib/live-preference.js";
|
|
11
|
+
const V = (r, t) => ["alert-banners", r, t ?? "*"];
|
|
12
|
+
function W(r, t) {
|
|
13
|
+
const n = (t ?? "").trim(), o = Number.isInteger(r) ? r.toLocaleString() : r.toLocaleString(void 0, { maximumFractionDigits: 2 });
|
|
14
|
+
return !n || n === "count" ? o : n === "%" || n === "percent" ? `${o}%` : n === "$" || n === "USD" || n === "dollar" ? `$${o}` : `${o} ${n}`;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function X(r, t) {
|
|
17
|
+
const n = (d) => d.replace(/[^0-9.]/g, "").replace(/\.$/, ""), o = n(String(t));
|
|
18
|
+
return o ? (r.match(/[0-9][0-9,.]*/g) ?? []).some((d) => n(d) === o) : !1;
|
|
19
|
+
}
|
|
20
|
+
function z(r) {
|
|
21
|
+
const t = [];
|
|
22
|
+
return r.value != null && t.push({ key: "now", node: `now ${W(r.value, r.unit)}` }), r.name && !X(r.name, r.threshold) && t.push({ key: "name", node: r.name }), t.push({
|
|
23
|
+
key: "at",
|
|
24
|
+
node: /* @__PURE__ */ a("time", { dateTime: r.triggered_at, title: new Date(r.triggered_at).toLocaleString(), children: H(r.triggered_at) })
|
|
25
|
+
}), t;
|
|
26
|
+
}
|
|
27
|
+
function J(r) {
|
|
28
|
+
return r.length < 2 ? [r] : [...r.slice(0, -2).map((t) => [t]), r.slice(-2)];
|
|
29
|
+
}
|
|
30
|
+
function ie({
|
|
17
31
|
collection: r,
|
|
18
32
|
itemId: t,
|
|
19
33
|
max: n = 3,
|
|
20
|
-
onOpenRecord:
|
|
21
|
-
className:
|
|
34
|
+
onOpenRecord: o,
|
|
35
|
+
className: d
|
|
22
36
|
}) {
|
|
23
|
-
const
|
|
24
|
-
queryKey:
|
|
25
|
-
queryFn: () =>
|
|
26
|
-
|
|
37
|
+
const v = D(), h = L(), m = V(r, t), [f, C] = Q(!1), { data: p } = A({
|
|
38
|
+
queryKey: m,
|
|
39
|
+
queryFn: () => v.request(
|
|
40
|
+
K(
|
|
27
41
|
`/alerts/banners?collection=${encodeURIComponent(r)}${t ? `&item=${encodeURIComponent(t)}` : ""}`
|
|
28
42
|
)
|
|
29
43
|
).then((e) => {
|
|
30
|
-
const
|
|
31
|
-
return Array.isArray(
|
|
44
|
+
const i = (e == null ? void 0 : e.data) ?? e;
|
|
45
|
+
return Array.isArray(i) ? i : [];
|
|
32
46
|
}).catch(() => []),
|
|
33
47
|
staleTime: 3e4,
|
|
34
48
|
enabled: !!r && t !== "new"
|
|
35
|
-
}),
|
|
36
|
-
|
|
49
|
+
}), x = R(() => [...new Set((p ?? []).map((e) => e.field))], [p]), k = N(x);
|
|
50
|
+
k.current = x, j(
|
|
37
51
|
r,
|
|
38
52
|
(e) => {
|
|
39
|
-
const
|
|
40
|
-
|
|
53
|
+
const i = t ? t.toLowerCase() : null;
|
|
54
|
+
i && !e.ids.some((l) => l.toLowerCase() === i || l === "*") || (e.changedFields === null || B(e, G.alerts, ...k.current)) && h.invalidateQueries({ queryKey: m });
|
|
41
55
|
},
|
|
42
56
|
{ debounceMs: 1e3, includeOwn: !0, enabled: !!r && t !== "new" }
|
|
43
57
|
);
|
|
44
|
-
const
|
|
45
|
-
mutationFn: (e) =>
|
|
58
|
+
const b = N(null), _ = E({
|
|
59
|
+
mutationFn: (e) => v.request(T(`/alerts/banners/${e}/dismiss`, {})),
|
|
46
60
|
onMutate: (e) => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
(
|
|
61
|
+
h.setQueryData(
|
|
62
|
+
m,
|
|
63
|
+
(i) => (i ?? []).filter((l) => l.log_id !== e)
|
|
50
64
|
);
|
|
51
65
|
},
|
|
52
66
|
onError: (e) => {
|
|
53
|
-
|
|
67
|
+
U(e, "Could not hide that banner"), h.invalidateQueries({ queryKey: m });
|
|
54
68
|
}
|
|
55
|
-
}),
|
|
56
|
-
if (
|
|
57
|
-
for (const e of
|
|
58
|
-
if (
|
|
59
|
-
const
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
|
|
69
|
+
}), s = p ?? [], w = /* @__PURE__ */ new Set();
|
|
70
|
+
if (b.current)
|
|
71
|
+
for (const e of s) b.current.has(e.log_id) || w.add(e.log_id);
|
|
72
|
+
if (b.current = new Set(s.map((e) => e.log_id)), s.length === 0) return null;
|
|
73
|
+
const y = t || f ? s : s.slice(0, n), g = s.length - y.length, q = P();
|
|
74
|
+
return /* @__PURE__ */ c("div", { "data-alert-banners": !0, className: `flex flex-col gap-1.5 ${d ?? ""}`, children: [
|
|
75
|
+
y.map((e) => /* @__PURE__ */ c(
|
|
62
76
|
"div",
|
|
63
77
|
{
|
|
64
78
|
"data-alert-banner": e.log_id,
|
|
65
79
|
role: "status",
|
|
66
|
-
className: `${
|
|
80
|
+
className: `${w.has(e.log_id) && q ? "nvr-expand-in " : ""}flex items-start gap-2.5 rounded-md border border-amber-200 bg-amber-50 py-1.5 pl-3 pr-1.5 dark:border-amber-400/25 dark:bg-amber-400/[0.08]`,
|
|
67
81
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
82
|
+
/* @__PURE__ */ a(
|
|
83
|
+
F,
|
|
70
84
|
{
|
|
71
85
|
"aria-hidden": !0,
|
|
72
|
-
className: "h-4 w-4 shrink-0 text-amber-
|
|
86
|
+
className: "mt-[3px] h-4 w-4 shrink-0 text-amber-700 dark:text-amber-300",
|
|
73
87
|
strokeWidth: 2
|
|
74
88
|
}
|
|
75
89
|
),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
!t &&
|
|
90
|
+
/* @__PURE__ */ c("p", { className: "min-w-0 flex-1 py-[3px] text-[12.5px] leading-snug text-amber-950 [overflow-wrap:anywhere] dark:text-amber-100", children: [
|
|
91
|
+
!t && o ? /* @__PURE__ */ a(
|
|
78
92
|
"button",
|
|
79
93
|
{
|
|
80
94
|
type: "button",
|
|
81
|
-
onClick: () =>
|
|
95
|
+
onClick: () => o(e.collection, e.item),
|
|
82
96
|
className: "font-semibold underline decoration-amber-700/30 underline-offset-2 hover:decoration-amber-700 dark:decoration-amber-200/30 dark:hover:decoration-amber-200",
|
|
83
97
|
children: e.record
|
|
84
98
|
}
|
|
85
|
-
) : /* @__PURE__ */
|
|
99
|
+
) : /* @__PURE__ */ a("span", { className: "font-semibold", children: e.record }),
|
|
86
100
|
" ",
|
|
87
101
|
e.phrase,
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
" ·",
|
|
96
|
-
" ",
|
|
97
|
-
/* @__PURE__ */ l("time", { dateTime: e.triggered_at, title: new Date(e.triggered_at).toLocaleString(), children: B(e.triggered_at) })
|
|
98
|
-
] })
|
|
102
|
+
/* @__PURE__ */ a("span", { className: "block text-amber-800 sm:inline dark:text-amber-200/80", children: J(z(e)).map((i, l) => /* @__PURE__ */ c(S, { children: [
|
|
103
|
+
/* @__PURE__ */ a("span", { className: l === 0 ? "hidden sm:inline" : "", children: " " }),
|
|
104
|
+
/* @__PURE__ */ a("span", { className: "whitespace-nowrap", children: i.map((u, $) => /* @__PURE__ */ c(S, { children: [
|
|
105
|
+
/* @__PURE__ */ a("span", { className: l === 0 && $ === 0 ? "hidden sm:inline" : "", children: $ === 0 ? "· " : " · " }),
|
|
106
|
+
u.node
|
|
107
|
+
] }, u.key)) })
|
|
108
|
+
] }, i.map((u) => u.key).join("+"))) })
|
|
99
109
|
] }),
|
|
100
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ a(
|
|
101
111
|
"button",
|
|
102
112
|
{
|
|
103
113
|
type: "button",
|
|
104
114
|
"aria-label": `Hide this banner for me: ${e.record} ${e.phrase}`,
|
|
105
115
|
"data-tip": "Hide for me",
|
|
106
|
-
onClick: () =>
|
|
107
|
-
className: "shrink-0 rounded p-1 text-amber-700/
|
|
108
|
-
children: /* @__PURE__ */
|
|
116
|
+
onClick: () => _.mutate(e.log_id),
|
|
117
|
+
className: "shrink-0 rounded p-1 text-amber-700/80 hover:bg-amber-100 hover:text-amber-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-amber-500 dark:text-amber-200/60 dark:hover:bg-amber-400/15 dark:hover:text-amber-100",
|
|
118
|
+
children: /* @__PURE__ */ a(M, { className: "h-3.5 w-3.5" })
|
|
109
119
|
}
|
|
110
120
|
)
|
|
111
121
|
]
|
|
112
122
|
},
|
|
113
123
|
e.log_id
|
|
114
124
|
)),
|
|
115
|
-
|
|
125
|
+
(g > 0 || f && !t && s.length > n) && /* @__PURE__ */ a(
|
|
116
126
|
"button",
|
|
117
127
|
{
|
|
118
128
|
type: "button",
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
" more"
|
|
124
|
-
]
|
|
129
|
+
"aria-expanded": f,
|
|
130
|
+
onClick: () => C((e) => !e),
|
|
131
|
+
className: "self-start rounded-md px-2 py-0.5 text-[12px] font-medium text-amber-800 underline decoration-amber-700/30 underline-offset-2 hover:bg-amber-100 hover:decoration-amber-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-amber-500 dark:text-amber-200 dark:decoration-amber-200/30 dark:hover:bg-amber-400/15 dark:hover:decoration-amber-200",
|
|
132
|
+
children: g > 0 ? `Show ${g} more` : "Show fewer"
|
|
125
133
|
}
|
|
126
134
|
)
|
|
127
135
|
] });
|
|
128
136
|
}
|
|
129
137
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
138
|
+
ie as AlertBanners,
|
|
139
|
+
V as alertBannersKey,
|
|
140
|
+
J as detailGroups,
|
|
141
|
+
X as nameRestatesPhrase
|
|
132
142
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { GitBranch as k, Check as
|
|
3
|
-
import { namesList as
|
|
4
|
-
import { useLiveFade as
|
|
5
|
-
import {
|
|
2
|
+
import { GitBranch as k, Check as C, GitMerge as T } from "lucide-react";
|
|
3
|
+
import { namesList as D } from "../../lib/approval-progress.js";
|
|
4
|
+
import { useLiveFade as L } from "../../lib/live-screen.js";
|
|
5
|
+
import { atWhen as W } from "../../lib/send-status.js";
|
|
6
6
|
import { serverNow as F } from "../../lib/server-clock.js";
|
|
7
7
|
import { formatRelative as $, formatDateTime as M, humanHours as S } from "../../lib/utils.js";
|
|
8
|
-
import { OwnerAvatars as
|
|
8
|
+
import { OwnerAvatars as B } from "../queue/OwnerAvatars.js";
|
|
9
9
|
function y(e, l) {
|
|
10
10
|
if (!e) return null;
|
|
11
11
|
const s = (l ? new Date(l).getTime() : F()) - new Date(e).getTime();
|
|
@@ -33,17 +33,17 @@ function _({
|
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
function j(e, l = Date.now()) {
|
|
36
|
-
var p,
|
|
36
|
+
var p, h, t;
|
|
37
37
|
if (!e.terminal) {
|
|
38
|
-
const o = (e.owners ?? []).map((
|
|
39
|
-
return o.length > 0 ? `Waiting on ${
|
|
38
|
+
const o = (e.owners ?? []).map((x) => x.name);
|
|
39
|
+
return o.length > 0 ? `Waiting on ${D(o)}` : null;
|
|
40
40
|
}
|
|
41
|
-
const a = e.steps[e.steps.length - 1], s = e.finished_at ?? (a == null ? void 0 : a.entered_at) ?? null, i = ((
|
|
42
|
-
return `${i}${d ? ` by ${d}` : ""}${m ? `
|
|
41
|
+
const a = e.steps[e.steps.length - 1], s = e.finished_at ?? (a == null ? void 0 : a.entered_at) ?? null, i = ((h = (p = e.current) == null ? void 0 : p.label) == null ? void 0 : h.trim()) || "Finished", d = (t = a == null ? void 0 : a.by) == null ? void 0 : t.trim(), m = s ? W(s, l) : "";
|
|
42
|
+
return `${i}${d ? ` by ${d}` : ""}${m ? ` ${m}` : ""}`;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
var d, m, p,
|
|
46
|
-
const l =
|
|
44
|
+
function z({ data: e }) {
|
|
45
|
+
var d, m, p, h;
|
|
46
|
+
const l = L(
|
|
47
47
|
e.lanes.map((t) => {
|
|
48
48
|
var o;
|
|
49
49
|
return `${t.instance_id}:${((o = t.current) == null ? void 0 : o.id) ?? ""}:${t.terminal}`;
|
|
@@ -85,7 +85,7 @@ function q({ data: e }) {
|
|
|
85
85
|
] }),
|
|
86
86
|
/* @__PURE__ */ r("ol", { className: "min-w-0 flex-1 space-y-1.5 border-x-2 border-dashed border-slate-200 px-2 dark:border-border", children: e.lanes.map((t) => {
|
|
87
87
|
var u, b, f, g;
|
|
88
|
-
const o = ((u = t.current) == null ? void 0 : u.color) ?? "#94a3b8",
|
|
88
|
+
const o = ((u = t.current) == null ? void 0 : u.color) ?? "#94a3b8", x = t.terminal ? y(((b = t.steps[0]) == null ? void 0 : b.entered_at) ?? e.split_at, t.finished_at) : y(t.entered_at);
|
|
89
89
|
return /* @__PURE__ */ n(
|
|
90
90
|
"li",
|
|
91
91
|
{
|
|
@@ -94,8 +94,8 @@ function q({ data: e }) {
|
|
|
94
94
|
"data-branch-lane-state": t.terminal ? "done" : "open",
|
|
95
95
|
children: [
|
|
96
96
|
/* @__PURE__ */ r("span", { className: "w-28 shrink-0 truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: t.label }),
|
|
97
|
-
/* @__PURE__ */ r("span", { className: "flex min-w-0 items-center gap-1", children: t.steps.map((c, w) => {
|
|
98
|
-
const N = w ===
|
|
97
|
+
/* @__PURE__ */ r("span", { className: "flex min-w-0 items-center gap-1", children: (t.terminal ? t.steps.slice(-1) : t.steps).map((c, w, v) => {
|
|
98
|
+
const N = w === v.length - 1;
|
|
99
99
|
return /* @__PURE__ */ n(
|
|
100
100
|
"span",
|
|
101
101
|
{
|
|
@@ -111,7 +111,7 @@ function q({ data: e }) {
|
|
|
111
111
|
border: `1.5px solid ${c.state.color ?? "#94a3b8"}`
|
|
112
112
|
},
|
|
113
113
|
"data-tip": `${c.state.label} · entered ${M(c.entered_at)}${c.by ? ` by ${c.by}` : ""}`,
|
|
114
|
-
children: (!N || t.terminal) && /* @__PURE__ */ r(
|
|
114
|
+
children: (!N || t.terminal) && /* @__PURE__ */ r(C, { className: "h-2.5 w-2.5 text-white", strokeWidth: 3 })
|
|
115
115
|
}
|
|
116
116
|
)
|
|
117
117
|
]
|
|
@@ -136,8 +136,8 @@ function q({ data: e }) {
|
|
|
136
136
|
children: j(t)
|
|
137
137
|
}
|
|
138
138
|
),
|
|
139
|
-
|
|
140
|
-
!t.terminal && (((g = t.owners) == null ? void 0 : g.length) ?? 0) !== 1 && /* @__PURE__ */ r("span", { className: "ml-auto", children: /* @__PURE__ */ r(
|
|
139
|
+
x && /* @__PURE__ */ r("span", { className: "text-[11px] tabular-nums text-slate-500 dark:text-slate-400", children: t.terminal ? `done in ${x}` : `${x} in this state` }),
|
|
140
|
+
!t.terminal && (((g = t.owners) == null ? void 0 : g.length) ?? 0) !== 1 && /* @__PURE__ */ r("span", { className: "ml-auto", children: /* @__PURE__ */ r(B, { owners: t.owners ?? [], max: 3, emptyLabel: "No owners" }) })
|
|
141
141
|
]
|
|
142
142
|
},
|
|
143
143
|
t.instance_id
|
|
@@ -149,8 +149,8 @@ function q({ data: e }) {
|
|
|
149
149
|
className: "flex w-24 shrink-0 flex-col items-center justify-center gap-1 text-center",
|
|
150
150
|
"data-branch-join": !0,
|
|
151
151
|
children: [
|
|
152
|
-
/* @__PURE__ */ r(_, { color: s, filled: !e.open, ring: !e.open, children: /* @__PURE__ */ r(
|
|
153
|
-
/* @__PURE__ */ r("span", { className: "text-[10.5px] leading-tight text-slate-600 dark:text-slate-300", children: ((
|
|
152
|
+
/* @__PURE__ */ r(_, { color: s, filled: !e.open, ring: !e.open, children: /* @__PURE__ */ r(T, { className: `h-3 w-3 ${e.open ? "text-slate-400" : "text-white"}` }) }),
|
|
153
|
+
/* @__PURE__ */ r("span", { className: "text-[10.5px] leading-tight text-slate-600 dark:text-slate-300", children: ((h = e.join_state) == null ? void 0 : h.label) ?? "Join" }),
|
|
154
154
|
e.open && i.length > 0 && /* @__PURE__ */ n("span", { className: "text-[10px] leading-tight text-amber-700 dark:text-amber-300", children: [
|
|
155
155
|
"still open: ",
|
|
156
156
|
i.map((t) => t.label).join(", ")
|
|
@@ -164,6 +164,6 @@ function q({ data: e }) {
|
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
166
|
export {
|
|
167
|
-
|
|
167
|
+
z as BranchLanes,
|
|
168
168
|
j as laneProgressText
|
|
169
169
|
};
|