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