@arbidocs/blocks 0.4.128 → 0.4.130
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 +25 -10
- package/dist/{StreamedArtifactEditor-EEYAXJ4H.cjs → StreamedArtifactEditor-TQAND4H5.cjs} +6 -5
- package/dist/StreamedArtifactEditor-TQAND4H5.cjs.map +1 -0
- package/dist/{StreamedArtifactEditor-TDATDYD2.js → StreamedArtifactEditor-XQNANTWM.js} +4 -3
- package/dist/StreamedArtifactEditor-XQNANTWM.js.map +1 -0
- package/dist/agents/index.cjs +304 -304
- package/dist/agents/index.js +12 -12
- package/dist/artifacts/ArtifactCodeView.d.ts +6 -0
- package/dist/artifacts/ArtifactPreview.d.ts +22 -0
- package/dist/artifacts/index.cjs +50 -21
- package/dist/artifacts/index.d.ts +3 -0
- package/dist/artifacts/index.js +2 -1
- package/dist/artifacts/sandbox-policy.d.ts +34 -0
- package/dist/artifacts/sandboxDocument.d.ts +7 -0
- package/dist/calendar/CalendarPrint.d.ts +25 -0
- package/dist/calendar/booking-slots.d.ts +21 -0
- package/dist/calendar/index.cjs +440 -243
- package/dist/calendar/index.cjs.map +1 -1
- package/dist/calendar/index.d.ts +4 -0
- package/dist/calendar/index.js +282 -151
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/print-layout.d.ts +16 -0
- package/dist/calendar/printCalendar.d.ts +6 -0
- package/dist/calls/composite-canvas.d.ts +52 -0
- package/dist/calls/index.cjs +376 -3
- package/dist/calls/index.cjs.map +1 -1
- package/dist/calls/index.d.ts +3 -0
- package/dist/calls/index.js +360 -5
- package/dist/calls/index.js.map +1 -1
- package/dist/calls/ringtone.d.ts +16 -0
- package/dist/calls/voice-levels.d.ts +32 -0
- package/dist/chat/ThreadVisualizer.d.ts +28 -0
- package/dist/chat/index.cjs +156 -140
- package/dist/chat/index.d.ts +2 -0
- package/dist/chat/index.js +5 -5
- package/dist/chat/open-document.d.ts +5 -1
- package/dist/chat/thread-diagram.d.ts +26 -0
- 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-DQCYCEDR.js → chunk-2Q7FDZAY.js} +3 -3
- package/dist/{chunk-DQCYCEDR.js.map → chunk-2Q7FDZAY.js.map} +1 -1
- package/dist/{chunk-INW76PEL.cjs → chunk-2YV7FBLO.cjs} +175 -2
- package/dist/chunk-2YV7FBLO.cjs.map +1 -0
- 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-FSBY2S4V.cjs → chunk-4QIIDXLF.cjs} +10 -10
- package/dist/{chunk-FSBY2S4V.cjs.map → chunk-4QIIDXLF.cjs.map} +1 -1
- package/dist/{chunk-OYMWV45N.js → chunk-4RLCRFZS.js} +63 -13
- package/dist/chunk-4RLCRFZS.js.map +1 -0
- package/dist/{chunk-NZUQFF35.cjs → chunk-4S5IDT5F.cjs} +234 -5
- package/dist/chunk-4S5IDT5F.cjs.map +1 -0
- package/dist/{chunk-CJBN5HIS.js → chunk-4UMXQPNA.js} +20 -8
- package/dist/chunk-4UMXQPNA.js.map +1 -0
- package/dist/{chunk-KELGOCJA.js → chunk-65S53MZK.js} +174 -5
- package/dist/chunk-65S53MZK.js.map +1 -0
- package/dist/{chunk-IBZJYCYM.js → chunk-66TA5IBN.js} +17 -25
- package/dist/chunk-66TA5IBN.js.map +1 -0
- 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-OR4CO743.cjs → chunk-AAFX64WD.cjs} +3 -3
- package/dist/{chunk-OR4CO743.cjs.map → chunk-AAFX64WD.cjs.map} +1 -1
- package/dist/{chunk-MUMH3Z6K.cjs → chunk-ARDHLU73.cjs} +61 -11
- package/dist/chunk-ARDHLU73.cjs.map +1 -0
- package/dist/chunk-BIXHB4LV.cjs +178 -0
- package/dist/chunk-BIXHB4LV.cjs.map +1 -0
- 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-VW2C2AZL.js → chunk-ENDP7JER.js} +3 -3
- package/dist/{chunk-VW2C2AZL.js.map → chunk-ENDP7JER.js.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-P5ST47VY.js → chunk-GDBDHOI4.js} +3 -3
- package/dist/{chunk-P5ST47VY.js.map → chunk-GDBDHOI4.js.map} +1 -1
- package/dist/chunk-GTCC2VAR.js +153 -0
- package/dist/chunk-GTCC2VAR.js.map +1 -0
- package/dist/{chunk-3BJLNKOB.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-SWQX6CTT.cjs → chunk-JKB7WT7L.cjs} +2 -2
- package/dist/chunk-JKB7WT7L.cjs.map +1 -0
- 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-NS4JD2VR.js +22 -0
- package/dist/chunk-NS4JD2VR.js.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-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-ZV3BKLFY.cjs → chunk-QDEODGXE.cjs} +5 -5
- package/dist/{chunk-ZV3BKLFY.cjs.map → chunk-QDEODGXE.cjs.map} +1 -1
- package/dist/{chunk-7BJRLP3U.js → chunk-QYTYW74G.js} +5 -5
- package/dist/{chunk-7BJRLP3U.js.map → chunk-QYTYW74G.js.map} +1 -1
- package/dist/{chunk-A7NCSZAP.cjs → chunk-QZTNTP75.cjs} +17 -25
- package/dist/chunk-QZTNTP75.cjs.map +1 -0
- 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-LC2KJSUS.cjs → chunk-SARREDFP.cjs} +46 -46
- package/dist/{chunk-LC2KJSUS.cjs.map → chunk-SARREDFP.cjs.map} +1 -1
- package/dist/{chunk-ZCHSJUCI.js → chunk-SZX44LCT.js} +231 -6
- package/dist/chunk-SZX44LCT.js.map +1 -0
- 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-W27VK32R.cjs → chunk-TT6XV6WM.cjs} +84 -84
- package/dist/{chunk-W27VK32R.cjs.map → chunk-TT6XV6WM.cjs.map} +1 -1
- package/dist/{chunk-KLOSOT26.js → chunk-UMIY4SQS.js} +11 -11
- package/dist/{chunk-KLOSOT26.js.map → chunk-UMIY4SQS.js.map} +1 -1
- package/dist/chunk-VG24E4JJ.cjs +26 -0
- package/dist/chunk-VG24E4JJ.cjs.map +1 -0
- 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-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 +51 -51
- package/dist/collaboration/index.js +3 -3
- package/dist/components/DroppableContainer.d.ts +6 -0
- package/dist/components/GridRowNavigator.d.ts +29 -0
- package/dist/components/LoadingIndicator.d.ts +21 -0
- package/dist/components/RowNavigatorControls.d.ts +29 -0
- package/dist/components/SharedCell.d.ts +27 -0
- 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 +270 -227
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +1 -1
- package/dist/connect/index.js +199 -156
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedSettings.d.ts +46 -20
- 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/document-tools/index.cjs +1 -1
- package/dist/document-tools/index.js +1 -1
- package/dist/facts/fact-citations.d.ts +56 -0
- package/dist/facts/fact-table-column-resize.d.ts +18 -0
- package/dist/facts/index.cjs +198 -29
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.d.ts +2 -1
- package/dist/facts/index.js +187 -27
- 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 +877 -679
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +207 -30
- package/dist/index.js.map +1 -1
- 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/sandboxDocument-JLEETIWW.js +71 -0
- package/dist/sandboxDocument-JLEETIWW.js.map +1 -0
- package/dist/sandboxDocument-WQUNODSC.cjs +76 -0
- package/dist/sandboxDocument-WQUNODSC.cjs.map +1 -0
- package/dist/settings/DraggableHeader.d.ts +10 -0
- package/dist/settings/FilterChip.d.ts +15 -0
- package/dist/settings/MessageJsonTree.d.ts +7 -0
- package/dist/settings/MoreInfo.d.ts +25 -0
- package/dist/settings/PlanCard.d.ts +1 -1
- package/dist/settings/index.cjs +363 -266
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.d.ts +4 -1
- package/dist/settings/index.js +317 -222
- package/dist/settings/index.js.map +1 -1
- package/dist/settings/message-schema-hints.d.ts +19 -0
- package/dist/shell/index.cjs +48 -47
- package/dist/shell/index.js +4 -3
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +19 -18
- package/dist/studio/index.cjs.map +1 -1
- package/dist/studio/index.js +11 -10
- package/dist/studio/index.js.map +1 -1
- package/dist/workflow-canvas/index.cjs +65 -65
- package/dist/workflow-canvas/index.js +13 -13
- package/dist/workspaces/index.cjs +42 -3
- package/dist/workspaces/index.cjs.map +1 -1
- package/dist/workspaces/index.d.ts +1 -0
- package/dist/workspaces/index.js +38 -3
- package/dist/workspaces/index.js.map +1 -1
- package/dist/workspaces/workspace-type.d.ts +29 -0
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +10 -4
- package/dist/StreamedArtifactEditor-EEYAXJ4H.cjs.map +0 -1
- package/dist/StreamedArtifactEditor-TDATDYD2.js.map +0 -1
- package/dist/chunk-3BJLNKOB.cjs.map +0 -1
- package/dist/chunk-76JDDMSP.js +0 -31
- package/dist/chunk-76JDDMSP.js.map +0 -1
- package/dist/chunk-A7NCSZAP.cjs.map +0 -1
- package/dist/chunk-C54XEN5T.cjs +0 -34
- package/dist/chunk-C54XEN5T.cjs.map +0 -1
- package/dist/chunk-CJBN5HIS.js.map +0 -1
- package/dist/chunk-GYCQ3FNL.js.map +0 -1
- package/dist/chunk-IBZJYCYM.js.map +0 -1
- package/dist/chunk-INW76PEL.cjs.map +0 -1
- package/dist/chunk-KELGOCJA.js.map +0 -1
- package/dist/chunk-MUMH3Z6K.cjs.map +0 -1
- package/dist/chunk-NZUQFF35.cjs.map +0 -1
- package/dist/chunk-OYMWV45N.js.map +0 -1
- package/dist/chunk-SWQX6CTT.cjs.map +0 -1
- package/dist/chunk-ZCHSJUCI.js.map +0 -1
- package/dist/facts/timezone.d.ts +0 -4
- package/dist/settings/FirmPool.d.ts +0 -82
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
|
|
5
4
|
var chunkDETZZBG2_cjs = require('./chunk-DETZZBG2.cjs');
|
|
6
|
-
var
|
|
5
|
+
var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
|
|
6
|
+
var chunk6AALMYPS_cjs = require('./chunk-6AALMYPS.cjs');
|
|
7
7
|
var chunk32HW2Q33_cjs = require('./chunk-32HW2Q33.cjs');
|
|
8
8
|
var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
|
|
9
9
|
var react = require('react');
|
|
@@ -147,11 +147,11 @@ function FieldControl({
|
|
|
147
147
|
] });
|
|
148
148
|
}
|
|
149
149
|
case "scope": {
|
|
150
|
-
const scope =
|
|
150
|
+
const scope = chunk6AALMYPS_cjs.isWorkflowScope(value) ? value : { folders: [], labels: [] };
|
|
151
151
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": testId, children: renderScope?.(field, scope, onChange) });
|
|
152
152
|
}
|
|
153
153
|
case "documents": {
|
|
154
|
-
const picked =
|
|
154
|
+
const picked = chunk6AALMYPS_cjs.isWorkflowScope(value) ? value : { folders: [], labels: [], documents: [] };
|
|
155
155
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": testId, children: renderDocuments?.(field, picked, onChange) });
|
|
156
156
|
}
|
|
157
157
|
case "person":
|
|
@@ -429,7 +429,7 @@ function toStepField(f) {
|
|
|
429
429
|
}
|
|
430
430
|
var compact = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== void 0 && v !== ""));
|
|
431
431
|
function placeholders(workflow) {
|
|
432
|
-
return Object.fromEntries(
|
|
432
|
+
return Object.fromEntries(chunk6AALMYPS_cjs.runFields(workflow).map((f) => [f.name, `{{${f.name}}}`]));
|
|
433
433
|
}
|
|
434
434
|
function agentStep(workflow, step, options) {
|
|
435
435
|
const target = step.workflow ? options.resolveWorkflow?.(step.workflow) : void 0;
|
|
@@ -438,11 +438,11 @@ function agentStep(workflow, step, options) {
|
|
|
438
438
|
([, v]) => v !== void 0 && v !== null && v !== ""
|
|
439
439
|
);
|
|
440
440
|
const inputs = { ...placeholders(workflow), ...Object.fromEntries(given) };
|
|
441
|
-
return { skill: null, inputs: null, prompt:
|
|
441
|
+
return { skill: null, inputs: null, prompt: chunk6AALMYPS_cjs.composeStepPrompt(workflow, step, inputs, options) };
|
|
442
442
|
}
|
|
443
443
|
function toPlanSteps(workflow, options = {}) {
|
|
444
444
|
const layout = workflow.run.kind === "steps" ? workflow.run.layout : void 0;
|
|
445
|
-
return
|
|
445
|
+
return chunk6AALMYPS_cjs.workflowSteps(workflow).map((step) => {
|
|
446
446
|
const ui = compact({
|
|
447
447
|
description: step.description,
|
|
448
448
|
icon: step.icon,
|
|
@@ -469,8 +469,8 @@ function toPlanSteps(workflow, options = {}) {
|
|
|
469
469
|
ui,
|
|
470
470
|
// An unfinished signal (still being typed) is not saved: the server would refuse it.
|
|
471
471
|
...step.signals?.some((s) => !isIncompleteSignal(s)) ? { signals: step.signals.filter((s) => !isIncompleteSignal(s)).map(toPlanSignal) } : {},
|
|
472
|
-
...step.assignee &&
|
|
473
|
-
...step.remindAfterHours &&
|
|
472
|
+
...step.assignee && chunk6AALMYPS_cjs.canAssign(step) ? { assignee: toPlanAssignee(step.assignee) } : {},
|
|
473
|
+
...step.remindAfterHours && chunk6AALMYPS_cjs.canAssign(step) ? { remind_after_hours: step.remindAfterHours } : {},
|
|
474
474
|
// A review's fields are what approving it is checked against (the server's `fields`).
|
|
475
475
|
...step.kind === "review" && step.fields?.length ? { fields: step.fields.map(toStepField) } : {},
|
|
476
476
|
...step.kind === "action" ? { action: toPlanAction(step.action) } : {},
|
|
@@ -574,7 +574,7 @@ function fromStepField(f) {
|
|
|
574
574
|
var errorMessage = (e) => e instanceof Error ? e.message : typeof e === "string" ? e : "Something went wrong.";
|
|
575
575
|
function firstOpen(steps, states) {
|
|
576
576
|
const open = steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? "pending"));
|
|
577
|
-
return open?.id ?? (steps.length &&
|
|
577
|
+
return open?.id ?? (steps.length && chunk6AALMYPS_cjs.isRunFinished(steps, states) ? null : steps[0]?.id ?? null);
|
|
578
578
|
}
|
|
579
579
|
function useWorkflowView(options) {
|
|
580
580
|
const { steps, states, inputs, setInput, loaded = true } = options;
|
|
@@ -614,11 +614,11 @@ function useWorkflowView(options) {
|
|
|
614
614
|
}),
|
|
615
615
|
[]
|
|
616
616
|
);
|
|
617
|
-
const action = busy ? "wait" :
|
|
617
|
+
const action = busy ? "wait" : chunk6AALMYPS_cjs.nextAction(steps, states, current, actionOptions(options));
|
|
618
618
|
const next = react.useCallback(async () => {
|
|
619
619
|
const { steps: s, states: st, inputs: values } = optionsRef.current;
|
|
620
620
|
const at = s.find((x) => x.id === current);
|
|
621
|
-
const act2 =
|
|
621
|
+
const act2 = chunk6AALMYPS_cjs.nextAction(s, st, current, actionOptions(optionsRef.current));
|
|
622
622
|
if (!at || act2 === "wait" || busy) return;
|
|
623
623
|
setActionError(null);
|
|
624
624
|
if (act2 === "finish") return setCurrent(null);
|
|
@@ -629,7 +629,7 @@ function useWorkflowView(options) {
|
|
|
629
629
|
await (act2 === "start" ? optionsRef.current.start?.() : optionsRef.current.retry?.(at.id));
|
|
630
630
|
return;
|
|
631
631
|
}
|
|
632
|
-
if (Object.keys(
|
|
632
|
+
if (Object.keys(chunk6AALMYPS_cjs.validateStep(at, values)).length > 0) {
|
|
633
633
|
setShowErrors(true);
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
@@ -730,10 +730,10 @@ function useWorkflowView(options) {
|
|
|
730
730
|
inputs,
|
|
731
731
|
setInput,
|
|
732
732
|
stateOf: (id) => states[id],
|
|
733
|
-
phaseOf: (id) =>
|
|
734
|
-
failedUpstreamOf: (id) =>
|
|
733
|
+
phaseOf: (id) => chunk6AALMYPS_cjs.stepPhase(steps, states, id),
|
|
734
|
+
failedUpstreamOf: (id) => chunk6AALMYPS_cjs.failedUpstream(steps, states, id),
|
|
735
735
|
isLocked,
|
|
736
|
-
errors: showErrors && step && !isLocked(step.id) ?
|
|
736
|
+
errors: showErrors && step && !isLocked(step.id) ? chunk6AALMYPS_cjs.validateStep(step, inputs) : {},
|
|
737
737
|
busy,
|
|
738
738
|
actionError,
|
|
739
739
|
isRunning: Object.values(states).some((s) => s.status === "running"),
|
|
@@ -751,11 +751,11 @@ function useWorkflowView(options) {
|
|
|
751
751
|
nameOf: options.nameOf,
|
|
752
752
|
assigneeOf: (id) => {
|
|
753
753
|
const s = steps.find((x) => x.id === id);
|
|
754
|
-
if (!s || !
|
|
755
|
-
return
|
|
754
|
+
if (!s || !chunk6AALMYPS_cjs.canAssign(s)) return void 0;
|
|
755
|
+
return chunk6AALMYPS_cjs.assigneeName(s.assignee, {
|
|
756
756
|
nameOf: options.nameOf,
|
|
757
757
|
inputs,
|
|
758
|
-
fields:
|
|
758
|
+
fields: chunk6AALMYPS_cjs.runFieldsOf(steps),
|
|
759
759
|
announcedTo: states[id]?.announcedTo
|
|
760
760
|
});
|
|
761
761
|
},
|
|
@@ -889,7 +889,7 @@ function StepBarFrame({
|
|
|
889
889
|
}) {
|
|
890
890
|
const l = { ...DEFAULT_STEP_BAR_LABELS, ...labels };
|
|
891
891
|
const box = react.useRef(null);
|
|
892
|
-
const { width } =
|
|
892
|
+
const { width } = chunk6AALMYPS_cjs.useElementSize(box);
|
|
893
893
|
const narrow = width > 0 && width < NARROW_PX;
|
|
894
894
|
const [start, setStart] = react.useState(null);
|
|
895
895
|
react.useEffect(() => setStart(null), [current]);
|
|
@@ -956,7 +956,7 @@ function StepBarFrame({
|
|
|
956
956
|
phase === "blocked" && "opacity-60"
|
|
957
957
|
),
|
|
958
958
|
"aria-hidden": true,
|
|
959
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
959
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunk6AALMYPS_cjs.StepBadgeMark, { phase, icon: icon?.(s) })
|
|
960
960
|
}
|
|
961
961
|
),
|
|
962
962
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", title: s.title, children: s.title }),
|
|
@@ -1064,7 +1064,7 @@ function StepBarFrame({
|
|
|
1064
1064
|
};
|
|
1065
1065
|
const running = win.runningHidden;
|
|
1066
1066
|
const outOfViewChip = (s, kind) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1067
|
-
|
|
1067
|
+
chunk6AALMYPS_cjs.StepChip,
|
|
1068
1068
|
{
|
|
1069
1069
|
kind: kindOf(s),
|
|
1070
1070
|
phase: kind === "working" ? "running" : "failed",
|
|
@@ -1237,7 +1237,7 @@ var DEFAULT_WORKFLOW_STEP_PARTS_LABELS = {
|
|
|
1237
1237
|
someone: "someone"
|
|
1238
1238
|
};
|
|
1239
1239
|
var docName = (ref, nameOfDoc) => {
|
|
1240
|
-
const { id, version } =
|
|
1240
|
+
const { id, version } = chunk6AALMYPS_cjs.splitDocRef(ref);
|
|
1241
1241
|
const name = nameOfDoc?.(id) ?? id;
|
|
1242
1242
|
return version ? `${name} \xB7 v${version}` : name;
|
|
1243
1243
|
};
|
|
@@ -1319,7 +1319,7 @@ function SendBackControl({
|
|
|
1319
1319
|
const states = Object.fromEntries(
|
|
1320
1320
|
run.steps.map((s) => [s.id, run.stateOf(s.id) ?? { status: "pending" }])
|
|
1321
1321
|
);
|
|
1322
|
-
const targets =
|
|
1322
|
+
const targets = chunk6AALMYPS_cjs.sendBackTargets(run.steps, states, step.id);
|
|
1323
1323
|
const [open, setOpen] = react.useState(false);
|
|
1324
1324
|
const [to, setTo] = react.useState(targets[0]?.id ?? "");
|
|
1325
1325
|
const [note, setNote] = react.useState("");
|
|
@@ -1409,7 +1409,7 @@ function ApprovalEvidence({
|
|
|
1409
1409
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex flex-wrap items-center gap-1.5 text-sm font-medium", children: [
|
|
1410
1410
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "size-4 text-primary" }),
|
|
1411
1411
|
approver ? l.approvedBy.replace("{name}", approver) : null,
|
|
1412
|
-
state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}",
|
|
1412
|
+
state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}", chunk6AALMYPS_cjs.formatDate(state.at)) })
|
|
1413
1413
|
] }),
|
|
1414
1414
|
evidence.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
1415
1415
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: l.approvedWhat }),
|
|
@@ -1442,7 +1442,7 @@ function ApprovalEvidence({
|
|
|
1442
1442
|
] }),
|
|
1443
1443
|
(step.fields ?? []).length > 0 && /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-xs", children: (step.fields ?? []).map((f) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "contents", children: [
|
|
1444
1444
|
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: f.label }),
|
|
1445
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children:
|
|
1445
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children: chunk6AALMYPS_cjs.shownValue(run.inputs[f.name], f, run.nameOf) })
|
|
1446
1446
|
] }, f.name)) })
|
|
1447
1447
|
] });
|
|
1448
1448
|
}
|
|
@@ -1538,7 +1538,7 @@ function ActionStepBody({
|
|
|
1538
1538
|
waiting?.expires_at && phase === "waiting" && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
1539
1539
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "size-3.5" }),
|
|
1540
1540
|
" ",
|
|
1541
|
-
l.expires.replace("{date}",
|
|
1541
|
+
l.expires.replace("{date}", chunk6AALMYPS_cjs.formatDate(waiting.expires_at))
|
|
1542
1542
|
] }),
|
|
1543
1543
|
phase === "waiting" && mine && !declining && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
1544
1544
|
actions?.sign && state && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1696,7 +1696,7 @@ function WorkflowStepBar({
|
|
|
1696
1696
|
const name = `${title} (${l.phases[phase]})`;
|
|
1697
1697
|
if (s.id === DONE)
|
|
1698
1698
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1699
|
-
|
|
1699
|
+
chunk6AALMYPS_cjs.StepChip,
|
|
1700
1700
|
{
|
|
1701
1701
|
inert: true,
|
|
1702
1702
|
kind: "start",
|
|
@@ -1710,17 +1710,17 @@ function WorkflowStepBar({
|
|
|
1710
1710
|
"data-testid": tid("step-done")
|
|
1711
1711
|
}
|
|
1712
1712
|
);
|
|
1713
|
-
const kind =
|
|
1714
|
-
const KindIcon =
|
|
1713
|
+
const kind = chunk6AALMYPS_cjs.stepKindOf(s);
|
|
1714
|
+
const KindIcon = chunk6AALMYPS_cjs.STEP_KIND_ICONS[kind];
|
|
1715
1715
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1716
|
-
|
|
1716
|
+
chunk6AALMYPS_cjs.StepChip,
|
|
1717
1717
|
{
|
|
1718
1718
|
kind,
|
|
1719
1719
|
phase,
|
|
1720
1720
|
icon: icon(s.icon) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {}),
|
|
1721
1721
|
label: s.title,
|
|
1722
1722
|
current: isCurrent,
|
|
1723
|
-
heading:
|
|
1723
|
+
heading: chunk6AALMYPS_cjs.DEFAULT_STEP_KIND_LABELS[kind],
|
|
1724
1724
|
labelClassName: isCurrent ? STEP_LABEL_CURRENT : ui.cn(STEP_LABEL, STEP_LABEL_MAX),
|
|
1725
1725
|
labelTestId: tid(`step-${s.id}-label`),
|
|
1726
1726
|
onClick: () => run.goTo(s.id),
|
|
@@ -1753,7 +1753,7 @@ function WorkflowStepBar({
|
|
|
1753
1753
|
isSelectable: (id) => id !== DONE,
|
|
1754
1754
|
renderStep: (s) => pill(s),
|
|
1755
1755
|
icon: (s) => s.id === DONE ? doneIcon : icon(s.icon),
|
|
1756
|
-
kindOf: (s) => s.id === DONE ? "start" :
|
|
1756
|
+
kindOf: (s) => s.id === DONE ? "start" : chunk6AALMYPS_cjs.stepKindOf(s),
|
|
1757
1757
|
disabled: run.busy,
|
|
1758
1758
|
labels,
|
|
1759
1759
|
tid,
|
|
@@ -1836,7 +1836,7 @@ function WorkflowRunner({
|
|
|
1836
1836
|
const { steps, step, isComplete, action } = run;
|
|
1837
1837
|
const completion = workflow.run.kind === "steps" ? workflow.run.completion : void 0;
|
|
1838
1838
|
const tid = (suffix) => `${testIdPrefix}-${suffix}`;
|
|
1839
|
-
const levels =
|
|
1839
|
+
const levels = chunk6AALMYPS_cjs.stepLevels(steps);
|
|
1840
1840
|
const icon = (key) => key && renderIcon ? renderIcon(key) : void 0;
|
|
1841
1841
|
const added = step?.kind === "upload" ? (files ?? []).filter((f) => f.addedFor === step.id) : [];
|
|
1842
1842
|
const unread = added.filter((f) => f.status === "processing").length;
|
|
@@ -1844,7 +1844,7 @@ function WorkflowRunner({
|
|
|
1844
1844
|
const sending = added.filter((f) => f.status === "uploading").length;
|
|
1845
1845
|
const unsent = added.filter((f) => f.status === "upload-failed").length;
|
|
1846
1846
|
const uploadHold = step?.kind === "upload" && (sending > 0 || uploading || unsent > 0);
|
|
1847
|
-
const docsWait = !!step &&
|
|
1847
|
+
const docsWait = !!step && chunk6AALMYPS_cjs.waitingDocuments(run.stateOf(step.id)).length > 0;
|
|
1848
1848
|
const nextLabel = sending ? sending === 1 ? l.uploadingFile : l.uploadingFiles.replace("{count}", String(sending)) : uploadHold && uploading ? l.uploadingAny : uploadHold ? unsent === 1 ? l.uploadFailed : l.uploadsFailed.replace("{count}", String(unsent)) : reading ? l.readingFiles.replace("{current}", String(Math.min(added.length - unread + 1, added.length))).replace("{count}", String(added.length)) : action === "start" ? l.start : action === "retry" ? l.retry : action === "finish" ? l.finish : action === "complete" && step?.kind === "review" ? l.approve : action === "complete" && step?.kind === "action" ? l.markSent : action === "wait" && (run.isRunning || run.busy || docsWait) ? l.working : (step && !run.isLocked(step.id) ? step.nextLabel : void 0) ?? l.next;
|
|
1849
1849
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn(compact2 ? "space-y-3" : "space-y-6", className), "data-testid": testIdPrefix, children: [
|
|
1850
1850
|
!hideStepBar && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1876,7 +1876,7 @@ function WorkflowRunner({
|
|
|
1876
1876
|
/* @__PURE__ */ jsxRuntime.jsx(StepNotices, { run, step, l, tid }),
|
|
1877
1877
|
run.phaseOf(step.id) === "blocked" ? /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { className: ui.cn(box, "p-6"), "data-testid": tid(step.id), children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", "data-testid": tid(`${step.id}-blocked`), children: l.blocked.replace(
|
|
1878
1878
|
"{steps}",
|
|
1879
|
-
|
|
1879
|
+
chunk6AALMYPS_cjs.stepDependencies(steps, step.id).map((d) => steps.find((s) => s.id === d)?.title ?? d).join(", ")
|
|
1880
1880
|
) }) }) : step.kind === "form" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
|
|
1881
1881
|
/* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon), testId: tid(`${step.id}-title`) }),
|
|
1882
1882
|
/* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
|
|
@@ -1932,7 +1932,7 @@ function WorkflowRunner({
|
|
|
1932
1932
|
] }) : step.kind === "review" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
|
|
1933
1933
|
/* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon) }),
|
|
1934
1934
|
/* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
|
|
1935
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children:
|
|
1935
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children: chunk6AALMYPS_cjs.reviewInstructions(step, run.inputs) }),
|
|
1936
1936
|
/* @__PURE__ */ jsxRuntime.jsx(AssigneeLine, { run, stepId: step.id, l: pl, testId: tid(step.id) }),
|
|
1937
1937
|
!(run.phaseOf(step.id) === "done" && run.stateOf(step.id)?.by) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm", "data-testid": tid(`${step.id}-status`), children: run.phaseOf(step.id) === "done" ? l.approved : run.phaseOf(step.id) === "skipped" ? l.skipped : l.awaitingReview }),
|
|
1938
1938
|
(step.fields ?? []).length > 0 && run.phaseOf(step.id) === "ready" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2199,8 +2199,8 @@ function AgentStepBody({
|
|
|
2199
2199
|
}) {
|
|
2200
2200
|
const state = run.stateOf(step.id);
|
|
2201
2201
|
const phase = run.phaseOf(step.id);
|
|
2202
|
-
const pending =
|
|
2203
|
-
const pendingNames = pending.flatMap((ref) => nameOfDoc?.(
|
|
2202
|
+
const pending = chunk6AALMYPS_cjs.waitingDocuments(state);
|
|
2203
|
+
const pendingNames = pending.flatMap((ref) => nameOfDoc?.(chunk6AALMYPS_cjs.splitDocRef(ref).id) ?? []);
|
|
2204
2204
|
const header = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
2205
2205
|
/* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon }),
|
|
2206
2206
|
phase === "failed" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: run.retry && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2285,7 +2285,7 @@ function StepNotices({
|
|
|
2285
2285
|
l,
|
|
2286
2286
|
tid
|
|
2287
2287
|
}) {
|
|
2288
|
-
const notStarted = !
|
|
2288
|
+
const notStarted = !chunk6AALMYPS_cjs.isPersonStep(step) && run.needsStart && run.phaseOf(step.id) === "ready";
|
|
2289
2289
|
const failed = run.failedUpstreamOf(step.id);
|
|
2290
2290
|
if (!notStarted && failed.length === 0) return null;
|
|
2291
2291
|
const why = (error) => error ? `: ${error}` : "";
|
|
@@ -2407,12 +2407,12 @@ function taskActivityHeadline(e, labels = DEFAULT_TASK_ACTIVITY_LABELS, agentNam
|
|
|
2407
2407
|
case "step_skipped":
|
|
2408
2408
|
return "Step skipped";
|
|
2409
2409
|
case "step_waiting": {
|
|
2410
|
-
const documents =
|
|
2411
|
-
return documents ?
|
|
2410
|
+
const documents = chunk6AALMYPS_cjs.eventWaitingDocuments(detail);
|
|
2411
|
+
return documents ? chunk6AALMYPS_cjs.waitingForDocumentsText(documents.length) : "Waiting on people";
|
|
2412
2412
|
}
|
|
2413
2413
|
case "step_progress": {
|
|
2414
|
-
const documents =
|
|
2415
|
-
return documents ?
|
|
2414
|
+
const documents = chunk6AALMYPS_cjs.eventWaitingDocuments(detail);
|
|
2415
|
+
return documents ? chunk6AALMYPS_cjs.waitingForDocumentsText(documents.length) : detail.signed ? "Signed" : "Step moved on";
|
|
2416
2416
|
}
|
|
2417
2417
|
case "step_sent_back":
|
|
2418
2418
|
return "Sent the work back";
|
|
@@ -2542,5 +2542,5 @@ exports.toPlanAssignee = toPlanAssignee;
|
|
|
2542
2542
|
exports.toPlanDocumentRef = toPlanDocumentRef;
|
|
2543
2543
|
exports.toPlanSteps = toPlanSteps;
|
|
2544
2544
|
exports.useWorkflowView = useWorkflowView;
|
|
2545
|
-
//# sourceMappingURL=chunk-
|
|
2546
|
-
//# sourceMappingURL=chunk-
|
|
2545
|
+
//# sourceMappingURL=chunk-SARREDFP.cjs.map
|
|
2546
|
+
//# sourceMappingURL=chunk-SARREDFP.cjs.map
|