@arbidocs/blocks 0.5.33 → 0.5.35
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/README.md +32 -0
- package/dist/{chunk-H7L43DIE.js → chunk-46WCQ4F3.js} +8 -3
- package/dist/chunk-46WCQ4F3.js.map +1 -0
- package/dist/{chunk-WUG24K7P.cjs → chunk-5V4HH7EH.cjs} +7 -2
- package/dist/chunk-5V4HH7EH.cjs.map +1 -0
- package/dist/collaboration/index.cjs +67 -67
- package/dist/collaboration/index.js +1 -1
- package/dist/connect/index.cjs +71 -56
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +16 -2
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/files/ConnectedGridView.d.ts +2 -0
- package/dist/connection/files/index.d.ts +1 -0
- package/dist/index.cjs +110 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +44 -3
- package/dist/index.js.map +1 -1
- package/dist/nav/actions.d.ts +24 -0
- package/dist/nav/manifest.d.ts +16 -0
- package/dist/nav/types.d.ts +2 -0
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/chunk-H7L43DIE.js.map +0 -1
- package/dist/chunk-WUG24K7P.cjs.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -33,7 +33,7 @@ var chunkKUQOHPKP_cjs = require('../chunk-KUQOHPKP.cjs');
|
|
|
33
33
|
var chunkVPPX5XUF_cjs = require('../chunk-VPPX5XUF.cjs');
|
|
34
34
|
require('../chunk-PCB2BPN3.cjs');
|
|
35
35
|
require('../chunk-NWNVWO6L.cjs');
|
|
36
|
-
var
|
|
36
|
+
var chunk5V4HH7EH_cjs = require('../chunk-5V4HH7EH.cjs');
|
|
37
37
|
require('../chunk-7G2LJMUG.cjs');
|
|
38
38
|
var chunkTM2D4XT4_cjs = require('../chunk-TM2D4XT4.cjs');
|
|
39
39
|
var chunk5Y6V7F6W_cjs = require('../chunk-5Y6V7F6W.cjs');
|
|
@@ -10571,7 +10571,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10571
10571
|
minWidth: 150,
|
|
10572
10572
|
sortable: true,
|
|
10573
10573
|
valueGetter: (p) => p.data ? memberName(p.data.user) : "",
|
|
10574
|
-
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10574
|
+
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(chunk5V4HH7EH_cjs.MemberNameCell, { children: renderMember(p.data) }) : null
|
|
10575
10575
|
},
|
|
10576
10576
|
{
|
|
10577
10577
|
colId: "email",
|
|
@@ -10581,7 +10581,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10581
10581
|
sortable: true,
|
|
10582
10582
|
valueGetter: (p) => p.data?.user.email ?? "",
|
|
10583
10583
|
// Plain text, not a mailto: the row's click selects it.
|
|
10584
|
-
cellRenderer: (p) => p.data?.user.email ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10584
|
+
cellRenderer: (p) => p.data?.user.email ? /* @__PURE__ */ jsxRuntime.jsx(chunk5V4HH7EH_cjs.MemberMutedText, { className: "truncate", title: p.data.user.email, children: p.data.user.email }) : null
|
|
10585
10585
|
},
|
|
10586
10586
|
{
|
|
10587
10587
|
colId: "role",
|
|
@@ -10595,7 +10595,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10595
10595
|
if (!row2) return null;
|
|
10596
10596
|
const lock = roleLock(row2.user.external_id, selfId, isOwner);
|
|
10597
10597
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10598
|
-
|
|
10598
|
+
chunk5V4HH7EH_cjs.MemberRoleCell,
|
|
10599
10599
|
{
|
|
10600
10600
|
role: row2.role,
|
|
10601
10601
|
roles: ALL_ROLES,
|
|
@@ -10615,7 +10615,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10615
10615
|
minWidth: 125,
|
|
10616
10616
|
sortable: true,
|
|
10617
10617
|
valueGetter: (p) => p.data ? new Date(p.data.joined_at).getTime() : "",
|
|
10618
|
-
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10618
|
+
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(chunk5V4HH7EH_cjs.MemberMutedText, { className: "cursor-default", children: ui.formatFriendlyDate(p.data.joined_at) }) : null
|
|
10619
10619
|
},
|
|
10620
10620
|
{
|
|
10621
10621
|
colId: "conversation_count",
|
|
@@ -10625,7 +10625,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10625
10625
|
sortable: true,
|
|
10626
10626
|
type: "numericColumn",
|
|
10627
10627
|
valueGetter: (p) => p.data?.conversation_count ?? 0,
|
|
10628
|
-
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10628
|
+
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(chunk5V4HH7EH_cjs.MemberMutedText, { children: p.data.conversation_count }) : null
|
|
10629
10629
|
},
|
|
10630
10630
|
{
|
|
10631
10631
|
colId: "document_count",
|
|
@@ -10635,7 +10635,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10635
10635
|
sortable: true,
|
|
10636
10636
|
type: "numericColumn",
|
|
10637
10637
|
valueGetter: (p) => p.data?.document_count ?? 0,
|
|
10638
|
-
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10638
|
+
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(chunk5V4HH7EH_cjs.MemberMutedText, { children: p.data.document_count }) : null
|
|
10639
10639
|
},
|
|
10640
10640
|
{
|
|
10641
10641
|
colId: "files_mb",
|
|
@@ -10648,7 +10648,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10648
10648
|
cellRenderer: (p) => {
|
|
10649
10649
|
if (!p.data) return null;
|
|
10650
10650
|
const mb = p.data.files_mb ?? 0;
|
|
10651
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10651
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunk5V4HH7EH_cjs.MemberMutedText, { children: [
|
|
10652
10652
|
mb >= 100 ? Math.round(mb).toLocaleString("en-US") : mb.toFixed(1),
|
|
10653
10653
|
" MB"
|
|
10654
10654
|
] });
|
|
@@ -10688,7 +10688,7 @@ Note that ${members2} may have saved private content in the ${workspaceWord2} th
|
|
|
10688
10688
|
);
|
|
10689
10689
|
const canChangeRoleSelected = selected.some((m) => !roleLock(m.user.external_id, selfId, isOwner));
|
|
10690
10690
|
const ownerOnly = `Only available to ${workspaceWord2} owner`;
|
|
10691
|
-
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10691
|
+
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunk5V4HH7EH_cjs.MemberListLoading, {});
|
|
10692
10692
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "workspace-users", className: "relative flex flex-col", children: [
|
|
10693
10693
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10694
10694
|
chunkLKK52DEY_cjs.GridView,
|
|
@@ -10706,7 +10706,7 @@ Note that ${members2} may have saved private content in the ${workspaceWord2} th
|
|
|
10706
10706
|
}
|
|
10707
10707
|
) }),
|
|
10708
10708
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(chunkV4ISCZJ7_cjs.SelectionBar, { count: selected.length, onClear: () => setSelected([]), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10709
|
-
|
|
10709
|
+
chunk5V4HH7EH_cjs.MemberBulkActions,
|
|
10710
10710
|
{
|
|
10711
10711
|
roles: BULK_ROLES,
|
|
10712
10712
|
onChangeRole: (value) => void changeSelectedRoles(value),
|
|
@@ -10996,7 +10996,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
10996
10996
|
error: foldersError
|
|
10997
10997
|
} = react.useMailboxFolders(catalog.vendor_key, open && tokensBridged);
|
|
10998
10998
|
const foldersLoading = !tokensBridged || foldersQueryLoading;
|
|
10999
|
-
const folderTree =
|
|
10999
|
+
const folderTree = chunk5V4HH7EH_cjs.buildMailFolderTree(folders);
|
|
11000
11000
|
const [expandAllNonce, setExpandAllNonce] = React9.useState(0);
|
|
11001
11001
|
const [collapseAllNonce, setCollapseAllNonce] = React9.useState(0);
|
|
11002
11002
|
const selectAllIds = folderTree.flatMap(
|
|
@@ -11127,7 +11127,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
11127
11127
|
}
|
|
11128
11128
|
)
|
|
11129
11129
|
) : folders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.SyncNote, { children: "No folders found." }) : /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.SyncTreeFrame, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11130
|
-
|
|
11130
|
+
chunk5V4HH7EH_cjs.MailFolderTree,
|
|
11131
11131
|
{
|
|
11132
11132
|
nodes: folderTree,
|
|
11133
11133
|
selected: selectedFolders,
|
|
@@ -14456,36 +14456,36 @@ function ConnectedAddContacts({
|
|
|
14456
14456
|
const [rows, setRows] = React9.useState(null);
|
|
14457
14457
|
const selfEmail = arbi.isLoggedIn ? arbi.user.identity()?.email : null;
|
|
14458
14458
|
const submit = async () => {
|
|
14459
|
-
if (!
|
|
14459
|
+
if (!chunk5V4HH7EH_cjs.emailTokens(text2).length) {
|
|
14460
14460
|
notify17("Please enter at least one email address", "error");
|
|
14461
14461
|
return;
|
|
14462
14462
|
}
|
|
14463
|
-
const plan =
|
|
14464
|
-
if (plan.send.length >
|
|
14465
|
-
notify17(`Maximum ${
|
|
14463
|
+
const plan = chunk5V4HH7EH_cjs.planContactInvites(text2, contacts, selfEmail);
|
|
14464
|
+
if (plan.send.length > chunk5V4HH7EH_cjs.MAX_INVITE_EMAILS) {
|
|
14465
|
+
notify17(`Maximum ${chunk5V4HH7EH_cjs.MAX_INVITE_EMAILS} new emails allowed per batch`, "error");
|
|
14466
14466
|
return;
|
|
14467
14467
|
}
|
|
14468
14468
|
setRows(plan.rows);
|
|
14469
14469
|
if (!plan.send.length) {
|
|
14470
|
-
notify17(
|
|
14470
|
+
notify17(chunk5V4HH7EH_cjs.summarizeUnsentInvites(plan.rows), "info");
|
|
14471
14471
|
onSuccess?.();
|
|
14472
14472
|
return;
|
|
14473
14473
|
}
|
|
14474
14474
|
try {
|
|
14475
14475
|
const response = await invite.mutateAsync(plan.send);
|
|
14476
|
-
setRows(
|
|
14477
|
-
const summary =
|
|
14476
|
+
setRows(chunk5V4HH7EH_cjs.applyContactInviteResults(plan, response));
|
|
14477
|
+
const summary = chunk5V4HH7EH_cjs.summarizeContactInvites(response);
|
|
14478
14478
|
notify17(summary.message, summary.failed ? "error" : "success");
|
|
14479
14479
|
onSuccess?.();
|
|
14480
14480
|
} catch (error) {
|
|
14481
14481
|
const message = browser.refusalReason(error, "Failed to add contacts");
|
|
14482
|
-
setRows(
|
|
14482
|
+
setRows(chunk5V4HH7EH_cjs.failContactInvites(plan, message));
|
|
14483
14483
|
notify17(message, "error");
|
|
14484
14484
|
}
|
|
14485
14485
|
};
|
|
14486
14486
|
if (rows)
|
|
14487
14487
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14488
|
-
|
|
14488
|
+
chunk5V4HH7EH_cjs.AddContactsResults,
|
|
14489
14489
|
{
|
|
14490
14490
|
rows,
|
|
14491
14491
|
onDone: onClose,
|
|
@@ -14496,11 +14496,11 @@ function ConnectedAddContacts({
|
|
|
14496
14496
|
}
|
|
14497
14497
|
);
|
|
14498
14498
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14499
|
-
|
|
14499
|
+
chunk5V4HH7EH_cjs.AddContactsForm,
|
|
14500
14500
|
{
|
|
14501
14501
|
value: text2,
|
|
14502
14502
|
onChange: setText,
|
|
14503
|
-
emailCount:
|
|
14503
|
+
emailCount: chunk5V4HH7EH_cjs.emailTokens(text2).length,
|
|
14504
14504
|
isPending: invite.isPending,
|
|
14505
14505
|
onSubmit: () => void submit(),
|
|
14506
14506
|
onCancel: onClose,
|
|
@@ -16848,7 +16848,7 @@ function ConnectedContactCardForm({
|
|
|
16848
16848
|
}) {
|
|
16849
16849
|
const { notify: notify17 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
16850
16850
|
const [form, setForm] = React9.useState(
|
|
16851
|
-
() => contact?.card ?
|
|
16851
|
+
() => contact?.card ? chunk5V4HH7EH_cjs.contactToForm(contact.card) : chunk5V4HH7EH_cjs.EMPTY_CONTACT_FORM
|
|
16852
16852
|
);
|
|
16853
16853
|
const [invite, setInvite] = React9.useState(false);
|
|
16854
16854
|
const [errors, setErrors] = React9.useState({});
|
|
@@ -16862,14 +16862,14 @@ function ConnectedContactCardForm({
|
|
|
16862
16862
|
const locked = !!contact && !contact.card;
|
|
16863
16863
|
const set = (key, value) => setForm((f) => ({ ...f, [key]: value }));
|
|
16864
16864
|
const submit = () => {
|
|
16865
|
-
const found =
|
|
16866
|
-
const email =
|
|
16865
|
+
const found = chunk5V4HH7EH_cjs.validateContactForm(form);
|
|
16866
|
+
const email = chunk5V4HH7EH_cjs.inviteEmail(form);
|
|
16867
16867
|
if (invite && !email && !found.emails) found.emails = "Add an e-mail address to invite";
|
|
16868
16868
|
setErrors(found);
|
|
16869
16869
|
setServerError(null);
|
|
16870
16870
|
setDuplicateOf(null);
|
|
16871
16871
|
if (Object.keys(found).length) return;
|
|
16872
|
-
const card =
|
|
16872
|
+
const card = chunk5V4HH7EH_cjs.formToContactCard(form);
|
|
16873
16873
|
const onError = (err) => {
|
|
16874
16874
|
setServerError(browser.refusalReason(err, "Could not save"));
|
|
16875
16875
|
if (err instanceof browser.DuplicateContactError && err.contactId !== contact?.external_id)
|
|
@@ -16877,10 +16877,10 @@ function ConnectedContactCardForm({
|
|
|
16877
16877
|
};
|
|
16878
16878
|
const onInvited = (result) => {
|
|
16879
16879
|
if (result.status === "failed") {
|
|
16880
|
-
setServerError(result.outcome_detail ||
|
|
16880
|
+
setServerError(result.outcome_detail || chunk5V4HH7EH_cjs.DEFAULT_CONTACT_OUTCOME_LABELS.failed);
|
|
16881
16881
|
return;
|
|
16882
16882
|
}
|
|
16883
|
-
notify17(
|
|
16883
|
+
notify17(chunk5V4HH7EH_cjs.contactOutcomeMessage({ ...result, outcome: result.outcome ?? "invited" }), "success");
|
|
16884
16884
|
onDone();
|
|
16885
16885
|
};
|
|
16886
16886
|
if (invite && email) {
|
|
@@ -16936,7 +16936,7 @@ function ConnectedContactCardForm({
|
|
|
16936
16936
|
linked && contact && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", "data-testid": "contact-linked-email", children: [
|
|
16937
16937
|
"ARBI: ",
|
|
16938
16938
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: contact.email }),
|
|
16939
|
-
|
|
16939
|
+
chunk5V4HH7EH_cjs.contactStatusLabel(contact.status) && ` \xB7 ${chunk5V4HH7EH_cjs.contactStatusLabel(contact.status)}`
|
|
16940
16940
|
] }),
|
|
16941
16941
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-1", children: [
|
|
16942
16942
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "contact-name", children: "Name" }),
|
|
@@ -17139,7 +17139,7 @@ function ImportVcfSummary({
|
|
|
17139
17139
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "min-w-0", children: [
|
|
17140
17140
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: o.file }),
|
|
17141
17141
|
": ",
|
|
17142
|
-
"error" in o ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: o.error }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children:
|
|
17142
|
+
"error" in o ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: o.error }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: chunk5V4HH7EH_cjs.summarizeImport(o.result) })
|
|
17143
17143
|
] }),
|
|
17144
17144
|
"result" in o && o.result.skipped.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "text-xs text-muted-foreground", children: [
|
|
17145
17145
|
/* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer", children: "Why cards were skipped" }),
|
|
@@ -17177,7 +17177,7 @@ function ConnectedContactsDirectory({
|
|
|
17177
17177
|
const [confirmDelete, setConfirmDelete] = React9.useState(null);
|
|
17178
17178
|
const [importState, setImportState] = React9.useState(null);
|
|
17179
17179
|
const contacts = React9.useMemo(() => data.filter((c) => !(c.user && ui.isAgent(c.user))), [data]);
|
|
17180
|
-
const shown = React9.useMemo(() => contacts.filter((c) =>
|
|
17180
|
+
const shown = React9.useMemo(() => contacts.filter((c) => chunk5V4HH7EH_cjs.matchesContact(c, q)), [contacts, q]);
|
|
17181
17181
|
if (editing)
|
|
17182
17182
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17183
17183
|
"section",
|
|
@@ -17196,7 +17196,7 @@ function ConnectedContactsDirectory({
|
|
|
17196
17196
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { className: "size-4" })
|
|
17197
17197
|
}
|
|
17198
17198
|
),
|
|
17199
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "truncate text-base font-semibold text-foreground", children: editing === "new" ? "New contact" :
|
|
17199
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "truncate text-base font-semibold text-foreground", children: editing === "new" ? "New contact" : chunk5V4HH7EH_cjs.contactName(editing) || "Contact" })
|
|
17200
17200
|
] }),
|
|
17201
17201
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17202
17202
|
ConnectedContactCardForm,
|
|
@@ -17268,8 +17268,8 @@ function ConnectedContactsDirectory({
|
|
|
17268
17268
|
"\u201D."
|
|
17269
17269
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "grid divide-y divide-border rounded-lg border border-border", children: shown.map((c, i) => {
|
|
17270
17270
|
const id = c.external_id ?? `row-${i}`;
|
|
17271
|
-
const name =
|
|
17272
|
-
const status =
|
|
17271
|
+
const name = chunk5V4HH7EH_cjs.contactName(c);
|
|
17272
|
+
const status = chunk5V4HH7EH_cjs.contactStatusLabel(c.status);
|
|
17273
17273
|
const peer = onMessage && c.status === "registered" ? c.user : null;
|
|
17274
17274
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center justify-between gap-2 px-3 py-2 text-sm", children: [
|
|
17275
17275
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -17299,7 +17299,7 @@ function ConnectedContactsDirectory({
|
|
|
17299
17299
|
)
|
|
17300
17300
|
] }),
|
|
17301
17301
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-xs text-muted-foreground", children: [
|
|
17302
|
-
|
|
17302
|
+
chunk5V4HH7EH_cjs.primaryEmail(c) !== name && chunk5V4HH7EH_cjs.primaryEmail(c),
|
|
17303
17303
|
c.card?.organization,
|
|
17304
17304
|
c.card?.birthday && `Birthday ${c.card.birthday}`
|
|
17305
17305
|
].filter(Boolean).join(" \xB7 ") })
|
|
@@ -18078,7 +18078,7 @@ function MailRecipientInput({
|
|
|
18078
18078
|
const { head, token } = currentToken(value);
|
|
18079
18079
|
const found = source.useSuggestions(token);
|
|
18080
18080
|
const options2 = React9.useMemo(() => {
|
|
18081
|
-
const chosen = new Set(
|
|
18081
|
+
const chosen = new Set(chunk5V4HH7EH_cjs.parseMailRecipients(head).map((r) => r.email.toLowerCase()));
|
|
18082
18082
|
return found.filter((p) => !chosen.has(p.email.toLowerCase())).slice(0, 8);
|
|
18083
18083
|
}, [found, head]);
|
|
18084
18084
|
const open = focused && !dismissed && token.length > 0 && options2.length > 0;
|
|
@@ -18226,7 +18226,7 @@ function useWordBody({
|
|
|
18226
18226
|
}
|
|
18227
18227
|
var MailBodyEditor = React9.lazy(
|
|
18228
18228
|
() => import('../MailBodyEditor-D7MGJMLH.cjs').catch(() => ({
|
|
18229
|
-
default:
|
|
18229
|
+
default: chunk5V4HH7EH_cjs.PlainMailBodyEditor
|
|
18230
18230
|
}))
|
|
18231
18231
|
);
|
|
18232
18232
|
var NativeDocxEditor = React9.lazy(
|
|
@@ -18319,9 +18319,9 @@ function MailComposerForm({
|
|
|
18319
18319
|
}, [drafts, draftId, subject]);
|
|
18320
18320
|
const body = () => ({
|
|
18321
18321
|
...initial,
|
|
18322
|
-
to:
|
|
18323
|
-
cc:
|
|
18324
|
-
bcc:
|
|
18322
|
+
to: chunk5V4HH7EH_cjs.parseMailRecipients(to),
|
|
18323
|
+
cc: chunk5V4HH7EH_cjs.parseMailRecipients(cc),
|
|
18324
|
+
bcc: chunk5V4HH7EH_cjs.parseMailRecipients(bcc),
|
|
18325
18325
|
subject,
|
|
18326
18326
|
text: text2,
|
|
18327
18327
|
html,
|
|
@@ -18793,7 +18793,7 @@ function MailComposerForm({
|
|
|
18793
18793
|
}
|
|
18794
18794
|
),
|
|
18795
18795
|
documents && /* @__PURE__ */ jsxRuntime.jsx(
|
|
18796
|
-
|
|
18796
|
+
chunk5V4HH7EH_cjs.MailDocumentPicker,
|
|
18797
18797
|
{
|
|
18798
18798
|
documents: documents.documents,
|
|
18799
18799
|
disabled: locked,
|
|
@@ -18912,7 +18912,7 @@ function ConnectedMailComposer({
|
|
|
18912
18912
|
openId,
|
|
18913
18913
|
async (from, id) => {
|
|
18914
18914
|
const message = await client.getMessage(from, id);
|
|
18915
|
-
return
|
|
18915
|
+
return chunk5V4HH7EH_cjs.draftMailCompose(
|
|
18916
18916
|
message,
|
|
18917
18917
|
await hydrateMailAttachments(client, from, message.id, message.attachments, {
|
|
18918
18918
|
isOnline,
|
|
@@ -18926,11 +18926,11 @@ function ConnectedMailComposer({
|
|
|
18926
18926
|
const start = React9.useMemo(() => {
|
|
18927
18927
|
if (replyTo)
|
|
18928
18928
|
return original.data && account ? {
|
|
18929
|
-
...
|
|
18929
|
+
...chunk5V4HH7EH_cjs.replyMailCompose(original.data, { account, folderRole: "inbox" }),
|
|
18930
18930
|
text: "",
|
|
18931
18931
|
html: ""
|
|
18932
18932
|
} : void 0;
|
|
18933
|
-
return reloaded ? draft.data : initial ?? (openId ? draft.data :
|
|
18933
|
+
return reloaded ? draft.data : initial ?? (openId ? draft.data : chunk5V4HH7EH_cjs.emptyMailCompose());
|
|
18934
18934
|
}, [replyTo, original.data, account, reloaded, initial, openId, draft.data]);
|
|
18935
18935
|
if (!start)
|
|
18936
18936
|
return draft.error ?? original.error ? /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "p-4 text-sm text-destructive", children: (draft.error ?? original.error)?.message }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-sm text-muted-foreground", children: "Loading draft\u2026" });
|
|
@@ -19237,7 +19237,7 @@ function ConnectedMailbox({
|
|
|
19237
19237
|
const message = detail.data;
|
|
19238
19238
|
React9.useEffect(() => {
|
|
19239
19239
|
if (!composeAttachments?.length) return;
|
|
19240
|
-
openCompose({ ...
|
|
19240
|
+
openCompose({ ...chunk5V4HH7EH_cjs.emptyMailCompose(), attachments: composeAttachments });
|
|
19241
19241
|
onComposeOpened?.();
|
|
19242
19242
|
}, [composeAttachments]);
|
|
19243
19243
|
React9.useEffect(() => {
|
|
@@ -19369,7 +19369,7 @@ function ConnectedMailbox({
|
|
|
19369
19369
|
const editDraft = async () => {
|
|
19370
19370
|
if (!message) return;
|
|
19371
19371
|
try {
|
|
19372
|
-
openCompose(
|
|
19372
|
+
openCompose(chunk5V4HH7EH_cjs.draftMailCompose(message, await hydrate(message.attachments)));
|
|
19373
19373
|
} catch (e) {
|
|
19374
19374
|
setActionError(e instanceof Error ? e.message : "Could not load draft attachments");
|
|
19375
19375
|
}
|
|
@@ -19378,7 +19378,7 @@ function ConnectedMailbox({
|
|
|
19378
19378
|
if (!message || !account) return;
|
|
19379
19379
|
try {
|
|
19380
19380
|
const attachments = forward ? await hydrate(message.attachments) : [];
|
|
19381
|
-
openCompose(
|
|
19381
|
+
openCompose(chunk5V4HH7EH_cjs.replyMailCompose(message, { account, folderRole, forward, all, attachments }));
|
|
19382
19382
|
} catch (e) {
|
|
19383
19383
|
setActionError(e instanceof Error ? e.message : "Could not prepare forwarded attachments");
|
|
19384
19384
|
}
|
|
@@ -19498,7 +19498,7 @@ function ConnectedMailbox({
|
|
|
19498
19498
|
{
|
|
19499
19499
|
size: "sm",
|
|
19500
19500
|
disabled: !ready || !!compose,
|
|
19501
|
-
onClick: () => openCompose(
|
|
19501
|
+
onClick: () => openCompose(chunk5V4HH7EH_cjs.emptyMailCompose()),
|
|
19502
19502
|
children: [
|
|
19503
19503
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "mr-1.5 size-4" }),
|
|
19504
19504
|
"Email"
|
|
@@ -19577,7 +19577,7 @@ function ConnectedMailbox({
|
|
|
19577
19577
|
onEdit: (value) => openCompose({ ...value })
|
|
19578
19578
|
}),
|
|
19579
19579
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: deviceFolder ? "hidden" : "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19580
|
-
|
|
19580
|
+
chunk5V4HH7EH_cjs.MailGrid,
|
|
19581
19581
|
{
|
|
19582
19582
|
messages: filteredMessages,
|
|
19583
19583
|
loading: list.isPending && list.fetchStatus !== "idle",
|
|
@@ -19641,7 +19641,7 @@ function ConnectedMailbox({
|
|
|
19641
19641
|
},
|
|
19642
19642
|
`${account?.id}-${composeSession}`
|
|
19643
19643
|
) : message && selected ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
19644
|
-
|
|
19644
|
+
chunk5V4HH7EH_cjs.MailMessageView,
|
|
19645
19645
|
{
|
|
19646
19646
|
account,
|
|
19647
19647
|
message,
|
|
@@ -19778,7 +19778,7 @@ function ConnectedMailMessage({
|
|
|
19778
19778
|
const attachments = forward ? await hydrateMailAttachments(client, account, message.id, message.attachments, {
|
|
19779
19779
|
isOnline
|
|
19780
19780
|
}) : [];
|
|
19781
|
-
onCompose(
|
|
19781
|
+
onCompose(chunk5V4HH7EH_cjs.replyMailCompose(message, { account, folderRole, forward, all, attachments }));
|
|
19782
19782
|
} catch (e) {
|
|
19783
19783
|
setError(e instanceof Error ? e.message : "Could not prepare forwarded attachments");
|
|
19784
19784
|
}
|
|
@@ -19786,7 +19786,7 @@ function ConnectedMailMessage({
|
|
|
19786
19786
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
19787
19787
|
error && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "px-4 pt-3 text-sm text-destructive", children: error }),
|
|
19788
19788
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19789
|
-
|
|
19789
|
+
chunk5V4HH7EH_cjs.MailMessageView,
|
|
19790
19790
|
{
|
|
19791
19791
|
account,
|
|
19792
19792
|
message,
|
|
@@ -19797,7 +19797,7 @@ function ConnectedMailMessage({
|
|
|
19797
19797
|
onBack: onClose,
|
|
19798
19798
|
onEditDraft: () => void hydrateMailAttachments(client, account, message.id, message.attachments, {
|
|
19799
19799
|
isOnline
|
|
19800
|
-
}).then((attachments) => onCompose(
|
|
19800
|
+
}).then((attachments) => onCompose(chunk5V4HH7EH_cjs.draftMailCompose(message, attachments))).catch((e) => setError(e.message)),
|
|
19801
19801
|
onReply: (forward, all) => void reply(forward, all),
|
|
19802
19802
|
onReplyWithArbi: onReplyWithArbi && account.provider === "native" ? () => onReplyWithArbi(message, account) : void 0,
|
|
19803
19803
|
onUpdate: (body) => void update(body),
|
|
@@ -28717,6 +28717,20 @@ function ConnectedAiReviewHost(props) {
|
|
|
28717
28717
|
const setOpen = useAiReviewStore((s) => s.setOpen);
|
|
28718
28718
|
return /* @__PURE__ */ jsxRuntime.jsx(ConnectedAiReview, { open, onOpenChange: setOpen, ...props });
|
|
28719
28719
|
}
|
|
28720
|
+
function ConnectedGridView(props) {
|
|
28721
|
+
const { persistState, gridId } = props;
|
|
28722
|
+
const session = react.useArbiSessionStore();
|
|
28723
|
+
const { setGridState } = session;
|
|
28724
|
+
const gridState = persistState && gridId ? session.getState().grid.states[gridId] : void 0;
|
|
28725
|
+
const onGridStateChange = React9.useCallback(
|
|
28726
|
+
(state) => {
|
|
28727
|
+
if (!persistState || !gridId) return;
|
|
28728
|
+
setGridState(gridId, state);
|
|
28729
|
+
},
|
|
28730
|
+
[persistState, gridId, setGridState]
|
|
28731
|
+
);
|
|
28732
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkLKK52DEY_cjs.GridView, { ...props, gridState, onGridStateChange });
|
|
28733
|
+
}
|
|
28720
28734
|
function WatchOne({ transferId }) {
|
|
28721
28735
|
const { data: job } = react.useWorkspaceTransfer(transferId);
|
|
28722
28736
|
const { data: workspaces = [] } = react.useWorkspaces();
|
|
@@ -29145,10 +29159,10 @@ function ConnectedChatThread({
|
|
|
29145
29159
|
};
|
|
29146
29160
|
const History = host.ThreadHistory;
|
|
29147
29161
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29148
|
-
|
|
29162
|
+
chunk5V4HH7EH_cjs.DmThreadFrame,
|
|
29149
29163
|
{
|
|
29150
29164
|
accessBanner: pendingAccessRequest ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
29151
|
-
|
|
29165
|
+
chunk5V4HH7EH_cjs.DmAccessRequestBanner,
|
|
29152
29166
|
{
|
|
29153
29167
|
name: peer?.given_name ?? "They",
|
|
29154
29168
|
onReview: () => host.onReviewAccessRequest?.(pendingAccessRequest)
|
|
@@ -40508,6 +40522,7 @@ exports.ConnectedFilesPage = ConnectedFilesPage;
|
|
|
40508
40522
|
exports.ConnectedForgotPassword = ConnectedForgotPassword;
|
|
40509
40523
|
exports.ConnectedGlobalDialogs = ConnectedGlobalDialogs;
|
|
40510
40524
|
exports.ConnectedGrantWorkspaceAccessDialog = ConnectedGrantWorkspaceAccessDialog;
|
|
40525
|
+
exports.ConnectedGridView = ConnectedGridView;
|
|
40511
40526
|
exports.ConnectedGroupMembers = ConnectedGroupMembers;
|
|
40512
40527
|
exports.ConnectedIdentityVerification = ConnectedIdentityVerification;
|
|
40513
40528
|
exports.ConnectedLoginPage = ConnectedLoginPage;
|