@open-mercato/core 0.6.6-develop.6184.1.b7e55f8d61 → 0.6.6-develop.6198.1.0822f97cc6

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 (39) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/modules/auth/frontend/login.js +5 -5
  3. package/dist/modules/auth/frontend/login.js.map +2 -2
  4. package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js +3 -2
  5. package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js.map +2 -2
  6. package/dist/modules/catalog/widgets/injection/product-seo/widget.client.js +26 -14
  7. package/dist/modules/catalog/widgets/injection/product-seo/widget.client.js.map +2 -2
  8. package/dist/modules/customers/api/deals/[id]/route.js +169 -149
  9. package/dist/modules/customers/api/deals/[id]/route.js.map +3 -3
  10. package/dist/modules/customers/components/detail/InlineEditors.js +9 -4
  11. package/dist/modules/customers/components/detail/InlineEditors.js.map +2 -2
  12. package/dist/modules/integrations/backend/integrations/[id]/page.js +13 -9
  13. package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
  14. package/dist/modules/integrations/backend/integrations/detail-page-refresh.js +17 -0
  15. package/dist/modules/integrations/backend/integrations/detail-page-refresh.js.map +7 -0
  16. package/dist/modules/sales/components/documents/SalesDocumentForm.js +299 -297
  17. package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
  18. package/dist/modules/workflows/components/EdgeEditDialog.js +120 -141
  19. package/dist/modules/workflows/components/EdgeEditDialog.js.map +2 -2
  20. package/dist/modules/workflows/components/NodeEditDialog.js +114 -118
  21. package/dist/modules/workflows/components/NodeEditDialog.js.map +2 -2
  22. package/dist/modules/workflows/frontend/checkout-demo/page.js +155 -260
  23. package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
  24. package/package.json +7 -7
  25. package/src/modules/auth/frontend/login.tsx +5 -5
  26. package/src/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.tsx +4 -3
  27. package/src/modules/catalog/widgets/injection/product-seo/widget.client.tsx +27 -17
  28. package/src/modules/customers/api/deals/[id]/route.ts +208 -174
  29. package/src/modules/customers/components/detail/InlineEditors.tsx +6 -10
  30. package/src/modules/integrations/backend/integrations/[id]/page.tsx +13 -9
  31. package/src/modules/integrations/backend/integrations/detail-page-refresh.ts +36 -0
  32. package/src/modules/sales/components/documents/SalesDocumentForm.tsx +351 -327
  33. package/src/modules/workflows/components/EdgeEditDialog.tsx +132 -157
  34. package/src/modules/workflows/components/NodeEditDialog.tsx +116 -121
  35. package/src/modules/workflows/frontend/checkout-demo/page.tsx +172 -239
  36. package/src/modules/workflows/i18n/de.json +2 -0
  37. package/src/modules/workflows/i18n/en.json +2 -0
  38. package/src/modules/workflows/i18n/es.json +2 -0
  39. package/src/modules/workflows/i18n/pl.json +2 -0
@@ -20,8 +20,9 @@ import {
20
20
  SelectValue
21
21
  } from "@open-mercato/ui/primitives/select";
22
22
  import { Badge } from "@open-mercato/ui/primitives/badge";
23
+ import { Checkbox } from "@open-mercato/ui/primitives/checkbox";
23
24
  import { Separator } from "@open-mercato/ui/primitives/separator";
24
- import { Plus, Trash2 } from "lucide-react";
25
+ import { ChevronDown, Plus, Trash2 } from "lucide-react";
25
26
  import { BusinessRulesSelector } from "./BusinessRulesSelector.js";
26
27
  import { JsonBuilder } from "@open-mercato/ui/backend/JsonBuilder";
27
28
  import { useT } from "@open-mercato/shared/lib/i18n/context";
@@ -111,7 +112,7 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
111
112
  maxIntervalMs: 1e4
112
113
  }
113
114
  };
114
- setActivities([...activities, newActivity]);
115
+ setActivities((prev) => [...prev, newActivity]);
115
116
  const newExpanded = new Set(expandedActivities);
116
117
  newExpanded.add(activities.length);
117
118
  setExpandedActivities(newExpanded);
@@ -122,7 +123,7 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
122
123
  variant: "destructive"
123
124
  });
124
125
  if (confirmed) {
125
- setActivities(activities.filter((_, i) => i !== index));
126
+ setActivities((prev) => prev.filter((_, i) => i !== index));
126
127
  const newExpanded = new Set(expandedActivities);
127
128
  newExpanded.delete(index);
128
129
  setExpandedActivities(newExpanded);
@@ -173,23 +174,23 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
173
174
  setRuleDetailsCache((prev) => new Map(prev).set(ruleId, rule));
174
175
  if (ruleSelectorMode === "pre") {
175
176
  if (!preConditions.find((c) => c.ruleId === ruleId)) {
176
- setPreConditions([...preConditions, { ruleId, required: true }]);
177
+ setPreConditions((prev) => [...prev, { ruleId, required: true }]);
177
178
  }
178
179
  } else {
179
180
  if (!postConditions.find((c) => c.ruleId === ruleId)) {
180
- setPostConditions([...postConditions, { ruleId, required: true }]);
181
+ setPostConditions((prev) => [...prev, { ruleId, required: true }]);
181
182
  }
182
183
  }
183
184
  closeRuleSelector();
184
185
  };
185
186
  const removePreCondition = (index) => {
186
- setPreConditions(preConditions.filter((_, i) => i !== index));
187
+ setPreConditions((prev) => prev.filter((_, i) => i !== index));
187
188
  const newExpanded = new Set(expandedPreConditions);
188
189
  newExpanded.delete(index);
189
190
  setExpandedPreConditions(newExpanded);
190
191
  };
191
192
  const removePostCondition = (index) => {
192
- setPostConditions(postConditions.filter((_, i) => i !== index));
193
+ setPostConditions((prev) => prev.filter((_, i) => i !== index));
193
194
  const newExpanded = new Set(expandedPostConditions);
194
195
  newExpanded.delete(index);
195
196
  setExpandedPostConditions(newExpanded);
@@ -308,13 +309,11 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
308
309
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
309
310
  /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
310
311
  /* @__PURE__ */ jsx(
311
- "input",
312
+ Checkbox,
312
313
  {
313
- type: "checkbox",
314
314
  id: "continueOnActivityFailure",
315
315
  checked: continueOnActivityFailure,
316
- onChange: (e) => setContinueOnActivityFailure(e.target.checked),
317
- className: "h-4 w-4 rounded border-gray-300"
316
+ onCheckedChange: (checked) => setContinueOnActivityFailure(checked === true)
318
317
  }
319
318
  ),
320
319
  /* @__PURE__ */ jsx(Label, { htmlFor: "continueOnActivityFailure", className: "font-normal cursor-pointer", children: t("workflows.edgeEditor.continueOnActivityFailure") })
@@ -350,43 +349,40 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
350
349
  /* @__PURE__ */ jsx("div", { className: "space-y-2", children: preConditions.map((condition, index) => {
351
350
  const isExpanded = expandedPreConditions.has(index);
352
351
  const rule = getBusinessRuleDetails(condition.ruleId);
353
- return /* @__PURE__ */ jsxs("div", { className: "border border-gray-200 rounded-lg bg-gray-50", children: [
352
+ return /* @__PURE__ */ jsxs("div", { className: "border border-border rounded-lg bg-muted", children: [
354
353
  /* @__PURE__ */ jsxs(
355
- "button",
354
+ Button,
356
355
  {
357
356
  type: "button",
357
+ variant: "ghost",
358
358
  onClick: () => togglePreCondition(index),
359
- className: "w-full px-4 py-3 text-left flex items-center justify-between hover:bg-gray-100 transition-colors rounded-t-lg",
359
+ className: "h-auto w-full justify-between rounded-t-lg px-4 py-3 text-left hover:bg-muted/80",
360
360
  children: [
361
361
  /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
362
362
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
363
- /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-gray-900", children: rule?.ruleName || condition.ruleId }),
364
- condition.required && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-800", children: t("workflows.edgeEditor.required") }),
365
- rule && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-purple-100 text-purple-800", children: rule.ruleType })
363
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: rule?.ruleName || condition.ruleId }),
364
+ condition.required && /* @__PURE__ */ jsx(Badge, { variant: "destructive", className: "text-xs", children: t("workflows.edgeEditor.required") }),
365
+ rule && /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs", children: rule.ruleType })
366
366
  ] }),
367
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-gray-600 mt-1", children: [
367
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-1", children: [
368
368
  t("workflows.edgeEditor.ruleId"),
369
369
  ": ",
370
- /* @__PURE__ */ jsx("code", { className: "bg-white px-1 rounded", children: condition.ruleId })
370
+ /* @__PURE__ */ jsx("code", { className: "bg-background px-1 rounded", children: condition.ruleId })
371
371
  ] }),
372
- rule?.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 mt-1 line-clamp-1", children: rule.description })
372
+ rule?.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1 line-clamp-1", children: rule.description })
373
373
  ] }),
374
374
  /* @__PURE__ */ jsx(
375
- "svg",
375
+ ChevronDown,
376
376
  {
377
- className: `w-5 h-5 text-gray-400 transition-transform ${isExpanded ? "rotate-180" : ""}`,
378
- fill: "none",
379
- stroke: "currentColor",
380
- viewBox: "0 0 24 24",
381
- children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
377
+ className: `size-5 text-muted-foreground transition-transform ${isExpanded ? "rotate-180" : ""}`
382
378
  }
383
379
  )
384
380
  ]
385
381
  }
386
382
  ),
387
- isExpanded && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4 space-y-3 border-t border-gray-200 bg-white", children: [
383
+ isExpanded && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4 space-y-3 border-t border-border bg-background", children: [
388
384
  /* @__PURE__ */ jsxs("div", { className: "pt-3", children: [
389
- /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: t("workflows.edgeEditor.ruleId") }),
385
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-foreground mb-1", children: t("workflows.edgeEditor.ruleId") }),
390
386
  /* @__PURE__ */ jsx(
391
387
  Input,
392
388
  {
@@ -397,48 +393,46 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
397
393
  }
398
394
  )
399
395
  ] }),
400
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-xs font-medium text-gray-700", children: [
396
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-xs font-medium text-foreground", children: [
401
397
  /* @__PURE__ */ jsx(
402
- "input",
398
+ Checkbox,
403
399
  {
404
- type: "checkbox",
405
400
  checked: condition.required,
406
- onChange: (e) => updatePreCondition(index, "required", e.target.checked),
407
- className: "rounded border-gray-300 text-blue-600 focus-visible:ring-ring"
401
+ onCheckedChange: (checked) => updatePreCondition(index, "required", checked === true)
408
402
  }
409
403
  ),
410
404
  t("workflows.edgeEditor.requiredCheckbox")
411
405
  ] }) }),
412
- rule && /* @__PURE__ */ jsxs("div", { className: "border-t border-gray-200 pt-3", children: [
413
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-gray-900 mb-2", children: t("workflows.edgeEditor.businessRuleDetails") }),
406
+ rule && /* @__PURE__ */ jsxs("div", { className: "border-t border-border pt-3", children: [
407
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-foreground mb-2", children: t("workflows.edgeEditor.businessRuleDetails") }),
414
408
  /* @__PURE__ */ jsxs("dl", { className: "space-y-1 text-xs", children: [
415
409
  /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
416
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700", children: "Name:" }),
417
- /* @__PURE__ */ jsx("dd", { className: "text-gray-900", children: rule.ruleName })
410
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground", children: "Name:" }),
411
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: rule.ruleName })
418
412
  ] }),
419
413
  /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
420
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700", children: "Type:" }),
421
- /* @__PURE__ */ jsx("dd", { className: "text-gray-900", children: rule.ruleType })
414
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground", children: "Type:" }),
415
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: rule.ruleType })
422
416
  ] }),
423
417
  rule.ruleCategory && /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
424
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700", children: "Category:" }),
425
- /* @__PURE__ */ jsx("dd", { className: "text-gray-900", children: rule.ruleCategory })
418
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground", children: "Category:" }),
419
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: rule.ruleCategory })
426
420
  ] }),
427
421
  /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
428
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700", children: "Entity Type:" }),
429
- /* @__PURE__ */ jsx("dd", { className: "text-gray-900 font-mono text-xs", children: rule.entityType })
422
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground", children: "Entity Type:" }),
423
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground font-mono text-xs", children: rule.entityType })
430
424
  ] }),
431
425
  rule.eventType && /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
432
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700", children: "Event Type:" }),
433
- /* @__PURE__ */ jsx("dd", { className: "text-gray-900", children: rule.eventType })
426
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground", children: "Event Type:" }),
427
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: rule.eventType })
434
428
  ] }),
435
- rule.description && /* @__PURE__ */ jsxs("div", { className: "mt-2 pt-2 border-t border-gray-200", children: [
436
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700 mb-1", children: "Description:" }),
437
- /* @__PURE__ */ jsx("dd", { className: "text-gray-600", children: rule.description })
429
+ rule.description && /* @__PURE__ */ jsxs("div", { className: "mt-2 pt-2 border-t border-border", children: [
430
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground mb-1", children: "Description:" }),
431
+ /* @__PURE__ */ jsx("dd", { className: "text-muted-foreground", children: rule.description })
438
432
  ] })
439
433
  ] })
440
434
  ] }),
441
- /* @__PURE__ */ jsx("div", { className: "border-t border-gray-200 pt-3", children: /* @__PURE__ */ jsxs(
435
+ /* @__PURE__ */ jsx("div", { className: "border-t border-border pt-3", children: /* @__PURE__ */ jsxs(
442
436
  Button,
443
437
  {
444
438
  type: "button",
@@ -483,43 +477,40 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
483
477
  /* @__PURE__ */ jsx("div", { className: "space-y-2", children: postConditions.map((condition, index) => {
484
478
  const isExpanded = expandedPostConditions.has(index);
485
479
  const rule = getBusinessRuleDetails(condition.ruleId);
486
- return /* @__PURE__ */ jsxs("div", { className: "border border-gray-200 rounded-lg bg-gray-50", children: [
480
+ return /* @__PURE__ */ jsxs("div", { className: "border border-border rounded-lg bg-muted", children: [
487
481
  /* @__PURE__ */ jsxs(
488
- "button",
482
+ Button,
489
483
  {
490
484
  type: "button",
485
+ variant: "ghost",
491
486
  onClick: () => togglePostCondition(index),
492
- className: "w-full px-4 py-3 text-left flex items-center justify-between hover:bg-gray-100 transition-colors rounded-t-lg",
487
+ className: "h-auto w-full justify-between rounded-t-lg px-4 py-3 text-left hover:bg-muted/80",
493
488
  children: [
494
489
  /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
495
490
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
496
- /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-gray-900", children: rule?.ruleName || condition.ruleId }),
497
- condition.required && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-800", children: t("workflows.edgeEditor.required") }),
498
- rule && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-purple-100 text-purple-800", children: rule.ruleType })
491
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: rule?.ruleName || condition.ruleId }),
492
+ condition.required && /* @__PURE__ */ jsx(Badge, { variant: "destructive", className: "text-xs", children: t("workflows.edgeEditor.required") }),
493
+ rule && /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs", children: rule.ruleType })
499
494
  ] }),
500
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-gray-600 mt-1", children: [
495
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-1", children: [
501
496
  t("workflows.edgeEditor.ruleId"),
502
497
  ": ",
503
- /* @__PURE__ */ jsx("code", { className: "bg-white px-1 rounded", children: condition.ruleId })
498
+ /* @__PURE__ */ jsx("code", { className: "bg-background px-1 rounded", children: condition.ruleId })
504
499
  ] }),
505
- rule?.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 mt-1 line-clamp-1", children: rule.description })
500
+ rule?.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1 line-clamp-1", children: rule.description })
506
501
  ] }),
507
502
  /* @__PURE__ */ jsx(
508
- "svg",
503
+ ChevronDown,
509
504
  {
510
- className: `w-5 h-5 text-gray-400 transition-transform ${isExpanded ? "rotate-180" : ""}`,
511
- fill: "none",
512
- stroke: "currentColor",
513
- viewBox: "0 0 24 24",
514
- children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
505
+ className: `size-5 text-muted-foreground transition-transform ${isExpanded ? "rotate-180" : ""}`
515
506
  }
516
507
  )
517
508
  ]
518
509
  }
519
510
  ),
520
- isExpanded && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4 space-y-3 border-t border-gray-200 bg-white", children: [
511
+ isExpanded && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4 space-y-3 border-t border-border bg-background", children: [
521
512
  /* @__PURE__ */ jsxs("div", { className: "pt-3", children: [
522
- /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: t("workflows.edgeEditor.ruleId") }),
513
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-foreground mb-1", children: t("workflows.edgeEditor.ruleId") }),
523
514
  /* @__PURE__ */ jsx(
524
515
  Input,
525
516
  {
@@ -530,48 +521,46 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
530
521
  }
531
522
  )
532
523
  ] }),
533
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-xs font-medium text-gray-700", children: [
524
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-xs font-medium text-foreground", children: [
534
525
  /* @__PURE__ */ jsx(
535
- "input",
526
+ Checkbox,
536
527
  {
537
- type: "checkbox",
538
528
  checked: condition.required,
539
- onChange: (e) => updatePostCondition(index, "required", e.target.checked),
540
- className: "rounded border-gray-300 text-blue-600 focus-visible:ring-ring"
529
+ onCheckedChange: (checked) => updatePostCondition(index, "required", checked === true)
541
530
  }
542
531
  ),
543
532
  t("workflows.edgeEditor.requiredPostCheckbox")
544
533
  ] }) }),
545
- rule && /* @__PURE__ */ jsxs("div", { className: "border-t border-gray-200 pt-3", children: [
546
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-gray-900 mb-2", children: t("workflows.edgeEditor.businessRuleDetails") }),
534
+ rule && /* @__PURE__ */ jsxs("div", { className: "border-t border-border pt-3", children: [
535
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-foreground mb-2", children: t("workflows.edgeEditor.businessRuleDetails") }),
547
536
  /* @__PURE__ */ jsxs("dl", { className: "space-y-1 text-xs", children: [
548
537
  /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
549
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700", children: "Name:" }),
550
- /* @__PURE__ */ jsx("dd", { className: "text-gray-900", children: rule.ruleName })
538
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground", children: "Name:" }),
539
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: rule.ruleName })
551
540
  ] }),
552
541
  /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
553
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700", children: "Type:" }),
554
- /* @__PURE__ */ jsx("dd", { className: "text-gray-900", children: rule.ruleType })
542
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground", children: "Type:" }),
543
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: rule.ruleType })
555
544
  ] }),
556
545
  rule.ruleCategory && /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
557
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700", children: "Category:" }),
558
- /* @__PURE__ */ jsx("dd", { className: "text-gray-900", children: rule.ruleCategory })
546
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground", children: "Category:" }),
547
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: rule.ruleCategory })
559
548
  ] }),
560
549
  /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
561
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700", children: "Entity Type:" }),
562
- /* @__PURE__ */ jsx("dd", { className: "text-gray-900 font-mono text-xs", children: rule.entityType })
550
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground", children: "Entity Type:" }),
551
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground font-mono text-xs", children: rule.entityType })
563
552
  ] }),
564
553
  rule.eventType && /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
565
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700", children: "Event Type:" }),
566
- /* @__PURE__ */ jsx("dd", { className: "text-gray-900", children: rule.eventType })
554
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground", children: "Event Type:" }),
555
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: rule.eventType })
567
556
  ] }),
568
- rule.description && /* @__PURE__ */ jsxs("div", { className: "mt-2 pt-2 border-t border-gray-200", children: [
569
- /* @__PURE__ */ jsx("dt", { className: "font-medium text-gray-700 mb-1", children: "Description:" }),
570
- /* @__PURE__ */ jsx("dd", { className: "text-gray-600", children: rule.description })
557
+ rule.description && /* @__PURE__ */ jsxs("div", { className: "mt-2 pt-2 border-t border-border", children: [
558
+ /* @__PURE__ */ jsx("dt", { className: "font-medium text-foreground mb-1", children: "Description:" }),
559
+ /* @__PURE__ */ jsx("dd", { className: "text-muted-foreground", children: rule.description })
571
560
  ] })
572
561
  ] })
573
562
  ] }),
574
- /* @__PURE__ */ jsx("div", { className: "border-t border-gray-200 pt-3", children: /* @__PURE__ */ jsxs(
563
+ /* @__PURE__ */ jsx("div", { className: "border-t border-border pt-3", children: /* @__PURE__ */ jsxs(
575
564
  Button,
576
565
  {
577
566
  type: "button",
@@ -588,9 +577,9 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
588
577
  ] }, index);
589
578
  }) })
590
579
  ] }),
591
- /* @__PURE__ */ jsxs("div", { className: "border-t border-gray-200 pt-4 mt-4", children: [
580
+ /* @__PURE__ */ jsxs("div", { className: "border-t border-border pt-4 mt-4", children: [
592
581
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
593
- /* @__PURE__ */ jsxs("h3", { className: "text-sm font-semibold text-gray-900", children: [
582
+ /* @__PURE__ */ jsxs("h3", { className: "text-sm font-semibold text-foreground", children: [
594
583
  t("workflows.edgeEditor.activities"),
595
584
  " (",
596
585
  activities.length,
@@ -609,44 +598,41 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
609
598
  }
610
599
  )
611
600
  ] }),
612
- activities.length === 0 && /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-sm text-gray-500 bg-gray-50 rounded-lg border border-gray-200", children: t("workflows.edgeEditor.noActivities") }),
601
+ activities.length === 0 && /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-sm text-muted-foreground bg-muted rounded-lg border border-border", children: t("workflows.edgeEditor.noActivities") }),
613
602
  /* @__PURE__ */ jsx("div", { className: "space-y-2", children: activities.map((activity, index) => {
614
603
  const isExpanded = expandedActivities.has(index);
615
- return /* @__PURE__ */ jsxs("div", { className: "border border-gray-200 rounded-lg bg-gray-50", children: [
604
+ return /* @__PURE__ */ jsxs("div", { className: "border border-border rounded-lg bg-muted", children: [
616
605
  /* @__PURE__ */ jsxs(
617
- "button",
606
+ Button,
618
607
  {
619
608
  type: "button",
609
+ variant: "ghost",
620
610
  onClick: () => toggleActivity(index),
621
- className: "w-full px-4 py-3 text-left flex items-center justify-between hover:bg-gray-100 transition-colors rounded-t-lg",
611
+ className: "h-auto w-full justify-between rounded-t-lg px-4 py-3 text-left hover:bg-muted/80",
622
612
  children: [
623
613
  /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
624
614
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
625
- /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-gray-900", children: activity.activityName || activity.label || activity.activityId || `Activity ${index + 1}` }),
615
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: activity.activityName || activity.label || activity.activityId || `Activity ${index + 1}` }),
626
616
  /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs", children: activity.activityType })
627
617
  ] }),
628
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-gray-600 mt-1", children: [
618
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-1", children: [
629
619
  t("workflows.edgeEditor.activityId"),
630
620
  ": ",
631
- /* @__PURE__ */ jsx("code", { className: "bg-white px-1 rounded", children: activity.activityId })
621
+ /* @__PURE__ */ jsx("code", { className: "bg-background px-1 rounded", children: activity.activityId })
632
622
  ] })
633
623
  ] }),
634
624
  /* @__PURE__ */ jsx(
635
- "svg",
625
+ ChevronDown,
636
626
  {
637
- className: `w-5 h-5 text-gray-400 transition-transform ${isExpanded ? "rotate-180" : ""}`,
638
- fill: "none",
639
- stroke: "currentColor",
640
- viewBox: "0 0 24 24",
641
- children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
627
+ className: `size-5 text-muted-foreground transition-transform ${isExpanded ? "rotate-180" : ""}`
642
628
  }
643
629
  )
644
630
  ]
645
631
  }
646
632
  ),
647
- isExpanded && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4 space-y-3 border-t border-gray-200 bg-white", children: [
633
+ isExpanded && /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4 space-y-3 border-t border-border bg-background", children: [
648
634
  /* @__PURE__ */ jsxs("div", { className: "pt-3", children: [
649
- /* @__PURE__ */ jsxs("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: [
635
+ /* @__PURE__ */ jsxs("label", { className: "block text-xs font-medium text-foreground mb-1", children: [
650
636
  t("workflows.edgeEditor.activityId"),
651
637
  " *"
652
638
  ] }),
@@ -662,7 +648,7 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
662
648
  )
663
649
  ] }),
664
650
  /* @__PURE__ */ jsxs("div", { children: [
665
- /* @__PURE__ */ jsxs("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: [
651
+ /* @__PURE__ */ jsxs("label", { className: "block text-xs font-medium text-foreground mb-1", children: [
666
652
  t("workflows.edgeEditor.activityName"),
667
653
  " *"
668
654
  ] }),
@@ -678,7 +664,7 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
678
664
  )
679
665
  ] }),
680
666
  /* @__PURE__ */ jsxs("div", { children: [
681
- /* @__PURE__ */ jsxs("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: [
667
+ /* @__PURE__ */ jsxs("label", { className: "block text-xs font-medium text-foreground mb-1", children: [
682
668
  t("workflows.edgeEditor.activityType"),
683
669
  " *"
684
670
  ] }),
@@ -703,7 +689,7 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
703
689
  )
704
690
  ] }),
705
691
  /* @__PURE__ */ jsxs("div", { children: [
706
- /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: t("workflows.edgeEditor.timeout") }),
692
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-foreground mb-1", children: t("workflows.edgeEditor.timeout") }),
707
693
  /* @__PURE__ */ jsx(
708
694
  Input,
709
695
  {
@@ -714,13 +700,13 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
714
700
  placeholder: t("workflows.edgeEditor.timeoutPlaceholder")
715
701
  }
716
702
  ),
717
- /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 mt-0.5", children: t("workflows.edgeEditor.timeoutHint") })
703
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: t("workflows.edgeEditor.timeoutHint") })
718
704
  ] }),
719
- /* @__PURE__ */ jsxs("div", { className: "border-t border-gray-200 pt-3", children: [
720
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-gray-900 mb-2", children: t("workflows.edgeEditor.retryPolicy") }),
705
+ /* @__PURE__ */ jsxs("div", { className: "border-t border-border pt-3", children: [
706
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-foreground mb-2", children: t("workflows.edgeEditor.retryPolicy") }),
721
707
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-2", children: [
722
708
  /* @__PURE__ */ jsxs("div", { children: [
723
- /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: t("workflows.edgeEditor.maxAttempts") }),
709
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-foreground mb-1", children: t("workflows.edgeEditor.maxAttempts") }),
724
710
  /* @__PURE__ */ jsx(
725
711
  Input,
726
712
  {
@@ -735,7 +721,7 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
735
721
  )
736
722
  ] }),
737
723
  /* @__PURE__ */ jsxs("div", { children: [
738
- /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: t("workflows.edgeEditor.initialInterval") }),
724
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-foreground mb-1", children: t("workflows.edgeEditor.initialInterval") }),
739
725
  /* @__PURE__ */ jsx(
740
726
  Input,
741
727
  {
@@ -749,7 +735,7 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
749
735
  )
750
736
  ] }),
751
737
  /* @__PURE__ */ jsxs("div", { children: [
752
- /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: t("workflows.edgeEditor.backoffCoefficient") }),
738
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-foreground mb-1", children: t("workflows.edgeEditor.backoffCoefficient") }),
753
739
  /* @__PURE__ */ jsx(
754
740
  Input,
755
741
  {
@@ -765,7 +751,7 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
765
751
  )
766
752
  ] }),
767
753
  /* @__PURE__ */ jsxs("div", { children: [
768
- /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: t("workflows.edgeEditor.maxInterval") }),
754
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-foreground mb-1", children: t("workflows.edgeEditor.maxInterval") }),
769
755
  /* @__PURE__ */ jsx(
770
756
  Input,
771
757
  {
@@ -780,39 +766,35 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
780
766
  ] })
781
767
  ] })
782
768
  ] }),
783
- /* @__PURE__ */ jsxs("div", { className: "border-t border-gray-200 pt-3", children: [
784
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-gray-900 mb-2", children: t("workflows.edgeEditor.activityOptions") }),
769
+ /* @__PURE__ */ jsxs("div", { className: "border-t border-border pt-3", children: [
770
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-foreground mb-2", children: t("workflows.edgeEditor.activityOptions") }),
785
771
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
786
772
  /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
787
773
  /* @__PURE__ */ jsx(
788
- "input",
774
+ Checkbox,
789
775
  {
790
- type: "checkbox",
791
776
  id: `activity-async-${index}`,
792
777
  checked: activity.async || false,
793
- onChange: (e) => updateActivity(index, "async", e.target.checked),
794
- className: "h-4 w-4 rounded border-gray-300"
778
+ onCheckedChange: (checked) => updateActivity(index, "async", checked === true)
795
779
  }
796
780
  ),
797
- /* @__PURE__ */ jsx("label", { htmlFor: `activity-async-${index}`, className: "text-xs text-gray-700 cursor-pointer", children: t("workflows.edgeEditor.asyncOption") })
781
+ /* @__PURE__ */ jsx("label", { htmlFor: `activity-async-${index}`, className: "text-xs text-foreground cursor-pointer", children: t("workflows.edgeEditor.asyncOption") })
798
782
  ] }),
799
783
  /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
800
784
  /* @__PURE__ */ jsx(
801
- "input",
785
+ Checkbox,
802
786
  {
803
- type: "checkbox",
804
787
  id: `activity-compensate-${index}`,
805
788
  checked: activity.compensate || false,
806
- onChange: (e) => updateActivity(index, "compensate", e.target.checked),
807
- className: "h-4 w-4 rounded border-gray-300"
789
+ onCheckedChange: (checked) => updateActivity(index, "compensate", checked === true)
808
790
  }
809
791
  ),
810
- /* @__PURE__ */ jsx("label", { htmlFor: `activity-compensate-${index}`, className: "text-xs text-gray-700 cursor-pointer", children: t("workflows.edgeEditor.compensateOption") })
792
+ /* @__PURE__ */ jsx("label", { htmlFor: `activity-compensate-${index}`, className: "text-xs text-foreground cursor-pointer", children: t("workflows.edgeEditor.compensateOption") })
811
793
  ] })
812
794
  ] })
813
795
  ] }),
814
- /* @__PURE__ */ jsxs("div", { className: "border-t border-gray-200 pt-3", children: [
815
- /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: t("workflows.edgeEditor.configurationJson") }),
796
+ /* @__PURE__ */ jsxs("div", { className: "border-t border-border pt-3", children: [
797
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-foreground mb-1", children: t("workflows.edgeEditor.configurationJson") }),
816
798
  /* @__PURE__ */ jsx(
817
799
  JsonBuilder,
818
800
  {
@@ -824,9 +806,9 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
824
806
  }
825
807
  }
826
808
  ),
827
- /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 mt-0.5", children: t("workflows.edgeEditor.configurationHint") })
809
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: t("workflows.edgeEditor.configurationHint") })
828
810
  ] }),
829
- /* @__PURE__ */ jsx("div", { className: "border-t border-gray-200 pt-3", children: /* @__PURE__ */ jsxs(
811
+ /* @__PURE__ */ jsx("div", { className: "border-t border-border pt-3", children: /* @__PURE__ */ jsxs(
830
812
  Button,
831
813
  {
832
814
  type: "button",
@@ -843,23 +825,20 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
843
825
  ] }, index);
844
826
  }) })
845
827
  ] }),
846
- /* @__PURE__ */ jsxs("div", { className: "border-t border-gray-200 pt-4 mt-4", children: [
828
+ /* @__PURE__ */ jsxs("div", { className: "border-t border-border pt-4 mt-4", children: [
847
829
  /* @__PURE__ */ jsxs(
848
- "button",
830
+ Button,
849
831
  {
850
832
  type: "button",
833
+ variant: "ghost",
851
834
  onClick: () => setShowAdvanced(!showAdvanced),
852
- className: "flex items-center justify-between w-full text-left",
835
+ className: "h-auto w-full justify-between px-0 py-0 text-left hover:bg-transparent",
853
836
  children: [
854
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900", children: t("workflows.edgeEditor.advancedConfiguration") }),
837
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: t("workflows.edgeEditor.advancedConfiguration") }),
855
838
  /* @__PURE__ */ jsx(
856
- "svg",
839
+ ChevronDown,
857
840
  {
858
- className: `w-5 h-5 transition-transform ${showAdvanced ? "rotate-180" : ""}`,
859
- fill: "none",
860
- stroke: "currentColor",
861
- viewBox: "0 0 24 24",
862
- children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
841
+ className: `size-5 transition-transform ${showAdvanced ? "rotate-180" : ""}`
863
842
  }
864
843
  )
865
844
  ]
@@ -873,7 +852,7 @@ function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }) {
873
852
  onChange: setAdvancedConfig
874
853
  }
875
854
  ),
876
- /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 mt-1", children: t("workflows.edgeEditor.advancedConfigHint") })
855
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: t("workflows.edgeEditor.advancedConfigHint") })
877
856
  ] })
878
857
  ] })
879
858
  ] }),