braid-ui 1.0.22 → 1.0.24

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.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, Heart, User, AlertTriangle, XCircle, CheckCircle, Clock, Ban, Loader2, Circle, ArrowDownRight, ArrowUpRight, Filter, ChevronLeft, Wallet, CheckCircle2, StickyNote, FileUp, RotateCcw, Send, PlayCircle, UserPlus, ChevronsUpDown, CalendarIcon, UserCheck, FileJson } from 'lucide-react';
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, Filter, User, Heart, AlertTriangle, XCircle, CheckCircle, Clock, Ban, Loader2, Circle, ArrowDownRight, ArrowUpRight, ChevronLeft, Wallet, CheckCircle2, StickyNote, FileUp, RotateCcw, Send, PlayCircle, UserPlus, ChevronsUpDown, CalendarIcon, UserCheck, FileJson } 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';
@@ -17,10 +17,10 @@ import { z } from 'zod';
17
17
  import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@radix-ui/react-collapsible';
18
18
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
19
19
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
20
- import * as LabelPrimitive from '@radix-ui/react-label';
21
20
  import { format } from 'date-fns';
22
21
  import { DayPicker } from 'react-day-picker';
23
22
  import * as PopoverPrimitive from '@radix-ui/react-popover';
23
+ import * as LabelPrimitive from '@radix-ui/react-label';
24
24
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
25
25
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
26
26
  import { useTheme } from 'next-themes';
@@ -3065,88 +3065,712 @@ function AppSidebar() {
3065
3065
  var MainLayout = ({ children }) => {
3066
3066
  return /* @__PURE__ */ jsx("div", { className: "flex min-h-screen w-full", children: /* @__PURE__ */ jsx("main", { className: "flex-1", children }) });
3067
3067
  };
3068
- var useEditState = ({ initialEditing = false, onToggleEdit, onSave, onCancel }) => {
3069
- const [localEditing, setLocalEditing] = useState(initialEditing);
3070
- const [isLoading, setIsLoading] = useState(false);
3071
- useEffect(() => {
3072
- setLocalEditing(initialEditing);
3073
- }, [initialEditing]);
3074
- const isEditing = onToggleEdit !== void 0 ? initialEditing : localEditing;
3075
- const handleToggleEdit = useCallback(() => {
3076
- if (onToggleEdit) {
3077
- onToggleEdit();
3078
- } else {
3079
- setLocalEditing((prev) => !prev);
3068
+ function Calendar({
3069
+ className,
3070
+ classNames,
3071
+ showOutsideDays = true,
3072
+ ...props
3073
+ }) {
3074
+ return /* @__PURE__ */ jsx(
3075
+ DayPicker,
3076
+ {
3077
+ showOutsideDays,
3078
+ className: cn("p-3 pointer-events-auto", className),
3079
+ classNames: {
3080
+ months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
3081
+ month: "space-y-4",
3082
+ caption: "flex justify-center pt-1 relative items-center",
3083
+ caption_label: "text-sm font-medium",
3084
+ nav: "space-x-1 flex items-center",
3085
+ button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
3086
+ button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
3087
+ month_grid: "w-full border-collapse space-y-1",
3088
+ weekdays: "flex",
3089
+ weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
3090
+ week: "flex w-full mt-2",
3091
+ day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
3092
+ day_button: cn(
3093
+ buttonVariants({ variant: "ghost" }),
3094
+ "h-9 w-9 p-0 font-normal"
3095
+ ),
3096
+ selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
3097
+ today: "bg-accent text-accent-foreground",
3098
+ outside: "text-muted-foreground opacity-50",
3099
+ disabled: "text-muted-foreground opacity-50",
3100
+ hidden: "invisible",
3101
+ ...classNames
3102
+ },
3103
+ ...props
3080
3104
  }
3081
- }, [onToggleEdit]);
3082
- const handleSave = useCallback(async () => {
3083
- setIsLoading(true);
3084
- try {
3085
- if (onSave) {
3086
- await onSave();
3105
+ );
3106
+ }
3107
+ Calendar.displayName = "Calendar";
3108
+ var Popover = PopoverPrimitive.Root;
3109
+ var PopoverTrigger = PopoverPrimitive.Trigger;
3110
+ var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
3111
+ PopoverPrimitive.Content,
3112
+ {
3113
+ ref,
3114
+ align,
3115
+ sideOffset,
3116
+ className: cn(
3117
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
3118
+ className
3119
+ ),
3120
+ ...props
3121
+ }
3122
+ ) }));
3123
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
3124
+ function DatePicker({
3125
+ date,
3126
+ onDateChange,
3127
+ placeholder = "Pick a date",
3128
+ disabled = false,
3129
+ className,
3130
+ buttonClassName,
3131
+ calendarClassName,
3132
+ align = "start",
3133
+ disabledDates,
3134
+ label,
3135
+ wrapperClassName
3136
+ }) {
3137
+ const [open, setOpen] = React15.useState(false);
3138
+ const handleSelect = (selectedDate) => {
3139
+ onDateChange?.(selectedDate);
3140
+ setOpen(false);
3141
+ };
3142
+ const picker = /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
3143
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
3144
+ Button,
3145
+ {
3146
+ variant: "outline",
3147
+ disabled,
3148
+ className: cn(
3149
+ "justify-start text-left font-normal",
3150
+ !date && "text-muted-foreground",
3151
+ buttonClassName
3152
+ ),
3153
+ children: [
3154
+ /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
3155
+ date ? format(date, "MM/dd/yyyy") : placeholder
3156
+ ]
3087
3157
  }
3088
- if (onToggleEdit) {
3089
- onToggleEdit();
3090
- } else {
3091
- setLocalEditing(false);
3158
+ ) }),
3159
+ /* @__PURE__ */ jsx(PopoverContent, { className: cn("w-auto p-0", className), align, children: /* @__PURE__ */ jsx(
3160
+ Calendar,
3161
+ {
3162
+ mode: "single",
3163
+ selected: date,
3164
+ onSelect: handleSelect,
3165
+ disabled: disabledDates,
3166
+ initialFocus: true,
3167
+ className: cn("pointer-events-auto", calendarClassName)
3092
3168
  }
3093
- } catch (error) {
3094
- console.error("Save error:", error);
3095
- } finally {
3096
- setIsLoading(false);
3097
- }
3098
- }, [onSave, onToggleEdit]);
3099
- const handleCancel = useCallback(() => {
3100
- if (onCancel) {
3101
- onCancel();
3102
- }
3103
- if (onToggleEdit) {
3104
- onToggleEdit();
3105
- } else {
3106
- setLocalEditing(false);
3107
- }
3108
- }, [onCancel, onToggleEdit]);
3109
- return {
3110
- isEditing,
3111
- isLoading,
3112
- handleToggleEdit,
3113
- handleSave,
3114
- handleCancel
3169
+ ) })
3170
+ ] });
3171
+ if (label) {
3172
+ return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", wrapperClassName), children: [
3173
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
3174
+ picker
3175
+ ] });
3176
+ }
3177
+ return picker;
3178
+ }
3179
+ var BusinessFiltersSheet = ({
3180
+ filters,
3181
+ onFilterChange,
3182
+ onResetFilters
3183
+ }) => {
3184
+ return /* @__PURE__ */ jsxs(Sheet, { children: [
3185
+ /* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "gap-2", children: [
3186
+ /* @__PURE__ */ jsx(Filter, { className: "h-4 w-4" }),
3187
+ "Filters"
3188
+ ] }) }),
3189
+ /* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
3190
+ /* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Business Filters" }) }),
3191
+ /* @__PURE__ */ jsxs("div", { className: "space-y-6 py-6", children: [
3192
+ /* @__PURE__ */ jsx(
3193
+ EnhancedInput,
3194
+ {
3195
+ label: "Name",
3196
+ value: filters.name,
3197
+ onChange: (e) => onFilterChange("name", e.target.value),
3198
+ placeholder: "Enter business name"
3199
+ }
3200
+ ),
3201
+ /* @__PURE__ */ jsx(
3202
+ EnhancedInput,
3203
+ {
3204
+ label: "Product Name",
3205
+ value: filters.productName,
3206
+ onChange: (e) => onFilterChange("productName", e.target.value),
3207
+ placeholder: "Enter product name"
3208
+ }
3209
+ ),
3210
+ /* @__PURE__ */ jsx(
3211
+ EnhancedSelect,
3212
+ {
3213
+ label: "Status",
3214
+ value: filters.status,
3215
+ onValueChange: (value) => onFilterChange("status", value),
3216
+ placeholder: "Select status",
3217
+ options: [
3218
+ { value: "active", label: "Active" },
3219
+ { value: "inactive", label: "Inactive" },
3220
+ { value: "suspended", label: "Suspended" }
3221
+ ]
3222
+ }
3223
+ ),
3224
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
3225
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
3226
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
3227
+ /* @__PURE__ */ jsx(
3228
+ DatePicker,
3229
+ {
3230
+ date: filters.createdDateStart,
3231
+ onDateChange: (date) => onFilterChange("createdDateStart", date),
3232
+ placeholder: "MM/DD/YYYY",
3233
+ buttonClassName: "w-full",
3234
+ className: "bg-background z-50"
3235
+ }
3236
+ )
3237
+ ] }),
3238
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
3239
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
3240
+ /* @__PURE__ */ jsx(
3241
+ DatePicker,
3242
+ {
3243
+ date: filters.createdDateEnd,
3244
+ onDateChange: (date) => onFilterChange("createdDateEnd", date),
3245
+ placeholder: "MM/DD/YYYY",
3246
+ buttonClassName: "w-full",
3247
+ className: "bg-background z-50"
3248
+ }
3249
+ )
3250
+ ] })
3251
+ ] })
3252
+ ] }),
3253
+ /* @__PURE__ */ jsxs(SheetFooter, { className: "gap-2", children: [
3254
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: onResetFilters, children: "Reset Filters" }),
3255
+ /* @__PURE__ */ jsx(Button, { onClick: () => {
3256
+ }, children: "Apply Filters" })
3257
+ ] })
3258
+ ] })
3259
+ ] });
3260
+ };
3261
+ var maxWidthClasses = {
3262
+ sm: "max-w-2xl",
3263
+ md: "max-w-4xl",
3264
+ lg: "max-w-6xl",
3265
+ xl: "max-w-7xl",
3266
+ "2xl": "max-w-screen-2xl",
3267
+ full: "max-w-none"
3268
+ };
3269
+ var getGridClasses = (gridCols, responsive) => {
3270
+ const colsMap = {
3271
+ 1: "grid-cols-1",
3272
+ 2: "grid-cols-2",
3273
+ 3: "grid-cols-3",
3274
+ 4: "grid-cols-4"
3115
3275
  };
3276
+ if (!responsive) {
3277
+ return colsMap[gridCols] || "grid-cols-1";
3278
+ }
3279
+ switch (gridCols) {
3280
+ case 1:
3281
+ return "grid-cols-1";
3282
+ case 2:
3283
+ return "grid-cols-1 lg:grid-cols-2";
3284
+ case 3:
3285
+ return "grid-cols-1 md:grid-cols-2 lg:grid-cols-3";
3286
+ case 4:
3287
+ return "grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4";
3288
+ default:
3289
+ return "grid-cols-1 lg:grid-cols-2";
3290
+ }
3116
3291
  };
3117
- var EditableFormCard = React15.forwardRef(
3292
+ var PageLayout = React15.forwardRef(
3118
3293
  ({
3119
3294
  title,
3120
3295
  description,
3121
- editContent,
3122
- viewContent,
3123
- isEditing,
3124
- onToggleEdit,
3125
- hideActions = false,
3126
- onSave,
3127
- onCancel,
3296
+ children,
3297
+ actions = [],
3298
+ cards = [],
3299
+ mode = "simple",
3300
+ maxWidth = "xl",
3301
+ gridCols = 2,
3302
+ responsive = true,
3128
3303
  className,
3129
- variant = "subtle",
3130
- isFormValid = true,
3131
- isDirty = false,
3132
- isSubmitting = false,
3133
- ...props
3304
+ headerContent
3134
3305
  }, ref) => {
3135
- const { isEditing: currentlyEditing, handleToggleEdit, handleCancel } = useEditState({
3136
- initialEditing: isEditing ?? false,
3137
- onToggleEdit
3138
- });
3139
- const handleSaveAction = async () => {
3140
- if (onSave) {
3141
- await onSave();
3142
- }
3143
- };
3144
- const handleCancelAction = () => {
3145
- if (onCancel) {
3146
- onCancel();
3147
- } else {
3148
- handleCancel();
3149
- }
3306
+ const [editingCards, setEditingCards] = React15.useState(/* @__PURE__ */ new Set());
3307
+ const toggleEdit = (cardKey) => {
3308
+ setEditingCards((prev) => {
3309
+ const next = new Set(prev);
3310
+ if (next.has(cardKey)) {
3311
+ next.delete(cardKey);
3312
+ } else {
3313
+ next.add(cardKey);
3314
+ }
3315
+ return next;
3316
+ });
3317
+ };
3318
+ return /* @__PURE__ */ jsxs("div", { ref, className: "flex flex-col h-screen bg-gradient-subtle", children: [
3319
+ /* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: cn(
3320
+ "container mx-auto px-4 py-6",
3321
+ maxWidthClasses[maxWidth]
3322
+ ), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
3323
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-h-[2.5rem]", children: [
3324
+ /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: title }),
3325
+ description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description })
3326
+ ] }),
3327
+ headerContent && /* @__PURE__ */ jsx("div", { className: "flex items-center", children: headerContent }),
3328
+ actions.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: actions.map((action, index) => {
3329
+ const Icon2 = action.icon;
3330
+ return /* @__PURE__ */ jsxs(
3331
+ "button",
3332
+ {
3333
+ onClick: action.onClick,
3334
+ className: cn(
3335
+ "inline-flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-colors",
3336
+ {
3337
+ "bg-primary text-primary-foreground hover:bg-primary/90": action.variant === "default" || !action.variant,
3338
+ "bg-secondary text-secondary-foreground hover:bg-secondary/80": action.variant === "secondary",
3339
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90": action.variant === "destructive",
3340
+ "border border-input bg-background hover:bg-accent hover:text-accent-foreground": action.variant === "outline",
3341
+ "hover:bg-accent hover:text-accent-foreground": action.variant === "ghost"
3342
+ }
3343
+ ),
3344
+ children: [
3345
+ Icon2 && /* @__PURE__ */ jsx(Icon2, { className: "h-4 w-4" }),
3346
+ action.label
3347
+ ]
3348
+ },
3349
+ index
3350
+ );
3351
+ }) })
3352
+ ] }) }) }),
3353
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: cn(
3354
+ "container mx-auto px-4 py-6",
3355
+ maxWidthClasses[maxWidth],
3356
+ className
3357
+ ), children: mode === "cards" && cards.length > 0 ? /* @__PURE__ */ jsx("div", { className: cn("grid gap-6", getGridClasses(gridCols, responsive)), children: cards.map((card) => {
3358
+ const isEditing = editingCards.has(card.key);
3359
+ const shouldExpand = card.expandOnEdit && isEditing;
3360
+ return /* @__PURE__ */ jsx(
3361
+ "div",
3362
+ {
3363
+ className: cn(
3364
+ "transition-all duration-300",
3365
+ shouldExpand && (gridCols > 1 ? "col-span-full" : "")
3366
+ ),
3367
+ children: /* @__PURE__ */ jsx(
3368
+ card.component,
3369
+ {
3370
+ ...card.props,
3371
+ isEditing,
3372
+ onToggleEdit: () => toggleEdit(card.key)
3373
+ }
3374
+ )
3375
+ },
3376
+ card.key
3377
+ );
3378
+ }) }) : children }) })
3379
+ ] });
3380
+ }
3381
+ );
3382
+ PageLayout.displayName = "PageLayout";
3383
+ var typeConfig = {
3384
+ corporation: {
3385
+ variant: "corporation",
3386
+ label: "Corporation",
3387
+ icon: Building
3388
+ },
3389
+ llc: {
3390
+ variant: "llc",
3391
+ label: "LLC",
3392
+ icon: Briefcase
3393
+ },
3394
+ partnership: {
3395
+ variant: "partnership",
3396
+ label: "Partnership",
3397
+ icon: Users
3398
+ },
3399
+ sole_proprietorship: {
3400
+ variant: "sole_proprietorship",
3401
+ label: "Sole Proprietorship",
3402
+ icon: User
3403
+ }
3404
+ };
3405
+ var BusinessTypeBadge = ({ type, className }) => {
3406
+ const config = typeConfig[type];
3407
+ const Icon2 = config.icon;
3408
+ return /* @__PURE__ */ jsxs(Badge, { variant: config.variant, className, children: [
3409
+ /* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
3410
+ config.label
3411
+ ] });
3412
+ };
3413
+ var BusinessForm = ({
3414
+ form,
3415
+ businessType,
3416
+ onBusinessTypeChange,
3417
+ onSubmit
3418
+ }) => {
3419
+ return /* @__PURE__ */ jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
3420
+ /* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
3421
+ /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Information" }) }),
3422
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
3423
+ /* @__PURE__ */ jsx(
3424
+ EnhancedInput,
3425
+ {
3426
+ label: "Legal Name",
3427
+ placeholder: "Enter legal business name",
3428
+ required: true,
3429
+ ...form.register("legalName")
3430
+ }
3431
+ ),
3432
+ /* @__PURE__ */ jsx(
3433
+ EnhancedInput,
3434
+ {
3435
+ label: "DBA Name",
3436
+ placeholder: "Enter DBA name",
3437
+ hint: "Doing Business As name",
3438
+ ...form.register("dbaName")
3439
+ }
3440
+ ),
3441
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
3442
+ /* @__PURE__ */ jsx(
3443
+ EnhancedSelect,
3444
+ {
3445
+ label: "Business Type",
3446
+ placeholder: "Select business type",
3447
+ value: businessType,
3448
+ onValueChange: onBusinessTypeChange,
3449
+ options: [
3450
+ { value: "corporation", label: "Corporation" },
3451
+ { value: "llc", label: "LLC" },
3452
+ { value: "partnership", label: "Partnership" },
3453
+ { value: "sole_proprietorship", label: "Sole Proprietorship" }
3454
+ ]
3455
+ }
3456
+ ),
3457
+ businessType && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
3458
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Preview:" }),
3459
+ /* @__PURE__ */ jsx(BusinessTypeBadge, { type: businessType })
3460
+ ] })
3461
+ ] }),
3462
+ /* @__PURE__ */ jsx(
3463
+ EnhancedInput,
3464
+ {
3465
+ label: "Tax ID (EIN)",
3466
+ placeholder: "12-3456789",
3467
+ hint: "Employer Identification Number",
3468
+ required: true,
3469
+ ...form.register("taxId")
3470
+ }
3471
+ ),
3472
+ /* @__PURE__ */ jsx(
3473
+ EnhancedInput,
3474
+ {
3475
+ label: "Formation Date",
3476
+ placeholder: "YYYY-MM-DD",
3477
+ type: "date",
3478
+ ...form.register("formationDate")
3479
+ }
3480
+ ),
3481
+ /* @__PURE__ */ jsx(
3482
+ EnhancedInput,
3483
+ {
3484
+ label: "Incorporation State",
3485
+ placeholder: "Enter state",
3486
+ ...form.register("incorporationState")
3487
+ }
3488
+ ),
3489
+ /* @__PURE__ */ jsx(
3490
+ EnhancedInput,
3491
+ {
3492
+ label: "Website",
3493
+ placeholder: "https://www.business.com",
3494
+ type: "url",
3495
+ ...form.register("website")
3496
+ }
3497
+ ),
3498
+ /* @__PURE__ */ jsx(
3499
+ EnhancedInput,
3500
+ {
3501
+ label: "Email Address",
3502
+ placeholder: "contact@business.com",
3503
+ type: "email",
3504
+ ...form.register("email")
3505
+ }
3506
+ ),
3507
+ /* @__PURE__ */ jsx(
3508
+ EnhancedInput,
3509
+ {
3510
+ label: "Mobile Phone",
3511
+ placeholder: "+1 (555) 123-4567",
3512
+ ...form.register("mobilePhone")
3513
+ }
3514
+ ),
3515
+ /* @__PURE__ */ jsx(
3516
+ EnhancedInput,
3517
+ {
3518
+ label: "MCC",
3519
+ placeholder: "1234",
3520
+ hint: "4-digit Merchant Category Code",
3521
+ ...form.register("mcc")
3522
+ }
3523
+ ),
3524
+ /* @__PURE__ */ jsx(
3525
+ EnhancedInput,
3526
+ {
3527
+ label: "NAICS",
3528
+ placeholder: "123456",
3529
+ hint: "6-digit industry classification",
3530
+ ...form.register("naics")
3531
+ }
3532
+ ),
3533
+ /* @__PURE__ */ jsx(
3534
+ EnhancedInput,
3535
+ {
3536
+ label: "ACH Company ID",
3537
+ placeholder: "1234567890",
3538
+ hint: "10-digit ACH identifier",
3539
+ ...form.register("achCompanyId")
3540
+ }
3541
+ ),
3542
+ /* @__PURE__ */ jsx(
3543
+ EnhancedInput,
3544
+ {
3545
+ label: "ACH Company Name",
3546
+ placeholder: "Enter ACH company name",
3547
+ ...form.register("achCompanyName")
3548
+ }
3549
+ ),
3550
+ /* @__PURE__ */ jsx(
3551
+ EnhancedInput,
3552
+ {
3553
+ label: "External ID",
3554
+ placeholder: "UUID format",
3555
+ hint: "External system identifier",
3556
+ ...form.register("externalId")
3557
+ }
3558
+ )
3559
+ ] })
3560
+ ] }),
3561
+ /* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
3562
+ /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Address" }) }),
3563
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
3564
+ /* @__PURE__ */ jsx(
3565
+ EnhancedInput,
3566
+ {
3567
+ label: "Street Address",
3568
+ placeholder: "Enter street address",
3569
+ required: true,
3570
+ ...form.register("address.streetAddress")
3571
+ }
3572
+ ),
3573
+ /* @__PURE__ */ jsx(
3574
+ EnhancedInput,
3575
+ {
3576
+ label: "Apartment/Suite",
3577
+ placeholder: "Enter apartment or suite number",
3578
+ ...form.register("address.apartment")
3579
+ }
3580
+ ),
3581
+ /* @__PURE__ */ jsx(
3582
+ EnhancedInput,
3583
+ {
3584
+ label: "City",
3585
+ placeholder: "Enter city",
3586
+ required: true,
3587
+ ...form.register("address.city")
3588
+ }
3589
+ ),
3590
+ /* @__PURE__ */ jsx(
3591
+ EnhancedInput,
3592
+ {
3593
+ label: "State",
3594
+ placeholder: "Enter state",
3595
+ required: true,
3596
+ ...form.register("address.state")
3597
+ }
3598
+ ),
3599
+ /* @__PURE__ */ jsx(
3600
+ EnhancedInput,
3601
+ {
3602
+ label: "Postal Code",
3603
+ placeholder: "12345",
3604
+ required: true,
3605
+ ...form.register("address.postalCode")
3606
+ }
3607
+ ),
3608
+ /* @__PURE__ */ jsx(
3609
+ EnhancedSelect,
3610
+ {
3611
+ label: "Country",
3612
+ placeholder: "Select country",
3613
+ value: form.watch("address.country"),
3614
+ onValueChange: (value) => form.setValue("address.country", value),
3615
+ options: [
3616
+ { value: "US", label: "United States" },
3617
+ { value: "CA", label: "Canada" },
3618
+ { value: "GB", label: "United Kingdom" },
3619
+ { value: "DE", label: "Germany" }
3620
+ ]
3621
+ }
3622
+ )
3623
+ ] })
3624
+ ] }),
3625
+ /* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
3626
+ /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Contact Information" }) }),
3627
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
3628
+ /* @__PURE__ */ jsx(
3629
+ EnhancedInput,
3630
+ {
3631
+ label: "Contact First Name",
3632
+ placeholder: "Enter first name",
3633
+ ...form.register("contactFirstName")
3634
+ }
3635
+ ),
3636
+ /* @__PURE__ */ jsx(
3637
+ EnhancedInput,
3638
+ {
3639
+ label: "Contact Last Name",
3640
+ placeholder: "Enter last name",
3641
+ ...form.register("contactLastName")
3642
+ }
3643
+ ),
3644
+ /* @__PURE__ */ jsx(
3645
+ EnhancedInput,
3646
+ {
3647
+ label: "Contact Email",
3648
+ placeholder: "contact@business.com",
3649
+ type: "email",
3650
+ ...form.register("contactEmail")
3651
+ }
3652
+ ),
3653
+ /* @__PURE__ */ jsx(
3654
+ EnhancedInput,
3655
+ {
3656
+ label: "Contact Phone",
3657
+ placeholder: "+1 (555) 123-4567",
3658
+ ...form.register("contactPhone")
3659
+ }
3660
+ )
3661
+ ] })
3662
+ ] })
3663
+ ] });
3664
+ };
3665
+ var CreateBusinessView = ({
3666
+ form,
3667
+ businessType,
3668
+ onBusinessTypeChange,
3669
+ onSubmit,
3670
+ onCancel
3671
+ }) => {
3672
+ return /* @__PURE__ */ jsx(
3673
+ PageLayout,
3674
+ {
3675
+ title: "Create Business",
3676
+ actions: [
3677
+ { label: "Cancel", variant: "outline", onClick: onCancel },
3678
+ { label: "Create Business", variant: "default", onClick: form.handleSubmit(onSubmit) }
3679
+ ],
3680
+ children: /* @__PURE__ */ jsx(
3681
+ BusinessForm,
3682
+ {
3683
+ form,
3684
+ businessType,
3685
+ onBusinessTypeChange,
3686
+ onSubmit
3687
+ }
3688
+ )
3689
+ }
3690
+ );
3691
+ };
3692
+ var useEditState = ({ initialEditing = false, onToggleEdit, onSave, onCancel }) => {
3693
+ const [localEditing, setLocalEditing] = useState(initialEditing);
3694
+ const [isLoading, setIsLoading] = useState(false);
3695
+ useEffect(() => {
3696
+ setLocalEditing(initialEditing);
3697
+ }, [initialEditing]);
3698
+ const isEditing = onToggleEdit !== void 0 ? initialEditing : localEditing;
3699
+ const handleToggleEdit = useCallback(() => {
3700
+ if (onToggleEdit) {
3701
+ onToggleEdit();
3702
+ } else {
3703
+ setLocalEditing((prev) => !prev);
3704
+ }
3705
+ }, [onToggleEdit]);
3706
+ const handleSave = useCallback(async () => {
3707
+ setIsLoading(true);
3708
+ try {
3709
+ if (onSave) {
3710
+ await onSave();
3711
+ }
3712
+ if (onToggleEdit) {
3713
+ onToggleEdit();
3714
+ } else {
3715
+ setLocalEditing(false);
3716
+ }
3717
+ } catch (error) {
3718
+ console.error("Save error:", error);
3719
+ } finally {
3720
+ setIsLoading(false);
3721
+ }
3722
+ }, [onSave, onToggleEdit]);
3723
+ const handleCancel = useCallback(() => {
3724
+ if (onCancel) {
3725
+ onCancel();
3726
+ }
3727
+ if (onToggleEdit) {
3728
+ onToggleEdit();
3729
+ } else {
3730
+ setLocalEditing(false);
3731
+ }
3732
+ }, [onCancel, onToggleEdit]);
3733
+ return {
3734
+ isEditing,
3735
+ isLoading,
3736
+ handleToggleEdit,
3737
+ handleSave,
3738
+ handleCancel
3739
+ };
3740
+ };
3741
+ var EditableFormCard = React15.forwardRef(
3742
+ ({
3743
+ title,
3744
+ description,
3745
+ editContent,
3746
+ viewContent,
3747
+ isEditing,
3748
+ onToggleEdit,
3749
+ hideActions = false,
3750
+ onSave,
3751
+ onCancel,
3752
+ className,
3753
+ variant = "subtle",
3754
+ isFormValid = true,
3755
+ isDirty = false,
3756
+ isSubmitting = false,
3757
+ ...props
3758
+ }, ref) => {
3759
+ const { isEditing: currentlyEditing, handleToggleEdit, handleCancel } = useEditState({
3760
+ initialEditing: isEditing ?? false,
3761
+ onToggleEdit
3762
+ });
3763
+ const handleSaveAction = async () => {
3764
+ if (onSave) {
3765
+ await onSave();
3766
+ }
3767
+ };
3768
+ const handleCancelAction = () => {
3769
+ if (onCancel) {
3770
+ onCancel();
3771
+ } else {
3772
+ handleCancel();
3773
+ }
3150
3774
  };
3151
3775
  return /* @__PURE__ */ jsx(
3152
3776
  FormCard,
@@ -3723,7 +4347,7 @@ var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
3723
4347
  }
3724
4348
  );
3725
4349
  };
3726
- var typeConfig = {
4350
+ var typeConfig2 = {
3727
4351
  BUSINESS: {
3728
4352
  variant: "business",
3729
4353
  label: "Business",
@@ -3746,7 +4370,7 @@ var typeConfig = {
3746
4370
  }
3747
4371
  };
3748
4372
  var CounterpartyTypeBadge = ({ type, className }) => {
3749
- const config = typeConfig[type];
4373
+ const config = typeConfig2[type];
3750
4374
  if (!config) {
3751
4375
  return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className, children: [
3752
4376
  /* @__PURE__ */ jsx(Building2, { className: "w-3 h-3 mr-1" }),
@@ -4077,7 +4701,7 @@ var columnClasses = {
4077
4701
  4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
4078
4702
  };
4079
4703
  var DataGrid = React15.forwardRef(
4080
- ({ data, columns: columns2 = 2, gap = "md", className }, ref) => {
4704
+ ({ data, columns: columns3 = 2, gap = "md", className }, ref) => {
4081
4705
  const isItemArray = data.length > 0 && "label" in data[0];
4082
4706
  if (isItemArray) {
4083
4707
  const items = data;
@@ -4087,7 +4711,7 @@ var DataGrid = React15.forwardRef(
4087
4711
  ref,
4088
4712
  className: cn(
4089
4713
  "grid",
4090
- columnClasses[columns2],
4714
+ columnClasses[columns3],
4091
4715
  gapClasses2[gap],
4092
4716
  className
4093
4717
  ),
@@ -4108,7 +4732,7 @@ var DataGrid = React15.forwardRef(
4108
4732
  section.title && /* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: section.title }),
4109
4733
  /* @__PURE__ */ jsx("div", { className: cn(
4110
4734
  "grid",
4111
- columnClasses[columns2],
4735
+ columnClasses[columns3],
4112
4736
  gapClasses2[gap]
4113
4737
  ), children: section.items.map((item, itemIndex) => /* @__PURE__ */ jsx(
4114
4738
  InfoField,
@@ -4853,7 +5477,7 @@ var FormSection = React15.forwardRef(
4853
5477
  className,
4854
5478
  spacing: spacing2 = "md",
4855
5479
  layout = "vertical",
4856
- columns: columns2 = 2
5480
+ columns: columns3 = 2
4857
5481
  }, ref) => {
4858
5482
  return /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-4", className), children: [
4859
5483
  (title || description) && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
@@ -4861,7 +5485,7 @@ var FormSection = React15.forwardRef(
4861
5485
  description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
4862
5486
  ] }),
4863
5487
  /* @__PURE__ */ jsx("div", { className: cn(
4864
- layout === "grid" ? `grid gap-4 ${gridClasses[columns2]}` : spacingClasses[spacing2]
5488
+ layout === "grid" ? `grid gap-4 ${gridClasses[columns3]}` : spacingClasses[spacing2]
4865
5489
  ), children })
4866
5490
  ] });
4867
5491
  }
@@ -5631,216 +6255,105 @@ var mockPrograms = [
5631
6255
  { value: "PROG-0094", label: "Premium Rewards Program 6" },
5632
6256
  { value: "PROG-00104", label: "Consumer Banking Program" },
5633
6257
  { value: "PROG-00114", label: "Business Banking Program" },
5634
- { value: "PROG-00134", label: "Premium Rewards Program" },
5635
- { value: "PROG-00414", label: "Premium Rewards Program 1" },
5636
- { value: "PROG-00514", label: "Premium Rewards Program 2" },
5637
- { value: "PROG-00614", label: "Premium Rewards Program 3" },
5638
- { value: "PROG-00714", label: "Premium Rewards Program 4" },
5639
- { value: "PROG-00814", label: "Premium Rewards Program 5" },
5640
- { value: "PROG-00914", label: "Premium Rewards Program 6" }
5641
- ];
5642
- var mockProducts = [
5643
- { value: "PROD-001", label: "Checking Account" },
5644
- { value: "PROD-002", label: "Savings Account" },
5645
- { value: "PROD-003", label: "Money Market Account" },
5646
- { value: "PROD-004", label: "Business Checking" }
5647
- ];
5648
- var StatementHeader = ({ data, onEdit }) => {
5649
- const hasValue = (value) => {
5650
- if (value === void 0 || value === null) return false;
5651
- if (typeof value === "string" && value.trim() === "") return false;
5652
- return true;
5653
- };
5654
- const balanceChange = data.startingBalance && data.endingBalance ? calculateBalanceChange(data.startingBalance, data.endingBalance) : null;
5655
- return /* @__PURE__ */ jsxs(Card, { children: [
5656
- /* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
5657
- /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Summary" }),
5658
- /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onEdit, children: [
5659
- /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4 mr-2" }),
5660
- "Edit"
5661
- ] })
5662
- ] }),
5663
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
5664
- hasValue(data.account) && /* @__PURE__ */ jsx(
5665
- InfoField,
5666
- {
5667
- label: "Account",
5668
- value: data.account,
5669
- layout: "horizontal"
5670
- }
5671
- ),
5672
- hasValue(data.productId) && /* @__PURE__ */ jsx(
5673
- InfoField,
5674
- {
5675
- label: "Product ID",
5676
- value: data.productId,
5677
- layout: "horizontal"
5678
- }
5679
- ),
5680
- hasValue(data.programId) && /* @__PURE__ */ jsx(
5681
- InfoField,
5682
- {
5683
- label: "Program ID",
5684
- value: data.programId,
5685
- layout: "horizontal"
5686
- }
5687
- ),
5688
- hasValue(data.startDate) && /* @__PURE__ */ jsx(
5689
- InfoField,
5690
- {
5691
- label: "Start Date",
5692
- value: data.startDate,
5693
- layout: "horizontal"
5694
- }
5695
- ),
5696
- hasValue(data.endDate) && /* @__PURE__ */ jsx(
5697
- InfoField,
5698
- {
5699
- label: "End Date",
5700
- value: data.endDate,
5701
- layout: "horizontal"
5702
- }
5703
- ),
5704
- hasValue(data.startingBalance) && /* @__PURE__ */ jsx(
5705
- InfoField,
5706
- {
5707
- label: "Starting Balance",
5708
- value: data.startingBalance,
5709
- layout: "horizontal"
5710
- }
5711
- ),
5712
- hasValue(data.endingBalance) && /* @__PURE__ */ jsx(
5713
- InfoField,
5714
- {
5715
- label: "Ending Balance",
5716
- value: data.endingBalance,
5717
- layout: "horizontal"
5718
- }
5719
- ),
5720
- balanceChange && /* @__PURE__ */ jsx(
5721
- InfoField,
5722
- {
5723
- label: "Balance Change",
5724
- value: /* @__PURE__ */ jsx("span", { className: balanceChange.isPositive ? "text-green-600 font-medium" : "text-red-600 font-medium", children: balanceChange.formatted }),
5725
- layout: "horizontal"
5726
- }
5727
- )
5728
- ] }) })
5729
- ] });
5730
- };
5731
- function Calendar({
5732
- className,
5733
- classNames,
5734
- showOutsideDays = true,
5735
- ...props
5736
- }) {
5737
- return /* @__PURE__ */ jsx(
5738
- DayPicker,
5739
- {
5740
- showOutsideDays,
5741
- className: cn("p-3 pointer-events-auto", className),
5742
- classNames: {
5743
- months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
5744
- month: "space-y-4",
5745
- caption: "flex justify-center pt-1 relative items-center",
5746
- caption_label: "text-sm font-medium",
5747
- nav: "space-x-1 flex items-center",
5748
- button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
5749
- button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
5750
- month_grid: "w-full border-collapse space-y-1",
5751
- weekdays: "flex",
5752
- weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
5753
- week: "flex w-full mt-2",
5754
- day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
5755
- day_button: cn(
5756
- buttonVariants({ variant: "ghost" }),
5757
- "h-9 w-9 p-0 font-normal"
5758
- ),
5759
- selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
5760
- today: "bg-accent text-accent-foreground",
5761
- outside: "text-muted-foreground opacity-50",
5762
- disabled: "text-muted-foreground opacity-50",
5763
- hidden: "invisible",
5764
- ...classNames
5765
- },
5766
- ...props
5767
- }
5768
- );
5769
- }
5770
- Calendar.displayName = "Calendar";
5771
- var Popover = PopoverPrimitive.Root;
5772
- var PopoverTrigger = PopoverPrimitive.Trigger;
5773
- var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
5774
- PopoverPrimitive.Content,
5775
- {
5776
- ref,
5777
- align,
5778
- sideOffset,
5779
- className: cn(
5780
- "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
5781
- className
5782
- ),
5783
- ...props
5784
- }
5785
- ) }));
5786
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
5787
- function DatePicker({
5788
- date,
5789
- onDateChange,
5790
- placeholder = "Pick a date",
5791
- disabled = false,
5792
- className,
5793
- buttonClassName,
5794
- calendarClassName,
5795
- align = "start",
5796
- disabledDates,
5797
- label,
5798
- wrapperClassName
5799
- }) {
5800
- const [open, setOpen] = React15.useState(false);
5801
- const handleSelect = (selectedDate) => {
5802
- onDateChange?.(selectedDate);
5803
- setOpen(false);
5804
- };
5805
- const picker = /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
5806
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
5807
- Button,
5808
- {
5809
- variant: "outline",
5810
- disabled,
5811
- className: cn(
5812
- "justify-start text-left font-normal",
5813
- !date && "text-muted-foreground",
5814
- buttonClassName
5815
- ),
5816
- children: [
5817
- /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
5818
- date ? format(date, "MM/dd/yyyy") : placeholder
5819
- ]
5820
- }
5821
- ) }),
5822
- /* @__PURE__ */ jsx(PopoverContent, { className: cn("w-auto p-0", className), align, children: /* @__PURE__ */ jsx(
5823
- Calendar,
5824
- {
5825
- mode: "single",
5826
- selected: date,
5827
- onSelect: handleSelect,
5828
- disabled: disabledDates,
5829
- initialFocus: true,
5830
- className: cn("pointer-events-auto", calendarClassName)
5831
- }
5832
- ) })
6258
+ { value: "PROG-00134", label: "Premium Rewards Program" },
6259
+ { value: "PROG-00414", label: "Premium Rewards Program 1" },
6260
+ { value: "PROG-00514", label: "Premium Rewards Program 2" },
6261
+ { value: "PROG-00614", label: "Premium Rewards Program 3" },
6262
+ { value: "PROG-00714", label: "Premium Rewards Program 4" },
6263
+ { value: "PROG-00814", label: "Premium Rewards Program 5" },
6264
+ { value: "PROG-00914", label: "Premium Rewards Program 6" }
6265
+ ];
6266
+ var mockProducts = [
6267
+ { value: "PROD-001", label: "Checking Account" },
6268
+ { value: "PROD-002", label: "Savings Account" },
6269
+ { value: "PROD-003", label: "Money Market Account" },
6270
+ { value: "PROD-004", label: "Business Checking" }
6271
+ ];
6272
+ var StatementHeader = ({ data, onEdit }) => {
6273
+ const hasValue = (value) => {
6274
+ if (value === void 0 || value === null) return false;
6275
+ if (typeof value === "string" && value.trim() === "") return false;
6276
+ return true;
6277
+ };
6278
+ const balanceChange = data.startingBalance && data.endingBalance ? calculateBalanceChange(data.startingBalance, data.endingBalance) : null;
6279
+ return /* @__PURE__ */ jsxs(Card, { children: [
6280
+ /* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
6281
+ /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Summary" }),
6282
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onEdit, children: [
6283
+ /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4 mr-2" }),
6284
+ "Edit"
6285
+ ] })
6286
+ ] }),
6287
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
6288
+ hasValue(data.account) && /* @__PURE__ */ jsx(
6289
+ InfoField,
6290
+ {
6291
+ label: "Account",
6292
+ value: data.account,
6293
+ layout: "horizontal"
6294
+ }
6295
+ ),
6296
+ hasValue(data.productId) && /* @__PURE__ */ jsx(
6297
+ InfoField,
6298
+ {
6299
+ label: "Product ID",
6300
+ value: data.productId,
6301
+ layout: "horizontal"
6302
+ }
6303
+ ),
6304
+ hasValue(data.programId) && /* @__PURE__ */ jsx(
6305
+ InfoField,
6306
+ {
6307
+ label: "Program ID",
6308
+ value: data.programId,
6309
+ layout: "horizontal"
6310
+ }
6311
+ ),
6312
+ hasValue(data.startDate) && /* @__PURE__ */ jsx(
6313
+ InfoField,
6314
+ {
6315
+ label: "Start Date",
6316
+ value: data.startDate,
6317
+ layout: "horizontal"
6318
+ }
6319
+ ),
6320
+ hasValue(data.endDate) && /* @__PURE__ */ jsx(
6321
+ InfoField,
6322
+ {
6323
+ label: "End Date",
6324
+ value: data.endDate,
6325
+ layout: "horizontal"
6326
+ }
6327
+ ),
6328
+ hasValue(data.startingBalance) && /* @__PURE__ */ jsx(
6329
+ InfoField,
6330
+ {
6331
+ label: "Starting Balance",
6332
+ value: data.startingBalance,
6333
+ layout: "horizontal"
6334
+ }
6335
+ ),
6336
+ hasValue(data.endingBalance) && /* @__PURE__ */ jsx(
6337
+ InfoField,
6338
+ {
6339
+ label: "Ending Balance",
6340
+ value: data.endingBalance,
6341
+ layout: "horizontal"
6342
+ }
6343
+ ),
6344
+ balanceChange && /* @__PURE__ */ jsx(
6345
+ InfoField,
6346
+ {
6347
+ label: "Balance Change",
6348
+ value: /* @__PURE__ */ jsx("span", { className: balanceChange.isPositive ? "text-green-600 font-medium" : "text-red-600 font-medium", children: balanceChange.formatted }),
6349
+ layout: "horizontal"
6350
+ }
6351
+ )
6352
+ ] }) })
5833
6353
  ] });
5834
- if (label) {
5835
- return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", wrapperClassName), children: [
5836
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
5837
- picker
5838
- ] });
5839
- }
5840
- return picker;
5841
- }
6354
+ };
5842
6355
  function DataTable({
5843
- columns: columns2,
6356
+ columns: columns3,
5844
6357
  data,
5845
6358
  sortBy,
5846
6359
  sortDirection,
@@ -5879,7 +6392,7 @@ function DataTable({
5879
6392
  return /* @__PURE__ */ jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsx("div", { className: "p-8 text-center", children: /* @__PURE__ */ jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) });
5880
6393
  }
5881
6394
  return /* @__PURE__ */ jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
5882
- /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "border-b bg-muted/50", children: columns2.map((column) => /* @__PURE__ */ jsx(
6395
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "border-b bg-muted/50", children: columns3.map((column) => /* @__PURE__ */ jsx(
5883
6396
  "th",
5884
6397
  {
5885
6398
  style: column.width ? { width: column.width } : void 0,
@@ -5904,7 +6417,7 @@ function DataTable({
5904
6417
  },
5905
6418
  column.key
5906
6419
  )) }) }),
5907
- /* @__PURE__ */ jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: columns2.length, className: "h-24 text-center text-muted-foreground", children: emptyMessage }) }) : data.map((row, index) => /* @__PURE__ */ jsx(
6420
+ /* @__PURE__ */ jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: columns3.length, className: "h-24 text-center text-muted-foreground", children: emptyMessage }) }) : data.map((row, index) => /* @__PURE__ */ jsx(
5908
6421
  "tr",
5909
6422
  {
5910
6423
  className: cn(
@@ -5912,7 +6425,7 @@ function DataTable({
5912
6425
  onRowClick && "cursor-pointer"
5913
6426
  ),
5914
6427
  onClick: () => onRowClick?.(row),
5915
- children: columns2.map((column) => /* @__PURE__ */ jsx(
6428
+ children: columns3.map((column) => /* @__PURE__ */ jsx(
5916
6429
  "td",
5917
6430
  {
5918
6431
  style: column.width ? { width: column.width } : void 0,
@@ -6315,36 +6828,6 @@ var AccountCard = React15.forwardRef(
6315
6828
  }
6316
6829
  );
6317
6830
  AccountCard.displayName = "AccountCard";
6318
- var typeConfig2 = {
6319
- corporation: {
6320
- variant: "corporation",
6321
- label: "Corporation",
6322
- icon: Building
6323
- },
6324
- llc: {
6325
- variant: "llc",
6326
- label: "LLC",
6327
- icon: Briefcase
6328
- },
6329
- partnership: {
6330
- variant: "partnership",
6331
- label: "Partnership",
6332
- icon: Users
6333
- },
6334
- sole_proprietorship: {
6335
- variant: "sole_proprietorship",
6336
- label: "Sole Proprietorship",
6337
- icon: User
6338
- }
6339
- };
6340
- var BusinessTypeBadge = ({ type, className }) => {
6341
- const config = typeConfig2[type];
6342
- const Icon2 = config.icon;
6343
- return /* @__PURE__ */ jsxs(Badge, { variant: config.variant, className, children: [
6344
- /* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
6345
- config.label
6346
- ] });
6347
- };
6348
6831
  var Checkbox = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6349
6832
  CheckboxPrimitive.Root,
6350
6833
  {
@@ -6362,130 +6845,8 @@ var Checkbox = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__
6362
6845
  }
6363
6846
  )
6364
6847
  }
6365
- ));
6366
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
6367
- var maxWidthClasses = {
6368
- sm: "max-w-2xl",
6369
- md: "max-w-4xl",
6370
- lg: "max-w-6xl",
6371
- xl: "max-w-7xl",
6372
- "2xl": "max-w-screen-2xl",
6373
- full: "max-w-none"
6374
- };
6375
- var getGridClasses = (gridCols, responsive) => {
6376
- const colsMap = {
6377
- 1: "grid-cols-1",
6378
- 2: "grid-cols-2",
6379
- 3: "grid-cols-3",
6380
- 4: "grid-cols-4"
6381
- };
6382
- if (!responsive) {
6383
- return colsMap[gridCols] || "grid-cols-1";
6384
- }
6385
- switch (gridCols) {
6386
- case 1:
6387
- return "grid-cols-1";
6388
- case 2:
6389
- return "grid-cols-1 lg:grid-cols-2";
6390
- case 3:
6391
- return "grid-cols-1 md:grid-cols-2 lg:grid-cols-3";
6392
- case 4:
6393
- return "grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4";
6394
- default:
6395
- return "grid-cols-1 lg:grid-cols-2";
6396
- }
6397
- };
6398
- var PageLayout = React15.forwardRef(
6399
- ({
6400
- title,
6401
- description,
6402
- children,
6403
- actions = [],
6404
- cards = [],
6405
- mode = "simple",
6406
- maxWidth = "xl",
6407
- gridCols = 2,
6408
- responsive = true,
6409
- className,
6410
- headerContent
6411
- }, ref) => {
6412
- const [editingCards, setEditingCards] = React15.useState(/* @__PURE__ */ new Set());
6413
- const toggleEdit = (cardKey) => {
6414
- setEditingCards((prev) => {
6415
- const next = new Set(prev);
6416
- if (next.has(cardKey)) {
6417
- next.delete(cardKey);
6418
- } else {
6419
- next.add(cardKey);
6420
- }
6421
- return next;
6422
- });
6423
- };
6424
- return /* @__PURE__ */ jsxs("div", { ref, className: "flex flex-col h-screen bg-gradient-subtle", children: [
6425
- /* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: cn(
6426
- "container mx-auto px-4 py-6",
6427
- maxWidthClasses[maxWidth]
6428
- ), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
6429
- /* @__PURE__ */ jsxs("div", { className: "flex-1 min-h-[2.5rem]", children: [
6430
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: title }),
6431
- description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description })
6432
- ] }),
6433
- headerContent && /* @__PURE__ */ jsx("div", { className: "flex items-center", children: headerContent }),
6434
- actions.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: actions.map((action, index) => {
6435
- const Icon2 = action.icon;
6436
- return /* @__PURE__ */ jsxs(
6437
- "button",
6438
- {
6439
- onClick: action.onClick,
6440
- className: cn(
6441
- "inline-flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-colors",
6442
- {
6443
- "bg-primary text-primary-foreground hover:bg-primary/90": action.variant === "default" || !action.variant,
6444
- "bg-secondary text-secondary-foreground hover:bg-secondary/80": action.variant === "secondary",
6445
- "bg-destructive text-destructive-foreground hover:bg-destructive/90": action.variant === "destructive",
6446
- "border border-input bg-background hover:bg-accent hover:text-accent-foreground": action.variant === "outline",
6447
- "hover:bg-accent hover:text-accent-foreground": action.variant === "ghost"
6448
- }
6449
- ),
6450
- children: [
6451
- Icon2 && /* @__PURE__ */ jsx(Icon2, { className: "h-4 w-4" }),
6452
- action.label
6453
- ]
6454
- },
6455
- index
6456
- );
6457
- }) })
6458
- ] }) }) }),
6459
- /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: cn(
6460
- "container mx-auto px-4 py-6",
6461
- maxWidthClasses[maxWidth],
6462
- className
6463
- ), children: mode === "cards" && cards.length > 0 ? /* @__PURE__ */ jsx("div", { className: cn("grid gap-6", getGridClasses(gridCols, responsive)), children: cards.map((card) => {
6464
- const isEditing = editingCards.has(card.key);
6465
- const shouldExpand = card.expandOnEdit && isEditing;
6466
- return /* @__PURE__ */ jsx(
6467
- "div",
6468
- {
6469
- className: cn(
6470
- "transition-all duration-300",
6471
- shouldExpand && (gridCols > 1 ? "col-span-full" : "")
6472
- ),
6473
- children: /* @__PURE__ */ jsx(
6474
- card.component,
6475
- {
6476
- ...card.props,
6477
- isEditing,
6478
- onToggleEdit: () => toggleEdit(card.key)
6479
- }
6480
- )
6481
- },
6482
- card.key
6483
- );
6484
- }) }) : children }) })
6485
- ] });
6486
- }
6487
- );
6488
- PageLayout.displayName = "PageLayout";
6848
+ ));
6849
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
6489
6850
  var DetailPageLayout = ({
6490
6851
  title,
6491
6852
  description,
@@ -7773,6 +8134,90 @@ var useAlertDetail = (id) => {
7773
8134
  handleResolveAlert
7774
8135
  };
7775
8136
  };
8137
+ var useBusinessFilters = ({ initialData }) => {
8138
+ const [filteredData, setFilteredData] = useState(initialData);
8139
+ const [filters, setFilters] = useState({
8140
+ name: "",
8141
+ productName: "",
8142
+ status: "",
8143
+ createdDateStart: void 0,
8144
+ createdDateEnd: void 0
8145
+ });
8146
+ const handleFilterChange = useCallback((field, value) => {
8147
+ setFilters((prev) => ({ ...prev, [field]: value }));
8148
+ }, []);
8149
+ const applyFilters = useCallback(() => {
8150
+ let filtered = initialData;
8151
+ if (filters.name) {
8152
+ filtered = filtered.filter(
8153
+ (business) => business.businessName.toLowerCase().includes(filters.name.toLowerCase())
8154
+ );
8155
+ }
8156
+ if (filters.productName) {
8157
+ filtered = filtered.filter(
8158
+ (business) => business.productName.toLowerCase().includes(filters.productName.toLowerCase())
8159
+ );
8160
+ }
8161
+ if (filters.status) {
8162
+ filtered = filtered.filter((business) => business.status === filters.status);
8163
+ }
8164
+ if (filters.createdDateStart) {
8165
+ filtered = filtered.filter(
8166
+ (business) => new Date(business.created) >= filters.createdDateStart
8167
+ );
8168
+ }
8169
+ if (filters.createdDateEnd) {
8170
+ filtered = filtered.filter(
8171
+ (business) => new Date(business.created) <= filters.createdDateEnd
8172
+ );
8173
+ }
8174
+ setFilteredData(filtered);
8175
+ }, [filters, initialData]);
8176
+ const resetFilters = useCallback(() => {
8177
+ setFilters({
8178
+ name: "",
8179
+ productName: "",
8180
+ status: "",
8181
+ createdDateStart: void 0,
8182
+ createdDateEnd: void 0
8183
+ });
8184
+ setFilteredData(initialData);
8185
+ }, [initialData]);
8186
+ return {
8187
+ filters,
8188
+ filteredData,
8189
+ handleFilterChange,
8190
+ applyFilters,
8191
+ resetFilters
8192
+ };
8193
+ };
8194
+ var useBusinessSort = ({ data }) => {
8195
+ const [sortBy, setSortBy] = useState("created");
8196
+ const [sortDirection, setSortDirection] = useState("desc");
8197
+ const handleSort = useCallback((key) => {
8198
+ if (sortBy === key) {
8199
+ setSortDirection((prev) => prev === "asc" ? "desc" : "asc");
8200
+ } else {
8201
+ setSortBy(key);
8202
+ setSortDirection("asc");
8203
+ }
8204
+ }, [sortBy]);
8205
+ const sortedData = useMemo(() => {
8206
+ return [...data].sort((a, b) => {
8207
+ const aValue = a[sortBy];
8208
+ const bValue = b[sortBy];
8209
+ if (aValue < bValue) return sortDirection === "asc" ? -1 : 1;
8210
+ if (aValue > bValue) return sortDirection === "asc" ? 1 : -1;
8211
+ return 0;
8212
+ });
8213
+ }, [data, sortBy, sortDirection]);
8214
+ return {
8215
+ sortBy,
8216
+ sortDirection,
8217
+ sortedData,
8218
+ handleSort
8219
+ };
8220
+ };
7776
8221
  var AlertDetail = () => {
7777
8222
  const { id } = useParams();
7778
8223
  const navigate = useNavigate();
@@ -8196,237 +8641,194 @@ var mockBusinessesList = [
8196
8641
  id: "8110892",
8197
8642
  businessName: "Tech Solutions Corp",
8198
8643
  productName: "Digital Finance Inc FBO Tech Solutions",
8199
- cipStatus: "IN_REVIEW",
8200
- status: "PENDING_APPROVAL",
8201
- type: "Business",
8202
- subType: "Customer",
8203
- isDeveloperInitiated: false,
8204
- provider: "Alloy",
8205
- result: 'vendor:KYC_VENDOR status:in_progress data:"kyc_id:\\"kyc-345\\" business_id:\\"biz-678\\" initiated:{seconds:1761333700 nanos:111222000}"',
8206
- created: "2025-10-02",
8207
- modified: "2025-10-02"
8208
- },
8209
- {
8210
- id: "8110654",
8211
- businessName: "Global Trade Partners LLC",
8212
- productName: "Swift Transfer FBO Global Trade",
8213
- cipStatus: "PASS",
8214
- status: "ACTIVE",
8215
- type: "Individual",
8216
- subType: "UBO",
8217
- isDeveloperInitiated: true,
8218
- provider: "Plaid",
8219
- result: 'vendor:VERIFICATION_VENDOR status:completed data:"account_verified:true holder_verified:true timestamp:{seconds:1761333600 nanos:333444000}"',
8220
- created: "2025-10-01",
8221
- modified: "2025-10-01"
8222
- }
8223
- ];
8224
- var Businesses = () => {
8225
- const navigate = useNavigate();
8226
- const [businesses, setBusinesses] = useState(mockBusinessesList);
8227
- const [filteredBusinesses, setFilteredBusinesses] = useState(mockBusinessesList);
8228
- const [sortBy, setSortBy] = useState("created");
8229
- const [sortDirection, setSortDirection] = useState("desc");
8230
- const [filters, setFilters] = useState({
8231
- name: "",
8232
- productName: "",
8233
- status: "",
8234
- createdDateStart: void 0,
8235
- createdDateEnd: void 0
8236
- });
8237
- const handleFilterChange = (field, value) => {
8238
- setFilters((prev) => ({ ...prev, [field]: value }));
8239
- };
8240
- const applyFilters = () => {
8241
- let filtered = businesses;
8242
- if (filters.name) {
8243
- filtered = filtered.filter(
8244
- (business) => business.businessName.toLowerCase().includes(filters.name.toLowerCase())
8245
- );
8246
- }
8247
- if (filters.productName) {
8248
- filtered = filtered.filter(
8249
- (business) => business.productName.toLowerCase().includes(filters.productName.toLowerCase())
8250
- );
8251
- }
8252
- if (filters.status) {
8253
- filtered = filtered.filter((business) => business.status === filters.status);
8254
- }
8255
- if (filters.createdDateStart) {
8256
- filtered = filtered.filter(
8257
- (business) => new Date(business.created) >= filters.createdDateStart
8258
- );
8259
- }
8260
- if (filters.createdDateEnd) {
8261
- filtered = filtered.filter(
8262
- (business) => new Date(business.created) <= filters.createdDateEnd
8263
- );
8264
- }
8265
- setFilteredBusinesses(filtered);
8266
- };
8267
- const resetFilters = () => {
8268
- setFilters({
8269
- name: "",
8270
- productName: "",
8271
- status: "",
8272
- createdDateStart: void 0,
8273
- createdDateEnd: void 0
8274
- });
8275
- setFilteredBusinesses(businesses);
8276
- };
8277
- const handleSort = (key) => {
8278
- if (sortBy === key) {
8279
- setSortDirection(sortDirection === "asc" ? "desc" : "asc");
8280
- } else {
8281
- setSortBy(key);
8282
- setSortDirection("asc");
8283
- }
8284
- };
8285
- const handleRowClick = (business) => {
8286
- navigate(`/business/${business.id}`);
8287
- };
8288
- const columns2 = [
8289
- {
8290
- key: "id",
8291
- title: "Business ID",
8292
- sortable: true
8293
- },
8294
- {
8295
- key: "businessName",
8296
- title: "Business Name",
8297
- sortable: true
8298
- },
8299
- {
8300
- key: "productName",
8301
- title: "Product Name",
8302
- sortable: true,
8303
- render: (value) => /* @__PURE__ */ jsx("span", { className: "text-primary hover:underline cursor-pointer", children: value })
8304
- },
8305
- {
8306
- key: "cipStatus",
8307
- title: "CIP status",
8308
- sortable: true,
8309
- render: (value) => /* @__PURE__ */ jsx(CIPStatusBadge, { status: value })
8310
- },
8311
- {
8312
- key: "status",
8313
- title: "Status",
8314
- sortable: true,
8315
- render: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value?.toUpperCase() })
8316
- },
8317
- {
8318
- key: "created",
8319
- title: "Created",
8320
- sortable: true
8321
- },
8322
- {
8323
- key: "modified",
8324
- title: "Modified",
8325
- sortable: true
8326
- }
8327
- ];
8328
- const sortedBusinesses = [...filteredBusinesses].sort((a, b) => {
8329
- const aValue = a[sortBy];
8330
- const bValue = b[sortBy];
8331
- if (aValue < bValue) return sortDirection === "asc" ? -1 : 1;
8332
- if (aValue > bValue) return sortDirection === "asc" ? 1 : -1;
8333
- return 0;
8334
- });
8335
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
8336
- /* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
8337
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: "Businesses" }) }),
8338
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8339
- /* @__PURE__ */ jsxs(Sheet, { children: [
8340
- /* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "gap-2", children: [
8341
- /* @__PURE__ */ jsx(Filter, { className: "h-4 w-4" }),
8342
- "Filters"
8343
- ] }) }),
8344
- /* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-full sm:max-w-xl overflow-y-auto", children: [
8345
- /* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "Business Filters" }) }),
8346
- /* @__PURE__ */ jsxs("div", { className: "space-y-6 py-6", children: [
8347
- /* @__PURE__ */ jsx(
8348
- EnhancedInput,
8349
- {
8350
- label: "Name",
8351
- value: filters.name,
8352
- onChange: (e) => handleFilterChange("name", e.target.value),
8353
- placeholder: "Enter business name"
8354
- }
8355
- ),
8356
- /* @__PURE__ */ jsx(
8357
- EnhancedInput,
8358
- {
8359
- label: "Product Name",
8360
- value: filters.productName,
8361
- onChange: (e) => handleFilterChange("productName", e.target.value),
8362
- placeholder: "Enter product name"
8363
- }
8364
- ),
8365
- /* @__PURE__ */ jsx(
8366
- EnhancedSelect,
8367
- {
8368
- label: "Status",
8369
- value: filters.status,
8370
- onValueChange: (value) => handleFilterChange("status", value),
8371
- placeholder: "Select status",
8372
- options: [
8373
- { value: "active", label: "Active" },
8374
- { value: "inactive", label: "Inactive" },
8375
- { value: "suspended", label: "Suspended" }
8376
- ]
8377
- }
8378
- ),
8379
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
8380
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
8381
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
8382
- /* @__PURE__ */ jsx(
8383
- DatePicker,
8384
- {
8385
- date: filters.createdDateStart,
8386
- onDateChange: (date) => handleFilterChange("createdDateStart", date),
8387
- placeholder: "MM/DD/YYYY",
8388
- buttonClassName: "w-full",
8389
- className: "bg-background z-50"
8390
- }
8391
- )
8392
- ] }),
8393
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
8394
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
8395
- /* @__PURE__ */ jsx(
8396
- DatePicker,
8397
- {
8398
- date: filters.createdDateEnd,
8399
- onDateChange: (date) => handleFilterChange("createdDateEnd", date),
8400
- placeholder: "MM/DD/YYYY",
8401
- buttonClassName: "w-full",
8402
- className: "bg-background z-50"
8403
- }
8404
- )
8405
- ] })
8406
- ] })
8407
- ] }),
8408
- /* @__PURE__ */ jsxs(SheetFooter, { className: "gap-2", children: [
8409
- /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: resetFilters, children: "Reset Filters" }),
8410
- /* @__PURE__ */ jsx(Button, { onClick: applyFilters, children: "Apply Filters" })
8411
- ] })
8412
- ] })
8413
- ] }),
8414
- /* @__PURE__ */ jsx(Button, { onClick: () => navigate("/business/create"), children: "Create Business" })
8644
+ cipStatus: "IN_REVIEW",
8645
+ status: "PENDING_APPROVAL",
8646
+ type: "Business",
8647
+ subType: "Customer",
8648
+ isDeveloperInitiated: false,
8649
+ provider: "Alloy",
8650
+ result: 'vendor:KYC_VENDOR status:in_progress data:"kyc_id:\\"kyc-345\\" business_id:\\"biz-678\\" initiated:{seconds:1761333700 nanos:111222000}"',
8651
+ created: "2025-10-02",
8652
+ modified: "2025-10-02"
8653
+ },
8654
+ {
8655
+ id: "8110654",
8656
+ businessName: "Global Trade Partners LLC",
8657
+ productName: "Swift Transfer FBO Global Trade",
8658
+ cipStatus: "PASS",
8659
+ status: "ACTIVE",
8660
+ type: "Individual",
8661
+ subType: "UBO",
8662
+ isDeveloperInitiated: true,
8663
+ provider: "Plaid",
8664
+ result: 'vendor:VERIFICATION_VENDOR status:completed data:"account_verified:true holder_verified:true timestamp:{seconds:1761333600 nanos:333444000}"',
8665
+ created: "2025-10-01",
8666
+ modified: "2025-10-01"
8667
+ }
8668
+ ];
8669
+ var columns2 = [
8670
+ {
8671
+ key: "id",
8672
+ title: "Business ID",
8673
+ sortable: true
8674
+ },
8675
+ {
8676
+ key: "businessName",
8677
+ title: "Business Name",
8678
+ sortable: true
8679
+ },
8680
+ {
8681
+ key: "productName",
8682
+ title: "Product Name",
8683
+ sortable: true,
8684
+ render: (value) => /* @__PURE__ */ jsx("span", { className: "text-primary hover:underline cursor-pointer", children: value })
8685
+ },
8686
+ {
8687
+ key: "cipStatus",
8688
+ title: "CIP status",
8689
+ sortable: true,
8690
+ render: (value) => /* @__PURE__ */ jsx(CIPStatusBadge, { status: value })
8691
+ },
8692
+ {
8693
+ key: "status",
8694
+ title: "Status",
8695
+ sortable: true,
8696
+ render: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value?.toUpperCase() })
8697
+ },
8698
+ {
8699
+ key: "created",
8700
+ title: "Created",
8701
+ sortable: true
8702
+ },
8703
+ {
8704
+ key: "modified",
8705
+ title: "Modified",
8706
+ sortable: true
8707
+ }
8708
+ ];
8709
+ var BusinessesView = ({
8710
+ filters,
8711
+ sortedData,
8712
+ sortBy,
8713
+ sortDirection,
8714
+ onFilterChange,
8715
+ onResetFilters,
8716
+ onSort,
8717
+ onRowClick,
8718
+ onCreateBusiness
8719
+ }) => {
8720
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-screen bg-gradient-subtle", children: [
8721
+ /* @__PURE__ */ jsx("div", { className: "flex-none border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-6 max-w-none", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
8722
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: "Businesses" }) }),
8723
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8724
+ /* @__PURE__ */ jsx(
8725
+ BusinessFiltersSheet,
8726
+ {
8727
+ filters,
8728
+ onFilterChange,
8729
+ onResetFilters
8730
+ }
8731
+ ),
8732
+ /* @__PURE__ */ jsx(Button, { onClick: onCreateBusiness, children: "Create Business" })
8415
8733
  ] })
8416
8734
  ] }) }) }),
8417
8735
  /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsx(
8418
8736
  DataTable,
8419
8737
  {
8420
8738
  columns: columns2,
8421
- data: sortedBusinesses,
8739
+ data: sortedData,
8422
8740
  sortBy,
8423
8741
  sortDirection,
8424
- onSort: handleSort,
8425
- onRowClick: handleRowClick
8742
+ onSort,
8743
+ onRowClick
8426
8744
  }
8427
8745
  ) }) }) })
8428
8746
  ] });
8429
8747
  };
8748
+ var Businesses = () => {
8749
+ const navigate = useNavigate();
8750
+ const [filters, setFilters] = useState({
8751
+ name: "",
8752
+ productName: "",
8753
+ status: "",
8754
+ createdDateStart: void 0,
8755
+ createdDateEnd: void 0
8756
+ });
8757
+ const [sortBy, setSortBy] = useState("created");
8758
+ const [sortDirection, setSortDirection] = useState("desc");
8759
+ const filteredData = useMemo(() => {
8760
+ return mockBusinessesList.filter((business) => {
8761
+ if (filters.name && !business.businessName.toLowerCase().includes(filters.name.toLowerCase())) {
8762
+ return false;
8763
+ }
8764
+ if (filters.productName && !business.productName.toLowerCase().includes(filters.productName.toLowerCase())) {
8765
+ return false;
8766
+ }
8767
+ if (filters.status && business.status.toLowerCase() !== filters.status.toLowerCase()) {
8768
+ return false;
8769
+ }
8770
+ if (filters.createdDateStart || filters.createdDateEnd) {
8771
+ const created = new Date(business.created);
8772
+ if (filters.createdDateStart && created < filters.createdDateStart) {
8773
+ return false;
8774
+ }
8775
+ if (filters.createdDateEnd && created > filters.createdDateEnd) {
8776
+ return false;
8777
+ }
8778
+ }
8779
+ return true;
8780
+ });
8781
+ }, [filters]);
8782
+ const sortedData = useMemo(() => {
8783
+ return [...filteredData].sort((a, b) => {
8784
+ const aValue = a[sortBy];
8785
+ const bValue = b[sortBy];
8786
+ if (aValue < bValue) return sortDirection === "asc" ? -1 : 1;
8787
+ if (aValue > bValue) return sortDirection === "asc" ? 1 : -1;
8788
+ return 0;
8789
+ });
8790
+ }, [filteredData, sortBy, sortDirection]);
8791
+ const handleFilterChange = useCallback((field, value) => {
8792
+ setFilters((prev) => ({ ...prev, [field]: value }));
8793
+ }, []);
8794
+ const resetFilters = useCallback(() => {
8795
+ setFilters({
8796
+ name: "",
8797
+ productName: "",
8798
+ status: "",
8799
+ createdDateStart: void 0,
8800
+ createdDateEnd: void 0
8801
+ });
8802
+ }, []);
8803
+ const handleSort = useCallback((key) => {
8804
+ if (sortBy === key) {
8805
+ setSortDirection((prev) => prev === "asc" ? "desc" : "asc");
8806
+ } else {
8807
+ setSortBy(key);
8808
+ setSortDirection("asc");
8809
+ }
8810
+ }, [sortBy]);
8811
+ const handleRowClick = useCallback((business) => {
8812
+ navigate(`/business/${business.id}`);
8813
+ }, [navigate]);
8814
+ const handleCreateBusiness = useCallback(() => {
8815
+ navigate("/business/create");
8816
+ }, [navigate]);
8817
+ return /* @__PURE__ */ jsx(
8818
+ BusinessesView,
8819
+ {
8820
+ filters,
8821
+ sortedData,
8822
+ sortBy,
8823
+ sortDirection,
8824
+ onFilterChange: handleFilterChange,
8825
+ onResetFilters: resetFilters,
8826
+ onSort: handleSort,
8827
+ onRowClick: handleRowClick,
8828
+ onCreateBusiness: handleCreateBusiness
8829
+ }
8830
+ );
8831
+ };
8430
8832
  var Businesses_default = Businesses;
8431
8833
  var typeConfig3 = {
8432
8834
  Individual: {
@@ -8652,7 +9054,7 @@ var mockBusinessAccounts = {
8652
9054
  ]
8653
9055
  };
8654
9056
  var UBOCard = ({ ubos }) => {
8655
- const columns2 = [
9057
+ const columns3 = [
8656
9058
  {
8657
9059
  key: "name",
8658
9060
  title: "Name",
@@ -8696,7 +9098,7 @@ var UBOCard = ({ ubos }) => {
8696
9098
  ] }) : /* @__PURE__ */ jsx(
8697
9099
  DataTable,
8698
9100
  {
8699
- columns: columns2,
9101
+ columns: columns3,
8700
9102
  data: ubos
8701
9103
  }
8702
9104
  ) })
@@ -9103,302 +9505,62 @@ var Business = () => {
9103
9505
  );
9104
9506
  };
9105
9507
  var BusinessDetail_default = Business;
9508
+ var defaultBusinessFormValues = {
9509
+ legalName: "",
9510
+ dbaName: "",
9511
+ businessType: "",
9512
+ taxId: "",
9513
+ formationDate: "",
9514
+ idType: "EIN",
9515
+ incorporationState: "",
9516
+ website: "",
9517
+ email: "",
9518
+ mobilePhone: "",
9519
+ mcc: "",
9520
+ naics: "",
9521
+ achCompanyId: "",
9522
+ achCompanyName: "",
9523
+ externalId: "",
9524
+ contactFirstName: "",
9525
+ contactLastName: "",
9526
+ contactEmail: "",
9527
+ contactPhone: "",
9528
+ address: {
9529
+ streetAddress: "",
9530
+ apartment: "",
9531
+ city: "",
9532
+ state: "",
9533
+ postalCode: "",
9534
+ country: "US",
9535
+ addressType: "business"
9536
+ }
9537
+ };
9106
9538
  var CreateBusiness = () => {
9107
9539
  const navigate = useNavigate();
9108
9540
  const [businessType, setBusinessType] = useState("");
9109
9541
  const form = useForm({
9110
9542
  resolver: zodResolver(businessProfileSchema),
9111
- defaultValues: {
9112
- legalName: "",
9113
- dbaName: "",
9114
- businessType: "",
9115
- taxId: "",
9116
- formationDate: "",
9117
- idType: "EIN",
9118
- incorporationState: "",
9119
- website: "",
9120
- email: "",
9121
- mobilePhone: "",
9122
- mcc: "",
9123
- naics: "",
9124
- achCompanyId: "",
9125
- achCompanyName: "",
9126
- externalId: "",
9127
- contactFirstName: "",
9128
- contactLastName: "",
9129
- contactEmail: "",
9130
- contactPhone: "",
9131
- address: {
9132
- streetAddress: "",
9133
- apartment: "",
9134
- city: "",
9135
- state: "",
9136
- postalCode: "",
9137
- country: "US",
9138
- addressType: "business"
9139
- }
9140
- }
9543
+ defaultValues: defaultBusinessFormValues
9141
9544
  });
9142
- const onSubmit = (data) => {
9545
+ const onSubmit = useCallback((data) => {
9143
9546
  console.log("Business data:", data);
9144
9547
  navigate("/business");
9145
- };
9548
+ }, [navigate]);
9549
+ const handleCancel = useCallback(() => {
9550
+ navigate("/business");
9551
+ }, [navigate]);
9552
+ const handleBusinessTypeChange = useCallback((value) => {
9553
+ setBusinessType(value);
9554
+ form.setValue("businessType", value);
9555
+ }, [form]);
9146
9556
  return /* @__PURE__ */ jsx(
9147
- PageLayout,
9557
+ CreateBusinessView,
9148
9558
  {
9149
- title: "Create Business",
9150
- actions: [
9151
- { label: "Cancel", variant: "outline", onClick: () => navigate("/business") },
9152
- { label: "Create Business", variant: "default", onClick: form.handleSubmit(onSubmit) }
9153
- ],
9154
- children: /* @__PURE__ */ jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-6", children: [
9155
- /* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
9156
- /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Information" }) }),
9157
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
9158
- /* @__PURE__ */ jsx(
9159
- EnhancedInput,
9160
- {
9161
- label: "Legal Name",
9162
- placeholder: "Enter legal business name",
9163
- required: true,
9164
- ...form.register("legalName")
9165
- }
9166
- ),
9167
- /* @__PURE__ */ jsx(
9168
- EnhancedInput,
9169
- {
9170
- label: "DBA Name",
9171
- placeholder: "Enter DBA name",
9172
- hint: "Doing Business As name",
9173
- ...form.register("dbaName")
9174
- }
9175
- ),
9176
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
9177
- /* @__PURE__ */ jsx(
9178
- EnhancedSelect,
9179
- {
9180
- label: "Business Type",
9181
- placeholder: "Select business type",
9182
- value: businessType,
9183
- onValueChange: (value) => {
9184
- setBusinessType(value);
9185
- form.setValue("businessType", value);
9186
- },
9187
- options: [
9188
- { value: "corporation", label: "Corporation" },
9189
- { value: "llc", label: "LLC" },
9190
- { value: "partnership", label: "Partnership" },
9191
- { value: "sole_proprietorship", label: "Sole Proprietorship" }
9192
- ]
9193
- }
9194
- ),
9195
- businessType && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
9196
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Preview:" }),
9197
- /* @__PURE__ */ jsx(BusinessTypeBadge, { type: businessType })
9198
- ] })
9199
- ] }),
9200
- /* @__PURE__ */ jsx(
9201
- EnhancedInput,
9202
- {
9203
- label: "Tax ID (EIN)",
9204
- placeholder: "12-3456789",
9205
- hint: "Employer Identification Number",
9206
- required: true,
9207
- ...form.register("taxId")
9208
- }
9209
- ),
9210
- /* @__PURE__ */ jsx(
9211
- EnhancedInput,
9212
- {
9213
- label: "Formation Date",
9214
- placeholder: "YYYY-MM-DD",
9215
- type: "date",
9216
- ...form.register("formationDate")
9217
- }
9218
- ),
9219
- /* @__PURE__ */ jsx(
9220
- EnhancedInput,
9221
- {
9222
- label: "Incorporation State",
9223
- placeholder: "Enter state",
9224
- ...form.register("incorporationState")
9225
- }
9226
- ),
9227
- /* @__PURE__ */ jsx(
9228
- EnhancedInput,
9229
- {
9230
- label: "Website",
9231
- placeholder: "https://www.business.com",
9232
- type: "url",
9233
- ...form.register("website")
9234
- }
9235
- ),
9236
- /* @__PURE__ */ jsx(
9237
- EnhancedInput,
9238
- {
9239
- label: "Email Address",
9240
- placeholder: "contact@business.com",
9241
- type: "email",
9242
- ...form.register("email")
9243
- }
9244
- ),
9245
- /* @__PURE__ */ jsx(
9246
- EnhancedInput,
9247
- {
9248
- label: "Mobile Phone",
9249
- placeholder: "+1 (555) 123-4567",
9250
- ...form.register("mobilePhone")
9251
- }
9252
- ),
9253
- /* @__PURE__ */ jsx(
9254
- EnhancedInput,
9255
- {
9256
- label: "MCC",
9257
- placeholder: "1234",
9258
- hint: "4-digit Merchant Category Code",
9259
- ...form.register("mcc")
9260
- }
9261
- ),
9262
- /* @__PURE__ */ jsx(
9263
- EnhancedInput,
9264
- {
9265
- label: "NAICS",
9266
- placeholder: "123456",
9267
- hint: "6-digit industry classification",
9268
- ...form.register("naics")
9269
- }
9270
- ),
9271
- /* @__PURE__ */ jsx(
9272
- EnhancedInput,
9273
- {
9274
- label: "ACH Company ID",
9275
- placeholder: "1234567890",
9276
- hint: "10-digit ACH identifier",
9277
- ...form.register("achCompanyId")
9278
- }
9279
- ),
9280
- /* @__PURE__ */ jsx(
9281
- EnhancedInput,
9282
- {
9283
- label: "ACH Company Name",
9284
- placeholder: "Enter ACH company name",
9285
- ...form.register("achCompanyName")
9286
- }
9287
- ),
9288
- /* @__PURE__ */ jsx(
9289
- EnhancedInput,
9290
- {
9291
- label: "External ID",
9292
- placeholder: "UUID format",
9293
- hint: "External system identifier",
9294
- ...form.register("externalId")
9295
- }
9296
- )
9297
- ] })
9298
- ] }),
9299
- /* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
9300
- /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Business Address" }) }),
9301
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
9302
- /* @__PURE__ */ jsx(
9303
- EnhancedInput,
9304
- {
9305
- label: "Street Address",
9306
- placeholder: "Enter street address",
9307
- required: true,
9308
- ...form.register("address.streetAddress")
9309
- }
9310
- ),
9311
- /* @__PURE__ */ jsx(
9312
- EnhancedInput,
9313
- {
9314
- label: "Apartment/Suite",
9315
- placeholder: "Enter apartment or suite number",
9316
- ...form.register("address.apartment")
9317
- }
9318
- ),
9319
- /* @__PURE__ */ jsx(
9320
- EnhancedInput,
9321
- {
9322
- label: "City",
9323
- placeholder: "Enter city",
9324
- required: true,
9325
- ...form.register("address.city")
9326
- }
9327
- ),
9328
- /* @__PURE__ */ jsx(
9329
- EnhancedInput,
9330
- {
9331
- label: "State",
9332
- placeholder: "Enter state",
9333
- required: true,
9334
- ...form.register("address.state")
9335
- }
9336
- ),
9337
- /* @__PURE__ */ jsx(
9338
- EnhancedInput,
9339
- {
9340
- label: "Postal Code",
9341
- placeholder: "12345",
9342
- required: true,
9343
- ...form.register("address.postalCode")
9344
- }
9345
- ),
9346
- /* @__PURE__ */ jsx(
9347
- EnhancedSelect,
9348
- {
9349
- label: "Country",
9350
- placeholder: "Select country",
9351
- value: form.watch("address.country"),
9352
- onValueChange: (value) => form.setValue("address.country", value),
9353
- options: [
9354
- { value: "US", label: "United States" },
9355
- { value: "CA", label: "Canada" },
9356
- { value: "GB", label: "United Kingdom" },
9357
- { value: "DE", label: "Germany" }
9358
- ]
9359
- }
9360
- )
9361
- ] })
9362
- ] }),
9363
- /* @__PURE__ */ jsxs(Card, { className: "p-6", children: [
9364
- /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-4 mb-6", children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: "Contact Information" }) }),
9365
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
9366
- /* @__PURE__ */ jsx(
9367
- EnhancedInput,
9368
- {
9369
- label: "Contact First Name",
9370
- placeholder: "Enter first name",
9371
- ...form.register("contactFirstName")
9372
- }
9373
- ),
9374
- /* @__PURE__ */ jsx(
9375
- EnhancedInput,
9376
- {
9377
- label: "Contact Last Name",
9378
- placeholder: "Enter last name",
9379
- ...form.register("contactLastName")
9380
- }
9381
- ),
9382
- /* @__PURE__ */ jsx(
9383
- EnhancedInput,
9384
- {
9385
- label: "Contact Email",
9386
- placeholder: "contact@business.com",
9387
- type: "email",
9388
- ...form.register("contactEmail")
9389
- }
9390
- ),
9391
- /* @__PURE__ */ jsx(
9392
- EnhancedInput,
9393
- {
9394
- label: "Contact Phone",
9395
- placeholder: "+1 (555) 123-4567",
9396
- ...form.register("contactPhone")
9397
- }
9398
- )
9399
- ] })
9400
- ] })
9401
- ] })
9559
+ form,
9560
+ businessType,
9561
+ onBusinessTypeChange: handleBusinessTypeChange,
9562
+ onSubmit,
9563
+ onCancel: handleCancel
9402
9564
  }
9403
9565
  );
9404
9566
  };
@@ -9570,7 +9732,7 @@ var Counterparties = () => {
9570
9732
  const handleRowClick = (counterparty) => {
9571
9733
  navigate(`/counterparty/${counterparty.id}`);
9572
9734
  };
9573
- const columns2 = [
9735
+ const columns3 = [
9574
9736
  {
9575
9737
  key: "id",
9576
9738
  title: "Counterparty ID",
@@ -9709,7 +9871,7 @@ var Counterparties = () => {
9709
9871
  /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsx(
9710
9872
  DataTable,
9711
9873
  {
9712
- columns: columns2,
9874
+ columns: columns3,
9713
9875
  data: sortedCounterparties,
9714
9876
  sortBy,
9715
9877
  sortDirection,
@@ -10193,7 +10355,7 @@ var Individuals = () => {
10193
10355
  const handleRowClick = (row) => {
10194
10356
  navigate(`/individual/${row.id}`);
10195
10357
  };
10196
- const columns2 = [
10358
+ const columns3 = [
10197
10359
  {
10198
10360
  key: "id",
10199
10361
  title: "Individual ID",
@@ -10327,7 +10489,7 @@ var Individuals = () => {
10327
10489
  /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsx(
10328
10490
  DataTable,
10329
10491
  {
10330
- columns: columns2,
10492
+ columns: columns3,
10331
10493
  data: sortedIndividuals,
10332
10494
  sortBy,
10333
10495
  sortDirection,
@@ -12761,6 +12923,6 @@ function UIKit() {
12761
12923
  ] }) }) });
12762
12924
  }
12763
12925
 
12764
- export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, 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, 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, CounterpartyBasicInfo, CounterpartyDetail_default as CounterpartyDetail, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, Create_default2 as CreateCounterparty, Create_default3 as CreateIndividual, 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, 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, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, downloadCSV, generateStatementCSV, inputVariants, reducer, textareaVariants, toast, useAlertDetail, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
12926
+ export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, 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, 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, CounterpartyBasicInfo, CounterpartyDetail_default as CounterpartyDetail, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, CreateBusinessView, Create_default2 as CreateCounterparty, Create_default3 as CreateIndividual, 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, 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, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, downloadCSV, generateStatementCSV, inputVariants, reducer, textareaVariants, toast, useAlertDetail, useBusinessFilters, useBusinessSort, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
12765
12927
  //# sourceMappingURL=index.js.map
12766
12928
  //# sourceMappingURL=index.js.map