braid-ui 1.0.46 → 1.0.47
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 +472 -471
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +472 -472
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6275,6 +6275,447 @@ var CounterpartyDetailView = ({
|
|
|
6275
6275
|
}
|
|
6276
6276
|
);
|
|
6277
6277
|
};
|
|
6278
|
+
var SimpleACHForm = () => {
|
|
6279
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
6280
|
+
/* @__PURE__ */ jsx(
|
|
6281
|
+
EnhancedInput,
|
|
6282
|
+
{
|
|
6283
|
+
label: "Routing Number",
|
|
6284
|
+
placeholder: "Enter 9-digit routing number",
|
|
6285
|
+
pattern: "[0-9]{9}",
|
|
6286
|
+
maxLength: 9,
|
|
6287
|
+
hint: "9-digit routing number",
|
|
6288
|
+
required: true
|
|
6289
|
+
}
|
|
6290
|
+
),
|
|
6291
|
+
/* @__PURE__ */ jsx(
|
|
6292
|
+
EnhancedInput,
|
|
6293
|
+
{
|
|
6294
|
+
label: "Account Number",
|
|
6295
|
+
placeholder: "Enter account number",
|
|
6296
|
+
required: true
|
|
6297
|
+
}
|
|
6298
|
+
),
|
|
6299
|
+
/* @__PURE__ */ jsx(
|
|
6300
|
+
EnhancedSelect,
|
|
6301
|
+
{
|
|
6302
|
+
label: "Account Type",
|
|
6303
|
+
placeholder: "Select account type",
|
|
6304
|
+
options: [
|
|
6305
|
+
{ value: "checking", label: "Checking" },
|
|
6306
|
+
{ value: "savings", label: "Savings" }
|
|
6307
|
+
]
|
|
6308
|
+
}
|
|
6309
|
+
)
|
|
6310
|
+
] });
|
|
6311
|
+
};
|
|
6312
|
+
var SimpleWireForm = () => {
|
|
6313
|
+
const [wireType, setWireType] = useState("domestic");
|
|
6314
|
+
return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
6315
|
+
/* @__PURE__ */ jsx(
|
|
6316
|
+
EnhancedSelect,
|
|
6317
|
+
{
|
|
6318
|
+
label: "Wire Type",
|
|
6319
|
+
placeholder: "Select wire type",
|
|
6320
|
+
value: wireType,
|
|
6321
|
+
onValueChange: setWireType,
|
|
6322
|
+
options: [
|
|
6323
|
+
{ value: "domestic", label: "Domestic" },
|
|
6324
|
+
{ value: "international", label: "International" }
|
|
6325
|
+
]
|
|
6326
|
+
}
|
|
6327
|
+
),
|
|
6328
|
+
wireType === "domestic" ? /* @__PURE__ */ jsx(
|
|
6329
|
+
EnhancedInput,
|
|
6330
|
+
{
|
|
6331
|
+
label: "Routing Number",
|
|
6332
|
+
placeholder: "Enter 9-digit routing number",
|
|
6333
|
+
pattern: "[0-9]{9}",
|
|
6334
|
+
maxLength: 9,
|
|
6335
|
+
hint: "9-digit routing number",
|
|
6336
|
+
required: true
|
|
6337
|
+
}
|
|
6338
|
+
) : /* @__PURE__ */ jsx(
|
|
6339
|
+
EnhancedInput,
|
|
6340
|
+
{
|
|
6341
|
+
label: "BIC Number",
|
|
6342
|
+
placeholder: "Enter BIC/SWIFT code",
|
|
6343
|
+
hint: "Bank Identifier Code",
|
|
6344
|
+
required: true
|
|
6345
|
+
}
|
|
6346
|
+
),
|
|
6347
|
+
/* @__PURE__ */ jsx(
|
|
6348
|
+
EnhancedInput,
|
|
6349
|
+
{
|
|
6350
|
+
label: "Account Number",
|
|
6351
|
+
placeholder: "Enter account number",
|
|
6352
|
+
required: true
|
|
6353
|
+
}
|
|
6354
|
+
)
|
|
6355
|
+
] }) });
|
|
6356
|
+
};
|
|
6357
|
+
var PaymentInformationSection = ({ onPaymentMethodsChange } = {}) => {
|
|
6358
|
+
const [paymentMethods, setPaymentMethods] = useState([]);
|
|
6359
|
+
const [showAddMenu, setShowAddMenu] = useState(false);
|
|
6360
|
+
const addPaymentMethod = (type) => {
|
|
6361
|
+
const newMethod = {
|
|
6362
|
+
id: `${type}-${Date.now()}`,
|
|
6363
|
+
type,
|
|
6364
|
+
name: type === "ach" ? "ACH Payment" : "Wire Transfer",
|
|
6365
|
+
collapsed: false
|
|
6366
|
+
};
|
|
6367
|
+
const updatedMethods = [...paymentMethods, newMethod];
|
|
6368
|
+
setPaymentMethods(updatedMethods);
|
|
6369
|
+
onPaymentMethodsChange?.(updatedMethods);
|
|
6370
|
+
setShowAddMenu(false);
|
|
6371
|
+
};
|
|
6372
|
+
const removePaymentMethod = (id) => {
|
|
6373
|
+
const updatedMethods = paymentMethods.filter((method) => method.id !== id);
|
|
6374
|
+
setPaymentMethods(updatedMethods);
|
|
6375
|
+
onPaymentMethodsChange?.(updatedMethods);
|
|
6376
|
+
};
|
|
6377
|
+
const toggleCollapse = (id) => {
|
|
6378
|
+
setPaymentMethods(paymentMethods.map(
|
|
6379
|
+
(method) => method.id === id ? { ...method, collapsed: !method.collapsed } : method
|
|
6380
|
+
));
|
|
6381
|
+
};
|
|
6382
|
+
const renderPaymentMethodContent = (method) => {
|
|
6383
|
+
if (method.type === "ach") {
|
|
6384
|
+
return /* @__PURE__ */ jsx(SimpleACHForm, {});
|
|
6385
|
+
} else {
|
|
6386
|
+
return /* @__PURE__ */ jsx(SimpleWireForm, {});
|
|
6387
|
+
}
|
|
6388
|
+
};
|
|
6389
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
6390
|
+
paymentMethods.map((method) => /* @__PURE__ */ jsxs(Card, { className: "relative", children: [
|
|
6391
|
+
/* @__PURE__ */ jsx(CardHeader, { className: "pb-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
6392
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
6393
|
+
/* @__PURE__ */ jsx(
|
|
6394
|
+
Button,
|
|
6395
|
+
{
|
|
6396
|
+
variant: "ghost",
|
|
6397
|
+
size: "icon",
|
|
6398
|
+
onClick: () => toggleCollapse(method.id),
|
|
6399
|
+
className: "h-6 w-6",
|
|
6400
|
+
children: method.collapsed ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
|
|
6401
|
+
}
|
|
6402
|
+
),
|
|
6403
|
+
/* @__PURE__ */ jsx(CardTitle, { className: "text-base", children: method.name }),
|
|
6404
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs bg-muted px-2 py-1 rounded-md uppercase font-medium", children: method.type })
|
|
6405
|
+
] }),
|
|
6406
|
+
/* @__PURE__ */ jsx(
|
|
6407
|
+
Button,
|
|
6408
|
+
{
|
|
6409
|
+
variant: "ghost",
|
|
6410
|
+
size: "icon",
|
|
6411
|
+
onClick: () => removePaymentMethod(method.id),
|
|
6412
|
+
className: "h-6 w-6 text-destructive hover:text-destructive/80 hover:bg-destructive/10",
|
|
6413
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" })
|
|
6414
|
+
}
|
|
6415
|
+
)
|
|
6416
|
+
] }) }),
|
|
6417
|
+
!method.collapsed && /* @__PURE__ */ jsx(CardContent, { children: renderPaymentMethodContent(method) })
|
|
6418
|
+
] }, method.id)),
|
|
6419
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
6420
|
+
paymentMethods.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-2", children: "At least one payment method is required *" }),
|
|
6421
|
+
/* @__PURE__ */ jsxs(
|
|
6422
|
+
Button,
|
|
6423
|
+
{
|
|
6424
|
+
variant: "outline",
|
|
6425
|
+
onClick: () => setShowAddMenu(!showAddMenu),
|
|
6426
|
+
className: "w-full border-dashed",
|
|
6427
|
+
children: [
|
|
6428
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-2" }),
|
|
6429
|
+
"Add Payment Information"
|
|
6430
|
+
]
|
|
6431
|
+
}
|
|
6432
|
+
),
|
|
6433
|
+
showAddMenu && /* @__PURE__ */ jsx("div", { className: "absolute top-full left-0 right-0 mt-2 bg-background border border-border rounded-md shadow-lg z-10", children: /* @__PURE__ */ jsxs("div", { className: "p-2 space-y-1", children: [
|
|
6434
|
+
/* @__PURE__ */ jsx(
|
|
6435
|
+
Button,
|
|
6436
|
+
{
|
|
6437
|
+
variant: "ghost",
|
|
6438
|
+
onClick: () => addPaymentMethod("ach"),
|
|
6439
|
+
className: "w-full justify-start",
|
|
6440
|
+
children: "Add ACH Payment"
|
|
6441
|
+
}
|
|
6442
|
+
),
|
|
6443
|
+
/* @__PURE__ */ jsx(
|
|
6444
|
+
Button,
|
|
6445
|
+
{
|
|
6446
|
+
variant: "ghost",
|
|
6447
|
+
onClick: () => addPaymentMethod("wire"),
|
|
6448
|
+
className: "w-full justify-start",
|
|
6449
|
+
children: "Add Wire Transfer"
|
|
6450
|
+
}
|
|
6451
|
+
)
|
|
6452
|
+
] }) })
|
|
6453
|
+
] })
|
|
6454
|
+
] });
|
|
6455
|
+
};
|
|
6456
|
+
var AddressForm = ({
|
|
6457
|
+
title,
|
|
6458
|
+
description,
|
|
6459
|
+
fieldPrefix = "",
|
|
6460
|
+
showAddressType = true,
|
|
6461
|
+
addressTypeOptions = ADDRESS_TYPE_OPTIONS.FI,
|
|
6462
|
+
fieldOverrides = {},
|
|
6463
|
+
showApartment = false
|
|
6464
|
+
}) => {
|
|
6465
|
+
const addressTypeLabel = fieldPrefix ? `${fieldPrefix} Address Type` : "Address Type";
|
|
6466
|
+
return /* @__PURE__ */ jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
6467
|
+
/* @__PURE__ */ jsx(
|
|
6468
|
+
EnhancedInput,
|
|
6469
|
+
{
|
|
6470
|
+
label: "Street Address",
|
|
6471
|
+
placeholder: "Enter street address",
|
|
6472
|
+
hint: fieldPrefix ? `${fieldPrefix} street address` : "Primary street address",
|
|
6473
|
+
...fieldOverrides.streetAddress
|
|
6474
|
+
}
|
|
6475
|
+
),
|
|
6476
|
+
showApartment && /* @__PURE__ */ jsx(
|
|
6477
|
+
EnhancedInput,
|
|
6478
|
+
{
|
|
6479
|
+
label: "Apt, Building etc",
|
|
6480
|
+
placeholder: "Additional address information",
|
|
6481
|
+
hint: "Additional address information",
|
|
6482
|
+
...fieldOverrides.apartment
|
|
6483
|
+
}
|
|
6484
|
+
),
|
|
6485
|
+
/* @__PURE__ */ jsx(
|
|
6486
|
+
EnhancedInput,
|
|
6487
|
+
{
|
|
6488
|
+
label: "City",
|
|
6489
|
+
placeholder: "Enter city",
|
|
6490
|
+
required: true,
|
|
6491
|
+
...fieldOverrides.city
|
|
6492
|
+
}
|
|
6493
|
+
),
|
|
6494
|
+
/* @__PURE__ */ jsx(
|
|
6495
|
+
EnhancedInput,
|
|
6496
|
+
{
|
|
6497
|
+
label: "State",
|
|
6498
|
+
placeholder: "Enter state",
|
|
6499
|
+
hint: "State or province",
|
|
6500
|
+
...fieldOverrides.state
|
|
6501
|
+
}
|
|
6502
|
+
),
|
|
6503
|
+
/* @__PURE__ */ jsx(
|
|
6504
|
+
EnhancedInput,
|
|
6505
|
+
{
|
|
6506
|
+
label: "Postal Code",
|
|
6507
|
+
placeholder: "12345",
|
|
6508
|
+
...fieldOverrides.postalCode
|
|
6509
|
+
}
|
|
6510
|
+
),
|
|
6511
|
+
/* @__PURE__ */ jsx(
|
|
6512
|
+
EnhancedSelect,
|
|
6513
|
+
{
|
|
6514
|
+
label: "Country Code",
|
|
6515
|
+
placeholder: "Select country",
|
|
6516
|
+
options: COUNTRY_OPTIONS
|
|
6517
|
+
}
|
|
6518
|
+
),
|
|
6519
|
+
showAddressType && /* @__PURE__ */ jsx(
|
|
6520
|
+
EnhancedSelect,
|
|
6521
|
+
{
|
|
6522
|
+
label: addressTypeLabel,
|
|
6523
|
+
placeholder: "Select type",
|
|
6524
|
+
options: addressTypeOptions
|
|
6525
|
+
}
|
|
6526
|
+
)
|
|
6527
|
+
] }) });
|
|
6528
|
+
};
|
|
6529
|
+
var labelVariants = cva(
|
|
6530
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
6531
|
+
);
|
|
6532
|
+
var Label = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6533
|
+
LabelPrimitive.Root,
|
|
6534
|
+
{
|
|
6535
|
+
ref,
|
|
6536
|
+
className: cn(labelVariants(), className),
|
|
6537
|
+
...props
|
|
6538
|
+
}
|
|
6539
|
+
));
|
|
6540
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
6541
|
+
var CounterpartyBasicInfo = ({ value = {
|
|
6542
|
+
name: "",
|
|
6543
|
+
type: "business",
|
|
6544
|
+
email: "",
|
|
6545
|
+
phone: "",
|
|
6546
|
+
dateOfBirth: "",
|
|
6547
|
+
idNumber: "",
|
|
6548
|
+
idType: "product_id",
|
|
6549
|
+
idValue: ""
|
|
6550
|
+
}, onDataChange }) => {
|
|
6551
|
+
const handleInputChange = (field, newValue) => {
|
|
6552
|
+
const updatedData = { ...value, [field]: newValue };
|
|
6553
|
+
onDataChange?.(updatedData);
|
|
6554
|
+
};
|
|
6555
|
+
const handleTypeChange = (type) => {
|
|
6556
|
+
handleInputChange("type", type);
|
|
6557
|
+
};
|
|
6558
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
6559
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
6560
|
+
/* @__PURE__ */ jsx(
|
|
6561
|
+
EnhancedInput,
|
|
6562
|
+
{
|
|
6563
|
+
label: "Counterparty Name",
|
|
6564
|
+
value: value.name,
|
|
6565
|
+
onChange: (e) => handleInputChange("name", e.target.value),
|
|
6566
|
+
placeholder: "Enter counterparty name",
|
|
6567
|
+
required: true
|
|
6568
|
+
}
|
|
6569
|
+
),
|
|
6570
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
6571
|
+
/* @__PURE__ */ jsx(Label, { className: "text-sm font-medium", children: "Counterparty Type" }),
|
|
6572
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-6 h-10 items-center", children: [
|
|
6573
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
6574
|
+
/* @__PURE__ */ jsx(
|
|
6575
|
+
"input",
|
|
6576
|
+
{
|
|
6577
|
+
type: "radio",
|
|
6578
|
+
name: "counterpartyType",
|
|
6579
|
+
value: "business",
|
|
6580
|
+
checked: value.type === "business",
|
|
6581
|
+
onChange: () => handleTypeChange("business"),
|
|
6582
|
+
className: "w-4 h-4 text-primary border-border focus:ring-primary focus:ring-2"
|
|
6583
|
+
}
|
|
6584
|
+
),
|
|
6585
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: "Business" })
|
|
6586
|
+
] }),
|
|
6587
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
6588
|
+
/* @__PURE__ */ jsx(
|
|
6589
|
+
"input",
|
|
6590
|
+
{
|
|
6591
|
+
type: "radio",
|
|
6592
|
+
name: "counterpartyType",
|
|
6593
|
+
value: "individual",
|
|
6594
|
+
checked: value.type === "individual",
|
|
6595
|
+
onChange: () => handleTypeChange("individual"),
|
|
6596
|
+
className: "w-4 h-4 text-primary border-border focus:ring-primary focus:ring-2"
|
|
6597
|
+
}
|
|
6598
|
+
),
|
|
6599
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: "Individual" })
|
|
6600
|
+
] })
|
|
6601
|
+
] })
|
|
6602
|
+
] }),
|
|
6603
|
+
/* @__PURE__ */ jsx(
|
|
6604
|
+
EnhancedSelect,
|
|
6605
|
+
{
|
|
6606
|
+
label: "Associated with",
|
|
6607
|
+
value: value.idType,
|
|
6608
|
+
onValueChange: (val) => handleInputChange("idType", val),
|
|
6609
|
+
options: [
|
|
6610
|
+
{ value: "product_id", label: "Product ID" },
|
|
6611
|
+
{ value: "business_id", label: "Business ID" },
|
|
6612
|
+
{ value: "individual_id", label: "Individual ID" },
|
|
6613
|
+
{ value: "account_number", label: "Account Number" }
|
|
6614
|
+
]
|
|
6615
|
+
}
|
|
6616
|
+
),
|
|
6617
|
+
/* @__PURE__ */ jsx(
|
|
6618
|
+
EnhancedInput,
|
|
6619
|
+
{
|
|
6620
|
+
label: value.idType === "product_id" ? "Product ID" : value.idType === "business_id" ? "Business ID" : value.idType === "individual_id" ? "Individual ID" : "Account Number",
|
|
6621
|
+
value: value.idValue,
|
|
6622
|
+
onChange: (e) => handleInputChange("idValue", e.target.value),
|
|
6623
|
+
placeholder: `Enter ${value.idType === "product_id" ? "product ID" : value.idType === "business_id" ? "business ID" : value.idType === "individual_id" ? "individual ID" : "account number"}`,
|
|
6624
|
+
required: true
|
|
6625
|
+
}
|
|
6626
|
+
)
|
|
6627
|
+
] }),
|
|
6628
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
6629
|
+
/* @__PURE__ */ jsx(
|
|
6630
|
+
EnhancedInput,
|
|
6631
|
+
{
|
|
6632
|
+
label: "Email",
|
|
6633
|
+
type: "email",
|
|
6634
|
+
value: value.email,
|
|
6635
|
+
onChange: (e) => handleInputChange("email", e.target.value),
|
|
6636
|
+
placeholder: "Enter email address"
|
|
6637
|
+
}
|
|
6638
|
+
),
|
|
6639
|
+
/* @__PURE__ */ jsx(
|
|
6640
|
+
EnhancedInput,
|
|
6641
|
+
{
|
|
6642
|
+
label: "Phone Number",
|
|
6643
|
+
type: "tel",
|
|
6644
|
+
value: value.phone,
|
|
6645
|
+
onChange: (e) => handleInputChange("phone", e.target.value),
|
|
6646
|
+
placeholder: "Enter phone number"
|
|
6647
|
+
}
|
|
6648
|
+
),
|
|
6649
|
+
/* @__PURE__ */ jsx(
|
|
6650
|
+
EnhancedInput,
|
|
6651
|
+
{
|
|
6652
|
+
label: "Date of Birth",
|
|
6653
|
+
type: "date",
|
|
6654
|
+
value: value.dateOfBirth,
|
|
6655
|
+
onChange: (e) => handleInputChange("dateOfBirth", e.target.value),
|
|
6656
|
+
placeholder: "Select date of birth"
|
|
6657
|
+
}
|
|
6658
|
+
),
|
|
6659
|
+
/* @__PURE__ */ jsx(
|
|
6660
|
+
EnhancedInput,
|
|
6661
|
+
{
|
|
6662
|
+
label: "ID Number",
|
|
6663
|
+
value: value.idNumber,
|
|
6664
|
+
onChange: (e) => handleInputChange("idNumber", e.target.value),
|
|
6665
|
+
placeholder: "Enter ID number"
|
|
6666
|
+
}
|
|
6667
|
+
)
|
|
6668
|
+
] })
|
|
6669
|
+
] });
|
|
6670
|
+
};
|
|
6671
|
+
var CreateCounterpartyView = ({
|
|
6672
|
+
counterpartyData,
|
|
6673
|
+
paymentMethods,
|
|
6674
|
+
onPaymentMethodsChange,
|
|
6675
|
+
onBasicInfoChange,
|
|
6676
|
+
onCancel,
|
|
6677
|
+
onSubmit
|
|
6678
|
+
}) => {
|
|
6679
|
+
return /* @__PURE__ */ jsx(
|
|
6680
|
+
PageLayout,
|
|
6681
|
+
{
|
|
6682
|
+
title: "Create Counterparty",
|
|
6683
|
+
description: "Create a new counterparty with all required information",
|
|
6684
|
+
actions: [
|
|
6685
|
+
{ label: "Cancel", variant: "outline", onClick: onCancel },
|
|
6686
|
+
{ label: "Create Counterparty", variant: "default", onClick: onSubmit }
|
|
6687
|
+
],
|
|
6688
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
6689
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
6690
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Basic Information" }) }),
|
|
6691
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(CounterpartyBasicInfo, { value: counterpartyData, onDataChange: onBasicInfoChange }) })
|
|
6692
|
+
] }),
|
|
6693
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
6694
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { children: [
|
|
6695
|
+
"Address",
|
|
6696
|
+
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
6697
|
+
] }) }),
|
|
6698
|
+
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
6699
|
+
paymentMethods.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Optional for ACH payments, required for wire transfers" }),
|
|
6700
|
+
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Required because you have wire payment methods" }),
|
|
6701
|
+
/* @__PURE__ */ jsx(
|
|
6702
|
+
AddressForm,
|
|
6703
|
+
{
|
|
6704
|
+
title: "",
|
|
6705
|
+
description: "",
|
|
6706
|
+
showApartment: true
|
|
6707
|
+
}
|
|
6708
|
+
)
|
|
6709
|
+
] })
|
|
6710
|
+
] }),
|
|
6711
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
6712
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Payment Configuration" }) }),
|
|
6713
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(PaymentInformationSection, { onPaymentMethodsChange }) })
|
|
6714
|
+
] })
|
|
6715
|
+
] })
|
|
6716
|
+
}
|
|
6717
|
+
);
|
|
6718
|
+
};
|
|
6278
6719
|
|
|
6279
6720
|
// src/lib/mock-data/banking-data.ts
|
|
6280
6721
|
var defaultACHBankDetails = {
|
|
@@ -6560,79 +7001,6 @@ var ACHTransferSection = ({ isEditing, onToggleEdit, className, hideActions }) =
|
|
|
6560
7001
|
}
|
|
6561
7002
|
);
|
|
6562
7003
|
};
|
|
6563
|
-
var AddressForm = ({
|
|
6564
|
-
title,
|
|
6565
|
-
description,
|
|
6566
|
-
fieldPrefix = "",
|
|
6567
|
-
showAddressType = true,
|
|
6568
|
-
addressTypeOptions = ADDRESS_TYPE_OPTIONS.FI,
|
|
6569
|
-
fieldOverrides = {},
|
|
6570
|
-
showApartment = false
|
|
6571
|
-
}) => {
|
|
6572
|
-
const addressTypeLabel = fieldPrefix ? `${fieldPrefix} Address Type` : "Address Type";
|
|
6573
|
-
return /* @__PURE__ */ jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
6574
|
-
/* @__PURE__ */ jsx(
|
|
6575
|
-
EnhancedInput,
|
|
6576
|
-
{
|
|
6577
|
-
label: "Street Address",
|
|
6578
|
-
placeholder: "Enter street address",
|
|
6579
|
-
hint: fieldPrefix ? `${fieldPrefix} street address` : "Primary street address",
|
|
6580
|
-
...fieldOverrides.streetAddress
|
|
6581
|
-
}
|
|
6582
|
-
),
|
|
6583
|
-
showApartment && /* @__PURE__ */ jsx(
|
|
6584
|
-
EnhancedInput,
|
|
6585
|
-
{
|
|
6586
|
-
label: "Apt, Building etc",
|
|
6587
|
-
placeholder: "Additional address information",
|
|
6588
|
-
hint: "Additional address information",
|
|
6589
|
-
...fieldOverrides.apartment
|
|
6590
|
-
}
|
|
6591
|
-
),
|
|
6592
|
-
/* @__PURE__ */ jsx(
|
|
6593
|
-
EnhancedInput,
|
|
6594
|
-
{
|
|
6595
|
-
label: "City",
|
|
6596
|
-
placeholder: "Enter city",
|
|
6597
|
-
required: true,
|
|
6598
|
-
...fieldOverrides.city
|
|
6599
|
-
}
|
|
6600
|
-
),
|
|
6601
|
-
/* @__PURE__ */ jsx(
|
|
6602
|
-
EnhancedInput,
|
|
6603
|
-
{
|
|
6604
|
-
label: "State",
|
|
6605
|
-
placeholder: "Enter state",
|
|
6606
|
-
hint: "State or province",
|
|
6607
|
-
...fieldOverrides.state
|
|
6608
|
-
}
|
|
6609
|
-
),
|
|
6610
|
-
/* @__PURE__ */ jsx(
|
|
6611
|
-
EnhancedInput,
|
|
6612
|
-
{
|
|
6613
|
-
label: "Postal Code",
|
|
6614
|
-
placeholder: "12345",
|
|
6615
|
-
...fieldOverrides.postalCode
|
|
6616
|
-
}
|
|
6617
|
-
),
|
|
6618
|
-
/* @__PURE__ */ jsx(
|
|
6619
|
-
EnhancedSelect,
|
|
6620
|
-
{
|
|
6621
|
-
label: "Country Code",
|
|
6622
|
-
placeholder: "Select country",
|
|
6623
|
-
options: COUNTRY_OPTIONS
|
|
6624
|
-
}
|
|
6625
|
-
),
|
|
6626
|
-
showAddressType && /* @__PURE__ */ jsx(
|
|
6627
|
-
EnhancedSelect,
|
|
6628
|
-
{
|
|
6629
|
-
label: addressTypeLabel,
|
|
6630
|
-
placeholder: "Select type",
|
|
6631
|
-
options: addressTypeOptions
|
|
6632
|
-
}
|
|
6633
|
-
)
|
|
6634
|
-
] }) });
|
|
6635
|
-
};
|
|
6636
7004
|
var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
|
|
6637
7005
|
return /* @__PURE__ */ jsx(
|
|
6638
7006
|
FormCard,
|
|
@@ -6921,178 +7289,36 @@ var ContactInfoCard = ({ isEditing, onToggleEdit, className }) => {
|
|
|
6921
7289
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6922
7290
|
/* @__PURE__ */ jsx(InfoField, { label: "First Name", value: "", layout: "horizontal" }),
|
|
6923
7291
|
/* @__PURE__ */ jsx(InfoField, { label: "Last Name", value: "", layout: "horizontal" })
|
|
6924
|
-
] }),
|
|
6925
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6926
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Email", value: "", layout: "horizontal" }),
|
|
6927
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Phone Number", value: "", layout: "horizontal" })
|
|
6928
|
-
] }),
|
|
6929
|
-
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Mailing Address" }),
|
|
6930
|
-
isEditing ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6931
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-3", children: [
|
|
6932
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Street Address", value: "", layout: "horizontal" }),
|
|
6933
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Apartment, suite, or floor", value: "", layout: "horizontal" })
|
|
6934
|
-
] }),
|
|
6935
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6936
|
-
/* @__PURE__ */ jsx(InfoField, { label: "City", value: "", layout: "horizontal" }),
|
|
6937
|
-
/* @__PURE__ */ jsx(InfoField, { label: "State", value: "Alabama", layout: "horizontal" })
|
|
6938
|
-
] }),
|
|
6939
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6940
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Postal Code", value: "", layout: "horizontal" }),
|
|
6941
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Country Code", value: "US", layout: "horizontal" })
|
|
6942
|
-
] })
|
|
6943
|
-
] }) : /* @__PURE__ */ jsx(
|
|
6944
|
-
InfoField,
|
|
6945
|
-
{
|
|
6946
|
-
label: "Address",
|
|
6947
|
-
value: "123 Business Avenue, Suite 100, New York, NY 10001, US",
|
|
6948
|
-
layout: "horizontal"
|
|
6949
|
-
}
|
|
6950
|
-
)
|
|
6951
|
-
] })
|
|
6952
|
-
}
|
|
6953
|
-
);
|
|
6954
|
-
};
|
|
6955
|
-
var labelVariants = cva(
|
|
6956
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
6957
|
-
);
|
|
6958
|
-
var Label = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6959
|
-
LabelPrimitive.Root,
|
|
6960
|
-
{
|
|
6961
|
-
ref,
|
|
6962
|
-
className: cn(labelVariants(), className),
|
|
6963
|
-
...props
|
|
6964
|
-
}
|
|
6965
|
-
));
|
|
6966
|
-
Label.displayName = LabelPrimitive.Root.displayName;
|
|
6967
|
-
var CounterpartyBasicInfo = ({ value = {
|
|
6968
|
-
name: "",
|
|
6969
|
-
type: "business",
|
|
6970
|
-
email: "",
|
|
6971
|
-
phone: "",
|
|
6972
|
-
dateOfBirth: "",
|
|
6973
|
-
idNumber: "",
|
|
6974
|
-
idType: "product_id",
|
|
6975
|
-
idValue: ""
|
|
6976
|
-
}, onDataChange }) => {
|
|
6977
|
-
const handleInputChange = (field, newValue) => {
|
|
6978
|
-
const updatedData = { ...value, [field]: newValue };
|
|
6979
|
-
onDataChange?.(updatedData);
|
|
6980
|
-
};
|
|
6981
|
-
const handleTypeChange = (type) => {
|
|
6982
|
-
handleInputChange("type", type);
|
|
6983
|
-
};
|
|
6984
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
6985
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
6986
|
-
/* @__PURE__ */ jsx(
|
|
6987
|
-
EnhancedInput,
|
|
6988
|
-
{
|
|
6989
|
-
label: "Counterparty Name",
|
|
6990
|
-
value: value.name,
|
|
6991
|
-
onChange: (e) => handleInputChange("name", e.target.value),
|
|
6992
|
-
placeholder: "Enter counterparty name",
|
|
6993
|
-
required: true
|
|
6994
|
-
}
|
|
6995
|
-
),
|
|
6996
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
6997
|
-
/* @__PURE__ */ jsx(Label, { className: "text-sm font-medium", children: "Counterparty Type" }),
|
|
6998
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-6 h-10 items-center", children: [
|
|
6999
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
7000
|
-
/* @__PURE__ */ jsx(
|
|
7001
|
-
"input",
|
|
7002
|
-
{
|
|
7003
|
-
type: "radio",
|
|
7004
|
-
name: "counterpartyType",
|
|
7005
|
-
value: "business",
|
|
7006
|
-
checked: value.type === "business",
|
|
7007
|
-
onChange: () => handleTypeChange("business"),
|
|
7008
|
-
className: "w-4 h-4 text-primary border-border focus:ring-primary focus:ring-2"
|
|
7009
|
-
}
|
|
7010
|
-
),
|
|
7011
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: "Business" })
|
|
7012
|
-
] }),
|
|
7013
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
7014
|
-
/* @__PURE__ */ jsx(
|
|
7015
|
-
"input",
|
|
7016
|
-
{
|
|
7017
|
-
type: "radio",
|
|
7018
|
-
name: "counterpartyType",
|
|
7019
|
-
value: "individual",
|
|
7020
|
-
checked: value.type === "individual",
|
|
7021
|
-
onChange: () => handleTypeChange("individual"),
|
|
7022
|
-
className: "w-4 h-4 text-primary border-border focus:ring-primary focus:ring-2"
|
|
7023
|
-
}
|
|
7024
|
-
),
|
|
7025
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: "Individual" })
|
|
7026
|
-
] })
|
|
7027
|
-
] })
|
|
7028
|
-
] }),
|
|
7029
|
-
/* @__PURE__ */ jsx(
|
|
7030
|
-
EnhancedSelect,
|
|
7031
|
-
{
|
|
7032
|
-
label: "Associated with",
|
|
7033
|
-
value: value.idType,
|
|
7034
|
-
onValueChange: (val) => handleInputChange("idType", val),
|
|
7035
|
-
options: [
|
|
7036
|
-
{ value: "product_id", label: "Product ID" },
|
|
7037
|
-
{ value: "business_id", label: "Business ID" },
|
|
7038
|
-
{ value: "individual_id", label: "Individual ID" },
|
|
7039
|
-
{ value: "account_number", label: "Account Number" }
|
|
7040
|
-
]
|
|
7041
|
-
}
|
|
7042
|
-
),
|
|
7043
|
-
/* @__PURE__ */ jsx(
|
|
7044
|
-
EnhancedInput,
|
|
7045
|
-
{
|
|
7046
|
-
label: value.idType === "product_id" ? "Product ID" : value.idType === "business_id" ? "Business ID" : value.idType === "individual_id" ? "Individual ID" : "Account Number",
|
|
7047
|
-
value: value.idValue,
|
|
7048
|
-
onChange: (e) => handleInputChange("idValue", e.target.value),
|
|
7049
|
-
placeholder: `Enter ${value.idType === "product_id" ? "product ID" : value.idType === "business_id" ? "business ID" : value.idType === "individual_id" ? "individual ID" : "account number"}`,
|
|
7050
|
-
required: true
|
|
7051
|
-
}
|
|
7052
|
-
)
|
|
7053
|
-
] }),
|
|
7054
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
7055
|
-
/* @__PURE__ */ jsx(
|
|
7056
|
-
EnhancedInput,
|
|
7057
|
-
{
|
|
7058
|
-
label: "Email",
|
|
7059
|
-
type: "email",
|
|
7060
|
-
value: value.email,
|
|
7061
|
-
onChange: (e) => handleInputChange("email", e.target.value),
|
|
7062
|
-
placeholder: "Enter email address"
|
|
7063
|
-
}
|
|
7064
|
-
),
|
|
7065
|
-
/* @__PURE__ */ jsx(
|
|
7066
|
-
EnhancedInput,
|
|
7067
|
-
{
|
|
7068
|
-
label: "Phone Number",
|
|
7069
|
-
type: "tel",
|
|
7070
|
-
value: value.phone,
|
|
7071
|
-
onChange: (e) => handleInputChange("phone", e.target.value),
|
|
7072
|
-
placeholder: "Enter phone number"
|
|
7073
|
-
}
|
|
7074
|
-
),
|
|
7075
|
-
/* @__PURE__ */ jsx(
|
|
7076
|
-
EnhancedInput,
|
|
7077
|
-
{
|
|
7078
|
-
label: "Date of Birth",
|
|
7079
|
-
type: "date",
|
|
7080
|
-
value: value.dateOfBirth,
|
|
7081
|
-
onChange: (e) => handleInputChange("dateOfBirth", e.target.value),
|
|
7082
|
-
placeholder: "Select date of birth"
|
|
7083
|
-
}
|
|
7084
|
-
),
|
|
7085
|
-
/* @__PURE__ */ jsx(
|
|
7086
|
-
EnhancedInput,
|
|
7087
|
-
{
|
|
7088
|
-
label: "ID Number",
|
|
7089
|
-
value: value.idNumber,
|
|
7090
|
-
onChange: (e) => handleInputChange("idNumber", e.target.value),
|
|
7091
|
-
placeholder: "Enter ID number"
|
|
7092
|
-
}
|
|
7093
|
-
)
|
|
7094
|
-
] })
|
|
7095
|
-
] });
|
|
7292
|
+
] }),
|
|
7293
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
7294
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Email", value: "", layout: "horizontal" }),
|
|
7295
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Phone Number", value: "", layout: "horizontal" })
|
|
7296
|
+
] }),
|
|
7297
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-muted-foreground mt-6", children: "Mailing Address" }),
|
|
7298
|
+
isEditing ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7299
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-3", children: [
|
|
7300
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Street Address", value: "", layout: "horizontal" }),
|
|
7301
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Apartment, suite, or floor", value: "", layout: "horizontal" })
|
|
7302
|
+
] }),
|
|
7303
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
7304
|
+
/* @__PURE__ */ jsx(InfoField, { label: "City", value: "", layout: "horizontal" }),
|
|
7305
|
+
/* @__PURE__ */ jsx(InfoField, { label: "State", value: "Alabama", layout: "horizontal" })
|
|
7306
|
+
] }),
|
|
7307
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
7308
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Postal Code", value: "", layout: "horizontal" }),
|
|
7309
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Country Code", value: "US", layout: "horizontal" })
|
|
7310
|
+
] })
|
|
7311
|
+
] }) : /* @__PURE__ */ jsx(
|
|
7312
|
+
InfoField,
|
|
7313
|
+
{
|
|
7314
|
+
label: "Address",
|
|
7315
|
+
value: "123 Business Avenue, Suite 100, New York, NY 10001, US",
|
|
7316
|
+
layout: "horizontal"
|
|
7317
|
+
}
|
|
7318
|
+
)
|
|
7319
|
+
] })
|
|
7320
|
+
}
|
|
7321
|
+
);
|
|
7096
7322
|
};
|
|
7097
7323
|
var IntermediaryFI = () => {
|
|
7098
7324
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
@@ -7306,184 +7532,6 @@ var OriginatorCard = ({ isEditing, onToggleEdit, className, hideActions }) => {
|
|
|
7306
7532
|
}
|
|
7307
7533
|
);
|
|
7308
7534
|
};
|
|
7309
|
-
var SimpleACHForm = () => {
|
|
7310
|
-
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
7311
|
-
/* @__PURE__ */ jsx(
|
|
7312
|
-
EnhancedInput,
|
|
7313
|
-
{
|
|
7314
|
-
label: "Routing Number",
|
|
7315
|
-
placeholder: "Enter 9-digit routing number",
|
|
7316
|
-
pattern: "[0-9]{9}",
|
|
7317
|
-
maxLength: 9,
|
|
7318
|
-
hint: "9-digit routing number",
|
|
7319
|
-
required: true
|
|
7320
|
-
}
|
|
7321
|
-
),
|
|
7322
|
-
/* @__PURE__ */ jsx(
|
|
7323
|
-
EnhancedInput,
|
|
7324
|
-
{
|
|
7325
|
-
label: "Account Number",
|
|
7326
|
-
placeholder: "Enter account number",
|
|
7327
|
-
required: true
|
|
7328
|
-
}
|
|
7329
|
-
),
|
|
7330
|
-
/* @__PURE__ */ jsx(
|
|
7331
|
-
EnhancedSelect,
|
|
7332
|
-
{
|
|
7333
|
-
label: "Account Type",
|
|
7334
|
-
placeholder: "Select account type",
|
|
7335
|
-
options: [
|
|
7336
|
-
{ value: "checking", label: "Checking" },
|
|
7337
|
-
{ value: "savings", label: "Savings" }
|
|
7338
|
-
]
|
|
7339
|
-
}
|
|
7340
|
-
)
|
|
7341
|
-
] });
|
|
7342
|
-
};
|
|
7343
|
-
var SimpleWireForm = () => {
|
|
7344
|
-
const [wireType, setWireType] = useState("domestic");
|
|
7345
|
-
return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
7346
|
-
/* @__PURE__ */ jsx(
|
|
7347
|
-
EnhancedSelect,
|
|
7348
|
-
{
|
|
7349
|
-
label: "Wire Type",
|
|
7350
|
-
placeholder: "Select wire type",
|
|
7351
|
-
value: wireType,
|
|
7352
|
-
onValueChange: setWireType,
|
|
7353
|
-
options: [
|
|
7354
|
-
{ value: "domestic", label: "Domestic" },
|
|
7355
|
-
{ value: "international", label: "International" }
|
|
7356
|
-
]
|
|
7357
|
-
}
|
|
7358
|
-
),
|
|
7359
|
-
wireType === "domestic" ? /* @__PURE__ */ jsx(
|
|
7360
|
-
EnhancedInput,
|
|
7361
|
-
{
|
|
7362
|
-
label: "Routing Number",
|
|
7363
|
-
placeholder: "Enter 9-digit routing number",
|
|
7364
|
-
pattern: "[0-9]{9}",
|
|
7365
|
-
maxLength: 9,
|
|
7366
|
-
hint: "9-digit routing number",
|
|
7367
|
-
required: true
|
|
7368
|
-
}
|
|
7369
|
-
) : /* @__PURE__ */ jsx(
|
|
7370
|
-
EnhancedInput,
|
|
7371
|
-
{
|
|
7372
|
-
label: "BIC Number",
|
|
7373
|
-
placeholder: "Enter BIC/SWIFT code",
|
|
7374
|
-
hint: "Bank Identifier Code",
|
|
7375
|
-
required: true
|
|
7376
|
-
}
|
|
7377
|
-
),
|
|
7378
|
-
/* @__PURE__ */ jsx(
|
|
7379
|
-
EnhancedInput,
|
|
7380
|
-
{
|
|
7381
|
-
label: "Account Number",
|
|
7382
|
-
placeholder: "Enter account number",
|
|
7383
|
-
required: true
|
|
7384
|
-
}
|
|
7385
|
-
)
|
|
7386
|
-
] }) });
|
|
7387
|
-
};
|
|
7388
|
-
var PaymentInformationSection = ({ onPaymentMethodsChange } = {}) => {
|
|
7389
|
-
const [paymentMethods, setPaymentMethods] = useState([]);
|
|
7390
|
-
const [showAddMenu, setShowAddMenu] = useState(false);
|
|
7391
|
-
const addPaymentMethod = (type) => {
|
|
7392
|
-
const newMethod = {
|
|
7393
|
-
id: `${type}-${Date.now()}`,
|
|
7394
|
-
type,
|
|
7395
|
-
name: type === "ach" ? "ACH Payment" : "Wire Transfer",
|
|
7396
|
-
collapsed: false
|
|
7397
|
-
};
|
|
7398
|
-
const updatedMethods = [...paymentMethods, newMethod];
|
|
7399
|
-
setPaymentMethods(updatedMethods);
|
|
7400
|
-
onPaymentMethodsChange?.(updatedMethods);
|
|
7401
|
-
setShowAddMenu(false);
|
|
7402
|
-
};
|
|
7403
|
-
const removePaymentMethod = (id) => {
|
|
7404
|
-
const updatedMethods = paymentMethods.filter((method) => method.id !== id);
|
|
7405
|
-
setPaymentMethods(updatedMethods);
|
|
7406
|
-
onPaymentMethodsChange?.(updatedMethods);
|
|
7407
|
-
};
|
|
7408
|
-
const toggleCollapse = (id) => {
|
|
7409
|
-
setPaymentMethods(paymentMethods.map(
|
|
7410
|
-
(method) => method.id === id ? { ...method, collapsed: !method.collapsed } : method
|
|
7411
|
-
));
|
|
7412
|
-
};
|
|
7413
|
-
const renderPaymentMethodContent = (method) => {
|
|
7414
|
-
if (method.type === "ach") {
|
|
7415
|
-
return /* @__PURE__ */ jsx(SimpleACHForm, {});
|
|
7416
|
-
} else {
|
|
7417
|
-
return /* @__PURE__ */ jsx(SimpleWireForm, {});
|
|
7418
|
-
}
|
|
7419
|
-
};
|
|
7420
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
7421
|
-
paymentMethods.map((method) => /* @__PURE__ */ jsxs(Card, { className: "relative", children: [
|
|
7422
|
-
/* @__PURE__ */ jsx(CardHeader, { className: "pb-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
7423
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
7424
|
-
/* @__PURE__ */ jsx(
|
|
7425
|
-
Button,
|
|
7426
|
-
{
|
|
7427
|
-
variant: "ghost",
|
|
7428
|
-
size: "icon",
|
|
7429
|
-
onClick: () => toggleCollapse(method.id),
|
|
7430
|
-
className: "h-6 w-6",
|
|
7431
|
-
children: method.collapsed ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
|
|
7432
|
-
}
|
|
7433
|
-
),
|
|
7434
|
-
/* @__PURE__ */ jsx(CardTitle, { className: "text-base", children: method.name }),
|
|
7435
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs bg-muted px-2 py-1 rounded-md uppercase font-medium", children: method.type })
|
|
7436
|
-
] }),
|
|
7437
|
-
/* @__PURE__ */ jsx(
|
|
7438
|
-
Button,
|
|
7439
|
-
{
|
|
7440
|
-
variant: "ghost",
|
|
7441
|
-
size: "icon",
|
|
7442
|
-
onClick: () => removePaymentMethod(method.id),
|
|
7443
|
-
className: "h-6 w-6 text-destructive hover:text-destructive/80 hover:bg-destructive/10",
|
|
7444
|
-
children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" })
|
|
7445
|
-
}
|
|
7446
|
-
)
|
|
7447
|
-
] }) }),
|
|
7448
|
-
!method.collapsed && /* @__PURE__ */ jsx(CardContent, { children: renderPaymentMethodContent(method) })
|
|
7449
|
-
] }, method.id)),
|
|
7450
|
-
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
7451
|
-
paymentMethods.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-2", children: "At least one payment method is required *" }),
|
|
7452
|
-
/* @__PURE__ */ jsxs(
|
|
7453
|
-
Button,
|
|
7454
|
-
{
|
|
7455
|
-
variant: "outline",
|
|
7456
|
-
onClick: () => setShowAddMenu(!showAddMenu),
|
|
7457
|
-
className: "w-full border-dashed",
|
|
7458
|
-
children: [
|
|
7459
|
-
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-2" }),
|
|
7460
|
-
"Add Payment Information"
|
|
7461
|
-
]
|
|
7462
|
-
}
|
|
7463
|
-
),
|
|
7464
|
-
showAddMenu && /* @__PURE__ */ jsx("div", { className: "absolute top-full left-0 right-0 mt-2 bg-background border border-border rounded-md shadow-lg z-10", children: /* @__PURE__ */ jsxs("div", { className: "p-2 space-y-1", children: [
|
|
7465
|
-
/* @__PURE__ */ jsx(
|
|
7466
|
-
Button,
|
|
7467
|
-
{
|
|
7468
|
-
variant: "ghost",
|
|
7469
|
-
onClick: () => addPaymentMethod("ach"),
|
|
7470
|
-
className: "w-full justify-start",
|
|
7471
|
-
children: "Add ACH Payment"
|
|
7472
|
-
}
|
|
7473
|
-
),
|
|
7474
|
-
/* @__PURE__ */ jsx(
|
|
7475
|
-
Button,
|
|
7476
|
-
{
|
|
7477
|
-
variant: "ghost",
|
|
7478
|
-
onClick: () => addPaymentMethod("wire"),
|
|
7479
|
-
className: "w-full justify-start",
|
|
7480
|
-
children: "Add Wire Transfer"
|
|
7481
|
-
}
|
|
7482
|
-
)
|
|
7483
|
-
] }) })
|
|
7484
|
-
] })
|
|
7485
|
-
] });
|
|
7486
|
-
};
|
|
7487
7535
|
var receiverSchema = z.object({
|
|
7488
7536
|
routingNumber: z.string().min(9, "Routing number must be 9 digits").max(9, "Routing number must be 9 digits"),
|
|
7489
7537
|
bankShortName: z.string().min(1, "Bank short name is required")
|
|
@@ -11672,54 +11720,6 @@ var CounterpartyDetail = () => {
|
|
|
11672
11720
|
);
|
|
11673
11721
|
};
|
|
11674
11722
|
var CounterpartyDetail_default = CounterpartyDetail;
|
|
11675
|
-
var CreateCounterpartyView = ({
|
|
11676
|
-
counterpartyData,
|
|
11677
|
-
paymentMethods,
|
|
11678
|
-
onPaymentMethodsChange,
|
|
11679
|
-
onBasicInfoChange,
|
|
11680
|
-
onCancel,
|
|
11681
|
-
onSubmit
|
|
11682
|
-
}) => {
|
|
11683
|
-
return /* @__PURE__ */ jsx(
|
|
11684
|
-
PageLayout,
|
|
11685
|
-
{
|
|
11686
|
-
title: "Create Counterparty",
|
|
11687
|
-
description: "Create a new counterparty with all required information",
|
|
11688
|
-
actions: [
|
|
11689
|
-
{ label: "Cancel", variant: "outline", onClick: onCancel },
|
|
11690
|
-
{ label: "Create Counterparty", variant: "default", onClick: onSubmit }
|
|
11691
|
-
],
|
|
11692
|
-
children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
11693
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11694
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Basic Information" }) }),
|
|
11695
|
-
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(CounterpartyBasicInfo, { value: counterpartyData, onDataChange: onBasicInfoChange }) })
|
|
11696
|
-
] }),
|
|
11697
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11698
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { children: [
|
|
11699
|
-
"Address",
|
|
11700
|
-
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
11701
|
-
] }) }),
|
|
11702
|
-
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
11703
|
-
paymentMethods.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Optional for ACH payments, required for wire transfers" }),
|
|
11704
|
-
paymentMethods.some((m) => m.type === "wire") && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4", children: "Required because you have wire payment methods" }),
|
|
11705
|
-
/* @__PURE__ */ jsx(
|
|
11706
|
-
AddressForm,
|
|
11707
|
-
{
|
|
11708
|
-
title: "",
|
|
11709
|
-
description: "",
|
|
11710
|
-
showApartment: true
|
|
11711
|
-
}
|
|
11712
|
-
)
|
|
11713
|
-
] })
|
|
11714
|
-
] }),
|
|
11715
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
11716
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Payment Configuration" }) }),
|
|
11717
|
-
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(PaymentInformationSection, { onPaymentMethodsChange }) })
|
|
11718
|
-
] })
|
|
11719
|
-
] })
|
|
11720
|
-
}
|
|
11721
|
-
);
|
|
11722
|
-
};
|
|
11723
11723
|
var CreateCounterparty = () => {
|
|
11724
11724
|
const navigate = useNavigate();
|
|
11725
11725
|
const [counterpartyData, setCounterpartyData] = useState({
|
|
@@ -16348,6 +16348,6 @@ function ReconExceptions() {
|
|
|
16348
16348
|
] }) });
|
|
16349
16349
|
}
|
|
16350
16350
|
|
|
16351
|
-
export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AccountDetail_default as AccountDetail, Accounts_default as Accounts, AddressForm, AlertDetail_default as AlertDetail, AlertDetailRouter, AlertDocuments, AlertHeaderControls, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessDetailView, BusinessFiltersSheet, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, CIPStatusBadge, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, Checkbox, ContactInfoCard, Container, ContextSection, Counterparties_default as Counterparties, CounterpartiesView, CounterpartyBasicInfo, CounterpartyDetail_default as CounterpartyDetail, CounterpartyDetailView, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, CreateBusinessView, Create_default2 as CreateCounterparty, Create_default3 as CreateIndividual, CreateVelocityLimit, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, IndividualDetail_default as IndividualDetail, Individuals_default as Individuals, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OFACAlertView, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ReconExceptions, ReconUpload, ResolveAlertDialog, ResponsiveGrid, ScrollArea, ScrollBar, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, Statement, StatementHeader, StatementView, StatusBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, TransactionTypeBadge, UIKit, UIKitShowcase, VelocityLimitDetail, VelocityLimits, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, downloadCSV, generateStatementCSV, inputVariants, reducer, textareaVariants, toast, useAlertDetail, useCounterpartyEntity, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
|
|
16351
|
+
export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AccountDetail_default as AccountDetail, Accounts_default as Accounts, AddressForm, AlertDetail_default as AlertDetail, AlertDetailRouter, AlertDocuments, AlertHeaderControls, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessDetailView, BusinessFiltersSheet, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, CIPStatusBadge, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, Checkbox, ContactInfoCard, Container, ContextSection, Counterparties_default as Counterparties, CounterpartiesView, CounterpartyBasicInfo, CounterpartyDetail_default as CounterpartyDetail, CounterpartyDetailView, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, CreateBusinessView, Create_default2 as CreateCounterparty, CreateCounterpartyView, Create_default3 as CreateIndividual, CreateVelocityLimit, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, IndividualDetail_default as IndividualDetail, Individuals_default as Individuals, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OFACAlertView, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ReconExceptions, ReconUpload, ResolveAlertDialog, ResponsiveGrid, ScrollArea, ScrollBar, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, Statement, StatementHeader, StatementView, StatusBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, TransactionTypeBadge, UIKit, UIKitShowcase, VelocityLimitDetail, VelocityLimits, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, downloadCSV, generateStatementCSV, inputVariants, reducer, textareaVariants, toast, useAlertDetail, useCounterpartyEntity, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
|
|
16352
16352
|
//# sourceMappingURL=index.js.map
|
|
16353
16353
|
//# sourceMappingURL=index.js.map
|