braid-ui 1.0.66 → 1.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -353,10 +353,6 @@ var AlertTimeline = ({ events }) => {
353
353
  /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-0 flex-none", getStatusColor2(event.status, event.action)), children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
354
354
  /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
355
355
  /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
356
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
357
- "by ",
358
- event.user
359
- ] }),
360
356
  event.details && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
361
357
  /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
362
358
  ] })
@@ -1331,7 +1327,7 @@ var DialogDescription = React15.forwardRef(({ className, ...props }, ref) => /*
1331
1327
  }
1332
1328
  ));
1333
1329
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
1334
- var JsonViewer = ({ data, className, compact = false, maxHeight = "60vh" }) => {
1330
+ var JsonViewer = ({ data, className, compact = false, maxHeight = "60vh", expandFully = false }) => {
1335
1331
  const [copied, setCopied] = useState(false);
1336
1332
  const handleCopy = () => {
1337
1333
  navigator.clipboard.writeText(JSON.stringify(data, null, 2));
@@ -1359,18 +1355,18 @@ var JsonViewer = ({ data, className, compact = false, maxHeight = "60vh" }) => {
1359
1355
  "div",
1360
1356
  {
1361
1357
  className: cn(
1362
- "overflow-auto bg-muted/30 rounded-lg border font-mono",
1363
- compact ? "max-h-[300px] p-2 text-xs" : `max-h-[${maxHeight}] p-4 text-xs`
1358
+ "bg-muted/30 rounded-lg border font-mono",
1359
+ expandFully ? "p-4 text-xs" : compact ? "max-h-[300px] overflow-auto p-2 text-xs" : "overflow-auto p-4 text-xs"
1364
1360
  ),
1365
- style: { maxHeight: compact ? "300px" : maxHeight },
1361
+ style: expandFully ? void 0 : { maxHeight: compact ? "300px" : maxHeight },
1366
1362
  children: /* @__PURE__ */ jsx(JsonNode, { data, name: "root", depth: 0, compact })
1367
1363
  }
1368
1364
  )
1369
1365
  ] });
1370
1366
  };
1371
1367
  var JsonNode = ({ data, name, depth, compact = false }) => {
1372
- const [isExpanded, setIsExpanded] = useState(compact ? depth < 1 : depth < 2);
1373
- const indent = compact ? depth * 12 : depth * 16;
1368
+ const [isExpanded, setIsExpanded] = useState(true);
1369
+ const indent = depth * 8;
1374
1370
  if (data === null) {
1375
1371
  return /* @__PURE__ */ jsxs("div", { style: { paddingLeft: indent }, className: "text-muted-foreground", children: [
1376
1372
  /* @__PURE__ */ jsx("span", { className: "text-primary", children: name }),
@@ -8249,31 +8245,10 @@ var ACHDetailsSection = ({ data }) => {
8249
8245
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4", children: [
8250
8246
  /* @__PURE__ */ jsx(InfoField, { label: "Type", value: data.type, layout: "horizontal" }),
8251
8247
  /* @__PURE__ */ jsx(InfoField, { label: "Originator Name", value: data.originatorName, layout: "horizontal" }),
8252
- /* @__PURE__ */ jsx(
8253
- InfoField,
8254
- {
8255
- label: "Originator Account Number",
8256
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: data.originatorAccountNumber }),
8257
- layout: "horizontal"
8258
- }
8259
- ),
8248
+ /* @__PURE__ */ jsx(InfoField, { label: "Originator Account Number", value: data.originatorAccountNumber, layout: "horizontal" }),
8260
8249
  /* @__PURE__ */ jsx(InfoField, { label: "Receiver Name", value: data.receiverName, layout: "horizontal" }),
8261
- /* @__PURE__ */ jsx(
8262
- InfoField,
8263
- {
8264
- label: "Receiver Account Number",
8265
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: data.receiverAccountNumber }),
8266
- layout: "horizontal"
8267
- }
8268
- ),
8269
- /* @__PURE__ */ jsx(
8270
- InfoField,
8271
- {
8272
- label: "Receiver Routing Number",
8273
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: data.receiverRoutingNumber }),
8274
- layout: "horizontal"
8275
- }
8276
- ),
8250
+ /* @__PURE__ */ jsx(InfoField, { label: "Receiver Account Number", value: data.receiverAccountNumber, layout: "horizontal" }),
8251
+ /* @__PURE__ */ jsx(InfoField, { label: "Receiver Routing Number", value: data.receiverRoutingNumber, layout: "horizontal" }),
8277
8252
  /* @__PURE__ */ jsx(InfoField, { label: "Amount", value: formatCurrency5(data.amount), layout: "horizontal" }),
8278
8253
  /* @__PURE__ */ jsx(InfoField, { label: "SEC Code", value: data.secCode, layout: "horizontal" }),
8279
8254
  /* @__PURE__ */ jsx(InfoField, { label: "Company Entry Description", value: data.companyEntryDescription, layout: "horizontal" }),
@@ -8282,13 +8257,25 @@ var ACHDetailsSection = ({ data }) => {
8282
8257
  data.individualName && /* @__PURE__ */ jsx(InfoField, { label: "Individual Name", value: data.individualName, layout: "horizontal" }),
8283
8258
  /* @__PURE__ */ jsx(InfoField, { label: "Trace Number", value: data.traceNumber, layout: "horizontal" })
8284
8259
  ] }),
8285
- data.raw && /* @__PURE__ */ jsx("div", { className: "mt-6 pt-6 border-t border-border", children: /* @__PURE__ */ jsx(
8286
- InfoField,
8260
+ data.raw && /* @__PURE__ */ jsx(CollapsibleRawSection, { data: data.raw })
8261
+ ] });
8262
+ };
8263
+ var CollapsibleRawSection = ({ data }) => {
8264
+ const [isExpanded, setIsExpanded] = useState(false);
8265
+ return /* @__PURE__ */ jsxs("div", { className: "mt-6 pt-6 border-t border-border", children: [
8266
+ /* @__PURE__ */ jsxs(
8267
+ "button",
8287
8268
  {
8288
- label: "Raw",
8289
- value: /* @__PURE__ */ jsx(JsonViewer, { data: data.raw, className: "mt-2", compact: true })
8269
+ type: "button",
8270
+ onClick: () => setIsExpanded(!isExpanded),
8271
+ className: "flex items-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",
8272
+ children: [
8273
+ isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }),
8274
+ "Raw message"
8275
+ ]
8290
8276
  }
8291
- ) })
8277
+ ),
8278
+ isExpanded && /* @__PURE__ */ jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsx(JsonViewer, { data, expandFully: true }) })
8292
8279
  ] });
8293
8280
  };
8294
8281
  var WireDetailsSection = ({ data, onIMADChange }) => {
@@ -8380,67 +8367,39 @@ var WireDetailsSection = ({ data, onIMADChange }) => {
8380
8367
  }
8381
8368
  ),
8382
8369
  /* @__PURE__ */ jsx(InfoField, { label: "Originator Name", value: data.originatorName, layout: "horizontal" }),
8383
- /* @__PURE__ */ jsx(
8384
- InfoField,
8385
- {
8386
- label: "Originator Account Number",
8387
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: data.originatorAccountNumber }),
8388
- layout: "horizontal"
8389
- }
8390
- ),
8391
- /* @__PURE__ */ jsx(InfoField, { label: "Originator Address", value: data.originatorAddress, layout: "horizontal" }),
8370
+ /* @__PURE__ */ jsx(InfoField, { label: "Originator Account Number", value: data.originatorAccountNumber, layout: "horizontal" }),
8392
8371
  /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary Name", value: data.beneficiaryName, layout: "horizontal" }),
8393
- /* @__PURE__ */ jsx(
8394
- InfoField,
8395
- {
8396
- label: "Beneficiary Account Number",
8397
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: data.beneficiaryAccountNumber }),
8398
- layout: "horizontal"
8399
- }
8400
- ),
8401
- /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary Address", value: data.beneficiaryAddress, layout: "horizontal" }),
8372
+ /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary Account Number", value: data.beneficiaryAccountNumber, layout: "horizontal" }),
8402
8373
  /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary FI Name", value: data.beneficiaryFIName, layout: "horizontal" }),
8403
- /* @__PURE__ */ jsx(
8404
- InfoField,
8405
- {
8406
- label: "Beneficiary FI Routing Number",
8407
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: data.beneficiaryFIRoutingNumber }),
8408
- layout: "horizontal"
8409
- }
8410
- ),
8411
- /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary FI Address", value: data.beneficiaryFIAddress, layout: "horizontal" }),
8374
+ /* @__PURE__ */ jsx(InfoField, { label: "Beneficiary FI Routing Number", value: data.beneficiaryFIRoutingNumber, layout: "horizontal" }),
8412
8375
  /* @__PURE__ */ jsx(InfoField, { label: "Originator FI Name", value: data.originatorFIName, layout: "horizontal" }),
8413
- /* @__PURE__ */ jsx(
8414
- InfoField,
8415
- {
8416
- label: "Originator FI Routing Number",
8417
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: data.originatorFIRoutingNumber }),
8418
- layout: "horizontal"
8419
- }
8420
- ),
8421
- /* @__PURE__ */ jsx(InfoField, { label: "Originator FI Address", value: data.originatorFIAddress || "-", layout: "horizontal" }),
8376
+ /* @__PURE__ */ jsx(InfoField, { label: "Originator FI Routing Number", value: data.originatorFIRoutingNumber, layout: "horizontal" }),
8422
8377
  /* @__PURE__ */ jsx(InfoField, { label: "Originator to Beneficiary Info", value: data.originatorToBeneficiaryInfo || "-", layout: "horizontal" }),
8423
8378
  /* @__PURE__ */ jsx(InfoField, { label: "File Handle", value: data.fileHandle || "-", layout: "horizontal" }),
8424
8379
  data.intermediaryFIName && /* @__PURE__ */ jsxs(Fragment, { children: [
8425
8380
  /* @__PURE__ */ jsx(InfoField, { label: "Intermediary FI Name", value: data.intermediaryFIName, layout: "horizontal" }),
8426
- data.intermediaryFIRoutingNumber && /* @__PURE__ */ jsx(
8427
- InfoField,
8428
- {
8429
- label: "Intermediary FI Routing Number",
8430
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: data.intermediaryFIRoutingNumber }),
8431
- layout: "horizontal"
8432
- }
8433
- ),
8434
- data.intermediaryFIAddress && /* @__PURE__ */ jsx(InfoField, { label: "Intermediary FI Address", value: data.intermediaryFIAddress, layout: "horizontal" })
8381
+ data.intermediaryFIRoutingNumber && /* @__PURE__ */ jsx(InfoField, { label: "Intermediary FI Routing Number", value: data.intermediaryFIRoutingNumber, layout: "horizontal" })
8435
8382
  ] })
8436
8383
  ] }),
8437
- data.raw && /* @__PURE__ */ jsx("div", { className: "mt-6 pt-6 border-t border-border", children: /* @__PURE__ */ jsx(
8438
- InfoField,
8384
+ data.raw && /* @__PURE__ */ jsx(CollapsibleRawSection2, { data: data.raw })
8385
+ ] });
8386
+ };
8387
+ var CollapsibleRawSection2 = ({ data }) => {
8388
+ const [isExpanded, setIsExpanded] = useState(false);
8389
+ return /* @__PURE__ */ jsxs("div", { className: "mt-6 pt-6 border-t border-border", children: [
8390
+ /* @__PURE__ */ jsxs(
8391
+ "button",
8439
8392
  {
8440
- label: "Raw",
8441
- value: /* @__PURE__ */ jsx(JsonViewer, { data: data.raw, className: "mt-2", compact: true })
8393
+ type: "button",
8394
+ onClick: () => setIsExpanded(!isExpanded),
8395
+ className: "flex items-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",
8396
+ children: [
8397
+ isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }),
8398
+ "Raw message"
8399
+ ]
8442
8400
  }
8443
- ) })
8401
+ ),
8402
+ isExpanded && /* @__PURE__ */ jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsx(JsonViewer, { data, expandFully: true }) })
8444
8403
  ] });
8445
8404
  };
8446
8405
  var formatCurrency2 = (value) => {
@@ -9012,6 +8971,7 @@ var EnhancedMultiSelect = ({
9012
8971
  disabled = false
9013
8972
  }) => {
9014
8973
  const [open, setOpen] = React15.useState(false);
8974
+ const [searchQuery, setSearchQuery] = React15.useState("");
9015
8975
  const [popoverContainer, setPopoverContainer] = React15.useState(null);
9016
8976
  const triggerRef = React15.useRef(null);
9017
8977
  React15.useEffect(() => {
@@ -9033,9 +8993,19 @@ var EnhancedMultiSelect = ({
9033
8993
  onValueChange(value.filter((v) => v !== optionValue));
9034
8994
  };
9035
8995
  const selectedLabels = value.map((v) => options.find((opt) => opt.value === v)?.label).filter(Boolean);
8996
+ const filteredOptions = React15.useMemo(() => {
8997
+ if (!searchQuery.trim()) return options;
8998
+ const query = searchQuery.toLowerCase();
8999
+ return options.filter(
9000
+ (option) => option.label.toLowerCase().includes(query)
9001
+ );
9002
+ }, [options, searchQuery]);
9036
9003
  return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", className), children: [
9037
9004
  label && /* @__PURE__ */ jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
9038
- /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, modal: false, children: [
9005
+ /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: (isOpen) => {
9006
+ setOpen(isOpen);
9007
+ if (!isOpen) setSearchQuery("");
9008
+ }, modal: false, children: [
9039
9009
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
9040
9010
  Button,
9041
9011
  {
@@ -9074,7 +9044,7 @@ var EnhancedMultiSelect = ({
9074
9044
  ]
9075
9045
  }
9076
9046
  ) }),
9077
- /* @__PURE__ */ jsx(
9047
+ /* @__PURE__ */ jsxs(
9078
9048
  PopoverContent,
9079
9049
  {
9080
9050
  container: popoverContainer,
@@ -9087,44 +9057,63 @@ var EnhancedMultiSelect = ({
9087
9057
  e.preventDefault();
9088
9058
  }
9089
9059
  },
9090
- children: /* @__PURE__ */ jsx(
9091
- "div",
9092
- {
9093
- className: "max-h-[240px] overflow-y-auto overscroll-contain p-1",
9094
- onWheel: (e) => e.stopPropagation(),
9095
- onTouchMove: (e) => e.stopPropagation(),
9096
- children: options.map((option) => {
9097
- const isSelected = value.includes(option.value);
9098
- return /* @__PURE__ */ jsxs(
9099
- "div",
9100
- {
9101
- role: "option",
9102
- "aria-selected": isSelected,
9103
- className: cn(
9104
- "flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm cursor-pointer hover:bg-accent hover:text-accent-foreground select-none",
9105
- isSelected && "bg-accent"
9106
- ),
9107
- onMouseDown: (e) => e.preventDefault(),
9108
- onClick: () => handleSelect(option.value),
9109
- children: [
9110
- /* @__PURE__ */ jsx(
9111
- "div",
9112
- {
9113
- className: cn(
9114
- "flex h-4 w-4 items-center justify-center rounded-sm border border-primary",
9115
- isSelected ? "bg-primary text-primary-foreground" : "opacity-50"
9060
+ children: [
9061
+ /* @__PURE__ */ jsx("div", { className: "p-2 border-b", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
9062
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
9063
+ /* @__PURE__ */ jsx(
9064
+ "input",
9065
+ {
9066
+ type: "text",
9067
+ placeholder: "Search...",
9068
+ value: searchQuery,
9069
+ onChange: (e) => setSearchQuery(e.target.value),
9070
+ className: "w-full pl-8 pr-2 py-1.5 text-sm border rounded-md bg-background focus:outline-none focus:ring-1 focus:ring-ring",
9071
+ onKeyDown: (e) => e.stopPropagation()
9072
+ }
9073
+ )
9074
+ ] }) }),
9075
+ /* @__PURE__ */ jsxs(
9076
+ "div",
9077
+ {
9078
+ className: "max-h-[240px] overflow-y-auto overscroll-contain p-1",
9079
+ onWheel: (e) => e.stopPropagation(),
9080
+ onTouchMove: (e) => e.stopPropagation(),
9081
+ children: [
9082
+ filteredOptions.map((option) => {
9083
+ const isSelected = value.includes(option.value);
9084
+ return /* @__PURE__ */ jsxs(
9085
+ "div",
9086
+ {
9087
+ role: "option",
9088
+ "aria-selected": isSelected,
9089
+ className: cn(
9090
+ "flex items-center gap-2 rounded-sm px-2 py-1.5 text-sm cursor-pointer hover:bg-accent hover:text-accent-foreground select-none",
9091
+ isSelected && "bg-accent"
9092
+ ),
9093
+ onMouseDown: (e) => e.preventDefault(),
9094
+ onClick: () => handleSelect(option.value),
9095
+ children: [
9096
+ /* @__PURE__ */ jsx(
9097
+ "div",
9098
+ {
9099
+ className: cn(
9100
+ "flex h-4 w-4 items-center justify-center rounded-sm border border-primary",
9101
+ isSelected ? "bg-primary text-primary-foreground" : "opacity-50"
9102
+ ),
9103
+ children: isSelected && /* @__PURE__ */ jsx(Check, { className: "h-3 w-3" })
9104
+ }
9116
9105
  ),
9117
- children: isSelected && /* @__PURE__ */ jsx(Check, { className: "h-3 w-3" })
9118
- }
9119
- ),
9120
- /* @__PURE__ */ jsx("span", { children: option.label })
9121
- ]
9122
- },
9123
- option.value
9124
- );
9125
- })
9126
- }
9127
- )
9106
+ /* @__PURE__ */ jsx("span", { children: option.label })
9107
+ ]
9108
+ },
9109
+ option.value
9110
+ );
9111
+ }),
9112
+ filteredOptions.length === 0 && /* @__PURE__ */ jsx("div", { className: "px-2 py-4 text-sm text-center text-muted-foreground", children: "No options found" })
9113
+ ]
9114
+ }
9115
+ )
9116
+ ]
9128
9117
  }
9129
9118
  )
9130
9119
  ] })
@@ -9589,6 +9578,7 @@ var TransactionDetailView = ({
9589
9578
  onCounterpartyClick,
9590
9579
  onOFACClick,
9591
9580
  onProductClick,
9581
+ onAlertClick,
9592
9582
  onIMADChange,
9593
9583
  isLoading,
9594
9584
  error,
@@ -9615,6 +9605,12 @@ var TransactionDetailView = ({
9615
9605
  ] })
9616
9606
  ] }) });
9617
9607
  }
9608
+ const [copiedField, setCopiedField] = useState(null);
9609
+ const handleCopy = (value, fieldName) => {
9610
+ navigator.clipboard.writeText(value);
9611
+ setCopiedField(fieldName);
9612
+ setTimeout(() => setCopiedField(null), 2e3);
9613
+ };
9618
9614
  if (!transaction) {
9619
9615
  return null;
9620
9616
  }
@@ -9656,15 +9652,26 @@ var TransactionDetailView = ({
9656
9652
  InfoField,
9657
9653
  {
9658
9654
  label: "Account Number",
9659
- value: /* @__PURE__ */ jsx(
9660
- Button,
9661
- {
9662
- variant: "link",
9663
- className: "h-auto p-0 text-sm",
9664
- onClick: () => onAccountClick(transaction.accountNumber),
9665
- children: transaction.accountNumber
9666
- }
9667
- ),
9655
+ value: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
9656
+ /* @__PURE__ */ jsx(
9657
+ Button,
9658
+ {
9659
+ variant: "link",
9660
+ className: "h-auto p-0 text-sm",
9661
+ onClick: () => onAccountClick(transaction.accountNumber),
9662
+ children: transaction.accountNumber
9663
+ }
9664
+ ),
9665
+ /* @__PURE__ */ jsx(
9666
+ "button",
9667
+ {
9668
+ type: "button",
9669
+ onClick: () => handleCopy(transaction.accountNumber, "accountNumber"),
9670
+ className: "text-muted-foreground hover:text-foreground transition-colors",
9671
+ children: copiedField === "accountNumber" ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5" })
9672
+ }
9673
+ )
9674
+ ] }),
9668
9675
  layout: "horizontal"
9669
9676
  }
9670
9677
  ),
@@ -9720,7 +9727,25 @@ var TransactionDetailView = ({
9720
9727
  ),
9721
9728
  /* @__PURE__ */ jsx(InfoField, { label: "Original Filename", value: transaction.originalFilename || "-", layout: "horizontal" }),
9722
9729
  /* @__PURE__ */ jsx(InfoField, { label: "Loaded From File", value: transaction.loadedFromFile || "-", layout: "horizontal" }),
9723
- /* @__PURE__ */ jsx(InfoField, { label: "Payment ID", value: transaction.id, layout: "horizontal" }),
9730
+ /* @__PURE__ */ jsx(
9731
+ InfoField,
9732
+ {
9733
+ label: "Payment ID",
9734
+ value: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
9735
+ /* @__PURE__ */ jsx("span", { children: transaction.id }),
9736
+ /* @__PURE__ */ jsx(
9737
+ "button",
9738
+ {
9739
+ type: "button",
9740
+ onClick: () => handleCopy(transaction.id, "paymentId"),
9741
+ className: "text-muted-foreground hover:text-foreground transition-colors",
9742
+ children: copiedField === "paymentId" ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5" })
9743
+ }
9744
+ )
9745
+ ] }),
9746
+ layout: "horizontal"
9747
+ }
9748
+ ),
9724
9749
  /* @__PURE__ */ jsx(InfoField, { label: "Linked Payment ID", value: transaction.linkedPaymentId || "-", layout: "horizontal" }),
9725
9750
  /* @__PURE__ */ jsx(InfoField, { label: "Pending until Date", value: transaction.pendingUntilDate || "-", layout: "horizontal" }),
9726
9751
  /* @__PURE__ */ jsx(InfoField, { label: "Further Credit To", value: transaction.furtherCreditTo || "-", layout: "horizontal" }),
@@ -9746,7 +9771,25 @@ var TransactionDetailView = ({
9746
9771
  }
9747
9772
  ),
9748
9773
  /* @__PURE__ */ jsx(InfoField, { label: "Returned In File", value: transaction.returnedInFile || "-", layout: "horizontal" }),
9749
- /* @__PURE__ */ jsx(InfoField, { label: "Alerts", value: transaction.alerts?.join(", ") || "-", layout: "horizontal" })
9774
+ /* @__PURE__ */ jsx(
9775
+ InfoField,
9776
+ {
9777
+ label: "Alerts",
9778
+ value: transaction.alerts && transaction.alerts.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: transaction.alerts.map((alertId, index) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center", children: [
9779
+ /* @__PURE__ */ jsx(
9780
+ Button,
9781
+ {
9782
+ variant: "link",
9783
+ className: "h-auto p-0 text-sm",
9784
+ onClick: () => onAlertClick?.(alertId),
9785
+ children: alertId
9786
+ }
9787
+ ),
9788
+ index < transaction.alerts.length - 1 && /* @__PURE__ */ jsx("span", { className: "mr-1", children: "," })
9789
+ ] }, alertId)) }) : "-",
9790
+ layout: "horizontal"
9791
+ }
9792
+ )
9750
9793
  ] }) }),
9751
9794
  isACHTransfer && transaction.achDetails && /* @__PURE__ */ jsx(ACHDetailsSection, { data: transaction.achDetails }),
9752
9795
  isWireTransfer && transaction.wireDetails && /* @__PURE__ */ jsx(WireDetailsSection, { data: transaction.wireDetails, onIMADChange })
@@ -14868,72 +14911,156 @@ var mockTransactions = [
14868
14911
  intermediaryFIAddress: "100 Federal Street, Boston, MA 02110",
14869
14912
  imad: "20250930MMQFMP030000123",
14870
14913
  raw: {
14871
- messageType: "MT103",
14872
- sender: "WFBIUS6SXXX",
14873
- receiver: "CHASUS33XXX",
14874
- transactionReference: "INV-2024-089-TXN-001",
14875
- relatedReference: "INV-2024-089",
14876
- bankOperationCode: "CRED",
14877
- instructionCode: "CHQB",
14878
- valueDate: "2025-09-30",
14879
- currency: "USD",
14880
- amount: "15000.00",
14881
- orderingCustomer: {
14882
- account: "445821903456",
14883
- name: "Tech Solutions LLC",
14884
- address: [
14885
- "123 Tech Street",
14886
- "San Francisco, CA 94105",
14887
- "United States"
14888
- ]
14889
- },
14890
- orderingInstitution: {
14891
- bic: "WFBIUS6SXXX",
14892
- name: "Wells Fargo Bank N.A.",
14893
- address: [
14894
- "420 Montgomery Street",
14895
- "San Francisco, CA 94104"
14896
- ]
14897
- },
14898
- intermediaryInstitution: {
14899
- bic: "BOFAUS3NXXX",
14900
- name: "Bank of America N.A.",
14901
- clearingCode: "026009593",
14902
- address: [
14903
- "100 Federal Street",
14904
- "Boston, MA 02110"
14905
- ]
14906
- },
14907
- beneficiaryInstitution: {
14908
- bic: "CHASUS33XXX",
14909
- name: "JPMorgan Chase Bank N.A.",
14910
- clearingCode: "021000021",
14911
- address: [
14912
- "270 Park Avenue",
14913
- "New York, NY 10017"
14914
- ]
14915
- },
14916
- beneficiaryCustomer: {
14917
- account: "998877665544",
14918
- name: "Global Suppliers Inc",
14919
- address: [
14920
- "456 Supply Avenue",
14921
- "New York, NY 10001",
14922
- "United States"
14914
+ fiToFICstmrCdtTrf: {
14915
+ grpHdr: {
14916
+ msgId: "20250703QMGFT004000033",
14917
+ creDtTm: {
14918
+ dateTime: {
14919
+ date: { year: 2025, month: 7, day: 3 },
14920
+ time: { hour: 12, minute: 26, second: 1, nano: 99e7 }
14921
+ },
14922
+ offset: { totalSeconds: -14400 }
14923
+ },
14924
+ nbOfTxs: "1",
14925
+ sttlmInf: {
14926
+ sttlmMtd: "CLRG",
14927
+ clrSys: { cd: "FDW" }
14928
+ }
14929
+ },
14930
+ cdtTrfTxInf: [
14931
+ {
14932
+ pmtId: {
14933
+ endToEndId: "Test wire #1",
14934
+ uetr: "2638c715-d0a2-4fc9-a79b-a4e78dc9cd49"
14935
+ },
14936
+ pmtTpInf: {
14937
+ lclInstrm: { prtry: "CTRC" }
14938
+ },
14939
+ intrBkSttlmAmt: { value: 38, ccy: "USD" },
14940
+ intrBkSttlmDt: { year: 2025, month: 7, day: 3 },
14941
+ instdAmt: { value: 11, ccy: "USD" },
14942
+ chrgBr: "SHAR",
14943
+ instgAgt: {
14944
+ finInstnId: {
14945
+ clrSysMmbId: {
14946
+ clrSysId: { cd: "USABA" },
14947
+ mmbId: "321177573"
14948
+ }
14949
+ }
14950
+ },
14951
+ instdAgt: {
14952
+ finInstnId: {
14953
+ clrSysMmbId: {
14954
+ clrSysId: { cd: "USABA" },
14955
+ mmbId: "121182881"
14956
+ }
14957
+ }
14958
+ },
14959
+ dbtr: {
14960
+ nm: "Sarah Escobar",
14961
+ pstlAdr: {
14962
+ strtNm: "12345 Kaiser lane",
14963
+ bldgNb: "E425",
14964
+ pstCd: "12345",
14965
+ twnNm: "COSTA MESA",
14966
+ ctrySubDvsn: "CA",
14967
+ ctry: "US"
14968
+ }
14969
+ },
14970
+ dbtrAcct: {
14971
+ id: { othr: { id: "12345678910" } }
14972
+ },
14973
+ dbtrAgt: {
14974
+ finInstnId: {
14975
+ clrSysMmbId: {
14976
+ clrSysId: { cd: "USABA" },
14977
+ mmbId: "321177573"
14978
+ },
14979
+ nm: "NORTH BAY CREDIT UNION",
14980
+ pstlAdr: {
14981
+ strtNm: "397 Aviation Blvd",
14982
+ pstCd: "95403",
14983
+ twnNm: "Santa Rosa",
14984
+ ctrySubDvsn: "CA",
14985
+ ctry: "US"
14986
+ }
14987
+ }
14988
+ },
14989
+ cdtrAgt: {
14990
+ finInstnId: {
14991
+ clrSysMmbId: {
14992
+ clrSysId: { cd: "USABA" },
14993
+ mmbId: "121182881"
14994
+ },
14995
+ nm: "NORTH BAY CREDIT UNION",
14996
+ pstlAdr: {
14997
+ strtNm: "397 Aviation Blvd",
14998
+ pstCd: "12345",
14999
+ twnNm: "Santa Rosa",
15000
+ ctrySubDvsn: "CA",
15001
+ ctry: "US"
15002
+ }
15003
+ }
15004
+ },
15005
+ cdtr: {
15006
+ nm: "Jake from Braid LLC",
15007
+ pstlAdr: {
15008
+ strtNm: "12345 Test Lane",
15009
+ pstCd: "12345",
15010
+ twnNm: "Newport Beach",
15011
+ ctrySubDvsn: "TX",
15012
+ ctry: "US"
15013
+ }
15014
+ },
15015
+ cdtrAcct: {
15016
+ id: { othr: { id: "9988957447" } }
15017
+ },
15018
+ purp: { prtry: "Test wire #1" },
15019
+ rmtInf: { ustrd: ["Test wire #1"] }
15020
+ }
14923
15021
  ]
14924
15022
  },
14925
- remittanceInformation: "Invoice Payment for INV-2024-089 - Equipment Purchase",
14926
- regulatoryReporting: {
14927
- code: "BENEFRES",
14928
- country: "US",
14929
- narrative: "Payment for goods"
15023
+ appHdr: {
15024
+ fr: {
15025
+ fiId: {
15026
+ finInstnId: {
15027
+ clrSysMmbId: { mmbId: "021151080" }
15028
+ }
15029
+ }
15030
+ },
15031
+ to: {
15032
+ fiId: {
15033
+ finInstnId: {
15034
+ clrSysMmbId: { mmbId: "321177573" }
15035
+ }
15036
+ }
15037
+ },
15038
+ bizMsgIdr: "20250703QMGFNP6700018807031250FT01",
15039
+ msgDefIdr: "pacs.008.001.08",
15040
+ bizSvc: "TEST",
15041
+ mktPrctc: {
15042
+ regy: "www2.swift.com/mystandards/#/group/Federal_Reserve_Financial_Services/Fedwire_Funds_Service",
15043
+ id: "frb.fedwire.01"
15044
+ },
15045
+ creDt: {
15046
+ dateTime: {
15047
+ date: { year: 2025, month: 7, day: 3 },
15048
+ time: { hour: 12, minute: 50, second: 30, nano: 22e7 }
15049
+ },
15050
+ offset: { totalSeconds: -14400 }
15051
+ },
15052
+ bizPrcgDt: {
15053
+ dateTime: {
15054
+ date: { year: 2025, month: 7, day: 3 },
15055
+ time: { hour: 12, minute: 50, second: 30, nano: 114e6 }
15056
+ },
15057
+ offset: { totalSeconds: -14400 }
15058
+ },
15059
+ namespace: "urn:iso:std:iso:20022:tech:xsd:head.001.001.03"
14930
15060
  },
14931
- senderToReceiverInformation: [
14932
- "Payment for invoice INV-2024-089",
14933
- "Equipment and supplies purchase",
14934
- "Net 30 terms - On time payment"
14935
- ],
14936
- chargeDetails: "OUR"
15061
+ type: "MX",
15062
+ "@xmlns": "urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08",
15063
+ identifier: "pacs.008.001.08"
14937
15064
  }
14938
15065
  }
14939
15066
  },
@@ -16121,6 +16248,9 @@ var TransactionDetail = () => {
16121
16248
  const handleProductClick = useCallback((productId) => {
16122
16249
  console.log("Navigate to product:", productId);
16123
16250
  }, []);
16251
+ const handleAlertClick = useCallback((alertId) => {
16252
+ navigate(`/alerts/${alertId}`);
16253
+ }, [navigate]);
16124
16254
  const handleIMADChange = useCallback((newImad) => {
16125
16255
  console.log("IMAD changed to:", newImad);
16126
16256
  }, []);
@@ -16152,6 +16282,7 @@ var TransactionDetail = () => {
16152
16282
  onCounterpartyClick: handleCounterpartyClick,
16153
16283
  onOFACClick: handleOFACClick,
16154
16284
  onProductClick: handleProductClick,
16285
+ onAlertClick: handleAlertClick,
16155
16286
  onIMADChange: handleIMADChange,
16156
16287
  isLoading,
16157
16288
  error,