@arbidocs/blocks 0.4.81 → 0.4.83
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 +278 -278
- package/dist/agents/index.js +3 -3
- package/dist/agents/workflows/StepBarFrame.d.ts +12 -4
- package/dist/{chunk-THCFZKTM.js → chunk-CONIA2ZA.js} +8 -8
- package/dist/chunk-CONIA2ZA.js.map +1 -0
- package/dist/{chunk-SWSVPQNB.js → chunk-RSKSXEPW.js} +199 -18
- package/dist/chunk-RSKSXEPW.js.map +1 -0
- package/dist/{chunk-I56ORHPY.js → chunk-RX35SMPR.js} +5 -5
- package/dist/{chunk-I56ORHPY.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-F5WIETZY.cjs → chunk-XA5S4776.cjs} +44 -44
- package/dist/chunk-XA5S4776.cjs.map +1 -0
- package/dist/{chunk-UA2AMDR6.cjs → chunk-ZQYE7J3J.cjs} +201 -13
- package/dist/chunk-ZQYE7J3J.cjs.map +1 -0
- package/dist/connect/index.cjs +49 -28
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +34 -13
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedTagMatrix.d.ts +6 -3
- package/dist/connection/ConnectedWorkflowBuilder.d.ts +9 -2
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +20 -1
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +20 -2
- 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 +696 -398
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +279 -8
- package/dist/index.js.map +1 -1
- 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 +31 -8
- package/dist/tags/TagsNav.d.ts +44 -0
- package/dist/tags/index.d.ts +9 -3
- package/dist/tags/tagMatrixDocx.d.ts +45 -0
- package/dist/tags/tagMatrixModel.d.ts +10 -6
- package/dist/workflow-canvas/index.cjs +81 -63
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.js +39 -21
- package/dist/workflow-canvas/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-BX7JWZWE.cjs.map +0 -1
- package/dist/chunk-F5WIETZY.cjs.map +0 -1
- package/dist/chunk-SWSVPQNB.js.map +0 -1
- package/dist/chunk-THCFZKTM.js.map +0 -1
- package/dist/chunk-UA2AMDR6.cjs.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkYJQVLVBJ_cjs = require('./chunk-YJQVLVBJ.cjs');
|
|
5
5
|
var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkRYYYHPFU_cjs = require('./chunk-RYYYHPFU.cjs');
|
|
7
7
|
var chunk7RGLTF76_cjs = require('./chunk-7RGLTF76.cjs');
|
|
8
8
|
var chunk3AFWGEDJ_cjs = require('./chunk-3AFWGEDJ.cjs');
|
|
9
9
|
var chunkVFUWWH52_cjs = require('./chunk-VFUWWH52.cjs');
|
|
@@ -13,10 +13,10 @@ var chunkIXALYQT7_cjs = require('./chunk-IXALYQT7.cjs');
|
|
|
13
13
|
var chunkZ5VUZ6YD_cjs = require('./chunk-Z5VUZ6YD.cjs');
|
|
14
14
|
var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
|
|
15
15
|
var chunkOB5F4577_cjs = require('./chunk-OB5F4577.cjs');
|
|
16
|
-
var chunkC54XEN5T_cjs = require('./chunk-C54XEN5T.cjs');
|
|
17
16
|
var chunkB4SRYJLM_cjs = require('./chunk-B4SRYJLM.cjs');
|
|
18
17
|
var chunk7UTB4PHM_cjs = require('./chunk-7UTB4PHM.cjs');
|
|
19
18
|
var chunkFX3K6LNZ_cjs = require('./chunk-FX3K6LNZ.cjs');
|
|
19
|
+
var chunkC54XEN5T_cjs = require('./chunk-C54XEN5T.cjs');
|
|
20
20
|
var chunkKDG6FER6_cjs = require('./chunk-KDG6FER6.cjs');
|
|
21
21
|
var chunkULWRNGGE_cjs = require('./chunk-ULWRNGGE.cjs');
|
|
22
22
|
var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
|
|
@@ -145,7 +145,7 @@ function WorkflowConfigDialog({
|
|
|
145
145
|
}) {
|
|
146
146
|
const l = { ...DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, ...labels };
|
|
147
147
|
const initialKey = JSON.stringify(initialInputs ?? {});
|
|
148
|
-
const seedKey = JSON.stringify({ ...
|
|
148
|
+
const seedKey = JSON.stringify({ ...chunkRYYYHPFU_cjs.defaultInputs(workflow), ...JSON.parse(initialKey) });
|
|
149
149
|
const seed = react.useMemo(() => JSON.parse(seedKey), [seedKey]);
|
|
150
150
|
const [inputs, setInputs] = useControllableState(inputsProp, seed, onInputsChange);
|
|
151
151
|
const [agentId, setAgentId] = useControllableState(
|
|
@@ -157,7 +157,7 @@ function WorkflowConfigDialog({
|
|
|
157
157
|
if (open && inputsProp === void 0) setInputs(seed);
|
|
158
158
|
}, [open, seed]);
|
|
159
159
|
const setField = (name, value) => setInputs({ ...inputs, [name]: value });
|
|
160
|
-
const errors =
|
|
160
|
+
const errors = chunkRYYYHPFU_cjs.validateInputs(workflow, inputs);
|
|
161
161
|
const valid = Object.keys(errors).length === 0;
|
|
162
162
|
const visibleErrors = Object.fromEntries(
|
|
163
163
|
Object.entries(errors).filter(([, e]) => e !== "required")
|
|
@@ -170,7 +170,7 @@ function WorkflowConfigDialog({
|
|
|
170
170
|
const blockedByScope = matchedCount !== null && matchedCount === 0 && Boolean(workflow.requiresFiles);
|
|
171
171
|
const showAgent = workflow.run.kind === "prompt" && workflow.options?.agent !== false && agents !== void 0 && agents.length > 0;
|
|
172
172
|
const launch = (values) => {
|
|
173
|
-
Promise.resolve(onLaunch(
|
|
173
|
+
Promise.resolve(onLaunch(chunkRYYYHPFU_cjs.buildLaunch(workflow, values, agentId))).catch(() => {
|
|
174
174
|
});
|
|
175
175
|
};
|
|
176
176
|
const submit = () => {
|
|
@@ -248,7 +248,7 @@ function WorkflowConfigDialog({
|
|
|
248
248
|
}
|
|
249
249
|
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
250
250
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
251
|
-
|
|
251
|
+
chunkRYYYHPFU_cjs.SchemaForm,
|
|
252
252
|
{
|
|
253
253
|
fields,
|
|
254
254
|
values: inputs,
|
|
@@ -326,7 +326,7 @@ function resolveScopeInputs(workflow, inputs, scopeSource) {
|
|
|
326
326
|
for (const field of workflow.inputs) {
|
|
327
327
|
if (field.type !== "scope") continue;
|
|
328
328
|
const raw = inputs[field.name];
|
|
329
|
-
const scope =
|
|
329
|
+
const scope = chunkRYYYHPFU_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
|
|
330
330
|
next[field.name] = { ...scope, documents: scopeSource.resolveDocuments(scope) };
|
|
331
331
|
}
|
|
332
332
|
return next;
|
|
@@ -368,9 +368,9 @@ function WorkflowLauncher({
|
|
|
368
368
|
};
|
|
369
369
|
const select = (workflow) => {
|
|
370
370
|
if (workflow.run.kind === "operation" && workflow.inputs.length === 0) {
|
|
371
|
-
const inputs =
|
|
372
|
-
if (Object.keys(
|
|
373
|
-
Promise.resolve(onLaunch(
|
|
371
|
+
const inputs = chunkRYYYHPFU_cjs.defaultInputs(workflow);
|
|
372
|
+
if (Object.keys(chunkRYYYHPFU_cjs.validateInputs(workflow, inputs)).length === 0) {
|
|
373
|
+
Promise.resolve(onLaunch(chunkRYYYHPFU_cjs.buildLaunch(workflow, inputs, void 0))).catch(() => {
|
|
374
374
|
});
|
|
375
375
|
return;
|
|
376
376
|
}
|
|
@@ -520,7 +520,7 @@ function workflowToSkillMarkdown(workflow) {
|
|
|
520
520
|
if (workflow.landing !== "chat") lines.push(`landing: ${workflow.landing}`);
|
|
521
521
|
if (workflow.requiresFiles) lines.push("requires_files: true");
|
|
522
522
|
if (workflow.inputs.length > 0) {
|
|
523
|
-
lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(
|
|
523
|
+
lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunkRYYYHPFU_cjs.fieldToFrontmatter))}`);
|
|
524
524
|
}
|
|
525
525
|
lines.push("---", "", run.promptTemplate.trim(), "");
|
|
526
526
|
return lines.join("\n");
|
|
@@ -542,11 +542,11 @@ function workflowFromSkillMarkdown(id, text2) {
|
|
|
542
542
|
} else if (value === "true" || value === "false") frontmatter[key] = value === "true";
|
|
543
543
|
else frontmatter[key] = value;
|
|
544
544
|
}
|
|
545
|
-
return
|
|
545
|
+
return chunkRYYYHPFU_cjs.workflowFromFrontmatter(id, frontmatter, body);
|
|
546
546
|
}
|
|
547
547
|
function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, resolveWorkflow, compose } = {}) {
|
|
548
|
-
const steps =
|
|
549
|
-
const [inputs, setInputs] = react.useState(() =>
|
|
548
|
+
const steps = chunkRYYYHPFU_cjs.workflowSteps(workflow);
|
|
549
|
+
const [inputs, setInputs] = react.useState(() => chunkRYYYHPFU_cjs.initialRunInputs(workflow));
|
|
550
550
|
const [states, setStates] = react.useState({});
|
|
551
551
|
const set = (id, state) => setStates((s) => ({ ...s, [id]: state }));
|
|
552
552
|
const timers = react.useRef(/* @__PURE__ */ new Map());
|
|
@@ -568,10 +568,10 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
568
568
|
react.useEffect(() => {
|
|
569
569
|
if (Object.values(states).some((s) => s.status === "running")) return;
|
|
570
570
|
const next = steps.find(
|
|
571
|
-
(s) => (s.kind === "agent" || s.kind === "action") &&
|
|
571
|
+
(s) => (s.kind === "agent" || s.kind === "action") && chunkRYYYHPFU_cjs.stepPhase(steps, states, s.id) === "ready"
|
|
572
572
|
);
|
|
573
573
|
if (!next || next.kind !== "agent" && next.kind !== "action") return;
|
|
574
|
-
const prompt = next.kind === "agent" ?
|
|
574
|
+
const prompt = next.kind === "agent" ? chunkRYYYHPFU_cjs.composeStepPrompt(workflow, next, inputs, { resolveWorkflow, compose }) : "";
|
|
575
575
|
set(next.id, { status: "running", startedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
576
576
|
timers.current.set(
|
|
577
577
|
next.id,
|
|
@@ -584,7 +584,7 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
584
584
|
}, delayMs)
|
|
585
585
|
);
|
|
586
586
|
}, [states, steps, workflow]);
|
|
587
|
-
return
|
|
587
|
+
return chunkRYYYHPFU_cjs.useWorkflowView({
|
|
588
588
|
steps,
|
|
589
589
|
states,
|
|
590
590
|
inputs,
|
|
@@ -4997,7 +4997,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
4997
4997
|
}
|
|
4998
4998
|
const typed = name?.trim();
|
|
4999
4999
|
if (workflow.options?.agent === false) {
|
|
5000
|
-
const message =
|
|
5000
|
+
const message = chunkRYYYHPFU_cjs.composeWorkflowPrompt(workflow, inputs, context);
|
|
5001
5001
|
return { name: typed || message, prompt: "", skill_ref: null, skill_inputs: null };
|
|
5002
5002
|
}
|
|
5003
5003
|
const derived = typed || deriveWorkflowName(workflow, inputs);
|
|
@@ -5011,7 +5011,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
5011
5011
|
}
|
|
5012
5012
|
return {
|
|
5013
5013
|
name: derived,
|
|
5014
|
-
prompt:
|
|
5014
|
+
prompt: chunkRYYYHPFU_cjs.composeWorkflowPrompt(workflow, inputs, context),
|
|
5015
5015
|
skill_ref: null,
|
|
5016
5016
|
// The files a run is bound to travel in the saved inputs, whatever the template: the server binds
|
|
5017
5017
|
// the run to the ids listed under any input's `documents`.
|
|
@@ -6270,15 +6270,15 @@ function TaskActivityTimeline({
|
|
|
6270
6270
|
case "step_skipped":
|
|
6271
6271
|
return { headline: "Step skipped" };
|
|
6272
6272
|
case "step_waiting": {
|
|
6273
|
-
const documents =
|
|
6273
|
+
const documents = chunkRYYYHPFU_cjs.eventWaitingDocuments(detail);
|
|
6274
6274
|
return {
|
|
6275
|
-
headline: documents ?
|
|
6275
|
+
headline: documents ? chunkRYYYHPFU_cjs.waitingForDocumentsText(documents.length) : "Waiting on people"
|
|
6276
6276
|
};
|
|
6277
6277
|
}
|
|
6278
6278
|
case "step_progress": {
|
|
6279
|
-
const documents =
|
|
6279
|
+
const documents = chunkRYYYHPFU_cjs.eventWaitingDocuments(detail);
|
|
6280
6280
|
return {
|
|
6281
|
-
headline: documents ?
|
|
6281
|
+
headline: documents ? chunkRYYYHPFU_cjs.waitingForDocumentsText(documents.length) : detail.signed ? "Signed" : "Step moved on"
|
|
6282
6282
|
};
|
|
6283
6283
|
}
|
|
6284
6284
|
case "step_sent_back":
|
|
@@ -6517,7 +6517,7 @@ function groupThreadActivity(steps, items) {
|
|
|
6517
6517
|
continue;
|
|
6518
6518
|
}
|
|
6519
6519
|
if (current === void 0) out.before.push(item);
|
|
6520
|
-
else if (
|
|
6520
|
+
else if (chunkRYYYHPFU_cjs.isRunFinished(steps, states)) out.after.push(item);
|
|
6521
6521
|
else {
|
|
6522
6522
|
const status = states[current]?.status;
|
|
6523
6523
|
const at = status === "done" || status === "skipped" ? steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? ""))?.id ?? current : current;
|
|
@@ -6635,13 +6635,13 @@ function WorkflowThreadStrip({
|
|
|
6635
6635
|
const chevron = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "size-3 shrink-0 text-muted-foreground" });
|
|
6636
6636
|
const [selected, setSelected] = react.useState(null);
|
|
6637
6637
|
const [open, setOpen] = react.useState(null);
|
|
6638
|
-
const phaseOf = (id) =>
|
|
6638
|
+
const phaseOf = (id) => chunkRYYYHPFU_cjs.stepPhase(steps, states, id);
|
|
6639
6639
|
const iconOf = (step) => step.icon && renderIcon ? renderIcon(step.icon) : void 0;
|
|
6640
6640
|
const waitingOf = (id) => {
|
|
6641
6641
|
const step = steps.find((s) => s.id === id);
|
|
6642
6642
|
const phase = phaseOf(id);
|
|
6643
|
-
const documents =
|
|
6644
|
-
if (documents.length) return
|
|
6643
|
+
const documents = chunkRYYYHPFU_cjs.waitingDocuments(states[id]);
|
|
6644
|
+
if (documents.length) return chunkRYYYHPFU_cjs.waitingForDocumentsText(documents.length);
|
|
6645
6645
|
const name = step && (phase === "ready" || phase === "waiting") ? assigneeOf?.(step) : void 0;
|
|
6646
6646
|
return name ? l.waitingFor.replace("{name}", name) : void 0;
|
|
6647
6647
|
};
|
|
@@ -6656,14 +6656,14 @@ function WorkflowThreadStrip({
|
|
|
6656
6656
|
"button",
|
|
6657
6657
|
{
|
|
6658
6658
|
type: "button",
|
|
6659
|
-
className: ui.cn(
|
|
6659
|
+
className: ui.cn(chunkRYYYHPFU_cjs.STEP_PILL, "py-0.5", chunkRYYYHPFU_cjs.stepPillTone(phase, isCurrent)),
|
|
6660
6660
|
"aria-current": isCurrent ? "step" : void 0,
|
|
6661
6661
|
title: waiting ? `${step.title} \xB7 ${waiting}` : step.title,
|
|
6662
6662
|
"data-phase": phase,
|
|
6663
6663
|
"data-testid": `workflow-thread-step-${step.id}`,
|
|
6664
6664
|
children: [
|
|
6665
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6666
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: ui.cn(
|
|
6665
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkRYYYHPFU_cjs.PhaseMark, { phase, icon: iconOf(step) }),
|
|
6666
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: isCurrent ? chunkRYYYHPFU_cjs.STEP_LABEL_CURRENT : ui.cn(chunkRYYYHPFU_cjs.STEP_LABEL, chunkRYYYHPFU_cjs.STEP_LABEL_MAX), children: step.title }),
|
|
6667
6667
|
sentBack && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6668
6668
|
lucideReact.CornerUpLeft,
|
|
6669
6669
|
{
|
|
@@ -6675,7 +6675,7 @@ function WorkflowThreadStrip({
|
|
|
6675
6675
|
assignee && isCurrent && !narrow && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6676
6676
|
"span",
|
|
6677
6677
|
{
|
|
6678
|
-
className: ui.cn(
|
|
6678
|
+
className: ui.cn(chunkRYYYHPFU_cjs.STEP_EXTRA, "flex max-w-[12rem] items-center gap-0.5"),
|
|
6679
6679
|
title: waiting,
|
|
6680
6680
|
"data-testid": `workflow-thread-step-${step.id}-assignee`,
|
|
6681
6681
|
children: [
|
|
@@ -6734,9 +6734,9 @@ function WorkflowThreadStrip({
|
|
|
6734
6734
|
strays.map((s) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "flex shrink-0 items-center gap-1", children: /* @__PURE__ */ jsxRuntime.jsx(SignalPill, { signal: s, l }) }, `${s.step}-${s.signal}`))
|
|
6735
6735
|
] }) : null;
|
|
6736
6736
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("min-w-0 flex-1", className), "data-testid": "workflow-thread-strip", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6737
|
-
|
|
6737
|
+
chunkRYYYHPFU_cjs.StepBarFrame,
|
|
6738
6738
|
{
|
|
6739
|
-
levels:
|
|
6739
|
+
levels: chunkRYYYHPFU_cjs.stepLevels(steps),
|
|
6740
6740
|
phaseOf,
|
|
6741
6741
|
current: selected,
|
|
6742
6742
|
onSelect: (id) => {
|
|
@@ -6821,10 +6821,10 @@ function compactThreadActivity(events) {
|
|
|
6821
6821
|
const count = Math.max(1, entry.recipients.length);
|
|
6822
6822
|
entry.label = `Notified ${count} ${count === 1 ? "user" : "users"}`;
|
|
6823
6823
|
} else if (STEP_LABELS[event.kind]) {
|
|
6824
|
-
const documents =
|
|
6824
|
+
const documents = chunkRYYYHPFU_cjs.eventWaitingDocuments(event.detail);
|
|
6825
6825
|
result.push({
|
|
6826
6826
|
event,
|
|
6827
|
-
label: documents ?
|
|
6827
|
+
label: documents ? chunkRYYYHPFU_cjs.waitingForDocumentsText(documents.length) : STEP_LABELS[event.kind],
|
|
6828
6828
|
recipients: []
|
|
6829
6829
|
});
|
|
6830
6830
|
} else if (["artifact_created", "artifact_edited", "document_added", "document_removed"].includes(
|
|
@@ -7223,7 +7223,7 @@ function defaultTaskComposerValues(workflows, initial) {
|
|
|
7223
7223
|
return {
|
|
7224
7224
|
assignee: "me",
|
|
7225
7225
|
workflowId,
|
|
7226
|
-
inputs: workflow ? { ...
|
|
7226
|
+
inputs: workflow ? { ...chunkRYYYHPFU_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
|
|
7227
7227
|
when: "manual",
|
|
7228
7228
|
runAt: "",
|
|
7229
7229
|
rrule: "",
|
|
@@ -7332,7 +7332,7 @@ function WorkflowComposer({
|
|
|
7332
7332
|
return !docs?.length;
|
|
7333
7333
|
})
|
|
7334
7334
|
);
|
|
7335
|
-
const whatMissing = !workflow || Object.keys(
|
|
7335
|
+
const whatMissing = !workflow || Object.keys(chunkRYYYHPFU_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
|
|
7336
7336
|
const runAtPast = values.when === "once" && values.runAt !== "" && values.runAt !== initialValues?.runAt && new Date(values.runAt).getTime() <= Date.now();
|
|
7337
7337
|
const whenMissing = missingWhen(values, runAtPast);
|
|
7338
7338
|
const scheduled = values.when !== "now" && values.when !== "manual";
|
|
@@ -7344,7 +7344,7 @@ function WorkflowComposer({
|
|
|
7344
7344
|
setValues({
|
|
7345
7345
|
...values,
|
|
7346
7346
|
workflowId: next,
|
|
7347
|
-
inputs: def ?
|
|
7347
|
+
inputs: def ? chunkRYYYHPFU_cjs.defaultInputs(def) : {},
|
|
7348
7348
|
...def?.documentAction ? { access: "standing" } : {}
|
|
7349
7349
|
});
|
|
7350
7350
|
};
|
|
@@ -7482,7 +7482,7 @@ function WorkflowComposer({
|
|
|
7482
7482
|
}
|
|
7483
7483
|
),
|
|
7484
7484
|
!noFiles && workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7485
|
-
|
|
7485
|
+
chunkRYYYHPFU_cjs.SchemaForm,
|
|
7486
7486
|
{
|
|
7487
7487
|
fields,
|
|
7488
7488
|
values: values.inputs,
|
|
@@ -7921,7 +7921,7 @@ function WorkTaskComposer({
|
|
|
7921
7921
|
}, [open]);
|
|
7922
7922
|
const workflow = workflows.find((w) => w.id === values.workflowId);
|
|
7923
7923
|
const fields = workflow?.inputs ?? [];
|
|
7924
|
-
const errors = workflow ?
|
|
7924
|
+
const errors = workflow ? chunkRYYYHPFU_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
|
|
7925
7925
|
const hasWork = configOpen && Boolean(workflow) && Object.keys(errors).length === 0;
|
|
7926
7926
|
const unattended = hasWork && values.when !== "now" && values.when !== "manual";
|
|
7927
7927
|
const canConfigure = !isEdit || seed.assignee === "agent";
|
|
@@ -7929,7 +7929,7 @@ function WorkTaskComposer({
|
|
|
7929
7929
|
const set = (key, value) => setValues({ ...values, [key]: value });
|
|
7930
7930
|
const pickWorkflow = (id2) => {
|
|
7931
7931
|
const next = workflows.find((w) => w.id === id2);
|
|
7932
|
-
setValues({ ...values, workflowId: id2, inputs: next ?
|
|
7932
|
+
setValues({ ...values, workflowId: id2, inputs: next ? chunkRYYYHPFU_cjs.defaultInputs(next) : {} });
|
|
7933
7933
|
};
|
|
7934
7934
|
const openConfigure = () => {
|
|
7935
7935
|
setConfigOpen(true);
|
|
@@ -8115,7 +8115,7 @@ function WorkTaskComposer({
|
|
|
8115
8115
|
)
|
|
8116
8116
|
] }),
|
|
8117
8117
|
workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8118
|
-
|
|
8118
|
+
chunkRYYYHPFU_cjs.SchemaForm,
|
|
8119
8119
|
{
|
|
8120
8120
|
fields,
|
|
8121
8121
|
values: values.inputs,
|
|
@@ -10298,5 +10298,5 @@ exports.workflowToComposerValues = workflowToComposerValues;
|
|
|
10298
10298
|
exports.workflowToSkillMarkdown = workflowToSkillMarkdown;
|
|
10299
10299
|
exports.workflowTriggerType = workflowTriggerType;
|
|
10300
10300
|
exports.workflowWhen = workflowWhen;
|
|
10301
|
-
//# sourceMappingURL=chunk-
|
|
10302
|
-
//# sourceMappingURL=chunk-
|
|
10301
|
+
//# sourceMappingURL=chunk-XA5S4776.cjs.map
|
|
10302
|
+
//# sourceMappingURL=chunk-XA5S4776.cjs.map
|