@arbidocs/blocks 0.4.131 → 0.4.132
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 +4 -3
- package/dist/agents/index.cjs +216 -216
- package/dist/agents/index.js +5 -5
- package/dist/calls/index.cjs +3 -3
- package/dist/calls/index.js +2 -2
- package/dist/chat/index.cjs +5 -5
- package/dist/chat/index.js +1 -1
- package/dist/chat/open-document.d.ts +5 -1
- package/dist/{chunk-DQCYCEDR.js → chunk-2Q7FDZAY.js} +3 -3
- package/dist/{chunk-DQCYCEDR.js.map → chunk-2Q7FDZAY.js.map} +1 -1
- package/dist/{chunk-P5ST47VY.js → chunk-3FFRYZKV.js} +3 -3
- package/dist/{chunk-P5ST47VY.js.map → chunk-3FFRYZKV.js.map} +1 -1
- package/dist/{chunk-S7PSMMRG.js → chunk-444XKG46.js} +3 -3
- package/dist/{chunk-S7PSMMRG.js.map → chunk-444XKG46.js.map} +1 -1
- package/dist/{chunk-ZV3BKLFY.cjs → chunk-44R3CCZT.cjs} +5 -5
- package/dist/{chunk-ZV3BKLFY.cjs.map → chunk-44R3CCZT.cjs.map} +1 -1
- package/dist/{chunk-7D4W3SAH.js → chunk-4RLCRFZS.js} +15 -12
- package/dist/chunk-4RLCRFZS.js.map +1 -0
- package/dist/{chunk-P5HOXWYL.js → chunk-4UMXQPNA.js} +20 -8
- package/dist/chunk-4UMXQPNA.js.map +1 -0
- package/dist/{chunk-OR4CO743.cjs → chunk-AAFX64WD.cjs} +3 -3
- package/dist/{chunk-OR4CO743.cjs.map → chunk-AAFX64WD.cjs.map} +1 -1
- package/dist/{chunk-LRD7BHAT.cjs → chunk-ARDHLU73.cjs} +13 -10
- package/dist/chunk-ARDHLU73.cjs.map +1 -0
- package/dist/{chunk-KLOSOT26.js → chunk-BMNNT27D.js} +6 -6
- package/dist/{chunk-KLOSOT26.js.map → chunk-BMNNT27D.js.map} +1 -1
- package/dist/chunk-C4WSHRR6.cjs +166 -0
- package/dist/chunk-C4WSHRR6.cjs.map +1 -0
- package/dist/{chunk-ZAVEMQ37.cjs → chunk-DWZXSPMB.cjs} +3 -3
- package/dist/{chunk-ZAVEMQ37.cjs.map → chunk-DWZXSPMB.cjs.map} +1 -1
- package/dist/{chunk-5HFPRI3W.js → chunk-FUTMU4FR.js} +3 -3
- package/dist/{chunk-5HFPRI3W.js.map → chunk-FUTMU4FR.js.map} +1 -1
- package/dist/{chunk-CDZVC32G.cjs → chunk-GZPTWHP5.cjs} +22 -10
- package/dist/chunk-GZPTWHP5.cjs.map +1 -0
- package/dist/{chunk-OUW6G4O2.cjs → chunk-HFGXA5CL.cjs} +4 -4
- package/dist/{chunk-OUW6G4O2.cjs.map → chunk-HFGXA5CL.cjs.map} +1 -1
- package/dist/{chunk-7KH4M3KY.cjs → chunk-HW2J4JMV.cjs} +8 -8
- package/dist/{chunk-7KH4M3KY.cjs.map → chunk-HW2J4JMV.cjs.map} +1 -1
- package/dist/{chunk-SWQX6CTT.cjs → chunk-JKB7WT7L.cjs} +2 -2
- package/dist/chunk-JKB7WT7L.cjs.map +1 -0
- package/dist/{chunk-S6BOINC4.cjs → chunk-OGBXV326.cjs} +7 -7
- package/dist/{chunk-S6BOINC4.cjs.map → chunk-OGBXV326.cjs.map} +1 -1
- package/dist/{chunk-DJM7DLCT.cjs → chunk-OPTBQSCV.cjs} +3 -3
- package/dist/{chunk-DJM7DLCT.cjs.map → chunk-OPTBQSCV.cjs.map} +1 -1
- package/dist/{chunk-GFYGYME3.js → chunk-OQ7RUNOC.js} +3 -3
- package/dist/{chunk-GFYGYME3.js.map → chunk-OQ7RUNOC.js.map} +1 -1
- package/dist/{chunk-W27VK32R.cjs → chunk-QUDCNT63.cjs} +17 -17
- package/dist/{chunk-W27VK32R.cjs.map → chunk-QUDCNT63.cjs.map} +1 -1
- package/dist/{chunk-OB5F4577.cjs → chunk-R26BK7YL.cjs} +4 -4
- package/dist/{chunk-OB5F4577.cjs.map → chunk-R26BK7YL.cjs.map} +1 -1
- package/dist/{chunk-A2YAC22G.js → chunk-RI6DZA5X.js} +3 -3
- package/dist/{chunk-A2YAC22G.js.map → chunk-RI6DZA5X.js.map} +1 -1
- package/dist/{chunk-7QDX2CO4.cjs → chunk-TP6PLDNM.cjs} +4 -4
- package/dist/{chunk-7QDX2CO4.cjs.map → chunk-TP6PLDNM.cjs.map} +1 -1
- package/dist/{chunk-ECERC6TI.js → chunk-VHJHY7TT.js} +3 -3
- package/dist/{chunk-ECERC6TI.js.map → chunk-VHJHY7TT.js.map} +1 -1
- package/dist/{chunk-D3N67Q4D.js → chunk-W3VYZXNS.js} +3 -3
- package/dist/{chunk-D3N67Q4D.js.map → chunk-W3VYZXNS.js.map} +1 -1
- package/dist/{chunk-JK45LSIH.cjs → chunk-WXYQ66KC.cjs} +5 -5
- package/dist/{chunk-JK45LSIH.cjs.map → chunk-WXYQ66KC.cjs.map} +1 -1
- package/dist/{chunk-ZCF2JJFA.js → chunk-Y3KA6X7B.js} +3 -3
- package/dist/{chunk-ZCF2JJFA.js.map → chunk-Y3KA6X7B.js.map} +1 -1
- package/dist/{chunk-GYCQ3FNL.js → chunk-YBLIKTJK.js} +2 -2
- package/dist/chunk-YBLIKTJK.js.map +1 -0
- package/dist/{chunk-DI35D756.js → chunk-YIF6SVSO.js} +4 -4
- package/dist/{chunk-DI35D756.js.map → chunk-YIF6SVSO.js.map} +1 -1
- package/dist/chunk-YNIBUKV5.js +163 -0
- package/dist/chunk-YNIBUKV5.js.map +1 -0
- package/dist/citations/index.cjs +12 -11
- package/dist/citations/index.js +3 -2
- package/dist/collaboration/index.cjs +42 -42
- package/dist/collaboration/index.js +2 -2
- package/dist/connect/docx.cjs +7 -5
- package/dist/connect/docx.cjs.map +1 -1
- package/dist/connect/docx.js +6 -4
- package/dist/connect/docx.js.map +1 -1
- package/dist/connect/index.cjs +129 -123
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +1 -1
- package/dist/connect/index.js +77 -70
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedSettings.d.ts +8 -17
- package/dist/connection/ConnectionProvider.d.ts +5 -0
- package/dist/connection/mail/ConnectedMailComposer.d.ts +2 -3
- package/dist/connection/mail/ConnectedMailbox.d.ts +2 -3
- package/dist/connection/mail/MailComposerForm.d.ts +2 -3
- package/dist/connection/mail/index.d.ts +2 -2
- package/dist/connection/mail/mailbox.d.ts +1 -4
- package/dist/connection/mail/types.d.ts +0 -8
- package/dist/facts/index.cjs +4 -3
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.js +3 -2
- package/dist/facts/index.js.map +1 -1
- package/dist/files/index.cjs +4 -4
- package/dist/files/index.js +3 -3
- package/dist/home/index.cjs +20 -19
- package/dist/home/index.cjs.map +1 -1
- package/dist/home/index.js +5 -4
- package/dist/home/index.js.map +1 -1
- package/dist/index.cjs +394 -394
- package/dist/index.d.ts +2 -1
- package/dist/index.js +11 -11
- package/dist/provider/BlocksProvider.d.ts +39 -4
- package/dist/provider/dialogs.d.ts +31 -0
- package/dist/retrieval/index.cjs +5 -4
- package/dist/retrieval/index.js +3 -2
- package/dist/settings/index.cjs +38 -38
- package/dist/settings/index.js +4 -4
- package/dist/shell/index.cjs +48 -47
- package/dist/shell/index.js +4 -3
- package/dist/studio/index.cjs +15 -14
- package/dist/studio/index.cjs.map +1 -1
- package/dist/studio/index.js +7 -6
- package/dist/studio/index.js.map +1 -1
- package/dist/workflow-canvas/index.cjs +14 -14
- package/dist/workflow-canvas/index.js +6 -6
- package/dist/workspaces/index.cjs +3 -3
- package/dist/workspaces/index.js +2 -2
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +4 -4
- package/dist/chunk-76JDDMSP.js +0 -31
- package/dist/chunk-76JDDMSP.js.map +0 -1
- package/dist/chunk-7D4W3SAH.js.map +0 -1
- package/dist/chunk-C54XEN5T.cjs +0 -34
- package/dist/chunk-C54XEN5T.cjs.map +0 -1
- package/dist/chunk-CDZVC32G.cjs.map +0 -1
- package/dist/chunk-GYCQ3FNL.js.map +0 -1
- package/dist/chunk-LRD7BHAT.cjs.map +0 -1
- package/dist/chunk-P5HOXWYL.js.map +0 -1
- package/dist/chunk-SWQX6CTT.cjs.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
4
|
+
var chunkAAFX64WD_cjs = require('../chunk-AAFX64WD.cjs');
|
|
5
|
+
var chunkHW2J4JMV_cjs = require('../chunk-HW2J4JMV.cjs');
|
|
6
|
+
var chunkGZPTWHP5_cjs = require('../chunk-GZPTWHP5.cjs');
|
|
7
|
+
var chunkARDHLU73_cjs = require('../chunk-ARDHLU73.cjs');
|
|
8
8
|
var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
|
|
9
9
|
require('../chunk-S24XEVPS.cjs');
|
|
10
10
|
require('../chunk-V5OAXIBN.cjs');
|
|
@@ -22,18 +22,19 @@ var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
|
22
22
|
require('../chunk-C2CWWEHO.cjs');
|
|
23
23
|
var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
|
|
24
24
|
require('../chunk-ADOKTJHV.cjs');
|
|
25
|
-
var
|
|
25
|
+
var chunkDWZXSPMB_cjs = require('../chunk-DWZXSPMB.cjs');
|
|
26
26
|
var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
|
|
27
|
-
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
28
27
|
var chunkWV4IDVDQ_cjs = require('../chunk-WV4IDVDQ.cjs');
|
|
29
28
|
require('../chunk-B6MVQCXW.cjs');
|
|
30
|
-
var
|
|
29
|
+
var chunkJKB7WT7L_cjs = require('../chunk-JKB7WT7L.cjs');
|
|
31
30
|
var chunkHM23LXUP_cjs = require('../chunk-HM23LXUP.cjs');
|
|
32
31
|
require('../chunk-7UTB4PHM.cjs');
|
|
33
32
|
require('../chunk-32HW2Q33.cjs');
|
|
34
33
|
require('../chunk-FX3K6LNZ.cjs');
|
|
35
34
|
require('../chunk-PPCATBOY.cjs');
|
|
36
35
|
require('../chunk-MHVNT4J3.cjs');
|
|
36
|
+
var chunkC4WSHRR6_cjs = require('../chunk-C4WSHRR6.cjs');
|
|
37
|
+
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
37
38
|
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
38
39
|
require('../chunk-DES3K4SD.cjs');
|
|
39
40
|
var react = require('react');
|
|
@@ -49,7 +50,7 @@ var client = require('@arbidocs/client');
|
|
|
49
50
|
var reactDom = require('react-dom');
|
|
50
51
|
|
|
51
52
|
function ConnectionBoundWebSocket({ children }) {
|
|
52
|
-
const { status } =
|
|
53
|
+
const { status } = chunkARDHLU73_cjs.useConnection();
|
|
53
54
|
return /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiWebSocketProvider, { enabled: status === "authenticated", children });
|
|
54
55
|
}
|
|
55
56
|
function ArbiAppProvider({
|
|
@@ -62,10 +63,10 @@ function ArbiAppProvider({
|
|
|
62
63
|
})
|
|
63
64
|
);
|
|
64
65
|
const providerUrl = config.apiUrl || config.demoApiUrl || "https://demo.arbi.local";
|
|
65
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiProvider, { url: providerUrl, deploymentDomain: config.deploymentDomain, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
66
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiProvider, { url: providerUrl, deploymentDomain: config.deploymentDomain, children: /* @__PURE__ */ jsxRuntime.jsx(chunkARDHLU73_cjs.ConnectionProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(ConnectionBoundWebSocket, { children }) }) }) });
|
|
66
67
|
}
|
|
67
68
|
function ConnectedTaskAccessRequest({ conversationId }) {
|
|
68
|
-
const { workspaceId } =
|
|
69
|
+
const { workspaceId } = chunkARDHLU73_cjs.useConnection();
|
|
69
70
|
const tasks = react$1.useConversations(workspaceId ?? void 0, { live: true });
|
|
70
71
|
const run = react$1.useRunConversation();
|
|
71
72
|
const task = tasks.data?.find((item) => item.external_id === conversationId);
|
|
@@ -97,7 +98,7 @@ function ConnectedWorkspaceActivity({
|
|
|
97
98
|
pageSize,
|
|
98
99
|
...listProps
|
|
99
100
|
}) {
|
|
100
|
-
const { workspaceId: selected, status, ensureWorkspaceOpen } =
|
|
101
|
+
const { workspaceId: selected, status, ensureWorkspaceOpen } = chunkARDHLU73_cjs.useConnection();
|
|
101
102
|
const workspaceId = workspaceProp ?? selected ?? void 0;
|
|
102
103
|
const live = status === "authenticated" && !!workspaceId;
|
|
103
104
|
const feed = react$1.useWorkspaceActivity(workspaceId, {
|
|
@@ -143,7 +144,7 @@ function ConnectedWorkspaceNotificationMenu({
|
|
|
143
144
|
workspaceId: workspaceProp,
|
|
144
145
|
...menuProps
|
|
145
146
|
}) {
|
|
146
|
-
const { workspaceId: selected, status } =
|
|
147
|
+
const { workspaceId: selected, status } = chunkARDHLU73_cjs.useConnection();
|
|
147
148
|
const workspaceId = workspaceProp ?? selected;
|
|
148
149
|
const { level, setLevel, isLoading, isSaving } = react$1.useWorkspaceNotificationLevel(workspaceId, {
|
|
149
150
|
enabled: status === "authenticated"
|
|
@@ -164,7 +165,7 @@ function ConnectedThreadFollow({
|
|
|
164
165
|
as = "button",
|
|
165
166
|
...props
|
|
166
167
|
}) {
|
|
167
|
-
const { status } =
|
|
168
|
+
const { status } = chunkARDHLU73_cjs.useConnection();
|
|
168
169
|
const { following, setFollowing, isLoading, isSaving } = react$1.useFollowThread(conversationId, {
|
|
169
170
|
enabled: status === "authenticated"
|
|
170
171
|
});
|
|
@@ -329,8 +330,8 @@ function useAnswerRetry(missing, refetch) {
|
|
|
329
330
|
}
|
|
330
331
|
function useWorkflowThread(workflow, options = {}) {
|
|
331
332
|
const arbi = react$1.useArbi();
|
|
332
|
-
const { ensureWorkspaceOpen, status } =
|
|
333
|
-
const { wsId } =
|
|
333
|
+
const { ensureWorkspaceOpen, status } = chunkARDHLU73_cjs.useConnection();
|
|
334
|
+
const { wsId } = chunkHW2J4JMV_cjs.useWorkspaceDocs();
|
|
334
335
|
const [threadId, setThreadId] = react.useState(options.conversationId);
|
|
335
336
|
const [localInputs, setLocalInputs] = react.useState(
|
|
336
337
|
() => chunkHM23LXUP_cjs.initialRunInputs(workflow, options.initialInputs)
|
|
@@ -579,7 +580,7 @@ function WorkflowSignDialog({
|
|
|
579
580
|
labels
|
|
580
581
|
}) {
|
|
581
582
|
const arbi = react$1.useArbi();
|
|
582
|
-
const { user, ensureWorkspaceOpen } =
|
|
583
|
+
const { user, ensureWorkspaceOpen } = chunkARDHLU73_cjs.useConnection();
|
|
583
584
|
const tools = documentTools.useOptionalDocumentTools();
|
|
584
585
|
const { id, version: stepVersion } = chunkHM23LXUP_cjs.splitDocRef(docRef);
|
|
585
586
|
const [version, setVersion] = react.useState(stepVersion);
|
|
@@ -668,7 +669,7 @@ function WorkflowWordDialog({
|
|
|
668
669
|
title: title ?? labels.wordTitle,
|
|
669
670
|
size: "xl",
|
|
670
671
|
testId: "workflow-word-dialog",
|
|
671
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
672
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkGZPTWHP5_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
|
|
672
673
|
}
|
|
673
674
|
);
|
|
674
675
|
}
|
|
@@ -679,7 +680,7 @@ function WorkflowReviewGridDialog({
|
|
|
679
680
|
onOpenDocument,
|
|
680
681
|
labels
|
|
681
682
|
}) {
|
|
682
|
-
const { workspaceId } =
|
|
683
|
+
const { workspaceId } = chunkARDHLU73_cjs.useConnection();
|
|
683
684
|
const allTags = react$1.useTags(workspaceId ?? void 0);
|
|
684
685
|
const all = react$1.useDocuments(workspaceId ?? void 0);
|
|
685
686
|
const isLoading = allTags.isLoading || all.isLoading || all.isFetching && !all.isFetchedAfterMount;
|
|
@@ -807,8 +808,8 @@ function ConnectedWorkflowRunner({
|
|
|
807
808
|
const l = { ...DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS, ...connectedLabels };
|
|
808
809
|
const dl = { ...DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS, ...dialogLabels };
|
|
809
810
|
const arbi = react$1.useArbi();
|
|
810
|
-
const { ensureWorkspaceOpen, user } =
|
|
811
|
-
const { wsId } =
|
|
811
|
+
const { ensureWorkspaceOpen, user } = chunkARDHLU73_cjs.useConnection();
|
|
812
|
+
const { wsId } = chunkHW2J4JMV_cjs.useWorkspaceDocs();
|
|
812
813
|
const { data: docs = [], refetch } = react$1.useDocuments(wsId);
|
|
813
814
|
const [sending, setSending] = react.useState([]);
|
|
814
815
|
const [added, setAdded] = react.useState({});
|
|
@@ -1119,7 +1120,7 @@ function ReviewNotify({
|
|
|
1119
1120
|
testId
|
|
1120
1121
|
}) {
|
|
1121
1122
|
const arbi = react$1.useArbi();
|
|
1122
|
-
const { status, user, ensureWorkspaceOpen } =
|
|
1123
|
+
const { status, user, ensureWorkspaceOpen } = chunkARDHLU73_cjs.useConnection();
|
|
1123
1124
|
const { data: members = [] } = react$1.useWorkspaceUsers(workspaceId, {
|
|
1124
1125
|
enabled: status === "authenticated" && !!workspaceId,
|
|
1125
1126
|
beforeFetch: ensureWorkspaceOpen
|
|
@@ -1196,7 +1197,7 @@ function ConnectedTagTable({
|
|
|
1196
1197
|
...props
|
|
1197
1198
|
}) {
|
|
1198
1199
|
const arbi = react$1.useArbi();
|
|
1199
|
-
const { workspaceId, status, ensureWorkspaceOpen } =
|
|
1200
|
+
const { workspaceId, status, ensureWorkspaceOpen } = chunkARDHLU73_cjs.useConnection();
|
|
1200
1201
|
const schema = react$1.useTagKindSchema(kind);
|
|
1201
1202
|
const rows = react$1.useTags(workspaceId ?? void 0, {
|
|
1202
1203
|
kind,
|
|
@@ -1300,7 +1301,7 @@ function ConnectedTagTable({
|
|
|
1300
1301
|
] });
|
|
1301
1302
|
}
|
|
1302
1303
|
function useConnectedShellWorkspaces(options = {}) {
|
|
1303
|
-
const { workspaceId, setWorkspace } =
|
|
1304
|
+
const { workspaceId, setWorkspace } = chunkARDHLU73_cjs.useConnection();
|
|
1304
1305
|
const query = react$1.useWorkspaces();
|
|
1305
1306
|
return react$1.useShellWorkspaces({
|
|
1306
1307
|
...options,
|
|
@@ -1321,11 +1322,11 @@ var AVATAR_PROBLEMS = {
|
|
|
1321
1322
|
unreadable: "Couldn't read that image \u2014 try a different file"
|
|
1322
1323
|
};
|
|
1323
1324
|
function ConnectedProfileCard({
|
|
1324
|
-
notify: notify3,
|
|
1325
1325
|
title = "Profile",
|
|
1326
1326
|
avatarClassName = "bg-primary text-primary-foreground",
|
|
1327
1327
|
children
|
|
1328
1328
|
}) {
|
|
1329
|
+
const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
|
|
1329
1330
|
const { data: profile } = react$1.useProfile();
|
|
1330
1331
|
const updateProfile = react$1.useUpdateProfile();
|
|
1331
1332
|
const requestEmailChange = react$1.useRequestEmailChange();
|
|
@@ -1336,9 +1337,9 @@ function ConnectedProfileCard({
|
|
|
1336
1337
|
save: async (next) => {
|
|
1337
1338
|
try {
|
|
1338
1339
|
await updateProfile.mutateAsync(next);
|
|
1339
|
-
|
|
1340
|
+
notify("Name updated", "success");
|
|
1340
1341
|
} catch (e) {
|
|
1341
|
-
|
|
1342
|
+
notify("Failed to update name", "error");
|
|
1342
1343
|
throw e;
|
|
1343
1344
|
}
|
|
1344
1345
|
}
|
|
@@ -1347,42 +1348,42 @@ function ConnectedProfileCard({
|
|
|
1347
1348
|
upload: async (picture) => {
|
|
1348
1349
|
try {
|
|
1349
1350
|
await updateProfile.mutateAsync({ picture });
|
|
1350
|
-
|
|
1351
|
+
notify("Profile picture updated", "success");
|
|
1351
1352
|
} catch (e) {
|
|
1352
|
-
|
|
1353
|
+
notify("Failed to update picture", "error");
|
|
1353
1354
|
throw e;
|
|
1354
1355
|
}
|
|
1355
1356
|
},
|
|
1356
|
-
onProblem: (problem) =>
|
|
1357
|
+
onProblem: (problem) => notify(AVATAR_PROBLEMS[problem], "error")
|
|
1357
1358
|
});
|
|
1358
1359
|
const email = react$1.useEmailChange({
|
|
1359
1360
|
requestCode: async (address) => {
|
|
1360
1361
|
try {
|
|
1361
1362
|
await requestEmailChange.mutateAsync(address);
|
|
1362
|
-
|
|
1363
|
+
notify("Verification code sent to your new email", "success");
|
|
1363
1364
|
} catch (e) {
|
|
1364
|
-
|
|
1365
|
+
notify(errorText(e, "Failed to send verification code"), "error");
|
|
1365
1366
|
throw e;
|
|
1366
1367
|
}
|
|
1367
1368
|
},
|
|
1368
1369
|
confirm: async (args) => {
|
|
1369
1370
|
try {
|
|
1370
1371
|
await confirmEmailChange.mutateAsync(args);
|
|
1371
|
-
|
|
1372
|
+
notify("Email address updated", "success");
|
|
1372
1373
|
} catch (e) {
|
|
1373
|
-
|
|
1374
|
+
notify(errorText(e, "Invalid or expired verification code"), "error");
|
|
1374
1375
|
throw e;
|
|
1375
1376
|
}
|
|
1376
1377
|
}
|
|
1377
1378
|
});
|
|
1378
1379
|
const display = profile?.fullName || "Unnamed";
|
|
1379
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1380
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkAAFX64WD_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: [
|
|
1380
1381
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1381
|
-
|
|
1382
|
+
chunkAAFX64WD_cjs.ProfileCard,
|
|
1382
1383
|
{
|
|
1383
1384
|
avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1384
1385
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1385
|
-
|
|
1386
|
+
chunkAAFX64WD_cjs.AvatarPicker,
|
|
1386
1387
|
{
|
|
1387
1388
|
pictureUrl: profile?.picture,
|
|
1388
1389
|
initials: chunkKDG6FER6_cjs.initials(display),
|
|
@@ -1417,21 +1418,21 @@ function ConnectedProfileCard({
|
|
|
1417
1418
|
] });
|
|
1418
1419
|
}
|
|
1419
1420
|
function ConnectedIdentityVerification({
|
|
1420
|
-
notify: notify3,
|
|
1421
1421
|
labels,
|
|
1422
1422
|
onManageBilling,
|
|
1423
1423
|
formatPrice
|
|
1424
1424
|
}) {
|
|
1425
|
+
const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
|
|
1425
1426
|
const { data: profile } = react$1.useProfile();
|
|
1426
1427
|
const flow = react$1.useIdentityVerification({
|
|
1427
1428
|
formatPrice,
|
|
1428
|
-
onVerifiedChange: (verified) =>
|
|
1429
|
-
onNameAccepted: () =>
|
|
1429
|
+
onVerifiedChange: (verified) => notify(verified ? "Identity verified" : "Verified tick removed", "success"),
|
|
1430
|
+
onNameAccepted: () => notify("Name updated to match your ID", "success")
|
|
1430
1431
|
});
|
|
1431
1432
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1432
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1433
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.IdentityVerificationCard, { flow, labels, onManageBilling }),
|
|
1433
1434
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1434
|
-
|
|
1435
|
+
chunkAAFX64WD_cjs.IdentityVerificationDialog,
|
|
1435
1436
|
{
|
|
1436
1437
|
flow,
|
|
1437
1438
|
accountName: profile?.fullName ?? "",
|
|
@@ -1444,7 +1445,7 @@ function ConnectedIdentityVerification({
|
|
|
1444
1445
|
function ConnectedRequireVerified({ children, labels }) {
|
|
1445
1446
|
const { data: profile } = react$1.useProfile();
|
|
1446
1447
|
const flow = react$1.useIdentityVerification();
|
|
1447
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1448
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
|
|
1448
1449
|
}
|
|
1449
1450
|
function defaultUnmetPasswordRequirement(password) {
|
|
1450
1451
|
if (password.length < 8) return "Minimum 8 characters";
|
|
@@ -1457,18 +1458,18 @@ function defaultUnmetPasswordRequirement(password) {
|
|
|
1457
1458
|
function ConnectedPasswordChangeDialog({
|
|
1458
1459
|
open,
|
|
1459
1460
|
onClose,
|
|
1460
|
-
notify: notify3,
|
|
1461
1461
|
getUnmetRequirement = defaultUnmetPasswordRequirement,
|
|
1462
1462
|
recoveryMode = false,
|
|
1463
1463
|
onRecoveryComplete
|
|
1464
1464
|
}) {
|
|
1465
|
+
const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
|
|
1465
1466
|
const change = react$1.usePasswordChange();
|
|
1466
1467
|
const form = react$1.usePasswordChangeForm({
|
|
1467
1468
|
recoveryMode,
|
|
1468
1469
|
getUnmetRequirement,
|
|
1469
1470
|
submit: async (vars) => {
|
|
1470
1471
|
await change.mutateAsync(vars);
|
|
1471
|
-
|
|
1472
|
+
notify(
|
|
1472
1473
|
recoveryMode ? "Account recovered and password set successfully" : "Password changed successfully",
|
|
1473
1474
|
"success"
|
|
1474
1475
|
);
|
|
@@ -1477,7 +1478,7 @@ function ConnectedPasswordChangeDialog({
|
|
|
1477
1478
|
onRecoveryComplete
|
|
1478
1479
|
});
|
|
1479
1480
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1480
|
-
|
|
1481
|
+
chunkAAFX64WD_cjs.PasswordChangeDialog,
|
|
1481
1482
|
{
|
|
1482
1483
|
open,
|
|
1483
1484
|
onClose: form.onCancel,
|
|
@@ -1499,15 +1500,14 @@ function ConnectedPasswordChangeDialog({
|
|
|
1499
1500
|
);
|
|
1500
1501
|
}
|
|
1501
1502
|
function ConnectedSecuritySection({
|
|
1502
|
-
notify: notify3,
|
|
1503
1503
|
getUnmetRequirement,
|
|
1504
1504
|
children
|
|
1505
1505
|
}) {
|
|
1506
1506
|
const [open, setOpen] = react.useState(false);
|
|
1507
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1508
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1507
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkAAFX64WD_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
|
|
1508
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkAAFX64WD_cjs.SettingsCard, { padding: "sm", children: [
|
|
1509
1509
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1510
|
-
|
|
1510
|
+
chunkAAFX64WD_cjs.SettingsActionRow,
|
|
1511
1511
|
{
|
|
1512
1512
|
title: "Change password",
|
|
1513
1513
|
description: "Used to sign in and to unlock your account key. Changing it keeps everything readable and re-encrypts nothing.",
|
|
@@ -1522,51 +1522,47 @@ function ConnectedSecuritySection({
|
|
|
1522
1522
|
{
|
|
1523
1523
|
open,
|
|
1524
1524
|
onClose: () => setOpen(false),
|
|
1525
|
-
notify: notify3,
|
|
1526
1525
|
getUnmetRequirement
|
|
1527
1526
|
}
|
|
1528
1527
|
)
|
|
1529
1528
|
] });
|
|
1530
1529
|
}
|
|
1531
1530
|
function ConnectedNotificationPreferences({
|
|
1532
|
-
categories =
|
|
1531
|
+
categories = chunkAAFX64WD_cjs.EMAIL_NOTIFICATION_CATEGORIES,
|
|
1533
1532
|
title = "Notifications"
|
|
1534
1533
|
}) {
|
|
1535
1534
|
const keys = react.useMemo(
|
|
1536
|
-
() => categories ===
|
|
1535
|
+
() => categories === chunkAAFX64WD_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkAAFX64WD_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
|
|
1537
1536
|
[categories]
|
|
1538
1537
|
);
|
|
1539
1538
|
const prefs = react$1.useNotificationPreferences(keys);
|
|
1540
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1541
|
-
|
|
1539
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkAAFX64WD_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1540
|
+
chunkAAFX64WD_cjs.NotificationCategoryList,
|
|
1542
1541
|
{
|
|
1543
1542
|
masterId: "emailNotifications",
|
|
1544
1543
|
masterTitle: "Email Notifications",
|
|
1545
1544
|
masterDescription: "Email me about activity when I\u2019m away",
|
|
1546
1545
|
masterChecked: prefs.masterChecked,
|
|
1547
1546
|
onMasterChange: prefs.setAll,
|
|
1548
|
-
categories:
|
|
1547
|
+
categories: chunkAAFX64WD_cjs.toNotificationCategories(prefs.checked, categories),
|
|
1549
1548
|
onCategoryChange: prefs.setCategory
|
|
1550
1549
|
}
|
|
1551
1550
|
) }) });
|
|
1552
1551
|
}
|
|
1553
|
-
function ConnectedSessionsRow({
|
|
1554
|
-
notify
|
|
1555
|
-
confirm,
|
|
1556
|
-
renderSessionIcon
|
|
1557
|
-
}) {
|
|
1552
|
+
function ConnectedSessionsRow({ renderSessionIcon }) {
|
|
1553
|
+
const { notify, confirm } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
|
|
1558
1554
|
const [open, setOpen] = react.useState(false);
|
|
1559
1555
|
const sessions = react$1.useSessions({ enabled: open });
|
|
1560
1556
|
const currentSessionId = react$1.useCurrentSessionId();
|
|
1561
1557
|
const terminate = react$1.useTerminateSession();
|
|
1562
|
-
const views =
|
|
1558
|
+
const views = chunkAAFX64WD_cjs.toActiveSessionViews(sessions.data ?? [], {
|
|
1563
1559
|
currentSessionId,
|
|
1564
1560
|
terminatingId: terminate.isPending ? terminate.variables : null,
|
|
1565
1561
|
renderIcon: renderSessionIcon
|
|
1566
1562
|
});
|
|
1567
1563
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1568
1564
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1569
|
-
|
|
1565
|
+
chunkAAFX64WD_cjs.SettingsRow,
|
|
1570
1566
|
{
|
|
1571
1567
|
label: "Active sessions",
|
|
1572
1568
|
description: "Devices and agents currently signed in to your account.",
|
|
@@ -1588,7 +1584,7 @@ function ConnectedSessionsRow({
|
|
|
1588
1584
|
}
|
|
1589
1585
|
),
|
|
1590
1586
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1591
|
-
|
|
1587
|
+
chunkAAFX64WD_cjs.ActiveSessionsDialog,
|
|
1592
1588
|
{
|
|
1593
1589
|
open,
|
|
1594
1590
|
onOpenChange: setOpen,
|
|
@@ -1598,14 +1594,15 @@ function ConnectedSessionsRow({
|
|
|
1598
1594
|
void (async () => {
|
|
1599
1595
|
const view = views.find((v) => v.id === id);
|
|
1600
1596
|
const label = view?.detail.split(" \xB7 ")[0];
|
|
1601
|
-
const ok = await confirm
|
|
1602
|
-
|
|
1603
|
-
|
|
1597
|
+
const ok = await confirm({
|
|
1598
|
+
title: "End session",
|
|
1599
|
+
message: `End the session on ${label}? It will be signed out immediately.`
|
|
1600
|
+
});
|
|
1604
1601
|
if (!ok) return;
|
|
1605
1602
|
try {
|
|
1606
1603
|
await terminate.mutateAsync(id);
|
|
1607
1604
|
} catch {
|
|
1608
|
-
|
|
1605
|
+
notify("Failed to end session. Please try again.", "error");
|
|
1609
1606
|
}
|
|
1610
1607
|
})();
|
|
1611
1608
|
}
|
|
@@ -1629,7 +1626,7 @@ function ConnectedLogoutDialog({
|
|
|
1629
1626
|
signOut.mutate({ everywhere, reason: "manual" });
|
|
1630
1627
|
};
|
|
1631
1628
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1632
|
-
|
|
1629
|
+
chunkAAFX64WD_cjs.LogoutDialog,
|
|
1633
1630
|
{
|
|
1634
1631
|
open,
|
|
1635
1632
|
onClose,
|
|
@@ -1637,12 +1634,13 @@ function ConnectedLogoutDialog({
|
|
|
1637
1634
|
onLogoutAll: () => void run(true),
|
|
1638
1635
|
canLogoutAll,
|
|
1639
1636
|
isOnline,
|
|
1640
|
-
sessions:
|
|
1637
|
+
sessions: chunkAAFX64WD_cjs.toLogoutSessionViews(sessions.data ?? []),
|
|
1641
1638
|
renderSessionIcon
|
|
1642
1639
|
}
|
|
1643
1640
|
);
|
|
1644
1641
|
}
|
|
1645
|
-
function ConnectedDangerZone({
|
|
1642
|
+
function ConnectedDangerZone({ renderSubscriptionLink }) {
|
|
1643
|
+
const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
|
|
1646
1644
|
const [zoneOpen, setZoneOpen] = react.useState(false);
|
|
1647
1645
|
const [dialogOpen, setDialogOpen] = react.useState(false);
|
|
1648
1646
|
const { data: profile } = react$1.useProfile();
|
|
@@ -1654,11 +1652,11 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
|
|
|
1654
1652
|
remove: () => remove.mutateAsync(),
|
|
1655
1653
|
onClose: () => setDialogOpen(false),
|
|
1656
1654
|
onDeleted: () => signOut.mutate({ reason: "account-deleted" }),
|
|
1657
|
-
onError: () =>
|
|
1655
|
+
onError: () => notify("Failed to delete account. Please try again.", "error")
|
|
1658
1656
|
});
|
|
1659
1657
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1660
1658
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1661
|
-
|
|
1659
|
+
chunkAAFX64WD_cjs.SettingsDangerZone,
|
|
1662
1660
|
{
|
|
1663
1661
|
isOpen: zoneOpen,
|
|
1664
1662
|
onToggle: () => setZoneOpen((o) => !o),
|
|
@@ -1678,12 +1676,12 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
|
|
|
1678
1676
|
}
|
|
1679
1677
|
),
|
|
1680
1678
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1681
|
-
|
|
1679
|
+
chunkAAFX64WD_cjs.DeleteAccountDialog,
|
|
1682
1680
|
{
|
|
1683
1681
|
open: dialogOpen,
|
|
1684
1682
|
onClose: flow.onClose,
|
|
1685
1683
|
step: flow.step,
|
|
1686
|
-
blockers:
|
|
1684
|
+
blockers: chunkAAFX64WD_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
|
|
1687
1685
|
onContinue: flow.onContinue,
|
|
1688
1686
|
onBack: flow.onBack,
|
|
1689
1687
|
userEmail,
|
|
@@ -1697,7 +1695,8 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
|
|
|
1697
1695
|
}
|
|
1698
1696
|
function useConnectedDocxNotifications(onOpen) {
|
|
1699
1697
|
const arbi = react$1.useArbi();
|
|
1700
|
-
const { status, user, apiUrl } =
|
|
1698
|
+
const { status, user, apiUrl } = chunkARDHLU73_cjs.useConnection();
|
|
1699
|
+
const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
|
|
1701
1700
|
const queries = reactQuery.useQueryClient();
|
|
1702
1701
|
const source = `docx-mentions:${apiUrl}:${user?.externalId || ""}`;
|
|
1703
1702
|
const queryKey = ["docx-mentions", apiUrl, user?.externalId];
|
|
@@ -1729,8 +1728,9 @@ function useConnectedDocxNotifications(onOpen) {
|
|
|
1729
1728
|
source,
|
|
1730
1729
|
onSelect: () => {
|
|
1731
1730
|
void Promise.resolve(onOpen({ documentId, commentId, workspaceId })).catch(
|
|
1732
|
-
(error) =>
|
|
1733
|
-
error instanceof Error ? error.message : "Could not open the document."
|
|
1731
|
+
(error) => notify(
|
|
1732
|
+
error instanceof Error ? error.message : "Could not open the document.",
|
|
1733
|
+
"error"
|
|
1734
1734
|
)
|
|
1735
1735
|
);
|
|
1736
1736
|
}
|
|
@@ -1740,13 +1740,13 @@ function useConnectedDocxNotifications(onOpen) {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
shell.useNotify.getState().syncSource(source, items);
|
|
1742
1742
|
return () => shell.useNotify.getState().syncSource(source, []);
|
|
1743
|
-
}, [data, status, user?.externalId, source, onOpen]);
|
|
1743
|
+
}, [data, status, user?.externalId, source, onOpen, notify]);
|
|
1744
1744
|
const markRead = async (ids) => {
|
|
1745
1745
|
try {
|
|
1746
1746
|
await arbi.notifications.markRead(ids);
|
|
1747
1747
|
await queries.invalidateQueries({ queryKey });
|
|
1748
1748
|
} catch {
|
|
1749
|
-
|
|
1749
|
+
notify("Could not mark document mentions read.", "error");
|
|
1750
1750
|
}
|
|
1751
1751
|
};
|
|
1752
1752
|
return {
|
|
@@ -1761,7 +1761,8 @@ function useConnectedDocxNotifications(onOpen) {
|
|
|
1761
1761
|
};
|
|
1762
1762
|
}
|
|
1763
1763
|
function useConnectedWorkNotifications(onOpen) {
|
|
1764
|
-
const { status, user, apiUrl } =
|
|
1764
|
+
const { status, user, apiUrl } = chunkARDHLU73_cjs.useConnection();
|
|
1765
|
+
const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
|
|
1765
1766
|
const source = `work-notifications:${apiUrl}:${user?.externalId || ""}`;
|
|
1766
1767
|
const { data = [], markRead: persistRead } = react$1.useWorkNotifications({
|
|
1767
1768
|
apiUrl,
|
|
@@ -1784,8 +1785,9 @@ function useConnectedWorkNotifications(onOpen) {
|
|
|
1784
1785
|
source,
|
|
1785
1786
|
onSelect: () => {
|
|
1786
1787
|
void Promise.resolve().then(() => onOpen(mapped.target)).catch(
|
|
1787
|
-
(error) =>
|
|
1788
|
-
error instanceof Error ? error.message : "Could not open this notification."
|
|
1788
|
+
(error) => notify(
|
|
1789
|
+
error instanceof Error ? error.message : "Could not open this notification.",
|
|
1790
|
+
"error"
|
|
1789
1791
|
)
|
|
1790
1792
|
);
|
|
1791
1793
|
}
|
|
@@ -1793,13 +1795,13 @@ function useConnectedWorkNotifications(onOpen) {
|
|
|
1793
1795
|
}
|
|
1794
1796
|
shell.useNotify.getState().syncSource(source, items);
|
|
1795
1797
|
return () => shell.useNotify.getState().syncSource(source, []);
|
|
1796
|
-
}, [data, status, user?.externalId, source, onOpen]);
|
|
1798
|
+
}, [data, status, user?.externalId, source, onOpen, notify]);
|
|
1797
1799
|
const markRead = async (ids) => {
|
|
1798
1800
|
if (!ids.length) return;
|
|
1799
1801
|
try {
|
|
1800
1802
|
await persistRead(ids);
|
|
1801
1803
|
} catch {
|
|
1802
|
-
|
|
1804
|
+
notify("Could not mark work notifications read.", "error");
|
|
1803
1805
|
}
|
|
1804
1806
|
};
|
|
1805
1807
|
return {
|
|
@@ -2172,7 +2174,7 @@ function useWordBody({
|
|
|
2172
2174
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2173
2175
|
[word.adapter, client, documentKey]
|
|
2174
2176
|
);
|
|
2175
|
-
|
|
2177
|
+
chunkJKB7WT7L_cjs.useRegisterOpenDocument({ documentId: roomId });
|
|
2176
2178
|
const editor = react$1.useMailDraftEditor();
|
|
2177
2179
|
const state = () => stateRef.current?.() ?? null;
|
|
2178
2180
|
return {
|
|
@@ -2207,16 +2209,16 @@ var NO_WORD = {
|
|
|
2207
2209
|
loadFonts: () => Promise.reject(new Error("No Word editor"))
|
|
2208
2210
|
}
|
|
2209
2211
|
};
|
|
2210
|
-
function notifySent(
|
|
2212
|
+
function notifySent(notify, result) {
|
|
2211
2213
|
const status = result && typeof result === "object" && "delivery_status" in result ? result.delivery_status : null;
|
|
2212
2214
|
if (status === "bounced")
|
|
2213
|
-
|
|
2215
|
+
notify("Email couldn't be delivered", "error", { description: "Open it in Sent to see why." });
|
|
2214
2216
|
else if (status === "partially_bounced")
|
|
2215
|
-
|
|
2217
|
+
notify("Email couldn't be delivered to every recipient", "error", {
|
|
2216
2218
|
description: "Open it in Sent to see which and why."
|
|
2217
2219
|
});
|
|
2218
|
-
else if (status === "delivered")
|
|
2219
|
-
else
|
|
2220
|
+
else if (status === "delivered") notify("Email delivered", "success");
|
|
2221
|
+
else notify("Email queued for delivery", "success");
|
|
2220
2222
|
}
|
|
2221
2223
|
function MailComposerForm({
|
|
2222
2224
|
account,
|
|
@@ -2233,13 +2235,13 @@ function MailComposerForm({
|
|
|
2233
2235
|
localDraftId: initialLocalDraftId,
|
|
2234
2236
|
offline,
|
|
2235
2237
|
documents,
|
|
2236
|
-
notify: notify3,
|
|
2237
2238
|
word,
|
|
2238
2239
|
sessionKey,
|
|
2239
2240
|
roomId,
|
|
2240
2241
|
headerSlot
|
|
2241
2242
|
}) {
|
|
2242
2243
|
const { client } = react$1.useMailClient();
|
|
2244
|
+
const { notify, confirm } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
|
|
2243
2245
|
const [to, setTo] = react.useState(initial.to.map((r) => r.email).join("; "));
|
|
2244
2246
|
const [cc, setCc] = react.useState(initial.cc.map((r) => r.email).join("; "));
|
|
2245
2247
|
const [showCc, setShowCc] = react.useState(initial.cc.length > 0);
|
|
@@ -2374,7 +2376,7 @@ function MailComposerForm({
|
|
|
2374
2376
|
setWordPending(true);
|
|
2375
2377
|
try {
|
|
2376
2378
|
if (!secure) {
|
|
2377
|
-
notifySent(
|
|
2379
|
+
notifySent(notify, await wordBody.send({ ...value, request_id: requestId.current }));
|
|
2378
2380
|
onClose();
|
|
2379
2381
|
return;
|
|
2380
2382
|
}
|
|
@@ -2408,13 +2410,13 @@ function MailComposerForm({
|
|
|
2408
2410
|
{
|
|
2409
2411
|
onSuccess: (result) => {
|
|
2410
2412
|
if (result && typeof result === "object" && "onDevice" in result) {
|
|
2411
|
-
|
|
2413
|
+
notify("Saved to your Outbox", "info", {
|
|
2412
2414
|
description: "It will be sent automatically when you're back online."
|
|
2413
2415
|
});
|
|
2414
2416
|
onClose();
|
|
2415
2417
|
return;
|
|
2416
2418
|
}
|
|
2417
|
-
notifySent(
|
|
2419
|
+
notifySent(notify, result);
|
|
2418
2420
|
if (localDraftId) void offline?.deleteDraft(localDraftId);
|
|
2419
2421
|
onClose();
|
|
2420
2422
|
},
|
|
@@ -2461,9 +2463,14 @@ function MailComposerForm({
|
|
|
2461
2463
|
};
|
|
2462
2464
|
const close = () => {
|
|
2463
2465
|
if (busy) return;
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2466
|
+
const unsaved = !saved && (dirty || !draftId) && (text || subject || to || cc || bcc || attachments.length || bodyChanged);
|
|
2467
|
+
if (!unsaved) return onClose();
|
|
2468
|
+
void confirm({
|
|
2469
|
+
title: "Discard changes",
|
|
2470
|
+
message: "Close this message without saving your latest changes?"
|
|
2471
|
+
}).then((ok) => {
|
|
2472
|
+
if (ok) onClose();
|
|
2473
|
+
});
|
|
2467
2474
|
};
|
|
2468
2475
|
react.useEffect(() => {
|
|
2469
2476
|
if (closeRequestRef) closeRequestRef.current = close;
|
|
@@ -2564,8 +2571,12 @@ function MailComposerForm({
|
|
|
2564
2571
|
className: "h-7 shrink-0 text-xs",
|
|
2565
2572
|
disabled: busy,
|
|
2566
2573
|
onClick: () => {
|
|
2567
|
-
|
|
2568
|
-
|
|
2574
|
+
void confirm({
|
|
2575
|
+
title: "Load changes",
|
|
2576
|
+
message: "Discard your unsaved changes and load the changed draft?"
|
|
2577
|
+
}).then((ok) => {
|
|
2578
|
+
if (ok) onReload(replacedBy);
|
|
2579
|
+
});
|
|
2569
2580
|
},
|
|
2570
2581
|
children: "Load changes"
|
|
2571
2582
|
}
|
|
@@ -2816,9 +2827,8 @@ function MailComposerForm({
|
|
|
2816
2827
|
}
|
|
2817
2828
|
);
|
|
2818
2829
|
}
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
};
|
|
2830
|
+
|
|
2831
|
+
// src/connection/mail/mailbox.ts
|
|
2822
2832
|
function resolveMailbox(accounts, mailbox) {
|
|
2823
2833
|
if (!accounts) return void 0;
|
|
2824
2834
|
if (mailbox === "native") return accounts.find((a) => a.provider === "native");
|
|
@@ -2833,7 +2843,6 @@ function ConnectedMailComposer({
|
|
|
2833
2843
|
maxBytes: maxBytesProp,
|
|
2834
2844
|
ready: readyProp,
|
|
2835
2845
|
drafts: draftsProp,
|
|
2836
|
-
notify: notify3 = defaultMailNotify,
|
|
2837
2846
|
offline,
|
|
2838
2847
|
replyTo,
|
|
2839
2848
|
...rest
|
|
@@ -2887,7 +2896,6 @@ function ConnectedMailComposer({
|
|
|
2887
2896
|
maxBytes: maxBytesProp ?? policy.data?.max_attachment_bytes ?? DEFAULT_MAX_BYTES,
|
|
2888
2897
|
ready,
|
|
2889
2898
|
drafts: draftsProp ?? draftsList.data?.messages ?? [],
|
|
2890
|
-
notify: notify3,
|
|
2891
2899
|
offline,
|
|
2892
2900
|
onReload: setReloaded,
|
|
2893
2901
|
...rest
|
|
@@ -3079,9 +3087,9 @@ function ConnectedMailbox({
|
|
|
3079
3087
|
onViewerOpenChange,
|
|
3080
3088
|
gridState,
|
|
3081
3089
|
onGridStateChange,
|
|
3082
|
-
initialMessageId = null
|
|
3083
|
-
notify: notify3 = defaultMailNotify
|
|
3090
|
+
initialMessageId = null
|
|
3084
3091
|
}) {
|
|
3092
|
+
const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
|
|
3085
3093
|
const cache = react$1.useMailCache();
|
|
3086
3094
|
const { client } = react$1.useMailClient();
|
|
3087
3095
|
const [savingToWorkspace, setSavingToWorkspace] = react.useState(false);
|
|
@@ -3295,7 +3303,7 @@ function ConnectedMailbox({
|
|
|
3295
3303
|
new File([await response.blob()], fileName, { type: "message/rfc822" })
|
|
3296
3304
|
);
|
|
3297
3305
|
setSavingToWorkspace(false);
|
|
3298
|
-
|
|
3306
|
+
notify(
|
|
3299
3307
|
"Email saved to workspace",
|
|
3300
3308
|
"success",
|
|
3301
3309
|
documentId && onOpenDocument ? { action: { label: "Open", onClick: () => onOpenDocument(documentId, workspaceId) } } : void 0
|
|
@@ -3564,7 +3572,6 @@ function ConnectedMailbox({
|
|
|
3564
3572
|
localDraftId: composeLocalDraftId,
|
|
3565
3573
|
offline,
|
|
3566
3574
|
documents,
|
|
3567
|
-
notify: notify3,
|
|
3568
3575
|
word,
|
|
3569
3576
|
sessionKey: `${mailboxKey}-${composeSession}`,
|
|
3570
3577
|
onChange: setCompose,
|
|
@@ -3658,7 +3665,7 @@ function ConnectedMailbox({
|
|
|
3658
3665
|
}
|
|
3659
3666
|
),
|
|
3660
3667
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3661
|
-
|
|
3668
|
+
chunkDWZXSPMB_cjs.ConfirmDialog,
|
|
3662
3669
|
{
|
|
3663
3670
|
isOpen: confirmDelete !== null,
|
|
3664
3671
|
onClose: () => setConfirmDelete(null),
|
|
@@ -3755,7 +3762,7 @@ function ActiveChat({ agentId, workspaceId }) {
|
|
|
3755
3762
|
const chat = react$1.useArbiChat({
|
|
3756
3763
|
agentId,
|
|
3757
3764
|
workspaceId,
|
|
3758
|
-
activeArtifact: () =>
|
|
3765
|
+
activeArtifact: () => chunkJKB7WT7L_cjs.takeOpenDocumentForTurn({ workspaceId })
|
|
3759
3766
|
});
|
|
3760
3767
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3761
3768
|
chunkWV4IDVDQ_cjs.ChatPage,
|
|
@@ -3820,51 +3827,51 @@ function ConnectedAgentChatPanel({
|
|
|
3820
3827
|
|
|
3821
3828
|
Object.defineProperty(exports, "ConnectedAssistantDock", {
|
|
3822
3829
|
enumerable: true,
|
|
3823
|
-
get: function () { return
|
|
3830
|
+
get: function () { return chunkHW2J4JMV_cjs.ConnectedAssistantDock; }
|
|
3824
3831
|
});
|
|
3825
3832
|
Object.defineProperty(exports, "redlineStats", {
|
|
3826
3833
|
enumerable: true,
|
|
3827
|
-
get: function () { return
|
|
3834
|
+
get: function () { return chunkHW2J4JMV_cjs.redlineStats; }
|
|
3828
3835
|
});
|
|
3829
3836
|
Object.defineProperty(exports, "textToArtifact", {
|
|
3830
3837
|
enumerable: true,
|
|
3831
|
-
get: function () { return
|
|
3838
|
+
get: function () { return chunkHW2J4JMV_cjs.textToArtifact; }
|
|
3832
3839
|
});
|
|
3833
3840
|
Object.defineProperty(exports, "toRedlineMarkdown", {
|
|
3834
3841
|
enumerable: true,
|
|
3835
|
-
get: function () { return
|
|
3842
|
+
get: function () { return chunkHW2J4JMV_cjs.toRedlineMarkdown; }
|
|
3836
3843
|
});
|
|
3837
3844
|
Object.defineProperty(exports, "useConnectedAiTask", {
|
|
3838
3845
|
enumerable: true,
|
|
3839
|
-
get: function () { return
|
|
3846
|
+
get: function () { return chunkHW2J4JMV_cjs.useConnectedAiTask; }
|
|
3840
3847
|
});
|
|
3841
3848
|
Object.defineProperty(exports, "useConnectedChat", {
|
|
3842
3849
|
enumerable: true,
|
|
3843
|
-
get: function () { return
|
|
3850
|
+
get: function () { return chunkHW2J4JMV_cjs.useConnectedChat; }
|
|
3844
3851
|
});
|
|
3845
3852
|
Object.defineProperty(exports, "useSemanticSearch", {
|
|
3846
3853
|
enumerable: true,
|
|
3847
|
-
get: function () { return
|
|
3854
|
+
get: function () { return chunkHW2J4JMV_cjs.useSemanticSearch; }
|
|
3848
3855
|
});
|
|
3849
3856
|
Object.defineProperty(exports, "useWorkspaceDocs", {
|
|
3850
3857
|
enumerable: true,
|
|
3851
|
-
get: function () { return
|
|
3858
|
+
get: function () { return chunkHW2J4JMV_cjs.useWorkspaceDocs; }
|
|
3852
3859
|
});
|
|
3853
3860
|
Object.defineProperty(exports, "ConnectionProvider", {
|
|
3854
3861
|
enumerable: true,
|
|
3855
|
-
get: function () { return
|
|
3862
|
+
get: function () { return chunkARDHLU73_cjs.ConnectionProvider; }
|
|
3856
3863
|
});
|
|
3857
3864
|
Object.defineProperty(exports, "SESSION_EXPIRED_MESSAGE", {
|
|
3858
3865
|
enumerable: true,
|
|
3859
|
-
get: function () { return
|
|
3866
|
+
get: function () { return chunkARDHLU73_cjs.SESSION_EXPIRED_MESSAGE; }
|
|
3860
3867
|
});
|
|
3861
3868
|
Object.defineProperty(exports, "isAuthenticated", {
|
|
3862
3869
|
enumerable: true,
|
|
3863
|
-
get: function () { return
|
|
3870
|
+
get: function () { return chunkARDHLU73_cjs.isAuthenticated; }
|
|
3864
3871
|
});
|
|
3865
3872
|
Object.defineProperty(exports, "useConnection", {
|
|
3866
3873
|
enumerable: true,
|
|
3867
|
-
get: function () { return
|
|
3874
|
+
get: function () { return chunkARDHLU73_cjs.useConnection; }
|
|
3868
3875
|
});
|
|
3869
3876
|
exports.ArbiAppProvider = ArbiAppProvider;
|
|
3870
3877
|
exports.ConnectedAgentChatPanel = ConnectedAgentChatPanel;
|
|
@@ -3892,7 +3899,6 @@ exports.ConnectedWorkspaceNotificationMenu = ConnectedWorkspaceNotificationMenu;
|
|
|
3892
3899
|
exports.DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS = DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS;
|
|
3893
3900
|
exports.StreamedArtifact = StreamedArtifact;
|
|
3894
3901
|
exports.WorkflowRunThread = WorkflowRunThread;
|
|
3895
|
-
exports.defaultMailNotify = defaultMailNotify;
|
|
3896
3902
|
exports.defaultUnmetPasswordRequirement = defaultUnmetPasswordRequirement;
|
|
3897
3903
|
exports.resolveMailbox = resolveMailbox;
|
|
3898
3904
|
exports.useConnectedDocxNotifications = useConnectedDocxNotifications;
|