@burdenoff/microfe-integrations 2026.1107.1 → 2026.1109.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/dev/main.d.ts +0 -2
- package/dist/generated/global-operations.d.ts +4 -2
- package/dist/generated/global-types.d.ts +210 -190
- package/dist/generated/wspace-operations.d.ts +1195 -670
- package/dist/generated/wspace-operations.js +265 -149
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +8728 -376
- package/dist/generated/wspace-types.js +6 -3
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/integrations/ConnectSourceDialog.d.ts +0 -2
- package/dist/integrations/ConnectSourceDialog.js +13 -14
- package/dist/integrations/ConnectSourceDialog.js.map +1 -1
- package/dist/integrations/ConnectionsPanel.d.ts +0 -2
- package/dist/integrations/ConnectionsPanel.js +5 -6
- package/dist/integrations/ConnectionsPanel.js.map +1 -1
- package/dist/integrations/IntegrationsAdminRoot.d.ts +0 -2
- package/dist/integrations/IntegrationsAdminRoot.js +14 -11
- package/dist/integrations/IntegrationsAdminRoot.js.map +1 -1
- package/dist/integrations/IntegrationsAdminRoutes.d.ts +1 -2
- package/dist/integrations/IntegrationsAdminRoutes.js +1 -2
- package/dist/integrations/IntegrationsAdminRoutes.js.map +1 -1
- package/dist/integrations/IntegrationsRoot.d.ts +0 -2
- package/dist/integrations/IntegrationsRoot.js +9 -6
- package/dist/integrations/IntegrationsRoot.js.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.d.ts +1 -2
- package/dist/integrations/IntegrationsUserRoutes.js +7 -8
- package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.d.ts +1 -3
- package/dist/integrations/components/AddConnectionDialog.js +12 -15
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/AuthMethodsEditor.d.ts +0 -2
- package/dist/integrations/components/AuthMethodsEditor.js +1 -2
- package/dist/integrations/components/AuthMethodsEditor.js.map +1 -1
- package/dist/integrations/components/ConfirmDialog.d.ts +1 -3
- package/dist/integrations/components/ConfirmDialog.js +1 -2
- package/dist/integrations/components/ConfirmDialog.js.map +1 -1
- package/dist/integrations/components/ConnectionCard.d.ts +0 -2
- package/dist/integrations/components/ConnectionCard.js +9 -10
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/ConnectionModalFrame.d.ts +0 -2
- package/dist/integrations/components/ConnectionModalFrame.js +2 -3
- package/dist/integrations/components/ConnectionModalFrame.js.map +1 -1
- package/dist/integrations/components/ConnectionSharing.d.ts +0 -2
- package/dist/integrations/components/ConnectionSharing.js +7 -8
- package/dist/integrations/components/ConnectionSharing.js.map +1 -1
- package/dist/integrations/components/ConnectionStatusBadge.d.ts +0 -2
- package/dist/integrations/components/ConnectionStatusBadge.js +1 -2
- package/dist/integrations/components/ConnectionStatusBadge.js.map +1 -1
- package/dist/integrations/components/ConnectorSubmissionCard.d.ts +2 -4
- package/dist/integrations/components/ConnectorSubmissionCard.js +8 -9
- package/dist/integrations/components/ConnectorSubmissionCard.js.map +1 -1
- package/dist/integrations/components/ConnectorSubmissionPager.d.ts +1 -2
- package/dist/integrations/components/ConnectorSubmissionPager.js +1 -2
- package/dist/integrations/components/ConnectorSubmissionPager.js.map +1 -1
- package/dist/integrations/components/MailMessageBody.d.ts +5 -0
- package/dist/integrations/components/MailMessageBody.js +174 -0
- package/dist/integrations/components/MailMessageBody.js.map +1 -0
- package/dist/integrations/components/ProviderCard.d.ts +0 -2
- package/dist/integrations/components/ProviderCard.js +8 -9
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/constants/featureFlags.d.ts +0 -1
- package/dist/integrations/constants/featureFlags.js +1 -2
- package/dist/integrations/constants/featureFlags.js.map +1 -1
- package/dist/integrations/constants/permissions.d.ts +0 -1
- package/dist/integrations/constants/permissions.js +1 -2
- package/dist/integrations/constants/permissions.js.map +1 -1
- package/dist/integrations/events/integrations-events.d.ts +0 -1
- package/dist/integrations/events/useIntegrationsEventBus.d.ts +0 -2
- package/dist/integrations/events/useIntegrationsEventBus.js +1 -2
- package/dist/integrations/events/useIntegrationsEventBus.js.map +1 -1
- package/dist/integrations/hooks/useConnections.d.ts +3 -14
- package/dist/integrations/hooks/useConnections.js +74 -75
- package/dist/integrations/hooks/useConnections.js.map +1 -1
- package/dist/integrations/hooks/useConnectorSubmissions.d.ts +2 -10
- package/dist/integrations/hooks/useConnectorSubmissions.js +23 -24
- package/dist/integrations/hooks/useConnectorSubmissions.js.map +1 -1
- package/dist/integrations/hooks/useFormatDate.d.ts +0 -1
- package/dist/integrations/hooks/useFormatDate.js +1 -2
- package/dist/integrations/hooks/useFormatDate.js.map +1 -1
- package/dist/integrations/hooks/useFormatLastUsed.d.ts +0 -1
- package/dist/integrations/hooks/useFormatLastUsed.js +1 -2
- package/dist/integrations/hooks/useFormatLastUsed.js.map +1 -1
- package/dist/integrations/hooks/useLabel.d.ts +0 -2
- package/dist/integrations/hooks/useLabel.js +1 -2
- package/dist/integrations/hooks/useLabel.js.map +1 -1
- package/dist/integrations/hooks/useLogs.d.ts +1 -6
- package/dist/integrations/hooks/useLogs.js +6 -7
- package/dist/integrations/hooks/useLogs.js.map +1 -1
- package/dist/integrations/hooks/useMailbox.d.ts +77 -40
- package/dist/integrations/hooks/useMailbox.js +113 -35
- package/dist/integrations/hooks/useMailbox.js.map +1 -1
- package/dist/integrations/hooks/useProviders.d.ts +3 -14
- package/dist/integrations/hooks/useProviders.js +42 -43
- package/dist/integrations/hooks/useProviders.js.map +1 -1
- package/dist/integrations/hooks/useTr.d.ts +0 -1
- package/dist/integrations/hooks/useTr.js +1 -2
- package/dist/integrations/hooks/useTr.js.map +1 -1
- package/dist/integrations/index.d.ts +0 -1
- package/dist/integrations/index.js +9 -8
- package/dist/integrations/pages/AddConnectionWizard.d.ts +1 -2
- package/dist/integrations/pages/AddConnectionWizard.js +291 -306
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.d.ts +1 -2
- package/dist/integrations/pages/ConnectionDetail.js +241 -246
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.d.ts +1 -2
- package/dist/integrations/pages/ConnectionLogs.js +154 -155
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.d.ts +1 -2
- package/dist/integrations/pages/ConnectionsList.js +40 -41
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/ConnectorReviewQueuePage.d.ts +1 -2
- package/dist/integrations/pages/ConnectorReviewQueuePage.js +9 -10
- package/dist/integrations/pages/ConnectorReviewQueuePage.js.map +1 -1
- package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts +1 -2
- package/dist/integrations/pages/ConnectorSubmissionsPage.js +138 -139
- package/dist/integrations/pages/ConnectorSubmissionsPage.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.d.ts +1 -2
- package/dist/integrations/pages/IntegrationsOverview.js +35 -36
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.d.ts +1 -2
- package/dist/integrations/pages/IntegrationsSettings.js +7 -8
- package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
- package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts +1 -2
- package/dist/integrations/pages/IntegrationsUserLandingPage.js +1 -2
- package/dist/integrations/pages/IntegrationsUserLandingPage.js.map +1 -1
- package/dist/integrations/pages/MailboxInbox.d.ts +1 -2
- package/dist/integrations/pages/MailboxInbox.js +442 -280
- package/dist/integrations/pages/MailboxInbox.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.d.ts +1 -2
- package/dist/integrations/pages/ProviderCatalog.js +107 -108
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.d.ts +1 -2
- package/dist/integrations/pages/ProviderDetail.js +21 -22
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.d.ts +1 -2
- package/dist/integrations/pages/ProviderEditorPage.js +261 -264
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/dist/integrations/providers/IntegrationsProvider.d.ts +0 -2
- package/dist/integrations/providers/IntegrationsProvider.js +109 -96
- package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
- package/dist/integrations/store/integrationsStore.d.ts +0 -2
- package/dist/integrations/store/integrationsStore.js +1 -2
- package/dist/integrations/store/integrationsStore.js.map +1 -1
- package/dist/integrations/store/mailboxStore.d.ts +3 -2
- package/dist/integrations/store/mailboxStore.js +8 -2
- package/dist/integrations/store/mailboxStore.js.map +1 -1
- package/dist/integrations/translations/en.d.ts +0 -1
- package/dist/integrations/types/index.d.ts +0 -1
- package/dist/integrations/utils/appearance.d.ts +0 -1
- package/dist/integrations/utils/appearance.js +1 -2
- package/dist/integrations/utils/appearance.js.map +1 -1
- package/dist/integrations/utils/cn.d.ts +0 -2
- package/dist/integrations/utils/cn.js +2 -3
- package/dist/integrations/utils/cn.js.map +1 -1
- package/dist/integrations/utils/constants.d.ts +0 -1
- package/dist/integrations/utils/constants.js +1 -2
- package/dist/integrations/utils/constants.js.map +1 -1
- package/dist/integrations/utils/integrationsHelpers.d.ts +0 -2
- package/dist/integrations/utils/integrationsHelpers.js +1 -2
- package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
- package/dist/integrations/utils/mailHtml.d.ts +31 -0
- package/dist/integrations/utils/mailHtml.js +126 -0
- package/dist/integrations/utils/mailHtml.js.map +1 -0
- package/dist/integrations/utils/mappers.d.ts +0 -2
- package/dist/integrations/utils/mappers.js +2 -3
- package/dist/integrations/utils/mappers.js.map +1 -1
- package/dist/integrations/utils/navigation.d.ts +0 -1
- package/dist/integrations/utils/navigation.js +2 -8
- package/dist/integrations/utils/navigation.js.map +1 -1
- package/dist/integrations/utils/paths.d.ts +0 -1
- package/dist/integrations/utils/paths.js +1 -2
- package/dist/integrations/utils/paths.js.map +1 -1
- 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/dompurify/dist/purify.es.js +878 -0
- package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/utils/nativeBridge.d.ts +0 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +67 -50
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/integrations/ConnectSourceDialog.d.ts.map +0 -1
- package/dist/integrations/ConnectionsPanel.d.ts.map +0 -1
- package/dist/integrations/IntegrationsAdminRoot.d.ts.map +0 -1
- package/dist/integrations/IntegrationsAdminRoutes.d.ts.map +0 -1
- package/dist/integrations/IntegrationsRoot.d.ts.map +0 -1
- package/dist/integrations/IntegrationsUserRoutes.d.ts.map +0 -1
- package/dist/integrations/components/AddConnectionDialog.d.ts.map +0 -1
- package/dist/integrations/components/AuthMethodsEditor.d.ts.map +0 -1
- package/dist/integrations/components/ConfirmDialog.d.ts.map +0 -1
- package/dist/integrations/components/ConnectionCard.d.ts.map +0 -1
- package/dist/integrations/components/ConnectionModalFrame.d.ts.map +0 -1
- package/dist/integrations/components/ConnectionSharing.d.ts.map +0 -1
- package/dist/integrations/components/ConnectionStatusBadge.d.ts.map +0 -1
- package/dist/integrations/components/ConnectorSubmissionCard.d.ts.map +0 -1
- package/dist/integrations/components/ConnectorSubmissionPager.d.ts.map +0 -1
- package/dist/integrations/components/ProviderCard.d.ts.map +0 -1
- package/dist/integrations/constants/featureFlags.d.ts.map +0 -1
- package/dist/integrations/constants/permissions.d.ts.map +0 -1
- package/dist/integrations/events/integrations-events.d.ts.map +0 -1
- package/dist/integrations/events/useIntegrationsEventBus.d.ts.map +0 -1
- package/dist/integrations/hooks/useConnections.d.ts.map +0 -1
- package/dist/integrations/hooks/useConnectorSubmissions.d.ts.map +0 -1
- package/dist/integrations/hooks/useFormatDate.d.ts.map +0 -1
- package/dist/integrations/hooks/useFormatLastUsed.d.ts.map +0 -1
- package/dist/integrations/hooks/useLabel.d.ts.map +0 -1
- package/dist/integrations/hooks/useLogs.d.ts.map +0 -1
- package/dist/integrations/hooks/useMailbox.d.ts.map +0 -1
- package/dist/integrations/hooks/useProviders.d.ts.map +0 -1
- package/dist/integrations/hooks/useTr.d.ts.map +0 -1
- package/dist/integrations/index.d.ts.map +0 -1
- package/dist/integrations/pages/AddConnectionWizard.d.ts.map +0 -1
- package/dist/integrations/pages/ConnectionDetail.d.ts.map +0 -1
- package/dist/integrations/pages/ConnectionLogs.d.ts.map +0 -1
- package/dist/integrations/pages/ConnectionsList.d.ts.map +0 -1
- package/dist/integrations/pages/ConnectorReviewQueuePage.d.ts.map +0 -1
- package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts.map +0 -1
- package/dist/integrations/pages/IntegrationsOverview.d.ts.map +0 -1
- package/dist/integrations/pages/IntegrationsSettings.d.ts.map +0 -1
- package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts.map +0 -1
- package/dist/integrations/pages/MailboxInbox.d.ts.map +0 -1
- package/dist/integrations/pages/ProviderCatalog.d.ts.map +0 -1
- package/dist/integrations/pages/ProviderDetail.d.ts.map +0 -1
- package/dist/integrations/pages/ProviderEditorPage.d.ts.map +0 -1
- package/dist/integrations/providers/IntegrationsProvider.d.ts.map +0 -1
- package/dist/integrations/store/integrationsStore.d.ts.map +0 -1
- package/dist/integrations/store/mailboxStore.d.ts.map +0 -1
- package/dist/integrations/translations/en.d.ts.map +0 -1
- package/dist/integrations/types/index.d.ts.map +0 -1
- package/dist/integrations/utils/appearance.d.ts.map +0 -1
- package/dist/integrations/utils/cn.d.ts.map +0 -1
- package/dist/integrations/utils/constants.d.ts.map +0 -1
- package/dist/integrations/utils/integrationsHelpers.d.ts.map +0 -1
- package/dist/integrations/utils/mappers.d.ts.map +0 -1
- package/dist/integrations/utils/navigation.d.ts.map +0 -1
- package/dist/integrations/utils/paths.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts.map +0 -1
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { MailboxFolder as r } from "../../generated/wspace-types.js";
|
|
5
|
-
import { useFormatDate as
|
|
6
|
-
import {
|
|
7
|
-
import { splitRecipients as
|
|
8
|
-
import { useMailboxStore as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { joinPath as t } from "../utils/paths.js";
|
|
3
|
+
import { useTr as n } from "../hooks/useTr.js";
|
|
4
|
+
import { MailboxFolder as r, MailboxKind as i, MailboxLabelKind as a } from "../../generated/wspace-types.js";
|
|
5
|
+
import { useFormatDate as o } from "../hooks/useFormatDate.js";
|
|
6
|
+
import { useIntegrations as s } from "../providers/IntegrationsProvider.js";
|
|
7
|
+
import { MAILBOX_SEND_ATTACHMENT_BYTES as c, splitRecipients as l, useMailboxAccounts as u, useMailboxLabels as d, useMailboxMessages as f, useMailboxThread as p, useMailboxThreadActions as m, useSendMail as h, useSetMailRead as g, useUploadMailAttachment as _ } from "../hooks/useMailbox.js";
|
|
8
|
+
import { useMailboxStore as v } from "../store/mailboxStore.js";
|
|
9
|
+
import { ConfirmDialog as y } from "../components/ConfirmDialog.js";
|
|
10
|
+
import { MailMessageBody as b } from "../components/MailMessageBody.js";
|
|
11
|
+
import { formatBytes as x } from "../utils/mailHtml.js";
|
|
12
|
+
import { useEffect as S, useId as C, useRef as w, useState as T } from "react";
|
|
13
|
+
import { Archive as E, ArrowLeft as D, Inbox as O, Loader2 as k, Mail as A, MailOpen as j, Paperclip as M, PenSquare as N, RefreshCw as P, Reply as F, Search as I, Send as L, Trash2 as R, X as z } from "lucide-react";
|
|
14
|
+
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
15
|
+
import { Button as U, IllustratedEmptyState as W, PagePurpose as G } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
// src/integrations/pages/MailboxInbox.tsx
|
|
17
|
+
function K(e) {
|
|
15
18
|
return e ? e.name ? `${e.name} <${e.email}>` : e.email : "";
|
|
16
19
|
}
|
|
17
|
-
function
|
|
20
|
+
function q(e) {
|
|
18
21
|
return e ? e.name || e.email : "";
|
|
19
22
|
}
|
|
20
|
-
var
|
|
23
|
+
var J = [
|
|
21
24
|
{
|
|
22
25
|
value: r.Inbox,
|
|
23
26
|
key: "inbox",
|
|
@@ -34,333 +37,460 @@ var I = [
|
|
|
34
37
|
label: "All mail"
|
|
35
38
|
}
|
|
36
39
|
];
|
|
37
|
-
function
|
|
38
|
-
let { connectionId: r,
|
|
39
|
-
|
|
40
|
+
function Y(t) {
|
|
41
|
+
let { connectionId: r, kind: i, replyTo: a, onClose: o, onSent: s } = t, u = n(), d = C(), { send: f, sending: p } = h(), m = _(), g = w(null), [v, y] = T([]), [b, S] = T(!1), E = c[i], D = Math.round(E / 1048576 * 10) / 10, O = async (e) => {
|
|
42
|
+
let t = Array.from(e ?? []);
|
|
43
|
+
if (g.current && (g.current.value = ""), t.length !== 0) {
|
|
44
|
+
if (G(null), v.length + t.length > 10) G(u("integrations.mailbox.compose.tooManyFiles", "A message can have at most {{max}} attachments", { max: 10 }));
|
|
45
|
+
else if ([...v, ...t].reduce((e, t) => e + t.size, 0) > E) G(u("integrations.mailbox.compose.filesTooLarge", "Attachments on one message can total at most {{max}} MB with this mailbox", { max: D }));
|
|
46
|
+
else {
|
|
47
|
+
S(!0);
|
|
48
|
+
try {
|
|
49
|
+
for (let e of t) {
|
|
50
|
+
let t = await m(e);
|
|
51
|
+
y((e) => [...e, t]);
|
|
52
|
+
}
|
|
53
|
+
} catch (e) {
|
|
54
|
+
G(e instanceof Error ? e.message : u("integrations.mailbox.compose.uploadFailed", "Could not upload the file"));
|
|
55
|
+
} finally {
|
|
56
|
+
S(!1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, [A, j] = T(a?.to ?? ""), [N, P] = T(""), [F, I] = T(a?.subject ?? ""), [R, B] = T(""), [W, G] = T(null), K = async (e) => {
|
|
61
|
+
e.preventDefault(), G(null);
|
|
40
62
|
try {
|
|
41
|
-
await
|
|
63
|
+
await f({
|
|
42
64
|
connectionId: r,
|
|
43
|
-
to:
|
|
44
|
-
cc:
|
|
45
|
-
subject:
|
|
46
|
-
bodyText:
|
|
47
|
-
replyToMessageId:
|
|
65
|
+
to: l(A),
|
|
66
|
+
cc: l(N),
|
|
67
|
+
subject: F,
|
|
68
|
+
bodyText: R,
|
|
69
|
+
replyToMessageId: a?.messageId,
|
|
70
|
+
attachmentFileIds: v.map((e) => e.fileId)
|
|
48
71
|
}), s();
|
|
49
72
|
} catch (e) {
|
|
50
|
-
|
|
73
|
+
G(e instanceof Error ? e.message : u("integrations.mailbox.compose.failed", "Could not send"));
|
|
51
74
|
}
|
|
52
|
-
},
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
onSubmit:
|
|
75
|
+
}, q = "w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary";
|
|
76
|
+
return /* @__PURE__ */ H("form", {
|
|
77
|
+
onSubmit: K,
|
|
55
78
|
className: "rounded-xl border border-border-seam bg-bg-surface p-4 space-y-3",
|
|
56
|
-
"aria-label":
|
|
79
|
+
"aria-label": a ? u("integrations.mailbox.compose.replyTitle", "Reply") : u("integrations.mailbox.compose.title", "New message"),
|
|
57
80
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ H("div", {
|
|
59
82
|
className: "flex items-center justify-between",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ V("h2", {
|
|
61
84
|
className: "text-sm font-semibold text-text-primary",
|
|
62
|
-
children:
|
|
63
|
-
}), /* @__PURE__ */
|
|
85
|
+
children: a ? u("integrations.mailbox.compose.replyTitle", "Reply") : u("integrations.mailbox.compose.title", "New message")
|
|
86
|
+
}), /* @__PURE__ */ V(U, {
|
|
64
87
|
type: "button",
|
|
65
88
|
variant: "ghost",
|
|
66
89
|
size: "icon",
|
|
67
|
-
onClick:
|
|
68
|
-
disabled:
|
|
69
|
-
"aria-label":
|
|
70
|
-
children: /* @__PURE__ */
|
|
90
|
+
onClick: o,
|
|
91
|
+
disabled: p,
|
|
92
|
+
"aria-label": u("integrations.common.close", "Close"),
|
|
93
|
+
children: /* @__PURE__ */ V(z, { size: 16 })
|
|
71
94
|
})]
|
|
72
95
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ H("div", {
|
|
74
97
|
className: "space-y-1",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
76
|
-
htmlFor: `${
|
|
98
|
+
children: [/* @__PURE__ */ V("label", {
|
|
99
|
+
htmlFor: `${d}-to`,
|
|
77
100
|
className: "text-xs font-medium text-text-secondary",
|
|
78
|
-
children:
|
|
79
|
-
}), /* @__PURE__ */
|
|
80
|
-
id: `${
|
|
101
|
+
children: u("integrations.mailbox.compose.to", "To")
|
|
102
|
+
}), /* @__PURE__ */ V("input", {
|
|
103
|
+
id: `${d}-to`,
|
|
81
104
|
type: "text",
|
|
82
|
-
value:
|
|
83
|
-
onChange: (e) =>
|
|
84
|
-
placeholder:
|
|
85
|
-
className:
|
|
105
|
+
value: A,
|
|
106
|
+
onChange: (e) => j(e.target.value),
|
|
107
|
+
placeholder: u("integrations.mailbox.compose.toPlaceholder", "name@example.com, another@example.com"),
|
|
108
|
+
className: q,
|
|
86
109
|
required: !0
|
|
87
110
|
})]
|
|
88
111
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ H("div", {
|
|
90
113
|
className: "space-y-1",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
92
|
-
htmlFor: `${
|
|
114
|
+
children: [/* @__PURE__ */ V("label", {
|
|
115
|
+
htmlFor: `${d}-cc`,
|
|
93
116
|
className: "text-xs font-medium text-text-secondary",
|
|
94
|
-
children:
|
|
95
|
-
}), /* @__PURE__ */
|
|
96
|
-
id: `${
|
|
117
|
+
children: u("integrations.mailbox.compose.cc", "Cc")
|
|
118
|
+
}), /* @__PURE__ */ V("input", {
|
|
119
|
+
id: `${d}-cc`,
|
|
97
120
|
type: "text",
|
|
98
|
-
value:
|
|
99
|
-
onChange: (e) =>
|
|
100
|
-
className:
|
|
121
|
+
value: N,
|
|
122
|
+
onChange: (e) => P(e.target.value),
|
|
123
|
+
className: q
|
|
101
124
|
})]
|
|
102
125
|
}),
|
|
103
|
-
!
|
|
126
|
+
!a && /* @__PURE__ */ H("div", {
|
|
104
127
|
className: "space-y-1",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
106
|
-
htmlFor: `${
|
|
128
|
+
children: [/* @__PURE__ */ V("label", {
|
|
129
|
+
htmlFor: `${d}-subject`,
|
|
107
130
|
className: "text-xs font-medium text-text-secondary",
|
|
108
|
-
children:
|
|
109
|
-
}), /* @__PURE__ */
|
|
110
|
-
id: `${
|
|
131
|
+
children: u("integrations.mailbox.compose.subject", "Subject")
|
|
132
|
+
}), /* @__PURE__ */ V("input", {
|
|
133
|
+
id: `${d}-subject`,
|
|
111
134
|
type: "text",
|
|
112
|
-
value:
|
|
113
|
-
onChange: (e) =>
|
|
135
|
+
value: F,
|
|
136
|
+
onChange: (e) => I(e.target.value),
|
|
114
137
|
maxLength: 998,
|
|
115
|
-
className:
|
|
138
|
+
className: q
|
|
116
139
|
})]
|
|
117
140
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ H("div", {
|
|
119
142
|
className: "space-y-1",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
121
|
-
htmlFor: `${
|
|
143
|
+
children: [/* @__PURE__ */ V("label", {
|
|
144
|
+
htmlFor: `${d}-body`,
|
|
122
145
|
className: "text-xs font-medium text-text-secondary",
|
|
123
|
-
children:
|
|
124
|
-
}), /* @__PURE__ */
|
|
125
|
-
id: `${
|
|
126
|
-
value:
|
|
127
|
-
onChange: (e) =>
|
|
146
|
+
children: u("integrations.mailbox.compose.body", "Message")
|
|
147
|
+
}), /* @__PURE__ */ V("textarea", {
|
|
148
|
+
id: `${d}-body`,
|
|
149
|
+
value: R,
|
|
150
|
+
onChange: (e) => B(e.target.value),
|
|
128
151
|
rows: 8,
|
|
129
|
-
className:
|
|
152
|
+
className: e(q, "resize-y"),
|
|
130
153
|
required: !0
|
|
131
154
|
})]
|
|
132
155
|
}),
|
|
133
|
-
|
|
156
|
+
/* @__PURE__ */ H("div", {
|
|
157
|
+
className: "space-y-2",
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ V("input", {
|
|
160
|
+
ref: g,
|
|
161
|
+
id: `${d}-files`,
|
|
162
|
+
type: "file",
|
|
163
|
+
multiple: !0,
|
|
164
|
+
"aria-label": u("integrations.mailbox.compose.attach", "Attach files"),
|
|
165
|
+
tabIndex: -1,
|
|
166
|
+
className: "sr-only",
|
|
167
|
+
onChange: (e) => void O(e.target.files),
|
|
168
|
+
disabled: p || b
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ H(U, {
|
|
171
|
+
type: "button",
|
|
172
|
+
variant: "outline",
|
|
173
|
+
size: "sm",
|
|
174
|
+
disabled: p || b || v.length >= 10,
|
|
175
|
+
onClick: () => g.current?.click(),
|
|
176
|
+
children: [b ? /* @__PURE__ */ V(k, {
|
|
177
|
+
size: 14,
|
|
178
|
+
className: "animate-spin"
|
|
179
|
+
}) : /* @__PURE__ */ V(M, { size: 14 }), b ? u("integrations.mailbox.compose.uploading", "Uploading…") : u("integrations.mailbox.compose.attach", "Attach files")]
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ V("p", {
|
|
182
|
+
className: "text-xs text-text-tertiary",
|
|
183
|
+
children: u("integrations.mailbox.compose.attachHint", "Up to {{count}} files, {{max}} MB in total. A copy is kept in your Files.", {
|
|
184
|
+
count: 10,
|
|
185
|
+
max: D
|
|
186
|
+
})
|
|
187
|
+
}),
|
|
188
|
+
v.length > 0 && /* @__PURE__ */ V("ul", {
|
|
189
|
+
className: "flex flex-wrap gap-2",
|
|
190
|
+
"data-testid": "mailbox-compose-attachments",
|
|
191
|
+
children: v.map((e) => /* @__PURE__ */ H("li", {
|
|
192
|
+
className: "flex items-center gap-1 rounded-full border border-border-subtle px-3 py-1 text-xs text-text-primary",
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ V(M, { size: 12 }),
|
|
195
|
+
/* @__PURE__ */ V("span", {
|
|
196
|
+
className: "max-w-48 truncate",
|
|
197
|
+
children: e.name
|
|
198
|
+
}),
|
|
199
|
+
/* @__PURE__ */ V("span", {
|
|
200
|
+
className: "text-text-tertiary",
|
|
201
|
+
children: x(e.size)
|
|
202
|
+
}),
|
|
203
|
+
/* @__PURE__ */ V("button", {
|
|
204
|
+
type: "button",
|
|
205
|
+
className: "ml-1 rounded-full p-0.5 hover:bg-accent",
|
|
206
|
+
disabled: p,
|
|
207
|
+
"aria-label": u("integrations.mailbox.compose.removeFile", "Remove {{name}}", { name: e.name }),
|
|
208
|
+
onClick: () => y((t) => t.filter((t) => t.fileId !== e.fileId)),
|
|
209
|
+
children: /* @__PURE__ */ V(z, { size: 12 })
|
|
210
|
+
})
|
|
211
|
+
]
|
|
212
|
+
}, e.fileId))
|
|
213
|
+
})
|
|
214
|
+
]
|
|
215
|
+
}),
|
|
216
|
+
W && /* @__PURE__ */ V("p", {
|
|
134
217
|
role: "alert",
|
|
135
218
|
className: "text-sm text-status-error-text",
|
|
136
|
-
children:
|
|
219
|
+
children: W
|
|
137
220
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ H("div", {
|
|
139
222
|
className: "flex justify-end gap-2",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ V(U, {
|
|
141
224
|
type: "button",
|
|
142
225
|
variant: "outline",
|
|
143
|
-
onClick:
|
|
144
|
-
disabled:
|
|
145
|
-
children:
|
|
146
|
-
}), /* @__PURE__ */
|
|
226
|
+
onClick: o,
|
|
227
|
+
disabled: p,
|
|
228
|
+
children: u("integrations.common.cancel", "Cancel")
|
|
229
|
+
}), /* @__PURE__ */ H(U, {
|
|
147
230
|
type: "submit",
|
|
148
|
-
disabled:
|
|
149
|
-
children: [
|
|
231
|
+
disabled: p || b || !R.trim() || !A.trim(),
|
|
232
|
+
children: [p ? /* @__PURE__ */ V(k, {
|
|
150
233
|
size: 16,
|
|
151
234
|
className: "animate-spin"
|
|
152
|
-
}) : /* @__PURE__ */
|
|
235
|
+
}) : /* @__PURE__ */ V(L, { size: 16 }), u("integrations.mailbox.compose.send", "Send")]
|
|
153
236
|
})]
|
|
154
237
|
})
|
|
155
238
|
]
|
|
156
239
|
});
|
|
157
240
|
}
|
|
158
|
-
function
|
|
159
|
-
let { connectionId:
|
|
160
|
-
|
|
241
|
+
function X(e) {
|
|
242
|
+
let { connectionId: t, kind: r, threadId: a, accountEmail: s, onBack: c, onRemoved: l } = e, u = n(), d = o(), { thread: f, loading: h, error: g, refetch: _ } = p(t, a), { archiveThread: v, trashThread: x, busy: S } = m(), [C, w] = T(!1), [O, A] = T(null), j = async (e) => {
|
|
243
|
+
A(null);
|
|
244
|
+
try {
|
|
245
|
+
e === "archived" ? await v(t, a) : await x(t, a), w(!1), l(e);
|
|
246
|
+
} catch (e) {
|
|
247
|
+
w(!1), A(e instanceof Error ? e.message : u("integrations.mailbox.actions.failed", "That did not work. Try again."));
|
|
248
|
+
}
|
|
249
|
+
}, [N, I] = T(!1), [L, z] = T(!1);
|
|
250
|
+
if (h && !f) return /* @__PURE__ */ V("div", {
|
|
161
251
|
className: "flex items-center justify-center py-16",
|
|
162
|
-
children: /* @__PURE__ */ k
|
|
252
|
+
children: /* @__PURE__ */ V(k, { className: "size-6 animate-spin text-primary" })
|
|
163
253
|
});
|
|
164
|
-
if (
|
|
254
|
+
if (g || !f) return /* @__PURE__ */ H("div", {
|
|
165
255
|
className: "p-6 space-y-3 text-center",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ V("p", {
|
|
167
257
|
role: "alert",
|
|
168
258
|
className: "text-sm text-status-error-text",
|
|
169
|
-
children:
|
|
170
|
-
}), /* @__PURE__ */
|
|
259
|
+
children: g?.message ?? u("integrations.mailbox.thread.notFound", "Conversation not found")
|
|
260
|
+
}), /* @__PURE__ */ H("div", {
|
|
171
261
|
className: "flex flex-wrap justify-center gap-2",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ H(U, {
|
|
173
263
|
variant: "ghost",
|
|
174
|
-
onClick:
|
|
264
|
+
onClick: c,
|
|
175
265
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ V(D, { size: 16 }),
|
|
177
267
|
" ",
|
|
178
|
-
|
|
268
|
+
u("integrations.common.back", "Back")
|
|
179
269
|
]
|
|
180
|
-
}), /* @__PURE__ */
|
|
270
|
+
}), /* @__PURE__ */ H(U, {
|
|
181
271
|
variant: "outline",
|
|
182
|
-
onClick: () =>
|
|
272
|
+
onClick: () => _(),
|
|
183
273
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ V(P, { size: 16 }),
|
|
185
275
|
" ",
|
|
186
|
-
|
|
276
|
+
u("integrations.mailbox.actions.retry", "Try again")
|
|
187
277
|
]
|
|
188
278
|
})]
|
|
189
279
|
})]
|
|
190
280
|
});
|
|
191
|
-
let
|
|
192
|
-
return /* @__PURE__ */
|
|
281
|
+
let B = f.messages[f.messages.length - 1], W = s?.trim().toLowerCase() ?? null, G = B ? W && B.from?.email.toLowerCase() === W ? B.to.map((e) => e.email).filter((e) => e.toLowerCase() !== W) : [B.from?.email ?? ""] : [];
|
|
282
|
+
return /* @__PURE__ */ H("div", {
|
|
193
283
|
className: "space-y-4",
|
|
194
284
|
"data-testid": "mailbox-thread",
|
|
195
285
|
children: [
|
|
196
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ H("div", {
|
|
197
287
|
className: "flex items-start gap-2",
|
|
198
|
-
children: [
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
288
|
+
children: [
|
|
289
|
+
/* @__PURE__ */ V(U, {
|
|
290
|
+
variant: "ghost",
|
|
291
|
+
size: "icon",
|
|
292
|
+
className: "lg:hidden",
|
|
293
|
+
onClick: c,
|
|
294
|
+
"aria-label": u("integrations.common.back", "Back"),
|
|
295
|
+
children: /* @__PURE__ */ V(D, { size: 18 })
|
|
296
|
+
}),
|
|
297
|
+
/* @__PURE__ */ V("h2", {
|
|
298
|
+
className: "min-w-0 flex-1 text-lg font-semibold text-text-primary break-words",
|
|
299
|
+
children: f.subject || u("integrations.mailbox.noSubject", "(no subject)")
|
|
300
|
+
}),
|
|
301
|
+
/* @__PURE__ */ H("div", {
|
|
302
|
+
className: "flex shrink-0 gap-1",
|
|
303
|
+
children: [/* @__PURE__ */ V(U, {
|
|
304
|
+
variant: "ghost",
|
|
305
|
+
size: "icon",
|
|
306
|
+
disabled: S,
|
|
307
|
+
onClick: () => void j("archived"),
|
|
308
|
+
"aria-label": u("integrations.mailbox.actions.archive", "Archive"),
|
|
309
|
+
title: u("integrations.mailbox.actions.archive", "Archive"),
|
|
310
|
+
children: /* @__PURE__ */ V(E, { size: 18 })
|
|
311
|
+
}), /* @__PURE__ */ V(U, {
|
|
312
|
+
variant: "ghost",
|
|
313
|
+
size: "icon",
|
|
314
|
+
disabled: S,
|
|
315
|
+
onClick: () => w(!0),
|
|
316
|
+
"aria-label": u("integrations.mailbox.actions.trash", "Delete"),
|
|
317
|
+
title: u("integrations.mailbox.actions.trash", "Delete"),
|
|
318
|
+
children: /* @__PURE__ */ V(R, { size: 18 })
|
|
319
|
+
})]
|
|
320
|
+
})
|
|
321
|
+
]
|
|
209
322
|
}),
|
|
210
|
-
|
|
323
|
+
O && /* @__PURE__ */ V("p", {
|
|
324
|
+
role: "alert",
|
|
325
|
+
className: "text-sm text-status-error-text",
|
|
326
|
+
children: O
|
|
327
|
+
}),
|
|
328
|
+
/* @__PURE__ */ V(y, {
|
|
329
|
+
open: C,
|
|
330
|
+
title: u("integrations.mailbox.trash.title", "Delete this conversation?"),
|
|
331
|
+
description: r === i.Outlook ? u("integrations.mailbox.trash.descriptionOutlook", "It moves to Deleted Items in Outlook, where you can restore it.") : u("integrations.mailbox.trash.descriptionGmail", "It moves to Trash in Gmail, where you can restore it for 30 days."),
|
|
332
|
+
confirmLabel: u("integrations.mailbox.actions.trash", "Delete"),
|
|
333
|
+
cancelLabel: u("integrations.common.cancel", "Cancel"),
|
|
334
|
+
loading: S,
|
|
335
|
+
destructive: !0,
|
|
336
|
+
onConfirm: () => void j("trashed"),
|
|
337
|
+
onCancel: () => w(!1)
|
|
338
|
+
}),
|
|
339
|
+
f.messages.map((e) => /* @__PURE__ */ H("article", {
|
|
211
340
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-4 space-y-2",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ H("header", {
|
|
213
342
|
className: "flex flex-wrap items-baseline justify-between gap-2",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ H("div", {
|
|
215
344
|
className: "min-w-0",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
345
|
+
children: [/* @__PURE__ */ V("p", {
|
|
217
346
|
className: "text-sm font-medium text-text-primary break-all",
|
|
218
|
-
children:
|
|
219
|
-
}), /* @__PURE__ */
|
|
347
|
+
children: K(e.from)
|
|
348
|
+
}), /* @__PURE__ */ H("p", {
|
|
220
349
|
className: "text-xs text-text-secondary break-all",
|
|
221
350
|
children: [
|
|
222
|
-
|
|
351
|
+
u("integrations.mailbox.thread.to", "To"),
|
|
223
352
|
":",
|
|
224
353
|
" ",
|
|
225
|
-
e.to.map(
|
|
226
|
-
e.cc.length > 0 && ` · ${
|
|
354
|
+
e.to.map(K).join(", "),
|
|
355
|
+
e.cc.length > 0 && ` · ${u("integrations.mailbox.thread.cc", "Cc")}: ${e.cc.map(K).join(", ")}`
|
|
227
356
|
]
|
|
228
357
|
})]
|
|
229
|
-
}), /* @__PURE__ */
|
|
358
|
+
}), /* @__PURE__ */ H("div", {
|
|
230
359
|
className: "flex items-center gap-2 text-xs text-text-tertiary",
|
|
231
|
-
children: [e.hasAttachments && /* @__PURE__ */
|
|
360
|
+
children: [e.hasAttachments && /* @__PURE__ */ V(M, {
|
|
232
361
|
size: 14,
|
|
233
|
-
"aria-label":
|
|
234
|
-
}), e.receivedAt && /* @__PURE__ */
|
|
362
|
+
"aria-label": u("integrations.mailbox.attachments", "Has attachments")
|
|
363
|
+
}), e.receivedAt && /* @__PURE__ */ V("time", {
|
|
235
364
|
dateTime: e.receivedAt,
|
|
236
|
-
children:
|
|
365
|
+
children: d(e.receivedAt)
|
|
237
366
|
})]
|
|
238
367
|
})]
|
|
239
|
-
}), /* @__PURE__ */
|
|
240
|
-
|
|
241
|
-
|
|
368
|
+
}), /* @__PURE__ */ V(b, {
|
|
369
|
+
connectionId: t,
|
|
370
|
+
message: e
|
|
242
371
|
})]
|
|
243
372
|
}, e.id)),
|
|
244
|
-
|
|
373
|
+
L && /* @__PURE__ */ V("p", {
|
|
245
374
|
role: "status",
|
|
246
375
|
className: "text-sm text-status-success-text",
|
|
247
|
-
children:
|
|
376
|
+
children: u("integrations.mailbox.compose.sent", "Message sent")
|
|
248
377
|
}),
|
|
249
|
-
|
|
250
|
-
connectionId:
|
|
378
|
+
B && (N ? /* @__PURE__ */ V(Y, {
|
|
379
|
+
connectionId: t,
|
|
380
|
+
kind: r,
|
|
251
381
|
replyTo: {
|
|
252
|
-
messageId:
|
|
253
|
-
to:
|
|
254
|
-
subject:
|
|
382
|
+
messageId: B.id,
|
|
383
|
+
to: G.filter(Boolean).join(", "),
|
|
384
|
+
subject: f.subject
|
|
255
385
|
},
|
|
256
|
-
onClose: () =>
|
|
386
|
+
onClose: () => I(!1),
|
|
257
387
|
onSent: () => {
|
|
258
|
-
|
|
388
|
+
I(!1), z(!0), _();
|
|
259
389
|
}
|
|
260
|
-
}) : /* @__PURE__ */
|
|
390
|
+
}) : /* @__PURE__ */ H(U, {
|
|
261
391
|
variant: "outline",
|
|
262
|
-
onClick: () =>
|
|
392
|
+
onClick: () => I(!0),
|
|
263
393
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ V(F, { size: 16 }),
|
|
265
395
|
" ",
|
|
266
|
-
|
|
396
|
+
u("integrations.mailbox.actions.reply", "Reply")
|
|
267
397
|
]
|
|
268
398
|
}))
|
|
269
399
|
]
|
|
270
400
|
});
|
|
271
401
|
}
|
|
272
|
-
function
|
|
273
|
-
let { messages:
|
|
274
|
-
return /* @__PURE__ */
|
|
402
|
+
function Z(t) {
|
|
403
|
+
let { messages: i, loading: a, error: s, refetch: c, folder: l, threadId: u, hasPrevious: d, nextPageToken: f, onOpen: p, onPrevious: m, onNext: h } = t, g = n(), _ = o();
|
|
404
|
+
return /* @__PURE__ */ H(B, { children: [s ? /* @__PURE__ */ H("div", {
|
|
275
405
|
className: "p-6 text-center space-y-3",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
406
|
+
children: [/* @__PURE__ */ V("p", {
|
|
277
407
|
role: "alert",
|
|
278
408
|
className: "text-sm text-status-error-text",
|
|
279
409
|
children: s.message
|
|
280
|
-
}), /* @__PURE__ */
|
|
410
|
+
}), /* @__PURE__ */ H(U, {
|
|
281
411
|
variant: "outline",
|
|
282
412
|
onClick: () => c(),
|
|
283
413
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ V(P, { size: 16 }),
|
|
285
415
|
" ",
|
|
286
416
|
g("integrations.mailbox.actions.retry", "Try again")
|
|
287
417
|
]
|
|
288
418
|
})]
|
|
289
|
-
}) :
|
|
419
|
+
}) : a && i.length === 0 ? /* @__PURE__ */ V("div", {
|
|
290
420
|
className: "flex items-center justify-center py-16",
|
|
291
|
-
children: /* @__PURE__ */ k
|
|
292
|
-
}) :
|
|
421
|
+
children: /* @__PURE__ */ V(k, { className: "size-6 animate-spin text-primary" })
|
|
422
|
+
}) : i.length === 0 ? /* @__PURE__ */ V("p", {
|
|
293
423
|
className: "p-6 text-sm text-text-secondary text-center",
|
|
294
424
|
children: g("integrations.mailbox.list.empty", "No messages here")
|
|
295
|
-
}) : /* @__PURE__ */
|
|
425
|
+
}) : /* @__PURE__ */ V("ul", {
|
|
296
426
|
className: "divide-y divide-border-subtle",
|
|
297
427
|
"data-testid": "mailbox-message-list",
|
|
298
|
-
children:
|
|
428
|
+
children: i.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H("button", {
|
|
299
429
|
type: "button",
|
|
300
|
-
onClick: () => p(
|
|
301
|
-
"aria-current": u ===
|
|
302
|
-
className:
|
|
430
|
+
onClick: () => p(t.threadId, t.id, t.isUnread),
|
|
431
|
+
"aria-current": u === t.threadId ? "true" : void 0,
|
|
432
|
+
className: e("w-full text-left px-4 py-3 transition-colors hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/30", u === t.threadId && "bg-accent"),
|
|
303
433
|
children: [
|
|
304
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ H("div", {
|
|
305
435
|
className: "flex items-center justify-between gap-2",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
307
|
-
className:
|
|
308
|
-
children: l === r.Sent ?
|
|
309
|
-
}), /* @__PURE__ */
|
|
436
|
+
children: [/* @__PURE__ */ V("span", {
|
|
437
|
+
className: e("truncate text-sm", t.isUnread ? "font-semibold text-text-primary" : "text-text-secondary"),
|
|
438
|
+
children: l === r.Sent ? t.to.map(q).join(", ") : q(t.from)
|
|
439
|
+
}), /* @__PURE__ */ H("span", {
|
|
310
440
|
className: "flex shrink-0 items-center gap-1 text-xs text-text-tertiary",
|
|
311
441
|
children: [
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
442
|
+
t.hasAttachments && /* @__PURE__ */ V(M, { size: 12 }),
|
|
443
|
+
t.isUnread ? /* @__PURE__ */ V(A, { size: 12 }) : /* @__PURE__ */ V(j, { size: 12 }),
|
|
444
|
+
t.receivedAt ? _(t.receivedAt) : ""
|
|
315
445
|
]
|
|
316
446
|
})]
|
|
317
447
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
className:
|
|
320
|
-
children:
|
|
448
|
+
/* @__PURE__ */ V("p", {
|
|
449
|
+
className: e("truncate text-sm", t.isUnread ? "font-medium text-text-primary" : "text-text-primary"),
|
|
450
|
+
children: t.subject || g("integrations.mailbox.noSubject", "(no subject)")
|
|
321
451
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ V("p", {
|
|
323
453
|
className: "truncate text-xs text-text-secondary",
|
|
324
|
-
children:
|
|
454
|
+
children: t.snippet
|
|
325
455
|
})
|
|
326
456
|
]
|
|
327
|
-
}) },
|
|
328
|
-
}), (d || f) && /* @__PURE__ */
|
|
457
|
+
}) }, t.id))
|
|
458
|
+
}), (d || f) && /* @__PURE__ */ H("div", {
|
|
329
459
|
className: "flex justify-between gap-2 border-t border-border-subtle p-3",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ V(U, {
|
|
331
461
|
variant: "outline",
|
|
332
462
|
size: "sm",
|
|
333
|
-
disabled: !d ||
|
|
463
|
+
disabled: !d || a,
|
|
334
464
|
onClick: m,
|
|
335
465
|
children: g("integrations.common.previous", "Previous")
|
|
336
|
-
}), /* @__PURE__ */
|
|
466
|
+
}), /* @__PURE__ */ V(U, {
|
|
337
467
|
variant: "outline",
|
|
338
468
|
size: "sm",
|
|
339
|
-
disabled: !f ||
|
|
469
|
+
disabled: !f || a,
|
|
340
470
|
onClick: () => f && h(f),
|
|
341
471
|
children: g("integrations.common.next", "Next")
|
|
342
472
|
})]
|
|
343
473
|
})] });
|
|
344
474
|
}
|
|
345
|
-
function
|
|
346
|
-
let r =
|
|
347
|
-
return /* @__PURE__ */
|
|
475
|
+
function Q(e) {
|
|
476
|
+
let r = n(), { basePath: i = "/", navigate: a } = s(), o = t(i, "providers");
|
|
477
|
+
return /* @__PURE__ */ H("div", {
|
|
348
478
|
className: "space-y-6 p-6 max-w-5xl mx-auto",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
350
|
-
icon: /* @__PURE__ */
|
|
479
|
+
children: [/* @__PURE__ */ V(G, {
|
|
480
|
+
icon: /* @__PURE__ */ V(A, { size: 16 }),
|
|
351
481
|
children: r("integrations.mailbox.purpose", "Read and send mail from your own Gmail or Outlook account without leaving Workspaces. Only you can open your mailbox; sharing a connection never shares your mail.")
|
|
352
|
-
}),
|
|
482
|
+
}), e.errorMessage ? /* @__PURE__ */ V("p", {
|
|
353
483
|
role: "alert",
|
|
354
484
|
className: "text-sm text-status-error-text text-center",
|
|
355
|
-
children:
|
|
356
|
-
}) : /* @__PURE__ */
|
|
485
|
+
children: e.errorMessage
|
|
486
|
+
}) : /* @__PURE__ */ V(W, {
|
|
357
487
|
illustration: "empty-data",
|
|
358
488
|
title: r("integrations.mailbox.empty.title", "Connect a mailbox"),
|
|
359
489
|
description: r("integrations.mailbox.empty.description", "Connect Google Gmail or Microsoft Outlook from Providers, then come back here to read and send mail."),
|
|
360
|
-
action: /* @__PURE__ */
|
|
361
|
-
onClick: () =>
|
|
490
|
+
action: /* @__PURE__ */ H(U, {
|
|
491
|
+
onClick: () => a?.(o),
|
|
362
492
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ V(A, { size: 16 }),
|
|
364
494
|
" ",
|
|
365
495
|
r("integrations.mailbox.empty.action", "Connect Gmail or Outlook")
|
|
366
496
|
]
|
|
@@ -368,47 +498,47 @@ function B(n) {
|
|
|
368
498
|
})]
|
|
369
499
|
});
|
|
370
500
|
}
|
|
371
|
-
function
|
|
372
|
-
let { accounts:
|
|
373
|
-
return /* @__PURE__ */
|
|
501
|
+
function $(e) {
|
|
502
|
+
let { accounts: t, connectionId: r } = e, i = n(), a = C(), o = v((e) => e.composing), s = v((e) => e.selectConnection), c = v((e) => e.startCompose), l = t.find((e) => e.connectionId === r) ?? null;
|
|
503
|
+
return /* @__PURE__ */ V("div", {
|
|
374
504
|
className: "rounded-xl border border-border-seam bg-accent-wash p-4 sm:p-6",
|
|
375
|
-
children: /* @__PURE__ */
|
|
505
|
+
children: /* @__PURE__ */ H("div", {
|
|
376
506
|
className: "flex flex-wrap items-center justify-between gap-4",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
507
|
+
children: [/* @__PURE__ */ H("div", {
|
|
378
508
|
className: "flex items-center gap-3",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ V("div", {
|
|
380
510
|
className: "p-2.5 rounded-lg bg-action-primary-bg/10",
|
|
381
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ V(O, {
|
|
382
512
|
size: 24,
|
|
383
513
|
className: "text-primary"
|
|
384
514
|
})
|
|
385
|
-
}), /* @__PURE__ */
|
|
515
|
+
}), /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("h1", {
|
|
386
516
|
className: "text-2xl font-bold text-text-primary",
|
|
387
517
|
children: i("integrations.mailbox.title", "Inbox")
|
|
388
|
-
}), /* @__PURE__ */
|
|
518
|
+
}), /* @__PURE__ */ V("p", {
|
|
389
519
|
className: "text-sm text-text-secondary",
|
|
390
520
|
children: l?.emailAddress ?? l?.name ?? i("integrations.mailbox.subtitle", "Your connected mail")
|
|
391
521
|
})] })]
|
|
392
|
-
}), /* @__PURE__ */
|
|
522
|
+
}), /* @__PURE__ */ H("div", {
|
|
393
523
|
className: "flex flex-wrap items-center gap-2",
|
|
394
|
-
children: [
|
|
524
|
+
children: [t.length > 1 && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("label", {
|
|
395
525
|
htmlFor: `${a}-account`,
|
|
396
526
|
className: "sr-only",
|
|
397
527
|
children: i("integrations.mailbox.account", "Mailbox")
|
|
398
|
-
}), /* @__PURE__ */
|
|
528
|
+
}), /* @__PURE__ */ V("select", {
|
|
399
529
|
id: `${a}-account`,
|
|
400
530
|
value: r ?? "",
|
|
401
531
|
disabled: o,
|
|
402
532
|
onChange: (e) => s(e.target.value),
|
|
403
533
|
className: "px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm text-text-primary",
|
|
404
|
-
children:
|
|
534
|
+
children: t.map((e) => /* @__PURE__ */ V("option", {
|
|
405
535
|
value: e.connectionId,
|
|
406
536
|
children: e.emailAddress ?? e.name
|
|
407
537
|
}, e.connectionId))
|
|
408
|
-
})] }), /* @__PURE__ */
|
|
538
|
+
})] }), /* @__PURE__ */ H(U, {
|
|
409
539
|
onClick: c,
|
|
410
540
|
children: [
|
|
411
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ V(N, { size: 16 }),
|
|
412
542
|
" ",
|
|
413
543
|
i("integrations.mailbox.actions.compose", "Compose")
|
|
414
544
|
]
|
|
@@ -417,49 +547,70 @@ function V(e) {
|
|
|
417
547
|
})
|
|
418
548
|
});
|
|
419
549
|
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
550
|
+
var ee = /* @__PURE__ */ new Set(["INBOX", "SENT"]);
|
|
551
|
+
function te(t) {
|
|
552
|
+
let r = n(), i = C(), o = v((e) => e.folder), s = v((e) => e.folderId), c = v((e) => e.query), l = v((e) => e.selectFolder), u = v((e) => e.selectLabel), f = v((e) => e.search), { labels: p } = d(t.connectionId), m = p.filter((e) => !(e.kind === a.System && ee.has(e.id))), [h, g] = T(c);
|
|
553
|
+
return /* @__PURE__ */ H("div", {
|
|
423
554
|
className: "flex flex-col sm:flex-row gap-3",
|
|
424
555
|
children: [
|
|
425
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ V("div", {
|
|
426
557
|
className: "flex gap-1 rounded-lg border border-border-subtle bg-bg-surface p-1",
|
|
427
558
|
role: "group",
|
|
428
559
|
"aria-label": r("integrations.mailbox.folders.ariaLabel", "Folders"),
|
|
429
|
-
children:
|
|
560
|
+
children: J.map((t) => /* @__PURE__ */ V("button", {
|
|
430
561
|
type: "button",
|
|
431
|
-
"aria-pressed":
|
|
432
|
-
onClick: () =>
|
|
433
|
-
className:
|
|
434
|
-
children: r(`integrations.mailbox.folders.${
|
|
435
|
-
},
|
|
562
|
+
"aria-pressed": !s && o === t.value,
|
|
563
|
+
onClick: () => l(t.value),
|
|
564
|
+
className: e("px-3 py-1.5 text-sm rounded-md transition-colors", !s && o === t.value ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-accent"),
|
|
565
|
+
children: r(`integrations.mailbox.folders.${t.key}`, t.label)
|
|
566
|
+
}, t.value))
|
|
436
567
|
}),
|
|
437
|
-
/* @__PURE__ */
|
|
568
|
+
m.length > 0 && /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
|
|
569
|
+
htmlFor: `${i}-label`,
|
|
570
|
+
className: "sr-only",
|
|
571
|
+
children: r("integrations.mailbox.labels.ariaLabel", "Labels and folders")
|
|
572
|
+
}), /* @__PURE__ */ H("select", {
|
|
573
|
+
id: `${i}-label`,
|
|
574
|
+
value: s ?? "",
|
|
575
|
+
onChange: (e) => {
|
|
576
|
+
e.target.value ? u(e.target.value) : l(o);
|
|
577
|
+
},
|
|
578
|
+
className: "w-full sm:w-48 px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm text-text-primary",
|
|
579
|
+
"data-testid": "mailbox-label-select",
|
|
580
|
+
children: [/* @__PURE__ */ V("option", {
|
|
581
|
+
value: "",
|
|
582
|
+
children: r("integrations.mailbox.labels.placeholder", "More folders…")
|
|
583
|
+
}), m.map((e) => /* @__PURE__ */ V("option", {
|
|
584
|
+
value: e.id,
|
|
585
|
+
children: e.unreadCount ? `${e.name} (${e.unreadCount})` : e.name
|
|
586
|
+
}, e.id))]
|
|
587
|
+
})] }),
|
|
588
|
+
/* @__PURE__ */ H("form", {
|
|
438
589
|
className: "flex-1 relative",
|
|
439
590
|
onSubmit: (e) => {
|
|
440
|
-
e.preventDefault(),
|
|
591
|
+
e.preventDefault(), f(h);
|
|
441
592
|
},
|
|
442
|
-
children: [/* @__PURE__ */
|
|
593
|
+
children: [/* @__PURE__ */ V(I, {
|
|
443
594
|
size: 16,
|
|
444
595
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
445
|
-
}), /* @__PURE__ */
|
|
596
|
+
}), /* @__PURE__ */ V("input", {
|
|
446
597
|
type: "search",
|
|
447
|
-
value:
|
|
448
|
-
onChange: (e) =>
|
|
598
|
+
value: h,
|
|
599
|
+
onChange: (e) => g(e.target.value),
|
|
449
600
|
maxLength: 500,
|
|
450
601
|
"aria-label": r("integrations.mailbox.search.ariaLabel", "Search mail"),
|
|
451
602
|
placeholder: r("integrations.mailbox.search.placeholder", "Search mail"),
|
|
452
603
|
className: "w-full pl-9 pr-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
|
|
453
604
|
})]
|
|
454
605
|
}),
|
|
455
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ H(U, {
|
|
456
607
|
variant: "outline",
|
|
457
|
-
onClick:
|
|
458
|
-
disabled:
|
|
608
|
+
onClick: t.onRefresh,
|
|
609
|
+
disabled: t.loading,
|
|
459
610
|
children: [
|
|
460
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ V(P, {
|
|
461
612
|
size: 16,
|
|
462
|
-
className:
|
|
613
|
+
className: e(t.loading && "animate-spin")
|
|
463
614
|
}),
|
|
464
615
|
" ",
|
|
465
616
|
r("integrations.mailbox.actions.refresh", "Refresh")
|
|
@@ -468,83 +619,94 @@ function H(e) {
|
|
|
468
619
|
]
|
|
469
620
|
});
|
|
470
621
|
}
|
|
471
|
-
function
|
|
472
|
-
let { accounts:
|
|
473
|
-
|
|
474
|
-
let u =
|
|
475
|
-
connectionId:
|
|
476
|
-
folder:
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
622
|
+
function ne(t) {
|
|
623
|
+
let { accounts: a } = t, o = n(), s = v(), c = v((e) => e.reset), l = g();
|
|
624
|
+
S(() => c, [c]);
|
|
625
|
+
let u = a.find((e) => e.connectionId === s.selectedConnectionId) ?? a[0] ?? null, d = u?.connectionId ?? null, [p, m] = T(null), { messages: h, nextPageToken: _, loading: y, error: b, refetch: x } = f({
|
|
626
|
+
connectionId: d,
|
|
627
|
+
folder: s.folder,
|
|
628
|
+
folderId: s.folderId,
|
|
629
|
+
query: s.query,
|
|
630
|
+
pageToken: s.pageTokens[s.pageTokens.length - 1] ?? null
|
|
631
|
+
}), C = (e, t, n) => {
|
|
632
|
+
m(null), s.openThread(e), n && d && l(d, t, !0).then(() => x(), () => void 0);
|
|
633
|
+
}, w = !!(s.threadId || s.composing);
|
|
634
|
+
return /* @__PURE__ */ H("div", {
|
|
483
635
|
className: "space-y-4 p-4 sm:p-6 max-w-7xl mx-auto",
|
|
484
636
|
"data-testid": "mailbox-inbox",
|
|
485
637
|
children: [
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
accounts:
|
|
488
|
-
connectionId:
|
|
638
|
+
/* @__PURE__ */ V($, {
|
|
639
|
+
accounts: a,
|
|
640
|
+
connectionId: d
|
|
489
641
|
}),
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
|
|
492
|
-
|
|
642
|
+
/* @__PURE__ */ V(te, {
|
|
643
|
+
connectionId: d,
|
|
644
|
+
loading: y,
|
|
645
|
+
onRefresh: () => void x()
|
|
646
|
+
}, d ?? "none"),
|
|
647
|
+
p && !s.threadId && /* @__PURE__ */ V("p", {
|
|
648
|
+
role: "status",
|
|
649
|
+
className: "text-sm text-status-success-text",
|
|
650
|
+
children: p
|
|
493
651
|
}),
|
|
494
|
-
|
|
652
|
+
s.sentNotice && /* @__PURE__ */ V("p", {
|
|
495
653
|
role: "status",
|
|
496
654
|
className: "text-sm text-status-success-text",
|
|
497
|
-
children:
|
|
655
|
+
children: o("integrations.mailbox.compose.sent", "Message sent")
|
|
498
656
|
}),
|
|
499
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ H("div", {
|
|
500
658
|
className: "grid gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(0,3fr)]",
|
|
501
|
-
children: [/* @__PURE__ */
|
|
502
|
-
"aria-label":
|
|
503
|
-
className:
|
|
504
|
-
children: /* @__PURE__ */
|
|
659
|
+
children: [/* @__PURE__ */ V("section", {
|
|
660
|
+
"aria-label": o("integrations.mailbox.list.ariaLabel", "Messages"),
|
|
661
|
+
className: e("rounded-xl border border-border-subtle bg-bg-surface overflow-hidden", w && "hidden lg:block"),
|
|
662
|
+
children: /* @__PURE__ */ V(Z, {
|
|
505
663
|
messages: h,
|
|
506
|
-
loading:
|
|
507
|
-
error:
|
|
508
|
-
refetch:
|
|
509
|
-
folder:
|
|
510
|
-
threadId:
|
|
511
|
-
hasPrevious:
|
|
512
|
-
nextPageToken:
|
|
513
|
-
onOpen:
|
|
514
|
-
onPrevious:
|
|
515
|
-
onNext:
|
|
664
|
+
loading: y,
|
|
665
|
+
error: b,
|
|
666
|
+
refetch: x,
|
|
667
|
+
folder: s.folder,
|
|
668
|
+
threadId: s.threadId,
|
|
669
|
+
hasPrevious: s.pageTokens.length > 1,
|
|
670
|
+
nextPageToken: _,
|
|
671
|
+
onOpen: C,
|
|
672
|
+
onPrevious: s.previousPage,
|
|
673
|
+
onNext: s.nextPage
|
|
516
674
|
})
|
|
517
|
-
}), /* @__PURE__ */
|
|
518
|
-
className:
|
|
519
|
-
children:
|
|
520
|
-
connectionId:
|
|
521
|
-
|
|
675
|
+
}), /* @__PURE__ */ V("section", {
|
|
676
|
+
className: e(!w && "hidden lg:block"),
|
|
677
|
+
children: s.composing && d ? /* @__PURE__ */ V(Y, {
|
|
678
|
+
connectionId: d,
|
|
679
|
+
kind: u?.kind ?? i.Gmail,
|
|
680
|
+
onClose: s.closeCompose,
|
|
522
681
|
onSent: () => {
|
|
523
|
-
|
|
682
|
+
s.composeSent(), s.folder === r.Sent && x();
|
|
524
683
|
}
|
|
525
|
-
}) :
|
|
526
|
-
connectionId:
|
|
527
|
-
|
|
684
|
+
}) : s.threadId && d ? /* @__PURE__ */ V(X, {
|
|
685
|
+
connectionId: d,
|
|
686
|
+
kind: u?.kind ?? i.Gmail,
|
|
687
|
+
threadId: s.threadId,
|
|
528
688
|
accountEmail: u?.emailAddress ?? null,
|
|
529
|
-
onBack:
|
|
530
|
-
|
|
689
|
+
onBack: s.closeThread,
|
|
690
|
+
onRemoved: (e) => {
|
|
691
|
+
s.closeThread(), m(e === "archived" ? o("integrations.mailbox.notice.archived", "Conversation archived") : o("integrations.mailbox.notice.trashed", "Conversation moved to the trash")), x();
|
|
692
|
+
}
|
|
693
|
+
}, `${d}:${s.threadId}`) : /* @__PURE__ */ V("div", {
|
|
531
694
|
className: "rounded-xl border border-dashed border-border-subtle p-10 text-center text-sm text-text-secondary",
|
|
532
|
-
children:
|
|
695
|
+
children: o("integrations.mailbox.thread.placeholder", "Select a message to read it")
|
|
533
696
|
})
|
|
534
697
|
})]
|
|
535
698
|
})
|
|
536
699
|
]
|
|
537
700
|
});
|
|
538
701
|
}
|
|
539
|
-
function
|
|
540
|
-
let { accounts: e, answered: t, error: n } =
|
|
541
|
-
return !t && !n ? /* @__PURE__ */
|
|
702
|
+
function re() {
|
|
703
|
+
let { accounts: e, answered: t, error: n } = u();
|
|
704
|
+
return !t && !n ? /* @__PURE__ */ V("div", {
|
|
542
705
|
className: "flex items-center justify-center py-24",
|
|
543
706
|
"data-testid": "mailbox-loading",
|
|
544
|
-
children: /* @__PURE__ */ k
|
|
545
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
707
|
+
children: /* @__PURE__ */ V(k, { className: "size-6 animate-spin text-primary" })
|
|
708
|
+
}) : e.length === 0 ? /* @__PURE__ */ V(Q, { errorMessage: n?.message ?? null }) : /* @__PURE__ */ V(ne, { accounts: e });
|
|
546
709
|
}
|
|
547
|
-
|
|
548
|
-
export { W as MailboxInbox };
|
|
710
|
+
export { re as MailboxInbox };
|
|
549
711
|
|
|
550
712
|
//# sourceMappingURL=MailboxInbox.js.map
|