@arbidocs/blocks 0.5.41 → 0.5.43
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/{chunk-46WCQ4F3.js → chunk-HH34WKOC.js} +104 -79
- package/dist/{chunk-46WCQ4F3.js.map → chunk-HH34WKOC.js.map} +1 -1
- package/dist/{chunk-5ZHAHJ4H.cjs → chunk-TPNLYQD2.cjs} +9 -2
- package/dist/chunk-TPNLYQD2.cjs.map +1 -0
- package/dist/{chunk-CEO7YI7I.js → chunk-X7CXCEGO.js} +8 -3
- package/dist/chunk-X7CXCEGO.js.map +1 -0
- package/dist/{chunk-5V4HH7EH.cjs → chunk-XDMIVPJP.cjs} +104 -79
- package/dist/{chunk-5V4HH7EH.cjs.map → chunk-XDMIVPJP.cjs.map} +1 -1
- package/dist/collaboration/direct-messages/DmParts.d.ts +14 -4
- package/dist/collaboration/index.cjs +67 -67
- package/dist/collaboration/index.js +1 -1
- package/dist/connect/index.cjs +601 -110
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +3 -0
- package/dist/connect/index.js +499 -11
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/people/ConnectedPeopleMultiSelect.d.ts +40 -0
- package/dist/connection/people/index.d.ts +1 -0
- package/dist/connection/people/invitation-message.d.ts +2 -0
- package/dist/connection/sharing/ConnectedShareDialog.d.ts +7 -0
- package/dist/connection/sharing/ResourceShareForm.d.ts +24 -0
- package/dist/connection/sharing/index.d.ts +1 -0
- package/dist/connection/sharing/useShareResource.d.ts +44 -0
- package/dist/connection/tips/useContextualHints.d.ts +13 -0
- package/dist/index.cjs +171 -123
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +43 -4
- package/dist/index.js.map +1 -1
- package/dist/tips/index.d.ts +2 -0
- package/dist/tips/useTipsPlacement.d.ts +24 -0
- package/dist/tips/visibility.d.ts +5 -0
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/chunk-5ZHAHJ4H.cjs.map +0 -1
- package/dist/chunk-CEO7YI7I.js.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -24,7 +24,7 @@ require('../chunk-464YPRAE.cjs');
|
|
|
24
24
|
require('../chunk-PICGTGEB.cjs');
|
|
25
25
|
var chunk5FYU7ZIU_cjs = require('../chunk-5FYU7ZIU.cjs');
|
|
26
26
|
require('../chunk-ZESMRGDV.cjs');
|
|
27
|
-
var
|
|
27
|
+
var chunkTPNLYQD2_cjs = require('../chunk-TPNLYQD2.cjs');
|
|
28
28
|
var chunkC2ECYOPP_cjs = require('../chunk-C2ECYOPP.cjs');
|
|
29
29
|
var chunkGOWXP5KT_cjs = require('../chunk-GOWXP5KT.cjs');
|
|
30
30
|
var chunkHV7XHZLW_cjs = require('../chunk-HV7XHZLW.cjs');
|
|
@@ -34,7 +34,7 @@ var chunkKUQOHPKP_cjs = require('../chunk-KUQOHPKP.cjs');
|
|
|
34
34
|
var chunkVPPX5XUF_cjs = require('../chunk-VPPX5XUF.cjs');
|
|
35
35
|
require('../chunk-PCB2BPN3.cjs');
|
|
36
36
|
require('../chunk-NWNVWO6L.cjs');
|
|
37
|
-
var
|
|
37
|
+
var chunkXDMIVPJP_cjs = require('../chunk-XDMIVPJP.cjs');
|
|
38
38
|
require('../chunk-7G2LJMUG.cjs');
|
|
39
39
|
var chunkTM2D4XT4_cjs = require('../chunk-TM2D4XT4.cjs');
|
|
40
40
|
var chunk5Y6V7F6W_cjs = require('../chunk-5Y6V7F6W.cjs');
|
|
@@ -164,9 +164,9 @@ var ConnectedUserEntity = React9.memo(function ConnectedUserEntity2({
|
|
|
164
164
|
if (isMe) openSettings();
|
|
165
165
|
else openDirectChat?.(user.external_id);
|
|
166
166
|
};
|
|
167
|
-
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
167
|
+
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltip, { children: [
|
|
168
168
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
169
|
-
|
|
169
|
+
chunkTPNLYQD2_cjs.EntityTooltipHeader,
|
|
170
170
|
{
|
|
171
171
|
lead: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
172
172
|
ui.Avatar,
|
|
@@ -197,13 +197,13 @@ var ConnectedUserEntity = React9.memo(function ConnectedUserEntity2({
|
|
|
197
197
|
subtitle: user.email
|
|
198
198
|
}
|
|
199
199
|
),
|
|
200
|
-
userIsAgent && agentOwner && /* @__PURE__ */ jsxRuntime.jsx(
|
|
200
|
+
userIsAgent && agentOwner && /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.EntityTooltipSection, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltipHint, { icon: /* @__PURE__ */ jsxRuntime.jsx(react.ArbiBotHeadIcon, { className: "w-3.5 h-3.5 flex-shrink-0" }), children: [
|
|
201
201
|
"Agent of",
|
|
202
202
|
" ",
|
|
203
203
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: ui.getUserDisplayName(agentOwner) })
|
|
204
204
|
] }) }),
|
|
205
205
|
sharedWorkspaces.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
206
|
-
|
|
206
|
+
chunkTPNLYQD2_cjs.EntityTooltipSection,
|
|
207
207
|
{
|
|
208
208
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
209
209
|
heading: "Shared Workspaces",
|
|
@@ -234,7 +234,7 @@ var ConnectedUserEntity = React9.memo(function ConnectedUserEntity2({
|
|
|
234
234
|
] })
|
|
235
235
|
}
|
|
236
236
|
),
|
|
237
|
-
interactive && variant === "pill" && canChat && /* @__PURE__ */ jsxRuntime.jsx(
|
|
237
|
+
interactive && variant === "pill" && canChat && /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.EntityTooltipHint, { isRuled: true, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleMore, { className: "w-3 h-3" }), children: "Click to send message" })
|
|
238
238
|
] });
|
|
239
239
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
240
240
|
ui.UserEntity,
|
|
@@ -388,7 +388,7 @@ function ConnectedWorkspaceActivity({
|
|
|
388
388
|
[feed.data]
|
|
389
389
|
);
|
|
390
390
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
391
|
-
|
|
391
|
+
chunkTPNLYQD2_cjs.WorkspaceActivityList,
|
|
392
392
|
{
|
|
393
393
|
...listProps,
|
|
394
394
|
items,
|
|
@@ -1553,7 +1553,7 @@ function ConnectedWorkspaceNotificationMenu({
|
|
|
1553
1553
|
}, [error, notify18]);
|
|
1554
1554
|
if (!workspaceId) return null;
|
|
1555
1555
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1556
|
-
|
|
1556
|
+
chunkTPNLYQD2_cjs.WorkspaceNotificationMenu,
|
|
1557
1557
|
{
|
|
1558
1558
|
...menuProps,
|
|
1559
1559
|
level,
|
|
@@ -1572,7 +1572,7 @@ function ConnectedThreadFollow({
|
|
|
1572
1572
|
enabled: live
|
|
1573
1573
|
});
|
|
1574
1574
|
if (!conversationId) return null;
|
|
1575
|
-
const Control = as === "menu-item" ?
|
|
1575
|
+
const Control = as === "menu-item" ? chunkTPNLYQD2_cjs.ThreadFollowMenuItem : chunkTPNLYQD2_cjs.ThreadFollowButton;
|
|
1576
1576
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1577
1577
|
Control,
|
|
1578
1578
|
{
|
|
@@ -3489,7 +3489,7 @@ function ConnectedTagTable({
|
|
|
3489
3489
|
const fail2 = (fallback) => (e) => notify18(browser.refusalReason(e, fallback), "error");
|
|
3490
3490
|
const snapshot2 = (data) => {
|
|
3491
3491
|
const title = exportTitle ?? ui.tagKindTitle(kind, { plural: true });
|
|
3492
|
-
const bytes =
|
|
3492
|
+
const bytes = chunkTPNLYQD2_cjs.tagTableDocx(data, {
|
|
3493
3493
|
title,
|
|
3494
3494
|
nameOf: (id) => people.find((p) => p.value === id)?.label
|
|
3495
3495
|
});
|
|
@@ -3498,7 +3498,7 @@ function ConnectedTagTable({
|
|
|
3498
3498
|
return { blob: new Blob([bytes], { type: chunkJIOHDVWH_cjs.DOCX_MIME_TYPE }), name };
|
|
3499
3499
|
};
|
|
3500
3500
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3501
|
-
|
|
3501
|
+
chunkTPNLYQD2_cjs.TagTable,
|
|
3502
3502
|
{
|
|
3503
3503
|
...props,
|
|
3504
3504
|
table,
|
|
@@ -3636,9 +3636,9 @@ function GlossaryExport({ labelId, nameOf }) {
|
|
|
3636
3636
|
const narrowed = agreements.find((a) => a.id === narrowTo);
|
|
3637
3637
|
const title = narrowed ? `Glossary - ${narrowed.name}` : "Glossary";
|
|
3638
3638
|
const download = (format) => {
|
|
3639
|
-
const entries =
|
|
3640
|
-
const blob = format === "docx" ? new Blob([
|
|
3641
|
-
documentTools.downloadBlob(blob,
|
|
3639
|
+
const entries = chunkTPNLYQD2_cjs.glossaryEntries(sources, { labelId: narrowed?.id });
|
|
3640
|
+
const blob = format === "docx" ? new Blob([chunkTPNLYQD2_cjs.glossaryDocx(entries, { title })], { type: chunkJIOHDVWH_cjs.DOCX_MIME_TYPE }) : new Blob([chunkTPNLYQD2_cjs.glossaryMarkdown(entries, { title })], { type: "text/markdown" });
|
|
3641
|
+
documentTools.downloadBlob(blob, chunkTPNLYQD2_cjs.glossaryFileName(title, format));
|
|
3642
3642
|
};
|
|
3643
3643
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", "data-testid": "tags-glossary", children: [
|
|
3644
3644
|
agreements.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4424,7 +4424,7 @@ var DocumentSharedCell = React9.memo(function DocumentSharedCell2({
|
|
|
4424
4424
|
[document2.external_id, onToggle]
|
|
4425
4425
|
);
|
|
4426
4426
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4427
|
-
|
|
4427
|
+
chunkTPNLYQD2_cjs.SharedCell,
|
|
4428
4428
|
{
|
|
4429
4429
|
item: document2,
|
|
4430
4430
|
onToggle: handleToggle,
|
|
@@ -5135,7 +5135,7 @@ function KindSection({
|
|
|
5135
5135
|
{
|
|
5136
5136
|
testId: `tags-kind-${kind}`,
|
|
5137
5137
|
title: ui.tagKindTitle(kind, { plural: true }),
|
|
5138
|
-
description:
|
|
5138
|
+
description: chunkTPNLYQD2_cjs.tagKindDescription(kind),
|
|
5139
5139
|
actions: picker,
|
|
5140
5140
|
children: [
|
|
5141
5141
|
browser.isEntityTag({ kind }) && extractingCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5146,9 +5146,9 @@ function KindSection({
|
|
|
5146
5146
|
children: [
|
|
5147
5147
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
|
|
5148
5148
|
"Extracting ",
|
|
5149
|
-
|
|
5149
|
+
chunkTPNLYQD2_cjs.entitiesPhrase().toLowerCase(),
|
|
5150
5150
|
" from ",
|
|
5151
|
-
|
|
5151
|
+
chunkTPNLYQD2_cjs.documentCount(extractingCount),
|
|
5152
5152
|
"\u2026"
|
|
5153
5153
|
]
|
|
5154
5154
|
}
|
|
@@ -5166,7 +5166,7 @@ function KindSection({
|
|
|
5166
5166
|
onOpenDocument: (id) => openDocument(id),
|
|
5167
5167
|
onOpenFact: ctx.onOpenFact,
|
|
5168
5168
|
onOpenThread: (id) => openConversation(id),
|
|
5169
|
-
labels:
|
|
5169
|
+
labels: chunkTPNLYQD2_cjs.tagTableLabels(kind),
|
|
5170
5170
|
testId: `tags-table-${kind}`
|
|
5171
5171
|
}
|
|
5172
5172
|
)
|
|
@@ -5268,12 +5268,12 @@ function TagSection({
|
|
|
5268
5268
|
onOpenDocument: (id) => openDocument(id),
|
|
5269
5269
|
onOpenFact: ctx.onOpenFact,
|
|
5270
5270
|
onOpenThread: (id) => openConversation(id),
|
|
5271
|
-
labels:
|
|
5271
|
+
labels: chunkTPNLYQD2_cjs.tagTableLabels(tag.kind),
|
|
5272
5272
|
testId: "tags-rows"
|
|
5273
5273
|
}
|
|
5274
5274
|
),
|
|
5275
5275
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5276
|
-
|
|
5276
|
+
chunkTPNLYQD2_cjs.TagDetail,
|
|
5277
5277
|
{
|
|
5278
5278
|
row: detailRow && narrowTagRow(detailRow, ctx.filter.matches),
|
|
5279
5279
|
fields: schema.data?.fields ?? [],
|
|
@@ -5285,10 +5285,10 @@ function TagSection({
|
|
|
5285
5285
|
onOpenDocument: (id) => openDocument(id),
|
|
5286
5286
|
onOpenFact: ctx.onOpenFact,
|
|
5287
5287
|
onOpenThread: (id) => openConversation(id),
|
|
5288
|
-
noteLabel:
|
|
5288
|
+
noteLabel: chunkTPNLYQD2_cjs.tagNoteLabel(tag.kind),
|
|
5289
5289
|
noteIsValue: tag.kind === "annotation",
|
|
5290
5290
|
renderPassages: (d, label) => renderPassages(d.doc_ext_id, label),
|
|
5291
|
-
labels:
|
|
5291
|
+
labels: chunkTPNLYQD2_cjs.tagDetailLabels(),
|
|
5292
5292
|
testId: "tags-detail"
|
|
5293
5293
|
}
|
|
5294
5294
|
)
|
|
@@ -5376,7 +5376,7 @@ function ConnectedTagsPage({
|
|
|
5376
5376
|
const onDelete = async (t) => {
|
|
5377
5377
|
const nested = browser.getChildTags([...tags], t.external_id);
|
|
5378
5378
|
const uses = browser.tagUseCount(t);
|
|
5379
|
-
const n2 =
|
|
5379
|
+
const n2 = chunkTPNLYQD2_cjs.tagsPageNouns();
|
|
5380
5380
|
const tagNoun = (count2) => (count2 === 1 ? n2.tag : n2.tags).toLowerCase();
|
|
5381
5381
|
const carriers = uses === 1 ? `${n2.document}, ${n2.fact} or ${n2.thread}` : `${n2.documents}, ${n2.facts} and ${n2.threads}`;
|
|
5382
5382
|
const message = `Delete ${ui.tagKindNouns(t.kind).singular} "${t.name}"?` + (uses > 0 ? `
|
|
@@ -5397,16 +5397,16 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5397
5397
|
try {
|
|
5398
5398
|
await extract.mutateAsync(docIds);
|
|
5399
5399
|
notify18(
|
|
5400
|
-
`Extracting ${
|
|
5400
|
+
`Extracting ${chunkTPNLYQD2_cjs.entitiesPhrase().toLowerCase()} from ${chunkTPNLYQD2_cjs.documentCount(docIds.length)}. You will be notified when it is done.`,
|
|
5401
5401
|
"info"
|
|
5402
5402
|
);
|
|
5403
5403
|
} catch (error) {
|
|
5404
|
-
notify18(browser.refusalReason(error, `Could not extract ${
|
|
5404
|
+
notify18(browser.refusalReason(error, `Could not extract ${chunkTPNLYQD2_cjs.entitiesPhrase().toLowerCase()}`), "error");
|
|
5405
5405
|
throw error;
|
|
5406
5406
|
}
|
|
5407
5407
|
};
|
|
5408
5408
|
const picker = /* @__PURE__ */ jsxRuntime.jsx(
|
|
5409
|
-
|
|
5409
|
+
chunkTPNLYQD2_cjs.TagPicker,
|
|
5410
5410
|
{
|
|
5411
5411
|
tags: viewTags,
|
|
5412
5412
|
selectedId: tag?.external_id,
|
|
@@ -5420,10 +5420,10 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5420
5420
|
onOpenTag: openTag,
|
|
5421
5421
|
onOpenFact
|
|
5422
5422
|
};
|
|
5423
|
-
const n =
|
|
5423
|
+
const n = chunkTPNLYQD2_cjs.tagsPageNouns();
|
|
5424
5424
|
const action = view === "person" || view === "organisation" ? {
|
|
5425
5425
|
label: "Extract",
|
|
5426
|
-
title: `Extract ${
|
|
5426
|
+
title: `Extract ${chunkTPNLYQD2_cjs.entitiesPhrase().toLowerCase()} from ${n.documents.toLowerCase()}`,
|
|
5427
5427
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "h-4 w-4" }),
|
|
5428
5428
|
run: () => setExtracting(true),
|
|
5429
5429
|
testId: "tags-extract-entities"
|
|
@@ -5573,7 +5573,7 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5573
5573
|
}
|
|
5574
5574
|
),
|
|
5575
5575
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5576
|
-
|
|
5576
|
+
chunkTPNLYQD2_cjs.ExtractEntitiesDialog,
|
|
5577
5577
|
{
|
|
5578
5578
|
open: extracting,
|
|
5579
5579
|
onOpenChange: setExtracting,
|
|
@@ -7576,7 +7576,7 @@ function ConnectedFactsPage({
|
|
|
7576
7576
|
onNewFact: composing && !editingId ? () => void 0 : composer.startNewFact,
|
|
7577
7577
|
navSlotRef: setNavSlot,
|
|
7578
7578
|
navigator: view === "table" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7579
|
-
|
|
7579
|
+
chunkTPNLYQD2_cjs.GridRowNavigator,
|
|
7580
7580
|
{
|
|
7581
7581
|
gridApi,
|
|
7582
7582
|
selectedId: editingId,
|
|
@@ -10337,6 +10337,18 @@ function ConnectedRecentlyDeletedButton({
|
|
|
10337
10337
|
] })
|
|
10338
10338
|
] });
|
|
10339
10339
|
}
|
|
10340
|
+
|
|
10341
|
+
// src/connection/people/invitation-message.ts
|
|
10342
|
+
function invitationMessage(emails, workspaceWord2) {
|
|
10343
|
+
const missing = emails.length === 1 ? `${emails[0]} isn't on the platform yet.` : `These users aren't on the platform yet:
|
|
10344
|
+
${emails.join("\n")}`;
|
|
10345
|
+
const destination = workspaceWord2 ? ` to this ${workspaceWord2}` : "";
|
|
10346
|
+
return `${missing}
|
|
10347
|
+
|
|
10348
|
+
Invite them by email? Once they sign up, they'll usually get access${destination} automatically \u2014 if not, they can request it themselves.`;
|
|
10349
|
+
}
|
|
10350
|
+
|
|
10351
|
+
// src/connection/workspace-settings/useConnectedWorkspaceSettings.ts
|
|
10340
10352
|
function errorDetail(err) {
|
|
10341
10353
|
const e = err;
|
|
10342
10354
|
const detail = e?.detail ?? e?.apiError?.detail ?? e?.response?.data?.detail ?? e?.error?.detail;
|
|
@@ -10349,10 +10361,6 @@ function errorStatus(err) {
|
|
|
10349
10361
|
return e?.status ?? e?.response?.status;
|
|
10350
10362
|
}
|
|
10351
10363
|
var workspaceWord = () => ui.getEntityLabel("WORKSPACE").toLowerCase();
|
|
10352
|
-
var inviteMessage = (emails) => `${emails.length === 1 ? `${emails[0]} isn't on the platform yet.` : `These users aren't on the platform yet:
|
|
10353
|
-
${emails.join("\n")}`}
|
|
10354
|
-
|
|
10355
|
-
Invite them by email? Once they sign up, they'll usually get access to this ${workspaceWord()} automatically \u2014 if not, they can request it themselves.`;
|
|
10356
10364
|
function useConnectedWorkspaceSettings(workspaceId, { onLeft } = {}) {
|
|
10357
10365
|
const { notify: notify18, confirm } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
10358
10366
|
const { workspaceId: openWorkspaceId, userId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
@@ -10433,7 +10441,7 @@ function useConnectedWorkspaceSettings(workspaceId, { onLeft } = {}) {
|
|
|
10433
10441
|
);
|
|
10434
10442
|
}
|
|
10435
10443
|
if (unknown.length > 0 && await confirm({
|
|
10436
|
-
message:
|
|
10444
|
+
message: invitationMessage(unknown, workspaceWord()),
|
|
10437
10445
|
title: "Invite by email?",
|
|
10438
10446
|
kind: "yesno"
|
|
10439
10447
|
})) {
|
|
@@ -10449,7 +10457,7 @@ function useConnectedWorkspaceSettings(workspaceId, { onLeft } = {}) {
|
|
|
10449
10457
|
const notRegistered = status === 404 || lower.includes("not found") || lower.includes("no user") || lower.includes("does not exist") || lower.includes("user not registered");
|
|
10450
10458
|
if (notRegistered) {
|
|
10451
10459
|
if (await confirm({
|
|
10452
|
-
message:
|
|
10460
|
+
message: invitationMessage(emails, workspaceWord()),
|
|
10453
10461
|
title: "Invite by email?",
|
|
10454
10462
|
kind: "yesno"
|
|
10455
10463
|
})) {
|
|
@@ -10572,7 +10580,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10572
10580
|
minWidth: 150,
|
|
10573
10581
|
sortable: true,
|
|
10574
10582
|
valueGetter: (p) => p.data ? memberName(p.data.user) : "",
|
|
10575
|
-
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10583
|
+
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(chunkXDMIVPJP_cjs.MemberNameCell, { children: renderMember(p.data) }) : null
|
|
10576
10584
|
},
|
|
10577
10585
|
{
|
|
10578
10586
|
colId: "email",
|
|
@@ -10582,7 +10590,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10582
10590
|
sortable: true,
|
|
10583
10591
|
valueGetter: (p) => p.data?.user.email ?? "",
|
|
10584
10592
|
// Plain text, not a mailto: the row's click selects it.
|
|
10585
|
-
cellRenderer: (p) => p.data?.user.email ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10593
|
+
cellRenderer: (p) => p.data?.user.email ? /* @__PURE__ */ jsxRuntime.jsx(chunkXDMIVPJP_cjs.MemberMutedText, { className: "truncate", title: p.data.user.email, children: p.data.user.email }) : null
|
|
10586
10594
|
},
|
|
10587
10595
|
{
|
|
10588
10596
|
colId: "role",
|
|
@@ -10596,7 +10604,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10596
10604
|
if (!row2) return null;
|
|
10597
10605
|
const lock = roleLock(row2.user.external_id, selfId, isOwner);
|
|
10598
10606
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10599
|
-
|
|
10607
|
+
chunkXDMIVPJP_cjs.MemberRoleCell,
|
|
10600
10608
|
{
|
|
10601
10609
|
role: row2.role,
|
|
10602
10610
|
roles: ALL_ROLES,
|
|
@@ -10616,7 +10624,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10616
10624
|
minWidth: 125,
|
|
10617
10625
|
sortable: true,
|
|
10618
10626
|
valueGetter: (p) => p.data ? new Date(p.data.joined_at).getTime() : "",
|
|
10619
|
-
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10627
|
+
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(chunkXDMIVPJP_cjs.MemberMutedText, { className: "cursor-default", children: ui.formatFriendlyDate(p.data.joined_at) }) : null
|
|
10620
10628
|
},
|
|
10621
10629
|
{
|
|
10622
10630
|
colId: "conversation_count",
|
|
@@ -10626,7 +10634,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10626
10634
|
sortable: true,
|
|
10627
10635
|
type: "numericColumn",
|
|
10628
10636
|
valueGetter: (p) => p.data?.conversation_count ?? 0,
|
|
10629
|
-
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10637
|
+
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(chunkXDMIVPJP_cjs.MemberMutedText, { children: p.data.conversation_count }) : null
|
|
10630
10638
|
},
|
|
10631
10639
|
{
|
|
10632
10640
|
colId: "document_count",
|
|
@@ -10636,7 +10644,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10636
10644
|
sortable: true,
|
|
10637
10645
|
type: "numericColumn",
|
|
10638
10646
|
valueGetter: (p) => p.data?.document_count ?? 0,
|
|
10639
|
-
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10647
|
+
cellRenderer: (p) => p.data ? /* @__PURE__ */ jsxRuntime.jsx(chunkXDMIVPJP_cjs.MemberMutedText, { children: p.data.document_count }) : null
|
|
10640
10648
|
},
|
|
10641
10649
|
{
|
|
10642
10650
|
colId: "files_mb",
|
|
@@ -10649,7 +10657,7 @@ function ConnectedWorkspaceMembers({
|
|
|
10649
10657
|
cellRenderer: (p) => {
|
|
10650
10658
|
if (!p.data) return null;
|
|
10651
10659
|
const mb = p.data.files_mb ?? 0;
|
|
10652
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10660
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkXDMIVPJP_cjs.MemberMutedText, { children: [
|
|
10653
10661
|
mb >= 100 ? Math.round(mb).toLocaleString("en-US") : mb.toFixed(1),
|
|
10654
10662
|
" MB"
|
|
10655
10663
|
] });
|
|
@@ -10689,7 +10697,7 @@ Note that ${members2} may have saved private content in the ${workspaceWord2} th
|
|
|
10689
10697
|
);
|
|
10690
10698
|
const canChangeRoleSelected = selected.some((m) => !roleLock(m.user.external_id, selfId, isOwner));
|
|
10691
10699
|
const ownerOnly = `Only available to ${workspaceWord2} owner`;
|
|
10692
|
-
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10700
|
+
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkXDMIVPJP_cjs.MemberListLoading, {});
|
|
10693
10701
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "workspace-users", className: "relative flex flex-col", children: [
|
|
10694
10702
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10695
10703
|
chunkLKK52DEY_cjs.GridView,
|
|
@@ -10707,7 +10715,7 @@ Note that ${members2} may have saved private content in the ${workspaceWord2} th
|
|
|
10707
10715
|
}
|
|
10708
10716
|
) }),
|
|
10709
10717
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(chunkV4ISCZJ7_cjs.SelectionBar, { count: selected.length, onClear: () => setSelected([]), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10710
|
-
|
|
10718
|
+
chunkXDMIVPJP_cjs.MemberBulkActions,
|
|
10711
10719
|
{
|
|
10712
10720
|
roles: BULK_ROLES,
|
|
10713
10721
|
onChangeRole: (value) => void changeSelectedRoles(value),
|
|
@@ -10751,13 +10759,13 @@ function ConnectedWorkspaceSettings({
|
|
|
10751
10759
|
const [membersExpanded, setMembersExpanded] = React9.useState(false);
|
|
10752
10760
|
const [shareOpen, setShareOpen] = React9.useState(false);
|
|
10753
10761
|
if (!workspace) {
|
|
10754
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkKFQ6E6LE_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10762
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkKFQ6E6LE_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.LoadingIndicator, { message: "Loading workspace..." }) });
|
|
10755
10763
|
}
|
|
10756
10764
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10757
10765
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkKFQ6E6LE_cjs.WorkspacePageFrame, { testId, children: [
|
|
10758
10766
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkKFQ6E6LE_cjs.WorkspaceIdentityPanel, { children: [
|
|
10759
10767
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10760
|
-
|
|
10768
|
+
chunkTPNLYQD2_cjs.EntityIdentityBar,
|
|
10761
10769
|
{
|
|
10762
10770
|
testId: "workspace-identity-bar",
|
|
10763
10771
|
canEdit: isOwner,
|
|
@@ -10774,7 +10782,7 @@ function ConnectedWorkspaceSettings({
|
|
|
10774
10782
|
label: "Name",
|
|
10775
10783
|
value: workspace.name,
|
|
10776
10784
|
placeholder: "Untitled",
|
|
10777
|
-
maxLength:
|
|
10785
|
+
maxLength: chunkTPNLYQD2_cjs.IDENTITY_NAME_MAX_LENGTH,
|
|
10778
10786
|
valueClassName: "truncate text-base font-semibold",
|
|
10779
10787
|
testId: "workspace-home-title",
|
|
10780
10788
|
hideLabel: true,
|
|
@@ -11680,9 +11688,9 @@ function ConnectedWorkspaceEntity({
|
|
|
11680
11688
|
);
|
|
11681
11689
|
const documentCount2 = (workspace.shared_document_count ?? 0) + (workspace.private_document_count ?? 0);
|
|
11682
11690
|
const conversationCount = (workspace.shared_conversation_count ?? 0) + (workspace.private_conversation_count ?? 0);
|
|
11683
|
-
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11691
|
+
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltip, { children: [
|
|
11684
11692
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11685
|
-
|
|
11693
|
+
chunkTPNLYQD2_cjs.EntityTooltipHeader,
|
|
11686
11694
|
{
|
|
11687
11695
|
lead: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11688
11696
|
ui.ShieldIcon,
|
|
@@ -11699,7 +11707,7 @@ function ConnectedWorkspaceEntity({
|
|
|
11699
11707
|
}
|
|
11700
11708
|
),
|
|
11701
11709
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11702
|
-
|
|
11710
|
+
chunkTPNLYQD2_cjs.EntityTooltipStats,
|
|
11703
11711
|
{
|
|
11704
11712
|
stats: [
|
|
11705
11713
|
{
|
|
@@ -11723,11 +11731,11 @@ function ConnectedWorkspaceEntity({
|
|
|
11723
11731
|
]
|
|
11724
11732
|
}
|
|
11725
11733
|
),
|
|
11726
|
-
workspace.updated_at && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11734
|
+
workspace.updated_at && /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltipHint, { children: [
|
|
11727
11735
|
"Updated ",
|
|
11728
11736
|
ui.formatFriendlyDate(workspace.updated_at)
|
|
11729
11737
|
] }),
|
|
11730
|
-
interactive && variant !== "icon" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11738
|
+
interactive && variant !== "icon" && /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltipHint, { icon: /* @__PURE__ */ jsxRuntime.jsx(ui.EntityIcon, { entityType: "WORKSPACE", className: "w-3 h-3" }), children: [
|
|
11731
11739
|
"Click to open ",
|
|
11732
11740
|
ui.getEntityLabel("WORKSPACE").toLowerCase(),
|
|
11733
11741
|
" settings"
|
|
@@ -12138,7 +12146,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
12138
12146
|
error: foldersError
|
|
12139
12147
|
} = react.useMailboxFolders(catalog.vendor_key, open && tokensBridged);
|
|
12140
12148
|
const foldersLoading = !tokensBridged || foldersQueryLoading;
|
|
12141
|
-
const folderTree =
|
|
12149
|
+
const folderTree = chunkXDMIVPJP_cjs.buildMailFolderTree(folders);
|
|
12142
12150
|
const [expandAllNonce, setExpandAllNonce] = React9.useState(0);
|
|
12143
12151
|
const [collapseAllNonce, setCollapseAllNonce] = React9.useState(0);
|
|
12144
12152
|
const selectAllIds = folderTree.flatMap(
|
|
@@ -12269,7 +12277,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
12269
12277
|
}
|
|
12270
12278
|
)
|
|
12271
12279
|
) : folders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.SyncNote, { children: "No folders found." }) : /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.SyncTreeFrame, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12272
|
-
|
|
12280
|
+
chunkXDMIVPJP_cjs.MailFolderTree,
|
|
12273
12281
|
{
|
|
12274
12282
|
nodes: folderTree,
|
|
12275
12283
|
selected: selectedFolders,
|
|
@@ -14854,36 +14862,36 @@ function ConnectedAddContacts({
|
|
|
14854
14862
|
const [rows, setRows] = React9.useState(null);
|
|
14855
14863
|
const selfEmail = arbi.isLoggedIn ? arbi.user.identity()?.email : null;
|
|
14856
14864
|
const submit = async () => {
|
|
14857
|
-
if (!
|
|
14865
|
+
if (!chunkXDMIVPJP_cjs.emailTokens(text2).length) {
|
|
14858
14866
|
notify18("Please enter at least one email address", "error");
|
|
14859
14867
|
return;
|
|
14860
14868
|
}
|
|
14861
|
-
const plan =
|
|
14862
|
-
if (plan.send.length >
|
|
14863
|
-
notify18(`Maximum ${
|
|
14869
|
+
const plan = chunkXDMIVPJP_cjs.planContactInvites(text2, contacts, selfEmail);
|
|
14870
|
+
if (plan.send.length > chunkXDMIVPJP_cjs.MAX_INVITE_EMAILS) {
|
|
14871
|
+
notify18(`Maximum ${chunkXDMIVPJP_cjs.MAX_INVITE_EMAILS} new emails allowed per batch`, "error");
|
|
14864
14872
|
return;
|
|
14865
14873
|
}
|
|
14866
14874
|
setRows(plan.rows);
|
|
14867
14875
|
if (!plan.send.length) {
|
|
14868
|
-
notify18(
|
|
14876
|
+
notify18(chunkXDMIVPJP_cjs.summarizeUnsentInvites(plan.rows), "info");
|
|
14869
14877
|
onSuccess?.();
|
|
14870
14878
|
return;
|
|
14871
14879
|
}
|
|
14872
14880
|
try {
|
|
14873
14881
|
const response = await invite.mutateAsync(plan.send);
|
|
14874
|
-
setRows(
|
|
14875
|
-
const summary =
|
|
14882
|
+
setRows(chunkXDMIVPJP_cjs.applyContactInviteResults(plan, response));
|
|
14883
|
+
const summary = chunkXDMIVPJP_cjs.summarizeContactInvites(response);
|
|
14876
14884
|
notify18(summary.message, summary.failed ? "error" : "success");
|
|
14877
14885
|
onSuccess?.();
|
|
14878
14886
|
} catch (error) {
|
|
14879
14887
|
const message = browser.refusalReason(error, "Failed to add contacts");
|
|
14880
|
-
setRows(
|
|
14888
|
+
setRows(chunkXDMIVPJP_cjs.failContactInvites(plan, message));
|
|
14881
14889
|
notify18(message, "error");
|
|
14882
14890
|
}
|
|
14883
14891
|
};
|
|
14884
14892
|
if (rows)
|
|
14885
14893
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14886
|
-
|
|
14894
|
+
chunkXDMIVPJP_cjs.AddContactsResults,
|
|
14887
14895
|
{
|
|
14888
14896
|
rows,
|
|
14889
14897
|
onDone: onClose,
|
|
@@ -14894,11 +14902,11 @@ function ConnectedAddContacts({
|
|
|
14894
14902
|
}
|
|
14895
14903
|
);
|
|
14896
14904
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14897
|
-
|
|
14905
|
+
chunkXDMIVPJP_cjs.AddContactsForm,
|
|
14898
14906
|
{
|
|
14899
14907
|
value: text2,
|
|
14900
14908
|
onChange: setText,
|
|
14901
|
-
emailCount:
|
|
14909
|
+
emailCount: chunkXDMIVPJP_cjs.emailTokens(text2).length,
|
|
14902
14910
|
isPending: invite.isPending,
|
|
14903
14911
|
onSubmit: () => void submit(),
|
|
14904
14912
|
onCancel: onClose,
|
|
@@ -15313,7 +15321,7 @@ function ConnectedWorkspaceList({
|
|
|
15313
15321
|
else void openWorkspace(workspace.external_id, { name: workspace.name });
|
|
15314
15322
|
};
|
|
15315
15323
|
const createDisabledReason = list.canCreateProjects === false ? react.PROJECT_CREATION_DENIED_REASON : void 0;
|
|
15316
|
-
if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15324
|
+
if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.LoadingIndicator, { message: "Loading workspaces..." });
|
|
15317
15325
|
if (list.error) {
|
|
15318
15326
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15319
15327
|
chunkH6K7EWL2_cjs.HomeLoadError,
|
|
@@ -15386,7 +15394,7 @@ function ConnectedWorkspaceList({
|
|
|
15386
15394
|
workspaceState
|
|
15387
15395
|
}
|
|
15388
15396
|
) })
|
|
15389
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(React9.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15397
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(React9.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.LoadingIndicator, { message: "Loading grid..." }), children: /* @__PURE__ */ jsxRuntime.jsx(chunkH6K7EWL2_cjs.HomeCenteredColumn, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15390
15398
|
WorkspaceTableView,
|
|
15391
15399
|
{
|
|
15392
15400
|
list,
|
|
@@ -15628,7 +15636,7 @@ function ProjectsListPage({
|
|
|
15628
15636
|
}
|
|
15629
15637
|
),
|
|
15630
15638
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15631
|
-
|
|
15639
|
+
chunkTPNLYQD2_cjs.Toolbar,
|
|
15632
15640
|
{
|
|
15633
15641
|
search,
|
|
15634
15642
|
onSearch: setSearch,
|
|
@@ -17252,7 +17260,7 @@ function ConnectedContactCardForm({
|
|
|
17252
17260
|
}) {
|
|
17253
17261
|
const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
17254
17262
|
const [form, setForm] = React9.useState(
|
|
17255
|
-
() => contact?.card ?
|
|
17263
|
+
() => contact?.card ? chunkXDMIVPJP_cjs.contactToForm(contact.card) : chunkXDMIVPJP_cjs.EMPTY_CONTACT_FORM
|
|
17256
17264
|
);
|
|
17257
17265
|
const [invite, setInvite] = React9.useState(false);
|
|
17258
17266
|
const [errors, setErrors] = React9.useState({});
|
|
@@ -17266,14 +17274,14 @@ function ConnectedContactCardForm({
|
|
|
17266
17274
|
const locked = !!contact && !contact.card;
|
|
17267
17275
|
const set = (key, value) => setForm((f) => ({ ...f, [key]: value }));
|
|
17268
17276
|
const submit = () => {
|
|
17269
|
-
const found =
|
|
17270
|
-
const email =
|
|
17277
|
+
const found = chunkXDMIVPJP_cjs.validateContactForm(form);
|
|
17278
|
+
const email = chunkXDMIVPJP_cjs.inviteEmail(form);
|
|
17271
17279
|
if (invite && !email && !found.emails) found.emails = "Add an e-mail address to invite";
|
|
17272
17280
|
setErrors(found);
|
|
17273
17281
|
setServerError(null);
|
|
17274
17282
|
setDuplicateOf(null);
|
|
17275
17283
|
if (Object.keys(found).length) return;
|
|
17276
|
-
const card =
|
|
17284
|
+
const card = chunkXDMIVPJP_cjs.formToContactCard(form);
|
|
17277
17285
|
const onError = (err) => {
|
|
17278
17286
|
setServerError(browser.refusalReason(err, "Could not save"));
|
|
17279
17287
|
if (err instanceof browser.DuplicateContactError && err.contactId !== contact?.external_id)
|
|
@@ -17281,10 +17289,10 @@ function ConnectedContactCardForm({
|
|
|
17281
17289
|
};
|
|
17282
17290
|
const onInvited = (result) => {
|
|
17283
17291
|
if (result.status === "failed") {
|
|
17284
|
-
setServerError(result.outcome_detail ||
|
|
17292
|
+
setServerError(result.outcome_detail || chunkXDMIVPJP_cjs.DEFAULT_CONTACT_OUTCOME_LABELS.failed);
|
|
17285
17293
|
return;
|
|
17286
17294
|
}
|
|
17287
|
-
notify18(
|
|
17295
|
+
notify18(chunkXDMIVPJP_cjs.contactOutcomeMessage({ ...result, outcome: result.outcome ?? "invited" }), "success");
|
|
17288
17296
|
onDone();
|
|
17289
17297
|
};
|
|
17290
17298
|
if (invite && email) {
|
|
@@ -17340,7 +17348,7 @@ function ConnectedContactCardForm({
|
|
|
17340
17348
|
linked && contact && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", "data-testid": "contact-linked-email", children: [
|
|
17341
17349
|
"ARBI: ",
|
|
17342
17350
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: contact.email }),
|
|
17343
|
-
|
|
17351
|
+
chunkXDMIVPJP_cjs.contactStatusLabel(contact.status) && ` \xB7 ${chunkXDMIVPJP_cjs.contactStatusLabel(contact.status)}`
|
|
17344
17352
|
] }),
|
|
17345
17353
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-1", children: [
|
|
17346
17354
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "contact-name", children: "Name" }),
|
|
@@ -17543,7 +17551,7 @@ function ImportVcfSummary({
|
|
|
17543
17551
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "min-w-0", children: [
|
|
17544
17552
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: o.file }),
|
|
17545
17553
|
": ",
|
|
17546
|
-
"error" in o ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: o.error }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children:
|
|
17554
|
+
"error" in o ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: o.error }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: chunkXDMIVPJP_cjs.summarizeImport(o.result) })
|
|
17547
17555
|
] }),
|
|
17548
17556
|
"result" in o && o.result.skipped.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "text-xs text-muted-foreground", children: [
|
|
17549
17557
|
/* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer", children: "Why cards were skipped" }),
|
|
@@ -17581,7 +17589,7 @@ function ConnectedContactsDirectory({
|
|
|
17581
17589
|
const [confirmDelete, setConfirmDelete] = React9.useState(null);
|
|
17582
17590
|
const [importState, setImportState] = React9.useState(null);
|
|
17583
17591
|
const contacts = React9.useMemo(() => data.filter((c) => !(c.user && ui.isAgent(c.user))), [data]);
|
|
17584
|
-
const shown = React9.useMemo(() => contacts.filter((c) =>
|
|
17592
|
+
const shown = React9.useMemo(() => contacts.filter((c) => chunkXDMIVPJP_cjs.matchesContact(c, q)), [contacts, q]);
|
|
17585
17593
|
if (editing)
|
|
17586
17594
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17587
17595
|
"section",
|
|
@@ -17600,7 +17608,7 @@ function ConnectedContactsDirectory({
|
|
|
17600
17608
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { className: "size-4" })
|
|
17601
17609
|
}
|
|
17602
17610
|
),
|
|
17603
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "truncate text-base font-semibold text-foreground", children: editing === "new" ? "New contact" :
|
|
17611
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "truncate text-base font-semibold text-foreground", children: editing === "new" ? "New contact" : chunkXDMIVPJP_cjs.contactName(editing) || "Contact" })
|
|
17604
17612
|
] }),
|
|
17605
17613
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17606
17614
|
ConnectedContactCardForm,
|
|
@@ -17672,8 +17680,8 @@ function ConnectedContactsDirectory({
|
|
|
17672
17680
|
"\u201D."
|
|
17673
17681
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "grid divide-y divide-border rounded-lg border border-border", children: shown.map((c, i) => {
|
|
17674
17682
|
const id = c.external_id ?? `row-${i}`;
|
|
17675
|
-
const name =
|
|
17676
|
-
const status =
|
|
17683
|
+
const name = chunkXDMIVPJP_cjs.contactName(c);
|
|
17684
|
+
const status = chunkXDMIVPJP_cjs.contactStatusLabel(c.status);
|
|
17677
17685
|
const peer = onMessage && c.status === "registered" ? c.user : null;
|
|
17678
17686
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center justify-between gap-2 px-3 py-2 text-sm", children: [
|
|
17679
17687
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -17703,7 +17711,7 @@ function ConnectedContactsDirectory({
|
|
|
17703
17711
|
)
|
|
17704
17712
|
] }),
|
|
17705
17713
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-xs text-muted-foreground", children: [
|
|
17706
|
-
|
|
17714
|
+
chunkXDMIVPJP_cjs.primaryEmail(c) !== name && chunkXDMIVPJP_cjs.primaryEmail(c),
|
|
17707
17715
|
c.card?.organization,
|
|
17708
17716
|
c.card?.birthday && `Birthday ${c.card.birthday}`
|
|
17709
17717
|
].filter(Boolean).join(" \xB7 ") })
|
|
@@ -18482,7 +18490,7 @@ function MailRecipientInput({
|
|
|
18482
18490
|
const { head, token } = currentToken(value);
|
|
18483
18491
|
const found = source.useSuggestions(token);
|
|
18484
18492
|
const options2 = React9.useMemo(() => {
|
|
18485
|
-
const chosen = new Set(
|
|
18493
|
+
const chosen = new Set(chunkXDMIVPJP_cjs.parseMailRecipients(head).map((r) => r.email.toLowerCase()));
|
|
18486
18494
|
return found.filter((p) => !chosen.has(p.email.toLowerCase())).slice(0, 8);
|
|
18487
18495
|
}, [found, head]);
|
|
18488
18496
|
const open = focused && !dismissed && token.length > 0 && options2.length > 0;
|
|
@@ -18630,7 +18638,7 @@ function useWordBody({
|
|
|
18630
18638
|
}
|
|
18631
18639
|
var MailBodyEditor = React9.lazy(
|
|
18632
18640
|
() => import('../MailBodyEditor-D7MGJMLH.cjs').catch(() => ({
|
|
18633
|
-
default:
|
|
18641
|
+
default: chunkXDMIVPJP_cjs.PlainMailBodyEditor
|
|
18634
18642
|
}))
|
|
18635
18643
|
);
|
|
18636
18644
|
var NativeDocxEditor = React9.lazy(
|
|
@@ -18723,9 +18731,9 @@ function MailComposerForm({
|
|
|
18723
18731
|
}, [drafts, draftId, subject]);
|
|
18724
18732
|
const body = () => ({
|
|
18725
18733
|
...initial,
|
|
18726
|
-
to:
|
|
18727
|
-
cc:
|
|
18728
|
-
bcc:
|
|
18734
|
+
to: chunkXDMIVPJP_cjs.parseMailRecipients(to),
|
|
18735
|
+
cc: chunkXDMIVPJP_cjs.parseMailRecipients(cc),
|
|
18736
|
+
bcc: chunkXDMIVPJP_cjs.parseMailRecipients(bcc),
|
|
18729
18737
|
subject,
|
|
18730
18738
|
text: text2,
|
|
18731
18739
|
html,
|
|
@@ -19197,7 +19205,7 @@ function MailComposerForm({
|
|
|
19197
19205
|
}
|
|
19198
19206
|
),
|
|
19199
19207
|
documents && /* @__PURE__ */ jsxRuntime.jsx(
|
|
19200
|
-
|
|
19208
|
+
chunkXDMIVPJP_cjs.MailDocumentPicker,
|
|
19201
19209
|
{
|
|
19202
19210
|
documents: documents.documents,
|
|
19203
19211
|
disabled: locked,
|
|
@@ -19316,7 +19324,7 @@ function ConnectedMailComposer({
|
|
|
19316
19324
|
openId,
|
|
19317
19325
|
async (from, id) => {
|
|
19318
19326
|
const message = await client.getMessage(from, id);
|
|
19319
|
-
return
|
|
19327
|
+
return chunkXDMIVPJP_cjs.draftMailCompose(
|
|
19320
19328
|
message,
|
|
19321
19329
|
await hydrateMailAttachments(client, from, message.id, message.attachments, {
|
|
19322
19330
|
isOnline,
|
|
@@ -19330,11 +19338,11 @@ function ConnectedMailComposer({
|
|
|
19330
19338
|
const start = React9.useMemo(() => {
|
|
19331
19339
|
if (replyTo)
|
|
19332
19340
|
return original.data && account ? {
|
|
19333
|
-
...
|
|
19341
|
+
...chunkXDMIVPJP_cjs.replyMailCompose(original.data, { account, folderRole: "inbox" }),
|
|
19334
19342
|
text: "",
|
|
19335
19343
|
html: ""
|
|
19336
19344
|
} : void 0;
|
|
19337
|
-
return reloaded ? draft.data : initial ?? (openId ? draft.data :
|
|
19345
|
+
return reloaded ? draft.data : initial ?? (openId ? draft.data : chunkXDMIVPJP_cjs.emptyMailCompose());
|
|
19338
19346
|
}, [replyTo, original.data, account, reloaded, initial, openId, draft.data]);
|
|
19339
19347
|
if (!start)
|
|
19340
19348
|
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" });
|
|
@@ -19641,7 +19649,7 @@ function ConnectedMailbox({
|
|
|
19641
19649
|
const message = detail.data;
|
|
19642
19650
|
React9.useEffect(() => {
|
|
19643
19651
|
if (!composeAttachments?.length) return;
|
|
19644
|
-
openCompose({ ...
|
|
19652
|
+
openCompose({ ...chunkXDMIVPJP_cjs.emptyMailCompose(), attachments: composeAttachments });
|
|
19645
19653
|
onComposeOpened?.();
|
|
19646
19654
|
}, [composeAttachments]);
|
|
19647
19655
|
React9.useEffect(() => {
|
|
@@ -19773,7 +19781,7 @@ function ConnectedMailbox({
|
|
|
19773
19781
|
const editDraft = async () => {
|
|
19774
19782
|
if (!message) return;
|
|
19775
19783
|
try {
|
|
19776
|
-
openCompose(
|
|
19784
|
+
openCompose(chunkXDMIVPJP_cjs.draftMailCompose(message, await hydrate(message.attachments)));
|
|
19777
19785
|
} catch (e) {
|
|
19778
19786
|
setActionError(e instanceof Error ? e.message : "Could not load draft attachments");
|
|
19779
19787
|
}
|
|
@@ -19782,7 +19790,7 @@ function ConnectedMailbox({
|
|
|
19782
19790
|
if (!message || !account) return;
|
|
19783
19791
|
try {
|
|
19784
19792
|
const attachments = forward ? await hydrate(message.attachments) : [];
|
|
19785
|
-
openCompose(
|
|
19793
|
+
openCompose(chunkXDMIVPJP_cjs.replyMailCompose(message, { account, folderRole, forward, all, attachments }));
|
|
19786
19794
|
} catch (e) {
|
|
19787
19795
|
setActionError(e instanceof Error ? e.message : "Could not prepare forwarded attachments");
|
|
19788
19796
|
}
|
|
@@ -19902,7 +19910,7 @@ function ConnectedMailbox({
|
|
|
19902
19910
|
{
|
|
19903
19911
|
size: "sm",
|
|
19904
19912
|
disabled: !ready || !!compose,
|
|
19905
|
-
onClick: () => openCompose(
|
|
19913
|
+
onClick: () => openCompose(chunkXDMIVPJP_cjs.emptyMailCompose()),
|
|
19906
19914
|
children: [
|
|
19907
19915
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "mr-1.5 size-4" }),
|
|
19908
19916
|
"Email"
|
|
@@ -19981,7 +19989,7 @@ function ConnectedMailbox({
|
|
|
19981
19989
|
onEdit: (value) => openCompose({ ...value })
|
|
19982
19990
|
}),
|
|
19983
19991
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: deviceFolder ? "hidden" : "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19984
|
-
|
|
19992
|
+
chunkXDMIVPJP_cjs.MailGrid,
|
|
19985
19993
|
{
|
|
19986
19994
|
messages: filteredMessages,
|
|
19987
19995
|
loading: list.isPending && list.fetchStatus !== "idle",
|
|
@@ -20045,7 +20053,7 @@ function ConnectedMailbox({
|
|
|
20045
20053
|
},
|
|
20046
20054
|
`${account?.id}-${composeSession}`
|
|
20047
20055
|
) : message && selected ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
20048
|
-
|
|
20056
|
+
chunkXDMIVPJP_cjs.MailMessageView,
|
|
20049
20057
|
{
|
|
20050
20058
|
account,
|
|
20051
20059
|
message,
|
|
@@ -20182,7 +20190,7 @@ function ConnectedMailMessage({
|
|
|
20182
20190
|
const attachments = forward ? await hydrateMailAttachments(client, account, message.id, message.attachments, {
|
|
20183
20191
|
isOnline
|
|
20184
20192
|
}) : [];
|
|
20185
|
-
onCompose(
|
|
20193
|
+
onCompose(chunkXDMIVPJP_cjs.replyMailCompose(message, { account, folderRole, forward, all, attachments }));
|
|
20186
20194
|
} catch (e) {
|
|
20187
20195
|
setError(e instanceof Error ? e.message : "Could not prepare forwarded attachments");
|
|
20188
20196
|
}
|
|
@@ -20190,7 +20198,7 @@ function ConnectedMailMessage({
|
|
|
20190
20198
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
20191
20199
|
error && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "px-4 pt-3 text-sm text-destructive", children: error }),
|
|
20192
20200
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20193
|
-
|
|
20201
|
+
chunkXDMIVPJP_cjs.MailMessageView,
|
|
20194
20202
|
{
|
|
20195
20203
|
account,
|
|
20196
20204
|
message,
|
|
@@ -20201,7 +20209,7 @@ function ConnectedMailMessage({
|
|
|
20201
20209
|
onBack: onClose,
|
|
20202
20210
|
onEditDraft: () => void hydrateMailAttachments(client, account, message.id, message.attachments, {
|
|
20203
20211
|
isOnline
|
|
20204
|
-
}).then((attachments) => onCompose(
|
|
20212
|
+
}).then((attachments) => onCompose(chunkXDMIVPJP_cjs.draftMailCompose(message, attachments))).catch((e) => setError(e.message)),
|
|
20205
20213
|
onReply: (forward, all) => void reply(forward, all),
|
|
20206
20214
|
onReplyWithArbi: onReplyWithArbi && account.provider === "native" ? () => onReplyWithArbi(message, account) : void 0,
|
|
20207
20215
|
onUpdate: (body) => void update(body),
|
|
@@ -24109,9 +24117,9 @@ function ConnectedTagEntity({
|
|
|
24109
24117
|
onEditClick();
|
|
24110
24118
|
}
|
|
24111
24119
|
};
|
|
24112
|
-
const tooltipContent = showTooltip ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24120
|
+
const tooltipContent = showTooltip ? /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltip, { children: [
|
|
24113
24121
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24114
|
-
|
|
24122
|
+
chunkTPNLYQD2_cjs.EntityTooltipHeader,
|
|
24115
24123
|
{
|
|
24116
24124
|
lead: /* @__PURE__ */ jsxRuntime.jsx(
|
|
24117
24125
|
"span",
|
|
@@ -26590,7 +26598,7 @@ function useBatchCompleteToasts() {
|
|
|
26590
26598
|
}
|
|
26591
26599
|
}, AI_FIELDS_NOTICE_WINDOW_MS);
|
|
26592
26600
|
} else if (message.batch_type === "entity_extract") {
|
|
26593
|
-
say(`${
|
|
26601
|
+
say(`${chunkTPNLYQD2_cjs.entitiesPhrase()} extracted from ${chunkTPNLYQD2_cjs.documentCount(docIds.length)}`, "success", {
|
|
26594
26602
|
...openTags && { action: { label: "View", onClick: openTags } }
|
|
26595
26603
|
});
|
|
26596
26604
|
} else if (message.batch_type === "upload") {
|
|
@@ -28751,7 +28759,7 @@ function ConnectedFilesPage({
|
|
|
28751
28759
|
viewMode === "grid" ? (
|
|
28752
28760
|
// ‹ n / N › over the table's displayed rows; a step opens the document.
|
|
28753
28761
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28754
|
-
|
|
28762
|
+
chunkTPNLYQD2_cjs.GridRowNavigator,
|
|
28755
28763
|
{
|
|
28756
28764
|
gridApi,
|
|
28757
28765
|
selectedId: viewingDocumentId ?? selectedDocumentIds[0] ?? null,
|
|
@@ -29927,10 +29935,10 @@ function ConnectedChatThread({
|
|
|
29927
29935
|
};
|
|
29928
29936
|
const History = host.ThreadHistory;
|
|
29929
29937
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29930
|
-
|
|
29938
|
+
chunkXDMIVPJP_cjs.DmThreadFrame,
|
|
29931
29939
|
{
|
|
29932
29940
|
accessBanner: pendingAccessRequest ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
29933
|
-
|
|
29941
|
+
chunkXDMIVPJP_cjs.DmAccessRequestBanner,
|
|
29934
29942
|
{
|
|
29935
29943
|
name: peer?.given_name ?? "They",
|
|
29936
29944
|
onReview: () => host.onReviewAccessRequest?.(pendingAccessRequest)
|
|
@@ -33105,7 +33113,468 @@ function Inner() {
|
|
|
33105
33113
|
function WorkflowLaunchHost() {
|
|
33106
33114
|
return chunkO3MRE2HL_cjs.useWorkflowLaunchRequest() ? /* @__PURE__ */ jsxRuntime.jsx(Inner, {}) : null;
|
|
33107
33115
|
}
|
|
33116
|
+
function isNeedsConfirmationDetail(detail) {
|
|
33117
|
+
return typeof detail === "object" && detail !== null && detail.needs_confirmation === "resource_private";
|
|
33118
|
+
}
|
|
33119
|
+
function extractDetail(err) {
|
|
33120
|
+
const error = err;
|
|
33121
|
+
return error?.detail ?? error?.response?.data?.detail ?? error?.error?.detail;
|
|
33122
|
+
}
|
|
33123
|
+
function isNotFoundError(err) {
|
|
33124
|
+
const error = err;
|
|
33125
|
+
const status = error?.status ?? error?.response?.status;
|
|
33126
|
+
const detail = extractDetail(err);
|
|
33127
|
+
const detailStr = typeof detail === "string" ? detail.toLowerCase() : "";
|
|
33128
|
+
return status === 404 || detailStr.includes("not found") || detailStr.includes("no user") || detailStr.includes("does not exist");
|
|
33129
|
+
}
|
|
33130
|
+
function groupByRole(entries) {
|
|
33131
|
+
const groups = /* @__PURE__ */ new Map();
|
|
33132
|
+
for (const { email, role } of entries) {
|
|
33133
|
+
const group = groups.get(role);
|
|
33134
|
+
if (group) group.push(email);
|
|
33135
|
+
else groups.set(role, [email]);
|
|
33136
|
+
}
|
|
33137
|
+
return groups;
|
|
33138
|
+
}
|
|
33139
|
+
function useShareResource({
|
|
33140
|
+
workspaceExtId,
|
|
33141
|
+
resourceType,
|
|
33142
|
+
resourceExtId,
|
|
33143
|
+
resourceName,
|
|
33144
|
+
memberEmails = []
|
|
33145
|
+
}) {
|
|
33146
|
+
const { confirm, notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
33147
|
+
const addWorkspaceUsersMutation = react.useAddWorkspaceMembers();
|
|
33148
|
+
const [isSharing, setIsSharing] = React9.useState(false);
|
|
33149
|
+
const memberEmailSet = new Set(memberEmails.map((e) => e.toLowerCase()));
|
|
33150
|
+
const submit = (emails, role, extra) => addWorkspaceUsersMutation.mutateAsync({
|
|
33151
|
+
emails,
|
|
33152
|
+
role,
|
|
33153
|
+
workspace_ext_id: workspaceExtId,
|
|
33154
|
+
resource_type: resourceType,
|
|
33155
|
+
resource_ext_id: resourceExtId,
|
|
33156
|
+
...extra
|
|
33157
|
+
});
|
|
33158
|
+
const shareResource = async (entries, shareWithWorkspace) => {
|
|
33159
|
+
if (entries.length === 0) return "error";
|
|
33160
|
+
setIsSharing(true);
|
|
33161
|
+
try {
|
|
33162
|
+
let confirmShare = shareWithWorkspace;
|
|
33163
|
+
const notFoundByRole = /* @__PURE__ */ new Map();
|
|
33164
|
+
for (const [role, emails] of groupByRole(entries)) {
|
|
33165
|
+
let response = null;
|
|
33166
|
+
for (let attempt = 0; attempt < 2; attempt++) {
|
|
33167
|
+
try {
|
|
33168
|
+
response = await submit(emails, role, confirmShare ? { confirm_share: true } : {});
|
|
33169
|
+
break;
|
|
33170
|
+
} catch (err) {
|
|
33171
|
+
const detail = extractDetail(err);
|
|
33172
|
+
if (isNeedsConfirmationDetail(detail) && !confirmShare) {
|
|
33173
|
+
const label = resourceType === "document" ? "document" : "conversation";
|
|
33174
|
+
const displayName = detail.resource_name || resourceName || "Untitled";
|
|
33175
|
+
const confirmed = await confirm({
|
|
33176
|
+
message: `"${displayName}" is currently private. Sharing it will make it visible to everyone in this workspace, not just ${emails.length === 1 ? emails[0] : "the people you selected"}. Continue?`,
|
|
33177
|
+
title: `Share private ${label}`,
|
|
33178
|
+
kind: "yesno"
|
|
33179
|
+
});
|
|
33180
|
+
if (!confirmed) return "cancelled";
|
|
33181
|
+
confirmShare = true;
|
|
33182
|
+
continue;
|
|
33183
|
+
}
|
|
33184
|
+
if (isNotFoundError(err)) {
|
|
33185
|
+
response = [];
|
|
33186
|
+
break;
|
|
33187
|
+
}
|
|
33188
|
+
throw err;
|
|
33189
|
+
}
|
|
33190
|
+
}
|
|
33191
|
+
const addedEmails = new Set((response || []).map((wu) => wu.user.email.toLowerCase()));
|
|
33192
|
+
const groupNotFound = emails.filter(
|
|
33193
|
+
(email) => !addedEmails.has(email.toLowerCase()) && !memberEmailSet.has(email.toLowerCase())
|
|
33194
|
+
);
|
|
33195
|
+
if (groupNotFound.length > 0) notFoundByRole.set(role, groupNotFound);
|
|
33196
|
+
}
|
|
33197
|
+
const allNotFound = [...notFoundByRole.values()].flat();
|
|
33198
|
+
const handledCount = entries.length - allNotFound.length;
|
|
33199
|
+
if (allNotFound.length > 0) {
|
|
33200
|
+
const shouldInvite = await confirm({
|
|
33201
|
+
message: invitationMessage(allNotFound),
|
|
33202
|
+
title: allNotFound.length === 1 ? "User not found" : "Users not found",
|
|
33203
|
+
kind: "yesno"
|
|
33204
|
+
});
|
|
33205
|
+
if (shouldInvite) {
|
|
33206
|
+
for (const [role, emails] of notFoundByRole) {
|
|
33207
|
+
await submit(emails, role, {
|
|
33208
|
+
confirm_invite: true,
|
|
33209
|
+
...confirmShare ? { confirm_share: true } : {}
|
|
33210
|
+
});
|
|
33211
|
+
}
|
|
33212
|
+
} else if (handledCount === 0) {
|
|
33213
|
+
return "cancelled";
|
|
33214
|
+
}
|
|
33215
|
+
}
|
|
33216
|
+
notify18("Shared successfully", "success");
|
|
33217
|
+
return "shared";
|
|
33218
|
+
} catch (err) {
|
|
33219
|
+
console.error("Failed to share resource:", err);
|
|
33220
|
+
notify18("Failed to share", "error");
|
|
33221
|
+
return "error";
|
|
33222
|
+
} finally {
|
|
33223
|
+
setIsSharing(false);
|
|
33224
|
+
}
|
|
33225
|
+
};
|
|
33226
|
+
return { shareResource, isSharing };
|
|
33227
|
+
}
|
|
33228
|
+
function ConnectedPeopleMultiSelect({
|
|
33229
|
+
includeAgents = false,
|
|
33230
|
+
selectedUsers,
|
|
33231
|
+
onSelectionChange,
|
|
33232
|
+
allowEmailEntry = false,
|
|
33233
|
+
excludeEmails = [],
|
|
33234
|
+
memberEmails = [],
|
|
33235
|
+
showContactToggle = false,
|
|
33236
|
+
showPresence = false,
|
|
33237
|
+
placeholder = "Select users...",
|
|
33238
|
+
emptyMessage = "No users available",
|
|
33239
|
+
actionSlot,
|
|
33240
|
+
renderChipExtra
|
|
33241
|
+
}) {
|
|
33242
|
+
const [open, setOpen] = React9.useState(false);
|
|
33243
|
+
const [searchValue, setSearchValue] = React9.useState("");
|
|
33244
|
+
const selectedIds = React9.useMemo(
|
|
33245
|
+
() => new Set(selectedUsers.map((u) => u.id.toLowerCase())),
|
|
33246
|
+
[selectedUsers]
|
|
33247
|
+
);
|
|
33248
|
+
const selectedEmails = React9.useMemo(
|
|
33249
|
+
() => new Set(selectedUsers.map((u) => u.email.toLowerCase())),
|
|
33250
|
+
[selectedUsers]
|
|
33251
|
+
);
|
|
33252
|
+
const excludeSet = React9.useMemo(
|
|
33253
|
+
() => /* @__PURE__ */ new Set([...excludeEmails.map((e) => e.toLowerCase())]),
|
|
33254
|
+
[excludeEmails]
|
|
33255
|
+
);
|
|
33256
|
+
const memberSet = React9.useMemo(() => new Set(memberEmails.map((e) => e.toLowerCase())), [memberEmails]);
|
|
33257
|
+
const { people } = react.usePeopleSearch(searchValue, { agents: includeAgents });
|
|
33258
|
+
const availablePeople = React9.useMemo(
|
|
33259
|
+
() => people.filter((p) => !excludeSet.has(p.email.toLowerCase())),
|
|
33260
|
+
[people, excludeSet]
|
|
33261
|
+
);
|
|
33262
|
+
const isSelected = React9.useCallback(
|
|
33263
|
+
(id, email) => selectedIds.has(id.toLowerCase()) || selectedEmails.has(email.toLowerCase()),
|
|
33264
|
+
[selectedIds, selectedEmails]
|
|
33265
|
+
);
|
|
33266
|
+
const isValidEmail = (value) => {
|
|
33267
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
33268
|
+
return emailRegex.test(value.trim());
|
|
33269
|
+
};
|
|
33270
|
+
const isEmailExcluded = React9.useCallback(
|
|
33271
|
+
(email) => excludeSet.has(email.toLowerCase()),
|
|
33272
|
+
[excludeSet]
|
|
33273
|
+
);
|
|
33274
|
+
const isEmailSelected = React9.useCallback(
|
|
33275
|
+
(email) => selectedEmails.has(email.toLowerCase()),
|
|
33276
|
+
[selectedEmails]
|
|
33277
|
+
);
|
|
33278
|
+
const selectionId = (person) => person.user?.external_id ?? person.email.toLowerCase();
|
|
33279
|
+
const togglePerson = (person) => {
|
|
33280
|
+
const id = selectionId(person);
|
|
33281
|
+
if (isSelected(id, person.email)) {
|
|
33282
|
+
onSelectionChange(
|
|
33283
|
+
selectedUsers.filter(
|
|
33284
|
+
(u) => u.id.toLowerCase() !== id.toLowerCase() && u.email.toLowerCase() !== person.email.toLowerCase()
|
|
33285
|
+
)
|
|
33286
|
+
);
|
|
33287
|
+
} else {
|
|
33288
|
+
onSelectionChange([
|
|
33289
|
+
...selectedUsers,
|
|
33290
|
+
person.user ? { id, email: person.user.email, user: person.user } : { id, email: person.email.toLowerCase() }
|
|
33291
|
+
]);
|
|
33292
|
+
}
|
|
33293
|
+
setSearchValue("");
|
|
33294
|
+
};
|
|
33295
|
+
const addEmail = () => {
|
|
33296
|
+
const email = searchValue.trim().toLowerCase();
|
|
33297
|
+
if (email && isValidEmail(email) && !isEmailExcluded(email) && !isEmailSelected(email)) {
|
|
33298
|
+
onSelectionChange([...selectedUsers, { id: email, email }]);
|
|
33299
|
+
setSearchValue("");
|
|
33300
|
+
setOpen(false);
|
|
33301
|
+
}
|
|
33302
|
+
};
|
|
33303
|
+
const removeUser = (id) => {
|
|
33304
|
+
onSelectionChange(selectedUsers.filter((u) => u.id.toLowerCase() !== id.toLowerCase()));
|
|
33305
|
+
};
|
|
33306
|
+
const canAddEmail = allowEmailEntry && searchValue && isValidEmail(searchValue) && !isEmailExcluded(searchValue) && !isEmailSelected(searchValue) && !availablePeople.some((p) => p.email.toLowerCase() === searchValue.trim().toLowerCase());
|
|
33307
|
+
const getEmptyMessage = () => {
|
|
33308
|
+
if (!searchValue.trim()) return emptyMessage;
|
|
33309
|
+
if (allowEmailEntry) {
|
|
33310
|
+
if (!isValidEmail(searchValue)) return "Type a valid email address";
|
|
33311
|
+
if (isEmailExcluded(searchValue)) return "This user is already a member";
|
|
33312
|
+
if (isEmailSelected(searchValue)) return "Already selected";
|
|
33313
|
+
}
|
|
33314
|
+
return "No matching users";
|
|
33315
|
+
};
|
|
33316
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33317
|
+
chunkXDMIVPJP_cjs.RecipientPicker,
|
|
33318
|
+
{
|
|
33319
|
+
layout: "field",
|
|
33320
|
+
selected: selectedUsers.map((selected) => ({
|
|
33321
|
+
id: selected.id,
|
|
33322
|
+
identity: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33323
|
+
selected.user ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33324
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33325
|
+
ConnectedUserEntity,
|
|
33326
|
+
{
|
|
33327
|
+
user: selected.user,
|
|
33328
|
+
size: "xs",
|
|
33329
|
+
variant: "pill",
|
|
33330
|
+
showPresence,
|
|
33331
|
+
interactive: false
|
|
33332
|
+
}
|
|
33333
|
+
),
|
|
33334
|
+
showContactToggle && /* @__PURE__ */ jsxRuntime.jsx(ConnectedContactToggle, { user: selected.user })
|
|
33335
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm truncate", children: selected.email }),
|
|
33336
|
+
renderChipExtra?.(selected)
|
|
33337
|
+
] })
|
|
33338
|
+
})),
|
|
33339
|
+
onRemove: removeUser,
|
|
33340
|
+
candidates: availablePeople.map((person) => {
|
|
33341
|
+
const id = selectionId(person), selected = isSelected(id, person.email), isMember = memberSet.has(person.email.toLowerCase());
|
|
33342
|
+
return {
|
|
33343
|
+
id,
|
|
33344
|
+
value: `person-${id}`,
|
|
33345
|
+
identity: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33346
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33347
|
+
lucideReact.Check,
|
|
33348
|
+
{
|
|
33349
|
+
className: `mr-2 h-4 w-4 shrink-0 ${selected ? "opacity-100" : "opacity-0"}`
|
|
33350
|
+
}
|
|
33351
|
+
),
|
|
33352
|
+
person.user ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
33353
|
+
ConnectedUserEntity,
|
|
33354
|
+
{
|
|
33355
|
+
user: person.user,
|
|
33356
|
+
size: "xs",
|
|
33357
|
+
variant: "pill",
|
|
33358
|
+
showPresence,
|
|
33359
|
+
interactive: false
|
|
33360
|
+
}
|
|
33361
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
33362
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm", children: person.name }),
|
|
33363
|
+
person.name !== person.email && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-muted-foreground", children: person.email })
|
|
33364
|
+
] }),
|
|
33365
|
+
isMember ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: "Member" }) : !person.user && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto pl-2 text-xs text-muted-foreground", children: "Invite" })
|
|
33366
|
+
] })
|
|
33367
|
+
};
|
|
33368
|
+
}),
|
|
33369
|
+
onPick: (id) => {
|
|
33370
|
+
const person = availablePeople.find((p) => selectionId(p) === id);
|
|
33371
|
+
if (person) togglePerson(person);
|
|
33372
|
+
},
|
|
33373
|
+
canAdd: true,
|
|
33374
|
+
isOpen: open,
|
|
33375
|
+
onOpenChange: setOpen,
|
|
33376
|
+
search: searchValue,
|
|
33377
|
+
onSearchChange: setSearchValue,
|
|
33378
|
+
hasNoKnownUsers: false,
|
|
33379
|
+
labels: {
|
|
33380
|
+
selectRecipient: placeholder,
|
|
33381
|
+
searchUsers: allowEmailEntry ? "Search or type email..." : "Search users...",
|
|
33382
|
+
removeRecipient: "Remove"
|
|
33383
|
+
},
|
|
33384
|
+
triggerTestId: "user-multi-select-trigger",
|
|
33385
|
+
candidateHeading: "People",
|
|
33386
|
+
emptyContent: canAddEmail ? null : getEmptyMessage(),
|
|
33387
|
+
actionSlot,
|
|
33388
|
+
beforeCandidates: canAddEmail && /* @__PURE__ */ jsxRuntime.jsx(ui.CommandGroup, { heading: "Add by email", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33389
|
+
ui.CommandItem,
|
|
33390
|
+
{
|
|
33391
|
+
value: `add-email-${searchValue}`,
|
|
33392
|
+
onSelect: addEmail,
|
|
33393
|
+
className: "cursor-pointer",
|
|
33394
|
+
children: [
|
|
33395
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "mr-2 h-4 w-4 shrink-0" }),
|
|
33396
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
33397
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm", children: [
|
|
33398
|
+
"Add \u201C",
|
|
33399
|
+
searchValue,
|
|
33400
|
+
"\u201D"
|
|
33401
|
+
] }),
|
|
33402
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "Not in your contacts or workspaces yet. ARBI checks for an account when you add them." })
|
|
33403
|
+
] })
|
|
33404
|
+
]
|
|
33405
|
+
},
|
|
33406
|
+
`add-email-${searchValue}`
|
|
33407
|
+
) })
|
|
33408
|
+
}
|
|
33409
|
+
);
|
|
33410
|
+
}
|
|
33411
|
+
var ALL_ROLES2 = [
|
|
33412
|
+
{ value: "owner", label: "Owner" },
|
|
33413
|
+
{ value: "collaborator", label: "Collaborator" },
|
|
33414
|
+
{ value: "guest", label: "Guest" }
|
|
33415
|
+
];
|
|
33416
|
+
function ResourceShareForm({
|
|
33417
|
+
resourceType,
|
|
33418
|
+
resourceExtId,
|
|
33419
|
+
workspaceExtId,
|
|
33420
|
+
resourceName,
|
|
33421
|
+
isPrivate,
|
|
33422
|
+
onDone,
|
|
33423
|
+
disabled = false
|
|
33424
|
+
}) {
|
|
33425
|
+
const [selectedUsers, setPeopleSelections] = React9.useState([]);
|
|
33426
|
+
const [rolesByEmail, setRolesByEmail] = React9.useState({});
|
|
33427
|
+
const [shareWithWorkspace, setShareWithWorkspace] = React9.useState(isPrivate);
|
|
33428
|
+
const { data: workspaces = [] } = react.useWorkspaces();
|
|
33429
|
+
const markDocumentShared = react.useMarkDocumentShared();
|
|
33430
|
+
const workspace = React9.useMemo(
|
|
33431
|
+
() => workspaces.find((ws) => ws.external_id === workspaceExtId),
|
|
33432
|
+
[workspaces, workspaceExtId]
|
|
33433
|
+
);
|
|
33434
|
+
const memberEmailSet = React9.useMemo(
|
|
33435
|
+
() => new Set((workspace?.users ?? []).map((wu) => wu.user.email.toLowerCase())),
|
|
33436
|
+
[workspace]
|
|
33437
|
+
);
|
|
33438
|
+
const memberRoleByEmail = React9.useMemo(
|
|
33439
|
+
() => new Map((workspace?.users ?? []).map((wu) => [wu.user.email.toLowerCase(), wu.role])),
|
|
33440
|
+
[workspace]
|
|
33441
|
+
);
|
|
33442
|
+
const { shareResource, isSharing } = useShareResource({
|
|
33443
|
+
workspaceExtId,
|
|
33444
|
+
resourceType,
|
|
33445
|
+
resourceExtId,
|
|
33446
|
+
resourceName,
|
|
33447
|
+
memberEmails: [...memberEmailSet]
|
|
33448
|
+
});
|
|
33449
|
+
const label = resourceType === "document" ? "document" : "conversation";
|
|
33450
|
+
const workspaceLabel = ui.getEntityLabel("WORKSPACE").toLowerCase();
|
|
33451
|
+
const handleSubmit = async () => {
|
|
33452
|
+
if (disabled || selectedUsers.length === 0) return;
|
|
33453
|
+
const entries = selectedUsers.map((u) => {
|
|
33454
|
+
const lower = u.email.toLowerCase();
|
|
33455
|
+
const role = memberEmailSet.has(lower) ? memberRoleByEmail.get(lower) : rolesByEmail[u.email] ?? "collaborator";
|
|
33456
|
+
return { email: u.email, role };
|
|
33457
|
+
});
|
|
33458
|
+
const result = await shareResource(entries, shareWithWorkspace);
|
|
33459
|
+
if (result === "shared") {
|
|
33460
|
+
if (resourceType === "document" && shareWithWorkspace) {
|
|
33461
|
+
markDocumentShared(resourceExtId);
|
|
33462
|
+
}
|
|
33463
|
+
setPeopleSelections([]);
|
|
33464
|
+
setRolesByEmail({});
|
|
33465
|
+
onDone();
|
|
33466
|
+
}
|
|
33467
|
+
};
|
|
33468
|
+
const canSubmit = !disabled && selectedUsers.length > 0 && (!isPrivate || shareWithWorkspace);
|
|
33469
|
+
const renderChipExtra = (selected) => {
|
|
33470
|
+
const lower = selected.email.toLowerCase();
|
|
33471
|
+
if (memberEmailSet.has(lower)) {
|
|
33472
|
+
const memberRole = memberRoleByEmail.get(lower);
|
|
33473
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
33474
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "Member" }),
|
|
33475
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { variant: "default", className: chunkKFQ6E6LE_cjs.getRoleBadgeClass(memberRole), children: chunkKFQ6E6LE_cjs.formatRole(memberRole) })
|
|
33476
|
+
] });
|
|
33477
|
+
}
|
|
33478
|
+
const role = rolesByEmail[selected.email] ?? "collaborator";
|
|
33479
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
|
|
33480
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33481
|
+
ui.Select,
|
|
33482
|
+
{
|
|
33483
|
+
value: role,
|
|
33484
|
+
onValueChange: (value) => setRolesByEmail((prev) => ({ ...prev, [selected.email]: value })),
|
|
33485
|
+
children: [
|
|
33486
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectTrigger, { className: "h-7 w-[120px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.SelectValue, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { variant: "default", className: chunkKFQ6E6LE_cjs.getRoleBadgeClass(role), children: chunkKFQ6E6LE_cjs.formatRole(role) }) }) }),
|
|
33487
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectContent, { children: ALL_ROLES2.map((r) => /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: r.value, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { variant: "default", className: chunkKFQ6E6LE_cjs.getRoleBadgeClass(r.value), children: r.label }) }, r.value)) })
|
|
33488
|
+
]
|
|
33489
|
+
}
|
|
33490
|
+
) }) }),
|
|
33491
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "left", className: "max-w-[300px]", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: chunkKFQ6E6LE_cjs.getRoleDescription(role) }) })
|
|
33492
|
+
] }) });
|
|
33493
|
+
};
|
|
33494
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
33495
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
33496
|
+
"Adding someone here invites them into",
|
|
33497
|
+
" ",
|
|
33498
|
+
workspace?.name ? `"${workspace.name}"` : `this ${workspaceLabel}`,
|
|
33499
|
+
". Anyone not already a member will be added with the role you choose below."
|
|
33500
|
+
] }),
|
|
33501
|
+
isPrivate && /* @__PURE__ */ jsxRuntime.jsxs(chunkULWRNGGE_cjs.ModalSection, { className: "space-y-2", children: [
|
|
33502
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33503
|
+
ui.VisibilityToggle,
|
|
33504
|
+
{
|
|
33505
|
+
items: { shared: shareWithWorkspace },
|
|
33506
|
+
onToggle: setShareWithWorkspace,
|
|
33507
|
+
"data-testid": "share-resource-visibility-toggle"
|
|
33508
|
+
}
|
|
33509
|
+
),
|
|
33510
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: shareWithWorkspace ? `This ${label} is private today. Sharing it will make it visible to everyone in this ${workspaceLabel}, not just the people below.` : `Turn this on to share the ${label} \u2014 it can't be shared with specific people while it stays private.` })
|
|
33511
|
+
] }),
|
|
33512
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33513
|
+
ConnectedPeopleMultiSelect,
|
|
33514
|
+
{
|
|
33515
|
+
includeAgents: true,
|
|
33516
|
+
selectedUsers,
|
|
33517
|
+
onSelectionChange: setPeopleSelections,
|
|
33518
|
+
allowEmailEntry: true,
|
|
33519
|
+
memberEmails: [...memberEmailSet],
|
|
33520
|
+
placeholder: "Search contacts or type email...",
|
|
33521
|
+
emptyMessage: "Type a name or email to share with",
|
|
33522
|
+
renderChipExtra
|
|
33523
|
+
}
|
|
33524
|
+
),
|
|
33525
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-2 pt-2", children: [
|
|
33526
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outline", onClick: onDone, disabled: isSharing, children: "Cancel" }),
|
|
33527
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: handleSubmit, disabled: !canSubmit || isSharing, children: isSharing ? "Sharing..." : `Share${selectedUsers.length > 0 ? ` with ${selectedUsers.length}` : ""}` })
|
|
33528
|
+
] })
|
|
33529
|
+
] });
|
|
33530
|
+
}
|
|
33531
|
+
function ConnectedShareDialog({ request, onClose }) {
|
|
33532
|
+
const { live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
33533
|
+
const identity = request ? `${request.workspaceExtId}:${request.resourceType}:${request.resourceExtId}` : null;
|
|
33534
|
+
const intent = React9.useRef({ identity, generation: 0 });
|
|
33535
|
+
if (intent.current.identity !== identity) {
|
|
33536
|
+
intent.current = { identity, generation: intent.current.generation + 1 };
|
|
33537
|
+
}
|
|
33538
|
+
const generation = intent.current.generation;
|
|
33539
|
+
const label = request?.resourceType === "document" ? "document" : "conversation";
|
|
33540
|
+
const title = request?.resourceName ? `Share "${request.resourceName}"` : `Share ${label}`;
|
|
33541
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: request !== null, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33542
|
+
ui.DialogContent,
|
|
33543
|
+
{
|
|
33544
|
+
presentation: "sheet",
|
|
33545
|
+
className: "sm:max-w-[500px]",
|
|
33546
|
+
"data-testid": "resource-share-dialog",
|
|
33547
|
+
children: [
|
|
33548
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk223D4727_cjs.ModalBreadcrumbHeader, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Share2, { className: "w-4 h-4" }), title }),
|
|
33549
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.DialogDescription, { className: "sr-only", children: [
|
|
33550
|
+
"Share this ",
|
|
33551
|
+
label,
|
|
33552
|
+
" by email, with people already on the platform or new invitees"
|
|
33553
|
+
] }),
|
|
33554
|
+
request && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33555
|
+
!live && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
33556
|
+
"Connect your account to share this ",
|
|
33557
|
+
label,
|
|
33558
|
+
"."
|
|
33559
|
+
] }),
|
|
33560
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33561
|
+
ResourceShareForm,
|
|
33562
|
+
{
|
|
33563
|
+
...request,
|
|
33564
|
+
onDone: () => {
|
|
33565
|
+
if (intent.current.generation === generation) onClose();
|
|
33566
|
+
},
|
|
33567
|
+
disabled: !live
|
|
33568
|
+
},
|
|
33569
|
+
identity
|
|
33570
|
+
)
|
|
33571
|
+
] })
|
|
33572
|
+
]
|
|
33573
|
+
}
|
|
33574
|
+
) });
|
|
33575
|
+
}
|
|
33108
33576
|
var BUILTIN_GLOBAL_DIALOGS = {
|
|
33577
|
+
share: ({ props, onClose }) => /* @__PURE__ */ jsxRuntime.jsx(ConnectedShareDialog, { request: props, onClose }),
|
|
33109
33578
|
createWorkspace: ({ props, onClose }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33110
33579
|
ConnectedWorkspaceFormModal,
|
|
33111
33580
|
{
|
|
@@ -33855,7 +34324,7 @@ function ConnectedThreadTaskBar({
|
|
|
33855
34324
|
) }),
|
|
33856
34325
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuContent, { align: "end", children: [
|
|
33857
34326
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33858
|
-
|
|
34327
|
+
chunkTPNLYQD2_cjs.ThreadFollowMenuItem,
|
|
33859
34328
|
{
|
|
33860
34329
|
following: follow.following,
|
|
33861
34330
|
onFollowingChange: (on) => (
|
|
@@ -40007,7 +40476,7 @@ function SsoResendVerificationButton({
|
|
|
40007
40476
|
onClick: async () => handleResendEmailVerification(),
|
|
40008
40477
|
disabled: loading || disabled,
|
|
40009
40478
|
"aria-label": "Resend verification email",
|
|
40010
|
-
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
40479
|
+
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.LoadingIndicator, {}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
40011
40480
|
"Didn't get a verification email? ",
|
|
40012
40481
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: "Resend" })
|
|
40013
40482
|
] })
|
|
@@ -41700,6 +42169,25 @@ function ConnectedAppShell({
|
|
|
41700
42169
|
}
|
|
41701
42170
|
) });
|
|
41702
42171
|
}
|
|
42172
|
+
function useContextualHints() {
|
|
42173
|
+
const session = react.useArbiSessionStore();
|
|
42174
|
+
const { data: userSettings } = react.useUserSettings();
|
|
42175
|
+
const updateUserSettings = react.useUpdateUserSettings();
|
|
42176
|
+
const [sessionOverride] = react.useTransientView(chunkTPNLYQD2_cjs.TIPS_VISIBILITY_OVERRIDE, null);
|
|
42177
|
+
const setShowHints = (value) => chunkTPNLYQD2_cjs.setHintsSessionOverride(session, value);
|
|
42178
|
+
const setShowHintsPersisted = (value) => {
|
|
42179
|
+
chunkTPNLYQD2_cjs.setHintsSessionOverride(session, null);
|
|
42180
|
+
updateUserSettings.mutate({ show_hints: value });
|
|
42181
|
+
};
|
|
42182
|
+
return {
|
|
42183
|
+
showHints: sessionOverride ?? userSettings?.show_hints ?? true,
|
|
42184
|
+
settingsLoaded: userSettings !== void 0,
|
|
42185
|
+
isDeveloper: userSettings?.developer === true,
|
|
42186
|
+
setShowHints,
|
|
42187
|
+
setShowHintsPersisted,
|
|
42188
|
+
dismissHints: () => setShowHints(false)
|
|
42189
|
+
};
|
|
42190
|
+
}
|
|
41703
42191
|
|
|
41704
42192
|
Object.defineProperty(exports, "CAP_REACHED_MESSAGE", {
|
|
41705
42193
|
enumerable: true,
|
|
@@ -42024,6 +42512,7 @@ exports.ConnectedOAuthConsentPage = ConnectedOAuthConsentPage;
|
|
|
42024
42512
|
exports.ConnectedPanelHost = ConnectedPanelHost;
|
|
42025
42513
|
exports.ConnectedPasswordChangeDialog = ConnectedPasswordChangeDialog;
|
|
42026
42514
|
exports.ConnectedPendingSyncDialog = ConnectedPendingSyncDialog;
|
|
42515
|
+
exports.ConnectedPeopleMultiSelect = ConnectedPeopleMultiSelect;
|
|
42027
42516
|
exports.ConnectedPremiumModels = ConnectedPremiumModels;
|
|
42028
42517
|
exports.ConnectedPrivacySettings = ConnectedPrivacySettings;
|
|
42029
42518
|
exports.ConnectedProfileCard = ConnectedProfileCard;
|
|
@@ -42043,6 +42532,7 @@ exports.ConnectedSearchPage = ConnectedSearchPage;
|
|
|
42043
42532
|
exports.ConnectedSecuritySection = ConnectedSecuritySection;
|
|
42044
42533
|
exports.ConnectedSessionsRow = ConnectedSessionsRow;
|
|
42045
42534
|
exports.ConnectedSettingsPage = ConnectedSettingsPage;
|
|
42535
|
+
exports.ConnectedShareDialog = ConnectedShareDialog;
|
|
42046
42536
|
exports.ConnectedSharePointAdminConsentPage = ConnectedSharePointAdminConsentPage;
|
|
42047
42537
|
exports.ConnectedSharedFilesPage = ConnectedSharedFilesPage;
|
|
42048
42538
|
exports.ConnectedSignatureVerifyPage = ConnectedSignatureVerifyPage;
|
|
@@ -42243,6 +42733,7 @@ exports.useConnectedShellWorkspaces = useConnectedShellWorkspaces;
|
|
|
42243
42733
|
exports.useConnectedThreadActivity = useConnectedThreadActivity;
|
|
42244
42734
|
exports.useConnectedWorkspaceList = useConnectedWorkspaceList;
|
|
42245
42735
|
exports.useConnectedWorkspaceSettings = useConnectedWorkspaceSettings;
|
|
42736
|
+
exports.useContextualHints = useContextualHints;
|
|
42246
42737
|
exports.useDocumentBulkActions = useDocumentBulkActions;
|
|
42247
42738
|
exports.useDocumentFilters = useDocumentFilters;
|
|
42248
42739
|
exports.useDocumentFolders = useDocumentFolders;
|