@arbidocs/blocks 0.4.126 → 0.4.127
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/agents/index.cjs +303 -303
- package/dist/agents/index.js +11 -11
- package/dist/calls/index.cjs +3 -3
- package/dist/calls/index.js +2 -2
- package/dist/chat/index.cjs +135 -135
- package/dist/chat/index.js +4 -4
- package/dist/{chunk-7HAM7Y5U.js → chunk-2DFDFOM7.js} +3 -3
- package/dist/{chunk-7HAM7Y5U.js.map → chunk-2DFDFOM7.js.map} +1 -1
- package/dist/{chunk-54ANPPMV.js → chunk-2PNNCEPH.js} +4 -4
- package/dist/{chunk-54ANPPMV.js.map → chunk-2PNNCEPH.js.map} +1 -1
- package/dist/{chunk-P5ST47VY.js → chunk-5Y7JRY7Y.js} +3 -3
- package/dist/{chunk-P5ST47VY.js.map → chunk-5Y7JRY7Y.js.map} +1 -1
- package/dist/{chunk-HM23LXUP.cjs → chunk-6AALMYPS.cjs} +3 -3
- package/dist/{chunk-HM23LXUP.cjs.map → chunk-6AALMYPS.cjs.map} +1 -1
- package/dist/{chunk-IXTQYFIF.js → chunk-6HCJ3ZEU.js} +34 -6
- package/dist/chunk-6HCJ3ZEU.js.map +1 -0
- package/dist/{chunk-JJLMCV3T.js → chunk-ECERC6TI.js} +32 -28
- package/dist/chunk-ECERC6TI.js.map +1 -0
- package/dist/{chunk-VW2C2AZL.js → chunk-ENDP7JER.js} +3 -3
- package/dist/{chunk-VW2C2AZL.js.map → chunk-ENDP7JER.js.map} +1 -1
- package/dist/{chunk-D4YR56FV.cjs → chunk-KYDRUFWT.cjs} +5 -5
- package/dist/{chunk-D4YR56FV.cjs.map → chunk-KYDRUFWT.cjs.map} +1 -1
- package/dist/{chunk-W27VK32R.cjs → chunk-MCPRNDOJ.cjs} +79 -79
- package/dist/{chunk-W27VK32R.cjs.map → chunk-MCPRNDOJ.cjs.map} +1 -1
- package/dist/{chunk-ZV3BKLFY.cjs → chunk-NYHGG2IA.cjs} +3 -3
- package/dist/{chunk-ZV3BKLFY.cjs.map → chunk-NYHGG2IA.cjs.map} +1 -1
- package/dist/{chunk-U6MPHCEB.cjs → chunk-O6IEZDRC.cjs} +33 -5
- package/dist/chunk-O6IEZDRC.cjs.map +1 -0
- package/dist/{chunk-WV4IDVDQ.cjs → chunk-PJJY6CYL.cjs} +11 -11
- package/dist/{chunk-WV4IDVDQ.cjs.map → chunk-PJJY6CYL.cjs.map} +1 -1
- package/dist/{chunk-CXLVI3SB.js → chunk-PUCY3UXN.js} +3 -3
- package/dist/{chunk-CXLVI3SB.js.map → chunk-PUCY3UXN.js.map} +1 -1
- package/dist/{chunk-LC2KJSUS.cjs → chunk-SARREDFP.cjs} +46 -46
- package/dist/{chunk-LC2KJSUS.cjs.map → chunk-SARREDFP.cjs.map} +1 -1
- package/dist/{chunk-KLOSOT26.js → chunk-T2CVFK2I.js} +11 -11
- package/dist/{chunk-KLOSOT26.js.map → chunk-T2CVFK2I.js.map} +1 -1
- package/dist/{chunk-HQH35JWC.js → chunk-T6I6ZCBE.js} +3 -3
- package/dist/{chunk-HQH35JWC.js.map → chunk-T6I6ZCBE.js.map} +1 -1
- package/dist/{chunk-Y4X3RBFI.js → chunk-UUXKB3WQ.js} +3 -3
- package/dist/{chunk-Y4X3RBFI.js.map → chunk-UUXKB3WQ.js.map} +1 -1
- package/dist/{chunk-VMZXFYHK.cjs → chunk-XFKF3WRN.cjs} +5 -5
- package/dist/{chunk-VMZXFYHK.cjs.map → chunk-XFKF3WRN.cjs.map} +1 -1
- package/dist/{chunk-GICUGQNN.cjs → chunk-ZAVEMQ37.cjs} +31 -27
- package/dist/chunk-ZAVEMQ37.cjs.map +1 -0
- package/dist/{chunk-4VCKYR4D.cjs → chunk-ZLRQ5K77.cjs} +4 -4
- package/dist/{chunk-4VCKYR4D.cjs.map → chunk-ZLRQ5K77.cjs.map} +1 -1
- package/dist/collaboration/index.cjs +23 -23
- package/dist/collaboration/index.js +1 -1
- package/dist/collaboration/mail/MailMessageView.d.ts +5 -1
- package/dist/connect/index.cjs +117 -62
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +67 -12
- package/dist/connect/index.js.map +1 -1
- package/dist/document-tools/index.cjs +1 -1
- package/dist/document-tools/index.js +1 -1
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +1 -1
- package/dist/files/index.js +1 -1
- package/dist/home/index.cjs +17 -17
- package/dist/home/index.js +3 -3
- package/dist/index.cjs +652 -652
- package/dist/index.js +22 -22
- package/dist/settings/ConfirmDialog.d.ts +4 -1
- package/dist/settings/index.cjs +14 -14
- package/dist/settings/index.js +4 -4
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +6 -6
- package/dist/studio/index.js +5 -5
- package/dist/workflow-canvas/index.cjs +62 -62
- package/dist/workflow-canvas/index.js +11 -11
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +4 -4
- package/dist/chunk-GICUGQNN.cjs.map +0 -1
- package/dist/chunk-IXTQYFIF.js.map +0 -1
- package/dist/chunk-JJLMCV3T.js.map +0 -1
- package/dist/chunk-U6MPHCEB.cjs.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
|
|
4
5
|
var chunkOR4CO743_cjs = require('../chunk-OR4CO743.cjs');
|
|
5
|
-
var
|
|
6
|
+
var chunkZLRQ5K77_cjs = require('../chunk-ZLRQ5K77.cjs');
|
|
6
7
|
var chunkDZI7WOUD_cjs = require('../chunk-DZI7WOUD.cjs');
|
|
7
8
|
var chunkMUMH3Z6K_cjs = require('../chunk-MUMH3Z6K.cjs');
|
|
8
9
|
var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
|
|
9
10
|
require('../chunk-S24XEVPS.cjs');
|
|
10
11
|
require('../chunk-V5OAXIBN.cjs');
|
|
11
12
|
require('../chunk-5FYU7ZIU.cjs');
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var chunkU6MPHCEB_cjs = require('../chunk-U6MPHCEB.cjs');
|
|
13
|
+
var chunkKYDRUFWT_cjs = require('../chunk-KYDRUFWT.cjs');
|
|
14
|
+
var chunkO6IEZDRC_cjs = require('../chunk-O6IEZDRC.cjs');
|
|
15
15
|
var chunkI2QSDQQV_cjs = require('../chunk-I2QSDQQV.cjs');
|
|
16
16
|
require('../chunk-RC25WMVB.cjs');
|
|
17
|
-
var
|
|
18
|
-
require('../chunk-7D737FLE.cjs');
|
|
19
|
-
var chunkN26CXGXC_cjs = require('../chunk-N26CXGXC.cjs');
|
|
17
|
+
var chunkSARREDFP_cjs = require('../chunk-SARREDFP.cjs');
|
|
20
18
|
require('../chunk-DETZZBG2.cjs');
|
|
19
|
+
var chunkN26CXGXC_cjs = require('../chunk-N26CXGXC.cjs');
|
|
21
20
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
22
21
|
require('../chunk-C2CWWEHO.cjs');
|
|
22
|
+
require('../chunk-7D737FLE.cjs');
|
|
23
23
|
var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
|
|
24
24
|
require('../chunk-ADOKTJHV.cjs');
|
|
25
|
-
var
|
|
25
|
+
var chunkZAVEMQ37_cjs = require('../chunk-ZAVEMQ37.cjs');
|
|
26
26
|
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
27
|
-
var
|
|
27
|
+
var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
|
|
28
|
+
var chunkPJJY6CYL_cjs = require('../chunk-PJJY6CYL.cjs');
|
|
28
29
|
require('../chunk-B6MVQCXW.cjs');
|
|
29
|
-
var
|
|
30
|
-
require('../chunk-7UTB4PHM.cjs');
|
|
30
|
+
var chunk6AALMYPS_cjs = require('../chunk-6AALMYPS.cjs');
|
|
31
31
|
require('../chunk-32HW2Q33.cjs');
|
|
32
32
|
require('../chunk-FX3K6LNZ.cjs');
|
|
33
|
+
require('../chunk-7UTB4PHM.cjs');
|
|
33
34
|
require('../chunk-PPCATBOY.cjs');
|
|
34
35
|
require('../chunk-MHVNT4J3.cjs');
|
|
35
36
|
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
@@ -122,7 +123,7 @@ function ConnectedWorkspaceActivity({
|
|
|
122
123
|
[feed.data]
|
|
123
124
|
);
|
|
124
125
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
125
|
-
|
|
126
|
+
chunkKYDRUFWT_cjs.WorkspaceActivityList,
|
|
126
127
|
{
|
|
127
128
|
...listProps,
|
|
128
129
|
items,
|
|
@@ -148,7 +149,7 @@ function ConnectedWorkspaceNotificationMenu({
|
|
|
148
149
|
});
|
|
149
150
|
if (!workspaceId) return null;
|
|
150
151
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
151
|
-
|
|
152
|
+
chunkKYDRUFWT_cjs.WorkspaceNotificationMenu,
|
|
152
153
|
{
|
|
153
154
|
...menuProps,
|
|
154
155
|
level,
|
|
@@ -167,7 +168,7 @@ function ConnectedThreadFollow({
|
|
|
167
168
|
enabled: status === "authenticated"
|
|
168
169
|
});
|
|
169
170
|
if (!conversationId) return null;
|
|
170
|
-
const Control = as === "menu-item" ?
|
|
171
|
+
const Control = as === "menu-item" ? chunkKYDRUFWT_cjs.ThreadFollowMenuItem : chunkKYDRUFWT_cjs.ThreadFollowButton;
|
|
171
172
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
172
173
|
Control,
|
|
173
174
|
{
|
|
@@ -293,7 +294,7 @@ function StreamedArtifact({
|
|
|
293
294
|
}
|
|
294
295
|
var STARTING = /* @__PURE__ */ new Set(["pending", "running"]);
|
|
295
296
|
function formValues(step, inputs) {
|
|
296
|
-
const fields =
|
|
297
|
+
const fields = chunk6AALMYPS_cjs.stepFields(step);
|
|
297
298
|
if (!fields.length) return void 0;
|
|
298
299
|
if (step.kind === "form")
|
|
299
300
|
return Object.fromEntries(fields.map((f) => [f.name, inputs[f.name] ?? ""]));
|
|
@@ -328,10 +329,10 @@ function useAnswerRetry(missing, refetch) {
|
|
|
328
329
|
function useWorkflowThread(workflow, options = {}) {
|
|
329
330
|
const arbi = react$1.useArbi();
|
|
330
331
|
const { ensureWorkspaceOpen, status } = chunkMUMH3Z6K_cjs.useConnection();
|
|
331
|
-
const { wsId } =
|
|
332
|
+
const { wsId } = chunkZLRQ5K77_cjs.useWorkspaceDocs();
|
|
332
333
|
const [threadId, setThreadId] = react.useState(options.conversationId);
|
|
333
334
|
const [localInputs, setLocalInputs] = react.useState(
|
|
334
|
-
() =>
|
|
335
|
+
() => chunk6AALMYPS_cjs.initialRunInputs(workflow, options.initialInputs)
|
|
335
336
|
);
|
|
336
337
|
const [edits, setEdits] = react.useState({});
|
|
337
338
|
const [localStates, setLocalStates] = react.useState({});
|
|
@@ -351,12 +352,12 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
351
352
|
);
|
|
352
353
|
const conversation = conversations.data?.find((c) => c.external_id === threadId);
|
|
353
354
|
const steps = react.useMemo(
|
|
354
|
-
() =>
|
|
355
|
+
() => chunk6AALMYPS_cjs.workflowSteps(workflow).length > 0 ? chunk6AALMYPS_cjs.workflowSteps(workflow) : chunkSARREDFP_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
|
|
355
356
|
[workflow, conversation?.plan?.steps]
|
|
356
357
|
);
|
|
357
358
|
const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
|
|
358
359
|
const serverStates = react.useMemo(
|
|
359
|
-
() =>
|
|
360
|
+
() => chunk6AALMYPS_cjs.stepStatesFromActivity(activity.data ?? []),
|
|
360
361
|
[activity.data]
|
|
361
362
|
);
|
|
362
363
|
const working = steps.some(
|
|
@@ -399,7 +400,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
399
400
|
async (values, done) => {
|
|
400
401
|
await ensureWorkspaceOpen();
|
|
401
402
|
const created = await createWork.mutateAsync({
|
|
402
|
-
title:
|
|
403
|
+
title: chunk6AALMYPS_cjs.runThreadTitle(workflow, values).slice(0, 60),
|
|
403
404
|
description: workflow.description || null,
|
|
404
405
|
prompt: null,
|
|
405
406
|
skill_ref: null,
|
|
@@ -411,7 +412,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
411
412
|
criteria: [],
|
|
412
413
|
max_passes: 3,
|
|
413
414
|
documents: [],
|
|
414
|
-
steps:
|
|
415
|
+
steps: chunkSARREDFP_cjs.toPlanSteps(workflow, {
|
|
415
416
|
inputs: values,
|
|
416
417
|
resolveWorkflow: options.resolveWorkflow,
|
|
417
418
|
compose: options.compose
|
|
@@ -498,7 +499,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
498
499
|
const anyRunning = Object.values(states).some((s) => s.status === "running");
|
|
499
500
|
const needsStart = !threadId || idle && !anyRunning;
|
|
500
501
|
const runError = idle ? conversation?.last_error ?? null : null;
|
|
501
|
-
const view =
|
|
502
|
+
const view = chunkSARREDFP_cjs.useWorkflowView({
|
|
502
503
|
steps,
|
|
503
504
|
states,
|
|
504
505
|
inputs,
|
|
@@ -541,7 +542,7 @@ function WorkflowRunThread({
|
|
|
541
542
|
if (listed && activeThreadId !== conversationId) selectThread(conversationId);
|
|
542
543
|
}, [listed, activeThreadId, conversationId, selectThread]);
|
|
543
544
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
544
|
-
|
|
545
|
+
chunkPJJY6CYL_cjs.ChatPage,
|
|
545
546
|
{
|
|
546
547
|
chat: { ...chat, threads: chat.threads.filter((t) => t.id === conversationId) },
|
|
547
548
|
singleThread: true,
|
|
@@ -579,7 +580,7 @@ function WorkflowSignDialog({
|
|
|
579
580
|
const arbi = react$1.useArbi();
|
|
580
581
|
const { user, ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
|
|
581
582
|
const tools = documentTools.useOptionalDocumentTools();
|
|
582
|
-
const { id, version: stepVersion } =
|
|
583
|
+
const { id, version: stepVersion } = chunk6AALMYPS_cjs.splitDocRef(docRef);
|
|
583
584
|
const [version, setVersion] = react.useState(stepVersion);
|
|
584
585
|
const [pdf, setPdf] = react.useState(null);
|
|
585
586
|
const [preparing, setPreparing] = react.useState(false);
|
|
@@ -657,7 +658,7 @@ function WorkflowWordDialog({
|
|
|
657
658
|
onClose,
|
|
658
659
|
labels
|
|
659
660
|
}) {
|
|
660
|
-
const { id } =
|
|
661
|
+
const { id } = chunk6AALMYPS_cjs.splitDocRef(docRef);
|
|
661
662
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
662
663
|
chunkULWRNGGE_cjs.ModalScaffold,
|
|
663
664
|
{
|
|
@@ -806,7 +807,7 @@ function ConnectedWorkflowRunner({
|
|
|
806
807
|
const dl = { ...DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS, ...dialogLabels };
|
|
807
808
|
const arbi = react$1.useArbi();
|
|
808
809
|
const { ensureWorkspaceOpen, user } = chunkMUMH3Z6K_cjs.useConnection();
|
|
809
|
-
const { wsId } =
|
|
810
|
+
const { wsId } = chunkZLRQ5K77_cjs.useWorkspaceDocs();
|
|
810
811
|
const { data: docs = [], refetch } = react$1.useDocuments(wsId);
|
|
811
812
|
const [sending, setSending] = react.useState([]);
|
|
812
813
|
const [added, setAdded] = react.useState({});
|
|
@@ -829,7 +830,7 @@ function ConnectedWorkflowRunner({
|
|
|
829
830
|
() => ({
|
|
830
831
|
me: user?.externalId,
|
|
831
832
|
openDocument: onOpenDocument && ((ref) => {
|
|
832
|
-
const { id, version } =
|
|
833
|
+
const { id, version } = chunk6AALMYPS_cjs.splitDocRef(ref);
|
|
833
834
|
onOpenDocument(id, version);
|
|
834
835
|
}),
|
|
835
836
|
openDraft: onOpenDraft && ((draftId) => onOpenDraft(draftId)),
|
|
@@ -839,7 +840,7 @@ function ConnectedWorkflowRunner({
|
|
|
839
840
|
const w = state.waiting;
|
|
840
841
|
if (w?.doc_ext_id) setDialog({ kind: "sign", docRef: w.doc_ext_id });
|
|
841
842
|
}),
|
|
842
|
-
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(
|
|
843
|
+
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunk6AALMYPS_cjs.splitDocRef(ref).id) ?? "" })),
|
|
843
844
|
openReview: hostActions?.openReview ?? ((tags, documents) => setDialog({ kind: "review", tags, documents }))
|
|
844
845
|
}),
|
|
845
846
|
[user?.externalId, onOpenDocument, onOpenDraft, onOpenMessage, hostActions, nameOfDoc, inThread]
|
|
@@ -975,7 +976,7 @@ function ConnectedWorkflowRunner({
|
|
|
975
976
|
);
|
|
976
977
|
};
|
|
977
978
|
const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
978
|
-
|
|
979
|
+
chunkSARREDFP_cjs.WorkflowRunner,
|
|
979
980
|
{
|
|
980
981
|
people,
|
|
981
982
|
...runnerProps,
|
|
@@ -1021,10 +1022,10 @@ function ConnectedWorkflowRunner({
|
|
|
1021
1022
|
) }),
|
|
1022
1023
|
inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1023
1024
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1024
|
-
|
|
1025
|
+
chunkSARREDFP_cjs.WorkflowStepBar,
|
|
1025
1026
|
{
|
|
1026
1027
|
run: view,
|
|
1027
|
-
levels:
|
|
1028
|
+
levels: chunk6AALMYPS_cjs.stepLevels(view.steps),
|
|
1028
1029
|
doneTitle: (workflow.run.kind === "steps" ? workflow.run.completion?.title : void 0) ?? runnerProps.labels?.complete ?? "Done",
|
|
1029
1030
|
icon: (key) => key && runnerProps.renderIcon ? runnerProps.renderIcon(key) : void 0,
|
|
1030
1031
|
tid: (suffix) => `${testIdPrefix}-${suffix}`
|
|
@@ -1044,13 +1045,13 @@ function ConnectedWorkflowRunner({
|
|
|
1044
1045
|
return state ? [[s.id, state]] : [];
|
|
1045
1046
|
})
|
|
1046
1047
|
);
|
|
1047
|
-
const ref =
|
|
1048
|
+
const ref = chunk6AALMYPS_cjs.stepDocuments(view.steps, states, id).at(-1);
|
|
1048
1049
|
const open = actions.openDocument ?? actions.openRedline;
|
|
1049
1050
|
return {
|
|
1050
1051
|
title: step.title,
|
|
1051
|
-
kind:
|
|
1052
|
+
kind: chunk6AALMYPS_cjs.stepKindOf(step),
|
|
1052
1053
|
phase: view.phaseOf(id),
|
|
1053
|
-
document: ref && open ? { name: nameOfDoc(
|
|
1054
|
+
document: ref && open ? { name: nameOfDoc(chunk6AALMYPS_cjs.splitDocRef(ref).id) ?? ref, onOpen: () => open(ref) } : void 0
|
|
1054
1055
|
};
|
|
1055
1056
|
},
|
|
1056
1057
|
targetMessageId: target,
|
|
@@ -1222,7 +1223,7 @@ function ConnectedTagTable({
|
|
|
1222
1223
|
const fail = (e) => setError(e instanceof Error ? e.message : String(e));
|
|
1223
1224
|
const snapshot = (data) => {
|
|
1224
1225
|
const title = exportTitle ?? KIND_TITLES[kind];
|
|
1225
|
-
const bytes =
|
|
1226
|
+
const bytes = chunkKYDRUFWT_cjs.tagTableDocx(data, {
|
|
1226
1227
|
title,
|
|
1227
1228
|
nameOf: (id) => people.find((p) => p.value === id)?.label
|
|
1228
1229
|
});
|
|
@@ -1232,7 +1233,7 @@ function ConnectedTagTable({
|
|
|
1232
1233
|
};
|
|
1233
1234
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1234
1235
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1235
|
-
|
|
1236
|
+
chunkKYDRUFWT_cjs.TagTable,
|
|
1236
1237
|
{
|
|
1237
1238
|
...props,
|
|
1238
1239
|
table,
|
|
@@ -2160,7 +2161,7 @@ function useWordBody({
|
|
|
2160
2161
|
}
|
|
2161
2162
|
var MailBodyEditor = react.lazy(
|
|
2162
2163
|
() => import('../MailBodyEditor-D7MGJMLH.cjs').catch(() => ({
|
|
2163
|
-
default:
|
|
2164
|
+
default: chunkO6IEZDRC_cjs.PlainMailBodyEditor
|
|
2164
2165
|
}))
|
|
2165
2166
|
);
|
|
2166
2167
|
var NativeDocxEditor = react.lazy(
|
|
@@ -2252,9 +2253,9 @@ function MailComposerForm({
|
|
|
2252
2253
|
}, [drafts, draftId, subject]);
|
|
2253
2254
|
const body = () => ({
|
|
2254
2255
|
...initial,
|
|
2255
|
-
to:
|
|
2256
|
-
cc:
|
|
2257
|
-
bcc:
|
|
2256
|
+
to: chunkO6IEZDRC_cjs.parseMailRecipients(to),
|
|
2257
|
+
cc: chunkO6IEZDRC_cjs.parseMailRecipients(cc),
|
|
2258
|
+
bcc: chunkO6IEZDRC_cjs.parseMailRecipients(bcc),
|
|
2258
2259
|
subject,
|
|
2259
2260
|
text,
|
|
2260
2261
|
html,
|
|
@@ -2701,7 +2702,7 @@ function MailComposerForm({
|
|
|
2701
2702
|
}
|
|
2702
2703
|
),
|
|
2703
2704
|
documents && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2704
|
-
|
|
2705
|
+
chunkO6IEZDRC_cjs.MailDocumentPicker,
|
|
2705
2706
|
{
|
|
2706
2707
|
documents: documents.documents,
|
|
2707
2708
|
disabled: locked,
|
|
@@ -2822,7 +2823,7 @@ function ConnectedMailComposer({
|
|
|
2822
2823
|
openId,
|
|
2823
2824
|
async (from, id) => {
|
|
2824
2825
|
const message = await client.getMessage(from, id);
|
|
2825
|
-
return
|
|
2826
|
+
return chunkO6IEZDRC_cjs.draftMailCompose(
|
|
2826
2827
|
message,
|
|
2827
2828
|
await hydrateMailAttachments(client, from, message.id, message.attachments, {
|
|
2828
2829
|
isOnline,
|
|
@@ -2836,11 +2837,11 @@ function ConnectedMailComposer({
|
|
|
2836
2837
|
const start = react.useMemo(() => {
|
|
2837
2838
|
if (replyTo)
|
|
2838
2839
|
return original.data && account ? {
|
|
2839
|
-
...
|
|
2840
|
+
...chunkO6IEZDRC_cjs.replyMailCompose(original.data, { account, folderRole: "inbox" }),
|
|
2840
2841
|
text: "",
|
|
2841
2842
|
html: ""
|
|
2842
2843
|
} : void 0;
|
|
2843
|
-
return reloaded ? draft.data : initial ?? (openId ? draft.data :
|
|
2844
|
+
return reloaded ? draft.data : initial ?? (openId ? draft.data : chunkO6IEZDRC_cjs.emptyMailCompose());
|
|
2844
2845
|
}, [replyTo, original.data, account, reloaded, initial, openId, draft.data]);
|
|
2845
2846
|
if (!start)
|
|
2846
2847
|
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" });
|
|
@@ -3147,7 +3148,7 @@ function ConnectedMailbox({
|
|
|
3147
3148
|
const message = detail.data;
|
|
3148
3149
|
react.useEffect(() => {
|
|
3149
3150
|
if (!composeAttachments?.length) return;
|
|
3150
|
-
openCompose({ ...
|
|
3151
|
+
openCompose({ ...chunkO6IEZDRC_cjs.emptyMailCompose(), attachments: composeAttachments });
|
|
3151
3152
|
onComposeOpened?.();
|
|
3152
3153
|
}, [composeAttachments]);
|
|
3153
3154
|
react.useEffect(() => {
|
|
@@ -3187,6 +3188,34 @@ function ConnectedMailbox({
|
|
|
3187
3188
|
body: JSON.stringify(body)
|
|
3188
3189
|
}
|
|
3189
3190
|
);
|
|
3191
|
+
const nativeTrash = account?.provider === "native" && folderRole === "trash";
|
|
3192
|
+
const [confirmDelete, setConfirmDelete] = react.useState(null);
|
|
3193
|
+
const [deleting, setDeleting] = react.useState(false);
|
|
3194
|
+
const deleteForever = async () => {
|
|
3195
|
+
if (!account || !isOnline || !confirmDelete) return;
|
|
3196
|
+
setDeleting(true);
|
|
3197
|
+
try {
|
|
3198
|
+
if (confirmDelete === "message" && selected) {
|
|
3199
|
+
await react$1.mailJson(
|
|
3200
|
+
client.fetch,
|
|
3201
|
+
`${react$1.accountPath(account.id)}/messages/${encodeURIComponent(selected)}`,
|
|
3202
|
+
{ method: "DELETE" }
|
|
3203
|
+
);
|
|
3204
|
+
setSelected(null);
|
|
3205
|
+
} else if (confirmDelete === "trash") {
|
|
3206
|
+
await react$1.mailJson(client.fetch, `${react$1.accountPath(account.id)}/messages?folder=trash`, {
|
|
3207
|
+
method: "DELETE"
|
|
3208
|
+
});
|
|
3209
|
+
setSelected(null);
|
|
3210
|
+
}
|
|
3211
|
+
await cache.refreshAll();
|
|
3212
|
+
} catch (e) {
|
|
3213
|
+
setActionError(e instanceof Error ? e.message : "Could not delete");
|
|
3214
|
+
} finally {
|
|
3215
|
+
setDeleting(false);
|
|
3216
|
+
setConfirmDelete(null);
|
|
3217
|
+
}
|
|
3218
|
+
};
|
|
3190
3219
|
const update = async (body) => {
|
|
3191
3220
|
if (!selected || !account || !isOnline) return;
|
|
3192
3221
|
try {
|
|
@@ -3247,7 +3276,7 @@ function ConnectedMailbox({
|
|
|
3247
3276
|
const editDraft = async () => {
|
|
3248
3277
|
if (!message) return;
|
|
3249
3278
|
try {
|
|
3250
|
-
openCompose(
|
|
3279
|
+
openCompose(chunkO6IEZDRC_cjs.draftMailCompose(message, await hydrate(message.attachments)));
|
|
3251
3280
|
} catch (e) {
|
|
3252
3281
|
setActionError(e instanceof Error ? e.message : "Could not load draft attachments");
|
|
3253
3282
|
}
|
|
@@ -3256,7 +3285,7 @@ function ConnectedMailbox({
|
|
|
3256
3285
|
if (!message || !account) return;
|
|
3257
3286
|
try {
|
|
3258
3287
|
const attachments = forward ? await hydrate(message.attachments) : [];
|
|
3259
|
-
openCompose(
|
|
3288
|
+
openCompose(chunkO6IEZDRC_cjs.replyMailCompose(message, { account, folderRole, forward, all, attachments }));
|
|
3260
3289
|
} catch (e) {
|
|
3261
3290
|
setActionError(e instanceof Error ? e.message : "Could not prepare forwarded attachments");
|
|
3262
3291
|
}
|
|
@@ -3360,12 +3389,23 @@ function ConnectedMailbox({
|
|
|
3360
3389
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "size-4" })
|
|
3361
3390
|
}
|
|
3362
3391
|
),
|
|
3392
|
+
nativeTrash && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3393
|
+
ui.Button,
|
|
3394
|
+
{
|
|
3395
|
+
size: "sm",
|
|
3396
|
+
variant: "ghost",
|
|
3397
|
+
disabled: !isOnline,
|
|
3398
|
+
"data-testid": "mail-empty-trash-button",
|
|
3399
|
+
onClick: () => setConfirmDelete("trash"),
|
|
3400
|
+
children: "Empty Trash"
|
|
3401
|
+
}
|
|
3402
|
+
),
|
|
3363
3403
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3364
3404
|
ui.Button,
|
|
3365
3405
|
{
|
|
3366
3406
|
size: "sm",
|
|
3367
3407
|
disabled: !ready || !!compose,
|
|
3368
|
-
onClick: () => openCompose(
|
|
3408
|
+
onClick: () => openCompose(chunkO6IEZDRC_cjs.emptyMailCompose()),
|
|
3369
3409
|
children: [
|
|
3370
3410
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "mr-1.5 size-4" }),
|
|
3371
3411
|
"Email"
|
|
@@ -3444,7 +3484,7 @@ function ConnectedMailbox({
|
|
|
3444
3484
|
onEdit: (value) => openCompose({ ...value })
|
|
3445
3485
|
}),
|
|
3446
3486
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: deviceFolder ? "hidden" : "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3447
|
-
|
|
3487
|
+
chunkO6IEZDRC_cjs.MailGrid,
|
|
3448
3488
|
{
|
|
3449
3489
|
messages: filteredMessages,
|
|
3450
3490
|
loading: list.isPending && list.fetchStatus !== "idle",
|
|
@@ -3508,7 +3548,7 @@ function ConnectedMailbox({
|
|
|
3508
3548
|
},
|
|
3509
3549
|
`${account?.id}-${composeSession}`
|
|
3510
3550
|
) : message && selected ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3511
|
-
|
|
3551
|
+
chunkO6IEZDRC_cjs.MailMessageView,
|
|
3512
3552
|
{
|
|
3513
3553
|
account,
|
|
3514
3554
|
message,
|
|
@@ -3529,6 +3569,8 @@ function ConnectedMailbox({
|
|
|
3529
3569
|
onReply: (forward, all) => void reply(forward, all),
|
|
3530
3570
|
onReplyWithArbi: onReplyWithArbi && account.provider === "native" ? () => onReplyWithArbi(message, account) : void 0,
|
|
3531
3571
|
onUpdate: (body) => void update(body),
|
|
3572
|
+
onRestore: nativeTrash ? () => void update({ action: "restore" }) : void 0,
|
|
3573
|
+
onDeleteForever: nativeTrash ? () => setConfirmDelete("message") : void 0,
|
|
3532
3574
|
onDownloadAttachment: (a) => void downloadAttachment(a),
|
|
3533
3575
|
onDownloadOriginal: () => void download(
|
|
3534
3576
|
`${react$1.accountPath(account.id)}/messages/${message.id}/original`,
|
|
@@ -3580,6 +3622,19 @@ function ConnectedMailbox({
|
|
|
3580
3622
|
settings: offline?.renderSettings?.(),
|
|
3581
3623
|
onClose: () => setSettings(false)
|
|
3582
3624
|
}
|
|
3625
|
+
),
|
|
3626
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3627
|
+
chunkZAVEMQ37_cjs.ConfirmDialog,
|
|
3628
|
+
{
|
|
3629
|
+
isOpen: confirmDelete !== null,
|
|
3630
|
+
onClose: () => setConfirmDelete(null),
|
|
3631
|
+
onConfirm: () => void deleteForever(),
|
|
3632
|
+
isLoading: deleting,
|
|
3633
|
+
title: confirmDelete === "trash" ? "Empty Trash?" : "Delete forever?",
|
|
3634
|
+
description: confirmDelete === "trash" ? "Every message in the Trash is deleted permanently and stops using your storage. This cannot be undone." : "This message is deleted permanently and stops using your storage. This cannot be undone.",
|
|
3635
|
+
confirmText: confirmDelete === "trash" ? "Empty Trash" : "Delete forever",
|
|
3636
|
+
testId: "mail-delete-forever-dialog"
|
|
3637
|
+
}
|
|
3583
3638
|
)
|
|
3584
3639
|
] });
|
|
3585
3640
|
}
|
|
@@ -3630,7 +3685,7 @@ function ConnectedMailMessage({
|
|
|
3630
3685
|
const attachments = forward ? await hydrateMailAttachments(client, account, message.id, message.attachments, {
|
|
3631
3686
|
isOnline
|
|
3632
3687
|
}) : [];
|
|
3633
|
-
onCompose(
|
|
3688
|
+
onCompose(chunkO6IEZDRC_cjs.replyMailCompose(message, { account, folderRole, forward, all, attachments }));
|
|
3634
3689
|
} catch (e) {
|
|
3635
3690
|
setError(e instanceof Error ? e.message : "Could not prepare forwarded attachments");
|
|
3636
3691
|
}
|
|
@@ -3638,7 +3693,7 @@ function ConnectedMailMessage({
|
|
|
3638
3693
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
3639
3694
|
error && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "px-4 pt-3 text-sm text-destructive", children: error }),
|
|
3640
3695
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3641
|
-
|
|
3696
|
+
chunkO6IEZDRC_cjs.MailMessageView,
|
|
3642
3697
|
{
|
|
3643
3698
|
account,
|
|
3644
3699
|
message,
|
|
@@ -3649,7 +3704,7 @@ function ConnectedMailMessage({
|
|
|
3649
3704
|
onBack: onClose,
|
|
3650
3705
|
onEditDraft: () => void hydrateMailAttachments(client, account, message.id, message.attachments, {
|
|
3651
3706
|
isOnline
|
|
3652
|
-
}).then((attachments) => onCompose(
|
|
3707
|
+
}).then((attachments) => onCompose(chunkO6IEZDRC_cjs.draftMailCompose(message, attachments))).catch((e) => setError(e.message)),
|
|
3653
3708
|
onReply: (forward, all) => void reply(forward, all),
|
|
3654
3709
|
onReplyWithArbi: onReplyWithArbi && account.provider === "native" ? () => onReplyWithArbi(message, account) : void 0,
|
|
3655
3710
|
onUpdate: (body) => void update(body),
|
|
@@ -3665,7 +3720,7 @@ function ConnectedMailMessage({
|
|
|
3665
3720
|
function ActiveChat({ agentId, workspaceId }) {
|
|
3666
3721
|
const chat = react$1.useArbiChat({ agentId, workspaceId });
|
|
3667
3722
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3668
|
-
|
|
3723
|
+
chunkPJJY6CYL_cjs.ChatPage,
|
|
3669
3724
|
{
|
|
3670
3725
|
chat: { ...chat, assistantMode: void 0, setAssistantMode: void 0 },
|
|
3671
3726
|
documentsRequired: false,
|
|
@@ -3727,35 +3782,35 @@ function ConnectedAgentChatPanel({
|
|
|
3727
3782
|
|
|
3728
3783
|
Object.defineProperty(exports, "ConnectedAssistantDock", {
|
|
3729
3784
|
enumerable: true,
|
|
3730
|
-
get: function () { return
|
|
3785
|
+
get: function () { return chunkZLRQ5K77_cjs.ConnectedAssistantDock; }
|
|
3731
3786
|
});
|
|
3732
3787
|
Object.defineProperty(exports, "redlineStats", {
|
|
3733
3788
|
enumerable: true,
|
|
3734
|
-
get: function () { return
|
|
3789
|
+
get: function () { return chunkZLRQ5K77_cjs.redlineStats; }
|
|
3735
3790
|
});
|
|
3736
3791
|
Object.defineProperty(exports, "textToArtifact", {
|
|
3737
3792
|
enumerable: true,
|
|
3738
|
-
get: function () { return
|
|
3793
|
+
get: function () { return chunkZLRQ5K77_cjs.textToArtifact; }
|
|
3739
3794
|
});
|
|
3740
3795
|
Object.defineProperty(exports, "toRedlineMarkdown", {
|
|
3741
3796
|
enumerable: true,
|
|
3742
|
-
get: function () { return
|
|
3797
|
+
get: function () { return chunkZLRQ5K77_cjs.toRedlineMarkdown; }
|
|
3743
3798
|
});
|
|
3744
3799
|
Object.defineProperty(exports, "useConnectedAiTask", {
|
|
3745
3800
|
enumerable: true,
|
|
3746
|
-
get: function () { return
|
|
3801
|
+
get: function () { return chunkZLRQ5K77_cjs.useConnectedAiTask; }
|
|
3747
3802
|
});
|
|
3748
3803
|
Object.defineProperty(exports, "useConnectedChat", {
|
|
3749
3804
|
enumerable: true,
|
|
3750
|
-
get: function () { return
|
|
3805
|
+
get: function () { return chunkZLRQ5K77_cjs.useConnectedChat; }
|
|
3751
3806
|
});
|
|
3752
3807
|
Object.defineProperty(exports, "useSemanticSearch", {
|
|
3753
3808
|
enumerable: true,
|
|
3754
|
-
get: function () { return
|
|
3809
|
+
get: function () { return chunkZLRQ5K77_cjs.useSemanticSearch; }
|
|
3755
3810
|
});
|
|
3756
3811
|
Object.defineProperty(exports, "useWorkspaceDocs", {
|
|
3757
3812
|
enumerable: true,
|
|
3758
|
-
get: function () { return
|
|
3813
|
+
get: function () { return chunkZLRQ5K77_cjs.useWorkspaceDocs; }
|
|
3759
3814
|
});
|
|
3760
3815
|
Object.defineProperty(exports, "ConnectionProvider", {
|
|
3761
3816
|
enumerable: true,
|