braid-ui 1.0.43 → 1.0.45
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/css/braid-ui.css +4 -0
- package/dist/css/braid-ui.min.css +1 -1
- package/dist/index.cjs +68 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +130 -128
- package/dist/index.d.ts +130 -128
- package/dist/index.js +68 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -385,134 +385,6 @@ interface PaymentMethodCardProps {
|
|
|
385
385
|
className?: string;
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
-
interface CounterpartyDetailViewProps {
|
|
389
|
-
counterpartyName: string;
|
|
390
|
-
counterpartyType: string;
|
|
391
|
-
currentStatus: string;
|
|
392
|
-
isEditingProfile: boolean;
|
|
393
|
-
mockPaymentMethods: PaymentMethodCardProps[];
|
|
394
|
-
documents: any[];
|
|
395
|
-
onStatusChange: (newStatus: string) => void;
|
|
396
|
-
onToggleProfileEdit: () => void;
|
|
397
|
-
onAddPaymentMethod: () => void;
|
|
398
|
-
onAddDocument: () => void;
|
|
399
|
-
onEntityClick?: (entityType: string, entityId: string) => void;
|
|
400
|
-
}
|
|
401
|
-
declare const CounterpartyDetailView: ({ counterpartyName, counterpartyType, currentStatus, isEditingProfile, mockPaymentMethods, documents, onStatusChange, onToggleProfileEdit, onAddPaymentMethod, onAddDocument, onEntityClick }: CounterpartyDetailViewProps) => react_jsx_runtime.JSX.Element;
|
|
402
|
-
|
|
403
|
-
declare const achTransferSchema: z.ZodObject<{
|
|
404
|
-
basicInfo: z.ZodObject<{
|
|
405
|
-
counterpartyName: z.ZodString;
|
|
406
|
-
shortName: z.ZodString;
|
|
407
|
-
type: z.ZodString;
|
|
408
|
-
description: z.ZodOptional<z.ZodString>;
|
|
409
|
-
}, "strip", z.ZodTypeAny, {
|
|
410
|
-
description?: string;
|
|
411
|
-
type?: string;
|
|
412
|
-
counterpartyName?: string;
|
|
413
|
-
shortName?: string;
|
|
414
|
-
}, {
|
|
415
|
-
description?: string;
|
|
416
|
-
type?: string;
|
|
417
|
-
counterpartyName?: string;
|
|
418
|
-
shortName?: string;
|
|
419
|
-
}>;
|
|
420
|
-
bankDetails: z.ZodObject<{
|
|
421
|
-
gatewayRoutingNumber: z.ZodString;
|
|
422
|
-
rdfiNumberQualifier: z.ZodString;
|
|
423
|
-
}, "strip", z.ZodTypeAny, {
|
|
424
|
-
gatewayRoutingNumber?: string;
|
|
425
|
-
rdfiNumberQualifier?: string;
|
|
426
|
-
}, {
|
|
427
|
-
gatewayRoutingNumber?: string;
|
|
428
|
-
rdfiNumberQualifier?: string;
|
|
429
|
-
}>;
|
|
430
|
-
}, "strip", z.ZodTypeAny, {
|
|
431
|
-
basicInfo?: {
|
|
432
|
-
description?: string;
|
|
433
|
-
type?: string;
|
|
434
|
-
counterpartyName?: string;
|
|
435
|
-
shortName?: string;
|
|
436
|
-
};
|
|
437
|
-
bankDetails?: {
|
|
438
|
-
gatewayRoutingNumber?: string;
|
|
439
|
-
rdfiNumberQualifier?: string;
|
|
440
|
-
};
|
|
441
|
-
}, {
|
|
442
|
-
basicInfo?: {
|
|
443
|
-
description?: string;
|
|
444
|
-
type?: string;
|
|
445
|
-
counterpartyName?: string;
|
|
446
|
-
shortName?: string;
|
|
447
|
-
};
|
|
448
|
-
bankDetails?: {
|
|
449
|
-
gatewayRoutingNumber?: string;
|
|
450
|
-
rdfiNumberQualifier?: string;
|
|
451
|
-
};
|
|
452
|
-
}>;
|
|
453
|
-
type ACHTransfer = z.infer<typeof achTransferSchema>;
|
|
454
|
-
|
|
455
|
-
interface ACHBankCardProps {
|
|
456
|
-
data?: Partial<ACHTransfer>;
|
|
457
|
-
onDataChange?: (data: ACHTransfer) => void;
|
|
458
|
-
isEditing?: boolean;
|
|
459
|
-
onToggleEdit?: () => void;
|
|
460
|
-
className?: string;
|
|
461
|
-
hideActions?: boolean;
|
|
462
|
-
}
|
|
463
|
-
declare const ACHBankCard: ({ data, onDataChange, isEditing, onToggleEdit, className, hideActions }: ACHBankCardProps) => react_jsx_runtime.JSX.Element;
|
|
464
|
-
|
|
465
|
-
interface ACHBasicInfoCardProps {
|
|
466
|
-
data?: Partial<ACHTransfer>;
|
|
467
|
-
onDataChange?: (data: ACHTransfer) => void;
|
|
468
|
-
isEditing?: boolean;
|
|
469
|
-
onToggleEdit?: () => void;
|
|
470
|
-
className?: string;
|
|
471
|
-
hideActions?: boolean;
|
|
472
|
-
}
|
|
473
|
-
declare const ACHBasicInfoCard: ({ data, onDataChange, isEditing, onToggleEdit, className, hideActions }: ACHBasicInfoCardProps) => react_jsx_runtime.JSX.Element;
|
|
474
|
-
|
|
475
|
-
interface ACHTransferSectionProps {
|
|
476
|
-
isEditing?: boolean;
|
|
477
|
-
onToggleEdit?: () => void;
|
|
478
|
-
className?: string;
|
|
479
|
-
hideActions?: boolean;
|
|
480
|
-
}
|
|
481
|
-
declare const ACHTransferSection: ({ isEditing, onToggleEdit, className, hideActions }: ACHTransferSectionProps) => react_jsx_runtime.JSX.Element;
|
|
482
|
-
|
|
483
|
-
declare const inputVariants: (props?: {
|
|
484
|
-
variant?: "default" | "success" | "disabled" | "error" | "readonly";
|
|
485
|
-
size?: "default" | "sm" | "lg";
|
|
486
|
-
} & class_variance_authority_dist_types.ClassProp) => string;
|
|
487
|
-
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
488
|
-
label?: string;
|
|
489
|
-
hint?: string;
|
|
490
|
-
error?: string;
|
|
491
|
-
success?: string;
|
|
492
|
-
isLoading?: boolean;
|
|
493
|
-
}
|
|
494
|
-
declare const EnhancedInput: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
495
|
-
|
|
496
|
-
interface AddressFormProps {
|
|
497
|
-
title: string;
|
|
498
|
-
description: string;
|
|
499
|
-
fieldPrefix?: string;
|
|
500
|
-
showAddressType?: boolean;
|
|
501
|
-
addressTypeOptions?: Array<{
|
|
502
|
-
value: string;
|
|
503
|
-
label: string;
|
|
504
|
-
}>;
|
|
505
|
-
fieldOverrides?: {
|
|
506
|
-
state?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
507
|
-
city?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
508
|
-
streetAddress?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
509
|
-
postalCode?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
510
|
-
apartment?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
511
|
-
};
|
|
512
|
-
showApartment?: boolean;
|
|
513
|
-
}
|
|
514
|
-
declare const AddressForm: ({ title, description, fieldPrefix, showAddressType, addressTypeOptions, fieldOverrides, showApartment }: AddressFormProps) => react_jsx_runtime.JSX.Element;
|
|
515
|
-
|
|
516
388
|
declare const addressSchema: z.ZodObject<{
|
|
517
389
|
line1: z.ZodOptional<z.ZodString>;
|
|
518
390
|
line2: z.ZodOptional<z.ZodString>;
|
|
@@ -606,6 +478,58 @@ declare const counterpartyDetailSchema: z.ZodObject<{
|
|
|
606
478
|
type CounterpartyDetail$1 = z.infer<typeof counterpartyDetailSchema>;
|
|
607
479
|
type Address = z.infer<typeof addressSchema>;
|
|
608
480
|
|
|
481
|
+
declare const achTransferSchema: z.ZodObject<{
|
|
482
|
+
basicInfo: z.ZodObject<{
|
|
483
|
+
counterpartyName: z.ZodString;
|
|
484
|
+
shortName: z.ZodString;
|
|
485
|
+
type: z.ZodString;
|
|
486
|
+
description: z.ZodOptional<z.ZodString>;
|
|
487
|
+
}, "strip", z.ZodTypeAny, {
|
|
488
|
+
description?: string;
|
|
489
|
+
type?: string;
|
|
490
|
+
counterpartyName?: string;
|
|
491
|
+
shortName?: string;
|
|
492
|
+
}, {
|
|
493
|
+
description?: string;
|
|
494
|
+
type?: string;
|
|
495
|
+
counterpartyName?: string;
|
|
496
|
+
shortName?: string;
|
|
497
|
+
}>;
|
|
498
|
+
bankDetails: z.ZodObject<{
|
|
499
|
+
gatewayRoutingNumber: z.ZodString;
|
|
500
|
+
rdfiNumberQualifier: z.ZodString;
|
|
501
|
+
}, "strip", z.ZodTypeAny, {
|
|
502
|
+
gatewayRoutingNumber?: string;
|
|
503
|
+
rdfiNumberQualifier?: string;
|
|
504
|
+
}, {
|
|
505
|
+
gatewayRoutingNumber?: string;
|
|
506
|
+
rdfiNumberQualifier?: string;
|
|
507
|
+
}>;
|
|
508
|
+
}, "strip", z.ZodTypeAny, {
|
|
509
|
+
basicInfo?: {
|
|
510
|
+
description?: string;
|
|
511
|
+
type?: string;
|
|
512
|
+
counterpartyName?: string;
|
|
513
|
+
shortName?: string;
|
|
514
|
+
};
|
|
515
|
+
bankDetails?: {
|
|
516
|
+
gatewayRoutingNumber?: string;
|
|
517
|
+
rdfiNumberQualifier?: string;
|
|
518
|
+
};
|
|
519
|
+
}, {
|
|
520
|
+
basicInfo?: {
|
|
521
|
+
description?: string;
|
|
522
|
+
type?: string;
|
|
523
|
+
counterpartyName?: string;
|
|
524
|
+
shortName?: string;
|
|
525
|
+
};
|
|
526
|
+
bankDetails?: {
|
|
527
|
+
gatewayRoutingNumber?: string;
|
|
528
|
+
rdfiNumberQualifier?: string;
|
|
529
|
+
};
|
|
530
|
+
}>;
|
|
531
|
+
type ACHTransfer = z.infer<typeof achTransferSchema>;
|
|
532
|
+
|
|
609
533
|
declare const intermediaryFISchema: z.ZodObject<{
|
|
610
534
|
accountNumber: z.ZodOptional<z.ZodString>;
|
|
611
535
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -667,6 +591,84 @@ declare const intermediaryFISchema: z.ZodObject<{
|
|
|
667
591
|
}>;
|
|
668
592
|
type IntermediaryFI$1 = z.infer<typeof intermediaryFISchema>;
|
|
669
593
|
|
|
594
|
+
interface CounterpartyDetailViewProps {
|
|
595
|
+
counterpartyName: string;
|
|
596
|
+
counterpartyType: string;
|
|
597
|
+
currentStatus: string;
|
|
598
|
+
isEditingProfile: boolean;
|
|
599
|
+
counterpartyProfileData: CounterpartyDetail$1;
|
|
600
|
+
mockPaymentMethods: PaymentMethodCardProps[];
|
|
601
|
+
documents: any[];
|
|
602
|
+
onStatusChange: (newStatus: string) => void;
|
|
603
|
+
onToggleProfileEdit: () => void;
|
|
604
|
+
onProfileDataChange: (data: CounterpartyDetail$1) => void;
|
|
605
|
+
onAddPaymentMethod: () => void;
|
|
606
|
+
onAddDocument: () => void;
|
|
607
|
+
onEntityClick?: (entityType: string, entityId: string) => void;
|
|
608
|
+
}
|
|
609
|
+
declare const CounterpartyDetailView: ({ counterpartyName, counterpartyType, currentStatus, isEditingProfile, counterpartyProfileData, mockPaymentMethods, documents, onStatusChange, onToggleProfileEdit, onProfileDataChange, onAddPaymentMethod, onAddDocument, onEntityClick }: CounterpartyDetailViewProps) => react_jsx_runtime.JSX.Element;
|
|
610
|
+
|
|
611
|
+
interface ACHBankCardProps {
|
|
612
|
+
data?: Partial<ACHTransfer>;
|
|
613
|
+
onDataChange?: (data: ACHTransfer) => void;
|
|
614
|
+
isEditing?: boolean;
|
|
615
|
+
onToggleEdit?: () => void;
|
|
616
|
+
className?: string;
|
|
617
|
+
hideActions?: boolean;
|
|
618
|
+
}
|
|
619
|
+
declare const ACHBankCard: ({ data, onDataChange, isEditing, onToggleEdit, className, hideActions }: ACHBankCardProps) => react_jsx_runtime.JSX.Element;
|
|
620
|
+
|
|
621
|
+
interface ACHBasicInfoCardProps {
|
|
622
|
+
data?: Partial<ACHTransfer>;
|
|
623
|
+
onDataChange?: (data: ACHTransfer) => void;
|
|
624
|
+
isEditing?: boolean;
|
|
625
|
+
onToggleEdit?: () => void;
|
|
626
|
+
className?: string;
|
|
627
|
+
hideActions?: boolean;
|
|
628
|
+
}
|
|
629
|
+
declare const ACHBasicInfoCard: ({ data, onDataChange, isEditing, onToggleEdit, className, hideActions }: ACHBasicInfoCardProps) => react_jsx_runtime.JSX.Element;
|
|
630
|
+
|
|
631
|
+
interface ACHTransferSectionProps {
|
|
632
|
+
isEditing?: boolean;
|
|
633
|
+
onToggleEdit?: () => void;
|
|
634
|
+
className?: string;
|
|
635
|
+
hideActions?: boolean;
|
|
636
|
+
}
|
|
637
|
+
declare const ACHTransferSection: ({ isEditing, onToggleEdit, className, hideActions }: ACHTransferSectionProps) => react_jsx_runtime.JSX.Element;
|
|
638
|
+
|
|
639
|
+
declare const inputVariants: (props?: {
|
|
640
|
+
variant?: "default" | "success" | "disabled" | "error" | "readonly";
|
|
641
|
+
size?: "default" | "sm" | "lg";
|
|
642
|
+
} & class_variance_authority_dist_types.ClassProp) => string;
|
|
643
|
+
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
644
|
+
label?: string;
|
|
645
|
+
hint?: string;
|
|
646
|
+
error?: string;
|
|
647
|
+
success?: string;
|
|
648
|
+
isLoading?: boolean;
|
|
649
|
+
}
|
|
650
|
+
declare const EnhancedInput: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
651
|
+
|
|
652
|
+
interface AddressFormProps {
|
|
653
|
+
title: string;
|
|
654
|
+
description: string;
|
|
655
|
+
fieldPrefix?: string;
|
|
656
|
+
showAddressType?: boolean;
|
|
657
|
+
addressTypeOptions?: Array<{
|
|
658
|
+
value: string;
|
|
659
|
+
label: string;
|
|
660
|
+
}>;
|
|
661
|
+
fieldOverrides?: {
|
|
662
|
+
state?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
663
|
+
city?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
664
|
+
streetAddress?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
665
|
+
postalCode?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
666
|
+
apartment?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
667
|
+
};
|
|
668
|
+
showApartment?: boolean;
|
|
669
|
+
}
|
|
670
|
+
declare const AddressForm: ({ title, description, fieldPrefix, showAddressType, addressTypeOptions, fieldOverrides, showApartment }: AddressFormProps) => react_jsx_runtime.JSX.Element;
|
|
671
|
+
|
|
670
672
|
interface BankAddressCardProps {
|
|
671
673
|
data?: Partial<Address>;
|
|
672
674
|
onDataChange?: (data: Address) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -385,134 +385,6 @@ interface PaymentMethodCardProps {
|
|
|
385
385
|
className?: string;
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
-
interface CounterpartyDetailViewProps {
|
|
389
|
-
counterpartyName: string;
|
|
390
|
-
counterpartyType: string;
|
|
391
|
-
currentStatus: string;
|
|
392
|
-
isEditingProfile: boolean;
|
|
393
|
-
mockPaymentMethods: PaymentMethodCardProps[];
|
|
394
|
-
documents: any[];
|
|
395
|
-
onStatusChange: (newStatus: string) => void;
|
|
396
|
-
onToggleProfileEdit: () => void;
|
|
397
|
-
onAddPaymentMethod: () => void;
|
|
398
|
-
onAddDocument: () => void;
|
|
399
|
-
onEntityClick?: (entityType: string, entityId: string) => void;
|
|
400
|
-
}
|
|
401
|
-
declare const CounterpartyDetailView: ({ counterpartyName, counterpartyType, currentStatus, isEditingProfile, mockPaymentMethods, documents, onStatusChange, onToggleProfileEdit, onAddPaymentMethod, onAddDocument, onEntityClick }: CounterpartyDetailViewProps) => react_jsx_runtime.JSX.Element;
|
|
402
|
-
|
|
403
|
-
declare const achTransferSchema: z.ZodObject<{
|
|
404
|
-
basicInfo: z.ZodObject<{
|
|
405
|
-
counterpartyName: z.ZodString;
|
|
406
|
-
shortName: z.ZodString;
|
|
407
|
-
type: z.ZodString;
|
|
408
|
-
description: z.ZodOptional<z.ZodString>;
|
|
409
|
-
}, "strip", z.ZodTypeAny, {
|
|
410
|
-
description?: string;
|
|
411
|
-
type?: string;
|
|
412
|
-
counterpartyName?: string;
|
|
413
|
-
shortName?: string;
|
|
414
|
-
}, {
|
|
415
|
-
description?: string;
|
|
416
|
-
type?: string;
|
|
417
|
-
counterpartyName?: string;
|
|
418
|
-
shortName?: string;
|
|
419
|
-
}>;
|
|
420
|
-
bankDetails: z.ZodObject<{
|
|
421
|
-
gatewayRoutingNumber: z.ZodString;
|
|
422
|
-
rdfiNumberQualifier: z.ZodString;
|
|
423
|
-
}, "strip", z.ZodTypeAny, {
|
|
424
|
-
gatewayRoutingNumber?: string;
|
|
425
|
-
rdfiNumberQualifier?: string;
|
|
426
|
-
}, {
|
|
427
|
-
gatewayRoutingNumber?: string;
|
|
428
|
-
rdfiNumberQualifier?: string;
|
|
429
|
-
}>;
|
|
430
|
-
}, "strip", z.ZodTypeAny, {
|
|
431
|
-
basicInfo?: {
|
|
432
|
-
description?: string;
|
|
433
|
-
type?: string;
|
|
434
|
-
counterpartyName?: string;
|
|
435
|
-
shortName?: string;
|
|
436
|
-
};
|
|
437
|
-
bankDetails?: {
|
|
438
|
-
gatewayRoutingNumber?: string;
|
|
439
|
-
rdfiNumberQualifier?: string;
|
|
440
|
-
};
|
|
441
|
-
}, {
|
|
442
|
-
basicInfo?: {
|
|
443
|
-
description?: string;
|
|
444
|
-
type?: string;
|
|
445
|
-
counterpartyName?: string;
|
|
446
|
-
shortName?: string;
|
|
447
|
-
};
|
|
448
|
-
bankDetails?: {
|
|
449
|
-
gatewayRoutingNumber?: string;
|
|
450
|
-
rdfiNumberQualifier?: string;
|
|
451
|
-
};
|
|
452
|
-
}>;
|
|
453
|
-
type ACHTransfer = z.infer<typeof achTransferSchema>;
|
|
454
|
-
|
|
455
|
-
interface ACHBankCardProps {
|
|
456
|
-
data?: Partial<ACHTransfer>;
|
|
457
|
-
onDataChange?: (data: ACHTransfer) => void;
|
|
458
|
-
isEditing?: boolean;
|
|
459
|
-
onToggleEdit?: () => void;
|
|
460
|
-
className?: string;
|
|
461
|
-
hideActions?: boolean;
|
|
462
|
-
}
|
|
463
|
-
declare const ACHBankCard: ({ data, onDataChange, isEditing, onToggleEdit, className, hideActions }: ACHBankCardProps) => react_jsx_runtime.JSX.Element;
|
|
464
|
-
|
|
465
|
-
interface ACHBasicInfoCardProps {
|
|
466
|
-
data?: Partial<ACHTransfer>;
|
|
467
|
-
onDataChange?: (data: ACHTransfer) => void;
|
|
468
|
-
isEditing?: boolean;
|
|
469
|
-
onToggleEdit?: () => void;
|
|
470
|
-
className?: string;
|
|
471
|
-
hideActions?: boolean;
|
|
472
|
-
}
|
|
473
|
-
declare const ACHBasicInfoCard: ({ data, onDataChange, isEditing, onToggleEdit, className, hideActions }: ACHBasicInfoCardProps) => react_jsx_runtime.JSX.Element;
|
|
474
|
-
|
|
475
|
-
interface ACHTransferSectionProps {
|
|
476
|
-
isEditing?: boolean;
|
|
477
|
-
onToggleEdit?: () => void;
|
|
478
|
-
className?: string;
|
|
479
|
-
hideActions?: boolean;
|
|
480
|
-
}
|
|
481
|
-
declare const ACHTransferSection: ({ isEditing, onToggleEdit, className, hideActions }: ACHTransferSectionProps) => react_jsx_runtime.JSX.Element;
|
|
482
|
-
|
|
483
|
-
declare const inputVariants: (props?: {
|
|
484
|
-
variant?: "default" | "success" | "disabled" | "error" | "readonly";
|
|
485
|
-
size?: "default" | "sm" | "lg";
|
|
486
|
-
} & class_variance_authority_dist_types.ClassProp) => string;
|
|
487
|
-
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
488
|
-
label?: string;
|
|
489
|
-
hint?: string;
|
|
490
|
-
error?: string;
|
|
491
|
-
success?: string;
|
|
492
|
-
isLoading?: boolean;
|
|
493
|
-
}
|
|
494
|
-
declare const EnhancedInput: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
495
|
-
|
|
496
|
-
interface AddressFormProps {
|
|
497
|
-
title: string;
|
|
498
|
-
description: string;
|
|
499
|
-
fieldPrefix?: string;
|
|
500
|
-
showAddressType?: boolean;
|
|
501
|
-
addressTypeOptions?: Array<{
|
|
502
|
-
value: string;
|
|
503
|
-
label: string;
|
|
504
|
-
}>;
|
|
505
|
-
fieldOverrides?: {
|
|
506
|
-
state?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
507
|
-
city?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
508
|
-
streetAddress?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
509
|
-
postalCode?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
510
|
-
apartment?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
511
|
-
};
|
|
512
|
-
showApartment?: boolean;
|
|
513
|
-
}
|
|
514
|
-
declare const AddressForm: ({ title, description, fieldPrefix, showAddressType, addressTypeOptions, fieldOverrides, showApartment }: AddressFormProps) => react_jsx_runtime.JSX.Element;
|
|
515
|
-
|
|
516
388
|
declare const addressSchema: z.ZodObject<{
|
|
517
389
|
line1: z.ZodOptional<z.ZodString>;
|
|
518
390
|
line2: z.ZodOptional<z.ZodString>;
|
|
@@ -606,6 +478,58 @@ declare const counterpartyDetailSchema: z.ZodObject<{
|
|
|
606
478
|
type CounterpartyDetail$1 = z.infer<typeof counterpartyDetailSchema>;
|
|
607
479
|
type Address = z.infer<typeof addressSchema>;
|
|
608
480
|
|
|
481
|
+
declare const achTransferSchema: z.ZodObject<{
|
|
482
|
+
basicInfo: z.ZodObject<{
|
|
483
|
+
counterpartyName: z.ZodString;
|
|
484
|
+
shortName: z.ZodString;
|
|
485
|
+
type: z.ZodString;
|
|
486
|
+
description: z.ZodOptional<z.ZodString>;
|
|
487
|
+
}, "strip", z.ZodTypeAny, {
|
|
488
|
+
description?: string;
|
|
489
|
+
type?: string;
|
|
490
|
+
counterpartyName?: string;
|
|
491
|
+
shortName?: string;
|
|
492
|
+
}, {
|
|
493
|
+
description?: string;
|
|
494
|
+
type?: string;
|
|
495
|
+
counterpartyName?: string;
|
|
496
|
+
shortName?: string;
|
|
497
|
+
}>;
|
|
498
|
+
bankDetails: z.ZodObject<{
|
|
499
|
+
gatewayRoutingNumber: z.ZodString;
|
|
500
|
+
rdfiNumberQualifier: z.ZodString;
|
|
501
|
+
}, "strip", z.ZodTypeAny, {
|
|
502
|
+
gatewayRoutingNumber?: string;
|
|
503
|
+
rdfiNumberQualifier?: string;
|
|
504
|
+
}, {
|
|
505
|
+
gatewayRoutingNumber?: string;
|
|
506
|
+
rdfiNumberQualifier?: string;
|
|
507
|
+
}>;
|
|
508
|
+
}, "strip", z.ZodTypeAny, {
|
|
509
|
+
basicInfo?: {
|
|
510
|
+
description?: string;
|
|
511
|
+
type?: string;
|
|
512
|
+
counterpartyName?: string;
|
|
513
|
+
shortName?: string;
|
|
514
|
+
};
|
|
515
|
+
bankDetails?: {
|
|
516
|
+
gatewayRoutingNumber?: string;
|
|
517
|
+
rdfiNumberQualifier?: string;
|
|
518
|
+
};
|
|
519
|
+
}, {
|
|
520
|
+
basicInfo?: {
|
|
521
|
+
description?: string;
|
|
522
|
+
type?: string;
|
|
523
|
+
counterpartyName?: string;
|
|
524
|
+
shortName?: string;
|
|
525
|
+
};
|
|
526
|
+
bankDetails?: {
|
|
527
|
+
gatewayRoutingNumber?: string;
|
|
528
|
+
rdfiNumberQualifier?: string;
|
|
529
|
+
};
|
|
530
|
+
}>;
|
|
531
|
+
type ACHTransfer = z.infer<typeof achTransferSchema>;
|
|
532
|
+
|
|
609
533
|
declare const intermediaryFISchema: z.ZodObject<{
|
|
610
534
|
accountNumber: z.ZodOptional<z.ZodString>;
|
|
611
535
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -667,6 +591,84 @@ declare const intermediaryFISchema: z.ZodObject<{
|
|
|
667
591
|
}>;
|
|
668
592
|
type IntermediaryFI$1 = z.infer<typeof intermediaryFISchema>;
|
|
669
593
|
|
|
594
|
+
interface CounterpartyDetailViewProps {
|
|
595
|
+
counterpartyName: string;
|
|
596
|
+
counterpartyType: string;
|
|
597
|
+
currentStatus: string;
|
|
598
|
+
isEditingProfile: boolean;
|
|
599
|
+
counterpartyProfileData: CounterpartyDetail$1;
|
|
600
|
+
mockPaymentMethods: PaymentMethodCardProps[];
|
|
601
|
+
documents: any[];
|
|
602
|
+
onStatusChange: (newStatus: string) => void;
|
|
603
|
+
onToggleProfileEdit: () => void;
|
|
604
|
+
onProfileDataChange: (data: CounterpartyDetail$1) => void;
|
|
605
|
+
onAddPaymentMethod: () => void;
|
|
606
|
+
onAddDocument: () => void;
|
|
607
|
+
onEntityClick?: (entityType: string, entityId: string) => void;
|
|
608
|
+
}
|
|
609
|
+
declare const CounterpartyDetailView: ({ counterpartyName, counterpartyType, currentStatus, isEditingProfile, counterpartyProfileData, mockPaymentMethods, documents, onStatusChange, onToggleProfileEdit, onProfileDataChange, onAddPaymentMethod, onAddDocument, onEntityClick }: CounterpartyDetailViewProps) => react_jsx_runtime.JSX.Element;
|
|
610
|
+
|
|
611
|
+
interface ACHBankCardProps {
|
|
612
|
+
data?: Partial<ACHTransfer>;
|
|
613
|
+
onDataChange?: (data: ACHTransfer) => void;
|
|
614
|
+
isEditing?: boolean;
|
|
615
|
+
onToggleEdit?: () => void;
|
|
616
|
+
className?: string;
|
|
617
|
+
hideActions?: boolean;
|
|
618
|
+
}
|
|
619
|
+
declare const ACHBankCard: ({ data, onDataChange, isEditing, onToggleEdit, className, hideActions }: ACHBankCardProps) => react_jsx_runtime.JSX.Element;
|
|
620
|
+
|
|
621
|
+
interface ACHBasicInfoCardProps {
|
|
622
|
+
data?: Partial<ACHTransfer>;
|
|
623
|
+
onDataChange?: (data: ACHTransfer) => void;
|
|
624
|
+
isEditing?: boolean;
|
|
625
|
+
onToggleEdit?: () => void;
|
|
626
|
+
className?: string;
|
|
627
|
+
hideActions?: boolean;
|
|
628
|
+
}
|
|
629
|
+
declare const ACHBasicInfoCard: ({ data, onDataChange, isEditing, onToggleEdit, className, hideActions }: ACHBasicInfoCardProps) => react_jsx_runtime.JSX.Element;
|
|
630
|
+
|
|
631
|
+
interface ACHTransferSectionProps {
|
|
632
|
+
isEditing?: boolean;
|
|
633
|
+
onToggleEdit?: () => void;
|
|
634
|
+
className?: string;
|
|
635
|
+
hideActions?: boolean;
|
|
636
|
+
}
|
|
637
|
+
declare const ACHTransferSection: ({ isEditing, onToggleEdit, className, hideActions }: ACHTransferSectionProps) => react_jsx_runtime.JSX.Element;
|
|
638
|
+
|
|
639
|
+
declare const inputVariants: (props?: {
|
|
640
|
+
variant?: "default" | "success" | "disabled" | "error" | "readonly";
|
|
641
|
+
size?: "default" | "sm" | "lg";
|
|
642
|
+
} & class_variance_authority_dist_types.ClassProp) => string;
|
|
643
|
+
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
644
|
+
label?: string;
|
|
645
|
+
hint?: string;
|
|
646
|
+
error?: string;
|
|
647
|
+
success?: string;
|
|
648
|
+
isLoading?: boolean;
|
|
649
|
+
}
|
|
650
|
+
declare const EnhancedInput: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
651
|
+
|
|
652
|
+
interface AddressFormProps {
|
|
653
|
+
title: string;
|
|
654
|
+
description: string;
|
|
655
|
+
fieldPrefix?: string;
|
|
656
|
+
showAddressType?: boolean;
|
|
657
|
+
addressTypeOptions?: Array<{
|
|
658
|
+
value: string;
|
|
659
|
+
label: string;
|
|
660
|
+
}>;
|
|
661
|
+
fieldOverrides?: {
|
|
662
|
+
state?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
663
|
+
city?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
664
|
+
streetAddress?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
665
|
+
postalCode?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
666
|
+
apartment?: Partial<React.ComponentProps<typeof EnhancedInput>>;
|
|
667
|
+
};
|
|
668
|
+
showApartment?: boolean;
|
|
669
|
+
}
|
|
670
|
+
declare const AddressForm: ({ title, description, fieldPrefix, showAddressType, addressTypeOptions, fieldOverrides, showApartment }: AddressFormProps) => react_jsx_runtime.JSX.Element;
|
|
671
|
+
|
|
670
672
|
interface BankAddressCardProps {
|
|
671
673
|
data?: Partial<Address>;
|
|
672
674
|
onDataChange?: (data: Address) => void;
|
package/dist/index.js
CHANGED
|
@@ -1895,7 +1895,10 @@ var useFormWithEditState = ({
|
|
|
1895
1895
|
}
|
|
1896
1896
|
}, [onToggleEdit]);
|
|
1897
1897
|
const handleSave = useCallback(async () => {
|
|
1898
|
-
|
|
1898
|
+
const isFormValid = await form.trigger();
|
|
1899
|
+
if (!isFormValid) {
|
|
1900
|
+
return;
|
|
1901
|
+
}
|
|
1899
1902
|
setIsLoading(true);
|
|
1900
1903
|
try {
|
|
1901
1904
|
const data = form.getValues();
|
|
@@ -1912,7 +1915,7 @@ var useFormWithEditState = ({
|
|
|
1912
1915
|
} finally {
|
|
1913
1916
|
setIsLoading(false);
|
|
1914
1917
|
}
|
|
1915
|
-
}, [form,
|
|
1918
|
+
}, [form, onSave, onToggleEdit]);
|
|
1916
1919
|
const handleCancel = useCallback(() => {
|
|
1917
1920
|
reset();
|
|
1918
1921
|
if (onCancel) {
|
|
@@ -6156,10 +6159,12 @@ var CounterpartyDetailView = ({
|
|
|
6156
6159
|
counterpartyType,
|
|
6157
6160
|
currentStatus,
|
|
6158
6161
|
isEditingProfile,
|
|
6162
|
+
counterpartyProfileData,
|
|
6159
6163
|
mockPaymentMethods: mockPaymentMethods2,
|
|
6160
6164
|
documents,
|
|
6161
6165
|
onStatusChange,
|
|
6162
6166
|
onToggleProfileEdit,
|
|
6167
|
+
onProfileDataChange,
|
|
6163
6168
|
onAddPaymentMethod,
|
|
6164
6169
|
onAddDocument,
|
|
6165
6170
|
onEntityClick
|
|
@@ -6222,8 +6227,10 @@ var CounterpartyDetailView = ({
|
|
|
6222
6227
|
/* @__PURE__ */ jsx(
|
|
6223
6228
|
CounterpartyProfileCard,
|
|
6224
6229
|
{
|
|
6230
|
+
data: counterpartyProfileData,
|
|
6225
6231
|
isEditing: isEditingProfile,
|
|
6226
6232
|
onToggleEdit: onToggleProfileEdit,
|
|
6233
|
+
onDataChange: onProfileDataChange,
|
|
6227
6234
|
onEntityClick
|
|
6228
6235
|
}
|
|
6229
6236
|
),
|
|
@@ -11555,6 +11562,60 @@ var CounterpartyDetail = () => {
|
|
|
11555
11562
|
const counterpartyDocuments = id ? mockBusinessDocuments[id] || [] : [];
|
|
11556
11563
|
const [currentStatus, setCurrentStatus] = useState(counterparty?.status || "ACTIVE");
|
|
11557
11564
|
const [isEditingProfile, setIsEditingProfile] = useState(false);
|
|
11565
|
+
const getInitialProfileData = () => {
|
|
11566
|
+
if (!counterparty) {
|
|
11567
|
+
return {
|
|
11568
|
+
idType: "product_id",
|
|
11569
|
+
idValue: "",
|
|
11570
|
+
email: "",
|
|
11571
|
+
phone: "",
|
|
11572
|
+
dateOfBirth: "",
|
|
11573
|
+
idNumber: "",
|
|
11574
|
+
address: {
|
|
11575
|
+
line1: "",
|
|
11576
|
+
line2: "",
|
|
11577
|
+
city: "",
|
|
11578
|
+
state: "",
|
|
11579
|
+
postalCode: "",
|
|
11580
|
+
countryCode: "US",
|
|
11581
|
+
type: ""
|
|
11582
|
+
}
|
|
11583
|
+
};
|
|
11584
|
+
}
|
|
11585
|
+
let idType = "product_id";
|
|
11586
|
+
let idValue = "";
|
|
11587
|
+
if (counterparty.productId) {
|
|
11588
|
+
idType = "product_id";
|
|
11589
|
+
idValue = counterparty.productId;
|
|
11590
|
+
} else if (counterparty.businessId) {
|
|
11591
|
+
idType = "business_id";
|
|
11592
|
+
idValue = counterparty.businessId;
|
|
11593
|
+
} else if (counterparty.individualId) {
|
|
11594
|
+
idType = "individual_id";
|
|
11595
|
+
idValue = counterparty.individualId;
|
|
11596
|
+
} else if (counterparty.accountNumber) {
|
|
11597
|
+
idType = "account_number";
|
|
11598
|
+
idValue = counterparty.accountNumber;
|
|
11599
|
+
}
|
|
11600
|
+
return {
|
|
11601
|
+
idType,
|
|
11602
|
+
idValue,
|
|
11603
|
+
email: "",
|
|
11604
|
+
phone: "",
|
|
11605
|
+
dateOfBirth: "",
|
|
11606
|
+
idNumber: "",
|
|
11607
|
+
address: {
|
|
11608
|
+
line1: "",
|
|
11609
|
+
line2: "",
|
|
11610
|
+
city: "",
|
|
11611
|
+
state: "",
|
|
11612
|
+
postalCode: "",
|
|
11613
|
+
countryCode: "US",
|
|
11614
|
+
type: ""
|
|
11615
|
+
}
|
|
11616
|
+
};
|
|
11617
|
+
};
|
|
11618
|
+
const [counterpartyProfileData, setCounterpartyProfileData] = useState(getInitialProfileData());
|
|
11558
11619
|
const handleEntityClick = (entityType, entityId) => {
|
|
11559
11620
|
switch (entityType) {
|
|
11560
11621
|
case "business_id":
|
|
@@ -11574,6 +11635,9 @@ var CounterpartyDetail = () => {
|
|
|
11574
11635
|
const handleToggleProfileEdit = () => {
|
|
11575
11636
|
setIsEditingProfile(!isEditingProfile);
|
|
11576
11637
|
};
|
|
11638
|
+
const handleProfileDataChange = (newData) => {
|
|
11639
|
+
setCounterpartyProfileData(newData);
|
|
11640
|
+
};
|
|
11577
11641
|
const handleAddPaymentMethod = () => {
|
|
11578
11642
|
console.log("Add payment method");
|
|
11579
11643
|
};
|
|
@@ -11593,10 +11657,12 @@ var CounterpartyDetail = () => {
|
|
|
11593
11657
|
counterpartyType: counterparty.type,
|
|
11594
11658
|
currentStatus,
|
|
11595
11659
|
isEditingProfile,
|
|
11660
|
+
counterpartyProfileData,
|
|
11596
11661
|
mockPaymentMethods,
|
|
11597
11662
|
documents: counterpartyDocuments,
|
|
11598
11663
|
onStatusChange: handleStatusChange,
|
|
11599
11664
|
onToggleProfileEdit: handleToggleProfileEdit,
|
|
11665
|
+
onProfileDataChange: handleProfileDataChange,
|
|
11600
11666
|
onAddPaymentMethod: handleAddPaymentMethod,
|
|
11601
11667
|
onAddDocument: handleAddDocument,
|
|
11602
11668
|
onEntityClick: handleEntityClick
|