@open-mercato/core 0.6.6-develop.6184.1.b7e55f8d61 → 0.6.6-develop.6201.1.8ceb502c4b

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 (63) 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/bundle/[id]/page.js +81 -37
  15. package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js.map +2 -2
  16. package/dist/modules/integrations/backend/integrations/detail-page-refresh.js +17 -0
  17. package/dist/modules/integrations/backend/integrations/detail-page-refresh.js.map +7 -0
  18. package/dist/modules/integrations/backend/integrations/page.js +45 -24
  19. package/dist/modules/integrations/backend/integrations/page.js.map +2 -2
  20. package/dist/modules/notifications/api/[id]/action/route.js +18 -3
  21. package/dist/modules/notifications/api/[id]/action/route.js.map +2 -2
  22. package/dist/modules/notifications/api/[id]/restore/route.js +19 -3
  23. package/dist/modules/notifications/api/[id]/restore/route.js.map +2 -2
  24. package/dist/modules/notifications/api/mark-all-read/route.js +18 -4
  25. package/dist/modules/notifications/api/mark-all-read/route.js.map +2 -2
  26. package/dist/modules/notifications/api/route.js +17 -4
  27. package/dist/modules/notifications/api/route.js.map +2 -2
  28. package/dist/modules/notifications/api/settings/route.js +26 -5
  29. package/dist/modules/notifications/api/settings/route.js.map +2 -2
  30. package/dist/modules/notifications/lib/routeHelpers.js +64 -5
  31. package/dist/modules/notifications/lib/routeHelpers.js.map +2 -2
  32. package/dist/modules/sales/components/documents/SalesDocumentForm.js +299 -297
  33. package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
  34. package/dist/modules/workflows/components/EdgeEditDialog.js +120 -141
  35. package/dist/modules/workflows/components/EdgeEditDialog.js.map +2 -2
  36. package/dist/modules/workflows/components/NodeEditDialog.js +114 -118
  37. package/dist/modules/workflows/components/NodeEditDialog.js.map +2 -2
  38. package/dist/modules/workflows/frontend/checkout-demo/page.js +155 -260
  39. package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
  40. package/package.json +7 -7
  41. package/src/modules/auth/frontend/login.tsx +5 -5
  42. package/src/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.tsx +4 -3
  43. package/src/modules/catalog/widgets/injection/product-seo/widget.client.tsx +27 -17
  44. package/src/modules/customers/api/deals/[id]/route.ts +208 -174
  45. package/src/modules/customers/components/detail/InlineEditors.tsx +6 -10
  46. package/src/modules/integrations/backend/integrations/[id]/page.tsx +13 -9
  47. package/src/modules/integrations/backend/integrations/bundle/[id]/page.tsx +78 -35
  48. package/src/modules/integrations/backend/integrations/detail-page-refresh.ts +36 -0
  49. package/src/modules/integrations/backend/integrations/page.tsx +42 -21
  50. package/src/modules/notifications/api/[id]/action/route.ts +17 -2
  51. package/src/modules/notifications/api/[id]/restore/route.ts +19 -3
  52. package/src/modules/notifications/api/mark-all-read/route.ts +18 -4
  53. package/src/modules/notifications/api/route.ts +16 -3
  54. package/src/modules/notifications/api/settings/route.ts +26 -5
  55. package/src/modules/notifications/lib/routeHelpers.ts +101 -4
  56. package/src/modules/sales/components/documents/SalesDocumentForm.tsx +351 -327
  57. package/src/modules/workflows/components/EdgeEditDialog.tsx +132 -157
  58. package/src/modules/workflows/components/NodeEditDialog.tsx +116 -121
  59. package/src/modules/workflows/frontend/checkout-demo/page.tsx +172 -239
  60. package/src/modules/workflows/i18n/de.json +2 -0
  61. package/src/modules/workflows/i18n/en.json +2 -0
  62. package/src/modules/workflows/i18n/es.json +2 -0
  63. package/src/modules/workflows/i18n/pl.json +2 -0
@@ -21,8 +21,9 @@ import {
21
21
  SelectValue,
22
22
  } from '@open-mercato/ui/primitives/select'
23
23
  import {Badge} from '@open-mercato/ui/primitives/badge'
24
+ import {Checkbox} from '@open-mercato/ui/primitives/checkbox'
24
25
  import {Separator} from '@open-mercato/ui/primitives/separator'
25
- import {Plus, Trash2} from 'lucide-react'
26
+ import {ChevronDown, Plus, Trash2} from 'lucide-react'
26
27
  import {type BusinessRule, BusinessRulesSelector} from './BusinessRulesSelector'
27
28
  import {JsonBuilder} from '@open-mercato/ui/backend/JsonBuilder'
28
29
  import {useT} from '@open-mercato/shared/lib/i18n/context'
@@ -160,7 +161,7 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
160
161
  maxIntervalMs: 10000,
161
162
  },
162
163
  }
163
- setActivities([...activities, newActivity])
164
+ setActivities(prev => [...prev, newActivity])
164
165
  // Auto-expand the new activity
165
166
  const newExpanded = new Set(expandedActivities)
166
167
  newExpanded.add(activities.length)
@@ -173,7 +174,7 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
173
174
  variant: 'destructive',
174
175
  })
175
176
  if (confirmed) {
176
- setActivities(activities.filter((_, i) => i !== index))
177
+ setActivities(prev => prev.filter((_, i) => i !== index))
177
178
  // Remove from expanded set
178
179
  const newExpanded = new Set(expandedActivities)
179
180
  newExpanded.delete(index)
@@ -235,25 +236,25 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
235
236
 
236
237
  if (ruleSelectorMode === 'pre') {
237
238
  if (!preConditions.find(c => c.ruleId === ruleId)) {
238
- setPreConditions([...preConditions, { ruleId, required: true }])
239
+ setPreConditions(prev => [...prev, { ruleId, required: true }])
239
240
  }
240
241
  } else {
241
242
  if (!postConditions.find(c => c.ruleId === ruleId)) {
242
- setPostConditions([...postConditions, { ruleId, required: true }])
243
+ setPostConditions(prev => [...prev, { ruleId, required: true }])
243
244
  }
244
245
  }
245
246
  closeRuleSelector()
246
247
  }
247
248
 
248
249
  const removePreCondition = (index: number) => {
249
- setPreConditions(preConditions.filter((_, i) => i !== index))
250
+ setPreConditions(prev => prev.filter((_, i) => i !== index))
250
251
  const newExpanded = new Set(expandedPreConditions)
251
252
  newExpanded.delete(index)
252
253
  setExpandedPreConditions(newExpanded)
253
254
  }
254
255
 
255
256
  const removePostCondition = (index: number) => {
256
- setPostConditions(postConditions.filter((_, i) => i !== index))
257
+ setPostConditions(prev => prev.filter((_, i) => i !== index))
257
258
  const newExpanded = new Set(expandedPostConditions)
258
259
  newExpanded.delete(index)
259
260
  setExpandedPostConditions(newExpanded)
@@ -391,12 +392,10 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
391
392
 
392
393
  <div className="space-y-2">
393
394
  <div className="flex items-center space-x-2">
394
- <input
395
- type="checkbox"
395
+ <Checkbox
396
396
  id="continueOnActivityFailure"
397
397
  checked={continueOnActivityFailure}
398
- onChange={(e) => setContinueOnActivityFailure(e.target.checked)}
399
- className="h-4 w-4 rounded border-gray-300"
398
+ onCheckedChange={(checked) => setContinueOnActivityFailure(checked === true)}
400
399
  />
401
400
  <Label htmlFor="continueOnActivityFailure" className="font-normal cursor-pointer">
402
401
  {t('workflows.edgeEditor.continueOnActivityFailure')}
@@ -441,49 +440,45 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
441
440
  const isExpanded = expandedPreConditions.has(index)
442
441
  const rule = getBusinessRuleDetails(condition.ruleId)
443
442
  return (
444
- <div key={index} className="border border-gray-200 rounded-lg bg-gray-50">
445
- <button
443
+ <div key={index} className="border border-border rounded-lg bg-muted">
444
+ <Button
446
445
  type="button"
446
+ variant="ghost"
447
447
  onClick={() => togglePreCondition(index)}
448
- className="w-full px-4 py-3 text-left flex items-center justify-between hover:bg-gray-100 transition-colors rounded-t-lg"
448
+ className="h-auto w-full justify-between rounded-t-lg px-4 py-3 text-left hover:bg-muted/80"
449
449
  >
450
450
  <div className="flex-1">
451
451
  <div className="flex items-center gap-2">
452
- <span className="text-sm font-semibold text-gray-900">
452
+ <span className="text-sm font-semibold text-foreground">
453
453
  {rule?.ruleName || condition.ruleId}
454
454
  </span>
455
455
  {condition.required && (
456
- <span className="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-800">
456
+ <Badge variant="destructive" className="text-xs">
457
457
  {t('workflows.edgeEditor.required')}
458
- </span>
458
+ </Badge>
459
459
  )}
460
460
  {rule && (
461
- <span className="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-purple-100 text-purple-800">
461
+ <Badge variant="secondary" className="text-xs">
462
462
  {rule.ruleType}
463
- </span>
463
+ </Badge>
464
464
  )}
465
465
  </div>
466
- <p className="text-xs text-gray-600 mt-1">
467
- {t('workflows.edgeEditor.ruleId')}: <code className="bg-white px-1 rounded">{condition.ruleId}</code>
466
+ <p className="text-xs text-muted-foreground mt-1">
467
+ {t('workflows.edgeEditor.ruleId')}: <code className="bg-background px-1 rounded">{condition.ruleId}</code>
468
468
  </p>
469
469
  {rule?.description && (
470
- <p className="text-xs text-gray-500 mt-1 line-clamp-1">{rule.description}</p>
470
+ <p className="text-xs text-muted-foreground mt-1 line-clamp-1">{rule.description}</p>
471
471
  )}
472
472
  </div>
473
- <svg
474
- className={`w-5 h-5 text-gray-400 transition-transform ${isExpanded ? 'rotate-180' : ''}`}
475
- fill="none"
476
- stroke="currentColor"
477
- viewBox="0 0 24 24"
478
- >
479
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
480
- </svg>
481
- </button>
473
+ <ChevronDown
474
+ className={`size-5 text-muted-foreground transition-transform ${isExpanded ? 'rotate-180' : ''}`}
475
+ />
476
+ </Button>
482
477
 
483
478
  {isExpanded && (
484
- <div className="px-4 pb-4 space-y-3 border-t border-gray-200 bg-white">
479
+ <div className="px-4 pb-4 space-y-3 border-t border-border bg-background">
485
480
  <div className="pt-3">
486
- <label className="block text-xs font-medium text-gray-700 mb-1">{t('workflows.edgeEditor.ruleId')}</label>
481
+ <label className="block text-xs font-medium text-foreground mb-1">{t('workflows.edgeEditor.ruleId')}</label>
487
482
  <Input
488
483
  type="text"
489
484
  size="sm"
@@ -493,56 +488,54 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
493
488
  </div>
494
489
 
495
490
  <div>
496
- <label className="flex items-center gap-2 text-xs font-medium text-gray-700">
497
- <input
498
- type="checkbox"
491
+ <label className="flex items-center gap-2 text-xs font-medium text-foreground">
492
+ <Checkbox
499
493
  checked={condition.required}
500
- onChange={(e) => updatePreCondition(index, 'required', e.target.checked)}
501
- className="rounded border-gray-300 text-blue-600 focus-visible:ring-ring"
494
+ onCheckedChange={(checked) => updatePreCondition(index, 'required', checked === true)}
502
495
  />
503
496
  {t('workflows.edgeEditor.requiredCheckbox')}
504
497
  </label>
505
498
  </div>
506
499
 
507
500
  {rule && (
508
- <div className="border-t border-gray-200 pt-3">
509
- <h4 className="text-xs font-semibold text-gray-900 mb-2">{t('workflows.edgeEditor.businessRuleDetails')}</h4>
501
+ <div className="border-t border-border pt-3">
502
+ <h4 className="text-xs font-semibold text-foreground mb-2">{t('workflows.edgeEditor.businessRuleDetails')}</h4>
510
503
  <dl className="space-y-1 text-xs">
511
504
  <div className="flex justify-between">
512
- <dt className="font-medium text-gray-700">Name:</dt>
513
- <dd className="text-gray-900">{rule.ruleName}</dd>
505
+ <dt className="font-medium text-foreground">Name:</dt>
506
+ <dd className="text-foreground">{rule.ruleName}</dd>
514
507
  </div>
515
508
  <div className="flex justify-between">
516
- <dt className="font-medium text-gray-700">Type:</dt>
517
- <dd className="text-gray-900">{rule.ruleType}</dd>
509
+ <dt className="font-medium text-foreground">Type:</dt>
510
+ <dd className="text-foreground">{rule.ruleType}</dd>
518
511
  </div>
519
512
  {rule.ruleCategory && (
520
513
  <div className="flex justify-between">
521
- <dt className="font-medium text-gray-700">Category:</dt>
522
- <dd className="text-gray-900">{rule.ruleCategory}</dd>
514
+ <dt className="font-medium text-foreground">Category:</dt>
515
+ <dd className="text-foreground">{rule.ruleCategory}</dd>
523
516
  </div>
524
517
  )}
525
518
  <div className="flex justify-between">
526
- <dt className="font-medium text-gray-700">Entity Type:</dt>
527
- <dd className="text-gray-900 font-mono text-xs">{rule.entityType}</dd>
519
+ <dt className="font-medium text-foreground">Entity Type:</dt>
520
+ <dd className="text-foreground font-mono text-xs">{rule.entityType}</dd>
528
521
  </div>
529
522
  {rule.eventType && (
530
523
  <div className="flex justify-between">
531
- <dt className="font-medium text-gray-700">Event Type:</dt>
532
- <dd className="text-gray-900">{rule.eventType}</dd>
524
+ <dt className="font-medium text-foreground">Event Type:</dt>
525
+ <dd className="text-foreground">{rule.eventType}</dd>
533
526
  </div>
534
527
  )}
535
528
  {rule.description && (
536
- <div className="mt-2 pt-2 border-t border-gray-200">
537
- <dt className="font-medium text-gray-700 mb-1">Description:</dt>
538
- <dd className="text-gray-600">{rule.description}</dd>
529
+ <div className="mt-2 pt-2 border-t border-border">
530
+ <dt className="font-medium text-foreground mb-1">Description:</dt>
531
+ <dd className="text-muted-foreground">{rule.description}</dd>
539
532
  </div>
540
533
  )}
541
534
  </dl>
542
535
  </div>
543
536
  )}
544
537
 
545
- <div className="border-t border-gray-200 pt-3">
538
+ <div className="border-t border-border pt-3">
546
539
  <Button
547
540
  type="button"
548
541
  variant="destructive"
@@ -593,49 +586,45 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
593
586
  const isExpanded = expandedPostConditions.has(index)
594
587
  const rule = getBusinessRuleDetails(condition.ruleId)
595
588
  return (
596
- <div key={index} className="border border-gray-200 rounded-lg bg-gray-50">
597
- <button
589
+ <div key={index} className="border border-border rounded-lg bg-muted">
590
+ <Button
598
591
  type="button"
592
+ variant="ghost"
599
593
  onClick={() => togglePostCondition(index)}
600
- className="w-full px-4 py-3 text-left flex items-center justify-between hover:bg-gray-100 transition-colors rounded-t-lg"
594
+ className="h-auto w-full justify-between rounded-t-lg px-4 py-3 text-left hover:bg-muted/80"
601
595
  >
602
596
  <div className="flex-1">
603
597
  <div className="flex items-center gap-2">
604
- <span className="text-sm font-semibold text-gray-900">
598
+ <span className="text-sm font-semibold text-foreground">
605
599
  {rule?.ruleName || condition.ruleId}
606
600
  </span>
607
601
  {condition.required && (
608
- <span className="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-800">
602
+ <Badge variant="destructive" className="text-xs">
609
603
  {t('workflows.edgeEditor.required')}
610
- </span>
604
+ </Badge>
611
605
  )}
612
606
  {rule && (
613
- <span className="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-purple-100 text-purple-800">
607
+ <Badge variant="secondary" className="text-xs">
614
608
  {rule.ruleType}
615
- </span>
609
+ </Badge>
616
610
  )}
617
611
  </div>
618
- <p className="text-xs text-gray-600 mt-1">
619
- {t('workflows.edgeEditor.ruleId')}: <code className="bg-white px-1 rounded">{condition.ruleId}</code>
612
+ <p className="text-xs text-muted-foreground mt-1">
613
+ {t('workflows.edgeEditor.ruleId')}: <code className="bg-background px-1 rounded">{condition.ruleId}</code>
620
614
  </p>
621
615
  {rule?.description && (
622
- <p className="text-xs text-gray-500 mt-1 line-clamp-1">{rule.description}</p>
616
+ <p className="text-xs text-muted-foreground mt-1 line-clamp-1">{rule.description}</p>
623
617
  )}
624
618
  </div>
625
- <svg
626
- className={`w-5 h-5 text-gray-400 transition-transform ${isExpanded ? 'rotate-180' : ''}`}
627
- fill="none"
628
- stroke="currentColor"
629
- viewBox="0 0 24 24"
630
- >
631
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
632
- </svg>
633
- </button>
619
+ <ChevronDown
620
+ className={`size-5 text-muted-foreground transition-transform ${isExpanded ? 'rotate-180' : ''}`}
621
+ />
622
+ </Button>
634
623
 
635
624
  {isExpanded && (
636
- <div className="px-4 pb-4 space-y-3 border-t border-gray-200 bg-white">
625
+ <div className="px-4 pb-4 space-y-3 border-t border-border bg-background">
637
626
  <div className="pt-3">
638
- <label className="block text-xs font-medium text-gray-700 mb-1">{t('workflows.edgeEditor.ruleId')}</label>
627
+ <label className="block text-xs font-medium text-foreground mb-1">{t('workflows.edgeEditor.ruleId')}</label>
639
628
  <Input
640
629
  type="text"
641
630
  size="sm"
@@ -645,56 +634,54 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
645
634
  </div>
646
635
 
647
636
  <div>
648
- <label className="flex items-center gap-2 text-xs font-medium text-gray-700">
649
- <input
650
- type="checkbox"
637
+ <label className="flex items-center gap-2 text-xs font-medium text-foreground">
638
+ <Checkbox
651
639
  checked={condition.required}
652
- onChange={(e) => updatePostCondition(index, 'required', e.target.checked)}
653
- className="rounded border-gray-300 text-blue-600 focus-visible:ring-ring"
640
+ onCheckedChange={(checked) => updatePostCondition(index, 'required', checked === true)}
654
641
  />
655
642
  {t('workflows.edgeEditor.requiredPostCheckbox')}
656
643
  </label>
657
644
  </div>
658
645
 
659
646
  {rule && (
660
- <div className="border-t border-gray-200 pt-3">
661
- <h4 className="text-xs font-semibold text-gray-900 mb-2">{t('workflows.edgeEditor.businessRuleDetails')}</h4>
647
+ <div className="border-t border-border pt-3">
648
+ <h4 className="text-xs font-semibold text-foreground mb-2">{t('workflows.edgeEditor.businessRuleDetails')}</h4>
662
649
  <dl className="space-y-1 text-xs">
663
650
  <div className="flex justify-between">
664
- <dt className="font-medium text-gray-700">Name:</dt>
665
- <dd className="text-gray-900">{rule.ruleName}</dd>
651
+ <dt className="font-medium text-foreground">Name:</dt>
652
+ <dd className="text-foreground">{rule.ruleName}</dd>
666
653
  </div>
667
654
  <div className="flex justify-between">
668
- <dt className="font-medium text-gray-700">Type:</dt>
669
- <dd className="text-gray-900">{rule.ruleType}</dd>
655
+ <dt className="font-medium text-foreground">Type:</dt>
656
+ <dd className="text-foreground">{rule.ruleType}</dd>
670
657
  </div>
671
658
  {rule.ruleCategory && (
672
659
  <div className="flex justify-between">
673
- <dt className="font-medium text-gray-700">Category:</dt>
674
- <dd className="text-gray-900">{rule.ruleCategory}</dd>
660
+ <dt className="font-medium text-foreground">Category:</dt>
661
+ <dd className="text-foreground">{rule.ruleCategory}</dd>
675
662
  </div>
676
663
  )}
677
664
  <div className="flex justify-between">
678
- <dt className="font-medium text-gray-700">Entity Type:</dt>
679
- <dd className="text-gray-900 font-mono text-xs">{rule.entityType}</dd>
665
+ <dt className="font-medium text-foreground">Entity Type:</dt>
666
+ <dd className="text-foreground font-mono text-xs">{rule.entityType}</dd>
680
667
  </div>
681
668
  {rule.eventType && (
682
669
  <div className="flex justify-between">
683
- <dt className="font-medium text-gray-700">Event Type:</dt>
684
- <dd className="text-gray-900">{rule.eventType}</dd>
670
+ <dt className="font-medium text-foreground">Event Type:</dt>
671
+ <dd className="text-foreground">{rule.eventType}</dd>
685
672
  </div>
686
673
  )}
687
674
  {rule.description && (
688
- <div className="mt-2 pt-2 border-t border-gray-200">
689
- <dt className="font-medium text-gray-700 mb-1">Description:</dt>
690
- <dd className="text-gray-600">{rule.description}</dd>
675
+ <div className="mt-2 pt-2 border-t border-border">
676
+ <dt className="font-medium text-foreground mb-1">Description:</dt>
677
+ <dd className="text-muted-foreground">{rule.description}</dd>
691
678
  </div>
692
679
  )}
693
680
  </dl>
694
681
  </div>
695
682
  )}
696
683
 
697
- <div className="border-t border-gray-200 pt-3">
684
+ <div className="border-t border-border pt-3">
698
685
  <Button
699
686
  type="button"
700
687
  variant="destructive"
@@ -714,9 +701,9 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
714
701
  </div>
715
702
 
716
703
  {/* Activities Section */}
717
- <div className="border-t border-gray-200 pt-4 mt-4">
704
+ <div className="border-t border-border pt-4 mt-4">
718
705
  <div className="flex items-center justify-between mb-3">
719
- <h3 className="text-sm font-semibold text-gray-900">
706
+ <h3 className="text-sm font-semibold text-foreground">
720
707
  {t('workflows.edgeEditor.activities')} ({activities.length})
721
708
  </h3>
722
709
  <Button
@@ -730,7 +717,7 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
730
717
  </div>
731
718
 
732
719
  {activities.length === 0 && (
733
- <div className="p-4 text-center text-sm text-gray-500 bg-gray-50 rounded-lg border border-gray-200">
720
+ <div className="p-4 text-center text-sm text-muted-foreground bg-muted rounded-lg border border-border">
734
721
  {t('workflows.edgeEditor.noActivities')}
735
722
  </div>
736
723
  )}
@@ -739,40 +726,36 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
739
726
  {activities.map((activity, index) => {
740
727
  const isExpanded = expandedActivities.has(index)
741
728
  return (
742
- <div key={index} className="border border-gray-200 rounded-lg bg-gray-50">
743
- <button
729
+ <div key={index} className="border border-border rounded-lg bg-muted">
730
+ <Button
744
731
  type="button"
732
+ variant="ghost"
745
733
  onClick={() => toggleActivity(index)}
746
- className="w-full px-4 py-3 text-left flex items-center justify-between hover:bg-gray-100 transition-colors rounded-t-lg"
734
+ className="h-auto w-full justify-between rounded-t-lg px-4 py-3 text-left hover:bg-muted/80"
747
735
  >
748
736
  <div className="flex-1">
749
737
  <div className="flex items-center gap-2">
750
- <span className="text-sm font-semibold text-gray-900">
738
+ <span className="text-sm font-semibold text-foreground">
751
739
  {activity.activityName || activity.label || activity.activityId || `Activity ${index + 1}`}
752
740
  </span>
753
741
  <Badge variant="secondary" className="text-xs">
754
742
  {activity.activityType}
755
743
  </Badge>
756
744
  </div>
757
- <p className="text-xs text-gray-600 mt-1">
758
- {t('workflows.edgeEditor.activityId')}: <code className="bg-white px-1 rounded">{activity.activityId}</code>
745
+ <p className="text-xs text-muted-foreground mt-1">
746
+ {t('workflows.edgeEditor.activityId')}: <code className="bg-background px-1 rounded">{activity.activityId}</code>
759
747
  </p>
760
748
  </div>
761
- <svg
762
- className={`w-5 h-5 text-gray-400 transition-transform ${isExpanded ? 'rotate-180' : ''}`}
763
- fill="none"
764
- stroke="currentColor"
765
- viewBox="0 0 24 24"
766
- >
767
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
768
- </svg>
769
- </button>
749
+ <ChevronDown
750
+ className={`size-5 text-muted-foreground transition-transform ${isExpanded ? 'rotate-180' : ''}`}
751
+ />
752
+ </Button>
770
753
 
771
754
  {isExpanded && (
772
- <div className="px-4 pb-4 space-y-3 border-t border-gray-200 bg-white">
755
+ <div className="px-4 pb-4 space-y-3 border-t border-border bg-background">
773
756
  {/* Activity ID */}
774
757
  <div className="pt-3">
775
- <label className="block text-xs font-medium text-gray-700 mb-1">{t('workflows.edgeEditor.activityId')} *</label>
758
+ <label className="block text-xs font-medium text-foreground mb-1">{t('workflows.edgeEditor.activityId')} *</label>
776
759
  <Input
777
760
  type="text"
778
761
  size="sm"
@@ -784,7 +767,7 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
784
767
 
785
768
  {/* Activity Name */}
786
769
  <div>
787
- <label className="block text-xs font-medium text-gray-700 mb-1">{t('workflows.edgeEditor.activityName')} *</label>
770
+ <label className="block text-xs font-medium text-foreground mb-1">{t('workflows.edgeEditor.activityName')} *</label>
788
771
  <Input
789
772
  type="text"
790
773
  size="sm"
@@ -796,7 +779,7 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
796
779
 
797
780
  {/* Activity Type */}
798
781
  <div>
799
- <label className="block text-xs font-medium text-gray-700 mb-1">{t('workflows.edgeEditor.activityType')} *</label>
782
+ <label className="block text-xs font-medium text-foreground mb-1">{t('workflows.edgeEditor.activityType')} *</label>
800
783
  <Select
801
784
  value={activity.activityType}
802
785
  onValueChange={(value) => updateActivity(index, 'activityType', value)}
@@ -818,7 +801,7 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
818
801
 
819
802
  {/* Timeout */}
820
803
  <div>
821
- <label className="block text-xs font-medium text-gray-700 mb-1">{t('workflows.edgeEditor.timeout')}</label>
804
+ <label className="block text-xs font-medium text-foreground mb-1">{t('workflows.edgeEditor.timeout')}</label>
822
805
  <Input
823
806
  type="text"
824
807
  size="sm"
@@ -826,15 +809,15 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
826
809
  onChange={(e) => updateActivity(index, 'timeout', e.target.value)}
827
810
  placeholder={t('workflows.edgeEditor.timeoutPlaceholder')}
828
811
  />
829
- <p className="text-xs text-gray-500 mt-0.5">{t('workflows.edgeEditor.timeoutHint')}</p>
812
+ <p className="text-xs text-muted-foreground mt-0.5">{t('workflows.edgeEditor.timeoutHint')}</p>
830
813
  </div>
831
814
 
832
815
  {/* Retry Policy */}
833
- <div className="border-t border-gray-200 pt-3">
834
- <h4 className="text-xs font-semibold text-gray-900 mb-2">{t('workflows.edgeEditor.retryPolicy')}</h4>
816
+ <div className="border-t border-border pt-3">
817
+ <h4 className="text-xs font-semibold text-foreground mb-2">{t('workflows.edgeEditor.retryPolicy')}</h4>
835
818
  <div className="grid grid-cols-1 sm:grid-cols-2 gap-2">
836
819
  <div>
837
- <label className="block text-xs font-medium text-gray-700 mb-1">{t('workflows.edgeEditor.maxAttempts')}</label>
820
+ <label className="block text-xs font-medium text-foreground mb-1">{t('workflows.edgeEditor.maxAttempts')}</label>
838
821
  <Input
839
822
  type="number"
840
823
  size="sm"
@@ -846,7 +829,7 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
846
829
  />
847
830
  </div>
848
831
  <div>
849
- <label className="block text-xs font-medium text-gray-700 mb-1">{t('workflows.edgeEditor.initialInterval')}</label>
832
+ <label className="block text-xs font-medium text-foreground mb-1">{t('workflows.edgeEditor.initialInterval')}</label>
850
833
  <Input
851
834
  type="number"
852
835
  size="sm"
@@ -857,7 +840,7 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
857
840
  />
858
841
  </div>
859
842
  <div>
860
- <label className="block text-xs font-medium text-gray-700 mb-1">{t('workflows.edgeEditor.backoffCoefficient')}</label>
843
+ <label className="block text-xs font-medium text-foreground mb-1">{t('workflows.edgeEditor.backoffCoefficient')}</label>
861
844
  <Input
862
845
  type="number"
863
846
  size="sm"
@@ -870,7 +853,7 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
870
853
  />
871
854
  </div>
872
855
  <div>
873
- <label className="block text-xs font-medium text-gray-700 mb-1">{t('workflows.edgeEditor.maxInterval')}</label>
856
+ <label className="block text-xs font-medium text-foreground mb-1">{t('workflows.edgeEditor.maxInterval')}</label>
874
857
  <Input
875
858
  type="number"
876
859
  size="sm"
@@ -884,30 +867,26 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
884
867
  </div>
885
868
 
886
869
  {/* Activity Flags */}
887
- <div className="border-t border-gray-200 pt-3">
888
- <h4 className="text-xs font-semibold text-gray-900 mb-2">{t('workflows.edgeEditor.activityOptions')}</h4>
870
+ <div className="border-t border-border pt-3">
871
+ <h4 className="text-xs font-semibold text-foreground mb-2">{t('workflows.edgeEditor.activityOptions')}</h4>
889
872
  <div className="space-y-2">
890
873
  <div className="flex items-center space-x-2">
891
- <input
892
- type="checkbox"
874
+ <Checkbox
893
875
  id={`activity-async-${index}`}
894
876
  checked={activity.async || false}
895
- onChange={(e) => updateActivity(index, 'async', e.target.checked)}
896
- className="h-4 w-4 rounded border-gray-300"
877
+ onCheckedChange={(checked) => updateActivity(index, 'async', checked === true)}
897
878
  />
898
- <label htmlFor={`activity-async-${index}`} className="text-xs text-gray-700 cursor-pointer">
879
+ <label htmlFor={`activity-async-${index}`} className="text-xs text-foreground cursor-pointer">
899
880
  {t('workflows.edgeEditor.asyncOption')}
900
881
  </label>
901
882
  </div>
902
883
  <div className="flex items-center space-x-2">
903
- <input
904
- type="checkbox"
884
+ <Checkbox
905
885
  id={`activity-compensate-${index}`}
906
886
  checked={activity.compensate || false}
907
- onChange={(e) => updateActivity(index, 'compensate', e.target.checked)}
908
- className="h-4 w-4 rounded border-gray-300"
887
+ onCheckedChange={(checked) => updateActivity(index, 'compensate', checked === true)}
909
888
  />
910
- <label htmlFor={`activity-compensate-${index}`} className="text-xs text-gray-700 cursor-pointer">
889
+ <label htmlFor={`activity-compensate-${index}`} className="text-xs text-foreground cursor-pointer">
911
890
  {t('workflows.edgeEditor.compensateOption')}
912
891
  </label>
913
892
  </div>
@@ -915,8 +894,8 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
915
894
  </div>
916
895
 
917
896
  {/* Configuration */}
918
- <div className="border-t border-gray-200 pt-3">
919
- <label className="block text-xs font-medium text-gray-700 mb-1">{t('workflows.edgeEditor.configurationJson')}</label>
897
+ <div className="border-t border-border pt-3">
898
+ <label className="block text-xs font-medium text-foreground mb-1">{t('workflows.edgeEditor.configurationJson')}</label>
920
899
  <JsonBuilder
921
900
  value={activity.config || {}}
922
901
  onChange={(config) => {
@@ -925,11 +904,11 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
925
904
  setActivities(updated)
926
905
  }}
927
906
  />
928
- <p className="text-xs text-gray-500 mt-0.5">{t('workflows.edgeEditor.configurationHint')}</p>
907
+ <p className="text-xs text-muted-foreground mt-0.5">{t('workflows.edgeEditor.configurationHint')}</p>
929
908
  </div>
930
909
 
931
910
  {/* Delete Button */}
932
- <div className="border-t border-gray-200 pt-3">
911
+ <div className="border-t border-border pt-3">
933
912
  <Button
934
913
  type="button"
935
914
  variant="destructive"
@@ -949,31 +928,27 @@ export function EdgeEditDialog({ edge, isOpen, onClose, onSave, onDelete }: Edge
949
928
  </div>
950
929
 
951
930
  {/* Advanced Configuration */}
952
- <div className="border-t border-gray-200 pt-4 mt-4">
953
- <button
931
+ <div className="border-t border-border pt-4 mt-4">
932
+ <Button
954
933
  type="button"
934
+ variant="ghost"
955
935
  onClick={() => setShowAdvanced(!showAdvanced)}
956
- className="flex items-center justify-between w-full text-left"
936
+ className="h-auto w-full justify-between px-0 py-0 text-left hover:bg-transparent"
957
937
  >
958
- <h3 className="text-sm font-semibold text-gray-900">
938
+ <h3 className="text-sm font-semibold text-foreground">
959
939
  {t('workflows.edgeEditor.advancedConfiguration')}
960
940
  </h3>
961
- <svg
962
- className={`w-5 h-5 transition-transform ${showAdvanced ? 'rotate-180' : ''}`}
963
- fill="none"
964
- stroke="currentColor"
965
- viewBox="0 0 24 24"
966
- >
967
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
968
- </svg>
969
- </button>
941
+ <ChevronDown
942
+ className={`size-5 transition-transform ${showAdvanced ? 'rotate-180' : ''}`}
943
+ />
944
+ </Button>
970
945
  {showAdvanced && (
971
946
  <div className="mt-3">
972
947
  <JsonBuilder
973
948
  value={advancedConfig}
974
949
  onChange={setAdvancedConfig}
975
950
  />
976
- <p className="text-xs text-gray-500 mt-1">
951
+ <p className="text-xs text-muted-foreground mt-1">
977
952
  {t('workflows.edgeEditor.advancedConfigHint')}
978
953
  </p>
979
954
  </div>