@arbidocs/blocks 0.4.82 → 0.4.84
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 +279 -279
- package/dist/agents/index.js +4 -4
- package/dist/agents/workflows/StepBarFrame.d.ts +12 -4
- package/dist/{chunk-FE4ULGOR.js → chunk-2YOVK524.js} +28 -5
- package/dist/chunk-2YOVK524.js.map +1 -0
- package/dist/{chunk-5XVWGJ2H.cjs → chunk-B3WCKBJ7.cjs} +3 -3
- package/dist/{chunk-5XVWGJ2H.cjs.map → chunk-B3WCKBJ7.cjs.map} +1 -1
- package/dist/{chunk-THCFZKTM.js → chunk-CONIA2ZA.js} +8 -8
- package/dist/chunk-CONIA2ZA.js.map +1 -0
- package/dist/{chunk-O35LRB3P.js → chunk-GJV2G4FC.js} +3 -3
- package/dist/{chunk-O35LRB3P.js.map → chunk-GJV2G4FC.js.map} +1 -1
- package/dist/{chunk-ZVBPRMHJ.cjs → chunk-JH6JTI76.cjs} +27 -4
- package/dist/chunk-JH6JTI76.cjs.map +1 -0
- package/dist/{chunk-COP6GVKN.js → chunk-RSKSXEPW.js} +57 -19
- package/dist/chunk-RSKSXEPW.js.map +1 -0
- package/dist/{chunk-IRG5LPDP.js → chunk-RX35SMPR.js} +6 -6
- package/dist/{chunk-IRG5LPDP.js.map → chunk-RX35SMPR.js.map} +1 -1
- package/dist/{chunk-BX7JWZWE.cjs → chunk-RYYYHPFU.cjs} +8 -8
- package/dist/chunk-RYYYHPFU.cjs.map +1 -0
- package/dist/{chunk-VWK24TEY.cjs → chunk-XA5S4776.cjs} +45 -45
- package/dist/chunk-XA5S4776.cjs.map +1 -0
- package/dist/{chunk-LRRJ2HBW.cjs → chunk-ZQYE7J3J.cjs} +54 -14
- package/dist/chunk-ZQYE7J3J.cjs.map +1 -0
- package/dist/connect/index.cjs +81 -51
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +43 -13
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedWorkflowBuilder.d.ts +9 -2
- package/dist/connection/WorkflowRunnerDialogs.d.ts +12 -1
- package/dist/document-tools/SignDocumentDialog.d.ts +9 -2
- package/dist/document-tools/index.cjs +2 -2
- 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 +22 -3
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +22 -4
- package/dist/files/index.js.map +1 -1
- package/dist/files/views/TagFormParts.d.ts +8 -0
- package/dist/files/views/index.d.ts +1 -1
- package/dist/home/index.cjs +1 -1
- package/dist/home/index.js +1 -1
- package/dist/index.cjs +891 -609
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +283 -12
- package/dist/index.js.map +1 -1
- package/dist/settings/index.cjs +35 -35
- package/dist/settings/index.js +3 -3
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/studio/index.cjs +1 -1
- package/dist/studio/index.js +1 -1
- package/dist/tags/TagDetail.d.ts +38 -0
- package/dist/tags/TagMatrix.d.ts +27 -8
- package/dist/tags/TagsNav.d.ts +44 -0
- package/dist/tags/index.d.ts +8 -3
- package/dist/tags/tagMatrixDocx.d.ts +4 -1
- package/dist/tags/tagMatrixModel.d.ts +10 -6
- package/dist/workflow-canvas/index.cjs +82 -64
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.js +40 -22
- package/dist/workflow-canvas/index.js.map +1 -1
- package/dist/workspaces/index.cjs +1 -1
- package/dist/workspaces/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-BX7JWZWE.cjs.map +0 -1
- package/dist/chunk-COP6GVKN.js.map +0 -1
- package/dist/chunk-FE4ULGOR.js.map +0 -1
- package/dist/chunk-LRRJ2HBW.cjs.map +0 -1
- package/dist/chunk-THCFZKTM.js.map +0 -1
- package/dist/chunk-VWK24TEY.cjs.map +0 -1
- package/dist/chunk-ZVBPRMHJ.cjs.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkB3WCKBJ7_cjs = require('../chunk-B3WCKBJ7.cjs');
|
|
5
5
|
var chunkXMBYDLZQ_cjs = require('../chunk-XMBYDLZQ.cjs');
|
|
6
6
|
var chunkTZR36PPP_cjs = require('../chunk-TZR36PPP.cjs');
|
|
7
7
|
var chunkMUMH3Z6K_cjs = require('../chunk-MUMH3Z6K.cjs');
|
|
8
|
-
var
|
|
8
|
+
var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
|
|
9
9
|
require('../chunk-7YUFMNFW.cjs');
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var chunkZQYE7J3J_cjs = require('../chunk-ZQYE7J3J.cjs');
|
|
11
|
+
var chunkRYYYHPFU_cjs = require('../chunk-RYYYHPFU.cjs');
|
|
12
12
|
require('../chunk-DETZZBG2.cjs');
|
|
13
13
|
require('../chunk-7D737FLE.cjs');
|
|
14
14
|
var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
|
|
15
15
|
require('../chunk-ADOKTJHV.cjs');
|
|
16
|
-
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
17
16
|
var chunkMP6FK43E_cjs = require('../chunk-MP6FK43E.cjs');
|
|
18
17
|
require('../chunk-VGOFFCMT.cjs');
|
|
19
18
|
require('../chunk-B4SRYJLM.cjs');
|
|
20
19
|
require('../chunk-7UTB4PHM.cjs');
|
|
21
20
|
require('../chunk-PPCATBOY.cjs');
|
|
22
21
|
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
22
|
+
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
23
23
|
require('../chunk-MHVNT4J3.cjs');
|
|
24
24
|
require('../chunk-DES3K4SD.cjs');
|
|
25
25
|
var react = require('react');
|
|
@@ -190,7 +190,7 @@ function StreamedArtifact({
|
|
|
190
190
|
}
|
|
191
191
|
var STARTING = /* @__PURE__ */ new Set(["pending", "running"]);
|
|
192
192
|
function formValues(step, inputs) {
|
|
193
|
-
const fields =
|
|
193
|
+
const fields = chunkRYYYHPFU_cjs.stepFields(step);
|
|
194
194
|
if (!fields.length) return void 0;
|
|
195
195
|
if (step.kind === "form")
|
|
196
196
|
return Object.fromEntries(fields.map((f) => [f.name, inputs[f.name] ?? ""]));
|
|
@@ -228,7 +228,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
228
228
|
const { wsId } = chunkXMBYDLZQ_cjs.useWorkspaceDocs();
|
|
229
229
|
const [threadId, setThreadId] = react.useState(options.conversationId);
|
|
230
230
|
const [localInputs, setLocalInputs] = react.useState(
|
|
231
|
-
() =>
|
|
231
|
+
() => chunkRYYYHPFU_cjs.initialRunInputs(workflow, options.initialInputs)
|
|
232
232
|
);
|
|
233
233
|
const [edits, setEdits] = react.useState({});
|
|
234
234
|
const [localStates, setLocalStates] = react.useState({});
|
|
@@ -248,12 +248,12 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
248
248
|
);
|
|
249
249
|
const conversation = conversations.data?.find((c) => c.external_id === threadId);
|
|
250
250
|
const steps = react.useMemo(
|
|
251
|
-
() =>
|
|
251
|
+
() => chunkRYYYHPFU_cjs.workflowSteps(workflow).length > 0 ? chunkRYYYHPFU_cjs.workflowSteps(workflow) : chunkRYYYHPFU_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
|
|
252
252
|
[workflow, conversation?.plan?.steps]
|
|
253
253
|
);
|
|
254
254
|
const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
|
|
255
255
|
const serverStates = react.useMemo(
|
|
256
|
-
() =>
|
|
256
|
+
() => chunkRYYYHPFU_cjs.stepStatesFromActivity(activity.data ?? []),
|
|
257
257
|
[activity.data]
|
|
258
258
|
);
|
|
259
259
|
const working = steps.some(
|
|
@@ -305,7 +305,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
305
305
|
if (!id) {
|
|
306
306
|
await ensureWorkspaceOpen();
|
|
307
307
|
const created = await createWork.mutateAsync({
|
|
308
|
-
title:
|
|
308
|
+
title: chunkRYYYHPFU_cjs.runThreadTitle(workflow, values).slice(0, 60),
|
|
309
309
|
description: workflow.description || null,
|
|
310
310
|
prompt: null,
|
|
311
311
|
skill_ref: null,
|
|
@@ -317,7 +317,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
317
317
|
criteria: [],
|
|
318
318
|
max_passes: 3,
|
|
319
319
|
documents: [],
|
|
320
|
-
steps:
|
|
320
|
+
steps: chunkRYYYHPFU_cjs.toPlanSteps(workflow, {
|
|
321
321
|
inputs: values,
|
|
322
322
|
resolveWorkflow: options.resolveWorkflow,
|
|
323
323
|
compose: options.compose
|
|
@@ -372,7 +372,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
372
372
|
[threadId, act]
|
|
373
373
|
);
|
|
374
374
|
const loaded = !options.conversationId || activity.isSuccess || activity.isError;
|
|
375
|
-
const view =
|
|
375
|
+
const view = chunkRYYYHPFU_cjs.useWorkflowView({
|
|
376
376
|
steps,
|
|
377
377
|
states,
|
|
378
378
|
inputs,
|
|
@@ -429,6 +429,7 @@ function WorkflowRunThread({
|
|
|
429
429
|
}
|
|
430
430
|
var DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS = {
|
|
431
431
|
loadingDocument: "Opening the document\u2026",
|
|
432
|
+
preparingDocument: "The PDF is still being prepared\u2026",
|
|
432
433
|
documentFailed: "The document could not be opened.",
|
|
433
434
|
reviewTitle: "Review",
|
|
434
435
|
reviewDescription: "Each document against each review column.",
|
|
@@ -436,6 +437,9 @@ var DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS = {
|
|
|
436
437
|
empty: "\u2014",
|
|
437
438
|
wordTitle: "Tracked changes"
|
|
438
439
|
};
|
|
440
|
+
var SIGN_PDF_RETRIES = 4;
|
|
441
|
+
var SIGN_PDF_RETRY_DELAY_MS = 1500;
|
|
442
|
+
var wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
439
443
|
function WorkflowSignDialog({
|
|
440
444
|
docRef,
|
|
441
445
|
onClose,
|
|
@@ -444,18 +448,33 @@ function WorkflowSignDialog({
|
|
|
444
448
|
const arbi = react$1.useArbi();
|
|
445
449
|
const { user, ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
|
|
446
450
|
const tools = documentTools.useOptionalDocumentTools();
|
|
447
|
-
const { id, version } =
|
|
451
|
+
const { id, version: stepVersion } = chunkRYYYHPFU_cjs.splitDocRef(docRef);
|
|
452
|
+
const [version, setVersion] = react.useState(stepVersion);
|
|
448
453
|
const [pdf, setPdf] = react.useState(null);
|
|
454
|
+
const [preparing, setPreparing] = react.useState(false);
|
|
449
455
|
const [failed, setFailed] = react.useState(false);
|
|
450
456
|
react.useEffect(() => {
|
|
451
457
|
let live = true;
|
|
458
|
+
setPdf(null);
|
|
459
|
+
setFailed(false);
|
|
460
|
+
setPreparing(false);
|
|
452
461
|
void (async () => {
|
|
453
462
|
try {
|
|
454
463
|
await ensureWorkspaceOpen();
|
|
455
|
-
const
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
464
|
+
const client = arbi.getClient().fetch;
|
|
465
|
+
const ref = version ? `${id}@v${version}` : id;
|
|
466
|
+
for (let attempt = 0; ; attempt++) {
|
|
467
|
+
try {
|
|
468
|
+
const blob = await documentTools.fetchDocumentPdf(client, ref);
|
|
469
|
+
if (live) setPdf(blob);
|
|
470
|
+
return;
|
|
471
|
+
} catch (err) {
|
|
472
|
+
if (!live || attempt >= SIGN_PDF_RETRIES) throw err;
|
|
473
|
+
setPreparing(true);
|
|
474
|
+
await wait(SIGN_PDF_RETRY_DELAY_MS);
|
|
475
|
+
if (!live) return;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
459
478
|
} catch {
|
|
460
479
|
if (live) setFailed(true);
|
|
461
480
|
}
|
|
@@ -476,11 +495,22 @@ function WorkflowSignDialog({
|
|
|
476
495
|
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: failed ? labels.documentFailed : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
477
496
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
|
|
478
497
|
" ",
|
|
479
|
-
labels.loadingDocument
|
|
498
|
+
preparing ? labels.preparingDocument : labels.loadingDocument
|
|
480
499
|
] }) }) })
|
|
481
500
|
}
|
|
482
501
|
);
|
|
483
|
-
const dialog = /* @__PURE__ */ jsxRuntime.jsx(
|
|
502
|
+
const dialog = /* @__PURE__ */ jsxRuntime.jsx(
|
|
503
|
+
chunkJH6JTI76_cjs.SignDocumentDialog,
|
|
504
|
+
{
|
|
505
|
+
open: true,
|
|
506
|
+
onOpenChange: (o) => !o && onClose(),
|
|
507
|
+
documentId: id,
|
|
508
|
+
pdfBlob: pdf,
|
|
509
|
+
version,
|
|
510
|
+
onOpenCurrent: () => setVersion(void 0)
|
|
511
|
+
},
|
|
512
|
+
version ?? "current"
|
|
513
|
+
);
|
|
484
514
|
return tools ? dialog : /* @__PURE__ */ jsxRuntime.jsx(
|
|
485
515
|
documentTools.DocumentToolsProvider,
|
|
486
516
|
{
|
|
@@ -496,7 +526,7 @@ function WorkflowWordDialog({
|
|
|
496
526
|
onClose,
|
|
497
527
|
labels
|
|
498
528
|
}) {
|
|
499
|
-
const { id } =
|
|
529
|
+
const { id } = chunkRYYYHPFU_cjs.splitDocRef(docRef);
|
|
500
530
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
501
531
|
chunkULWRNGGE_cjs.ModalScaffold,
|
|
502
532
|
{
|
|
@@ -630,7 +660,7 @@ function ConnectedWorkflowRunner({
|
|
|
630
660
|
() => ({
|
|
631
661
|
me: user?.externalId,
|
|
632
662
|
openDocument: onOpenDocument && ((ref) => {
|
|
633
|
-
const { id, version } =
|
|
663
|
+
const { id, version } = chunkRYYYHPFU_cjs.splitDocRef(ref);
|
|
634
664
|
onOpenDocument(id, version);
|
|
635
665
|
}),
|
|
636
666
|
openDraft: onOpenDraft && ((draftId) => onOpenDraft(draftId)),
|
|
@@ -640,7 +670,7 @@ function ConnectedWorkflowRunner({
|
|
|
640
670
|
const w = state.waiting;
|
|
641
671
|
if (w?.doc_ext_id) setDialog({ kind: "sign", docRef: w.doc_ext_id });
|
|
642
672
|
}),
|
|
643
|
-
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(
|
|
673
|
+
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunkRYYYHPFU_cjs.splitDocRef(ref).id) ?? "" })),
|
|
644
674
|
openReview: hostActions?.openReview ?? ((tags, documents) => setDialog({ kind: "review", tags, documents }))
|
|
645
675
|
}),
|
|
646
676
|
[user?.externalId, onOpenDocument, onOpenDraft, onOpenMessage, hostActions, nameOfDoc, inThread]
|
|
@@ -776,7 +806,7 @@ function ConnectedWorkflowRunner({
|
|
|
776
806
|
);
|
|
777
807
|
};
|
|
778
808
|
const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
779
|
-
|
|
809
|
+
chunkRYYYHPFU_cjs.WorkflowRunner,
|
|
780
810
|
{
|
|
781
811
|
people,
|
|
782
812
|
...runnerProps,
|
|
@@ -822,10 +852,10 @@ function ConnectedWorkflowRunner({
|
|
|
822
852
|
) }),
|
|
823
853
|
inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
824
854
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
825
|
-
|
|
855
|
+
chunkRYYYHPFU_cjs.WorkflowStepBar,
|
|
826
856
|
{
|
|
827
857
|
run: view,
|
|
828
|
-
levels:
|
|
858
|
+
levels: chunkRYYYHPFU_cjs.stepLevels(view.steps),
|
|
829
859
|
doneTitle: (workflow.run.kind === "steps" ? workflow.run.completion?.title : void 0) ?? runnerProps.labels?.complete ?? "Done",
|
|
830
860
|
icon: (key) => key && runnerProps.renderIcon ? runnerProps.renderIcon(key) : void 0,
|
|
831
861
|
tid: (suffix) => `${testIdPrefix}-${suffix}`
|
|
@@ -984,17 +1014,17 @@ function ConnectedTagMatrix({
|
|
|
984
1014
|
const fail = (e) => setError(e instanceof Error ? e.message : String(e));
|
|
985
1015
|
const snapshot = (data) => {
|
|
986
1016
|
const title = exportTitle ?? data.parent?.name ?? "Matrix";
|
|
987
|
-
const bytes =
|
|
1017
|
+
const bytes = chunkZQYE7J3J_cjs.tagMatrixDocx(data, {
|
|
988
1018
|
title,
|
|
989
1019
|
nameOf: (id) => people.find((p) => p.value === id)?.label
|
|
990
1020
|
});
|
|
991
1021
|
const stamp = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
992
1022
|
const name = `${title.replace(/[\\/:*?"<>|]+/g, "-")} (${stamp}).docx`;
|
|
993
|
-
return { blob: new Blob([bytes], { type:
|
|
1023
|
+
return { blob: new Blob([bytes], { type: chunkZQYE7J3J_cjs.DOCX_MIME_TYPE }), name };
|
|
994
1024
|
};
|
|
995
1025
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
996
1026
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
997
|
-
|
|
1027
|
+
chunkZQYE7J3J_cjs.TagMatrix,
|
|
998
1028
|
{
|
|
999
1029
|
...props,
|
|
1000
1030
|
matrix: matrix.data,
|
|
@@ -1124,12 +1154,12 @@ function ConnectedProfileCard({ notify: notify3, title = "Profile" }) {
|
|
|
1124
1154
|
}
|
|
1125
1155
|
});
|
|
1126
1156
|
const display = profile?.fullName || user?.name || "Unnamed";
|
|
1127
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1128
|
-
|
|
1157
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkB3WCKBJ7_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1158
|
+
chunkB3WCKBJ7_cjs.ProfileCard,
|
|
1129
1159
|
{
|
|
1130
1160
|
avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1131
1161
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1132
|
-
|
|
1162
|
+
chunkB3WCKBJ7_cjs.AvatarPicker,
|
|
1133
1163
|
{
|
|
1134
1164
|
pictureUrl: profile?.picture ?? user?.picture,
|
|
1135
1165
|
initials: chunkKDG6FER6_cjs.initials(display),
|
|
@@ -1171,9 +1201,9 @@ function ConnectedIdentityVerification({
|
|
|
1171
1201
|
onNameAccepted: () => notify3?.("Name updated to match your ID", "success")
|
|
1172
1202
|
});
|
|
1173
1203
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1174
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1204
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkB3WCKBJ7_cjs.IdentityVerificationCard, { flow, labels }),
|
|
1175
1205
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1176
|
-
|
|
1206
|
+
chunkB3WCKBJ7_cjs.IdentityVerificationDialog,
|
|
1177
1207
|
{
|
|
1178
1208
|
flow,
|
|
1179
1209
|
accountName: profile?.fullName ?? "",
|
|
@@ -1185,7 +1215,7 @@ function ConnectedIdentityVerification({
|
|
|
1185
1215
|
function ConnectedRequireVerified({ children, labels }) {
|
|
1186
1216
|
const { data: profile } = react$1.useProfile();
|
|
1187
1217
|
const flow = react$1.useIdentityVerification();
|
|
1188
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1218
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkB3WCKBJ7_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
|
|
1189
1219
|
}
|
|
1190
1220
|
function defaultUnmetPasswordRequirement(password) {
|
|
1191
1221
|
if (password.length < 8) return "Minimum 8 characters";
|
|
@@ -1214,10 +1244,10 @@ function ConnectedSecuritySection({
|
|
|
1214
1244
|
},
|
|
1215
1245
|
onClose: () => setOpen(false)
|
|
1216
1246
|
});
|
|
1217
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1218
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1247
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkB3WCKBJ7_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
|
|
1248
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkB3WCKBJ7_cjs.SettingsCard, { padding: "sm", children: [
|
|
1219
1249
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1220
|
-
|
|
1250
|
+
chunkB3WCKBJ7_cjs.SettingsActionRow,
|
|
1221
1251
|
{
|
|
1222
1252
|
title: "Change password",
|
|
1223
1253
|
description: "Used to sign in and to encrypt your data. Changing it re-encrypts everything in your account.",
|
|
@@ -1228,7 +1258,7 @@ function ConnectedSecuritySection({
|
|
|
1228
1258
|
children
|
|
1229
1259
|
] }),
|
|
1230
1260
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1231
|
-
|
|
1261
|
+
chunkB3WCKBJ7_cjs.PasswordChangeDialog,
|
|
1232
1262
|
{
|
|
1233
1263
|
open,
|
|
1234
1264
|
onClose: form.onCancel,
|
|
@@ -1252,23 +1282,23 @@ function ConnectedSecuritySection({
|
|
|
1252
1282
|
] });
|
|
1253
1283
|
}
|
|
1254
1284
|
function ConnectedNotificationPreferences({
|
|
1255
|
-
categories =
|
|
1285
|
+
categories = chunkB3WCKBJ7_cjs.EMAIL_NOTIFICATION_CATEGORIES,
|
|
1256
1286
|
title = "Notifications"
|
|
1257
1287
|
}) {
|
|
1258
1288
|
const keys = react.useMemo(
|
|
1259
|
-
() => categories ===
|
|
1289
|
+
() => categories === chunkB3WCKBJ7_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkB3WCKBJ7_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
|
|
1260
1290
|
[categories]
|
|
1261
1291
|
);
|
|
1262
1292
|
const prefs = react$1.useNotificationPreferences(keys);
|
|
1263
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1264
|
-
|
|
1293
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkB3WCKBJ7_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkB3WCKBJ7_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1294
|
+
chunkB3WCKBJ7_cjs.NotificationCategoryList,
|
|
1265
1295
|
{
|
|
1266
1296
|
masterId: "emailNotifications",
|
|
1267
1297
|
masterTitle: "Email Notifications",
|
|
1268
1298
|
masterDescription: "Email me about activity when I\u2019m away",
|
|
1269
1299
|
masterChecked: prefs.masterChecked,
|
|
1270
1300
|
onMasterChange: prefs.setAll,
|
|
1271
|
-
categories:
|
|
1301
|
+
categories: chunkB3WCKBJ7_cjs.toNotificationCategories(prefs.checked, categories),
|
|
1272
1302
|
onCategoryChange: prefs.setCategory
|
|
1273
1303
|
}
|
|
1274
1304
|
) }) });
|
|
@@ -1282,14 +1312,14 @@ function ConnectedSessionsRow({
|
|
|
1282
1312
|
const sessions = react$1.useSessions({ enabled: open });
|
|
1283
1313
|
const currentSessionId = react$1.useCurrentSessionId();
|
|
1284
1314
|
const terminate = react$1.useTerminateSession();
|
|
1285
|
-
const views =
|
|
1315
|
+
const views = chunkB3WCKBJ7_cjs.toActiveSessionViews(sessions.data ?? [], {
|
|
1286
1316
|
currentSessionId,
|
|
1287
1317
|
terminatingId: terminate.isPending ? terminate.variables : null,
|
|
1288
1318
|
renderIcon: renderSessionIcon
|
|
1289
1319
|
});
|
|
1290
1320
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1291
1321
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1292
|
-
|
|
1322
|
+
chunkB3WCKBJ7_cjs.SettingsRow,
|
|
1293
1323
|
{
|
|
1294
1324
|
label: "Active sessions",
|
|
1295
1325
|
description: "Devices and agents currently signed in to your account.",
|
|
@@ -1311,7 +1341,7 @@ function ConnectedSessionsRow({
|
|
|
1311
1341
|
}
|
|
1312
1342
|
),
|
|
1313
1343
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1314
|
-
|
|
1344
|
+
chunkB3WCKBJ7_cjs.ActiveSessionsDialog,
|
|
1315
1345
|
{
|
|
1316
1346
|
open,
|
|
1317
1347
|
onOpenChange: setOpen,
|
|
@@ -1346,7 +1376,7 @@ function ConnectedLogoutDialog({
|
|
|
1346
1376
|
const sessions = react$1.useSessions({ enabled: open });
|
|
1347
1377
|
const logoutAll = react$1.useLogoutAllSessions();
|
|
1348
1378
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1349
|
-
|
|
1379
|
+
chunkB3WCKBJ7_cjs.LogoutDialog,
|
|
1350
1380
|
{
|
|
1351
1381
|
open,
|
|
1352
1382
|
onClose,
|
|
@@ -1360,7 +1390,7 @@ function ConnectedLogoutDialog({
|
|
|
1360
1390
|
},
|
|
1361
1391
|
canLogoutAll: true,
|
|
1362
1392
|
isOnline,
|
|
1363
|
-
sessions:
|
|
1393
|
+
sessions: chunkB3WCKBJ7_cjs.toLogoutSessionViews(sessions.data ?? []),
|
|
1364
1394
|
renderSessionIcon
|
|
1365
1395
|
}
|
|
1366
1396
|
);
|
|
@@ -1379,7 +1409,7 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
|
|
|
1379
1409
|
});
|
|
1380
1410
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1381
1411
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1382
|
-
|
|
1412
|
+
chunkB3WCKBJ7_cjs.SettingsDangerZone,
|
|
1383
1413
|
{
|
|
1384
1414
|
isOpen: zoneOpen,
|
|
1385
1415
|
onToggle: () => setZoneOpen((o) => !o),
|
|
@@ -1399,12 +1429,12 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
|
|
|
1399
1429
|
}
|
|
1400
1430
|
),
|
|
1401
1431
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1402
|
-
|
|
1432
|
+
chunkB3WCKBJ7_cjs.DeleteAccountDialog,
|
|
1403
1433
|
{
|
|
1404
1434
|
open: dialogOpen,
|
|
1405
1435
|
onClose: flow.onClose,
|
|
1406
1436
|
step: flow.step,
|
|
1407
|
-
blockers:
|
|
1437
|
+
blockers: chunkB3WCKBJ7_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
|
|
1408
1438
|
onContinue: flow.onContinue,
|
|
1409
1439
|
onBack: flow.onBack,
|
|
1410
1440
|
userEmail: user?.email ?? "",
|