@arbidocs/blocks 0.4.71 → 0.4.73
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 +404 -266
- package/dist/agents/index.js +10 -8
- package/dist/agents/tasks/TaskActivityTimeline.d.ts +1 -1
- package/dist/agents/tasks/WorkflowThreadStrip.d.ts +58 -0
- package/dist/agents/tasks/index.d.ts +1 -0
- package/dist/agents/workflows/WorkflowRunner.d.ts +70 -0
- package/dist/agents/workflows/index.d.ts +7 -1
- package/dist/agents/workflows/planSteps.d.ts +28 -0
- package/dist/agents/workflows/run.d.ts +97 -0
- package/dist/agents/workflows/skillMarkdown.d.ts +15 -0
- package/dist/agents/workflows/types.d.ts +109 -0
- package/dist/agents/workflows/useWorkflowPreview.d.ts +14 -0
- package/dist/agents/workflows/useWorkflowView.d.ts +54 -0
- package/dist/agents/workflows/workflow.d.ts +3 -1
- package/dist/calendar/CalendarGrid.d.ts +2 -0
- package/dist/calendar/CalendarList.d.ts +2 -0
- package/dist/calendar/CalendarSettingsForm.d.ts +2 -0
- package/dist/calendar/EventDetails.d.ts +2 -0
- package/dist/calendar/EventEditor.d.ts +2 -0
- package/dist/calendar/MiniMonth.d.ts +2 -0
- package/dist/calendar/RecurrenceEditor.d.ts +13 -0
- package/dist/calendar/RoomFinder.d.ts +2 -0
- package/dist/calendar/SchedulingAssistant.d.ts +2 -0
- package/dist/calendar/ScopeDialog.d.ts +2 -0
- package/dist/calendar/TimeZonePicker.d.ts +2 -0
- package/dist/calendar/colors.d.ts +4 -0
- package/dist/calendar/draft.d.ts +43 -0
- package/dist/calendar/format.d.ts +14 -0
- package/dist/calendar/grid-model.d.ts +24 -0
- package/dist/calendar/index.cjs +4122 -0
- package/dist/calendar/index.cjs.map +1 -0
- package/dist/calendar/index.d.ts +30 -0
- package/dist/calendar/index.js +4043 -0
- package/dist/calendar/index.js.map +1 -0
- package/dist/calendar/labels.d.ts +4 -0
- package/dist/calendar/recurrence-labels.d.ts +22 -0
- package/dist/calendar/recurrence.d.ts +66 -0
- package/dist/calendar/reminders.d.ts +26 -0
- package/dist/calendar/scheduling.d.ts +27 -0
- package/dist/calendar/types.d.ts +605 -0
- package/dist/calendar/ui.d.ts +16 -0
- package/dist/calendar/zone.d.ts +56 -0
- package/dist/chat/index.cjs +123 -123
- package/dist/chat/index.js +3 -3
- package/dist/chunk-2P3T23C7.js +1250 -0
- package/dist/chunk-2P3T23C7.js.map +1 -0
- package/dist/{chunk-XNRGCQPZ.cjs → chunk-3SFFTSOI.cjs} +5 -5
- package/dist/{chunk-XNRGCQPZ.cjs.map → chunk-3SFFTSOI.cjs.map} +1 -1
- package/dist/{chunk-7WM62NMM.cjs → chunk-6OL5S7MJ.cjs} +5 -2
- package/dist/chunk-6OL5S7MJ.cjs.map +1 -0
- package/dist/chunk-7D737FLE.cjs +43 -0
- package/dist/chunk-7D737FLE.cjs.map +1 -0
- package/dist/{chunk-VUEZARW5.cjs → chunk-B3WCKBJ7.cjs} +278 -5
- package/dist/chunk-B3WCKBJ7.cjs.map +1 -0
- package/dist/{chunk-L5UPP2HC.js → chunk-D46ZAPEE.js} +5 -2
- package/dist/chunk-D46ZAPEE.js.map +1 -0
- package/dist/{chunk-LFGJAZ5H.js → chunk-DDF5GPIJ.js} +6 -36
- package/dist/chunk-DDF5GPIJ.js.map +1 -0
- package/dist/chunk-DETZZBG2.cjs +91 -0
- package/dist/chunk-DETZZBG2.cjs.map +1 -0
- package/dist/chunk-EVUEIBNU.js +89 -0
- package/dist/chunk-EVUEIBNU.js.map +1 -0
- package/dist/{chunk-CXWESDIZ.cjs → chunk-F4RUCUXF.cjs} +6 -6
- package/dist/{chunk-CXWESDIZ.cjs.map → chunk-F4RUCUXF.cjs.map} +1 -1
- package/dist/{chunk-DABEWNL2.js → chunk-G5DP27DU.js} +3 -3
- package/dist/{chunk-DABEWNL2.js.map → chunk-G5DP27DU.js.map} +1 -1
- package/dist/{chunk-VZGBCBYB.js → chunk-GJV2G4FC.js} +276 -7
- package/dist/chunk-GJV2G4FC.js.map +1 -0
- package/dist/chunk-GTNUQBXI.cjs +1296 -0
- package/dist/chunk-GTNUQBXI.cjs.map +1 -0
- package/dist/{chunk-7M22KND4.cjs → chunk-IUR565UW.cjs} +303 -530
- package/dist/chunk-IUR565UW.cjs.map +1 -0
- package/dist/{chunk-5DM6VU4L.cjs → chunk-KJ3QEKOJ.cjs} +3 -3
- package/dist/{chunk-5DM6VU4L.cjs.map → chunk-KJ3QEKOJ.cjs.map} +1 -1
- package/dist/{chunk-THO7DZNN.cjs → chunk-MUMH3Z6K.cjs} +20 -15
- package/dist/chunk-MUMH3Z6K.cjs.map +1 -0
- package/dist/{chunk-3TVTG7FK.js → chunk-ORA2XE7U.js} +4 -4
- package/dist/{chunk-3TVTG7FK.js.map → chunk-ORA2XE7U.js.map} +1 -1
- package/dist/{chunk-5HOAOKZL.js → chunk-OYMWV45N.js} +21 -16
- package/dist/chunk-OYMWV45N.js.map +1 -0
- package/dist/{chunk-HLMFU7L2.js → chunk-QDNXEB3T.js} +272 -488
- package/dist/chunk-QDNXEB3T.js.map +1 -0
- package/dist/{chunk-ILGHS6ZV.js → chunk-SB5ZKOYN.js} +3 -3
- package/dist/{chunk-ILGHS6ZV.js.map → chunk-SB5ZKOYN.js.map} +1 -1
- package/dist/{chunk-CPMNAJLF.js → chunk-TX2ZICS7.js} +24 -4
- package/dist/chunk-TX2ZICS7.js.map +1 -0
- package/dist/{chunk-2ZTONLT5.cjs → chunk-ULWRNGGE.cjs} +25 -4
- package/dist/chunk-ULWRNGGE.cjs.map +1 -0
- package/dist/{chunk-BMWZTNZB.js → chunk-VRPRAU3J.js} +3 -3
- package/dist/{chunk-BMWZTNZB.js.map → chunk-VRPRAU3J.js.map} +1 -1
- package/dist/{chunk-LTA2IAQB.cjs → chunk-WOYUXVVQ.cjs} +8 -8
- package/dist/{chunk-LTA2IAQB.cjs.map → chunk-WOYUXVVQ.cjs.map} +1 -1
- package/dist/chunk-XD2M6LIG.js +41 -0
- package/dist/chunk-XD2M6LIG.js.map +1 -0
- package/dist/{chunk-WBDK4PIA.cjs → chunk-Z5VUZ6YD.cjs} +6 -37
- package/dist/chunk-Z5VUZ6YD.cjs.map +1 -0
- package/dist/collaboration/index.cjs +44 -45
- package/dist/collaboration/index.js +2 -3
- package/dist/connect/docx.cjs +2 -2
- package/dist/connect/docx.js +1 -1
- package/dist/connect/index.cjs +370 -48
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +2 -1
- package/dist/connect/index.js +331 -12
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedSettings.d.ts +13 -0
- package/dist/connection/ConnectedWorkflowBuilder.d.ts +44 -0
- package/dist/connection/ConnectedWorkflowRunner.d.ts +27 -0
- package/dist/connection/useWorkflowThread.d.ts +34 -0
- package/dist/document-tools/index.cjs +4 -5
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.js +1 -2
- package/dist/document-tools/index.js.map +1 -1
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/import/index.d.ts +0 -1
- package/dist/files/index.cjs +31 -169
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +8 -147
- package/dist/files/index.js.map +1 -1
- package/dist/home/index.cjs +21 -20
- package/dist/home/index.cjs.map +1 -1
- package/dist/home/index.js +3 -2
- package/dist/home/index.js.map +1 -1
- package/dist/index.cjs +680 -542
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -13
- package/dist/index.js.map +1 -1
- package/dist/settings/Billing.d.ts +4 -0
- package/dist/settings/IdentityVerification.d.ts +83 -0
- package/dist/settings/PlanBadge.d.ts +2 -2
- package/dist/settings/PlanCard.d.ts +6 -1
- package/dist/settings/ProfileCard.d.ts +5 -1
- package/dist/settings/SubscriptionParts.d.ts +6 -2
- package/dist/settings/index.cjs +128 -95
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.d.ts +1 -0
- package/dist/settings/index.js +64 -47
- package/dist/settings/index.js.map +1 -1
- package/dist/shell/ActionCluster.d.ts +3 -1
- package/dist/shell/index.cjs +54 -54
- package/dist/shell/index.js +2 -2
- package/dist/studio/index.cjs +6 -6
- package/dist/studio/index.js +4 -4
- package/dist/workflow-canvas/StepInspector.d.ts +46 -0
- package/dist/workflow-canvas/TriggerInspector.d.ts +46 -0
- package/dist/workflow-canvas/WorkflowBuilder.d.ts +55 -0
- package/dist/workflow-canvas/WorkflowCanvas.d.ts +65 -0
- package/dist/workflow-canvas/edit.d.ts +54 -0
- package/dist/workflow-canvas/index.cjs +1609 -0
- package/dist/workflow-canvas/index.cjs.map +1 -0
- package/dist/workflow-canvas/index.d.ts +13 -0
- package/dist/workflow-canvas/index.js +1579 -0
- package/dist/workflow-canvas/index.js.map +1 -0
- package/dist/workflow-canvas/trigger.d.ts +51 -0
- package/dist/workspaces/index.cjs +2 -3
- package/dist/workspaces/index.cjs.map +1 -1
- package/dist/workspaces/index.js +1 -2
- package/dist/workspaces/index.js.map +1 -1
- package/package.json +41 -12
- package/src/calendar/calendar.css +316 -0
- package/src/workflow-canvas/canvas.css +113 -0
- package/dist/chunk-2ZTONLT5.cjs.map +0 -1
- package/dist/chunk-5HOAOKZL.js.map +0 -1
- package/dist/chunk-7M22KND4.cjs.map +0 -1
- package/dist/chunk-7WM62NMM.cjs.map +0 -1
- package/dist/chunk-CPMNAJLF.js.map +0 -1
- package/dist/chunk-DCDVWPMB.cjs +0 -29
- package/dist/chunk-DCDVWPMB.cjs.map +0 -1
- package/dist/chunk-HLMFU7L2.js.map +0 -1
- package/dist/chunk-L5UPP2HC.js.map +0 -1
- package/dist/chunk-LFGJAZ5H.js.map +0 -1
- package/dist/chunk-THO7DZNN.cjs.map +0 -1
- package/dist/chunk-TJMKFY5P.js +0 -27
- package/dist/chunk-TJMKFY5P.js.map +0 -1
- package/dist/chunk-VUEZARW5.cjs.map +0 -1
- package/dist/chunk-VZGBCBYB.js.map +0 -1
- package/dist/chunk-WBDK4PIA.cjs.map +0 -1
- package/dist/files/import/CalendarImportRow.d.ts +0 -26
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkADOKTJHV_cjs = require('./chunk-ADOKTJHV.cjs');
|
|
5
5
|
var chunkKDG6FER6_cjs = require('./chunk-KDG6FER6.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkULWRNGGE_cjs = require('./chunk-ULWRNGGE.cjs');
|
|
7
7
|
var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var lucideReact = require('lucide-react');
|
|
@@ -244,13 +244,15 @@ var DEFAULT_PROFILE_CARD_LABELS = {
|
|
|
244
244
|
enterCodeHint: "Enter the 3-word code from the email we just sent.",
|
|
245
245
|
confirm: "Confirm",
|
|
246
246
|
resendIn: (seconds) => `Resend in ${seconds}s`,
|
|
247
|
-
resendCode: "Resend code"
|
|
247
|
+
resendCode: "Resend code",
|
|
248
|
+
verifiedNameLocked: "Verified name. Remove your identity verification to change it."
|
|
248
249
|
};
|
|
249
250
|
function ProfileCard({
|
|
250
251
|
avatar,
|
|
251
252
|
name,
|
|
252
253
|
email,
|
|
253
254
|
isSso,
|
|
255
|
+
isVerified = false,
|
|
254
256
|
onStartEmailChange,
|
|
255
257
|
emailChange,
|
|
256
258
|
ssoTooltip,
|
|
@@ -298,6 +300,12 @@ function ProfileCard({
|
|
|
298
300
|
),
|
|
299
301
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: name.onCancel, size: "sm", variant: "ghost", disabled: name.isSaving, children: l.cancel })
|
|
300
302
|
] })
|
|
303
|
+
] }) : isVerified ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "-mx-2 w-full px-2 py-1", "data-testid": "verified-name", children: [
|
|
304
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
305
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate font-heading text-xl font-semibold text-foreground", children: name.display }),
|
|
306
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.VerifiedBadge, { className: "h-4 w-4" })
|
|
307
|
+
] }),
|
|
308
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: l.verifiedNameLocked })
|
|
301
309
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
302
310
|
"button",
|
|
303
311
|
{
|
|
@@ -431,6 +439,267 @@ function ProfileCard({
|
|
|
431
439
|
] }) }) })
|
|
432
440
|
] });
|
|
433
441
|
}
|
|
442
|
+
var DEFAULT_IDENTITY_VERIFICATION_LABELS = {
|
|
443
|
+
title: "Identity verification",
|
|
444
|
+
intro: "Check your ID once to get a verified tick next to your name.",
|
|
445
|
+
priceLine: (price, attempts) => `${price} \xB7 ${attempts} attempts`,
|
|
446
|
+
proOnly: "Available on Pro plans.",
|
|
447
|
+
seePlans: "See plans",
|
|
448
|
+
manageBilling: "Manage billing",
|
|
449
|
+
verify: "Verify identity",
|
|
450
|
+
continue: "Continue",
|
|
451
|
+
attemptsLeft: (n) => `${n} attempt${n === 1 ? "" : "s"} left`,
|
|
452
|
+
verified: "Verified",
|
|
453
|
+
verifiedDetail: (country) => `ID issued in ${country}`,
|
|
454
|
+
inReview: "Your check is being reviewed. We\u2019ll update this when it\u2019s done.",
|
|
455
|
+
finishName: "Your ID was verified. Confirm your name to get the tick.",
|
|
456
|
+
finish: "Finish",
|
|
457
|
+
remove: "Remove",
|
|
458
|
+
payTitle: "Verify your identity",
|
|
459
|
+
payBody: (price, attempts) => `A one-time fee of ${price} is charged to the card on your Pro plan. It covers up to ${attempts} attempts. Your ID is checked by our provider, Didit; ARBI does not keep your document.`,
|
|
460
|
+
pay: "Pay and continue",
|
|
461
|
+
confirmPayment: "Confirm payment with your bank",
|
|
462
|
+
paymentConfirmed: "I\u2019ve confirmed it",
|
|
463
|
+
verifyTitle: "Scan your ID",
|
|
464
|
+
embedFailed: "Your camera isn\u2019t available here. Continue in a new tab, then come back.",
|
|
465
|
+
openInNewTab: "Open in a new tab",
|
|
466
|
+
checkResult: "I\u2019ve finished",
|
|
467
|
+
resultVerified: "You\u2019re verified. The tick now shows next to your name.",
|
|
468
|
+
resultDeclined: (n) => n > 0 ? `We couldn\u2019t verify your ID. You have ${n} attempt${n === 1 ? "" : "s"} left.` : "We couldn\u2019t verify your ID and no attempts are left.",
|
|
469
|
+
tryAgain: "Try again",
|
|
470
|
+
resultInReview: "Your check needs a manual review. We\u2019ll show the result here when it\u2019s done.",
|
|
471
|
+
nameMismatchTitle: "Your ID was verified",
|
|
472
|
+
nameMismatchBody: "The name on your ID differs from your account name. The tick shows only with the name on your ID.",
|
|
473
|
+
documentName: "Name on your ID",
|
|
474
|
+
accountName: "Account name",
|
|
475
|
+
useDocumentName: (name) => `Change my name to ${name}`,
|
|
476
|
+
keepName: "Keep my name",
|
|
477
|
+
close: "Close",
|
|
478
|
+
requiredTitle: "Identity verification required",
|
|
479
|
+
requiredBody: "This workspace requires a verified identity before you continue.",
|
|
480
|
+
requiredProOnly: "Identity verification is available on Pro plans. Ask your administrator."
|
|
481
|
+
};
|
|
482
|
+
function useLabels(labels) {
|
|
483
|
+
return react.useMemo(() => ({ ...DEFAULT_IDENTITY_VERIFICATION_LABELS, ...labels }), [labels]);
|
|
484
|
+
}
|
|
485
|
+
var BILLING_CODES = [
|
|
486
|
+
"PRO_REQUIRED",
|
|
487
|
+
"PAYMENT_METHOD_REQUIRED",
|
|
488
|
+
"BILLING_ADDRESS_REQUIRED",
|
|
489
|
+
"PAYMENT_DECLINED"
|
|
490
|
+
];
|
|
491
|
+
function Problem({
|
|
492
|
+
flow,
|
|
493
|
+
onManageBilling,
|
|
494
|
+
label
|
|
495
|
+
}) {
|
|
496
|
+
if (!flow.problem) return null;
|
|
497
|
+
const billing = onManageBilling && BILLING_CODES.includes(flow.problem.code ?? "");
|
|
498
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", "data-testid": "identity-problem", children: [
|
|
499
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive", children: flow.problem.message }),
|
|
500
|
+
billing && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", variant: "outline", onClick: onManageBilling, children: label })
|
|
501
|
+
] });
|
|
502
|
+
}
|
|
503
|
+
function IdentityVerificationCard({
|
|
504
|
+
flow,
|
|
505
|
+
onManageBilling,
|
|
506
|
+
labels
|
|
507
|
+
}) {
|
|
508
|
+
const l = useLabels(labels);
|
|
509
|
+
const { status } = flow;
|
|
510
|
+
if (!status?.enabled) return null;
|
|
511
|
+
const busy = flow.busy !== null;
|
|
512
|
+
let description;
|
|
513
|
+
let action = null;
|
|
514
|
+
if (status.verified) {
|
|
515
|
+
description = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
516
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.VerifiedBadge, {}),
|
|
517
|
+
l.verified,
|
|
518
|
+
status.document_country && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
|
|
519
|
+
" \xB7 ",
|
|
520
|
+
l.verifiedDetail(status.document_country)
|
|
521
|
+
] })
|
|
522
|
+
] });
|
|
523
|
+
action = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", variant: "ghost", onClick: flow.remove, disabled: busy, children: l.remove });
|
|
524
|
+
} else if (!status.eligible) {
|
|
525
|
+
description = `${l.intro} ${l.proOnly}`;
|
|
526
|
+
action = onManageBilling ? /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", variant: "outline", onClick: onManageBilling, children: l.seePlans }) : null;
|
|
527
|
+
} else if (status.state === "in_review") {
|
|
528
|
+
description = l.inReview;
|
|
529
|
+
} else if (status.state === "name_mismatch") {
|
|
530
|
+
description = l.finishName;
|
|
531
|
+
action = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "sm", onClick: flow.open, children: l.finish });
|
|
532
|
+
} else {
|
|
533
|
+
const resuming = status.attempts_left > 0 || status.state === "in_progress";
|
|
534
|
+
description = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
535
|
+
l.intro,
|
|
536
|
+
" ",
|
|
537
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: resuming ? l.attemptsLeft(status.attempts_left) : l.priceLine(flow.price ?? "", status.attempts_per_fee) })
|
|
538
|
+
] });
|
|
539
|
+
action = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { size: "sm", onClick: flow.open, disabled: busy, children: [
|
|
540
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "mr-1 h-4 w-4" }),
|
|
541
|
+
resuming ? l.continue : l.verify
|
|
542
|
+
] });
|
|
543
|
+
}
|
|
544
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(SettingsCard, { padding: "sm", "data-testid": "identity-verification-card", children: [
|
|
545
|
+
/* @__PURE__ */ jsxRuntime.jsx(SettingsRow, { label: l.title, description, children: action }),
|
|
546
|
+
!flow.isOpen && /* @__PURE__ */ jsxRuntime.jsx(Problem, { flow, onManageBilling, label: l.manageBilling })
|
|
547
|
+
] });
|
|
548
|
+
}
|
|
549
|
+
function IdentityVerificationDialog({
|
|
550
|
+
flow,
|
|
551
|
+
accountName,
|
|
552
|
+
dismissible = true,
|
|
553
|
+
onManageBilling,
|
|
554
|
+
labels
|
|
555
|
+
}) {
|
|
556
|
+
const l = useLabels(labels);
|
|
557
|
+
const { status } = flow;
|
|
558
|
+
const attempts = status?.attempts_per_fee ?? 0;
|
|
559
|
+
const docName = [status?.document_given_name, status?.document_family_name].filter(Boolean).join(" ");
|
|
560
|
+
const spinner = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "mr-1 h-4 w-4 animate-spin" });
|
|
561
|
+
let body;
|
|
562
|
+
let footer = null;
|
|
563
|
+
if (flow.step === "pay") {
|
|
564
|
+
body = flow.paymentUrl ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
565
|
+
"a",
|
|
566
|
+
{
|
|
567
|
+
href: flow.paymentUrl,
|
|
568
|
+
target: "_blank",
|
|
569
|
+
rel: "noopener noreferrer",
|
|
570
|
+
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",
|
|
571
|
+
children: [
|
|
572
|
+
l.confirmPayment,
|
|
573
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "h-3.5 w-3.5" })
|
|
574
|
+
]
|
|
575
|
+
}
|
|
576
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.payBody(flow.price ?? "", attempts) });
|
|
577
|
+
footer = flow.paymentUrl ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: flow.recheckPayment, disabled: flow.busy !== null, children: [
|
|
578
|
+
flow.busy === "start" && spinner,
|
|
579
|
+
l.paymentConfirmed
|
|
580
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: flow.pay, disabled: flow.busy !== null, "data-testid": "identity-pay", children: [
|
|
581
|
+
flow.busy === "pay" && spinner,
|
|
582
|
+
l.pay
|
|
583
|
+
] });
|
|
584
|
+
} else if (flow.step === "verify") {
|
|
585
|
+
body = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: flow.embedFailed ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.embedFailed }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
586
|
+
"div",
|
|
587
|
+
{
|
|
588
|
+
id: flow.verifyContainerId,
|
|
589
|
+
ref: flow.verifyContainerRef,
|
|
590
|
+
className: "h-[560px] w-full overflow-hidden rounded-md bg-muted",
|
|
591
|
+
"data-testid": "identity-didit-frame",
|
|
592
|
+
children: flow.busy === "start" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-6 w-6 animate-spin text-muted-foreground" }) })
|
|
593
|
+
}
|
|
594
|
+
) });
|
|
595
|
+
footer = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
596
|
+
flow.embedFailed && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "outline", onClick: flow.openInNewTab, children: [
|
|
597
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "mr-1 h-4 w-4" }),
|
|
598
|
+
l.openInNewTab
|
|
599
|
+
] }),
|
|
600
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "ghost", onClick: flow.checkResult, disabled: flow.busy !== null, children: [
|
|
601
|
+
flow.busy === "refresh" && spinner,
|
|
602
|
+
l.checkResult
|
|
603
|
+
] })
|
|
604
|
+
] });
|
|
605
|
+
} else if (status?.state === "name_mismatch") {
|
|
606
|
+
body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", "data-testid": "identity-name-mismatch", children: [
|
|
607
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.nameMismatchBody }),
|
|
608
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm", children: [
|
|
609
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: l.documentName }),
|
|
610
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "font-medium", children: docName }),
|
|
611
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: l.accountName }),
|
|
612
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { children: accountName })
|
|
613
|
+
] })
|
|
614
|
+
] });
|
|
615
|
+
footer = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
616
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "ghost", onClick: flow.keepName, disabled: flow.busy !== null, children: l.keepName }),
|
|
617
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: flow.acceptName, disabled: flow.busy !== null || !docName, children: [
|
|
618
|
+
flow.busy === "accept" && spinner,
|
|
619
|
+
l.useDocumentName(docName)
|
|
620
|
+
] })
|
|
621
|
+
] });
|
|
622
|
+
} else if (status?.verified) {
|
|
623
|
+
body = /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-2 text-sm", children: [
|
|
624
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.VerifiedBadge, { className: "h-4 w-4" }),
|
|
625
|
+
l.resultVerified
|
|
626
|
+
] });
|
|
627
|
+
footer = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.close, children: l.close });
|
|
628
|
+
} else if (status?.state === "in_review") {
|
|
629
|
+
body = /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.resultInReview });
|
|
630
|
+
footer = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.close, children: l.close });
|
|
631
|
+
} else {
|
|
632
|
+
const left = status?.attempts_left ?? 0;
|
|
633
|
+
body = /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.resultDeclined(left) });
|
|
634
|
+
footer = left > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.retry, disabled: flow.busy !== null, children: l.tryAgain }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.close, children: l.close });
|
|
635
|
+
}
|
|
636
|
+
const title = status?.state === "name_mismatch" && flow.step === "result" ? l.nameMismatchTitle : flow.step === "verify" ? l.verifyTitle : l.payTitle;
|
|
637
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
638
|
+
chunkULWRNGGE_cjs.ModalScaffold,
|
|
639
|
+
{
|
|
640
|
+
open: flow.isOpen,
|
|
641
|
+
onOpenChange: (open) => open ? flow.open() : flow.close(),
|
|
642
|
+
title,
|
|
643
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "h-5 w-5" }),
|
|
644
|
+
size: flow.step === "verify" ? "lg" : "md",
|
|
645
|
+
dismissible,
|
|
646
|
+
testId: "identity-verification-dialog",
|
|
647
|
+
children: [
|
|
648
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkULWRNGGE_cjs.ModalScaffold.Body, { children: [
|
|
649
|
+
body,
|
|
650
|
+
/* @__PURE__ */ jsxRuntime.jsx(Problem, { flow, onManageBilling, label: l.manageBilling })
|
|
651
|
+
] }),
|
|
652
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Footer, { children: footer })
|
|
653
|
+
]
|
|
654
|
+
}
|
|
655
|
+
);
|
|
656
|
+
}
|
|
657
|
+
function RequireVerified({
|
|
658
|
+
flow,
|
|
659
|
+
accountName,
|
|
660
|
+
onManageBilling,
|
|
661
|
+
children,
|
|
662
|
+
labels
|
|
663
|
+
}) {
|
|
664
|
+
const l = useLabels(labels);
|
|
665
|
+
const { status } = flow;
|
|
666
|
+
const blocked = Boolean(status?.enabled && status.required && !status.verified);
|
|
667
|
+
if (!blocked || !status) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
668
|
+
if (flow.isOpen) {
|
|
669
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
670
|
+
children,
|
|
671
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
672
|
+
IdentityVerificationDialog,
|
|
673
|
+
{
|
|
674
|
+
flow,
|
|
675
|
+
accountName,
|
|
676
|
+
dismissible: false,
|
|
677
|
+
onManageBilling,
|
|
678
|
+
labels
|
|
679
|
+
}
|
|
680
|
+
)
|
|
681
|
+
] });
|
|
682
|
+
}
|
|
683
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
684
|
+
children,
|
|
685
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
686
|
+
chunkULWRNGGE_cjs.ModalScaffold,
|
|
687
|
+
{
|
|
688
|
+
open: true,
|
|
689
|
+
onOpenChange: () => {
|
|
690
|
+
},
|
|
691
|
+
title: l.requiredTitle,
|
|
692
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "h-5 w-5" }),
|
|
693
|
+
dismissible: false,
|
|
694
|
+
testId: "identity-required-gate",
|
|
695
|
+
children: [
|
|
696
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: status.eligible ? l.requiredBody : l.requiredProOnly }) }),
|
|
697
|
+
status.eligible && /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Footer, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: flow.open, children: l.verify }) })
|
|
698
|
+
]
|
|
699
|
+
}
|
|
700
|
+
)
|
|
701
|
+
] });
|
|
702
|
+
}
|
|
434
703
|
var DEFAULT_PASSWORD_CHANGE_DIALOG_LABELS = {
|
|
435
704
|
setNewPasswordTitle: "Set New Password",
|
|
436
705
|
changeMasterPasswordTitle: "Change Master Password",
|
|
@@ -895,7 +1164,7 @@ function LogoutDialog({
|
|
|
895
1164
|
}) {
|
|
896
1165
|
const l = react.useMemo(() => ({ ...DEFAULT_LOGOUT_DIALOG_LABELS, ...labels }), [labels]);
|
|
897
1166
|
const [sessionsOpen, setSessionsOpen] = react.useState(false);
|
|
898
|
-
const restoreFocus =
|
|
1167
|
+
const restoreFocus = chunkULWRNGGE_cjs.useRestoreFocus();
|
|
899
1168
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open, onOpenChange: (next) => !next && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
900
1169
|
ui.DialogContent,
|
|
901
1170
|
{
|
|
@@ -1158,6 +1427,7 @@ exports.AvatarPicker = AvatarPicker;
|
|
|
1158
1427
|
exports.DEFAULT_ACTIVE_SESSIONS_DIALOG_LABELS = DEFAULT_ACTIVE_SESSIONS_DIALOG_LABELS;
|
|
1159
1428
|
exports.DEFAULT_AVATAR_PICKER_LABELS = DEFAULT_AVATAR_PICKER_LABELS;
|
|
1160
1429
|
exports.DEFAULT_DELETE_ACCOUNT_DIALOG_LABELS = DEFAULT_DELETE_ACCOUNT_DIALOG_LABELS;
|
|
1430
|
+
exports.DEFAULT_IDENTITY_VERIFICATION_LABELS = DEFAULT_IDENTITY_VERIFICATION_LABELS;
|
|
1161
1431
|
exports.DEFAULT_LOGOUT_DIALOG_LABELS = DEFAULT_LOGOUT_DIALOG_LABELS;
|
|
1162
1432
|
exports.DEFAULT_PASSWORD_CHANGE_DIALOG_LABELS = DEFAULT_PASSWORD_CHANGE_DIALOG_LABELS;
|
|
1163
1433
|
exports.DEFAULT_PROFILE_CARD_LABELS = DEFAULT_PROFILE_CARD_LABELS;
|
|
@@ -1165,10 +1435,13 @@ exports.DEFAULT_SETTINGS_DANGER_ZONE_LABELS = DEFAULT_SETTINGS_DANGER_ZONE_LABEL
|
|
|
1165
1435
|
exports.DeleteAccountDialog = DeleteAccountDialog;
|
|
1166
1436
|
exports.EMAIL_NOTIFICATION_CATEGORIES = EMAIL_NOTIFICATION_CATEGORIES;
|
|
1167
1437
|
exports.EMAIL_NOTIFICATION_KEYS = EMAIL_NOTIFICATION_KEYS;
|
|
1438
|
+
exports.IdentityVerificationCard = IdentityVerificationCard;
|
|
1439
|
+
exports.IdentityVerificationDialog = IdentityVerificationDialog;
|
|
1168
1440
|
exports.LogoutDialog = LogoutDialog;
|
|
1169
1441
|
exports.NotificationCategoryList = NotificationCategoryList;
|
|
1170
1442
|
exports.PasswordChangeDialog = PasswordChangeDialog;
|
|
1171
1443
|
exports.ProfileCard = ProfileCard;
|
|
1444
|
+
exports.RequireVerified = RequireVerified;
|
|
1172
1445
|
exports.SettingsActionRow = SettingsActionRow;
|
|
1173
1446
|
exports.SettingsCard = SettingsCard;
|
|
1174
1447
|
exports.SettingsDangerZone = SettingsDangerZone;
|
|
@@ -1182,5 +1455,5 @@ exports.toActiveSessionViews = toActiveSessionViews;
|
|
|
1182
1455
|
exports.toDeleteBlockerViews = toDeleteBlockerViews;
|
|
1183
1456
|
exports.toLogoutSessionViews = toLogoutSessionViews;
|
|
1184
1457
|
exports.toNotificationCategories = toNotificationCategories;
|
|
1185
|
-
//# sourceMappingURL=chunk-
|
|
1186
|
-
//# sourceMappingURL=chunk-
|
|
1458
|
+
//# sourceMappingURL=chunk-B3WCKBJ7.cjs.map
|
|
1459
|
+
//# sourceMappingURL=chunk-B3WCKBJ7.cjs.map
|