@burdenoff/microfe-subscriberbot 2026.1107.8 → 2026.1110.1
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/node_modules/clsx/dist/clsx.js +8 -7
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +134 -151
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/subscriberbot/SubscriberBotRoot.js +10 -7
- package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
- package/dist/subscriberbot/SubscriberBotRoutes.js +1 -2
- package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
- package/dist/subscriberbot/admin/AdminDashboardPage.js +9 -10
- package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
- package/dist/subscriberbot/admin/AdminRoot.js +2 -3
- package/dist/subscriberbot/admin/AdminRoot.js.map +1 -1
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js +56 -57
- package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js +107 -108
- package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
- package/dist/subscriberbot/admin/index.js +1 -1
- package/dist/subscriberbot/components/EmptyState.js +1 -2
- package/dist/subscriberbot/components/EmptyState.js.map +1 -1
- package/dist/subscriberbot/components/MetricsCard.js +1 -2
- package/dist/subscriberbot/components/MetricsCard.js.map +1 -1
- package/dist/subscriberbot/components/Modal.js +2 -3
- package/dist/subscriberbot/components/Modal.js.map +1 -1
- package/dist/subscriberbot/components/PageLayout.js +1 -2
- package/dist/subscriberbot/components/PageLayout.js.map +1 -1
- package/dist/subscriberbot/components/PostureOptions.js +7 -8
- package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
- package/dist/subscriberbot/components/StateViews.js +1 -2
- package/dist/subscriberbot/components/StateViews.js.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.js +2 -3
- package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionBanners.js +7 -8
- package/dist/subscriberbot/components/decisions/DecisionBanners.js.map +1 -1
- package/dist/subscriberbot/components/decisions/DecisionCard.js +65 -66
- package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
- package/dist/subscriberbot/components/decisions/decisionModel.js +2 -3
- package/dist/subscriberbot/components/decisions/decisionModel.js.map +1 -1
- package/dist/subscriberbot/components/decisions/index.js +4 -3
- package/dist/subscriberbot/components/index.js +8 -7
- package/dist/subscriberbot/components/mobile/MobileDashboard.js +23 -24
- package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +40 -49
- package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
- package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -2
- package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
- package/dist/subscriberbot/components/mobile/RelationshipGlyph.js +1 -2
- package/dist/subscriberbot/components/mobile/RelationshipGlyph.js.map +1 -1
- package/dist/subscriberbot/components/mobile/index.js +4 -3
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +1 -2
- package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +4 -5
- package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js +4 -5
- package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/negotiations/index.js +5 -4
- package/dist/subscriberbot/components/negotiations/labels.js +1 -2
- package/dist/subscriberbot/components/negotiations/labels.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +4 -5
- package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +1 -2
- package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js.map +1 -1
- package/dist/subscriberbot/components/procurement/ProcurementThread.js +4 -5
- package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
- package/dist/subscriberbot/components/procurement/index.js +5 -4
- package/dist/subscriberbot/components/procurement/labels.js +1 -2
- package/dist/subscriberbot/components/procurement/labels.js.map +1 -1
- package/dist/subscriberbot/components/savings/SavingsCards.js +90 -91
- package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
- package/dist/subscriberbot/components/savings/index.js +3 -2
- package/dist/subscriberbot/components/savings/savingsModel.js +2 -3
- package/dist/subscriberbot/components/savings/savingsModel.js.map +1 -1
- package/dist/subscriberbot/components/viz.js +2 -3
- package/dist/subscriberbot/components/viz.js.map +1 -1
- package/dist/subscriberbot/context/SubscriberBotContext.js +3 -3
- package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
- package/dist/subscriberbot/context/index.js +1 -1
- package/dist/subscriberbot/hooks/index.js +2 -2
- package/dist/subscriberbot/hooks/useAutonomousAgentMode.js +2 -3
- package/dist/subscriberbot/hooks/useAutonomousAgentMode.js.map +1 -1
- package/dist/subscriberbot/hooks/useBankingApi.js +2 -3
- package/dist/subscriberbot/hooks/useBankingApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useCompactViewport.js +1 -2
- package/dist/subscriberbot/hooks/useCompactViewport.js.map +1 -1
- package/dist/subscriberbot/hooks/useFormError.js +1 -2
- package/dist/subscriberbot/hooks/useFormError.js.map +1 -1
- package/dist/subscriberbot/hooks/useFormatters.js +1 -2
- package/dist/subscriberbot/hooks/useFormatters.js.map +1 -1
- package/dist/subscriberbot/hooks/useNegotiationApi.js +2 -3
- package/dist/subscriberbot/hooks/useNegotiationApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useProcurementApi.js +2 -3
- package/dist/subscriberbot/hooks/useProcurementApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useRouteSelection.js +3 -3
- package/dist/subscriberbot/hooks/useRouteSelection.js.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +1 -2
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/hooks/useTr.js +1 -2
- package/dist/subscriberbot/hooks/useTr.js.map +1 -1
- package/dist/subscriberbot/index.js +9 -8
- package/dist/subscriberbot/pages/AssetVaultPage.js +34 -35
- package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.js +86 -87
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.js +194 -199
- package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.js +28 -29
- package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.js +179 -188
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
- package/dist/subscriberbot/pages/RenewalsPage.js +293 -298
- package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
- package/dist/subscriberbot/pages/SavingsPage.js +25 -26
- package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.js +67 -68
- package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +126 -127
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentNewPage.js +10 -11
- package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +23 -24
- package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +337 -359
- package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/banking/ConnectBankModal.js +22 -27
- package/dist/subscriberbot/pages/banking/ConnectBankModal.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +25 -26
- package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js +34 -35
- package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +125 -130
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +94 -95
- package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +15 -16
- package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +20 -21
- package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +86 -87
- package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +164 -165
- package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js +20 -21
- package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +350 -351
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderInsights.js +95 -96
- package/dist/subscriberbot/pages/providers/ProviderInsights.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +11 -12
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +62 -63
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +166 -172
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +12 -13
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +21 -22
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +242 -255
- package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +2 -3
- package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
- package/dist/subscriberbot/services/createSandboxAssistantTransport.js +1 -2
- package/dist/subscriberbot/services/createSandboxAssistantTransport.js.map +1 -1
- package/dist/subscriberbot/store/index.js +1 -1
- package/dist/subscriberbot/store/subscriberbotStore.js +1 -2
- package/dist/subscriberbot/store/subscriberbotStore.js.map +1 -1
- package/dist/subscriberbot/utils/bankRedirectLink.js +18 -19
- package/dist/subscriberbot/utils/bankRedirectLink.js.map +1 -1
- package/dist/subscriberbot/utils/chartScale.js +1 -2
- package/dist/subscriberbot/utils/chartScale.js.map +1 -1
- package/dist/subscriberbot/utils/cn.js +2 -3
- package/dist/subscriberbot/utils/cn.js.map +1 -1
- package/dist/subscriberbot/utils/formatters.js +4 -5
- package/dist/subscriberbot/utils/formatters.js.map +1 -1
- package/dist/subscriberbot/utils/navigation.js +1 -2
- package/dist/subscriberbot/utils/navigation.js.map +1 -1
- package/dist/subscriberbot/utils/pageContext.js +3 -4
- package/dist/subscriberbot/utils/pageContext.js.map +1 -1
- package/dist/subscriberbot/utils/plaidLink.js +21 -22
- package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
- package/dist/subscriberbot/utils/portfolio.js +5 -6
- package/dist/subscriberbot/utils/portfolio.js.map +1 -1
- package/dist/subscriberbot/utils/renewals.js +1 -2
- package/dist/subscriberbot/utils/renewals.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { useFormatters as e } from "../hooks/useFormatters.js";
|
|
2
|
+
import { useFormError as t } from "../hooks/useFormError.js";
|
|
3
|
+
import { PageLayout as n } from "../components/PageLayout.js";
|
|
4
|
+
import { StatusBadge as r } from "../components/StatusBadge.js";
|
|
5
|
+
import { EmptyState as i } from "../components/EmptyState.js";
|
|
6
|
+
import { Modal as a } from "../components/Modal.js";
|
|
7
|
+
import { ErrorView as o, LoadingView as s, Section as c } from "../components/StateViews.js";
|
|
8
|
+
import { MiniProgress as l } from "../components/viz.js";
|
|
9
|
+
import { useSubscriberBot as u } from "../context/SubscriberBotContext.js";
|
|
10
|
+
import { useChannels as d, useCreateChannel as f, useInboxMessages as p, useIngestMessage as m, useMarkMessageRead as h, useMarkMessageUnread as g, useVerifyChannel as _ } from "../hooks/useSubscriberBotApi.js";
|
|
11
|
+
import { useTr as v } from "../hooks/useTr.js";
|
|
12
12
|
import { useRouteSelection as y } from "../hooks/useRouteSelection.js";
|
|
13
|
-
import {
|
|
13
|
+
import { cn as b } from "../utils/cn.js";
|
|
14
14
|
import { useRef as x, useState as S } from "react";
|
|
15
15
|
import { AlertTriangle as C, BadgeCheck as w, Bell as T, ChevronRight as E, Hash as D, Inbox as ee, Mail as O, MailOpen as k, MessageSquare as A, MessagesSquare as j, MoreHorizontal as M, MousePointerClick as te, Phone as N, Plus as P, Radio as F, Send as I, ShieldAlert as L, Sparkles as R, Webhook as z } from "lucide-react";
|
|
16
16
|
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
17
17
|
import { DropdownMenu as U, DropdownMenuContent as W, DropdownMenuItem as G, DropdownMenuTrigger as K, GlassCard as q, PagePurpose as ne } from "@burdenoff/fe-libs/ui";
|
|
18
|
-
|
|
18
|
+
// src/subscriberbot/pages/InboxPage.tsx
|
|
19
19
|
var J = 25, Y = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", X = "mb-1 block text-xs font-medium text-text-secondary", Z = [
|
|
20
20
|
"BILLING",
|
|
21
21
|
"RENEWAL",
|
|
@@ -98,51 +98,47 @@ var J = 25, Y = "w-full rounded-lg border border-border-subtle bg-bg-surface px-
|
|
|
98
98
|
PUSH: T,
|
|
99
99
|
WEBHOOK: z
|
|
100
100
|
};
|
|
101
|
-
function se({ category:
|
|
102
|
-
let { formatEnumLabel:
|
|
101
|
+
function se({ category: t }) {
|
|
102
|
+
let { formatEnumLabel: n } = e();
|
|
103
103
|
return /* @__PURE__ */ V("span", {
|
|
104
|
-
className:
|
|
105
|
-
children: t
|
|
104
|
+
className: b("inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium", ae[t]),
|
|
105
|
+
children: n(t)
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
function ce({ className: e }) {
|
|
109
|
-
let
|
|
109
|
+
let t = v();
|
|
110
110
|
return /* @__PURE__ */ H("span", {
|
|
111
|
-
title:
|
|
112
|
-
className:
|
|
111
|
+
title: t("inbox.message.actionRequiredTitle", "Action required"),
|
|
112
|
+
className: b("inline-flex items-center gap-1 rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-[10px] font-medium text-status-warning-text", e),
|
|
113
113
|
children: [
|
|
114
114
|
/* @__PURE__ */ V(C, { className: "h-3 w-3" }),
|
|
115
115
|
" ",
|
|
116
|
-
|
|
116
|
+
t("inbox.message.actionFlag", "Action")
|
|
117
117
|
]
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
function le({ onClose:
|
|
121
|
-
let { formatEnumLabel: r } =
|
|
122
|
-
return /* @__PURE__ */ V(
|
|
120
|
+
function le({ onClose: n }) {
|
|
121
|
+
let { formatEnumLabel: r } = e(), i = v(), o = f(), [s, c] = S("EMAIL"), [l, u] = S(""), [d, p] = S(""), [m, h] = S(!0), [g, _, y, b] = t();
|
|
122
|
+
return /* @__PURE__ */ V(a, {
|
|
123
123
|
title: i("inbox.addChannelModal.title", "Add channel"),
|
|
124
|
-
onClose:
|
|
124
|
+
onClose: n,
|
|
125
125
|
maxWidthClassName: "max-w-xl",
|
|
126
126
|
children: /* @__PURE__ */ H("form", {
|
|
127
|
-
onSubmit: (
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
a.mutate({
|
|
133
|
-
type: o,
|
|
127
|
+
onSubmit: (e) => {
|
|
128
|
+
e.preventDefault(), _(null), l.trim() ? o.mutate({
|
|
129
|
+
type: s,
|
|
134
130
|
address: l.trim(),
|
|
135
131
|
ingestEnabled: m,
|
|
136
132
|
...d.trim() ? { label: d.trim() } : {}
|
|
137
133
|
}, {
|
|
138
|
-
onSuccess: () =>
|
|
134
|
+
onSuccess: () => n(),
|
|
139
135
|
onError: (e) => _(e instanceof Error ? e.message : i("inbox.addChannelModal.error", "Could not add channel."))
|
|
140
|
-
});
|
|
136
|
+
}) : _(i("inbox.addChannelModal.addressRequired", "An address is required."), "ch-address");
|
|
141
137
|
},
|
|
142
138
|
className: "space-y-4",
|
|
143
139
|
children: [
|
|
144
140
|
g && /* @__PURE__ */ V("div", {
|
|
145
|
-
id:
|
|
141
|
+
id: b,
|
|
146
142
|
tabIndex: -1,
|
|
147
143
|
role: "alert",
|
|
148
144
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
@@ -155,9 +151,9 @@ function le({ onClose: e }) {
|
|
|
155
151
|
className: X,
|
|
156
152
|
children: i("inbox.addChannelModal.typeLabel", "Type")
|
|
157
153
|
}), /* @__PURE__ */ V("select", {
|
|
158
|
-
...
|
|
154
|
+
...y("ch-type"),
|
|
159
155
|
id: "ch-type",
|
|
160
|
-
value:
|
|
156
|
+
value: s,
|
|
161
157
|
onChange: (e) => c(e.target.value),
|
|
162
158
|
className: Y,
|
|
163
159
|
children: re.map((e) => /* @__PURE__ */ V("option", {
|
|
@@ -169,11 +165,11 @@ function le({ onClose: e }) {
|
|
|
169
165
|
className: X,
|
|
170
166
|
children: i("inbox.addChannelModal.labelLabel", "Label")
|
|
171
167
|
}), /* @__PURE__ */ V("input", {
|
|
172
|
-
...
|
|
168
|
+
...y("ch-label"),
|
|
173
169
|
id: "ch-label",
|
|
174
170
|
type: "text",
|
|
175
171
|
value: d,
|
|
176
|
-
onChange: (e) =>
|
|
172
|
+
onChange: (e) => p(e.target.value),
|
|
177
173
|
placeholder: i("inbox.addChannelModal.labelPlaceholder", "e.g. Billing inbox"),
|
|
178
174
|
className: Y
|
|
179
175
|
})] })]
|
|
@@ -190,7 +186,7 @@ function le({ onClose: e }) {
|
|
|
190
186
|
})
|
|
191
187
|
]
|
|
192
188
|
}), /* @__PURE__ */ V("input", {
|
|
193
|
-
...
|
|
189
|
+
...y("ch-address"),
|
|
194
190
|
id: "ch-address",
|
|
195
191
|
type: "text",
|
|
196
192
|
value: l,
|
|
@@ -212,38 +208,38 @@ function le({ onClose: e }) {
|
|
|
212
208
|
className: "flex justify-end gap-3",
|
|
213
209
|
children: [/* @__PURE__ */ V("button", {
|
|
214
210
|
type: "button",
|
|
215
|
-
onClick:
|
|
211
|
+
onClick: n,
|
|
216
212
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
217
213
|
children: i("inbox.addChannelModal.cancel", "Cancel")
|
|
218
214
|
}), /* @__PURE__ */ V("button", {
|
|
219
215
|
type: "submit",
|
|
220
|
-
disabled:
|
|
216
|
+
disabled: o.isPending,
|
|
221
217
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
|
|
222
|
-
children:
|
|
218
|
+
children: o.isPending ? i("inbox.addChannelModal.adding", "Adding…") : i("inbox.addChannelModal.submit", "Add channel")
|
|
223
219
|
})]
|
|
224
220
|
})
|
|
225
221
|
]
|
|
226
222
|
})
|
|
227
223
|
});
|
|
228
224
|
}
|
|
229
|
-
function ue({ channel:
|
|
230
|
-
let { formatEnumLabel: i } =
|
|
231
|
-
return /* @__PURE__ */ V(
|
|
232
|
-
title:
|
|
233
|
-
description:
|
|
225
|
+
function ue({ channel: n, onClose: r }) {
|
|
226
|
+
let { formatEnumLabel: i } = e(), o = v(), s = m(), [c, l] = S(""), [u, d] = S(""), [f, p] = S("OTHER"), [h, g] = S(!1), [_, y, b, x] = t();
|
|
227
|
+
return /* @__PURE__ */ V(a, {
|
|
228
|
+
title: o("inbox.logMessageModal.title", "Log test message"),
|
|
229
|
+
description: o("inbox.logMessageModal.description", "Simulate an ingested message from {channel}.", { channel: n.label || n.address }),
|
|
234
230
|
onClose: r,
|
|
235
231
|
children: /* @__PURE__ */ H("form", {
|
|
236
|
-
onSubmit: (
|
|
237
|
-
|
|
238
|
-
channelId:
|
|
232
|
+
onSubmit: (e) => {
|
|
233
|
+
e.preventDefault(), y(null), s.mutate({
|
|
234
|
+
channelId: n.id,
|
|
239
235
|
receivedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
240
236
|
category: f,
|
|
241
|
-
actionRequired:
|
|
237
|
+
actionRequired: h,
|
|
242
238
|
...c.trim() ? { subject: c.trim() } : {},
|
|
243
239
|
...u.trim() ? { preview: u.trim() } : {}
|
|
244
240
|
}, {
|
|
245
241
|
onSuccess: () => r(),
|
|
246
|
-
onError: (e) =>
|
|
242
|
+
onError: (e) => y(e instanceof Error ? e.message : o("inbox.logMessageModal.error", "Could not log the message."))
|
|
247
243
|
});
|
|
248
244
|
},
|
|
249
245
|
className: "space-y-4",
|
|
@@ -258,22 +254,22 @@ function ue({ channel: e, onClose: r }) {
|
|
|
258
254
|
/* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
|
|
259
255
|
htmlFor: "msg-subject",
|
|
260
256
|
className: X,
|
|
261
|
-
children:
|
|
257
|
+
children: o("inbox.logMessageModal.subjectLabel", "Subject")
|
|
262
258
|
}), /* @__PURE__ */ V("input", {
|
|
263
|
-
...
|
|
259
|
+
...b("msg-subject"),
|
|
264
260
|
id: "msg-subject",
|
|
265
261
|
type: "text",
|
|
266
262
|
value: c,
|
|
267
263
|
onChange: (e) => l(e.target.value),
|
|
268
|
-
placeholder:
|
|
264
|
+
placeholder: o("inbox.logMessageModal.subjectPlaceholder", "e.g. Your plan renews in 3 days"),
|
|
269
265
|
className: Y
|
|
270
266
|
})] }),
|
|
271
267
|
/* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
|
|
272
268
|
htmlFor: "msg-preview",
|
|
273
269
|
className: X,
|
|
274
|
-
children:
|
|
270
|
+
children: o("inbox.logMessageModal.previewLabel", "Preview")
|
|
275
271
|
}), /* @__PURE__ */ V("textarea", {
|
|
276
|
-
...
|
|
272
|
+
...b("msg-preview"),
|
|
277
273
|
id: "msg-preview",
|
|
278
274
|
value: u,
|
|
279
275
|
onChange: (e) => d(e.target.value),
|
|
@@ -283,26 +279,26 @@ function ue({ channel: e, onClose: r }) {
|
|
|
283
279
|
/* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
|
|
284
280
|
htmlFor: "msg-category",
|
|
285
281
|
className: X,
|
|
286
|
-
children:
|
|
282
|
+
children: o("inbox.logMessageModal.categoryLabel", "Category")
|
|
287
283
|
}), /* @__PURE__ */ V("select", {
|
|
288
|
-
...
|
|
284
|
+
...b("msg-category"),
|
|
289
285
|
id: "msg-category",
|
|
290
286
|
value: f,
|
|
291
287
|
onChange: (e) => p(e.target.value),
|
|
292
288
|
className: Y,
|
|
293
289
|
children: Z.map((e) => /* @__PURE__ */ V("option", {
|
|
294
290
|
value: e,
|
|
295
|
-
children:
|
|
291
|
+
children: o(Q[e], i(e))
|
|
296
292
|
}, e))
|
|
297
293
|
})] }),
|
|
298
294
|
/* @__PURE__ */ H("label", {
|
|
299
295
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
300
296
|
children: [/* @__PURE__ */ V("input", {
|
|
301
297
|
type: "checkbox",
|
|
302
|
-
checked:
|
|
298
|
+
checked: h,
|
|
303
299
|
onChange: (e) => g(e.target.checked),
|
|
304
300
|
className: "size-4 rounded border-border-subtle"
|
|
305
|
-
}),
|
|
301
|
+
}), o("inbox.logMessageModal.actionRequired", "Requires action")]
|
|
306
302
|
}),
|
|
307
303
|
/* @__PURE__ */ H("div", {
|
|
308
304
|
className: "flex justify-end gap-3",
|
|
@@ -310,20 +306,20 @@ function ue({ channel: e, onClose: r }) {
|
|
|
310
306
|
type: "button",
|
|
311
307
|
onClick: r,
|
|
312
308
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
313
|
-
children:
|
|
309
|
+
children: o("inbox.logMessageModal.cancel", "Cancel")
|
|
314
310
|
}), /* @__PURE__ */ V("button", {
|
|
315
311
|
type: "submit",
|
|
316
|
-
disabled:
|
|
312
|
+
disabled: s.isPending,
|
|
317
313
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
|
|
318
|
-
children:
|
|
314
|
+
children: s.isPending ? o("inbox.logMessageModal.logging", "Logging…") : o("inbox.logMessageModal.submit", "Log message")
|
|
319
315
|
})]
|
|
320
316
|
})
|
|
321
317
|
]
|
|
322
318
|
})
|
|
323
319
|
});
|
|
324
320
|
}
|
|
325
|
-
function de({ channel:
|
|
326
|
-
let { formatEnumLabel:
|
|
321
|
+
function de({ channel: t, onVerify: n, verifying: i, onLog: a }) {
|
|
322
|
+
let { formatEnumLabel: o } = e(), s = v(), c = oe[t.type] ?? F, l = t.status === "VERIFIED";
|
|
327
323
|
return /* @__PURE__ */ H(q, {
|
|
328
324
|
treatment: "metric",
|
|
329
325
|
className: "flex flex-col p-4",
|
|
@@ -334,57 +330,57 @@ function de({ channel: e, onVerify: r, verifying: i, onLog: o }) {
|
|
|
334
330
|
className: "flex min-w-0 items-center gap-2.5",
|
|
335
331
|
children: [/* @__PURE__ */ V("span", {
|
|
336
332
|
className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
|
|
337
|
-
children: /* @__PURE__ */ V(
|
|
333
|
+
children: /* @__PURE__ */ V(c, { className: "h-4 w-4" })
|
|
338
334
|
}), /* @__PURE__ */ H("div", {
|
|
339
335
|
className: "min-w-0",
|
|
340
336
|
children: [/* @__PURE__ */ V("p", {
|
|
341
337
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
342
|
-
children:
|
|
343
|
-
}),
|
|
338
|
+
children: o(t.type)
|
|
339
|
+
}), t.label && /* @__PURE__ */ V("p", {
|
|
344
340
|
className: "truncate text-xs text-text-secondary",
|
|
345
|
-
children:
|
|
341
|
+
children: t.label
|
|
346
342
|
})]
|
|
347
343
|
})]
|
|
348
|
-
}), /* @__PURE__ */ V(
|
|
344
|
+
}), /* @__PURE__ */ V(r, { status: t.status })]
|
|
349
345
|
}),
|
|
350
346
|
/* @__PURE__ */ H("div", {
|
|
351
347
|
className: "mt-3 border-t border-border-subtle pt-3",
|
|
352
348
|
children: [/* @__PURE__ */ V("p", {
|
|
353
349
|
className: "text-[11px] uppercase tracking-wide text-text-secondary",
|
|
354
|
-
children:
|
|
350
|
+
children: t.ingestEnabled ? s("inbox.channels.ingestingFrom", "Ingesting from") : s("inbox.channels.ingestPaused", "Ingest paused")
|
|
355
351
|
}), /* @__PURE__ */ V("p", {
|
|
356
352
|
className: "mt-0.5 truncate text-sm text-text-primary",
|
|
357
|
-
title:
|
|
358
|
-
children:
|
|
353
|
+
title: t.address,
|
|
354
|
+
children: t.address
|
|
359
355
|
})]
|
|
360
356
|
}),
|
|
361
357
|
/* @__PURE__ */ H("div", {
|
|
362
358
|
className: "mt-auto flex flex-wrap items-center gap-2 pt-3",
|
|
363
359
|
children: [
|
|
364
|
-
|
|
360
|
+
t.status === "PENDING" && /* @__PURE__ */ H("button", {
|
|
365
361
|
type: "button",
|
|
366
362
|
disabled: i,
|
|
367
|
-
onClick: () =>
|
|
363
|
+
onClick: () => n(t.id),
|
|
368
364
|
className: "inline-flex items-center gap-1 rounded-lg bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
|
|
369
365
|
children: [
|
|
370
366
|
/* @__PURE__ */ V(w, { className: "h-3.5 w-3.5" }),
|
|
371
367
|
" ",
|
|
372
|
-
|
|
368
|
+
s("inbox.channels.verify", "Verify")
|
|
373
369
|
]
|
|
374
370
|
}),
|
|
375
|
-
|
|
371
|
+
l && t.ingestEnabled && /* @__PURE__ */ H("button", {
|
|
376
372
|
type: "button",
|
|
377
|
-
onClick: () =>
|
|
373
|
+
onClick: () => a(t),
|
|
378
374
|
className: "inline-flex items-center gap-1 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
379
375
|
children: [
|
|
380
376
|
/* @__PURE__ */ V(I, { className: "h-3.5 w-3.5" }),
|
|
381
377
|
" ",
|
|
382
|
-
|
|
378
|
+
s("inbox.channels.logTestMessage", "Log test message")
|
|
383
379
|
]
|
|
384
380
|
}),
|
|
385
|
-
|
|
381
|
+
t.status === "DISABLED" && /* @__PURE__ */ V("span", {
|
|
386
382
|
className: "text-xs text-text-secondary",
|
|
387
|
-
children:
|
|
383
|
+
children: s("inbox.channels.disabled", "Channel disabled")
|
|
388
384
|
})
|
|
389
385
|
]
|
|
390
386
|
})
|
|
@@ -392,13 +388,13 @@ function de({ channel: e, onVerify: r, verifying: i, onLog: o }) {
|
|
|
392
388
|
});
|
|
393
389
|
}
|
|
394
390
|
function fe() {
|
|
395
|
-
let e =
|
|
396
|
-
return /* @__PURE__ */ H(
|
|
391
|
+
let e = v(), { data: t, isLoading: n, isError: r, refetch: a } = d(), l = _(), [u, f] = S(!1), [p, m] = S(null), h = t ?? [], g = h.filter((e) => e.status === "VERIFIED").length, y = h.filter((e) => e.status === "PENDING").length;
|
|
392
|
+
return /* @__PURE__ */ H(c, {
|
|
397
393
|
title: e("inbox.channels.title", "Ingest channels"),
|
|
398
394
|
description: e("inbox.channels.description", "The sources the Universal Inbox pulls subscription communication from"),
|
|
399
395
|
action: /* @__PURE__ */ H("button", {
|
|
400
396
|
type: "button",
|
|
401
|
-
onClick: () =>
|
|
397
|
+
onClick: () => f(!0),
|
|
402
398
|
className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:opacity-90",
|
|
403
399
|
children: [
|
|
404
400
|
/* @__PURE__ */ V(P, { className: "h-3.5 w-3.5" }),
|
|
@@ -407,22 +403,22 @@ function fe() {
|
|
|
407
403
|
]
|
|
408
404
|
}),
|
|
409
405
|
children: [
|
|
410
|
-
|
|
406
|
+
n ? /* @__PURE__ */ V(s, { label: e("inbox.channels.loading", "Loading channels…") }) : r ? /* @__PURE__ */ V(o, {
|
|
411
407
|
message: e("inbox.channels.error", "Could not load channels."),
|
|
412
408
|
onRetry: () => void a()
|
|
413
|
-
}) :
|
|
409
|
+
}) : h.length === 0 ? /* @__PURE__ */ V(i, {
|
|
414
410
|
illustration: "empty-data",
|
|
415
411
|
icon: /* @__PURE__ */ V(F, { className: "h-12 w-12" }),
|
|
416
412
|
title: e("inbox.channels.emptyTitle", "No channels yet"),
|
|
417
413
|
description: e("inbox.channels.emptyDescription", "Add an email, SMS, Slack or webhook channel to start ingesting subscription communication.")
|
|
418
|
-
}) : /* @__PURE__ */ H(B, { children: [(
|
|
414
|
+
}) : /* @__PURE__ */ H(B, { children: [(g > 0 || y > 0) && /* @__PURE__ */ H("div", {
|
|
419
415
|
className: "mb-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
|
|
420
416
|
children: [/* @__PURE__ */ H("span", {
|
|
421
417
|
className: "inline-flex items-center gap-1.5",
|
|
422
418
|
children: [/* @__PURE__ */ V("span", {
|
|
423
419
|
className: "size-1.5 rounded-full bg-status-success-text",
|
|
424
420
|
"aria-hidden": !0
|
|
425
|
-
}), e("inbox.channels.verified", "{{count}} verified", { count:
|
|
421
|
+
}), e("inbox.channels.verified", "{{count}} verified", { count: g })]
|
|
426
422
|
}), y > 0 && /* @__PURE__ */ H("span", {
|
|
427
423
|
className: "inline-flex items-center gap-1.5",
|
|
428
424
|
children: [/* @__PURE__ */ V("span", {
|
|
@@ -432,41 +428,41 @@ function fe() {
|
|
|
432
428
|
})]
|
|
433
429
|
}), /* @__PURE__ */ V("div", {
|
|
434
430
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
|
|
435
|
-
children:
|
|
431
|
+
children: h.map((e) => /* @__PURE__ */ V(de, {
|
|
436
432
|
channel: e,
|
|
437
|
-
verifying:
|
|
438
|
-
onVerify: (e) =>
|
|
439
|
-
onLog: (e) =>
|
|
433
|
+
verifying: l.isPending,
|
|
434
|
+
onVerify: (e) => l.mutate(e),
|
|
435
|
+
onLog: (e) => m(e)
|
|
440
436
|
}, e.id))
|
|
441
437
|
})] }),
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
channel:
|
|
445
|
-
onClose: () =>
|
|
438
|
+
u && /* @__PURE__ */ V(le, { onClose: () => f(!1) }),
|
|
439
|
+
p && /* @__PURE__ */ V(ue, {
|
|
440
|
+
channel: p,
|
|
441
|
+
onClose: () => m(null)
|
|
446
442
|
})
|
|
447
443
|
]
|
|
448
444
|
});
|
|
449
445
|
}
|
|
450
|
-
function pe({ message:
|
|
451
|
-
let { formatRelativeTime:
|
|
446
|
+
function pe({ message: t, active: n, onSelect: r, onChangeReadState: i, markPending: a, onViewRelationship: o }) {
|
|
447
|
+
let { formatRelativeTime: s } = e(), c = v(), l = !t.isRead;
|
|
452
448
|
return /* @__PURE__ */ H("div", {
|
|
453
449
|
"data-inbox-row": !0,
|
|
454
|
-
className:
|
|
450
|
+
className: b("relative flex cursor-pointer items-start gap-3 p-4 transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] focus-visible:ring-inset", n ? "bg-bg-sunken" : l ? "bg-accent-wash" : "hover:bg-bg-sunken/60"),
|
|
455
451
|
children: [
|
|
456
452
|
/* @__PURE__ */ V("button", {
|
|
457
453
|
type: "button",
|
|
458
|
-
"aria-pressed":
|
|
459
|
-
"aria-label":
|
|
460
|
-
onClick:
|
|
454
|
+
"aria-pressed": n,
|
|
455
|
+
"aria-label": c("inbox.message.open", "Open message: {{subject}}", { subject: t.subject || c("inbox.message.noSubject", "(no subject)") }),
|
|
456
|
+
onClick: r,
|
|
461
457
|
className: "absolute inset-0 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] focus-visible:ring-inset"
|
|
462
458
|
}),
|
|
463
|
-
|
|
459
|
+
l && /* @__PURE__ */ V("span", {
|
|
464
460
|
"aria-hidden": !0,
|
|
465
461
|
className: "absolute inset-y-0 start-0 pointer-events-none w-0.5 bg-text-link"
|
|
466
462
|
}),
|
|
467
463
|
/* @__PURE__ */ V("span", {
|
|
468
464
|
className: "relative pointer-events-none mt-0.5 shrink-0 text-text-secondary",
|
|
469
|
-
children:
|
|
465
|
+
children: l ? /* @__PURE__ */ V(O, { className: "h-4 w-4 text-text-link" }) : /* @__PURE__ */ V(k, { className: "h-4 w-4" })
|
|
470
466
|
}),
|
|
471
467
|
/* @__PURE__ */ H("div", {
|
|
472
468
|
className: "relative pointer-events-none min-w-0 flex-1",
|
|
@@ -474,37 +470,37 @@ function pe({ message: e, active: i, onSelect: a, onChangeReadState: o, markPend
|
|
|
474
470
|
/* @__PURE__ */ H("div", {
|
|
475
471
|
className: "flex items-center gap-2",
|
|
476
472
|
children: [
|
|
477
|
-
|
|
473
|
+
l && /* @__PURE__ */ V("span", {
|
|
478
474
|
role: "img",
|
|
479
|
-
"aria-label":
|
|
475
|
+
"aria-label": c("inbox.message.unreadAria", "Unread"),
|
|
480
476
|
className: "size-1.5 shrink-0 rounded-full bg-text-link"
|
|
481
477
|
}),
|
|
482
478
|
/* @__PURE__ */ V("p", {
|
|
483
|
-
className:
|
|
484
|
-
children:
|
|
479
|
+
className: b("min-w-0 flex-1 truncate text-sm", l ? "font-semibold text-text-primary" : "font-normal text-text-primary"),
|
|
480
|
+
children: t.subject || c("inbox.message.noSubject", "(no subject)")
|
|
485
481
|
}),
|
|
486
482
|
/* @__PURE__ */ V("span", {
|
|
487
483
|
className: "shrink-0 text-xs tabular-nums text-text-secondary",
|
|
488
|
-
children:
|
|
484
|
+
children: s(t.receivedAt)
|
|
489
485
|
})
|
|
490
486
|
]
|
|
491
487
|
}),
|
|
492
|
-
|
|
488
|
+
t.preview && /* @__PURE__ */ V("p", {
|
|
493
489
|
className: "mt-0.5 line-clamp-2 text-xs text-text-secondary",
|
|
494
|
-
children:
|
|
490
|
+
children: t.preview
|
|
495
491
|
}),
|
|
496
492
|
/* @__PURE__ */ H("div", {
|
|
497
493
|
className: "mt-1.5 flex flex-wrap items-center gap-2",
|
|
498
494
|
children: [
|
|
499
|
-
/* @__PURE__ */ V(se, { category:
|
|
500
|
-
|
|
501
|
-
|
|
495
|
+
/* @__PURE__ */ V(se, { category: t.category }),
|
|
496
|
+
t.actionRequired && /* @__PURE__ */ V(ce, {}),
|
|
497
|
+
o && /* @__PURE__ */ V("button", {
|
|
502
498
|
type: "button",
|
|
503
499
|
onClick: (e) => {
|
|
504
|
-
e.stopPropagation(),
|
|
500
|
+
e.stopPropagation(), o();
|
|
505
501
|
},
|
|
506
502
|
className: "pointer-events-auto text-xs font-medium text-text-link hover:underline",
|
|
507
|
-
children:
|
|
503
|
+
children: c("inbox.message.viewRelationship", "View relationship")
|
|
508
504
|
}),
|
|
509
505
|
/* @__PURE__ */ H(U, {
|
|
510
506
|
modal: !1,
|
|
@@ -512,8 +508,8 @@ function pe({ message: e, active: i, onSelect: a, onChangeReadState: o, markPend
|
|
|
512
508
|
asChild: !0,
|
|
513
509
|
children: /* @__PURE__ */ V("button", {
|
|
514
510
|
type: "button",
|
|
515
|
-
disabled:
|
|
516
|
-
"aria-label":
|
|
511
|
+
disabled: a,
|
|
512
|
+
"aria-label": c("inbox.message.actions", "Message actions for {{subject}}", { subject: t.subject || c("inbox.message.noSubject", "(no subject)") }),
|
|
517
513
|
onClick: (e) => e.stopPropagation(),
|
|
518
514
|
className: "pointer-events-auto ms-auto shrink-0 rounded-lg border border-border-subtle px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
|
|
519
515
|
children: /* @__PURE__ */ V(M, {
|
|
@@ -526,9 +522,9 @@ function pe({ message: e, active: i, onSelect: a, onChangeReadState: o, markPend
|
|
|
526
522
|
onClick: (e) => e.stopPropagation(),
|
|
527
523
|
onKeyDown: (e) => e.stopPropagation(),
|
|
528
524
|
children: /* @__PURE__ */ V(G, {
|
|
529
|
-
disabled:
|
|
530
|
-
onSelect:
|
|
531
|
-
children:
|
|
525
|
+
disabled: a,
|
|
526
|
+
onSelect: i,
|
|
527
|
+
children: l ? c("inbox.message.markRead", "Mark read") : c("inbox.message.markUnread", "Mark unread")
|
|
532
528
|
})
|
|
533
529
|
})]
|
|
534
530
|
})
|
|
@@ -539,24 +535,24 @@ function pe({ message: e, active: i, onSelect: a, onChangeReadState: o, markPend
|
|
|
539
535
|
]
|
|
540
536
|
});
|
|
541
537
|
}
|
|
542
|
-
function me({ message:
|
|
543
|
-
let { formatDateTime:
|
|
544
|
-
if (!
|
|
538
|
+
function me({ message: t, channel: n, onChangeReadState: r, markPending: i, onViewRelationship: a }) {
|
|
539
|
+
let { formatDateTime: o } = e(), s = v();
|
|
540
|
+
if (!t) return /* @__PURE__ */ H(q, {
|
|
545
541
|
treatment: "metric",
|
|
546
542
|
className: "flex min-h-[20rem] flex-col items-center justify-center p-8 text-center",
|
|
547
543
|
children: [
|
|
548
544
|
/* @__PURE__ */ V(te, { className: "h-10 w-10 text-text-secondary" }),
|
|
549
545
|
/* @__PURE__ */ V("p", {
|
|
550
546
|
className: "mt-3 text-sm font-medium text-text-primary",
|
|
551
|
-
children:
|
|
547
|
+
children: s("inbox.readingPane.selectTitle", "Select a message")
|
|
552
548
|
}),
|
|
553
549
|
/* @__PURE__ */ V("p", {
|
|
554
550
|
className: "mt-1 max-w-[16rem] text-xs text-text-secondary",
|
|
555
|
-
children:
|
|
551
|
+
children: s("inbox.readingPane.selectDescription", "Pick any message from the list to read the full details here.")
|
|
556
552
|
})
|
|
557
553
|
]
|
|
558
554
|
});
|
|
559
|
-
let
|
|
555
|
+
let c = n ? oe[n.type] ?? F : F, u = t.categoryConfidence == null ? null : Math.round(Math.max(0, Math.min(1, t.categoryConfidence)) * 100);
|
|
560
556
|
return /* @__PURE__ */ H(q, {
|
|
561
557
|
treatment: "metric",
|
|
562
558
|
className: "flex flex-col p-5",
|
|
@@ -565,31 +561,31 @@ function me({ message: e, channel: r, onChangeReadState: i, markPending: a, onVi
|
|
|
565
561
|
className: "flex items-start justify-between gap-3",
|
|
566
562
|
children: [/* @__PURE__ */ V("h3", {
|
|
567
563
|
className: "text-base font-semibold text-text-primary",
|
|
568
|
-
children:
|
|
564
|
+
children: t.subject || s("inbox.message.noSubject", "(no subject)")
|
|
569
565
|
}), /* @__PURE__ */ V("button", {
|
|
570
566
|
type: "button",
|
|
571
|
-
disabled:
|
|
572
|
-
onClick:
|
|
567
|
+
disabled: i,
|
|
568
|
+
onClick: r,
|
|
573
569
|
className: "shrink-0 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
|
|
574
|
-
children:
|
|
570
|
+
children: i ? s("inbox.message.saving", "Saving…") : t.isRead ? s("inbox.message.markUnread", "Mark unread") : s("inbox.message.markRead", "Mark read")
|
|
575
571
|
})]
|
|
576
572
|
}),
|
|
577
|
-
|
|
573
|
+
n && /* @__PURE__ */ H("div", {
|
|
578
574
|
className: "mt-2 flex items-center gap-2 text-sm",
|
|
579
|
-
children: [/* @__PURE__ */ V(
|
|
575
|
+
children: [/* @__PURE__ */ V(c, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ V("span", {
|
|
580
576
|
className: "truncate text-text-secondary",
|
|
581
|
-
title:
|
|
582
|
-
children:
|
|
577
|
+
title: n.address,
|
|
578
|
+
children: n.address
|
|
583
579
|
})]
|
|
584
580
|
}),
|
|
585
581
|
/* @__PURE__ */ H("div", {
|
|
586
582
|
className: "mt-3 flex flex-wrap items-center gap-2",
|
|
587
583
|
children: [
|
|
588
|
-
/* @__PURE__ */ V(se, { category:
|
|
589
|
-
|
|
584
|
+
/* @__PURE__ */ V(se, { category: t.category }),
|
|
585
|
+
t.actionRequired && /* @__PURE__ */ V(ce, {}),
|
|
590
586
|
/* @__PURE__ */ V("span", {
|
|
591
587
|
className: "text-xs text-text-secondary",
|
|
592
|
-
children:
|
|
588
|
+
children: o(t.receivedAt)
|
|
593
589
|
})
|
|
594
590
|
]
|
|
595
591
|
}),
|
|
@@ -602,14 +598,14 @@ function me({ message: e, channel: r, onChangeReadState: i, markPending: a, onVi
|
|
|
602
598
|
children: [
|
|
603
599
|
/* @__PURE__ */ V(R, { className: "h-3.5 w-3.5 text-text-link" }),
|
|
604
600
|
" ",
|
|
605
|
-
|
|
601
|
+
s("inbox.readingPane.aiCategorization", "AI categorization")
|
|
606
602
|
]
|
|
607
603
|
}), /* @__PURE__ */ V("span", {
|
|
608
604
|
className: "tabular-nums text-text-secondary",
|
|
609
|
-
children:
|
|
605
|
+
children: s("inbox.readingPane.confidence", "{{pct}}% confidence", { pct: u })
|
|
610
606
|
})]
|
|
611
|
-
}), /* @__PURE__ */ V(
|
|
612
|
-
label:
|
|
607
|
+
}), /* @__PURE__ */ V(l, {
|
|
608
|
+
label: s("inbox.message.confidence", "Classification confidence"),
|
|
613
609
|
value: u,
|
|
614
610
|
max: 100,
|
|
615
611
|
tone: u >= 66 ? "positive" : u >= 33 ? "accent" : "warning",
|
|
@@ -618,27 +614,27 @@ function me({ message: e, channel: r, onChangeReadState: i, markPending: a, onVi
|
|
|
618
614
|
}),
|
|
619
615
|
/* @__PURE__ */ V("div", {
|
|
620
616
|
className: "mt-4 border-t border-border-subtle pt-4",
|
|
621
|
-
children:
|
|
617
|
+
children: t.preview ? /* @__PURE__ */ V("p", {
|
|
622
618
|
className: "whitespace-pre-wrap text-sm leading-relaxed text-text-primary",
|
|
623
|
-
children:
|
|
619
|
+
children: t.preview
|
|
624
620
|
}) : /* @__PURE__ */ V("p", {
|
|
625
621
|
className: "text-sm italic text-text-secondary",
|
|
626
|
-
children:
|
|
622
|
+
children: s("inbox.readingPane.noPreview", "No preview available for this message.")
|
|
627
623
|
})
|
|
628
624
|
}),
|
|
629
|
-
|
|
625
|
+
t.actionRequired && /* @__PURE__ */ H("div", {
|
|
630
626
|
className: "mt-4 flex items-start gap-2 rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-3",
|
|
631
627
|
children: [/* @__PURE__ */ V(L, { className: "mt-0.5 h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ V("p", {
|
|
632
628
|
className: "text-xs text-status-warning-text",
|
|
633
|
-
children:
|
|
629
|
+
children: s("inbox.readingPane.attention", "This message needs your attention — review it before its provider deadline.")
|
|
634
630
|
})]
|
|
635
631
|
}),
|
|
636
|
-
|
|
632
|
+
a && /* @__PURE__ */ H("button", {
|
|
637
633
|
type: "button",
|
|
638
|
-
onClick:
|
|
634
|
+
onClick: a,
|
|
639
635
|
className: "mt-4 inline-flex items-center gap-1 self-start text-sm font-medium text-text-link hover:underline",
|
|
640
636
|
children: [
|
|
641
|
-
|
|
637
|
+
s("inbox.message.viewRelationship", "View relationship"),
|
|
642
638
|
" ",
|
|
643
639
|
/* @__PURE__ */ V(E, { className: "rtl:rotate-180 h-4 w-4" })
|
|
644
640
|
]
|
|
@@ -646,24 +642,24 @@ function me({ message: e, channel: r, onChangeReadState: i, markPending: a, onVi
|
|
|
646
642
|
]
|
|
647
643
|
});
|
|
648
644
|
}
|
|
649
|
-
function $({ active: e, onClick: t, children: n, tone:
|
|
645
|
+
function $({ active: e, onClick: t, children: n, tone: r = "default" }) {
|
|
650
646
|
return /* @__PURE__ */ V("button", {
|
|
651
647
|
type: "button",
|
|
652
648
|
onClick: t,
|
|
653
649
|
"aria-pressed": e,
|
|
654
|
-
className:
|
|
650
|
+
className: b("inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", e ? r === "warning" ? "border-transparent bg-status-warning-bg-subtle text-status-warning-text" : "border-transparent bg-action-primary-bg text-action-primary-text" : "border-border-subtle text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
|
|
655
651
|
children: n
|
|
656
652
|
});
|
|
657
653
|
}
|
|
658
654
|
function he() {
|
|
659
|
-
let
|
|
660
|
-
category:
|
|
661
|
-
unreadOnly:
|
|
655
|
+
let e = v(), { navigateTo: t } = u(), [r, a] = S(0), [c, l] = S(""), [f, m] = S(!1), [_, w] = S(!1), [T, E] = y("inbox"), { data: D, isLoading: k, isError: A, refetch: j, isFetching: M } = p({
|
|
656
|
+
category: c || void 0,
|
|
657
|
+
unreadOnly: f || void 0,
|
|
662
658
|
pagination: {
|
|
663
659
|
limit: J,
|
|
664
|
-
offset:
|
|
660
|
+
offset: r * J
|
|
665
661
|
}
|
|
666
|
-
}), { data: te } =
|
|
662
|
+
}), { data: te } = d(), N = h(), P = g(), F = x(!1), [I, L] = S(!1), R = N.isPending || P.isPending, z = async (e) => {
|
|
667
663
|
if (!F.current) {
|
|
668
664
|
F.current = !0, L(!1);
|
|
669
665
|
try {
|
|
@@ -674,35 +670,35 @@ function he() {
|
|
|
674
670
|
F.current = !1;
|
|
675
671
|
}
|
|
676
672
|
}
|
|
677
|
-
}, B = D?.items ?? [], U = D?.pageInfo.hasMore ?? !1, W =
|
|
678
|
-
|
|
673
|
+
}, B = D?.items ?? [], U = D?.pageInfo.hasMore ?? !1, W = _ ? B.filter((e) => e.actionRequired) : B, G = B.filter((e) => !e.isRead).length, K = B.filter((e) => e.actionRequired).length, q = new Map((te ?? []).map((e) => [e.id, e])), Y = W.find((e) => e.id === T) ?? null, X = Y ? q.get(Y.channelId) : void 0, Z = () => {
|
|
674
|
+
a(0), E(null);
|
|
679
675
|
};
|
|
680
|
-
return /* @__PURE__ */ H(
|
|
681
|
-
title:
|
|
682
|
-
description:
|
|
676
|
+
return /* @__PURE__ */ H(n, {
|
|
677
|
+
title: e("inbox.title", "Universal Inbox"),
|
|
678
|
+
description: e("inbox.description", "Every subscription communication, merged and categorized"),
|
|
683
679
|
children: [
|
|
684
680
|
/* @__PURE__ */ V(ne, {
|
|
685
681
|
className: "mb-4",
|
|
686
|
-
children:
|
|
682
|
+
children: e("inbox.purpose", "Subscription communication is noisy and scattered. The Universal Inbox merges every channel a provider uses and uses AI to categorize each message so you never miss a renewal, required action or security notice.")
|
|
687
683
|
}),
|
|
688
684
|
/* @__PURE__ */ V("div", {
|
|
689
685
|
className: "-mx-1 flex gap-2 overflow-x-auto px-1 pb-1",
|
|
690
|
-
children: ie.map((
|
|
686
|
+
children: ie.map((t) => /* @__PURE__ */ V("span", {
|
|
691
687
|
className: "shrink-0",
|
|
692
688
|
children: /* @__PURE__ */ V($, {
|
|
693
|
-
active:
|
|
689
|
+
active: c === t.value,
|
|
694
690
|
onClick: () => {
|
|
695
|
-
|
|
691
|
+
l(t.value), Z();
|
|
696
692
|
},
|
|
697
|
-
children:
|
|
693
|
+
children: e(t.key, t.fallback)
|
|
698
694
|
})
|
|
699
|
-
},
|
|
695
|
+
}, t.value))
|
|
700
696
|
}),
|
|
701
697
|
/* @__PURE__ */ H("div", {
|
|
702
698
|
className: "mt-3 flex flex-wrap items-center gap-2",
|
|
703
699
|
children: [
|
|
704
700
|
/* @__PURE__ */ H($, {
|
|
705
|
-
active:
|
|
701
|
+
active: _,
|
|
706
702
|
tone: "warning",
|
|
707
703
|
onClick: () => {
|
|
708
704
|
w((e) => !e), E(null);
|
|
@@ -710,27 +706,27 @@ function he() {
|
|
|
710
706
|
children: [
|
|
711
707
|
/* @__PURE__ */ V(C, { className: "h-3.5 w-3.5" }),
|
|
712
708
|
" ",
|
|
713
|
-
|
|
709
|
+
e("inbox.filters.actionRequired", "Action required")
|
|
714
710
|
]
|
|
715
711
|
}),
|
|
716
712
|
/* @__PURE__ */ H($, {
|
|
717
|
-
active:
|
|
713
|
+
active: f,
|
|
718
714
|
onClick: () => {
|
|
719
|
-
|
|
715
|
+
m((e) => !e), Z();
|
|
720
716
|
},
|
|
721
717
|
children: [
|
|
722
718
|
/* @__PURE__ */ V(O, { className: "h-3.5 w-3.5" }),
|
|
723
719
|
" ",
|
|
724
|
-
|
|
720
|
+
e("inbox.filters.unreadOnly", "Unread only")
|
|
725
721
|
]
|
|
726
722
|
}),
|
|
727
723
|
!k && !A && B.length > 0 && /* @__PURE__ */ H("p", {
|
|
728
724
|
className: "ms-auto text-xs text-text-secondary",
|
|
729
725
|
children: [
|
|
730
|
-
|
|
726
|
+
e("inbox.filters.unreadCount", "{{count}} unread", { count: G }),
|
|
731
727
|
" · ",
|
|
732
|
-
|
|
733
|
-
M ? ` · ${
|
|
728
|
+
e("inbox.filters.actionCount", "{{count}} need action", { count: K }),
|
|
729
|
+
M ? ` · ${e("inbox.filters.refreshing", "refreshing…")}` : ""
|
|
734
730
|
]
|
|
735
731
|
})
|
|
736
732
|
]
|
|
@@ -738,23 +734,23 @@ function he() {
|
|
|
738
734
|
R && /* @__PURE__ */ V("p", {
|
|
739
735
|
role: "status",
|
|
740
736
|
className: "mt-3 text-sm text-text-secondary",
|
|
741
|
-
children:
|
|
737
|
+
children: e("inbox.message.saving", "Saving…")
|
|
742
738
|
}),
|
|
743
739
|
I && /* @__PURE__ */ V("p", {
|
|
744
740
|
role: "alert",
|
|
745
741
|
className: "mt-3 text-sm text-status-error-text",
|
|
746
|
-
children:
|
|
742
|
+
children: e("inbox.message.updateError", "Could not update the message. Please try again.")
|
|
747
743
|
}),
|
|
748
|
-
k ? /* @__PURE__ */ V(
|
|
749
|
-
message:
|
|
744
|
+
k ? /* @__PURE__ */ V(s, { label: e("inbox.loading", "Loading inbox…") }) : A ? /* @__PURE__ */ V(o, {
|
|
745
|
+
message: e("inbox.error", "Could not load the inbox."),
|
|
750
746
|
onRetry: () => void j()
|
|
751
747
|
}) : B.length === 0 ? /* @__PURE__ */ V("div", {
|
|
752
748
|
className: "mt-6",
|
|
753
|
-
children: /* @__PURE__ */ V(
|
|
749
|
+
children: /* @__PURE__ */ V(i, {
|
|
754
750
|
illustration: "empty-notifications",
|
|
755
751
|
icon: /* @__PURE__ */ V(ee, { className: "h-12 w-12" }),
|
|
756
|
-
title:
|
|
757
|
-
description:
|
|
752
|
+
title: e("inbox.emptyTitle", "Inbox is empty"),
|
|
753
|
+
description: f || c ? e("inbox.emptyDescriptionFiltered", "No messages match these filters.") : e("inbox.emptyDescription", "Merged subscription communications will appear here once channels start ingesting.")
|
|
758
754
|
})
|
|
759
755
|
}) : /* @__PURE__ */ H("div", {
|
|
760
756
|
className: "mt-5 grid grid-cols-1 gap-5 lg:grid-cols-[minmax(0,1fr)_380px]",
|
|
@@ -766,11 +762,11 @@ function he() {
|
|
|
766
762
|
/* @__PURE__ */ V(C, { className: "mx-auto h-8 w-8 text-text-secondary" }),
|
|
767
763
|
/* @__PURE__ */ V("p", {
|
|
768
764
|
className: "mt-2 text-sm font-medium text-text-primary",
|
|
769
|
-
children:
|
|
765
|
+
children: e("inbox.noActionTitle", "No action-required messages on this page")
|
|
770
766
|
}),
|
|
771
767
|
/* @__PURE__ */ V("p", {
|
|
772
768
|
className: "mt-1 text-xs text-text-secondary",
|
|
773
|
-
children:
|
|
769
|
+
children: e("inbox.noActionDescription", "Turn off the “Action required” lens or move to another page.")
|
|
774
770
|
})
|
|
775
771
|
]
|
|
776
772
|
}) : /* @__PURE__ */ V("div", {
|
|
@@ -781,31 +777,31 @@ function he() {
|
|
|
781
777
|
onSelect: () => E(e.id),
|
|
782
778
|
onChangeReadState: () => void z(e),
|
|
783
779
|
markPending: R,
|
|
784
|
-
onViewRelationship: e.relationshipId ? () =>
|
|
780
|
+
onViewRelationship: e.relationshipId ? () => t(`/relationships/${e.relationshipId}`) : null
|
|
785
781
|
}, e.id))
|
|
786
782
|
}), /* @__PURE__ */ H("div", {
|
|
787
783
|
className: "mt-4 flex items-center justify-between",
|
|
788
784
|
children: [/* @__PURE__ */ H("p", {
|
|
789
785
|
className: "text-xs text-text-secondary",
|
|
790
|
-
children: [
|
|
786
|
+
children: [e("inbox.pagination.page", "Page {{page}}", { page: r + 1 }), M ? ` · ${e("inbox.filters.refreshing", "refreshing…")}` : ""]
|
|
791
787
|
}), /* @__PURE__ */ H("div", {
|
|
792
788
|
className: "flex gap-2",
|
|
793
789
|
children: [/* @__PURE__ */ V("button", {
|
|
794
790
|
type: "button",
|
|
795
|
-
disabled:
|
|
791
|
+
disabled: r === 0,
|
|
796
792
|
onClick: () => {
|
|
797
|
-
|
|
793
|
+
a((e) => Math.max(0, e - 1)), E(null);
|
|
798
794
|
},
|
|
799
|
-
className:
|
|
800
|
-
children:
|
|
795
|
+
className: b("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", r === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
|
|
796
|
+
children: e("inbox.pagination.previous", "Previous")
|
|
801
797
|
}), /* @__PURE__ */ V("button", {
|
|
802
798
|
type: "button",
|
|
803
799
|
disabled: !U,
|
|
804
800
|
onClick: () => {
|
|
805
|
-
|
|
801
|
+
a((e) => e + 1), E(null);
|
|
806
802
|
},
|
|
807
|
-
className:
|
|
808
|
-
children:
|
|
803
|
+
className: b("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", U ? "text-text-primary hover:bg-bg-sunken" : "cursor-not-allowed text-text-secondary opacity-50"),
|
|
804
|
+
children: e("inbox.pagination.next", "Next")
|
|
809
805
|
})]
|
|
810
806
|
})]
|
|
811
807
|
})]
|
|
@@ -820,7 +816,7 @@ function he() {
|
|
|
820
816
|
Y && z(Y);
|
|
821
817
|
},
|
|
822
818
|
markPending: R,
|
|
823
|
-
onViewRelationship: Y?.relationshipId ? () =>
|
|
819
|
+
onViewRelationship: Y?.relationshipId ? () => t(`/relationships/${Y.relationshipId}`) : null
|
|
824
820
|
})
|
|
825
821
|
})
|
|
826
822
|
})]
|
|
@@ -829,7 +825,6 @@ function he() {
|
|
|
829
825
|
]
|
|
830
826
|
});
|
|
831
827
|
}
|
|
832
|
-
//#endregion
|
|
833
828
|
export { he as InboxPage };
|
|
834
829
|
|
|
835
830
|
//# sourceMappingURL=InboxPage.js.map
|