braid-ui 1.0.31 → 1.0.33

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.d.cts CHANGED
@@ -169,50 +169,6 @@ interface IdentityVerification {
169
169
  result: string;
170
170
  }
171
171
 
172
- interface Business {
173
- id: string;
174
- businessName: string;
175
- status: string;
176
- cipStatus: "PASS" | "FAIL" | "IN_REVIEW" | "NOT_START" | "not_start" | "pending" | "rejected" | "verified";
177
- type: "Business" | "Individual";
178
- subType: "Customer" | "UBO";
179
- }
180
- interface BusinessAccount {
181
- id: string;
182
- number: string;
183
- routingNumber: string;
184
- type: string;
185
- }
186
- interface BusinessDetailViewProps {
187
- business: Business;
188
- identityVerification?: IdentityVerification;
189
- businessUBOs: UBO[];
190
- businessDocuments: BusinessDocument[];
191
- businessAccounts: BusinessAccount[];
192
- currentStatus: string;
193
- isEditingProfile: boolean;
194
- onStatusChange: (newStatus: string) => void;
195
- onToggleProfileEdit: () => void;
196
- onNavigateToAccounts: () => void;
197
- onNavigateToCounterparty: () => void;
198
- onAddAccount: () => void;
199
- }
200
- declare const BusinessDetailView: ({ business, identityVerification, businessUBOs, businessDocuments, businessAccounts, currentStatus, isEditingProfile, onStatusChange, onToggleProfileEdit, onNavigateToAccounts, onNavigateToCounterparty, onAddAccount }: BusinessDetailViewProps) => react_jsx_runtime.JSX.Element;
201
-
202
- interface BusinessFilters {
203
- name: string;
204
- productName: string;
205
- status: string;
206
- createdDateStart?: Date;
207
- createdDateEnd?: Date;
208
- }
209
- interface BusinessFiltersSheetProps {
210
- filters: BusinessFilters;
211
- onFilterChange: (field: keyof BusinessFilters, value: string | Date | undefined) => void;
212
- onResetFilters: () => void;
213
- }
214
- declare const BusinessFiltersSheet: ({ filters, onFilterChange, onResetFilters }: BusinessFiltersSheetProps) => react_jsx_runtime.JSX.Element;
215
-
216
172
  declare const businessProfileSchema: z.ZodObject<{
217
173
  name: z.ZodString;
218
174
  productId: z.ZodNumber;
@@ -341,6 +297,52 @@ declare const businessProfileSchema: z.ZodObject<{
341
297
  }>;
342
298
  type BusinessProfile = z.infer<typeof businessProfileSchema>;
343
299
 
300
+ interface Business {
301
+ id: string;
302
+ businessName: string;
303
+ status: string;
304
+ cipStatus: "PASS" | "FAIL" | "IN_REVIEW" | "NOT_START" | "not_start" | "pending" | "rejected" | "verified";
305
+ type: "Business" | "Individual";
306
+ subType: "Customer" | "UBO";
307
+ }
308
+ interface BusinessAccount {
309
+ id: string;
310
+ number: string;
311
+ routingNumber: string;
312
+ type: string;
313
+ }
314
+ interface BusinessDetailViewProps {
315
+ business: Business;
316
+ businessProfile?: BusinessProfile;
317
+ identityVerification?: IdentityVerification;
318
+ businessUBOs: UBO[];
319
+ businessDocuments: BusinessDocument[];
320
+ businessAccounts: BusinessAccount[];
321
+ currentStatus: string;
322
+ isEditingProfile: boolean;
323
+ onStatusChange: (newStatus: string) => void;
324
+ onProfileDataChange: (profile: BusinessProfile) => void;
325
+ onToggleProfileEdit: () => void;
326
+ onNavigateToAccounts: () => void;
327
+ onNavigateToCounterparty: () => void;
328
+ onAddAccount: () => void;
329
+ }
330
+ declare const BusinessDetailView: ({ business, businessProfile, identityVerification, businessUBOs, businessDocuments, businessAccounts, currentStatus, isEditingProfile, onStatusChange, onProfileDataChange, onToggleProfileEdit, onNavigateToAccounts, onNavigateToCounterparty, onAddAccount }: BusinessDetailViewProps) => react_jsx_runtime.JSX.Element;
331
+
332
+ interface BusinessFilters {
333
+ name: string;
334
+ productName: string;
335
+ status: string;
336
+ createdDateStart?: Date;
337
+ createdDateEnd?: Date;
338
+ }
339
+ interface BusinessFiltersSheetProps {
340
+ filters: BusinessFilters;
341
+ onFilterChange: (field: keyof BusinessFilters, value: string | Date | undefined) => void;
342
+ onResetFilters: () => void;
343
+ }
344
+ declare const BusinessFiltersSheet: ({ filters, onFilterChange, onResetFilters }: BusinessFiltersSheetProps) => react_jsx_runtime.JSX.Element;
345
+
344
346
  interface CreateBusinessViewProps {
345
347
  form: UseFormReturn<BusinessProfile>;
346
348
  businessType: string;
package/dist/index.d.ts CHANGED
@@ -169,50 +169,6 @@ interface IdentityVerification {
169
169
  result: string;
170
170
  }
171
171
 
172
- interface Business {
173
- id: string;
174
- businessName: string;
175
- status: string;
176
- cipStatus: "PASS" | "FAIL" | "IN_REVIEW" | "NOT_START" | "not_start" | "pending" | "rejected" | "verified";
177
- type: "Business" | "Individual";
178
- subType: "Customer" | "UBO";
179
- }
180
- interface BusinessAccount {
181
- id: string;
182
- number: string;
183
- routingNumber: string;
184
- type: string;
185
- }
186
- interface BusinessDetailViewProps {
187
- business: Business;
188
- identityVerification?: IdentityVerification;
189
- businessUBOs: UBO[];
190
- businessDocuments: BusinessDocument[];
191
- businessAccounts: BusinessAccount[];
192
- currentStatus: string;
193
- isEditingProfile: boolean;
194
- onStatusChange: (newStatus: string) => void;
195
- onToggleProfileEdit: () => void;
196
- onNavigateToAccounts: () => void;
197
- onNavigateToCounterparty: () => void;
198
- onAddAccount: () => void;
199
- }
200
- declare const BusinessDetailView: ({ business, identityVerification, businessUBOs, businessDocuments, businessAccounts, currentStatus, isEditingProfile, onStatusChange, onToggleProfileEdit, onNavigateToAccounts, onNavigateToCounterparty, onAddAccount }: BusinessDetailViewProps) => react_jsx_runtime.JSX.Element;
201
-
202
- interface BusinessFilters {
203
- name: string;
204
- productName: string;
205
- status: string;
206
- createdDateStart?: Date;
207
- createdDateEnd?: Date;
208
- }
209
- interface BusinessFiltersSheetProps {
210
- filters: BusinessFilters;
211
- onFilterChange: (field: keyof BusinessFilters, value: string | Date | undefined) => void;
212
- onResetFilters: () => void;
213
- }
214
- declare const BusinessFiltersSheet: ({ filters, onFilterChange, onResetFilters }: BusinessFiltersSheetProps) => react_jsx_runtime.JSX.Element;
215
-
216
172
  declare const businessProfileSchema: z.ZodObject<{
217
173
  name: z.ZodString;
218
174
  productId: z.ZodNumber;
@@ -341,6 +297,52 @@ declare const businessProfileSchema: z.ZodObject<{
341
297
  }>;
342
298
  type BusinessProfile = z.infer<typeof businessProfileSchema>;
343
299
 
300
+ interface Business {
301
+ id: string;
302
+ businessName: string;
303
+ status: string;
304
+ cipStatus: "PASS" | "FAIL" | "IN_REVIEW" | "NOT_START" | "not_start" | "pending" | "rejected" | "verified";
305
+ type: "Business" | "Individual";
306
+ subType: "Customer" | "UBO";
307
+ }
308
+ interface BusinessAccount {
309
+ id: string;
310
+ number: string;
311
+ routingNumber: string;
312
+ type: string;
313
+ }
314
+ interface BusinessDetailViewProps {
315
+ business: Business;
316
+ businessProfile?: BusinessProfile;
317
+ identityVerification?: IdentityVerification;
318
+ businessUBOs: UBO[];
319
+ businessDocuments: BusinessDocument[];
320
+ businessAccounts: BusinessAccount[];
321
+ currentStatus: string;
322
+ isEditingProfile: boolean;
323
+ onStatusChange: (newStatus: string) => void;
324
+ onProfileDataChange: (profile: BusinessProfile) => void;
325
+ onToggleProfileEdit: () => void;
326
+ onNavigateToAccounts: () => void;
327
+ onNavigateToCounterparty: () => void;
328
+ onAddAccount: () => void;
329
+ }
330
+ declare const BusinessDetailView: ({ business, businessProfile, identityVerification, businessUBOs, businessDocuments, businessAccounts, currentStatus, isEditingProfile, onStatusChange, onProfileDataChange, onToggleProfileEdit, onNavigateToAccounts, onNavigateToCounterparty, onAddAccount }: BusinessDetailViewProps) => react_jsx_runtime.JSX.Element;
331
+
332
+ interface BusinessFilters {
333
+ name: string;
334
+ productName: string;
335
+ status: string;
336
+ createdDateStart?: Date;
337
+ createdDateEnd?: Date;
338
+ }
339
+ interface BusinessFiltersSheetProps {
340
+ filters: BusinessFilters;
341
+ onFilterChange: (field: keyof BusinessFilters, value: string | Date | undefined) => void;
342
+ onResetFilters: () => void;
343
+ }
344
+ declare const BusinessFiltersSheet: ({ filters, onFilterChange, onResetFilters }: BusinessFiltersSheetProps) => react_jsx_runtime.JSX.Element;
345
+
344
346
  interface CreateBusinessViewProps {
345
347
  form: UseFormReturn<BusinessProfile>;
346
348
  businessType: string;
package/dist/index.js CHANGED
@@ -3346,30 +3346,30 @@ z.object({
3346
3346
 
3347
3347
  // src/lib/mock-data/business-data.ts
3348
3348
  var defaultBusinessProfile = {
3349
- legalName: "Acme Corporation",
3350
- dbaName: "ACME Tech",
3351
- businessType: "corporation",
3352
- taxId: "12-3456789",
3353
- formationDate: "2020-01-15",
3354
- idType: "EIN",
3349
+ name: "Acme Corporation",
3350
+ productId: 1,
3351
+ businessIdType: "EIN",
3352
+ idNumber: "12-3456789",
3353
+ dba: "ACME Tech",
3354
+ businessEntityType: "CORPORATION",
3355
3355
  incorporationState: "Delaware",
3356
+ formationDate: "2020-01-15",
3356
3357
  website: "https://acme.com",
3357
- email: "contact@acme.com",
3358
- mobilePhone: "+1 (555) 234-5678",
3359
3358
  mcc: "1234",
3360
3359
  naics: "123456",
3360
+ mobilePhone: "+1 (555) 234-5678",
3361
3361
  achCompanyId: "1234567890",
3362
- achCompanyName: "Acme Corporation",
3363
- externalId: "c48c9834-ccdd-42df-bd56-1022df37341b",
3364
- productId: 1,
3362
+ contactPersonFirstName: "John",
3363
+ contactPersonLastName: "Smith",
3364
+ contactPersonEmail: "contact@acme.com",
3365
+ contactPersonPhone: "+1 (555) 123-4567",
3365
3366
  address: {
3366
- streetAddress: "123 Business Avenue",
3367
- apartment: "Suite 100",
3367
+ line1: "123 Business Avenue",
3368
+ line2: "Suite 100",
3368
3369
  city: "New York",
3369
3370
  state: "NY",
3370
3371
  postalCode: "10001",
3371
- country: "US",
3372
- addressType: "business"
3372
+ countryCode: "US"
3373
3373
  }
3374
3374
  };
3375
3375
  var BusinessProfileCard = ({
@@ -3661,7 +3661,19 @@ var BusinessProfileCard = ({
3661
3661
  InfoField,
3662
3662
  {
3663
3663
  label: "Address",
3664
- value: formValues?.address ? `${formValues.address.line1 || ""}${formValues.address.line2 ? ", " + formValues.address.line2 : ""}, ${formValues.address.city || ""}, ${formValues.address.state || ""} ${formValues.address.postalCode || ""}, ${formValues.address.countryCode || ""}` : "-",
3664
+ value: formValues?.address ? (() => {
3665
+ const parts = [];
3666
+ if (formValues.address.line1) parts.push(formValues.address.line1);
3667
+ if (formValues.address.line2) parts.push(formValues.address.line2);
3668
+ const cityStateZip = [
3669
+ formValues.address.city,
3670
+ formValues.address.state,
3671
+ formValues.address.postalCode
3672
+ ].filter(Boolean).join(" ");
3673
+ if (cityStateZip) parts.push(cityStateZip);
3674
+ if (formValues.address.countryCode) parts.push(formValues.address.countryCode);
3675
+ return parts.length > 0 ? parts.join(", ") : "-";
3676
+ })() : "-",
3665
3677
  layout: "horizontal"
3666
3678
  }
3667
3679
  ),
@@ -4604,6 +4616,7 @@ var accountColumns = [
4604
4616
  ];
4605
4617
  var BusinessDetailView = ({
4606
4618
  business,
4619
+ businessProfile,
4607
4620
  identityVerification,
4608
4621
  businessUBOs,
4609
4622
  businessDocuments,
@@ -4611,6 +4624,7 @@ var BusinessDetailView = ({
4611
4624
  currentStatus,
4612
4625
  isEditingProfile,
4613
4626
  onStatusChange,
4627
+ onProfileDataChange,
4614
4628
  onToggleProfileEdit,
4615
4629
  onNavigateToAccounts,
4616
4630
  onNavigateToCounterparty,
@@ -4660,9 +4674,11 @@ var BusinessDetailView = ({
4660
4674
  /* @__PURE__ */ jsx(
4661
4675
  BusinessProfileCard,
4662
4676
  {
4677
+ data: businessProfile,
4663
4678
  identityVerification,
4664
4679
  isEditing: isEditingProfile,
4665
- onToggleEdit: onToggleProfileEdit
4680
+ onToggleEdit: onToggleProfileEdit,
4681
+ onDataChange: onProfileDataChange
4666
4682
  }
4667
4683
  ),
4668
4684
  /* @__PURE__ */ jsx(UBOCard, { ubos: businessUBOs }),
@@ -10211,6 +10227,136 @@ var mockBusinessDocuments = {
10211
10227
  }
10212
10228
  ]
10213
10229
  };
10230
+
10231
+ // src/lib/mock-data/business-profiles-data.ts
10232
+ var mockBusinessProfiles = {
10233
+ "8112488": {
10234
+ name: "RAPIDZ PAY INC",
10235
+ productId: 1,
10236
+ businessIdType: "EIN",
10237
+ idNumber: "12-3456789",
10238
+ dba: "Rapidz Pay",
10239
+ businessEntityType: "CORPORATION",
10240
+ incorporationState: "Delaware",
10241
+ formationDate: "2020-01-15",
10242
+ website: "https://rapidzpay.com",
10243
+ mcc: "6211",
10244
+ naics: "522320",
10245
+ mobilePhone: "+1 (555) 123-4567",
10246
+ achCompanyId: "1234567890",
10247
+ contactPersonFirstName: "John",
10248
+ contactPersonLastName: "Smith",
10249
+ contactPersonEmail: "john.smith@rapidzpay.com",
10250
+ contactPersonPhone: "+1 (555) 234-5678",
10251
+ address: {
10252
+ line1: "123 Business Ave",
10253
+ line2: "Suite 100",
10254
+ city: "New York",
10255
+ state: "NY",
10256
+ postalCode: "10001",
10257
+ countryCode: "US"
10258
+ }
10259
+ },
10260
+ "8111609": {
10261
+ name: "Fern Hyper Growth Llc",
10262
+ productId: 2,
10263
+ businessIdType: "EIN",
10264
+ idNumber: "98-7654321",
10265
+ businessEntityType: "LIMITED_LIABILITY_COMPANY",
10266
+ incorporationState: "California",
10267
+ formationDate: "2019-06-20",
10268
+ website: "https://fernhypergrowth.com",
10269
+ mcc: "5999",
10270
+ naics: "541519",
10271
+ mobilePhone: "+1 (555) 987-6543",
10272
+ contactPersonFirstName: "Jane",
10273
+ contactPersonLastName: "Doe",
10274
+ contactPersonEmail: "jane.doe@fernhypergrowth.com",
10275
+ contactPersonPhone: "+1 (555) 876-5432",
10276
+ address: {
10277
+ line1: "456 Tech Street",
10278
+ city: "San Francisco",
10279
+ state: "CA",
10280
+ postalCode: "94102",
10281
+ countryCode: "US"
10282
+ }
10283
+ },
10284
+ "8111026": {
10285
+ name: "ACEROSGALVANISADOS & PREPINTADOS",
10286
+ productId: 3,
10287
+ businessIdType: "EIN",
10288
+ idNumber: "45-6789012",
10289
+ businessEntityType: "PARTNERSHIP",
10290
+ incorporationState: "Texas",
10291
+ formationDate: "2018-03-10",
10292
+ website: "https://acerosgalvanisados.com",
10293
+ mcc: "5051",
10294
+ naics: "423510",
10295
+ mobilePhone: "+1 (555) 456-7890",
10296
+ contactPersonFirstName: "Carlos",
10297
+ contactPersonLastName: "Rodriguez",
10298
+ contactPersonEmail: "carlos@acerosgalvanisados.com",
10299
+ contactPersonPhone: "+1 (555) 567-8901",
10300
+ address: {
10301
+ line1: "789 Industrial Blvd",
10302
+ city: "Houston",
10303
+ state: "TX",
10304
+ postalCode: "77001",
10305
+ countryCode: "US"
10306
+ }
10307
+ },
10308
+ "8110892": {
10309
+ name: "Tech Solutions Corp",
10310
+ productId: 4,
10311
+ businessIdType: "EIN",
10312
+ idNumber: "23-4567890",
10313
+ businessEntityType: "CORPORATION",
10314
+ incorporationState: "Washington",
10315
+ formationDate: "2021-08-15",
10316
+ website: "https://techsolutions.com",
10317
+ mcc: "7372",
10318
+ naics: "541511",
10319
+ mobilePhone: "+1 (555) 321-0987",
10320
+ achCompanyId: "9876543210",
10321
+ contactPersonFirstName: "Sarah",
10322
+ contactPersonLastName: "Johnson",
10323
+ contactPersonEmail: "sarah.johnson@techsolutions.com",
10324
+ contactPersonPhone: "+1 (555) 432-1098",
10325
+ address: {
10326
+ line1: "321 Tech Park",
10327
+ line2: "Building B",
10328
+ city: "Seattle",
10329
+ state: "WA",
10330
+ postalCode: "98101",
10331
+ countryCode: "US"
10332
+ }
10333
+ },
10334
+ "8110654": {
10335
+ name: "Global Trade Partners LLC",
10336
+ productId: 5,
10337
+ businessIdType: "EIN",
10338
+ idNumber: "67-8901234",
10339
+ dba: "GTP",
10340
+ businessEntityType: "LIMITED_LIABILITY_COMPANY",
10341
+ incorporationState: "Florida",
10342
+ formationDate: "2017-11-01",
10343
+ website: "https://globaltradepartners.com",
10344
+ mcc: "5732",
10345
+ naics: "443142",
10346
+ mobilePhone: "+1 (555) 654-3210",
10347
+ contactPersonFirstName: "Michael",
10348
+ contactPersonLastName: "Chen",
10349
+ contactPersonEmail: "michael.chen@gtp.com",
10350
+ contactPersonPhone: "+1 (555) 765-4321",
10351
+ address: {
10352
+ line1: "555 Trade Center",
10353
+ city: "Miami",
10354
+ state: "FL",
10355
+ postalCode: "33101",
10356
+ countryCode: "US"
10357
+ }
10358
+ }
10359
+ };
10214
10360
  var BusinessDetail = () => {
10215
10361
  const { id } = useParams();
10216
10362
  const navigate = useNavigate();
@@ -10219,14 +10365,22 @@ var BusinessDetail = () => {
10219
10365
  const businessUBOs = id ? mockBusinessUBOs[id] || [] : [];
10220
10366
  const businessDocuments = id ? mockBusinessDocuments[id] || [] : [];
10221
10367
  const businessAccounts = id ? mockBusinessAccounts[id] || [] : [];
10368
+ const initialProfile = id ? mockBusinessProfiles[id] : void 0;
10222
10369
  const [currentStatus, setCurrentStatus] = useState(business?.status || "active");
10223
10370
  const [isEditingProfile, setIsEditingProfile] = useState(false);
10371
+ const [businessProfile, setBusinessProfile] = useState(
10372
+ initialProfile
10373
+ );
10224
10374
  const handleStatusChange = (newStatus) => {
10225
10375
  setCurrentStatus(newStatus);
10226
10376
  };
10227
10377
  const handleToggleProfileEdit = () => {
10228
10378
  setIsEditingProfile(!isEditingProfile);
10229
10379
  };
10380
+ const handleProfileDataChange = (updatedProfile) => {
10381
+ setBusinessProfile(updatedProfile);
10382
+ console.log("Profile updated:", updatedProfile);
10383
+ };
10230
10384
  const handleNavigateToAccounts = () => {
10231
10385
  navigate(`/accounts?customerId=${id}&customerType=business`);
10232
10386
  };
@@ -10246,6 +10400,7 @@ var BusinessDetail = () => {
10246
10400
  BusinessDetailView,
10247
10401
  {
10248
10402
  business,
10403
+ businessProfile,
10249
10404
  identityVerification,
10250
10405
  businessUBOs,
10251
10406
  businessDocuments,
@@ -10253,6 +10408,7 @@ var BusinessDetail = () => {
10253
10408
  currentStatus,
10254
10409
  isEditingProfile,
10255
10410
  onStatusChange: handleStatusChange,
10411
+ onProfileDataChange: handleProfileDataChange,
10256
10412
  onToggleProfileEdit: handleToggleProfileEdit,
10257
10413
  onNavigateToAccounts: handleNavigateToAccounts,
10258
10414
  onNavigateToCounterparty: handleNavigateToCounterparty,