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.d.cts
CHANGED
|
@@ -738,9 +738,10 @@ interface ContactInfoCardProps {
|
|
|
738
738
|
declare const ContactInfoCard: ({ isEditing, onToggleEdit, className }: ContactInfoCardProps) => react_jsx_runtime.JSX.Element;
|
|
739
739
|
|
|
740
740
|
interface CounterpartyBasicInfoProps {
|
|
741
|
+
value?: any;
|
|
741
742
|
onDataChange?: (data: any) => void;
|
|
742
743
|
}
|
|
743
|
-
declare const CounterpartyBasicInfo: ({ onDataChange }: CounterpartyBasicInfoProps) => react_jsx_runtime.JSX.Element;
|
|
744
|
+
declare const CounterpartyBasicInfo: ({ value, onDataChange }: CounterpartyBasicInfoProps) => react_jsx_runtime.JSX.Element;
|
|
744
745
|
|
|
745
746
|
interface CounterpartyProfileCardProps {
|
|
746
747
|
data?: Partial<CounterpartyDetail$1>;
|
|
@@ -1488,7 +1489,7 @@ interface StackProps {
|
|
|
1488
1489
|
declare const Stack: React$1.ForwardRefExoticComponent<StackProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1489
1490
|
|
|
1490
1491
|
interface StatusBadgeProps {
|
|
1491
|
-
status: "ACTIVE" | "INACTIVE" | "PENDING" | "SUSPENDED" | "BLOCKED" | "PENDING_APPROVAL" | "POSTED" | "FAILED" | "CANCELLED";
|
|
1492
|
+
status: "ACTIVE" | "INACTIVE" | "PENDING" | "SUSPENDED" | "BLOCKED" | "PENDING_APPROVAL" | "POSTED" | "FAILED" | "CANCELLED" | "DELETED" | "NEEDS_OFAC" | "PENDING_UNBLOCK";
|
|
1492
1493
|
className?: string;
|
|
1493
1494
|
}
|
|
1494
1495
|
declare const StatusBadge: ({ status, className }: StatusBadgeProps) => react_jsx_runtime.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -738,9 +738,10 @@ interface ContactInfoCardProps {
|
|
|
738
738
|
declare const ContactInfoCard: ({ isEditing, onToggleEdit, className }: ContactInfoCardProps) => react_jsx_runtime.JSX.Element;
|
|
739
739
|
|
|
740
740
|
interface CounterpartyBasicInfoProps {
|
|
741
|
+
value?: any;
|
|
741
742
|
onDataChange?: (data: any) => void;
|
|
742
743
|
}
|
|
743
|
-
declare const CounterpartyBasicInfo: ({ onDataChange }: CounterpartyBasicInfoProps) => react_jsx_runtime.JSX.Element;
|
|
744
|
+
declare const CounterpartyBasicInfo: ({ value, onDataChange }: CounterpartyBasicInfoProps) => react_jsx_runtime.JSX.Element;
|
|
744
745
|
|
|
745
746
|
interface CounterpartyProfileCardProps {
|
|
746
747
|
data?: Partial<CounterpartyDetail$1>;
|
|
@@ -1488,7 +1489,7 @@ interface StackProps {
|
|
|
1488
1489
|
declare const Stack: React$1.ForwardRefExoticComponent<StackProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1489
1490
|
|
|
1490
1491
|
interface StatusBadgeProps {
|
|
1491
|
-
status: "ACTIVE" | "INACTIVE" | "PENDING" | "SUSPENDED" | "BLOCKED" | "PENDING_APPROVAL" | "POSTED" | "FAILED" | "CANCELLED";
|
|
1492
|
+
status: "ACTIVE" | "INACTIVE" | "PENDING" | "SUSPENDED" | "BLOCKED" | "PENDING_APPROVAL" | "POSTED" | "FAILED" | "CANCELLED" | "DELETED" | "NEEDS_OFAC" | "PENDING_UNBLOCK";
|
|
1492
1493
|
className?: string;
|
|
1493
1494
|
}
|
|
1494
1495
|
declare const StatusBadge: ({ status, className }: StatusBadgeProps) => react_jsx_runtime.JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cva } from 'class-variance-authority';
|
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Plus, MessageSquare, Upload, FileText, Download, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Zap, Box, Settings, BarChart3, Key, ChevronLeft, AlertTriangle, XCircle, CheckCircle,
|
|
7
|
+
import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Plus, MessageSquare, Upload, FileText, Download, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Zap, Box, Settings, BarChart3, Key, ChevronLeft, AlertTriangle, Clock, XCircle, CheckCircle, Ban, Circle, Wallet, Filter, User, Loader2, ArrowDownRight, ArrowUpRight, CheckCircle2, ArrowLeft, StickyNote, FileUp, RotateCcw, Send, PlayCircle, UserPlus, ChevronsUpDown, ArrowRightLeft, UserCheck, CalendarIcon, Package, File, FileJson, DollarSign } from 'lucide-react';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
import { Slot } from '@radix-ui/react-slot';
|
|
10
10
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
@@ -3983,6 +3983,21 @@ var statusConfig = {
|
|
|
3983
3983
|
variant: "secondary",
|
|
3984
3984
|
label: "Cancelled",
|
|
3985
3985
|
icon: XCircle
|
|
3986
|
+
},
|
|
3987
|
+
DELETED: {
|
|
3988
|
+
variant: "inactive",
|
|
3989
|
+
label: "Deleted",
|
|
3990
|
+
icon: XCircle
|
|
3991
|
+
},
|
|
3992
|
+
NEEDS_OFAC: {
|
|
3993
|
+
variant: "pending",
|
|
3994
|
+
label: "Needs OFAC",
|
|
3995
|
+
icon: AlertTriangle
|
|
3996
|
+
},
|
|
3997
|
+
PENDING_UNBLOCK: {
|
|
3998
|
+
variant: "pending",
|
|
3999
|
+
label: "Pending Unblock",
|
|
4000
|
+
icon: Clock
|
|
3986
4001
|
}
|
|
3987
4002
|
};
|
|
3988
4003
|
var StatusBadge = ({ status, className }) => {
|
|
@@ -6189,9 +6204,10 @@ var CounterpartyDetailView = ({
|
|
|
6189
6204
|
value: currentStatus,
|
|
6190
6205
|
options: [
|
|
6191
6206
|
{ value: "ACTIVE", label: "Active" },
|
|
6192
|
-
{ value: "
|
|
6193
|
-
{ value: "
|
|
6194
|
-
{ value: "
|
|
6207
|
+
{ value: "BLOCKED", label: "Blocked" },
|
|
6208
|
+
{ value: "DELETED", label: "Deleted" },
|
|
6209
|
+
{ value: "NEEDS_OFAC", label: "Needs OFAC" },
|
|
6210
|
+
{ value: "PENDING_UNBLOCK", label: "Pending Unblock" }
|
|
6195
6211
|
],
|
|
6196
6212
|
onChange: onStatusChange,
|
|
6197
6213
|
renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value }),
|
|
@@ -6939,20 +6955,18 @@ var Label = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
6939
6955
|
}
|
|
6940
6956
|
));
|
|
6941
6957
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
6942
|
-
var CounterpartyBasicInfo = ({
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
const updatedData = { ...formData, [field]: value };
|
|
6955
|
-
setFormData(updatedData);
|
|
6958
|
+
var CounterpartyBasicInfo = ({ value = {
|
|
6959
|
+
name: "",
|
|
6960
|
+
type: "business",
|
|
6961
|
+
email: "",
|
|
6962
|
+
phone: "",
|
|
6963
|
+
dateOfBirth: "",
|
|
6964
|
+
idNumber: "",
|
|
6965
|
+
idType: "product_id",
|
|
6966
|
+
idValue: ""
|
|
6967
|
+
}, onDataChange }) => {
|
|
6968
|
+
const handleInputChange = (field, newValue) => {
|
|
6969
|
+
const updatedData = { ...value, [field]: newValue };
|
|
6956
6970
|
onDataChange?.(updatedData);
|
|
6957
6971
|
};
|
|
6958
6972
|
const handleTypeChange = (type) => {
|
|
@@ -6964,7 +6978,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
6964
6978
|
EnhancedInput,
|
|
6965
6979
|
{
|
|
6966
6980
|
label: "Counterparty Name",
|
|
6967
|
-
value:
|
|
6981
|
+
value: value.name,
|
|
6968
6982
|
onChange: (e) => handleInputChange("name", e.target.value),
|
|
6969
6983
|
placeholder: "Enter counterparty name",
|
|
6970
6984
|
required: true
|
|
@@ -6980,7 +6994,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
6980
6994
|
type: "radio",
|
|
6981
6995
|
name: "counterpartyType",
|
|
6982
6996
|
value: "business",
|
|
6983
|
-
checked:
|
|
6997
|
+
checked: value.type === "business",
|
|
6984
6998
|
onChange: () => handleTypeChange("business"),
|
|
6985
6999
|
className: "w-4 h-4 text-primary border-border focus:ring-primary focus:ring-2"
|
|
6986
7000
|
}
|
|
@@ -6994,7 +7008,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
6994
7008
|
type: "radio",
|
|
6995
7009
|
name: "counterpartyType",
|
|
6996
7010
|
value: "individual",
|
|
6997
|
-
checked:
|
|
7011
|
+
checked: value.type === "individual",
|
|
6998
7012
|
onChange: () => handleTypeChange("individual"),
|
|
6999
7013
|
className: "w-4 h-4 text-primary border-border focus:ring-primary focus:ring-2"
|
|
7000
7014
|
}
|
|
@@ -7007,8 +7021,8 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7007
7021
|
EnhancedSelect,
|
|
7008
7022
|
{
|
|
7009
7023
|
label: "Associated with",
|
|
7010
|
-
value:
|
|
7011
|
-
onValueChange: (
|
|
7024
|
+
value: value.idType,
|
|
7025
|
+
onValueChange: (val) => handleInputChange("idType", val),
|
|
7012
7026
|
options: [
|
|
7013
7027
|
{ value: "product_id", label: "Product ID" },
|
|
7014
7028
|
{ value: "business_id", label: "Business ID" },
|
|
@@ -7020,10 +7034,10 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7020
7034
|
/* @__PURE__ */ jsx(
|
|
7021
7035
|
EnhancedInput,
|
|
7022
7036
|
{
|
|
7023
|
-
label:
|
|
7024
|
-
value:
|
|
7037
|
+
label: value.idType === "product_id" ? "Product ID" : value.idType === "business_id" ? "Business ID" : value.idType === "individual_id" ? "Individual ID" : "Account Number",
|
|
7038
|
+
value: value.idValue,
|
|
7025
7039
|
onChange: (e) => handleInputChange("idValue", e.target.value),
|
|
7026
|
-
placeholder: `Enter ${
|
|
7040
|
+
placeholder: `Enter ${value.idType === "product_id" ? "product ID" : value.idType === "business_id" ? "business ID" : value.idType === "individual_id" ? "individual ID" : "account number"}`,
|
|
7027
7041
|
required: true
|
|
7028
7042
|
}
|
|
7029
7043
|
)
|
|
@@ -7034,7 +7048,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7034
7048
|
{
|
|
7035
7049
|
label: "Email",
|
|
7036
7050
|
type: "email",
|
|
7037
|
-
value:
|
|
7051
|
+
value: value.email,
|
|
7038
7052
|
onChange: (e) => handleInputChange("email", e.target.value),
|
|
7039
7053
|
placeholder: "Enter email address"
|
|
7040
7054
|
}
|
|
@@ -7044,7 +7058,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7044
7058
|
{
|
|
7045
7059
|
label: "Phone Number",
|
|
7046
7060
|
type: "tel",
|
|
7047
|
-
value:
|
|
7061
|
+
value: value.phone,
|
|
7048
7062
|
onChange: (e) => handleInputChange("phone", e.target.value),
|
|
7049
7063
|
placeholder: "Enter phone number"
|
|
7050
7064
|
}
|
|
@@ -7054,7 +7068,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7054
7068
|
{
|
|
7055
7069
|
label: "Date of Birth",
|
|
7056
7070
|
type: "date",
|
|
7057
|
-
value:
|
|
7071
|
+
value: value.dateOfBirth,
|
|
7058
7072
|
onChange: (e) => handleInputChange("dateOfBirth", e.target.value),
|
|
7059
7073
|
placeholder: "Select date of birth"
|
|
7060
7074
|
}
|
|
@@ -7063,7 +7077,7 @@ var CounterpartyBasicInfo = ({ onDataChange }) => {
|
|
|
7063
7077
|
EnhancedInput,
|
|
7064
7078
|
{
|
|
7065
7079
|
label: "ID Number",
|
|
7066
|
-
value:
|
|
7080
|
+
value: value.idNumber,
|
|
7067
7081
|
onChange: (e) => handleInputChange("idNumber", e.target.value),
|
|
7068
7082
|
placeholder: "Enter ID number"
|
|
7069
7083
|
}
|
|
@@ -11591,6 +11605,7 @@ var CounterpartyDetail = () => {
|
|
|
11591
11605
|
};
|
|
11592
11606
|
var CounterpartyDetail_default = CounterpartyDetail;
|
|
11593
11607
|
var CreateCounterpartyView = ({
|
|
11608
|
+
counterpartyData,
|
|
11594
11609
|
paymentMethods,
|
|
11595
11610
|
onPaymentMethodsChange,
|
|
11596
11611
|
onBasicInfoChange,
|
|
@@ -11609,7 +11624,7 @@ var CreateCounterpartyView = ({
|
|
|
11609
11624
|
children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
11610
11625
|
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11611
11626
|
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Basic Information" }) }),
|
|
11612
|
-
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(CounterpartyBasicInfo, { onDataChange: onBasicInfoChange }) })
|
|
11627
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(CounterpartyBasicInfo, { value: counterpartyData, onDataChange: onBasicInfoChange }) })
|
|
11613
11628
|
] }),
|
|
11614
11629
|
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11615
11630
|
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { children: [
|
|
@@ -11639,7 +11654,16 @@ var CreateCounterpartyView = ({
|
|
|
11639
11654
|
};
|
|
11640
11655
|
var CreateCounterparty = () => {
|
|
11641
11656
|
const navigate = useNavigate();
|
|
11642
|
-
const [counterpartyData, setCounterpartyData] = useState(
|
|
11657
|
+
const [counterpartyData, setCounterpartyData] = useState({
|
|
11658
|
+
name: "",
|
|
11659
|
+
type: "business",
|
|
11660
|
+
email: "",
|
|
11661
|
+
phone: "",
|
|
11662
|
+
dateOfBirth: "",
|
|
11663
|
+
idNumber: "",
|
|
11664
|
+
idType: "product_id",
|
|
11665
|
+
idValue: ""
|
|
11666
|
+
});
|
|
11643
11667
|
const [paymentMethods, setPaymentMethods] = useState([]);
|
|
11644
11668
|
const handlePaymentMethodsChange = (methods) => {
|
|
11645
11669
|
setPaymentMethods(methods);
|
|
@@ -11686,6 +11710,7 @@ var CreateCounterparty = () => {
|
|
|
11686
11710
|
return /* @__PURE__ */ jsx(
|
|
11687
11711
|
CreateCounterpartyView,
|
|
11688
11712
|
{
|
|
11713
|
+
counterpartyData,
|
|
11689
11714
|
paymentMethods,
|
|
11690
11715
|
onPaymentMethodsChange: handlePaymentMethodsChange,
|
|
11691
11716
|
onBasicInfoChange: handleBasicInfoChange,
|