braid-ui 1.0.56 → 1.0.57
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.cjs +35 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +35 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1065,8 +1065,10 @@ interface NewTransactionViewProps {
|
|
|
1065
1065
|
isReviewReady: boolean;
|
|
1066
1066
|
adjustmentTypeOptions: AdjustmentTypeOption[];
|
|
1067
1067
|
transactionTypeOptions: TransactionTypeOption[];
|
|
1068
|
+
showSuccessInfoBox?: boolean;
|
|
1069
|
+
successInfoMessage?: string;
|
|
1068
1070
|
}
|
|
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;
|
|
1071
|
+
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, showSuccessInfoBox, successInfoMessage, }: NewTransactionViewProps) => react_jsx_runtime.JSX.Element;
|
|
1070
1072
|
|
|
1071
1073
|
interface AccountCardProps {
|
|
1072
1074
|
account: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1065,8 +1065,10 @@ interface NewTransactionViewProps {
|
|
|
1065
1065
|
isReviewReady: boolean;
|
|
1066
1066
|
adjustmentTypeOptions: AdjustmentTypeOption[];
|
|
1067
1067
|
transactionTypeOptions: TransactionTypeOption[];
|
|
1068
|
+
showSuccessInfoBox?: boolean;
|
|
1069
|
+
successInfoMessage?: string;
|
|
1068
1070
|
}
|
|
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;
|
|
1071
|
+
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, showSuccessInfoBox, successInfoMessage, }: NewTransactionViewProps) => react_jsx_runtime.JSX.Element;
|
|
1070
1072
|
|
|
1071
1073
|
interface AccountCardProps {
|
|
1072
1074
|
account: {
|
package/dist/index.js
CHANGED
|
@@ -8446,7 +8446,9 @@ var NewTransactionView = ({
|
|
|
8446
8446
|
onEditReceiverAccount,
|
|
8447
8447
|
isReviewReady,
|
|
8448
8448
|
adjustmentTypeOptions,
|
|
8449
|
-
transactionTypeOptions
|
|
8449
|
+
transactionTypeOptions,
|
|
8450
|
+
showSuccessInfoBox = false,
|
|
8451
|
+
successInfoMessage = ""
|
|
8450
8452
|
}) => {
|
|
8451
8453
|
const transactionType = form.watch("transactionType");
|
|
8452
8454
|
const accountNumber = form.watch("accountNumber");
|
|
@@ -8455,6 +8457,7 @@ var NewTransactionView = ({
|
|
|
8455
8457
|
const receiverAccountNumber = form.watch("receiverAccountNumber");
|
|
8456
8458
|
const adjustmentDirection = form.watch("adjustmentDirection");
|
|
8457
8459
|
const adjustmentType = form.watch("adjustmentType");
|
|
8460
|
+
const description = form.watch("description");
|
|
8458
8461
|
const requiresCounterparty = ["ach", "wire"].includes(transactionType);
|
|
8459
8462
|
const isTransfer = transactionType === "transfer";
|
|
8460
8463
|
const isAdjustment = transactionType === "adjustment";
|
|
@@ -8840,31 +8843,49 @@ var NewTransactionView = ({
|
|
|
8840
8843
|
}, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-md flex flex-col max-h-[85vh]", hideCloseButton: true, children: [
|
|
8841
8844
|
/* @__PURE__ */ jsx(DialogHeader, { className: "flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-2", children: [
|
|
8842
8845
|
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
|
|
8846
|
+
/* @__PURE__ */ jsx(DialogTitle, { className: "text-xl", children: submissionStatus === "success" ? "Transaction Submitted" : "Transaction Failed" })
|
|
8844
8847
|
] }) }),
|
|
8845
8848
|
/* @__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
8849
|
/* @__PURE__ */ jsx("p", { className: "text-foreground", children: "Your transaction has been successfully submitted and is being processed." }),
|
|
8847
8850
|
/* @__PURE__ */ jsxs("div", { className: "bg-muted/50 rounded-lg p-4 space-y-2", children: [
|
|
8848
8851
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8849
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "
|
|
8850
|
-
/* @__PURE__ */ jsx("span", { className: "font-mono font-medium", children:
|
|
8852
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Payment ID:" }),
|
|
8853
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono font-medium text-xs", children: crypto.randomUUID() })
|
|
8854
|
+
] }),
|
|
8855
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8856
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Account:" }),
|
|
8857
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: accountData ? `${accountData.accountName} (${accountData.accountNumber})` : "N/A" })
|
|
8858
|
+
] }),
|
|
8859
|
+
transactionType === "transfer" && /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8860
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Receiver Account:" }),
|
|
8861
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: receiverAccountData ? `${receiverAccountData.accountName} (${receiverAccountData.accountNumber})` : "N/A" })
|
|
8862
|
+
] }),
|
|
8863
|
+
transactionType === "adjustment" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8864
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8865
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Direction:" }),
|
|
8866
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: adjustmentDirection === "debit" ? "Debit" : "Credit" })
|
|
8867
|
+
] }),
|
|
8868
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8869
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Adjustment Type:" }),
|
|
8870
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: adjustmentTypeOptions.find((t) => t.value === adjustmentType)?.label || "N/A" })
|
|
8871
|
+
] })
|
|
8872
|
+
] }),
|
|
8873
|
+
(transactionType === "wire" || transactionType === "ach") && /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8874
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Customer Name:" }),
|
|
8875
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: counterpartyName || "N/A" })
|
|
8851
8876
|
] }),
|
|
8852
8877
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8853
8878
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Amount:" }),
|
|
8854
8879
|
/* @__PURE__ */ jsx("span", { className: "font-medium", children: formatCurrency2(amount) })
|
|
8855
8880
|
] }),
|
|
8856
8881
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8857
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "
|
|
8858
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium", children:
|
|
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 })
|
|
8882
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Description:" }),
|
|
8883
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: description || "N/A" })
|
|
8863
8884
|
] })
|
|
8864
8885
|
] }),
|
|
8865
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg", children: [
|
|
8886
|
+
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
8887
|
/* @__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:
|
|
8888
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-blue-700 dark:text-blue-300", children: successInfoMessage })
|
|
8868
8889
|
] })
|
|
8869
8890
|
] }) : /* @__PURE__ */ jsxs("div", { className: "space-y-4 pt-2", children: [
|
|
8870
8891
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 p-4 bg-destructive/10 border border-destructive/20 rounded-lg", children: [
|
|
@@ -14697,7 +14718,7 @@ function NewTransaction() {
|
|
|
14697
14718
|
};
|
|
14698
14719
|
console.log("Transaction submission payload:", submissionPayload);
|
|
14699
14720
|
await new Promise((resolve) => setTimeout(resolve, 1500));
|
|
14700
|
-
const hasError = Math.random() > 0.
|
|
14721
|
+
const hasError = Math.random() > 0.7;
|
|
14701
14722
|
if (hasError) {
|
|
14702
14723
|
const errorScenarios = [
|
|
14703
14724
|
"Insufficient funds. Current balance: $125,450.00, Required: $" + parseFloat(data.amount).toFixed(2),
|
|
@@ -14706,9 +14727,7 @@ function NewTransaction() {
|
|
|
14706
14727
|
"Invalid routing number for the selected transaction type."
|
|
14707
14728
|
];
|
|
14708
14729
|
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
|
-
);
|
|
14730
|
+
setErrorMessage(errorScenarios[Math.floor(Math.random() * errorScenarios.length)]);
|
|
14712
14731
|
} else {
|
|
14713
14732
|
const txId = "TXN-" + Math.random().toString(36).substr(2, 9).toUpperCase();
|
|
14714
14733
|
setTransactionId(txId);
|