@elqnt/workflow 2.1.3 → 2.2.0

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.
Files changed (51) hide show
  1. package/README.md +6 -0
  2. package/SKILL.md +442 -0
  3. package/dist/api/index.d.mts +1 -1
  4. package/dist/api/index.d.ts +1 -1
  5. package/dist/api/index.js +3 -4
  6. package/dist/api/index.js.map +1 -1
  7. package/dist/api/index.mjs +1 -2
  8. package/dist/chunk-3GG6KTGJ.js +998 -0
  9. package/dist/chunk-3GG6KTGJ.js.map +1 -0
  10. package/dist/{chunk-UE4ZBFLG.mjs → chunk-4AUWFGQK.mjs} +1 -3
  11. package/dist/{chunk-UE4ZBFLG.mjs.map → chunk-4AUWFGQK.mjs.map} +1 -1
  12. package/dist/{chunk-H24IF5AA.js → chunk-6DV2LPSN.js} +2 -4
  13. package/dist/chunk-6DV2LPSN.js.map +1 -0
  14. package/dist/chunk-AXXQSYT7.mjs +998 -0
  15. package/dist/chunk-AXXQSYT7.mjs.map +1 -0
  16. package/dist/{chunk-YCEGKVXP.mjs → chunk-IY5JCMLA.mjs} +1 -3
  17. package/dist/{chunk-YCEGKVXP.mjs.map → chunk-IY5JCMLA.mjs.map} +1 -1
  18. package/dist/{chunk-JES2EBNO.js → chunk-YCO5IFZK.js} +2 -4
  19. package/dist/chunk-YCO5IFZK.js.map +1 -0
  20. package/dist/components/index.d.mts +245 -0
  21. package/dist/components/index.d.ts +245 -0
  22. package/dist/components/index.js +10 -0
  23. package/dist/components/index.js.map +1 -0
  24. package/dist/components/index.mjs +10 -0
  25. package/dist/components/index.mjs.map +1 -0
  26. package/dist/hooks/index.d.mts +106 -17
  27. package/dist/hooks/index.d.ts +106 -17
  28. package/dist/hooks/index.js +403 -5
  29. package/dist/hooks/index.js.map +1 -1
  30. package/dist/hooks/index.mjs +404 -6
  31. package/dist/hooks/index.mjs.map +1 -1
  32. package/dist/index.d.mts +6 -247
  33. package/dist/index.d.ts +6 -247
  34. package/dist/index.js +8 -1006
  35. package/dist/index.js.map +1 -1
  36. package/dist/index.mjs +5 -1003
  37. package/dist/index.mjs.map +1 -1
  38. package/dist/models/index.d.mts +1 -1
  39. package/dist/models/index.d.ts +1 -1
  40. package/dist/models/index.js +3 -4
  41. package/dist/models/index.js.map +1 -1
  42. package/dist/models/index.mjs +1 -2
  43. package/dist/{workflow-NznrS9yA.d.ts → workflow-DcJCCEND.d.mts} +1 -1
  44. package/dist/{workflow-NznrS9yA.d.mts → workflow-DcJCCEND.d.ts} +1 -1
  45. package/package.json +12 -6
  46. package/dist/chunk-F5G2ALFS.js +0 -391
  47. package/dist/chunk-F5G2ALFS.js.map +0 -1
  48. package/dist/chunk-H24IF5AA.js.map +0 -1
  49. package/dist/chunk-JES2EBNO.js.map +0 -1
  50. package/dist/chunk-TZA3EPTC.mjs +0 -391
  51. package/dist/chunk-TZA3EPTC.mjs.map +0 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
+ var _chunk3GG6KTGJjs = require('./chunk-3GG6KTGJ.js');
4
5
 
5
6
 
6
- var _chunkF5G2ALFSjs = require('./chunk-F5G2ALFS.js');
7
7
 
8
8
 
9
9
 
@@ -18,9 +18,9 @@ var _chunkF5G2ALFSjs = require('./chunk-F5G2ALFS.js');
18
18
 
19
19
 
20
20
 
21
+ var _chunkYCO5IFZKjs = require('./chunk-YCO5IFZK.js');
21
22
 
22
23
 
23
- var _chunkJES2EBNOjs = require('./chunk-JES2EBNO.js');
24
24
 
25
25
 
26
26
 
@@ -169,1002 +169,7 @@ var _chunkJES2EBNOjs = require('./chunk-JES2EBNO.js');
169
169
 
170
170
 
171
171
 
172
-
173
-
174
- var _chunkH24IF5AAjs = require('./chunk-H24IF5AA.js');
175
-
176
- // components/dynamic-schema-form.tsx
177
- var _react = require('react');
178
- var _jsxruntime = require('react/jsx-runtime');
179
- function DynamicSchemaForm({
180
- schema,
181
- value = {},
182
- onChange,
183
- disabled = false,
184
- path = [],
185
- components,
186
- variables = [],
187
- showVariablePicker = false
188
- }) {
189
- const [collapsedSections, setCollapsedSections] = _react.useState.call(void 0,
190
- /* @__PURE__ */ new Set()
191
- );
192
- const [openVariablePickers, setOpenVariablePickers] = _react.useState.call(void 0,
193
- /* @__PURE__ */ new Set()
194
- );
195
- const [openRichTextDialogs, setOpenRichTextDialogs] = _react.useState.call(void 0,
196
- /* @__PURE__ */ new Set()
197
- );
198
- const [richTextDraftValues, setRichTextDraftValues] = _react.useState.call(void 0, {});
199
- const {
200
- Input,
201
- Label,
202
- Textarea,
203
- Checkbox,
204
- Select,
205
- SelectTrigger,
206
- SelectValue,
207
- SelectContent,
208
- SelectItem,
209
- Button,
210
- Card,
211
- PlusIcon,
212
- TrashIcon,
213
- ChevronDownIcon,
214
- ChevronRightIcon,
215
- VariableIcon,
216
- CheckIcon,
217
- EditIcon,
218
- Popover,
219
- PopoverTrigger,
220
- PopoverContent,
221
- Dialog,
222
- DialogContent,
223
- DialogHeader,
224
- DialogTitle,
225
- DialogFooter,
226
- ScrollArea,
227
- MarkdownEditor,
228
- cn
229
- } = components;
230
- const isVariableReference = (val) => {
231
- return typeof val === "string" && val.startsWith("{{") && val.endsWith("}}");
232
- };
233
- const getMatchingVariables = (fieldType) => {
234
- if (!fieldType) return variables;
235
- const compatibleTypes = {
236
- string: ["string"],
237
- number: ["number", "integer"],
238
- integer: ["number", "integer"],
239
- boolean: ["boolean"],
240
- object: ["object"],
241
- array: ["array"]
242
- };
243
- const compatible = compatibleTypes[fieldType] || [fieldType];
244
- return variables.filter((v) => compatible.includes(v.type));
245
- };
246
- const toggleVariablePicker = (fieldPath) => {
247
- setOpenVariablePickers((prev) => {
248
- const next = new Set(prev);
249
- if (next.has(fieldPath)) {
250
- next.delete(fieldPath);
251
- } else {
252
- next.add(fieldPath);
253
- }
254
- return next;
255
- });
256
- };
257
- const renderVariablePicker = (fieldName, fieldType, fieldPath, onSelect) => {
258
- if (!showVariablePicker) {
259
- return null;
260
- }
261
- if (!VariableIcon || !Popover || !PopoverTrigger || !PopoverContent) {
262
- return null;
263
- }
264
- const matchingVars = getMatchingVariables(fieldType);
265
- const isOpen = openVariablePickers.has(fieldPath);
266
- const currentValue = value[fieldName];
267
- const isVariable = isVariableReference(currentValue);
268
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
269
- Popover,
270
- {
271
- open: isOpen,
272
- onOpenChange: (open) => {
273
- if (open) {
274
- setOpenVariablePickers((prev) => new Set(prev).add(fieldPath));
275
- } else {
276
- setOpenVariablePickers((prev) => {
277
- const next = new Set(prev);
278
- next.delete(fieldPath);
279
- return next;
280
- });
281
- }
282
- },
283
- children: [
284
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
285
- Button,
286
- {
287
- type: "button",
288
- variant: "outline",
289
- size: "sm",
290
- className: cn(
291
- "h-8 px-2 shrink-0",
292
- isVariable && "border-primary text-primary"
293
- ),
294
- disabled,
295
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VariableIcon, { className: "h-3.5 w-3.5" })
296
- }
297
- ) }),
298
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PopoverContent, { className: "w-56 p-1", align: "end", children: [
299
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-xs font-medium text-muted-foreground px-2 py-1.5", children: [
300
- "Select Variable (",
301
- fieldType || "any",
302
- ")"
303
- ] }),
304
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-h-48 overflow-y-auto", children: matchingVars.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "px-2 py-3 text-xs text-muted-foreground text-center", children: [
305
- "No variables available.",
306
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "br", {}),
307
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-[10px]", children: "Add variables in Workflow Settings \u2192 Variables" })
308
- ] }) : matchingVars.map((variable) => {
309
- const varRef = `{{${variable.path}}}`;
310
- const isSelected = currentValue === varRef;
311
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
312
- "button",
313
- {
314
- type: "button",
315
- className: cn(
316
- "w-full text-left px-2 py-1.5 text-xs rounded hover:bg-accent flex items-center justify-between",
317
- isSelected && "bg-accent"
318
- ),
319
- onClick: () => {
320
- onSelect(varRef);
321
- setOpenVariablePickers((prev) => {
322
- const next = new Set(prev);
323
- next.delete(fieldPath);
324
- return next;
325
- });
326
- },
327
- children: [
328
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
329
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: variable.title || variable.name }),
330
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-[10px] text-muted-foreground font-mono", children: variable.path })
331
- ] }),
332
- isSelected && CheckIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CheckIcon, { className: "h-3 w-3" })
333
- ]
334
- },
335
- variable.path
336
- );
337
- }) })
338
- ] })
339
- ]
340
- }
341
- );
342
- };
343
- const toggleSection = (key) => {
344
- setCollapsedSections((prev) => {
345
- const next = new Set(prev);
346
- if (next.has(key)) {
347
- next.delete(key);
348
- } else {
349
- next.add(key);
350
- }
351
- return next;
352
- });
353
- };
354
- const handleFieldChange = (fieldName, fieldValue) => {
355
- onChange({
356
- ...value,
357
- [fieldName]: fieldValue
358
- });
359
- };
360
- const renderField = (fieldSchema, fieldName, fieldValue) => {
361
- const fieldPath = [...path, fieldName].join(".");
362
- const isRequired = _optionalChain([schema, 'access', _2 => _2.required, 'optionalAccess', _3 => _3.includes, 'call', _4 => _4(fieldName)]);
363
- if (fieldSchema.enum) {
364
- const labels = fieldSchema["x-enumLabels"] || fieldSchema.enum;
365
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
366
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
367
- fieldSchema.title || fieldName,
368
- isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
369
- ] }),
370
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
371
- Select,
372
- {
373
- value: fieldValue || "",
374
- onValueChange: (v) => handleFieldChange(fieldName, v),
375
- disabled,
376
- children: [
377
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
378
- SelectValue,
379
- {
380
- placeholder: `Select ${fieldSchema.title || fieldName}`
381
- }
382
- ) }),
383
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: fieldSchema.enum.map((option, idx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: option, className: "text-xs", children: labels[idx] || option }, option)) })
384
- ]
385
- }
386
- ),
387
- fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
388
- ] }, fieldPath);
389
- }
390
- if (fieldSchema.type === "object" && fieldSchema.properties) {
391
- const isCollapsed = collapsedSections.has(fieldPath);
392
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
393
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
394
- "button",
395
- {
396
- type: "button",
397
- onClick: () => toggleSection(fieldPath),
398
- className: "flex items-center gap-1 text-xs font-medium text-gray-700 hover:text-gray-900",
399
- children: [
400
- isCollapsed ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronRightIcon, { className: "h-3 w-3" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronDownIcon, { className: "h-3 w-3" }),
401
- fieldSchema.title || fieldName
402
- ]
403
- }
404
- ),
405
- !isCollapsed && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "p-3 bg-gray-50/50", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
406
- DynamicSchemaForm,
407
- {
408
- schema: fieldSchema,
409
- value: fieldValue || {},
410
- onChange: (v) => handleFieldChange(fieldName, v),
411
- disabled,
412
- path: [...path, fieldName],
413
- components,
414
- variables,
415
- showVariablePicker
416
- }
417
- ) })
418
- ] }, fieldPath);
419
- }
420
- if (fieldSchema.type === "array" && fieldSchema.items) {
421
- const arrayValue = Array.isArray(fieldValue) ? fieldValue : [];
422
- const itemSchema = fieldSchema.items;
423
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
424
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
425
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
426
- fieldSchema.title || fieldName,
427
- isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
428
- ] }),
429
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
430
- Button,
431
- {
432
- type: "button",
433
- variant: "outline",
434
- size: "sm",
435
- className: "h-6 text-xs px-2",
436
- onClick: () => {
437
- const newItem = itemSchema.type === "object" ? {} : "";
438
- handleFieldChange(fieldName, [...arrayValue, newItem]);
439
- },
440
- disabled,
441
- children: [
442
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PlusIcon, { className: "h-3 w-3 mr-1" }),
443
- "Add"
444
- ]
445
- }
446
- )
447
- ] }),
448
- fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description }),
449
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-2", children: arrayValue.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2 items-start", children: [
450
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1", children: itemSchema.type === "object" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "p-2 bg-gray-50/50", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
451
- DynamicSchemaForm,
452
- {
453
- schema: itemSchema,
454
- value: item,
455
- onChange: (v) => {
456
- const newArray = [...arrayValue];
457
- newArray[index] = v;
458
- handleFieldChange(fieldName, newArray);
459
- },
460
- disabled,
461
- path: [...path, fieldName, String(index)],
462
- components,
463
- variables,
464
- showVariablePicker
465
- }
466
- ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
467
- Input,
468
- {
469
- value: item || "",
470
- onChange: (e) => {
471
- const newArray = [...arrayValue];
472
- newArray[index] = e.target.value;
473
- handleFieldChange(fieldName, newArray);
474
- },
475
- disabled,
476
- className: "h-8 text-xs"
477
- }
478
- ) }),
479
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
480
- Button,
481
- {
482
- type: "button",
483
- variant: "ghost",
484
- size: "sm",
485
- className: "h-8 w-8 p-0 text-red-500 hover:text-red-700",
486
- onClick: () => {
487
- const newArray = arrayValue.filter(
488
- (_, i) => i !== index
489
- );
490
- handleFieldChange(fieldName, newArray);
491
- },
492
- disabled,
493
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TrashIcon, { className: "h-3 w-3" })
494
- }
495
- )
496
- ] }, index)) })
497
- ] }, fieldPath);
498
- }
499
- if (fieldSchema.type === "boolean") {
500
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center space-x-2", children: [
501
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
502
- Checkbox,
503
- {
504
- id: fieldPath,
505
- checked: !!fieldValue,
506
- onCheckedChange: (checked) => handleFieldChange(fieldName, checked),
507
- disabled
508
- }
509
- ),
510
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { htmlFor: fieldPath, className: "text-xs font-normal", children: [
511
- fieldSchema.title || fieldName,
512
- isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
513
- ] }),
514
- fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-[10px] text-muted-foreground ml-2", children: [
515
- "(",
516
- fieldSchema.description,
517
- ")"
518
- ] })
519
- ] }, fieldPath);
520
- }
521
- if (fieldSchema.type === "number" || fieldSchema.type === "integer") {
522
- const isVarValue = isVariableReference(fieldValue);
523
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
524
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
525
- fieldSchema.title || fieldName,
526
- isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
527
- ] }),
528
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-1.5", children: [
529
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
530
- Input,
531
- {
532
- type: isVarValue ? "text" : "number",
533
- value: _nullishCoalesce(fieldValue, () => ( "")),
534
- onChange: (e) => {
535
- if (isVariableReference(e.target.value)) {
536
- handleFieldChange(fieldName, e.target.value);
537
- } else {
538
- const val = e.target.value === "" ? void 0 : Number(e.target.value);
539
- handleFieldChange(fieldName, val);
540
- }
541
- },
542
- min: fieldSchema.minimum,
543
- max: fieldSchema.maximum,
544
- step: fieldSchema.type === "integer" ? 1 : "any",
545
- disabled,
546
- className: cn("h-8 text-xs flex-1", isVarValue && "font-mono text-primary")
547
- }
548
- ),
549
- renderVariablePicker(
550
- fieldName,
551
- fieldSchema.type,
552
- fieldPath,
553
- (varPath) => handleFieldChange(fieldName, varPath)
554
- )
555
- ] }),
556
- fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
557
- ] }, fieldPath);
558
- }
559
- if (fieldSchema.type === "string") {
560
- if (fieldSchema.format === "richtext") {
561
- const isDialogOpen = openRichTextDialogs.has(fieldPath);
562
- const draftValue = _nullishCoalesce(_nullishCoalesce(richTextDraftValues[fieldPath], () => ( fieldValue)), () => ( ""));
563
- const previewText = (fieldValue || "").replace(/<[^>]*>/g, "").slice(0, 50);
564
- const matchingVars = getMatchingVariables("string");
565
- if (!Dialog || !DialogContent || !DialogHeader || !DialogTitle || !DialogFooter) {
566
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
567
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
568
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
569
- fieldSchema.title || fieldName,
570
- isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
571
- ] }),
572
- renderVariablePicker(
573
- fieldName,
574
- "string",
575
- fieldPath,
576
- (varPath) => handleFieldChange(fieldName, (fieldValue || "") + varPath)
577
- )
578
- ] }),
579
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
580
- Textarea,
581
- {
582
- value: fieldValue || "",
583
- onChange: (e) => handleFieldChange(fieldName, e.target.value),
584
- disabled,
585
- rows: 3,
586
- className: "text-xs",
587
- placeholder: fieldSchema.description
588
- }
589
- )
590
- ] }, fieldPath);
591
- }
592
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
593
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
594
- fieldSchema.title || fieldName,
595
- isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
596
- ] }),
597
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-1.5", children: [
598
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 min-w-0 px-2 py-1.5 bg-muted/50 rounded text-xs text-muted-foreground truncate border", children: previewText || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "italic", children: "Click edit to add content..." }) }),
599
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
600
- Button,
601
- {
602
- type: "button",
603
- variant: "outline",
604
- size: "sm",
605
- className: "h-8 px-2 shrink-0",
606
- onClick: () => {
607
- setRichTextDraftValues((prev) => ({ ...prev, [fieldPath]: fieldValue || "" }));
608
- setOpenRichTextDialogs((prev) => new Set(prev).add(fieldPath));
609
- },
610
- disabled,
611
- children: EditIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EditIcon, { className: "h-3.5 w-3.5" }) : "Edit"
612
- }
613
- )
614
- ] }),
615
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
616
- Dialog,
617
- {
618
- open: isDialogOpen,
619
- onOpenChange: (open) => {
620
- if (!open) {
621
- setOpenRichTextDialogs((prev) => {
622
- const next = new Set(prev);
623
- next.delete(fieldPath);
624
- return next;
625
- });
626
- }
627
- },
628
- children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: "max-w-3xl max-h-[85vh] flex flex-col", children: [
629
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogTitle, { children: [
630
- "Edit ",
631
- fieldSchema.title || fieldName
632
- ] }) }),
633
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 overflow-hidden flex flex-col min-h-0", children: MarkdownEditor ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
634
- MarkdownEditor,
635
- {
636
- content: draftValue,
637
- onChange: (value2) => {
638
- setRichTextDraftValues((prev) => ({ ...prev, [fieldPath]: value2 }));
639
- },
640
- placeholder: "Enter content... Use {{variables.name}} for dynamic values",
641
- minHeight: "300px",
642
- variables: showVariablePicker ? matchingVars : []
643
- }
644
- ) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
645
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
646
- Textarea,
647
- {
648
- value: draftValue,
649
- onChange: (e) => {
650
- setRichTextDraftValues((prev) => ({ ...prev, [fieldPath]: e.target.value }));
651
- },
652
- rows: 12,
653
- className: "flex-1 text-sm font-mono resize-none",
654
- placeholder: "Enter content... Use {{variables.name}} for dynamic values"
655
- }
656
- ),
657
- showVariablePicker && matchingVars.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border rounded-md p-2 bg-muted/30 mt-3", children: [
658
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs font-medium mb-2", children: "Insert Variable:" }),
659
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-1", children: matchingVars.map((variable) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
660
- Button,
661
- {
662
- type: "button",
663
- variant: "outline",
664
- size: "sm",
665
- className: "h-6 text-xs px-2",
666
- onClick: () => {
667
- const varRef = `{{${variable.path}}}`;
668
- setRichTextDraftValues((prev) => ({
669
- ...prev,
670
- [fieldPath]: (prev[fieldPath] || "") + varRef
671
- }));
672
- },
673
- children: variable.title || variable.name
674
- },
675
- variable.path
676
- )) })
677
- ] })
678
- ] }) }),
679
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogFooter, { children: [
680
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
681
- Button,
682
- {
683
- type: "button",
684
- variant: "outline",
685
- onClick: () => {
686
- setOpenRichTextDialogs((prev) => {
687
- const next = new Set(prev);
688
- next.delete(fieldPath);
689
- return next;
690
- });
691
- },
692
- children: "Cancel"
693
- }
694
- ),
695
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
696
- Button,
697
- {
698
- type: "button",
699
- onClick: () => {
700
- handleFieldChange(fieldName, draftValue);
701
- setOpenRichTextDialogs((prev) => {
702
- const next = new Set(prev);
703
- next.delete(fieldPath);
704
- return next;
705
- });
706
- },
707
- children: "Save"
708
- }
709
- )
710
- ] })
711
- ] })
712
- }
713
- )
714
- ] }, fieldPath);
715
- }
716
- if (fieldSchema.format === "multiline" || fieldSchema.format === "textarea") {
717
- const isVarValue2 = isVariableReference(fieldValue);
718
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
719
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
720
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
721
- fieldSchema.title || fieldName,
722
- isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
723
- ] }),
724
- renderVariablePicker(
725
- fieldName,
726
- "string",
727
- fieldPath,
728
- (varPath) => handleFieldChange(fieldName, (fieldValue || "") + varPath)
729
- )
730
- ] }),
731
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
732
- Textarea,
733
- {
734
- value: fieldValue || "",
735
- onChange: (e) => handleFieldChange(fieldName, e.target.value),
736
- disabled,
737
- rows: 3,
738
- className: cn("text-xs", isVarValue2 && "font-mono text-primary"),
739
- placeholder: fieldSchema.description
740
- }
741
- ),
742
- fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
743
- ] }, fieldPath);
744
- }
745
- const inputType = fieldSchema.format === "email" ? "email" : fieldSchema.format === "uri" || fieldSchema.format === "url" ? "url" : fieldSchema.format === "password" ? "password" : "text";
746
- const isVarValue = isVariableReference(fieldValue);
747
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
748
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
749
- fieldSchema.title || fieldName,
750
- isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
751
- ] }),
752
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-1.5", children: [
753
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
754
- Input,
755
- {
756
- type: inputType,
757
- value: fieldValue || "",
758
- onChange: (e) => handleFieldChange(fieldName, e.target.value),
759
- disabled,
760
- className: cn("h-8 text-xs flex-1", isVarValue && "font-mono text-primary"),
761
- placeholder: fieldSchema.description
762
- }
763
- ),
764
- renderVariablePicker(
765
- fieldName,
766
- "string",
767
- fieldPath,
768
- (varPath) => handleFieldChange(fieldName, (fieldValue || "") + varPath)
769
- )
770
- ] }),
771
- fieldSchema.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: fieldSchema.description })
772
- ] }, fieldPath);
773
- }
774
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1.5", children: [
775
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "text-xs font-medium", children: [
776
- fieldSchema.title || fieldName,
777
- isRequired && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-red-500 ml-0.5", children: "*" })
778
- ] }),
779
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
780
- Input,
781
- {
782
- value: typeof fieldValue === "object" ? JSON.stringify(fieldValue) : fieldValue || "",
783
- onChange: (e) => {
784
- try {
785
- const parsed = JSON.parse(e.target.value);
786
- handleFieldChange(fieldName, parsed);
787
- } catch (e2) {
788
- handleFieldChange(fieldName, e.target.value);
789
- }
790
- },
791
- disabled,
792
- className: "h-8 text-xs font-mono"
793
- }
794
- ),
795
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-[10px] text-muted-foreground", children: [
796
- "Type: ",
797
- fieldSchema.type || "unknown"
798
- ] })
799
- ] }, fieldPath);
800
- };
801
- if (schema.type === "object" && schema.properties) {
802
- const sortedProperties = Object.entries(schema.properties).sort(
803
- ([, a], [, b]) => {
804
- const orderA = _nullishCoalesce(a["x-displayOrder"], () => ( 999));
805
- const orderB = _nullishCoalesce(b["x-displayOrder"], () => ( 999));
806
- return orderA - orderB;
807
- }
808
- );
809
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-3", children: sortedProperties.map(
810
- ([fieldName, fieldSchema]) => renderField(fieldSchema, fieldName, value[fieldName])
811
- ) });
812
- }
813
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground text-center py-4", children: "No configuration required for this node." });
814
- }
815
-
816
- // components/schema-builder.tsx
817
-
818
-
819
- var FIELD_TYPES = [
820
- { value: "string", label: "Text" },
821
- { value: "number", label: "Number" },
822
- { value: "integer", label: "Integer" },
823
- { value: "boolean", label: "Boolean" },
824
- { value: "array", label: "Array" },
825
- { value: "object", label: "Object" }
826
- ];
827
- var STRING_FORMATS = [
828
- { value: "plain", label: "Plain Text" },
829
- { value: "email", label: "Email" },
830
- { value: "uri", label: "URL" },
831
- { value: "date", label: "Date" },
832
- { value: "date-time", label: "Date & Time" },
833
- { value: "multiline", label: "Multiline Text" }
834
- ];
835
- function SchemaBuilder({
836
- schema,
837
- onChange,
838
- disabled = false,
839
- components
840
- }) {
841
- const [expandedFields, setExpandedFields] = _react.useState.call(void 0, /* @__PURE__ */ new Set());
842
- const {
843
- Input,
844
- Label,
845
- Checkbox,
846
- Select,
847
- SelectTrigger,
848
- SelectValue,
849
- SelectContent,
850
- SelectItem,
851
- Button,
852
- Card,
853
- PlusIcon,
854
- TrashIcon,
855
- GripVerticalIcon,
856
- ChevronDownIcon,
857
- ChevronRightIcon
858
- } = components;
859
- const getFieldsFromSchema = () => {
860
- if (!_optionalChain([schema, 'optionalAccess', _5 => _5.properties])) return [];
861
- return Object.entries(schema.properties).map(([name, prop]) => {
862
- const fieldSchema = prop;
863
- return {
864
- name,
865
- type: fieldSchema.type || "string",
866
- title: fieldSchema.title || name,
867
- description: fieldSchema.description || "",
868
- required: _optionalChain([schema, 'access', _6 => _6.required, 'optionalAccess', _7 => _7.includes, 'call', _8 => _8(name)]) || false,
869
- format: fieldSchema.format,
870
- enum: fieldSchema.enum,
871
- items: fieldSchema.items
872
- };
873
- });
874
- };
875
- const fields = getFieldsFromSchema();
876
- const updateSchema = (newFields) => {
877
- const properties = {};
878
- const required = [];
879
- newFields.forEach((field) => {
880
- if (!field.name) return;
881
- const fieldSchema = {
882
- type: field.type,
883
- title: field.title || field.name
884
- };
885
- if (field.description) {
886
- fieldSchema.description = field.description;
887
- }
888
- if (field.format && field.format !== "plain") {
889
- fieldSchema.format = field.format;
890
- }
891
- if (field.enum && field.enum.length > 0) {
892
- fieldSchema.enum = field.enum;
893
- }
894
- if (field.type === "array" && field.items) {
895
- fieldSchema.items = field.items;
896
- }
897
- properties[field.name] = fieldSchema;
898
- if (field.required) {
899
- required.push(field.name);
900
- }
901
- });
902
- onChange({
903
- type: "object",
904
- properties,
905
- required: required.length > 0 ? required : void 0
906
- });
907
- };
908
- const addField = () => {
909
- const newFieldName = `field_${fields.length + 1}`;
910
- const newFields = [
911
- ...fields,
912
- {
913
- name: newFieldName,
914
- type: "string",
915
- title: "",
916
- description: "",
917
- required: false
918
- }
919
- ];
920
- updateSchema(newFields);
921
- setExpandedFields((prev) => /* @__PURE__ */ new Set([...prev, newFieldName]));
922
- };
923
- const updateField = (index, updates) => {
924
- const newFields = [...fields];
925
- newFields[index] = { ...newFields[index], ...updates };
926
- updateSchema(newFields);
927
- };
928
- const removeField = (index) => {
929
- const newFields = fields.filter((_, i) => i !== index);
930
- updateSchema(newFields);
931
- };
932
- const toggleExpand = (name) => {
933
- setExpandedFields((prev) => {
934
- const next = new Set(prev);
935
- if (next.has(name)) {
936
- next.delete(name);
937
- } else {
938
- next.add(name);
939
- }
940
- return next;
941
- });
942
- };
943
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
944
- fields.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground italic py-3", children: 'No fields defined. Click "Add Field" to create one.' }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-3", children: fields.map((field, index) => {
945
- const isExpanded = expandedFields.has(field.name);
946
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { className: "p-3 bg-gray-50/50", children: [
947
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 mb-2", children: [
948
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GripVerticalIcon, { className: "h-4 w-4 text-gray-300 flex-shrink-0 cursor-grab" }),
949
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
950
- "button",
951
- {
952
- type: "button",
953
- onClick: () => toggleExpand(field.name),
954
- className: "flex-shrink-0 p-1 hover:bg-gray-200 rounded",
955
- children: isExpanded ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronDownIcon, { className: "h-4 w-4 text-gray-500" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronRightIcon, { className: "h-4 w-4 text-gray-500" })
956
- }
957
- ),
958
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
959
- Input,
960
- {
961
- value: field.name,
962
- onChange: (e) => {
963
- const oldName = field.name;
964
- const newName = e.target.value.toLowerCase().replace(/\s+/g, "_").replace(/[^a-z0-9_]/g, "");
965
- updateField(index, { name: newName });
966
- if (expandedFields.has(oldName)) {
967
- setExpandedFields((prev) => {
968
- const next = new Set(prev);
969
- next.delete(oldName);
970
- next.add(newName);
971
- return next;
972
- });
973
- }
974
- },
975
- placeholder: "field_name",
976
- className: "h-9 text-sm font-mono",
977
- disabled
978
- }
979
- ) }),
980
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
981
- Button,
982
- {
983
- type: "button",
984
- variant: "ghost",
985
- size: "sm",
986
- className: "h-9 w-9 p-0 text-red-500 hover:text-red-700 hover:bg-red-50 flex-shrink-0",
987
- onClick: () => removeField(index),
988
- disabled,
989
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TrashIcon, { className: "h-4 w-4" })
990
- }
991
- )
992
- ] }),
993
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 pl-10", children: [
994
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
995
- Select,
996
- {
997
- value: field.type,
998
- onValueChange: (v) => updateField(index, { type: v }),
999
- disabled,
1000
- children: [
1001
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
1002
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: FIELD_TYPES.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.value, children: type.label }, type.value)) })
1003
- ]
1004
- }
1005
- ) }),
1006
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 flex-shrink-0", children: [
1007
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1008
- Checkbox,
1009
- {
1010
- id: `required-${index}`,
1011
- checked: field.required,
1012
- onCheckedChange: (checked) => updateField(index, { required: !!checked }),
1013
- disabled
1014
- }
1015
- ),
1016
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1017
- Label,
1018
- {
1019
- htmlFor: `required-${index}`,
1020
- className: "text-sm text-muted-foreground",
1021
- children: "Required"
1022
- }
1023
- )
1024
- ] })
1025
- ] }),
1026
- isExpanded && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-3 pt-3 border-t space-y-3 pl-10", children: [
1027
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
1028
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Display Title" }),
1029
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1030
- Input,
1031
- {
1032
- value: field.title,
1033
- onChange: (e) => updateField(index, { title: e.target.value }),
1034
- placeholder: "Human readable title",
1035
- className: "h-9 text-sm",
1036
- disabled
1037
- }
1038
- )
1039
- ] }),
1040
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
1041
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Description" }),
1042
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1043
- Input,
1044
- {
1045
- value: field.description,
1046
- onChange: (e) => updateField(index, { description: e.target.value }),
1047
- placeholder: "Help text for this field",
1048
- className: "h-9 text-sm",
1049
- disabled
1050
- }
1051
- )
1052
- ] }),
1053
- field.type === "string" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
1054
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Format" }),
1055
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1056
- Select,
1057
- {
1058
- value: field.format || "plain",
1059
- onValueChange: (v) => updateField(index, { format: v }),
1060
- disabled,
1061
- children: [
1062
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
1063
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: STRING_FORMATS.map((format) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: format.value, children: format.label }, format.value)) })
1064
- ]
1065
- }
1066
- )
1067
- ] }),
1068
- field.type === "array" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
1069
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Item Type" }),
1070
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1071
- Select,
1072
- {
1073
- value: _optionalChain([field, 'access', _9 => _9.items, 'optionalAccess', _10 => _10.type]) || "string",
1074
- onValueChange: (v) => updateField(index, { items: { type: v } }),
1075
- disabled,
1076
- children: [
1077
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
1078
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: FIELD_TYPES.filter((t) => t.value !== "array").map(
1079
- (type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.value, children: type.label }, type.value)
1080
- ) })
1081
- ]
1082
- }
1083
- )
1084
- ] }),
1085
- field.type === "string" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1086
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
1087
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { className: "text-xs text-muted-foreground", children: "Dropdown Options (optional)" }),
1088
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1089
- Button,
1090
- {
1091
- type: "button",
1092
- variant: "outline",
1093
- size: "sm",
1094
- className: "h-7 text-xs",
1095
- onClick: () => {
1096
- const currentEnum = field.enum || [];
1097
- updateField(index, {
1098
- enum: [
1099
- ...currentEnum,
1100
- `option_${currentEnum.length + 1}`
1101
- ]
1102
- });
1103
- },
1104
- disabled,
1105
- children: [
1106
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PlusIcon, { className: "h-3 w-3 mr-1" }),
1107
- "Add Option"
1108
- ]
1109
- }
1110
- )
1111
- ] }),
1112
- field.enum && field.enum.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-2", children: field.enum.map((option, optIdx) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
1113
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1114
- Input,
1115
- {
1116
- value: option,
1117
- onChange: (e) => {
1118
- const newEnum = [...field.enum || []];
1119
- newEnum[optIdx] = e.target.value;
1120
- updateField(index, { enum: newEnum });
1121
- },
1122
- placeholder: `Option ${optIdx + 1}`,
1123
- className: "h-8 text-sm flex-1",
1124
- disabled
1125
- }
1126
- ),
1127
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1128
- Button,
1129
- {
1130
- type: "button",
1131
- variant: "ghost",
1132
- size: "sm",
1133
- className: "h-8 w-8 p-0 text-red-400 hover:text-red-600",
1134
- onClick: () => {
1135
- const newEnum = (field.enum || []).filter(
1136
- (_, i) => i !== optIdx
1137
- );
1138
- updateField(index, {
1139
- enum: newEnum.length > 0 ? newEnum : void 0
1140
- });
1141
- },
1142
- disabled,
1143
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TrashIcon, { className: "h-3 w-3" })
1144
- }
1145
- )
1146
- ] }, optIdx)) })
1147
- ] })
1148
- ] })
1149
- ] }, index);
1150
- }) }),
1151
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1152
- Button,
1153
- {
1154
- type: "button",
1155
- variant: "outline",
1156
- size: "sm",
1157
- className: "w-full h-9 text-sm",
1158
- onClick: addField,
1159
- disabled,
1160
- children: [
1161
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PlusIcon, { className: "h-4 w-4 mr-2" }),
1162
- "Add Field"
1163
- ]
1164
- }
1165
- )
1166
- ] });
1167
- }
172
+ var _chunk6DV2LPSNjs = require('./chunk-6DV2LPSN.js');
1168
173
 
1169
174
  // store/workflow-definition-slice.ts
1170
175
  var _toolkit = require('@reduxjs/toolkit');
@@ -1208,13 +213,13 @@ var workflowDefinitionSlice = _toolkit.createSlice.call(void 0, {
1208
213
  if (definition.id) {
1209
214
  state.definitions[definition.id] = definition;
1210
215
  }
1211
- if (_optionalChain([state, 'access', _11 => _11.selectedDefinition, 'optionalAccess', _12 => _12.id]) === definition.id) {
216
+ if (_optionalChain([state, 'access', _ => _.selectedDefinition, 'optionalAccess', _2 => _2.id]) === definition.id) {
1212
217
  state.selectedDefinition = definition;
1213
218
  }
1214
219
  },
1215
220
  removeDefinition: (state, action) => {
1216
221
  delete state.definitions[action.payload];
1217
- if (_optionalChain([state, 'access', _13 => _13.selectedDefinition, 'optionalAccess', _14 => _14.id]) === action.payload) {
222
+ if (_optionalChain([state, 'access', _3 => _3.selectedDefinition, 'optionalAccess', _4 => _4.id]) === action.payload) {
1218
223
  state.selectedDefinition = void 0;
1219
224
  }
1220
225
  },
@@ -1271,7 +276,7 @@ var workflowInstanceSlice = _toolkit.createSlice.call(void 0, {
1271
276
  if (instance.id) {
1272
277
  state.instances[instance.id] = instance;
1273
278
  }
1274
- if (_optionalChain([state, 'access', _15 => _15.selectedInstance, 'optionalAccess', _16 => _16.id]) === instance.id) {
279
+ if (_optionalChain([state, 'access', _5 => _5.selectedInstance, 'optionalAccess', _6 => _6.id]) === instance.id) {
1275
280
  state.selectedInstance = instance;
1276
281
  }
1277
282
  },
@@ -4379,8 +3384,5 @@ var WorkflowTypes = {
4379
3384
 
4380
3385
 
4381
3386
 
4382
-
4383
-
4384
-
4385
- exports.AccountingNodeSubTypes = AccountingNodeSubTypes; exports.ActionNodeSubTypes = ActionNodeSubTypes; exports.AgentNodeSubTypes = AgentNodeSubTypes; exports.DataNodeSubTypes = DataNodeSubTypes; exports.DelayNodeSubTypes = DelayNodeSubTypes; exports.DynamicSchemaForm = DynamicSchemaForm; exports.EdgeStatusCompleted = _chunkH24IF5AAjs.EdgeStatusCompleted; exports.EdgeStatusPending = _chunkH24IF5AAjs.EdgeStatusPending; exports.EdgeStatusSkipped = _chunkH24IF5AAjs.EdgeStatusSkipped; exports.EdgeTypeCompensation = _chunkH24IF5AAjs.EdgeTypeCompensation; exports.EdgeTypeConditional = _chunkH24IF5AAjs.EdgeTypeConditional; exports.EdgeTypeDefault = _chunkH24IF5AAjs.EdgeTypeDefault; exports.EdgeTypeError = _chunkH24IF5AAjs.EdgeTypeError; exports.EdgeTypeLoopBack = _chunkH24IF5AAjs.EdgeTypeLoopBack; exports.EdgeTypeMerge = _chunkH24IF5AAjs.EdgeTypeMerge; exports.EdgeTypeNormal = _chunkH24IF5AAjs.EdgeTypeNormal; exports.EdgeTypeParallel = _chunkH24IF5AAjs.EdgeTypeParallel; exports.EdgeTypeTimeout = _chunkH24IF5AAjs.EdgeTypeTimeout; exports.ExpressionTypeDSL = _chunkH24IF5AAjs.ExpressionTypeDSL; exports.ExpressionTypeFilter = _chunkH24IF5AAjs.ExpressionTypeFilter; exports.ExpressionTypeJavaScript = _chunkH24IF5AAjs.ExpressionTypeJavaScript; exports.ExpressionTypeRules = _chunkH24IF5AAjs.ExpressionTypeRules; exports.ExpressionTypeTemplate = _chunkH24IF5AAjs.ExpressionTypeTemplate; exports.HumanActionNodeSubTypes = HumanActionNodeSubTypes; exports.InstanceStatusCompleted = _chunkH24IF5AAjs.InstanceStatusCompleted; exports.InstanceStatusFailed = _chunkH24IF5AAjs.InstanceStatusFailed; exports.InstanceStatusNew = _chunkH24IF5AAjs.InstanceStatusNew; exports.InstanceStatusPaused = _chunkH24IF5AAjs.InstanceStatusPaused; exports.InstanceStatusRunning = _chunkH24IF5AAjs.InstanceStatusRunning; exports.InstanceStatusWaiting = _chunkH24IF5AAjs.InstanceStatusWaiting; exports.LogicNodeSubTypes = LogicNodeSubTypes; exports.LoopNodeSubTypes = LoopNodeSubTypes; exports.NodeStatusCompleted = _chunkH24IF5AAjs.NodeStatusCompleted; exports.NodeStatusFailed = _chunkH24IF5AAjs.NodeStatusFailed; exports.NodeStatusPending = _chunkH24IF5AAjs.NodeStatusPending; exports.NodeStatusRunning = _chunkH24IF5AAjs.NodeStatusRunning; exports.NodeStatusSkipped = _chunkH24IF5AAjs.NodeStatusSkipped; exports.NodeStatusWaiting = _chunkH24IF5AAjs.NodeStatusWaiting; exports.NodeSubTypeActionApiCall = _chunkH24IF5AAjs.NodeSubTypeActionApiCall; exports.NodeSubTypeActionAssignSLAPolicy = _chunkH24IF5AAjs.NodeSubTypeActionAssignSLAPolicy; exports.NodeSubTypeActionCSATSurvey = _chunkH24IF5AAjs.NodeSubTypeActionCSATSurvey; exports.NodeSubTypeActionChangeSLAStatus = _chunkH24IF5AAjs.NodeSubTypeActionChangeSLAStatus; exports.NodeSubTypeActionCreateEntityRecord = _chunkH24IF5AAjs.NodeSubTypeActionCreateEntityRecord; exports.NodeSubTypeActionDeleteEntityRecord = _chunkH24IF5AAjs.NodeSubTypeActionDeleteEntityRecord; exports.NodeSubTypeActionDocumentExtraction = _chunkH24IF5AAjs.NodeSubTypeActionDocumentExtraction; exports.NodeSubTypeActionEscalateSLA = _chunkH24IF5AAjs.NodeSubTypeActionEscalateSLA; exports.NodeSubTypeActionGenerateDocument = _chunkH24IF5AAjs.NodeSubTypeActionGenerateDocument; exports.NodeSubTypeActionMergeEntityRecords = _chunkH24IF5AAjs.NodeSubTypeActionMergeEntityRecords; exports.NodeSubTypeActionNatsRequest = _chunkH24IF5AAjs.NodeSubTypeActionNatsRequest; exports.NodeSubTypeActionProcessPayment = _chunkH24IF5AAjs.NodeSubTypeActionProcessPayment; exports.NodeSubTypeActionQueryEntityRecords = _chunkH24IF5AAjs.NodeSubTypeActionQueryEntityRecords; exports.NodeSubTypeActionSendEmail = _chunkH24IF5AAjs.NodeSubTypeActionSendEmail; exports.NodeSubTypeActionSendSMS = _chunkH24IF5AAjs.NodeSubTypeActionSendSMS; exports.NodeSubTypeActionSetVariables = _chunkH24IF5AAjs.NodeSubTypeActionSetVariables; exports.NodeSubTypeActionUpdateEntityRecord = _chunkH24IF5AAjs.NodeSubTypeActionUpdateEntityRecord; exports.NodeSubTypeAgentApiIntegration = _chunkH24IF5AAjs.NodeSubTypeAgentApiIntegration; exports.NodeSubTypeAgentChat = _chunkH24IF5AAjs.NodeSubTypeAgentChat; exports.NodeSubTypeAgentClientApiCall = _chunkH24IF5AAjs.NodeSubTypeAgentClientApiCall; exports.NodeSubTypeAgentCustomResponse = _chunkH24IF5AAjs.NodeSubTypeAgentCustomResponse; exports.NodeSubTypeAgentIntentDetector = _chunkH24IF5AAjs.NodeSubTypeAgentIntentDetector; exports.NodeSubTypeAgentKnowledgeGraph = _chunkH24IF5AAjs.NodeSubTypeAgentKnowledgeGraph; exports.NodeSubTypeAgentOpenTicket = _chunkH24IF5AAjs.NodeSubTypeAgentOpenTicket; exports.NodeSubTypeAgentStructuredOutput = _chunkH24IF5AAjs.NodeSubTypeAgentStructuredOutput; exports.NodeSubTypeAgentTransferToHuman = _chunkH24IF5AAjs.NodeSubTypeAgentTransferToHuman; exports.NodeSubTypeDataCalculate = _chunkH24IF5AAjs.NodeSubTypeDataCalculate; exports.NodeSubTypeDataFilter = _chunkH24IF5AAjs.NodeSubTypeDataFilter; exports.NodeSubTypeDataMap = _chunkH24IF5AAjs.NodeSubTypeDataMap; exports.NodeSubTypeDataValidate = _chunkH24IF5AAjs.NodeSubTypeDataValidate; exports.NodeSubTypeDelay = _chunkH24IF5AAjs.NodeSubTypeDelay; exports.NodeSubTypeHumanActionApproval = _chunkH24IF5AAjs.NodeSubTypeHumanActionApproval; exports.NodeSubTypeHumanActionAssignment = _chunkH24IF5AAjs.NodeSubTypeHumanActionAssignment; exports.NodeSubTypeHumanActionDataEntry = _chunkH24IF5AAjs.NodeSubTypeHumanActionDataEntry; exports.NodeSubTypeHumanActionReview = _chunkH24IF5AAjs.NodeSubTypeHumanActionReview; exports.NodeSubTypeLogicFor = _chunkH24IF5AAjs.NodeSubTypeLogicFor; exports.NodeSubTypeLogicIf = _chunkH24IF5AAjs.NodeSubTypeLogicIf; exports.NodeSubTypeLogicParallel = _chunkH24IF5AAjs.NodeSubTypeLogicParallel; exports.NodeSubTypeLogicSwitch = _chunkH24IF5AAjs.NodeSubTypeLogicSwitch; exports.NodeSubTypeLoopData = _chunkH24IF5AAjs.NodeSubTypeLoopData; exports.NodeSubTypeTimerBusinessHours = _chunkH24IF5AAjs.NodeSubTypeTimerBusinessHours; exports.NodeSubTypeTimerDelay = _chunkH24IF5AAjs.NodeSubTypeTimerDelay; exports.NodeSubTypeTimerSchedule = _chunkH24IF5AAjs.NodeSubTypeTimerSchedule; exports.NodeSubTypeTriggerEntityRecordCreated = _chunkH24IF5AAjs.NodeSubTypeTriggerEntityRecordCreated; exports.NodeSubTypeTriggerEntityRecordDeleted = _chunkH24IF5AAjs.NodeSubTypeTriggerEntityRecordDeleted; exports.NodeSubTypeTriggerEntityRecordUpdated = _chunkH24IF5AAjs.NodeSubTypeTriggerEntityRecordUpdated; exports.NodeSubTypeTriggerEscalation = _chunkH24IF5AAjs.NodeSubTypeTriggerEscalation; exports.NodeSubTypeTriggerSLABreach = _chunkH24IF5AAjs.NodeSubTypeTriggerSLABreach; exports.NodeSubTypeTriggerSLAWarning = _chunkH24IF5AAjs.NodeSubTypeTriggerSLAWarning; exports.NodeSubTypeTriggerStart = _chunkH24IF5AAjs.NodeSubTypeTriggerStart; exports.NodeSubTypeTriggerWebhookReceived = _chunkH24IF5AAjs.NodeSubTypeTriggerWebhookReceived; exports.NodeTypeAccounting = _chunkH24IF5AAjs.NodeTypeAccounting; exports.NodeTypeAction = _chunkH24IF5AAjs.NodeTypeAction; exports.NodeTypeAgent = _chunkH24IF5AAjs.NodeTypeAgent; exports.NodeTypeCustom = _chunkH24IF5AAjs.NodeTypeCustom; exports.NodeTypeData = _chunkH24IF5AAjs.NodeTypeData; exports.NodeTypeDelay = _chunkH24IF5AAjs.NodeTypeDelay; exports.NodeTypeDocumentExtraction = _chunkH24IF5AAjs.NodeTypeDocumentExtraction; exports.NodeTypeHumanAction = _chunkH24IF5AAjs.NodeTypeHumanAction; exports.NodeTypeIntegration = _chunkH24IF5AAjs.NodeTypeIntegration; exports.NodeTypeLogic = _chunkH24IF5AAjs.NodeTypeLogic; exports.NodeTypeLoop = _chunkH24IF5AAjs.NodeTypeLoop; exports.NodeTypeParallel = _chunkH24IF5AAjs.NodeTypeParallel; exports.NodeTypeSubflow = _chunkH24IF5AAjs.NodeTypeSubflow; exports.NodeTypeTimer = _chunkH24IF5AAjs.NodeTypeTimer; exports.NodeTypeTrigger = _chunkH24IF5AAjs.NodeTypeTrigger; exports.ParallelNodeSubTypes = ParallelNodeSubTypes; exports.PersistenceTypeEphemeral = _chunkH24IF5AAjs.PersistenceTypeEphemeral; exports.PersistenceTypePermanent = _chunkH24IF5AAjs.PersistenceTypePermanent; exports.RuleLevelError = _chunkH24IF5AAjs.RuleLevelError; exports.RuleLevelInfo = _chunkH24IF5AAjs.RuleLevelInfo; exports.RuleLevelWarning = _chunkH24IF5AAjs.RuleLevelWarning; exports.SchemaBuilder = SchemaBuilder; exports.TimeoutActionAlt = _chunkH24IF5AAjs.TimeoutActionAlt; exports.TimeoutActionFail = _chunkH24IF5AAjs.TimeoutActionFail; exports.TimeoutActionRetry = _chunkH24IF5AAjs.TimeoutActionRetry; exports.TimeoutActionSkip = _chunkH24IF5AAjs.TimeoutActionSkip; exports.TimerNodeSubTypes = TimerNodeSubTypes; exports.TriggerNodeSubTypes = TriggerNodeSubTypes; exports.WorkflowDefinitionCreate = _chunkH24IF5AAjs.WorkflowDefinitionCreate; exports.WorkflowDefinitionCreated = _chunkH24IF5AAjs.WorkflowDefinitionCreated; exports.WorkflowDefinitionDelete = _chunkH24IF5AAjs.WorkflowDefinitionDelete; exports.WorkflowDefinitionDeleted = _chunkH24IF5AAjs.WorkflowDefinitionDeleted; exports.WorkflowDefinitionGet = _chunkH24IF5AAjs.WorkflowDefinitionGet; exports.WorkflowDefinitionGetByTitle = _chunkH24IF5AAjs.WorkflowDefinitionGetByTitle; exports.WorkflowDefinitionGetServer = _chunkH24IF5AAjs.WorkflowDefinitionGetServer; exports.WorkflowDefinitionList = _chunkH24IF5AAjs.WorkflowDefinitionList; exports.WorkflowDefinitionUpdate = _chunkH24IF5AAjs.WorkflowDefinitionUpdate; exports.WorkflowDefinitionUpdated = _chunkH24IF5AAjs.WorkflowDefinitionUpdated; exports.WorkflowEdgeTypes = WorkflowEdgeTypes; exports.WorkflowExecutionCompleted = _chunkH24IF5AAjs.WorkflowExecutionCompleted; exports.WorkflowExecutionFailed = _chunkH24IF5AAjs.WorkflowExecutionFailed; exports.WorkflowExecutionStarted = _chunkH24IF5AAjs.WorkflowExecutionStarted; exports.WorkflowInstanceCreate = _chunkH24IF5AAjs.WorkflowInstanceCreate; exports.WorkflowInstanceExecuteNode = _chunkH24IF5AAjs.WorkflowInstanceExecuteNode; exports.WorkflowInstanceExecuteNodeLean = _chunkH24IF5AAjs.WorkflowInstanceExecuteNodeLean; exports.WorkflowInstanceExecuteNodeLeanServer = _chunkH24IF5AAjs.WorkflowInstanceExecuteNodeLeanServer; exports.WorkflowInstanceExecuteNodeServer = _chunkH24IF5AAjs.WorkflowInstanceExecuteNodeServer; exports.WorkflowInstanceGet = _chunkH24IF5AAjs.WorkflowInstanceGet; exports.WorkflowInstanceGetByStateVariable = _chunkH24IF5AAjs.WorkflowInstanceGetByStateVariable; exports.WorkflowInstanceList = _chunkH24IF5AAjs.WorkflowInstanceList; exports.WorkflowInstanceResumeNode = _chunkH24IF5AAjs.WorkflowInstanceResumeNode; exports.WorkflowInstanceResumeNodeServer = _chunkH24IF5AAjs.WorkflowInstanceResumeNodeServer; exports.WorkflowInstanceUpdate = _chunkH24IF5AAjs.WorkflowInstanceUpdate; exports.WorkflowInstanceUpdateNodeMetadata = _chunkH24IF5AAjs.WorkflowInstanceUpdateNodeMetadata; exports.WorkflowInstanceUpdated = _chunkH24IF5AAjs.WorkflowInstanceUpdated; exports.WorkflowNodeTypes = WorkflowNodeTypes; exports.WorkflowScheduleCreate = _chunkH24IF5AAjs.WorkflowScheduleCreate; exports.WorkflowScheduleDelete = _chunkH24IF5AAjs.WorkflowScheduleDelete; exports.WorkflowScheduleList = _chunkH24IF5AAjs.WorkflowScheduleList; exports.WorkflowSchedulePause = _chunkH24IF5AAjs.WorkflowSchedulePause; exports.WorkflowScheduleResume = _chunkH24IF5AAjs.WorkflowScheduleResume; exports.WorkflowScheduleUpdate = _chunkH24IF5AAjs.WorkflowScheduleUpdate; exports.WorkflowTemplateGet = _chunkH24IF5AAjs.WorkflowTemplateGet; exports.WorkflowTemplateInstantiate = _chunkH24IF5AAjs.WorkflowTemplateInstantiate; exports.WorkflowTemplateList = _chunkH24IF5AAjs.WorkflowTemplateList; exports.WorkflowTriggerFired = _chunkH24IF5AAjs.WorkflowTriggerFired; exports.WorkflowTriggerPause = _chunkH24IF5AAjs.WorkflowTriggerPause; exports.WorkflowTriggerRegister = _chunkH24IF5AAjs.WorkflowTriggerRegister; exports.WorkflowTriggerResume = _chunkH24IF5AAjs.WorkflowTriggerResume; exports.WorkflowTriggerStatus = _chunkH24IF5AAjs.WorkflowTriggerStatus; exports.WorkflowTypeAgent = _chunkH24IF5AAjs.WorkflowTypeAgent; exports.WorkflowTypeChat = _chunkH24IF5AAjs.WorkflowTypeChat; exports.WorkflowTypeDocument = _chunkH24IF5AAjs.WorkflowTypeDocument; exports.WorkflowTypeEntity = _chunkH24IF5AAjs.WorkflowTypeEntity; exports.WorkflowTypeProductivity = _chunkH24IF5AAjs.WorkflowTypeProductivity; exports.WorkflowTypes = WorkflowTypes; exports.createWorkflowApi = _chunkJES2EBNOjs.createWorkflowApi; exports.createWorkflowInstanceApi = _chunkJES2EBNOjs.createWorkflowInstanceApi; exports.deleteWorkflowApi = _chunkJES2EBNOjs.deleteWorkflowApi; exports.executeWorkflowNodeApi = _chunkJES2EBNOjs.executeWorkflowNodeApi; exports.getWorkflowApi = _chunkJES2EBNOjs.getWorkflowApi; exports.getWorkflowInstanceApi = _chunkJES2EBNOjs.getWorkflowInstanceApi; exports.getWorkflowTemplateApi = _chunkJES2EBNOjs.getWorkflowTemplateApi; exports.instantiateWorkflowTemplateApi = _chunkJES2EBNOjs.instantiateWorkflowTemplateApi; exports.listWorkflowInstancesApi = _chunkJES2EBNOjs.listWorkflowInstancesApi; exports.listWorkflowTemplatesApi = _chunkJES2EBNOjs.listWorkflowTemplatesApi; exports.listWorkflowsApi = _chunkJES2EBNOjs.listWorkflowsApi; exports.nodeDefinitions = nodeDefinitions; exports.nodeSchemas = nodeSchemas; exports.resumeWorkflowNodeApi = _chunkJES2EBNOjs.resumeWorkflowNodeApi; exports.retryWorkflowNodeApi = _chunkJES2EBNOjs.retryWorkflowNodeApi; exports.updateWorkflowApi = _chunkJES2EBNOjs.updateWorkflowApi; exports.updateWorkflowInstanceStatusApi = _chunkJES2EBNOjs.updateWorkflowInstanceStatusApi; exports.useWorkflowInstances = _chunkF5G2ALFSjs.useWorkflowInstances; exports.useWorkflowTemplates = _chunkF5G2ALFSjs.useWorkflowTemplates; exports.useWorkflows = _chunkF5G2ALFSjs.useWorkflows; exports.workflowDefinitionReducer = workflowDefinitionReducer; exports.workflowInstanceReducer = workflowInstanceReducer;
3387
+ exports.AccountingNodeSubTypes = AccountingNodeSubTypes; exports.ActionNodeSubTypes = ActionNodeSubTypes; exports.AgentNodeSubTypes = AgentNodeSubTypes; exports.DataNodeSubTypes = DataNodeSubTypes; exports.DelayNodeSubTypes = DelayNodeSubTypes; exports.DynamicSchemaForm = _chunk3GG6KTGJjs.DynamicSchemaForm; exports.EdgeStatusCompleted = _chunk6DV2LPSNjs.EdgeStatusCompleted; exports.EdgeStatusPending = _chunk6DV2LPSNjs.EdgeStatusPending; exports.EdgeStatusSkipped = _chunk6DV2LPSNjs.EdgeStatusSkipped; exports.EdgeTypeCompensation = _chunk6DV2LPSNjs.EdgeTypeCompensation; exports.EdgeTypeConditional = _chunk6DV2LPSNjs.EdgeTypeConditional; exports.EdgeTypeDefault = _chunk6DV2LPSNjs.EdgeTypeDefault; exports.EdgeTypeError = _chunk6DV2LPSNjs.EdgeTypeError; exports.EdgeTypeLoopBack = _chunk6DV2LPSNjs.EdgeTypeLoopBack; exports.EdgeTypeMerge = _chunk6DV2LPSNjs.EdgeTypeMerge; exports.EdgeTypeNormal = _chunk6DV2LPSNjs.EdgeTypeNormal; exports.EdgeTypeParallel = _chunk6DV2LPSNjs.EdgeTypeParallel; exports.EdgeTypeTimeout = _chunk6DV2LPSNjs.EdgeTypeTimeout; exports.ExpressionTypeDSL = _chunk6DV2LPSNjs.ExpressionTypeDSL; exports.ExpressionTypeFilter = _chunk6DV2LPSNjs.ExpressionTypeFilter; exports.ExpressionTypeJavaScript = _chunk6DV2LPSNjs.ExpressionTypeJavaScript; exports.ExpressionTypeRules = _chunk6DV2LPSNjs.ExpressionTypeRules; exports.ExpressionTypeTemplate = _chunk6DV2LPSNjs.ExpressionTypeTemplate; exports.HumanActionNodeSubTypes = HumanActionNodeSubTypes; exports.InstanceStatusCompleted = _chunk6DV2LPSNjs.InstanceStatusCompleted; exports.InstanceStatusFailed = _chunk6DV2LPSNjs.InstanceStatusFailed; exports.InstanceStatusNew = _chunk6DV2LPSNjs.InstanceStatusNew; exports.InstanceStatusPaused = _chunk6DV2LPSNjs.InstanceStatusPaused; exports.InstanceStatusRunning = _chunk6DV2LPSNjs.InstanceStatusRunning; exports.InstanceStatusWaiting = _chunk6DV2LPSNjs.InstanceStatusWaiting; exports.LogicNodeSubTypes = LogicNodeSubTypes; exports.LoopNodeSubTypes = LoopNodeSubTypes; exports.NodeStatusCompleted = _chunk6DV2LPSNjs.NodeStatusCompleted; exports.NodeStatusFailed = _chunk6DV2LPSNjs.NodeStatusFailed; exports.NodeStatusPending = _chunk6DV2LPSNjs.NodeStatusPending; exports.NodeStatusRunning = _chunk6DV2LPSNjs.NodeStatusRunning; exports.NodeStatusSkipped = _chunk6DV2LPSNjs.NodeStatusSkipped; exports.NodeStatusWaiting = _chunk6DV2LPSNjs.NodeStatusWaiting; exports.NodeSubTypeActionApiCall = _chunk6DV2LPSNjs.NodeSubTypeActionApiCall; exports.NodeSubTypeActionAssignSLAPolicy = _chunk6DV2LPSNjs.NodeSubTypeActionAssignSLAPolicy; exports.NodeSubTypeActionCSATSurvey = _chunk6DV2LPSNjs.NodeSubTypeActionCSATSurvey; exports.NodeSubTypeActionChangeSLAStatus = _chunk6DV2LPSNjs.NodeSubTypeActionChangeSLAStatus; exports.NodeSubTypeActionCreateEntityRecord = _chunk6DV2LPSNjs.NodeSubTypeActionCreateEntityRecord; exports.NodeSubTypeActionDeleteEntityRecord = _chunk6DV2LPSNjs.NodeSubTypeActionDeleteEntityRecord; exports.NodeSubTypeActionDocumentExtraction = _chunk6DV2LPSNjs.NodeSubTypeActionDocumentExtraction; exports.NodeSubTypeActionEscalateSLA = _chunk6DV2LPSNjs.NodeSubTypeActionEscalateSLA; exports.NodeSubTypeActionGenerateDocument = _chunk6DV2LPSNjs.NodeSubTypeActionGenerateDocument; exports.NodeSubTypeActionMergeEntityRecords = _chunk6DV2LPSNjs.NodeSubTypeActionMergeEntityRecords; exports.NodeSubTypeActionNatsRequest = _chunk6DV2LPSNjs.NodeSubTypeActionNatsRequest; exports.NodeSubTypeActionProcessPayment = _chunk6DV2LPSNjs.NodeSubTypeActionProcessPayment; exports.NodeSubTypeActionQueryEntityRecords = _chunk6DV2LPSNjs.NodeSubTypeActionQueryEntityRecords; exports.NodeSubTypeActionSendEmail = _chunk6DV2LPSNjs.NodeSubTypeActionSendEmail; exports.NodeSubTypeActionSendSMS = _chunk6DV2LPSNjs.NodeSubTypeActionSendSMS; exports.NodeSubTypeActionSetVariables = _chunk6DV2LPSNjs.NodeSubTypeActionSetVariables; exports.NodeSubTypeActionUpdateEntityRecord = _chunk6DV2LPSNjs.NodeSubTypeActionUpdateEntityRecord; exports.NodeSubTypeAgentApiIntegration = _chunk6DV2LPSNjs.NodeSubTypeAgentApiIntegration; exports.NodeSubTypeAgentChat = _chunk6DV2LPSNjs.NodeSubTypeAgentChat; exports.NodeSubTypeAgentClientApiCall = _chunk6DV2LPSNjs.NodeSubTypeAgentClientApiCall; exports.NodeSubTypeAgentCustomResponse = _chunk6DV2LPSNjs.NodeSubTypeAgentCustomResponse; exports.NodeSubTypeAgentIntentDetector = _chunk6DV2LPSNjs.NodeSubTypeAgentIntentDetector; exports.NodeSubTypeAgentKnowledgeGraph = _chunk6DV2LPSNjs.NodeSubTypeAgentKnowledgeGraph; exports.NodeSubTypeAgentOpenTicket = _chunk6DV2LPSNjs.NodeSubTypeAgentOpenTicket; exports.NodeSubTypeAgentStructuredOutput = _chunk6DV2LPSNjs.NodeSubTypeAgentStructuredOutput; exports.NodeSubTypeAgentTransferToHuman = _chunk6DV2LPSNjs.NodeSubTypeAgentTransferToHuman; exports.NodeSubTypeDataCalculate = _chunk6DV2LPSNjs.NodeSubTypeDataCalculate; exports.NodeSubTypeDataFilter = _chunk6DV2LPSNjs.NodeSubTypeDataFilter; exports.NodeSubTypeDataMap = _chunk6DV2LPSNjs.NodeSubTypeDataMap; exports.NodeSubTypeDataValidate = _chunk6DV2LPSNjs.NodeSubTypeDataValidate; exports.NodeSubTypeDelay = _chunk6DV2LPSNjs.NodeSubTypeDelay; exports.NodeSubTypeHumanActionApproval = _chunk6DV2LPSNjs.NodeSubTypeHumanActionApproval; exports.NodeSubTypeHumanActionAssignment = _chunk6DV2LPSNjs.NodeSubTypeHumanActionAssignment; exports.NodeSubTypeHumanActionDataEntry = _chunk6DV2LPSNjs.NodeSubTypeHumanActionDataEntry; exports.NodeSubTypeHumanActionReview = _chunk6DV2LPSNjs.NodeSubTypeHumanActionReview; exports.NodeSubTypeLogicFor = _chunk6DV2LPSNjs.NodeSubTypeLogicFor; exports.NodeSubTypeLogicIf = _chunk6DV2LPSNjs.NodeSubTypeLogicIf; exports.NodeSubTypeLogicParallel = _chunk6DV2LPSNjs.NodeSubTypeLogicParallel; exports.NodeSubTypeLogicSwitch = _chunk6DV2LPSNjs.NodeSubTypeLogicSwitch; exports.NodeSubTypeLoopData = _chunk6DV2LPSNjs.NodeSubTypeLoopData; exports.NodeSubTypeTimerBusinessHours = _chunk6DV2LPSNjs.NodeSubTypeTimerBusinessHours; exports.NodeSubTypeTimerDelay = _chunk6DV2LPSNjs.NodeSubTypeTimerDelay; exports.NodeSubTypeTimerSchedule = _chunk6DV2LPSNjs.NodeSubTypeTimerSchedule; exports.NodeSubTypeTriggerEntityRecordCreated = _chunk6DV2LPSNjs.NodeSubTypeTriggerEntityRecordCreated; exports.NodeSubTypeTriggerEntityRecordDeleted = _chunk6DV2LPSNjs.NodeSubTypeTriggerEntityRecordDeleted; exports.NodeSubTypeTriggerEntityRecordUpdated = _chunk6DV2LPSNjs.NodeSubTypeTriggerEntityRecordUpdated; exports.NodeSubTypeTriggerEscalation = _chunk6DV2LPSNjs.NodeSubTypeTriggerEscalation; exports.NodeSubTypeTriggerSLABreach = _chunk6DV2LPSNjs.NodeSubTypeTriggerSLABreach; exports.NodeSubTypeTriggerSLAWarning = _chunk6DV2LPSNjs.NodeSubTypeTriggerSLAWarning; exports.NodeSubTypeTriggerStart = _chunk6DV2LPSNjs.NodeSubTypeTriggerStart; exports.NodeSubTypeTriggerWebhookReceived = _chunk6DV2LPSNjs.NodeSubTypeTriggerWebhookReceived; exports.NodeTypeAccounting = _chunk6DV2LPSNjs.NodeTypeAccounting; exports.NodeTypeAction = _chunk6DV2LPSNjs.NodeTypeAction; exports.NodeTypeAgent = _chunk6DV2LPSNjs.NodeTypeAgent; exports.NodeTypeCustom = _chunk6DV2LPSNjs.NodeTypeCustom; exports.NodeTypeData = _chunk6DV2LPSNjs.NodeTypeData; exports.NodeTypeDelay = _chunk6DV2LPSNjs.NodeTypeDelay; exports.NodeTypeDocumentExtraction = _chunk6DV2LPSNjs.NodeTypeDocumentExtraction; exports.NodeTypeHumanAction = _chunk6DV2LPSNjs.NodeTypeHumanAction; exports.NodeTypeIntegration = _chunk6DV2LPSNjs.NodeTypeIntegration; exports.NodeTypeLogic = _chunk6DV2LPSNjs.NodeTypeLogic; exports.NodeTypeLoop = _chunk6DV2LPSNjs.NodeTypeLoop; exports.NodeTypeParallel = _chunk6DV2LPSNjs.NodeTypeParallel; exports.NodeTypeSubflow = _chunk6DV2LPSNjs.NodeTypeSubflow; exports.NodeTypeTimer = _chunk6DV2LPSNjs.NodeTypeTimer; exports.NodeTypeTrigger = _chunk6DV2LPSNjs.NodeTypeTrigger; exports.ParallelNodeSubTypes = ParallelNodeSubTypes; exports.PersistenceTypeEphemeral = _chunk6DV2LPSNjs.PersistenceTypeEphemeral; exports.PersistenceTypePermanent = _chunk6DV2LPSNjs.PersistenceTypePermanent; exports.RuleLevelError = _chunk6DV2LPSNjs.RuleLevelError; exports.RuleLevelInfo = _chunk6DV2LPSNjs.RuleLevelInfo; exports.RuleLevelWarning = _chunk6DV2LPSNjs.RuleLevelWarning; exports.SchemaBuilder = _chunk3GG6KTGJjs.SchemaBuilder; exports.TimeoutActionAlt = _chunk6DV2LPSNjs.TimeoutActionAlt; exports.TimeoutActionFail = _chunk6DV2LPSNjs.TimeoutActionFail; exports.TimeoutActionRetry = _chunk6DV2LPSNjs.TimeoutActionRetry; exports.TimeoutActionSkip = _chunk6DV2LPSNjs.TimeoutActionSkip; exports.TimerNodeSubTypes = TimerNodeSubTypes; exports.TriggerNodeSubTypes = TriggerNodeSubTypes; exports.WorkflowDefinitionCreate = _chunk6DV2LPSNjs.WorkflowDefinitionCreate; exports.WorkflowDefinitionCreated = _chunk6DV2LPSNjs.WorkflowDefinitionCreated; exports.WorkflowDefinitionDelete = _chunk6DV2LPSNjs.WorkflowDefinitionDelete; exports.WorkflowDefinitionDeleted = _chunk6DV2LPSNjs.WorkflowDefinitionDeleted; exports.WorkflowDefinitionGet = _chunk6DV2LPSNjs.WorkflowDefinitionGet; exports.WorkflowDefinitionGetByTitle = _chunk6DV2LPSNjs.WorkflowDefinitionGetByTitle; exports.WorkflowDefinitionGetServer = _chunk6DV2LPSNjs.WorkflowDefinitionGetServer; exports.WorkflowDefinitionList = _chunk6DV2LPSNjs.WorkflowDefinitionList; exports.WorkflowDefinitionUpdate = _chunk6DV2LPSNjs.WorkflowDefinitionUpdate; exports.WorkflowDefinitionUpdated = _chunk6DV2LPSNjs.WorkflowDefinitionUpdated; exports.WorkflowEdgeTypes = WorkflowEdgeTypes; exports.WorkflowExecutionCompleted = _chunk6DV2LPSNjs.WorkflowExecutionCompleted; exports.WorkflowExecutionFailed = _chunk6DV2LPSNjs.WorkflowExecutionFailed; exports.WorkflowExecutionStarted = _chunk6DV2LPSNjs.WorkflowExecutionStarted; exports.WorkflowInstanceCreate = _chunk6DV2LPSNjs.WorkflowInstanceCreate; exports.WorkflowInstanceExecuteNode = _chunk6DV2LPSNjs.WorkflowInstanceExecuteNode; exports.WorkflowInstanceExecuteNodeLean = _chunk6DV2LPSNjs.WorkflowInstanceExecuteNodeLean; exports.WorkflowInstanceExecuteNodeLeanServer = _chunk6DV2LPSNjs.WorkflowInstanceExecuteNodeLeanServer; exports.WorkflowInstanceExecuteNodeServer = _chunk6DV2LPSNjs.WorkflowInstanceExecuteNodeServer; exports.WorkflowInstanceGet = _chunk6DV2LPSNjs.WorkflowInstanceGet; exports.WorkflowInstanceGetByStateVariable = _chunk6DV2LPSNjs.WorkflowInstanceGetByStateVariable; exports.WorkflowInstanceList = _chunk6DV2LPSNjs.WorkflowInstanceList; exports.WorkflowInstanceResumeNode = _chunk6DV2LPSNjs.WorkflowInstanceResumeNode; exports.WorkflowInstanceResumeNodeServer = _chunk6DV2LPSNjs.WorkflowInstanceResumeNodeServer; exports.WorkflowInstanceUpdate = _chunk6DV2LPSNjs.WorkflowInstanceUpdate; exports.WorkflowInstanceUpdateNodeMetadata = _chunk6DV2LPSNjs.WorkflowInstanceUpdateNodeMetadata; exports.WorkflowInstanceUpdated = _chunk6DV2LPSNjs.WorkflowInstanceUpdated; exports.WorkflowNodeTypes = WorkflowNodeTypes; exports.WorkflowScheduleCreate = _chunk6DV2LPSNjs.WorkflowScheduleCreate; exports.WorkflowScheduleDelete = _chunk6DV2LPSNjs.WorkflowScheduleDelete; exports.WorkflowScheduleList = _chunk6DV2LPSNjs.WorkflowScheduleList; exports.WorkflowSchedulePause = _chunk6DV2LPSNjs.WorkflowSchedulePause; exports.WorkflowScheduleResume = _chunk6DV2LPSNjs.WorkflowScheduleResume; exports.WorkflowScheduleUpdate = _chunk6DV2LPSNjs.WorkflowScheduleUpdate; exports.WorkflowTemplateGet = _chunk6DV2LPSNjs.WorkflowTemplateGet; exports.WorkflowTemplateInstantiate = _chunk6DV2LPSNjs.WorkflowTemplateInstantiate; exports.WorkflowTemplateList = _chunk6DV2LPSNjs.WorkflowTemplateList; exports.WorkflowTriggerFired = _chunk6DV2LPSNjs.WorkflowTriggerFired; exports.WorkflowTriggerPause = _chunk6DV2LPSNjs.WorkflowTriggerPause; exports.WorkflowTriggerRegister = _chunk6DV2LPSNjs.WorkflowTriggerRegister; exports.WorkflowTriggerResume = _chunk6DV2LPSNjs.WorkflowTriggerResume; exports.WorkflowTriggerStatus = _chunk6DV2LPSNjs.WorkflowTriggerStatus; exports.WorkflowTypeAgent = _chunk6DV2LPSNjs.WorkflowTypeAgent; exports.WorkflowTypeChat = _chunk6DV2LPSNjs.WorkflowTypeChat; exports.WorkflowTypeDocument = _chunk6DV2LPSNjs.WorkflowTypeDocument; exports.WorkflowTypeEntity = _chunk6DV2LPSNjs.WorkflowTypeEntity; exports.WorkflowTypeProductivity = _chunk6DV2LPSNjs.WorkflowTypeProductivity; exports.WorkflowTypes = WorkflowTypes; exports.createWorkflowApi = _chunkYCO5IFZKjs.createWorkflowApi; exports.createWorkflowInstanceApi = _chunkYCO5IFZKjs.createWorkflowInstanceApi; exports.deleteWorkflowApi = _chunkYCO5IFZKjs.deleteWorkflowApi; exports.executeWorkflowNodeApi = _chunkYCO5IFZKjs.executeWorkflowNodeApi; exports.getWorkflowApi = _chunkYCO5IFZKjs.getWorkflowApi; exports.getWorkflowInstanceApi = _chunkYCO5IFZKjs.getWorkflowInstanceApi; exports.getWorkflowTemplateApi = _chunkYCO5IFZKjs.getWorkflowTemplateApi; exports.instantiateWorkflowTemplateApi = _chunkYCO5IFZKjs.instantiateWorkflowTemplateApi; exports.listWorkflowInstancesApi = _chunkYCO5IFZKjs.listWorkflowInstancesApi; exports.listWorkflowTemplatesApi = _chunkYCO5IFZKjs.listWorkflowTemplatesApi; exports.listWorkflowsApi = _chunkYCO5IFZKjs.listWorkflowsApi; exports.nodeDefinitions = nodeDefinitions; exports.nodeSchemas = nodeSchemas; exports.resumeWorkflowNodeApi = _chunkYCO5IFZKjs.resumeWorkflowNodeApi; exports.retryWorkflowNodeApi = _chunkYCO5IFZKjs.retryWorkflowNodeApi; exports.updateWorkflowApi = _chunkYCO5IFZKjs.updateWorkflowApi; exports.updateWorkflowInstanceStatusApi = _chunkYCO5IFZKjs.updateWorkflowInstanceStatusApi; exports.workflowDefinitionReducer = workflowDefinitionReducer; exports.workflowInstanceReducer = workflowInstanceReducer;
4386
3388
  //# sourceMappingURL=index.js.map