braid-ui 1.0.56 → 1.0.58

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.d.cts CHANGED
@@ -1046,7 +1046,6 @@ interface NewTransactionViewProps {
1046
1046
  onEditCounterparty: () => void;
1047
1047
  onTransactionTypeChange: (type: string) => void;
1048
1048
  onSubmit: () => void;
1049
- onCancel: () => void;
1050
1049
  onConfirmationClose: () => void;
1051
1050
  onConfirmationOpenChange: (open: boolean) => void;
1052
1051
  onNewTransaction: () => void;
@@ -1065,8 +1064,10 @@ interface NewTransactionViewProps {
1065
1064
  isReviewReady: boolean;
1066
1065
  adjustmentTypeOptions: AdjustmentTypeOption[];
1067
1066
  transactionTypeOptions: TransactionTypeOption[];
1067
+ showSuccessInfoBox?: boolean;
1068
+ successInfoMessage?: string;
1068
1069
  }
1069
- declare const NewTransactionView: ({ form, accountLookedUp, accountData, counterpartyLookedUp, counterpartyData, confirmationOpen, submissionStatus, errorMessage, transactionId, isAccountLoading, isCounterpartyLoading, isSubmitting, counterpartySearchResults, isCounterpartySearching, showCounterpartyDropdown, onAccountLookup, onEditAccount, onEditCounterparty, onTransactionTypeChange, onSubmit, onCancel, onConfirmationClose, onConfirmationOpenChange, onNewTransaction, onCounterpartySearchChange, onCounterpartySelect, onCounterpartyDropdownClose, counterpartyHasMore, counterpartyTotalResults, isLoadingMoreCounterparties, onLoadMoreCounterparties, receiverAccountLookedUp, receiverAccountData, isReceiverAccountLoading, onReceiverAccountLookup, onEditReceiverAccount, isReviewReady, adjustmentTypeOptions, transactionTypeOptions, }: NewTransactionViewProps) => react_jsx_runtime.JSX.Element;
1070
+ declare const NewTransactionView: ({ form, accountLookedUp, accountData, counterpartyLookedUp, counterpartyData, confirmationOpen, submissionStatus, errorMessage, transactionId, isAccountLoading, isCounterpartyLoading, isSubmitting, counterpartySearchResults, isCounterpartySearching, showCounterpartyDropdown, onAccountLookup, onEditAccount, onEditCounterparty, onTransactionTypeChange, onSubmit, onConfirmationClose, onConfirmationOpenChange, onNewTransaction, onCounterpartySearchChange, onCounterpartySelect, onCounterpartyDropdownClose, counterpartyHasMore, counterpartyTotalResults, isLoadingMoreCounterparties, onLoadMoreCounterparties, receiverAccountLookedUp, receiverAccountData, isReceiverAccountLoading, onReceiverAccountLookup, onEditReceiverAccount, isReviewReady, adjustmentTypeOptions, transactionTypeOptions, showSuccessInfoBox, successInfoMessage, }: NewTransactionViewProps) => react_jsx_runtime.JSX.Element;
1070
1071
 
1071
1072
  interface AccountCardProps {
1072
1073
  account: {
package/dist/index.d.ts CHANGED
@@ -1046,7 +1046,6 @@ interface NewTransactionViewProps {
1046
1046
  onEditCounterparty: () => void;
1047
1047
  onTransactionTypeChange: (type: string) => void;
1048
1048
  onSubmit: () => void;
1049
- onCancel: () => void;
1050
1049
  onConfirmationClose: () => void;
1051
1050
  onConfirmationOpenChange: (open: boolean) => void;
1052
1051
  onNewTransaction: () => void;
@@ -1065,8 +1064,10 @@ interface NewTransactionViewProps {
1065
1064
  isReviewReady: boolean;
1066
1065
  adjustmentTypeOptions: AdjustmentTypeOption[];
1067
1066
  transactionTypeOptions: TransactionTypeOption[];
1067
+ showSuccessInfoBox?: boolean;
1068
+ successInfoMessage?: string;
1068
1069
  }
1069
- declare const NewTransactionView: ({ form, accountLookedUp, accountData, counterpartyLookedUp, counterpartyData, confirmationOpen, submissionStatus, errorMessage, transactionId, isAccountLoading, isCounterpartyLoading, isSubmitting, counterpartySearchResults, isCounterpartySearching, showCounterpartyDropdown, onAccountLookup, onEditAccount, onEditCounterparty, onTransactionTypeChange, onSubmit, onCancel, onConfirmationClose, onConfirmationOpenChange, onNewTransaction, onCounterpartySearchChange, onCounterpartySelect, onCounterpartyDropdownClose, counterpartyHasMore, counterpartyTotalResults, isLoadingMoreCounterparties, onLoadMoreCounterparties, receiverAccountLookedUp, receiverAccountData, isReceiverAccountLoading, onReceiverAccountLookup, onEditReceiverAccount, isReviewReady, adjustmentTypeOptions, transactionTypeOptions, }: NewTransactionViewProps) => react_jsx_runtime.JSX.Element;
1070
+ declare const NewTransactionView: ({ form, accountLookedUp, accountData, counterpartyLookedUp, counterpartyData, confirmationOpen, submissionStatus, errorMessage, transactionId, isAccountLoading, isCounterpartyLoading, isSubmitting, counterpartySearchResults, isCounterpartySearching, showCounterpartyDropdown, onAccountLookup, onEditAccount, onEditCounterparty, onTransactionTypeChange, onSubmit, onConfirmationClose, onConfirmationOpenChange, onNewTransaction, onCounterpartySearchChange, onCounterpartySelect, onCounterpartyDropdownClose, counterpartyHasMore, counterpartyTotalResults, isLoadingMoreCounterparties, onLoadMoreCounterparties, receiverAccountLookedUp, receiverAccountData, isReceiverAccountLoading, onReceiverAccountLookup, onEditReceiverAccount, isReviewReady, adjustmentTypeOptions, transactionTypeOptions, showSuccessInfoBox, successInfoMessage, }: NewTransactionViewProps) => react_jsx_runtime.JSX.Element;
1070
1071
 
1071
1072
  interface AccountCardProps {
1072
1073
  account: {
package/dist/index.js CHANGED
@@ -8225,7 +8225,7 @@ var StatementView = ({
8225
8225
  ] });
8226
8226
  };
8227
8227
  var ACHDetailsSection = ({ data }) => {
8228
- const formatCurrency3 = (value) => {
8228
+ const formatCurrency4 = (value) => {
8229
8229
  return new Intl.NumberFormat("en-US", {
8230
8230
  style: "currency",
8231
8231
  currency: "USD",
@@ -8261,7 +8261,7 @@ var ACHDetailsSection = ({ data }) => {
8261
8261
  layout: "horizontal"
8262
8262
  }
8263
8263
  ),
8264
- /* @__PURE__ */ jsx(InfoField, { label: "Amount", value: formatCurrency3(data.amount), layout: "horizontal" }),
8264
+ /* @__PURE__ */ jsx(InfoField, { label: "Amount", value: formatCurrency4(data.amount), layout: "horizontal" }),
8265
8265
  /* @__PURE__ */ jsx(InfoField, { label: "SEC Code", value: data.secCode, layout: "horizontal" }),
8266
8266
  /* @__PURE__ */ jsx(InfoField, { label: "Company Entry Description", value: data.companyEntryDescription, layout: "horizontal" }),
8267
8267
  data.companyDiscretionaryData && /* @__PURE__ */ jsx(InfoField, { label: "Company Discretionary Data", value: data.companyDiscretionaryData, layout: "horizontal" }),
@@ -8428,7 +8428,6 @@ var NewTransactionView = ({
8428
8428
  onEditCounterparty,
8429
8429
  onTransactionTypeChange,
8430
8430
  onSubmit,
8431
- onCancel,
8432
8431
  onConfirmationClose,
8433
8432
  onConfirmationOpenChange,
8434
8433
  onNewTransaction,
@@ -8446,7 +8445,9 @@ var NewTransactionView = ({
8446
8445
  onEditReceiverAccount,
8447
8446
  isReviewReady,
8448
8447
  adjustmentTypeOptions,
8449
- transactionTypeOptions
8448
+ transactionTypeOptions,
8449
+ showSuccessInfoBox = false,
8450
+ successInfoMessage = ""
8450
8451
  }) => {
8451
8452
  const transactionType = form.watch("transactionType");
8452
8453
  const accountNumber = form.watch("accountNumber");
@@ -8455,6 +8456,7 @@ var NewTransactionView = ({
8455
8456
  const receiverAccountNumber = form.watch("receiverAccountNumber");
8456
8457
  const adjustmentDirection = form.watch("adjustmentDirection");
8457
8458
  const adjustmentType = form.watch("adjustmentType");
8459
+ const description = form.watch("description");
8458
8460
  const requiresCounterparty = ["ach", "wire"].includes(transactionType);
8459
8461
  const isTransfer = transactionType === "transfer";
8460
8462
  const isAdjustment = transactionType === "adjustment";
@@ -8815,56 +8817,71 @@ var NewTransactionView = ({
8815
8817
  ] })
8816
8818
  }
8817
8819
  ) }),
8818
- /* @__PURE__ */ jsxs("div", { className: "flex gap-3 justify-end pt-4 border-t border-border", children: [
8819
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: onCancel, className: "w-32", children: "Cancel" }),
8820
- /* @__PURE__ */ jsx(
8821
- Button,
8822
- {
8823
- type: "button",
8824
- onClick: onSubmit,
8825
- className: "w-48",
8826
- disabled: !transactionType || !accountNumber || requiresCounterparty && !counterpartyName || isTransfer && !receiverAccountLookedUp || isAdjustment && (!adjustmentDirection || !adjustmentType) || !amount || !form.watch("certifyInformation") || isSubmitting,
8827
- children: isSubmitting ? /* @__PURE__ */ jsxs(Fragment, { children: [
8828
- /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
8829
- "Submitting..."
8830
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
8831
- /* @__PURE__ */ jsx(CheckCircle2, { className: "h-4 w-4 mr-2" }),
8832
- "Submit Transaction"
8833
- ] })
8834
- }
8835
- )
8836
- ] })
8820
+ /* @__PURE__ */ jsx("div", { className: "flex justify-end pt-4 border-t border-border", children: /* @__PURE__ */ jsx(
8821
+ Button,
8822
+ {
8823
+ type: "button",
8824
+ onClick: onSubmit,
8825
+ className: "w-48",
8826
+ disabled: !transactionType || !accountNumber || requiresCounterparty && !counterpartyName || isTransfer && !receiverAccountLookedUp || isAdjustment && (!adjustmentDirection || !adjustmentType) || !amount || !form.watch("certifyInformation") || isSubmitting,
8827
+ children: isSubmitting ? /* @__PURE__ */ jsxs(Fragment, { children: [
8828
+ /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
8829
+ "Submitting..."
8830
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
8831
+ /* @__PURE__ */ jsx(CheckCircle2, { className: "h-4 w-4 mr-2" }),
8832
+ "Submit Transaction"
8833
+ ] })
8834
+ }
8835
+ ) })
8837
8836
  ] }) })
8838
8837
  ] }) }),
8839
8838
  /* @__PURE__ */ jsx(Dialog, { open: confirmationOpen, onOpenChange: () => {
8840
8839
  }, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-md flex flex-col max-h-[85vh]", hideCloseButton: true, children: [
8841
8840
  /* @__PURE__ */ jsx(DialogHeader, { className: "flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-2", children: [
8842
8841
  submissionStatus === "success" ? /* @__PURE__ */ jsx("div", { className: "h-12 w-12 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ jsx(CheckCircle2, { className: "h-6 w-6 text-success" }) }) : /* @__PURE__ */ jsx("div", { className: "h-12 w-12 rounded-full bg-destructive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx(XCircle, { className: "h-6 w-6 text-destructive" }) }),
8843
- /* @__PURE__ */ jsx(DialogTitle, { className: "text-xl", children: submissionStatus === "success" ? "Transaction Successful" : "Transaction Failed" })
8842
+ /* @__PURE__ */ jsx(DialogTitle, { className: "text-xl", children: submissionStatus === "success" ? "Transaction Submitted" : "Transaction Failed" })
8844
8843
  ] }) }),
8845
8844
  /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto min-h-0", children: submissionStatus === "success" ? /* @__PURE__ */ jsxs("div", { className: "space-y-4 pt-2", children: [
8846
8845
  /* @__PURE__ */ jsx("p", { className: "text-foreground", children: "Your transaction has been successfully submitted and is being processed." }),
8847
8846
  /* @__PURE__ */ jsxs("div", { className: "bg-muted/50 rounded-lg p-4 space-y-2", children: [
8848
8847
  /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8849
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Transaction ID:" }),
8850
- /* @__PURE__ */ jsx("span", { className: "font-mono font-medium", children: transactionId })
8848
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Payment ID:" }),
8849
+ /* @__PURE__ */ jsx("span", { className: "font-mono font-medium text-xs", children: crypto.randomUUID() })
8850
+ ] }),
8851
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8852
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Account:" }),
8853
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: accountData ? `${accountData.accountName} (${accountData.accountNumber})` : "N/A" })
8854
+ ] }),
8855
+ transactionType === "transfer" && /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8856
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Receiver Account:" }),
8857
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: receiverAccountData ? `${receiverAccountData.accountName} (${receiverAccountData.accountNumber})` : "N/A" })
8858
+ ] }),
8859
+ transactionType === "adjustment" && /* @__PURE__ */ jsxs(Fragment, { children: [
8860
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8861
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Direction:" }),
8862
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: adjustmentDirection === "debit" ? "Debit" : "Credit" })
8863
+ ] }),
8864
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8865
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Adjustment Type:" }),
8866
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: adjustmentTypeOptions.find((t) => t.value === adjustmentType)?.label || "N/A" })
8867
+ ] })
8868
+ ] }),
8869
+ (transactionType === "wire" || transactionType === "ach") && /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8870
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Customer Name:" }),
8871
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: counterpartyName || "N/A" })
8851
8872
  ] }),
8852
8873
  /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8853
8874
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Amount:" }),
8854
8875
  /* @__PURE__ */ jsx("span", { className: "font-medium", children: formatCurrency2(amount) })
8855
8876
  ] }),
8856
8877
  /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8857
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Type:" }),
8858
- /* @__PURE__ */ jsx("span", { className: "font-medium", children: transactionTypeOptions.find((t) => t.value === transactionType)?.label })
8859
- ] }),
8860
- requiresCounterparty && counterpartyName && /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
8861
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Counterparty:" }),
8862
- /* @__PURE__ */ jsx("span", { className: "font-medium", children: counterpartyName })
8878
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Description:" }),
8879
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: description || "N/A" })
8863
8880
  ] })
8864
8881
  ] }),
8865
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg", children: [
8882
+ showSuccessInfoBox && successInfoMessage && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg", children: [
8866
8883
  /* @__PURE__ */ jsx(AlertCircle, { className: "h-5 w-5 text-blue-500 mt-0.5 flex-shrink-0" }),
8867
- /* @__PURE__ */ jsx("p", { className: "text-sm text-blue-700 dark:text-blue-300", children: "You will receive a confirmation email once the transaction is completed." })
8884
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-blue-700 dark:text-blue-300", children: successInfoMessage })
8868
8885
  ] })
8869
8886
  ] }) : /* @__PURE__ */ jsxs("div", { className: "space-y-4 pt-2", children: [
8870
8887
  /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 p-4 bg-destructive/10 border border-destructive/20 rounded-lg", children: [
@@ -8877,17 +8894,11 @@ var NewTransactionView = ({
8877
8894
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Please review the error message above and try again. If the problem persists, contact support." })
8878
8895
  ] }) }),
8879
8896
  /* @__PURE__ */ jsxs(DialogFooter, { className: "sm:justify-end gap-2 flex-shrink-0", children: [
8880
- submissionStatus === "error" && /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: () => onConfirmationOpenChange(false), children: "Edit" }),
8881
- submissionStatus === "success" && /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: onNewTransaction, children: "New Transaction" }),
8882
- /* @__PURE__ */ jsx(
8883
- Button,
8884
- {
8885
- type: "button",
8886
- onClick: onConfirmationClose,
8887
- variant: submissionStatus === "success" ? "default" : "outline",
8888
- children: submissionStatus === "success" ? "View Transaction" : "Close"
8889
- }
8890
- )
8897
+ submissionStatus === "error" && /* @__PURE__ */ jsx(Button, { type: "button", onClick: () => onConfirmationOpenChange(false), children: "Edit" }),
8898
+ submissionStatus === "success" && /* @__PURE__ */ jsxs(Fragment, { children: [
8899
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: onNewTransaction, children: "New Transaction" }),
8900
+ /* @__PURE__ */ jsx(Button, { type: "button", onClick: onConfirmationClose, children: "View Transaction" })
8901
+ ] })
8891
8902
  ] })
8892
8903
  ] }) })
8893
8904
  ] });
@@ -13979,7 +13990,7 @@ var TransactionHistory = () => {
13979
13990
  setRowsPerPage(value);
13980
13991
  setCurrentPage(1);
13981
13992
  };
13982
- const formatCurrency3 = (value) => {
13993
+ const formatCurrency4 = (value) => {
13983
13994
  const formatted = new Intl.NumberFormat("en-US", {
13984
13995
  style: "currency",
13985
13996
  currency: "USD",
@@ -14268,7 +14279,7 @@ var TransactionHistory = () => {
14268
14279
  children: [
14269
14280
  /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs", children: transaction.created }),
14270
14281
  /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs", children: transaction.accountNumber }),
14271
- /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs text-right", children: /* @__PURE__ */ jsx("span", { className: transaction.amount < 0 ? "text-destructive" : "", children: formatCurrency3(transaction.amount) }) }),
14282
+ /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs text-right", children: /* @__PURE__ */ jsx("span", { className: transaction.amount < 0 ? "text-destructive" : "", children: formatCurrency4(transaction.amount) }) }),
14272
14283
  /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 font-normal text-xs", children: transaction.customer }) }),
14273
14284
  /* @__PURE__ */ jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 font-normal text-xs", children: transaction.counterparty }) }),
14274
14285
  /* @__PURE__ */ jsx("td", { className: "px-3 py-2 text-xs truncate", children: transaction.description }),
@@ -14697,7 +14708,7 @@ function NewTransaction() {
14697
14708
  };
14698
14709
  console.log("Transaction submission payload:", submissionPayload);
14699
14710
  await new Promise((resolve) => setTimeout(resolve, 1500));
14700
- const hasError = Math.random() > 0.1;
14711
+ const hasError = Math.random() > 0.7;
14701
14712
  if (hasError) {
14702
14713
  const errorScenarios = [
14703
14714
  "Insufficient funds. Current balance: $125,450.00, Required: $" + parseFloat(data.amount).toFixed(2),
@@ -14706,9 +14717,7 @@ function NewTransaction() {
14706
14717
  "Invalid routing number for the selected transaction type."
14707
14718
  ];
14708
14719
  setSubmissionStatus("error");
14709
- setErrorMessage(
14710
- 'JSON parse error: Cannot deserialize value of type `io.ropechain.api.enums.TransactionEnums$DebitAdjustmentTypes` from String "mapSubTypeStringToEnum(data.adjustmentType ?? "")": not one of the values accepted for Enum class: [COLLECTION, TRANSACTION_REVERSAL, TRANSACTION_ADJUSTMENT]; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `io.ropechain.api.enums.TransactionEnums$DebitAdjustmentTypes` from String "mapSubTypeStringToEnum(data.adjustmentType ?? "")": not one of the values accepted for Enum class: [COLLECTION, TRANSACTION_REVERSAL, TRANSACTION_ADJUSTMENT]\n at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 1, column: 51] (through reference chain: io.ropechain.api.model.transaction.internal.TransactionDebitAdjustmentRequest["subType"])'
14711
- );
14720
+ setErrorMessage(errorScenarios[Math.floor(Math.random() * errorScenarios.length)]);
14712
14721
  } else {
14713
14722
  const txId = "TXN-" + Math.random().toString(36).substr(2, 9).toUpperCase();
14714
14723
  setTransactionId(txId);
@@ -14753,9 +14762,6 @@ function NewTransaction() {
14753
14762
  setConfirmationOpen(false);
14754
14763
  resetForm();
14755
14764
  };
14756
- const handleCancel = () => {
14757
- navigate("/dashboard");
14758
- };
14759
14765
  const isReviewReady = useMemo(() => {
14760
14766
  const data = form.watch();
14761
14767
  const requiresCounterparty = ["ach", "wire"].includes(data.transactionType);
@@ -14800,7 +14806,6 @@ function NewTransaction() {
14800
14806
  onEditCounterparty: handleEditCounterparty,
14801
14807
  onTransactionTypeChange: handleTransactionTypeChange,
14802
14808
  onSubmit: handleSubmit,
14803
- onCancel: handleCancel,
14804
14809
  onConfirmationClose: handleConfirmationClose,
14805
14810
  onConfirmationOpenChange: setConfirmationOpen,
14806
14811
  onNewTransaction: handleNewTransaction,
@@ -14811,66 +14816,60 @@ function NewTransaction() {
14811
14816
  onEditReceiverAccount: handleEditReceiverAccount,
14812
14817
  isReviewReady,
14813
14818
  adjustmentTypeOptions,
14814
- transactionTypeOptions
14819
+ transactionTypeOptions,
14820
+ showSuccessInfoBox: true,
14821
+ successInfoMessage: "The transaction is being manually reviewed"
14815
14822
  }
14816
14823
  );
14817
14824
  }
14818
- var TransactionDetail = () => {
14819
- const { id } = useParams();
14820
- const navigate = useNavigate();
14821
- const transaction = mockTransactions.find((t) => t.id === id);
14822
- if (!transaction) {
14823
- return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
14824
- /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Transaction Not Found" }),
14825
- /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground mb-4", children: [
14826
- "The transaction #",
14827
- id,
14828
- " could not be found."
14829
- ] }),
14830
- /* @__PURE__ */ jsx(Button, { onClick: () => navigate("/transactions/history"), children: "Back to Transaction History" })
14831
- ] }) });
14825
+ var getStatusVariant = (status) => {
14826
+ switch (status) {
14827
+ case "POSTED":
14828
+ return "success";
14829
+ case "PENDING":
14830
+ return "warning";
14831
+ case "FAILED":
14832
+ return "destructive";
14833
+ case "CANCELLED":
14834
+ return "outline";
14835
+ default:
14836
+ return "outline";
14832
14837
  }
14833
- const getStatusVariant3 = (status) => {
14834
- switch (status) {
14835
- case "POSTED":
14836
- return "success";
14837
- case "PENDING":
14838
- return "warning";
14839
- case "FAILED":
14840
- return "destructive";
14841
- case "CANCELLED":
14842
- return "outline";
14843
- default:
14844
- return "outline";
14845
- }
14846
- };
14847
- const getProcessingStatusVariant = (status) => {
14848
- switch (status) {
14849
- case "CONFIRMED":
14850
- return "success";
14851
- case "SENT":
14852
- return "success";
14853
- case "SUBMITTED":
14854
- return "warning";
14855
- case "CUSTOMER_REVIEW":
14856
- return "warning";
14857
- case "MANUAL_REVIEW":
14858
- return "warning";
14859
- case "INITIATED":
14860
- return "outline";
14861
- default:
14862
- return "outline";
14863
- }
14864
- };
14865
- const formatCurrency3 = (value) => {
14866
- return new Intl.NumberFormat("en-US", {
14867
- style: "currency",
14868
- currency: "USD",
14869
- minimumFractionDigits: 2
14870
- }).format(value);
14871
- };
14872
- const isWireTransfer = transaction.transactionType.toLowerCase().includes("wire");
14873
- const isACHTransfer = transaction.transactionType.toLowerCase().includes("ach");
14838
+ };
14839
+ var getProcessingStatusVariant = (status) => {
14840
+ switch (status) {
14841
+ case "CONFIRMED":
14842
+ case "SENT":
14843
+ return "success";
14844
+ case "SUBMITTED":
14845
+ case "CUSTOMER_REVIEW":
14846
+ case "MANUAL_REVIEW":
14847
+ return "warning";
14848
+ case "INITIATED":
14849
+ default:
14850
+ return "outline";
14851
+ }
14852
+ };
14853
+ var formatCurrency3 = (value) => {
14854
+ return new Intl.NumberFormat("en-US", {
14855
+ style: "currency",
14856
+ currency: "USD",
14857
+ minimumFractionDigits: 2
14858
+ }).format(value);
14859
+ };
14860
+ var TransactionDetailView = ({
14861
+ transaction,
14862
+ timelineEvents,
14863
+ isWireTransfer,
14864
+ isACHTransfer,
14865
+ onReturn,
14866
+ onCancel,
14867
+ onAccountClick,
14868
+ onCustomerClick,
14869
+ onCounterpartyClick,
14870
+ onOFACClick,
14871
+ onProductClick
14872
+ }) => {
14874
14873
  return /* @__PURE__ */ jsx(
14875
14874
  PageLayout,
14876
14875
  {
@@ -14886,7 +14885,7 @@ var TransactionDetail = () => {
14886
14885
  isInbound: transaction.isInbound
14887
14886
  }
14888
14887
  ),
14889
- /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant3(transaction.status), children: transaction.status }),
14888
+ /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant(transaction.status), children: transaction.status }),
14890
14889
  /* @__PURE__ */ jsx(Badge, { variant: getProcessingStatusVariant(transaction.processingStatus), children: transaction.processingStatus })
14891
14890
  ] }),
14892
14891
  maxWidth: "full",
@@ -14894,12 +14893,12 @@ var TransactionDetail = () => {
14894
14893
  {
14895
14894
  label: "Return",
14896
14895
  variant: "outline",
14897
- onClick: () => console.log("Return transaction")
14896
+ onClick: onReturn
14898
14897
  },
14899
14898
  {
14900
14899
  label: "Cancel",
14901
14900
  variant: "default",
14902
- onClick: () => console.log("Cancel transaction")
14901
+ onClick: onCancel
14903
14902
  }
14904
14903
  ],
14905
14904
  children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
@@ -14909,7 +14908,15 @@ var TransactionDetail = () => {
14909
14908
  InfoField,
14910
14909
  {
14911
14910
  label: "Account Number",
14912
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: transaction.accountNumber }),
14911
+ value: /* @__PURE__ */ jsx(
14912
+ Button,
14913
+ {
14914
+ variant: "link",
14915
+ className: "h-auto p-0 text-sm",
14916
+ onClick: () => onAccountClick(transaction.accountNumber),
14917
+ children: transaction.accountNumber
14918
+ }
14919
+ ),
14913
14920
  layout: "horizontal"
14914
14921
  }
14915
14922
  ),
@@ -14917,7 +14924,15 @@ var TransactionDetail = () => {
14917
14924
  InfoField,
14918
14925
  {
14919
14926
  label: "Customer",
14920
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: transaction.customer }),
14927
+ value: /* @__PURE__ */ jsx(
14928
+ Button,
14929
+ {
14930
+ variant: "link",
14931
+ className: "h-auto p-0 text-sm",
14932
+ onClick: () => onCustomerClick(transaction.customer),
14933
+ children: transaction.customer
14934
+ }
14935
+ ),
14921
14936
  layout: "horizontal"
14922
14937
  }
14923
14938
  ),
@@ -14926,12 +14941,35 @@ var TransactionDetail = () => {
14926
14941
  InfoField,
14927
14942
  {
14928
14943
  label: "Counterparty",
14929
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: transaction.counterparty }),
14944
+ value: /* @__PURE__ */ jsx(
14945
+ Button,
14946
+ {
14947
+ variant: "link",
14948
+ className: "h-auto p-0 text-sm",
14949
+ onClick: () => onCounterpartyClick(transaction.counterparty),
14950
+ children: transaction.counterparty
14951
+ }
14952
+ ),
14930
14953
  layout: "horizontal"
14931
14954
  }
14932
14955
  ),
14933
14956
  /* @__PURE__ */ jsx(InfoField, { label: "Post Date", value: transaction.created.split(" ")[0], layout: "horizontal" }),
14934
- /* @__PURE__ */ jsx(InfoField, { label: "OFAC ID", value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: "18323208" }), layout: "horizontal" }),
14957
+ /* @__PURE__ */ jsx(
14958
+ InfoField,
14959
+ {
14960
+ label: "OFAC ID",
14961
+ value: /* @__PURE__ */ jsx(
14962
+ Button,
14963
+ {
14964
+ variant: "link",
14965
+ className: "h-auto p-0 text-sm",
14966
+ onClick: () => onOFACClick("18323208"),
14967
+ children: "18323208"
14968
+ }
14969
+ ),
14970
+ layout: "horizontal"
14971
+ }
14972
+ ),
14935
14973
  /* @__PURE__ */ jsx(InfoField, { label: "Original Filename", value: "-", layout: "horizontal" }),
14936
14974
  /* @__PURE__ */ jsx(InfoField, { label: "Loaded From File", value: "iso21130757012764355B7.xml.126534273Q299", layout: "horizontal" }),
14937
14975
  /* @__PURE__ */ jsx(InfoField, { label: "Payment ID", value: transaction.id, layout: "horizontal" }),
@@ -14947,7 +14985,15 @@ var TransactionDetail = () => {
14947
14985
  InfoField,
14948
14986
  {
14949
14987
  label: "Product ID",
14950
- value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: "130" }),
14988
+ value: /* @__PURE__ */ jsx(
14989
+ Button,
14990
+ {
14991
+ variant: "link",
14992
+ className: "h-auto p-0 text-sm",
14993
+ onClick: () => onProductClick("130"),
14994
+ children: "130"
14995
+ }
14996
+ ),
14951
14997
  layout: "horizontal"
14952
14998
  }
14953
14999
  ),
@@ -14957,11 +15003,66 @@ var TransactionDetail = () => {
14957
15003
  isACHTransfer && transaction.achDetails && /* @__PURE__ */ jsx(ACHDetailsSection, { data: transaction.achDetails }),
14958
15004
  isWireTransfer && transaction.wireDetails && /* @__PURE__ */ jsx(WireDetailsSection, { data: transaction.wireDetails })
14959
15005
  ] }),
14960
- /* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(FormCard, { title: "Transaction Timeline", children: /* @__PURE__ */ jsx(AlertTimeline, { events: mockTransactionTimeline }) }) })
15006
+ /* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(FormCard, { title: "Transaction Timeline", children: /* @__PURE__ */ jsx(AlertTimeline, { events: timelineEvents }) }) })
14961
15007
  ] })
14962
15008
  }
14963
15009
  );
14964
15010
  };
15011
+ var TransactionDetail = () => {
15012
+ const { id } = useParams();
15013
+ const navigate = useNavigate();
15014
+ const transaction = mockTransactions.find((t) => t.id === id);
15015
+ if (!transaction) {
15016
+ return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
15017
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Transaction Not Found" }),
15018
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground mb-4", children: [
15019
+ "The transaction #",
15020
+ id,
15021
+ " could not be found."
15022
+ ] }),
15023
+ /* @__PURE__ */ jsx(Button, { onClick: () => navigate("/transactions/history"), children: "Back to Transaction History" })
15024
+ ] }) });
15025
+ }
15026
+ const isWireTransfer = transaction.transactionType.toLowerCase().includes("wire");
15027
+ const isACHTransfer = transaction.transactionType.toLowerCase().includes("ach");
15028
+ const handleReturn = () => {
15029
+ console.log("Return transaction");
15030
+ };
15031
+ const handleCancel = () => {
15032
+ console.log("Cancel transaction");
15033
+ };
15034
+ const handleAccountClick = (accountNumber) => {
15035
+ navigate(`/accounts/${accountNumber}`);
15036
+ };
15037
+ const handleCustomerClick = (customer) => {
15038
+ console.log("Navigate to customer:", customer);
15039
+ };
15040
+ const handleCounterpartyClick = (counterparty) => {
15041
+ console.log("Navigate to counterparty:", counterparty);
15042
+ };
15043
+ const handleOFACClick = (ofacId) => {
15044
+ navigate(`/compliance/ofac/${ofacId}`);
15045
+ };
15046
+ const handleProductClick = (productId) => {
15047
+ console.log("Navigate to product:", productId);
15048
+ };
15049
+ return /* @__PURE__ */ jsx(
15050
+ TransactionDetailView,
15051
+ {
15052
+ transaction,
15053
+ timelineEvents: mockTransactionTimeline,
15054
+ isWireTransfer,
15055
+ isACHTransfer,
15056
+ onReturn: handleReturn,
15057
+ onCancel: handleCancel,
15058
+ onAccountClick: handleAccountClick,
15059
+ onCustomerClick: handleCustomerClick,
15060
+ onCounterpartyClick: handleCounterpartyClick,
15061
+ onOFACClick: handleOFACClick,
15062
+ onProductClick: handleProductClick
15063
+ }
15064
+ );
15065
+ };
14965
15066
  var TransactionDetail_default = TransactionDetail;
14966
15067
  function UIKit() {
14967
15068
  const breadcrumbs = [
@@ -15280,7 +15381,7 @@ var mockVelocityLimits = [
15280
15381
  comparisonMethod: "fuzzy"
15281
15382
  }
15282
15383
  ];
15283
- var getStatusVariant = (status) => {
15384
+ var getStatusVariant2 = (status) => {
15284
15385
  switch (status) {
15285
15386
  case "ACTIVE":
15286
15387
  return "success";
@@ -15396,7 +15497,7 @@ function VelocityLimits() {
15396
15497
  key: "status",
15397
15498
  title: "Status",
15398
15499
  sortable: true,
15399
- render: (value) => /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant(value), children: value })
15500
+ render: (value) => /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant2(value), children: value })
15400
15501
  },
15401
15502
  {
15402
15503
  key: "associatedEntity",
@@ -15779,7 +15880,7 @@ function CreateVelocityLimit() {
15779
15880
  ] }) }) }) }) })
15780
15881
  ] });
15781
15882
  }
15782
- var getStatusVariant2 = (status) => {
15883
+ var getStatusVariant3 = (status) => {
15783
15884
  switch (status) {
15784
15885
  case "ACTIVE":
15785
15886
  return "success";
@@ -16016,7 +16117,7 @@ function VelocityLimitDetail() {
16016
16117
  {
16017
16118
  title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
16018
16119
  /* @__PURE__ */ jsx("span", { children: limit.limitName }),
16019
- /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant2(limit.status), children: limit.status })
16120
+ /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant3(limit.status), children: limit.status })
16020
16121
  ] }),
16021
16122
  cards: [
16022
16123
  {