braid-ui 1.0.42 → 1.0.43
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 +56 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +57 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4015,6 +4015,21 @@ var statusConfig = {
|
|
|
4015
4015
|
variant: "secondary",
|
|
4016
4016
|
label: "Cancelled",
|
|
4017
4017
|
icon: lucideReact.XCircle
|
|
4018
|
+
},
|
|
4019
|
+
DELETED: {
|
|
4020
|
+
variant: "inactive",
|
|
4021
|
+
label: "Deleted",
|
|
4022
|
+
icon: lucideReact.XCircle
|
|
4023
|
+
},
|
|
4024
|
+
NEEDS_OFAC: {
|
|
4025
|
+
variant: "pending",
|
|
4026
|
+
label: "Needs OFAC",
|
|
4027
|
+
icon: lucideReact.AlertTriangle
|
|
4028
|
+
},
|
|
4029
|
+
PENDING_UNBLOCK: {
|
|
4030
|
+
variant: "pending",
|
|
4031
|
+
label: "Pending Unblock",
|
|
4032
|
+
icon: lucideReact.Clock
|
|
4018
4033
|
}
|
|
4019
4034
|
};
|
|
4020
4035
|
var StatusBadge = ({ status, className }) => {
|
|
@@ -6221,9 +6236,10 @@ var CounterpartyDetailView = ({
|
|
|
6221
6236
|
value: currentStatus,
|
|
6222
6237
|
options: [
|
|
6223
6238
|
{ value: "ACTIVE", label: "Active" },
|
|
6224
|
-
{ value: "
|
|
6225
|
-
{ value: "
|
|
6226
|
-
{ value: "
|
|
6239
|
+
{ value: "BLOCKED", label: "Blocked" },
|
|
6240
|
+
{ value: "DELETED", label: "Deleted" },
|
|
6241
|
+
{ value: "NEEDS_OFAC", label: "Needs OFAC" },
|
|
6242
|
+
{ value: "PENDING_UNBLOCK", label: "Pending Unblock" }
|
|
6227
6243
|
],
|
|
6228
6244
|
onChange: onStatusChange,
|
|
6229
6245
|
renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value }),
|
|
@@ -6971,20 +6987,18 @@ var Label = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
6971
6987
|
}
|
|
6972
6988
|
));
|
|
6973
6989
|
Label.displayName = LabelPrimitive__namespace.Root.displayName;
|
|
6974
|
-
var CounterpartyBasicInfo = ({
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
const updatedData = { ...formData, [field]: value };
|
|
6987
|
-
setFormData(updatedData);
|
|
6990
|
+
var CounterpartyBasicInfo = ({ value = {
|
|
6991
|
+
name: "",
|
|
6992
|
+
type: "business",
|
|
6993
|
+
email: "",
|
|
6994
|
+
phone: "",
|
|
6995
|
+
dateOfBirth: "",
|
|
6996
|
+
idNumber: "",
|
|
6997
|
+
idType: "product_id",
|
|
6998
|
+
idValue: ""
|
|
6999
|
+
}, onDataChange }) => {
|
|
7000
|
+
const handleInputChange = (field, newValue) => {
|
|
7001
|
+
const updatedData = { ...value, [field]: newValue };
|
|
6988
7002
|
onDataChange?.(updatedData);
|
|
6989
7003
|
};
|
|
6990
7004
|
const handleTypeChange = (type) => {
|
|
@@ -6996,7 +7010,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
6996
7010
|
EnhancedInput,
|
|
6997
7011
|
{
|
|
6998
7012
|
label: "Counterparty Name",
|
|
6999
|
-
value:
|
|
7013
|
+
value: value.name,
|
|
7000
7014
|
onChange: (e) => handleInputChange("name", e.target.value),
|
|
7001
7015
|
placeholder: "Enter counterparty name",
|
|
7002
7016
|
required: true
|
|
@@ -7012,7 +7026,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7012
7026
|
type: "radio",
|
|
7013
7027
|
name: "counterpartyType",
|
|
7014
7028
|
value: "business",
|
|
7015
|
-
checked:
|
|
7029
|
+
checked: value.type === "business",
|
|
7016
7030
|
onChange: () => handleTypeChange("business"),
|
|
7017
7031
|
className: "w-4 h-4 text-primary border-border focus:ring-primary focus:ring-2"
|
|
7018
7032
|
}
|
|
@@ -7026,7 +7040,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7026
7040
|
type: "radio",
|
|
7027
7041
|
name: "counterpartyType",
|
|
7028
7042
|
value: "individual",
|
|
7029
|
-
checked:
|
|
7043
|
+
checked: value.type === "individual",
|
|
7030
7044
|
onChange: () => handleTypeChange("individual"),
|
|
7031
7045
|
className: "w-4 h-4 text-primary border-border focus:ring-primary focus:ring-2"
|
|
7032
7046
|
}
|
|
@@ -7039,8 +7053,8 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7039
7053
|
EnhancedSelect,
|
|
7040
7054
|
{
|
|
7041
7055
|
label: "Associated with",
|
|
7042
|
-
value:
|
|
7043
|
-
onValueChange: (
|
|
7056
|
+
value: value.idType,
|
|
7057
|
+
onValueChange: (val) => handleInputChange("idType", val),
|
|
7044
7058
|
options: [
|
|
7045
7059
|
{ value: "product_id", label: "Product ID" },
|
|
7046
7060
|
{ value: "business_id", label: "Business ID" },
|
|
@@ -7052,10 +7066,10 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7052
7066
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7053
7067
|
EnhancedInput,
|
|
7054
7068
|
{
|
|
7055
|
-
label:
|
|
7056
|
-
value:
|
|
7069
|
+
label: value.idType === "product_id" ? "Product ID" : value.idType === "business_id" ? "Business ID" : value.idType === "individual_id" ? "Individual ID" : "Account Number",
|
|
7070
|
+
value: value.idValue,
|
|
7057
7071
|
onChange: (e) => handleInputChange("idValue", e.target.value),
|
|
7058
|
-
placeholder: `Enter ${
|
|
7072
|
+
placeholder: `Enter ${value.idType === "product_id" ? "product ID" : value.idType === "business_id" ? "business ID" : value.idType === "individual_id" ? "individual ID" : "account number"}`,
|
|
7059
7073
|
required: true
|
|
7060
7074
|
}
|
|
7061
7075
|
)
|
|
@@ -7066,7 +7080,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7066
7080
|
{
|
|
7067
7081
|
label: "Email",
|
|
7068
7082
|
type: "email",
|
|
7069
|
-
value:
|
|
7083
|
+
value: value.email,
|
|
7070
7084
|
onChange: (e) => handleInputChange("email", e.target.value),
|
|
7071
7085
|
placeholder: "Enter email address"
|
|
7072
7086
|
}
|
|
@@ -7076,7 +7090,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7076
7090
|
{
|
|
7077
7091
|
label: "Phone Number",
|
|
7078
7092
|
type: "tel",
|
|
7079
|
-
value:
|
|
7093
|
+
value: value.phone,
|
|
7080
7094
|
onChange: (e) => handleInputChange("phone", e.target.value),
|
|
7081
7095
|
placeholder: "Enter phone number"
|
|
7082
7096
|
}
|
|
@@ -7086,7 +7100,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7086
7100
|
{
|
|
7087
7101
|
label: "Date of Birth",
|
|
7088
7102
|
type: "date",
|
|
7089
|
-
value:
|
|
7103
|
+
value: value.dateOfBirth,
|
|
7090
7104
|
onChange: (e) => handleInputChange("dateOfBirth", e.target.value),
|
|
7091
7105
|
placeholder: "Select date of birth"
|
|
7092
7106
|
}
|
|
@@ -7095,7 +7109,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7095
7109
|
EnhancedInput,
|
|
7096
7110
|
{
|
|
7097
7111
|
label: "ID Number",
|
|
7098
|
-
value:
|
|
7112
|
+
value: value.idNumber,
|
|
7099
7113
|
onChange: (e) => handleInputChange("idNumber", e.target.value),
|
|
7100
7114
|
placeholder: "Enter ID number"
|
|
7101
7115
|
}
|
|
@@ -11623,6 +11637,7 @@ var CounterpartyDetail = () => {
|
|
|
11623
11637
|
};
|
|
11624
11638
|
var CounterpartyDetail_default = CounterpartyDetail;
|
|
11625
11639
|
var CreateCounterpartyView = ({
|
|
11640
|
+
counterpartyData,
|
|
11626
11641
|
paymentMethods,
|
|
11627
11642
|
onPaymentMethodsChange,
|
|
11628
11643
|
onBasicInfoChange,
|
|
@@ -11641,7 +11656,7 @@ var CreateCounterpartyView = ({
|
|
|
11641
11656
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
11642
11657
|
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
11643
11658
|
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Basic Information" }) }),
|
|
11644
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyBasicInfo, { onDataChange: onBasicInfoChange }) })
|
|
11659
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyBasicInfo, { value: counterpartyData, onDataChange: onBasicInfoChange }) })
|
|
11645
11660
|
] }),
|
|
11646
11661
|
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
11647
11662
|
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(CardTitle, { children: [
|
|
@@ -11671,7 +11686,16 @@ var CreateCounterpartyView = ({
|
|
|
11671
11686
|
};
|
|
11672
11687
|
var CreateCounterparty = () => {
|
|
11673
11688
|
const navigate = reactRouterDom.useNavigate();
|
|
11674
|
-
const [counterpartyData, setCounterpartyData] = React15.useState(
|
|
11689
|
+
const [counterpartyData, setCounterpartyData] = React15.useState({
|
|
11690
|
+
name: "",
|
|
11691
|
+
type: "business",
|
|
11692
|
+
email: "",
|
|
11693
|
+
phone: "",
|
|
11694
|
+
dateOfBirth: "",
|
|
11695
|
+
idNumber: "",
|
|
11696
|
+
idType: "product_id",
|
|
11697
|
+
idValue: ""
|
|
11698
|
+
});
|
|
11675
11699
|
const [paymentMethods, setPaymentMethods] = React15.useState([]);
|
|
11676
11700
|
const handlePaymentMethodsChange = (methods) => {
|
|
11677
11701
|
setPaymentMethods(methods);
|
|
@@ -11718,6 +11742,7 @@ var CreateCounterparty = () => {
|
|
|
11718
11742
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11719
11743
|
CreateCounterpartyView,
|
|
11720
11744
|
{
|
|
11745
|
+
counterpartyData,
|
|
11721
11746
|
paymentMethods,
|
|
11722
11747
|
onPaymentMethodsChange: handlePaymentMethodsChange,
|
|
11723
11748
|
onBasicInfoChange: handleBasicInfoChange,
|