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