@arbidocs/blocks 0.4.84 → 0.4.85
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/MailBodyEditor-5PIQLYVY.js +217 -0
- package/dist/MailBodyEditor-5PIQLYVY.js.map +1 -0
- package/dist/MailBodyEditor-D7MGJMLH.cjs +223 -0
- package/dist/MailBodyEditor-D7MGJMLH.cjs.map +1 -0
- package/dist/agents/index.cjs +281 -280
- package/dist/agents/index.js +6 -5
- package/dist/agents/workflows/StepBarFrame.d.ts +3 -1
- package/dist/agents/workflows/WorkflowRunner.d.ts +10 -1
- package/dist/agents/workflows/run.d.ts +24 -3
- package/dist/agents/workflows/stepWindow.d.ts +4 -2
- package/dist/agents/workflows/types.d.ts +5 -0
- package/dist/agents/workflows/useWorkflowView.d.ts +16 -1
- package/dist/chat/index.cjs +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/chunk-3R6XBYL7.cjs +576 -0
- package/dist/chunk-3R6XBYL7.cjs.map +1 -0
- package/dist/{chunk-CKB64Z4R.js → chunk-4XJZ6AAY.js} +6 -245
- package/dist/chunk-4XJZ6AAY.js.map +1 -0
- package/dist/{chunk-SB5ZKOYN.js → chunk-7C35WXYB.js} +4 -63
- package/dist/chunk-7C35WXYB.js.map +1 -0
- package/dist/chunk-7RJTEWYM.js +362 -0
- package/dist/chunk-7RJTEWYM.js.map +1 -0
- package/dist/chunk-AFSOUS5X.cjs +253 -0
- package/dist/chunk-AFSOUS5X.cjs.map +1 -0
- package/dist/{chunk-F4RUCUXF.cjs → chunk-C2HRZSAT.cjs} +2 -63
- package/dist/chunk-C2HRZSAT.cjs.map +1 -0
- package/dist/{chunk-RX35SMPR.js → chunk-FHOZMT5P.js} +7 -6
- package/dist/chunk-FHOZMT5P.js.map +1 -0
- package/dist/{chunk-CONIA2ZA.js → chunk-KHY4PYU7.js} +246 -146
- package/dist/chunk-KHY4PYU7.js.map +1 -0
- package/dist/chunk-LGX6UFYG.js +557 -0
- package/dist/chunk-LGX6UFYG.js.map +1 -0
- package/dist/chunk-O4YPVYPO.cjs +373 -0
- package/dist/chunk-O4YPVYPO.cjs.map +1 -0
- package/dist/chunk-R26OHONI.js +250 -0
- package/dist/chunk-R26OHONI.js.map +1 -0
- package/dist/{chunk-RYYYHPFU.cjs → chunk-RZUMQM7W.cjs} +246 -146
- package/dist/chunk-RZUMQM7W.cjs.map +1 -0
- package/dist/{chunk-YJQVLVBJ.cjs → chunk-S5HZBXZA.cjs} +2 -243
- package/dist/chunk-S5HZBXZA.cjs.map +1 -0
- package/dist/{chunk-ZQYE7J3J.cjs → chunk-WRSBM6QN.cjs} +332 -94
- package/dist/chunk-WRSBM6QN.cjs.map +1 -0
- package/dist/{chunk-RSKSXEPW.js → chunk-X23U6QEJ.js} +324 -88
- package/dist/chunk-X23U6QEJ.js.map +1 -0
- package/dist/{chunk-XA5S4776.cjs → chunk-Z7YUCYI6.cjs} +51 -50
- package/dist/chunk-Z7YUCYI6.cjs.map +1 -0
- package/dist/collaboration/index.cjs +100 -49
- package/dist/collaboration/index.js +4 -1
- package/dist/collaboration/mail/MailBodyEditor.d.ts +7 -0
- package/dist/collaboration/mail/MailDeliveryList.d.ts +8 -0
- package/dist/collaboration/mail/MailDocumentPicker.d.ts +15 -0
- package/dist/collaboration/mail/MailGrid.d.ts +17 -0
- package/dist/collaboration/mail/MailMessageView.d.ts +27 -0
- package/dist/collaboration/mail/PlainMailBodyEditor.d.ts +12 -0
- package/dist/collaboration/mail/index.d.ts +6 -0
- package/dist/collaboration/mail/mailCompose.d.ts +24 -0
- package/dist/connect/index.cjs +1647 -65
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +2 -1
- package/dist/connect/index.js +1631 -55
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedTagTable.d.ts +32 -0
- package/dist/connection/mail/ConnectedMailAccounts.d.ts +21 -0
- package/dist/connection/mail/ConnectedMailComposer.d.ts +40 -0
- package/dist/connection/mail/ConnectedMailSetup.d.ts +16 -0
- package/dist/connection/mail/ConnectedMailbox.d.ts +65 -0
- package/dist/connection/mail/MailComposerForm.d.ts +25 -0
- package/dist/connection/mail/attachments.d.ts +13 -0
- package/dist/connection/mail/index.d.ts +6 -0
- package/dist/connection/mail/mailbox.d.ts +6 -0
- package/dist/connection/mail/types.d.ts +92 -0
- package/dist/connection/useConnectedWorkNotifications.d.ts +6 -0
- package/dist/connection/useWorkflowThread.d.ts +7 -2
- package/dist/facts/index.cjs +2 -2
- package/dist/facts/index.js +2 -2
- package/dist/files/index.cjs +47 -367
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +10 -360
- package/dist/files/index.js.map +1 -1
- package/dist/index.cjs +450 -391
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -18
- package/dist/index.js.map +1 -1
- package/dist/settings/index.cjs +10 -9
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.js +2 -1
- package/dist/settings/index.js.map +1 -1
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/tags/TagColumnsEditor.d.ts +34 -0
- package/dist/tags/TagDetail.d.ts +13 -11
- package/dist/tags/TagTable.d.ts +99 -0
- package/dist/tags/TagsNav.d.ts +2 -2
- package/dist/tags/index.d.ts +7 -5
- package/dist/tags/{tagMatrixDocx.d.ts → tagTableDocx.d.ts} +12 -12
- package/dist/tags/tagTableModel.d.ts +47 -0
- package/dist/workflow-canvas/index.cjs +49 -48
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.js +6 -5
- package/dist/workflow-canvas/index.js.map +1 -1
- package/package.json +29 -4
- package/dist/chunk-CKB64Z4R.js.map +0 -1
- package/dist/chunk-CONIA2ZA.js.map +0 -1
- package/dist/chunk-F4RUCUXF.cjs.map +0 -1
- package/dist/chunk-RSKSXEPW.js.map +0 -1
- package/dist/chunk-RX35SMPR.js.map +0 -1
- package/dist/chunk-RYYYHPFU.cjs.map +0 -1
- package/dist/chunk-SB5ZKOYN.js.map +0 -1
- package/dist/chunk-XA5S4776.cjs.map +0 -1
- package/dist/chunk-YJQVLVBJ.cjs.map +0 -1
- package/dist/chunk-ZQYE7J3J.cjs.map +0 -1
- package/dist/connection/ConnectedTagMatrix.d.ts +0 -23
- package/dist/tags/TagMatrix.d.ts +0 -87
- package/dist/tags/tagMatrixModel.d.ts +0 -43
|
@@ -2,27 +2,28 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkMUMH3Z6K_cjs = require('../chunk-MUMH3Z6K.cjs');
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
5
|
+
var chunkZ7YUCYI6_cjs = require('../chunk-Z7YUCYI6.cjs');
|
|
6
|
+
require('../chunk-S5HZBXZA.cjs');
|
|
7
7
|
require('../chunk-ZW6FPIFC.cjs');
|
|
8
|
-
var
|
|
8
|
+
var chunkRZUMQM7W_cjs = require('../chunk-RZUMQM7W.cjs');
|
|
9
|
+
require('../chunk-AFSOUS5X.cjs');
|
|
9
10
|
require('../chunk-7RGLTF76.cjs');
|
|
10
11
|
require('../chunk-3AFWGEDJ.cjs');
|
|
11
12
|
require('../chunk-VFUWWH52.cjs');
|
|
12
13
|
require('../chunk-DETZZBG2.cjs');
|
|
13
14
|
require('../chunk-V4ISCZJ7.cjs');
|
|
14
15
|
require('../chunk-2EI7NCUA.cjs');
|
|
15
|
-
require('../chunk-IXALYQT7.cjs');
|
|
16
16
|
require('../chunk-Z5VUZ6YD.cjs');
|
|
17
17
|
require('../chunk-7D737FLE.cjs');
|
|
18
18
|
require('../chunk-OB5F4577.cjs');
|
|
19
19
|
require('../chunk-B4SRYJLM.cjs');
|
|
20
20
|
require('../chunk-7UTB4PHM.cjs');
|
|
21
|
-
require('../chunk-FX3K6LNZ.cjs');
|
|
22
21
|
require('../chunk-PPCATBOY.cjs');
|
|
23
22
|
require('../chunk-C54XEN5T.cjs');
|
|
24
23
|
require('../chunk-KDG6FER6.cjs');
|
|
25
24
|
require('../chunk-ULWRNGGE.cjs');
|
|
25
|
+
require('../chunk-IXALYQT7.cjs');
|
|
26
|
+
require('../chunk-FX3K6LNZ.cjs');
|
|
26
27
|
require('../chunk-MHVNT4J3.cjs');
|
|
27
28
|
require('../chunk-DES3K4SD.cjs');
|
|
28
29
|
var react = require('react');
|
|
@@ -58,11 +59,11 @@ function withSteps(workflow, steps, layout) {
|
|
|
58
59
|
const run = workflow.run.kind === "steps" ? workflow.run : { kind: "steps", steps: [] };
|
|
59
60
|
return {
|
|
60
61
|
...workflow,
|
|
61
|
-
run: { ...run, steps:
|
|
62
|
+
run: { ...run, steps: chunkRZUMQM7W_cjs.orderSteps(steps), layout: layout ?? run.layout }
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
65
|
var layoutOf = (workflow) => workflow.run.kind === "steps" && workflow.run.layout || {};
|
|
65
|
-
var explicit = (steps) => steps.map((s) => ({ ...s, after:
|
|
66
|
+
var explicit = (steps) => steps.map((s) => ({ ...s, after: chunkRZUMQM7W_cjs.stepDependencies(steps, s.id) }));
|
|
66
67
|
function stepIdFor(steps, title) {
|
|
67
68
|
const base = title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").replace(/^[^a-z]+/, "") || "step";
|
|
68
69
|
const taken = new Set(steps.map((s) => s.id));
|
|
@@ -109,7 +110,7 @@ function blankStep(kind, id, title) {
|
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
function addStep(workflow, kind, options = {}) {
|
|
112
|
-
const steps = explicit(
|
|
113
|
+
const steps = explicit(chunkRZUMQM7W_cjs.workflowSteps(workflow));
|
|
113
114
|
const title = options.title ?? DEFAULT_TITLES[kind];
|
|
114
115
|
const id = stepIdFor(steps, title);
|
|
115
116
|
const step = { ...blankStep(kind, id, title), after: options.after ? [options.after] : [] };
|
|
@@ -118,7 +119,7 @@ function addStep(workflow, kind, options = {}) {
|
|
|
118
119
|
return { workflow: withSteps(workflow, [...steps, step], layout), id };
|
|
119
120
|
}
|
|
120
121
|
function removeStep(workflow, id) {
|
|
121
|
-
const steps = explicit(
|
|
122
|
+
const steps = explicit(chunkRZUMQM7W_cjs.workflowSteps(workflow));
|
|
122
123
|
const removed = steps.find((s) => s.id === id);
|
|
123
124
|
if (!removed) return workflow;
|
|
124
125
|
const bridged = steps.filter((s) => s.id !== id).map(
|
|
@@ -131,8 +132,8 @@ function removeStep(workflow, id) {
|
|
|
131
132
|
return withSteps(workflow, bridged, layout);
|
|
132
133
|
}
|
|
133
134
|
function connectSteps(workflow, from, to) {
|
|
134
|
-
const steps = explicit(
|
|
135
|
-
if (from === to || !steps.some((s) => s.id === from) ||
|
|
135
|
+
const steps = explicit(chunkRZUMQM7W_cjs.workflowSteps(workflow));
|
|
136
|
+
if (from === to || !steps.some((s) => s.id === from) || chunkRZUMQM7W_cjs.dependsOn(steps, from, to)) {
|
|
136
137
|
return workflow;
|
|
137
138
|
}
|
|
138
139
|
return withSteps(
|
|
@@ -142,16 +143,16 @@ function connectSteps(workflow, from, to) {
|
|
|
142
143
|
)
|
|
143
144
|
);
|
|
144
145
|
}
|
|
145
|
-
var wouldCycle = (workflow, from, to) => from === to ||
|
|
146
|
+
var wouldCycle = (workflow, from, to) => from === to || chunkRZUMQM7W_cjs.dependsOn(chunkRZUMQM7W_cjs.workflowSteps(workflow), from, to);
|
|
146
147
|
function disconnectSteps(workflow, from, to) {
|
|
147
|
-
const steps = explicit(
|
|
148
|
+
const steps = explicit(chunkRZUMQM7W_cjs.workflowSteps(workflow));
|
|
148
149
|
return withSteps(
|
|
149
150
|
workflow,
|
|
150
151
|
steps.map((s) => s.id === to ? { ...s, after: (s.after ?? []).filter((d) => d !== from) } : s)
|
|
151
152
|
);
|
|
152
153
|
}
|
|
153
154
|
function updateStep(workflow, id, patch) {
|
|
154
|
-
const steps = explicit(
|
|
155
|
+
const steps = explicit(chunkRZUMQM7W_cjs.workflowSteps(workflow));
|
|
155
156
|
return withSteps(
|
|
156
157
|
workflow,
|
|
157
158
|
steps.map(
|
|
@@ -165,7 +166,7 @@ var renameIn = (text, from, to) => text.replace(
|
|
|
165
166
|
);
|
|
166
167
|
function renameInput(workflow, from, to) {
|
|
167
168
|
if (from === to) return workflow;
|
|
168
|
-
const steps =
|
|
169
|
+
const steps = chunkRZUMQM7W_cjs.workflowSteps(workflow).map((s) => {
|
|
169
170
|
if (s.kind === "agent")
|
|
170
171
|
return {
|
|
171
172
|
...s,
|
|
@@ -214,13 +215,13 @@ function renameInput(workflow, from, to) {
|
|
|
214
215
|
var renamePerson = (a, from, to) => "input" in a && a.input === from ? { input: to } : a;
|
|
215
216
|
var renameRef = (r, from, to) => "input" in r && r.input === from ? { input: to } : r;
|
|
216
217
|
function moveStep(workflow, id, position) {
|
|
217
|
-
return withSteps(workflow,
|
|
218
|
+
return withSteps(workflow, chunkRZUMQM7W_cjs.workflowSteps(workflow), { ...layoutOf(workflow), [id]: position });
|
|
218
219
|
}
|
|
219
220
|
var COLUMN = 300;
|
|
220
221
|
var ROW = 140;
|
|
221
222
|
function autoLayout(steps) {
|
|
222
223
|
const layout = {};
|
|
223
|
-
|
|
224
|
+
chunkRZUMQM7W_cjs.stepLevels(steps).forEach(
|
|
224
225
|
(level, x) => level.forEach((s, y) => {
|
|
225
226
|
layout[s.id] = { x: x * COLUMN, y: (y - (level.length - 1) / 2) * ROW };
|
|
226
227
|
})
|
|
@@ -228,7 +229,7 @@ function autoLayout(steps) {
|
|
|
228
229
|
return layout;
|
|
229
230
|
}
|
|
230
231
|
function layoutWithDefaults(workflow) {
|
|
231
|
-
const auto = autoLayout(
|
|
232
|
+
const auto = autoLayout(chunkRZUMQM7W_cjs.workflowSteps(workflow));
|
|
232
233
|
return { ...auto, ...layoutOf(workflow) };
|
|
233
234
|
}
|
|
234
235
|
var DEFAULT_SIGNALS_EDITOR_LABELS = {
|
|
@@ -325,9 +326,9 @@ function SignalsEditor({
|
|
|
325
326
|
{
|
|
326
327
|
className: ui.cn(
|
|
327
328
|
"space-y-1.5 rounded-md border p-2",
|
|
328
|
-
|
|
329
|
+
chunkRZUMQM7W_cjs.isIncompleteSignal(signal) ? "border-destructive/50" : "border-border"
|
|
329
330
|
),
|
|
330
|
-
"data-incomplete":
|
|
331
|
+
"data-incomplete": chunkRZUMQM7W_cjs.isIncompleteSignal(signal) || void 0,
|
|
331
332
|
"data-testid": `${testId}-${i}`,
|
|
332
333
|
children: [
|
|
333
334
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1042,7 +1043,7 @@ function StepInspector({
|
|
|
1042
1043
|
testId = "step-inspector"
|
|
1043
1044
|
}) {
|
|
1044
1045
|
const l = { ...DEFAULT_STEP_INSPECTOR_LABELS, ...labels };
|
|
1045
|
-
const steps =
|
|
1046
|
+
const steps = chunkRZUMQM7W_cjs.workflowSteps(workflow);
|
|
1046
1047
|
const step = steps.find((s) => s.id === stepId);
|
|
1047
1048
|
const run = workflow.run.kind === "steps" ? workflow.run : void 0;
|
|
1048
1049
|
if (!step || !run) {
|
|
@@ -1069,8 +1070,8 @@ function StepInspector({
|
|
|
1069
1070
|
const patch = (p) => onChange(updateStep(workflow, step.id, p));
|
|
1070
1071
|
const al = { ...DEFAULT_STEP_ACTION_SETTINGS_LABELS, ...actionLabels };
|
|
1071
1072
|
const ctx = {
|
|
1072
|
-
earlier:
|
|
1073
|
-
fields:
|
|
1073
|
+
earlier: chunkRZUMQM7W_cjs.upstreamSteps(steps, step.id),
|
|
1074
|
+
fields: chunkRZUMQM7W_cjs.runFields(workflow),
|
|
1074
1075
|
people,
|
|
1075
1076
|
tags,
|
|
1076
1077
|
documents
|
|
@@ -1091,7 +1092,7 @@ function StepInspector({
|
|
|
1091
1092
|
)
|
|
1092
1093
|
);
|
|
1093
1094
|
};
|
|
1094
|
-
const deps =
|
|
1095
|
+
const deps = chunkRZUMQM7W_cjs.stepDependencies(steps, step.id);
|
|
1095
1096
|
const titleOf = (id) => steps.find((s) => s.id === id)?.title ?? id;
|
|
1096
1097
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", "data-testid": `${testId}-step`, children: [
|
|
1097
1098
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
@@ -1171,7 +1172,7 @@ function StepInspector({
|
|
|
1171
1172
|
{
|
|
1172
1173
|
step,
|
|
1173
1174
|
workflows,
|
|
1174
|
-
fields:
|
|
1175
|
+
fields: chunkRZUMQM7W_cjs.runFields(workflow).map((f) => f.name),
|
|
1175
1176
|
patch,
|
|
1176
1177
|
l,
|
|
1177
1178
|
testId
|
|
@@ -1231,7 +1232,7 @@ function StepInspector({
|
|
|
1231
1232
|
testId: `${testId}-review-grid`
|
|
1232
1233
|
}
|
|
1233
1234
|
),
|
|
1234
|
-
|
|
1235
|
+
chunkRZUMQM7W_cjs.canAssign(step) && /* @__PURE__ */ jsxRuntime.jsx(AssigneeSettings, { step, patch, ctx, l: al, testId }),
|
|
1235
1236
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1236
1237
|
SignalsEditor,
|
|
1237
1238
|
{
|
|
@@ -1487,7 +1488,7 @@ function triggerFields(trigger, clearOthers) {
|
|
|
1487
1488
|
return {
|
|
1488
1489
|
timezone: trigger.timezone,
|
|
1489
1490
|
rrule: trigger.start === "repeat" ? trigger.rrule.trim() : none,
|
|
1490
|
-
run_at: trigger.start === "once" ?
|
|
1491
|
+
run_at: trigger.start === "once" ? chunkZ7YUCYI6_cjs.localInputToIso(trigger.runAt) : none,
|
|
1491
1492
|
event_kind: trigger.start === "event" ? trigger.eventKind.trim() : none,
|
|
1492
1493
|
// A step signal is `workflow_signal` narrowed to one signal name.
|
|
1493
1494
|
event_filter: filter ?? none,
|
|
@@ -1503,7 +1504,7 @@ function plan(value, options) {
|
|
|
1503
1504
|
criteria: [],
|
|
1504
1505
|
max_passes: 3,
|
|
1505
1506
|
documents: [],
|
|
1506
|
-
steps:
|
|
1507
|
+
steps: chunkRZUMQM7W_cjs.toPlanSteps(value.workflow, options)
|
|
1507
1508
|
};
|
|
1508
1509
|
}
|
|
1509
1510
|
function builderToWorkflowRequest(value, workspaceId, options = {}) {
|
|
@@ -1538,7 +1539,7 @@ function builderToWorkflowUpdate(value, options = {}) {
|
|
|
1538
1539
|
}
|
|
1539
1540
|
function workflowRecordToBuilder(record) {
|
|
1540
1541
|
const planned = record.plan?.steps ?? [];
|
|
1541
|
-
const steps = planned.length ?
|
|
1542
|
+
const steps = planned.length ? chunkRZUMQM7W_cjs.fromPlanSteps(planned) : record.prompt || record.skill_ref ? [
|
|
1542
1543
|
{
|
|
1543
1544
|
id: "work",
|
|
1544
1545
|
kind: "agent",
|
|
@@ -1546,7 +1547,7 @@ function workflowRecordToBuilder(record) {
|
|
|
1546
1547
|
...record.skill_ref ? { workflow: record.skill_ref } : { run: { kind: "prompt", promptTemplate: record.prompt } }
|
|
1547
1548
|
}
|
|
1548
1549
|
] : [];
|
|
1549
|
-
const when =
|
|
1550
|
+
const when = chunkZ7YUCYI6_cjs.workflowWhen(record);
|
|
1550
1551
|
return {
|
|
1551
1552
|
workflow: {
|
|
1552
1553
|
id: record.external_id,
|
|
@@ -1555,12 +1556,12 @@ function workflowRecordToBuilder(record) {
|
|
|
1555
1556
|
inputs: [],
|
|
1556
1557
|
landing: "chat",
|
|
1557
1558
|
schedulable: false,
|
|
1558
|
-
run: { kind: "steps", steps, layout:
|
|
1559
|
+
run: { kind: "steps", steps, layout: chunkRZUMQM7W_cjs.layoutFromPlanSteps(planned ?? []) }
|
|
1559
1560
|
},
|
|
1560
1561
|
trigger: {
|
|
1561
1562
|
...DEFAULT_WORKFLOW_TRIGGER,
|
|
1562
1563
|
start: when === "now" ? "manual" : when,
|
|
1563
|
-
runAt:
|
|
1564
|
+
runAt: chunkZ7YUCYI6_cjs.isoToLocalInput(record.run_at),
|
|
1564
1565
|
rrule: record.rrule ?? "",
|
|
1565
1566
|
timezone: record.timezone || DEFAULT_WORKFLOW_TRIGGER.timezone,
|
|
1566
1567
|
eventKind: record.event_kind ?? "",
|
|
@@ -1616,7 +1617,7 @@ function triggerSummary(trigger, options = {}) {
|
|
|
1616
1617
|
case "once":
|
|
1617
1618
|
return trigger.runAt ? new Date(trigger.runAt).toLocaleString() : l.starts.once;
|
|
1618
1619
|
case "repeat":
|
|
1619
|
-
return trigger.rrule ?
|
|
1620
|
+
return trigger.rrule ? chunkZ7YUCYI6_cjs.describeRRule(trigger.rrule) : l.starts.repeat;
|
|
1620
1621
|
case "event":
|
|
1621
1622
|
if (isSignalTrigger(trigger))
|
|
1622
1623
|
return trigger.signal ? l.signalSummary.replace("{signal}", trigger.signal) : l.stepSignals;
|
|
@@ -1675,7 +1676,7 @@ function TriggerInspector({
|
|
|
1675
1676
|
}
|
|
1676
1677
|
)
|
|
1677
1678
|
] }),
|
|
1678
|
-
trigger.start === "repeat" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1679
|
+
trigger.start === "repeat" && /* @__PURE__ */ jsxRuntime.jsx(chunkZ7YUCYI6_cjs.RecurrenceBuilder, { rrule: trigger.rrule, onChange: (rrule) => set({ rrule }) }),
|
|
1679
1680
|
trigger.start === "event" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
1680
1681
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { className: "text-xs", children: l.event }),
|
|
1681
1682
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1727,7 +1728,7 @@ function TriggerInspector({
|
|
|
1727
1728
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
1728
1729
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { className: "text-xs", children: l.agent }),
|
|
1729
1730
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1730
|
-
|
|
1731
|
+
chunkZ7YUCYI6_cjs.AgentSelect,
|
|
1731
1732
|
{
|
|
1732
1733
|
agents,
|
|
1733
1734
|
value: trigger.agentId,
|
|
@@ -2037,12 +2038,12 @@ function WorkflowCanvas({
|
|
|
2037
2038
|
testId = "workflow-canvas"
|
|
2038
2039
|
}) {
|
|
2039
2040
|
const l = react.useMemo(() => ({ ...DEFAULT_WORKFLOW_CANVAS_LABELS, ...labels }), [labels]);
|
|
2040
|
-
const steps =
|
|
2041
|
+
const steps = chunkRZUMQM7W_cjs.workflowSteps(workflow);
|
|
2041
2042
|
const editable = !!onChange;
|
|
2042
2043
|
const built = react.useMemo(() => {
|
|
2043
2044
|
const layout = layoutWithDefaults(workflow);
|
|
2044
|
-
const all =
|
|
2045
|
-
const roots = all.filter((s) =>
|
|
2045
|
+
const all = chunkRZUMQM7W_cjs.workflowSteps(workflow);
|
|
2046
|
+
const roots = all.filter((s) => chunkRZUMQM7W_cjs.stepDependencies(all, s.id).length === 0);
|
|
2046
2047
|
const triggerNode = trigger ? [
|
|
2047
2048
|
{
|
|
2048
2049
|
id: TRIGGER_NODE,
|
|
@@ -2091,7 +2092,7 @@ function WorkflowCanvas({
|
|
|
2091
2092
|
react.useEffect(() => setNodes(built), [built]);
|
|
2092
2093
|
const edges = react.useMemo(
|
|
2093
2094
|
() => steps.flatMap((s) => {
|
|
2094
|
-
const deps =
|
|
2095
|
+
const deps = chunkRZUMQM7W_cjs.stepDependencies(steps, s.id);
|
|
2095
2096
|
const from = deps.length ? deps : trigger ? [TRIGGER_NODE] : [];
|
|
2096
2097
|
return from.map((d) => ({
|
|
2097
2098
|
id: `${d}->${s.id}`,
|
|
@@ -2342,12 +2343,12 @@ function WorkflowBuilder({
|
|
|
2342
2343
|
const [mode, setMode] = react.useState("design");
|
|
2343
2344
|
const [adding, setAdding] = react.useState(false);
|
|
2344
2345
|
const { workflow, trigger } = value;
|
|
2345
|
-
const steps =
|
|
2346
|
-
const problems =
|
|
2347
|
-
const missing =
|
|
2346
|
+
const steps = chunkRZUMQM7W_cjs.workflowSteps(workflow);
|
|
2347
|
+
const problems = chunkRZUMQM7W_cjs.validateWorkflowGraph(steps);
|
|
2348
|
+
const missing = chunkRZUMQM7W_cjs.stepConfigProblems(steps);
|
|
2348
2349
|
const nameOf = (id) => people.find((p) => p.value === id)?.label;
|
|
2349
|
-
const fields =
|
|
2350
|
-
const assigneeOf = (step) =>
|
|
2350
|
+
const fields = chunkRZUMQM7W_cjs.runFields(workflow);
|
|
2351
|
+
const assigneeOf = (step) => chunkRZUMQM7W_cjs.canAssign(step) ? chunkRZUMQM7W_cjs.assigneeName(step.assignee, { nameOf, fields }) : void 0;
|
|
2351
2352
|
const titles = react.useMemo(() => new Map(workflows.map((w) => [w.id, w.title])), [workflows]);
|
|
2352
2353
|
const setWorkflow = (next) => onChange({ ...value, workflow: next });
|
|
2353
2354
|
const addAfter = (from, kind) => {
|
|
@@ -2578,13 +2579,13 @@ function WorkflowPreview({
|
|
|
2578
2579
|
renderIcon,
|
|
2579
2580
|
testId
|
|
2580
2581
|
}) {
|
|
2581
|
-
const run =
|
|
2582
|
+
const run = chunkZ7YUCYI6_cjs.useWorkflowPreview(workflow, {
|
|
2582
2583
|
resolveWorkflow: (id) => workflows.find((w) => w.id === id),
|
|
2583
2584
|
compose,
|
|
2584
2585
|
answer
|
|
2585
2586
|
});
|
|
2586
2587
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2587
|
-
|
|
2588
|
+
chunkRZUMQM7W_cjs.WorkflowRunner,
|
|
2588
2589
|
{
|
|
2589
2590
|
workflow,
|
|
2590
2591
|
run,
|
|
@@ -2672,7 +2673,7 @@ function ConnectedWorkflowBuilder({
|
|
|
2672
2673
|
() => [
|
|
2673
2674
|
...hostWorkflows,
|
|
2674
2675
|
...(skills.data ?? []).map(
|
|
2675
|
-
(s) =>
|
|
2676
|
+
(s) => chunkRZUMQM7W_cjs.skillToWorkflow({
|
|
2676
2677
|
name: s.name,
|
|
2677
2678
|
slug: s.slug,
|
|
2678
2679
|
description: s.description,
|
|
@@ -2688,7 +2689,7 @@ function ConnectedWorkflowBuilder({
|
|
|
2688
2689
|
}));
|
|
2689
2690
|
const tasks = (conversations.data ?? []).filter((c) => c.status && c.status !== "done").map((c) => ({ value: c.external_id, label: c.title || c.external_id }));
|
|
2690
2691
|
const options = { resolveWorkflow: (wid) => workflows.find((w) => w.id === wid), compose };
|
|
2691
|
-
const problem = triggerProblem(value.trigger) ?? (
|
|
2692
|
+
const problem = triggerProblem(value.trigger) ?? (chunkRZUMQM7W_cjs.validateWorkflowGraph(chunkRZUMQM7W_cjs.workflowSteps(value.workflow)).length || chunkRZUMQM7W_cjs.stepConfigProblems(chunkRZUMQM7W_cjs.workflowSteps(value.workflow)).length ? "graph" : null);
|
|
2692
2693
|
const busy = !!pending || create.isPending || update.isPending || run.isPending;
|
|
2693
2694
|
const save = async () => {
|
|
2694
2695
|
if (!workspaceId) return void 0;
|