@verifiedinc-public/shared-ui-elements 12.29.0 → 12.29.1-beta.210

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.
Files changed (47) hide show
  1. package/dist/components/NetworkRules/editor/schema.d.ts +14 -110
  2. package/dist/components/NetworkRules/editor/schema.mjs +1 -1
  3. package/dist/components/form/NewOneClickForm/core/fields/address.d.ts +14 -36
  4. package/dist/components/form/NewOneClickForm/core/fields/birthDate.d.ts +1 -1
  5. package/dist/components/form/NewOneClickForm/core/fields/driversLicense.d.ts +32 -102
  6. package/dist/components/form/NewOneClickForm/core/fields/employer.d.ts +9 -101
  7. package/dist/components/form/NewOneClickForm/core/fields/fullName.d.ts +1 -9
  8. package/dist/components/form/NewOneClickForm/core/fields/healthInsurance.d.ts +4 -32
  9. package/dist/components/form/NewOneClickForm/core/fields/index.d.ts +66 -284
  10. package/dist/components/form/NewOneClickForm/core/fields/phone.d.ts +1 -1
  11. package/dist/components/form/NewOneClickForm/core/fields/sex.d.ts +3 -1
  12. package/dist/components/form/NewOneClickForm/core/fields/ssn.d.ts +1 -1
  13. package/dist/components/form/NewOneClickForm/core/form/formField.mjs +1 -1
  14. package/dist/components/form/NewOneClickForm/core/form/formFieldBuilder.mjs +1 -1
  15. package/dist/components/form/NewOneClickForm/core/validations/address/address.schema.d.ts +12 -78
  16. package/dist/components/form/NewOneClickForm/core/validations/address/address.schema.mjs +1 -1
  17. package/dist/components/form/NewOneClickForm/core/validations/address/country.schema.d.ts +1 -1
  18. package/dist/components/form/NewOneClickForm/core/validations/address/state.schema.d.ts +3 -1
  19. package/dist/components/form/NewOneClickForm/core/validations/driversLicense/driversLicense.schema.d.ts +12 -62
  20. package/dist/components/form/NewOneClickForm/core/validations/employer/employer.schema.d.ts +9 -101
  21. package/dist/components/form/NewOneClickForm/core/validations/employer/employer.schema.mjs +1 -1
  22. package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/healthInsurance.schema.d.ts +3 -27
  23. package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/healthInsurance.schema.mjs +1 -1
  24. package/dist/components/form/NewOneClickForm/core/validations/name/fullName.schema.d.ts +1 -9
  25. package/dist/components/form/NewOneClickForm/core/validations/other/birthDate.schema.d.ts +1 -1
  26. package/dist/components/form/NewOneClickForm/core/validations/other/date.schema.d.ts +1 -1
  27. package/dist/components/form/NewOneClickForm/core/validations/other/phone.schema.d.ts +1 -1
  28. package/dist/components/form/NewOneClickForm/core/validations/other/sex.schema.d.ts +3 -1
  29. package/dist/components/form/NewOneClickForm/core/validations/other/sex.schema.mjs +1 -1
  30. package/dist/components/form/NewOneClickForm/core/validations/other/ssn.schema.d.ts +1 -1
  31. package/dist/components/form/NewOneClickForm/react/core/field.hook.mjs +1 -1
  32. package/dist/components/form/NewOneClickForm/react/ui/fields/shared.d.ts +4 -4
  33. package/dist/hooks/useQRCode.mjs +1 -1
  34. package/dist/utils/zod.d.ts +6 -0
  35. package/dist/utils/zod.mjs +1 -0
  36. package/dist/validations/address.schema.d.ts +3 -1
  37. package/dist/validations/date.schema.d.ts +4 -4
  38. package/dist/validations/date.schema.mjs +1 -1
  39. package/dist/validations/email.schema.d.ts +2 -2
  40. package/dist/validations/email.schema.mjs +1 -1
  41. package/dist/validations/field.schema.mjs +1 -1
  42. package/dist/validations/npi.schema.d.ts +1 -1
  43. package/dist/validations/phone.schema.d.ts +1 -1
  44. package/dist/validations/ssn.schema.d.ts +1 -1
  45. package/dist/validations/ssn.schema.mjs +1 -1
  46. package/dist/validations/unix.schema.d.ts +1 -1
  47. package/package.json +14 -19
@@ -41,15 +41,7 @@ export declare const fields: {
41
41
  firstName: import('zod').ZodString;
42
42
  lastName: import('zod').ZodString;
43
43
  middleName: import('zod').ZodString;
44
- }, "strip", import('zod').ZodTypeAny, {
45
- firstName: string;
46
- lastName: string;
47
- middleName: string;
48
- }, {
49
- firstName: string;
50
- lastName: string;
51
- middleName: string;
52
- }>;
44
+ }, import('zod/v4/core').$strip>;
53
45
  };
54
46
  firstName: {
55
47
  key: string;
@@ -120,7 +112,9 @@ export declare const fields: {
120
112
  label: string;
121
113
  placeholder: string;
122
114
  };
123
- zodSchema: import('zod').ZodEnum<[string, ...string[]]>;
115
+ zodSchema: import('zod').ZodEnum<{
116
+ [x: string]: string;
117
+ }>;
124
118
  };
125
119
  country: {
126
120
  key: string;
@@ -129,7 +123,7 @@ export declare const fields: {
129
123
  label: string;
130
124
  placeholder: string;
131
125
  };
132
- zodSchema: import('zod').ZodEffects<import('zod').ZodString, "US", string>;
126
+ zodSchema: import('zod').ZodString & import('zod').ZodType<"US", string, import('zod/v4/core').$ZodTypeInternals<"US", string>>;
133
127
  };
134
128
  zipCode: {
135
129
  key: string;
@@ -141,42 +135,16 @@ export declare const fields: {
141
135
  zodSchema: import('zod').ZodString;
142
136
  };
143
137
  };
144
- zodSchema: import('zod').ZodEffects<import('zod').ZodObject<{
138
+ zodSchema: import('zod').ZodObject<{
145
139
  line1: import('zod').ZodOptional<import('zod').ZodString>;
146
140
  line2: import('zod').ZodOptional<import('zod').ZodString>;
147
141
  city: import('zod').ZodOptional<import('zod').ZodString>;
148
- state: import('zod').ZodOptional<import('zod').ZodEnum<[string, ...string[]]>>;
149
- country: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodString, "US", string>>;
142
+ state: import('zod').ZodOptional<import('zod').ZodEnum<{
143
+ [x: string]: string;
144
+ }>>;
145
+ country: import('zod').ZodOptional<import('zod').ZodString & import('zod').ZodType<"US", string, import('zod/v4/core').$ZodTypeInternals<"US", string>>>;
150
146
  zipCode: import('zod').ZodOptional<import('zod').ZodString>;
151
- }, "strip", import('zod').ZodTypeAny, {
152
- line1?: string | undefined;
153
- line2?: string | undefined;
154
- city?: string | undefined;
155
- state?: string | undefined;
156
- country?: "US" | undefined;
157
- zipCode?: string | undefined;
158
- }, {
159
- line1?: string | undefined;
160
- line2?: string | undefined;
161
- city?: string | undefined;
162
- state?: string | undefined;
163
- country?: string | undefined;
164
- zipCode?: string | undefined;
165
- }>, {
166
- line1?: string | undefined;
167
- line2?: string | undefined;
168
- city?: string | undefined;
169
- state?: string | undefined;
170
- country?: "US" | undefined;
171
- zipCode?: string | undefined;
172
- }, {
173
- line1?: string | undefined;
174
- line2?: string | undefined;
175
- city?: string | undefined;
176
- state?: string | undefined;
177
- country?: string | undefined;
178
- zipCode?: string | undefined;
179
- }>;
147
+ }, import('zod/v4/core').$strip>;
180
148
  format: (value: {
181
149
  line1?: string;
182
150
  line2?: string;
@@ -220,7 +188,9 @@ export declare const fields: {
220
188
  label: string;
221
189
  placeholder: string;
222
190
  };
223
- zodSchema: import('zod').ZodEnum<[string, ...string[]]>;
191
+ zodSchema: import('zod').ZodEnum<{
192
+ [x: string]: string;
193
+ }>;
224
194
  };
225
195
  country: {
226
196
  key: string;
@@ -229,7 +199,7 @@ export declare const fields: {
229
199
  label: string;
230
200
  placeholder: string;
231
201
  };
232
- zodSchema: import('zod').ZodEffects<import('zod').ZodString, "US", string>;
202
+ zodSchema: import('zod').ZodString & import('zod').ZodType<"US", string, import('zod/v4/core').$ZodTypeInternals<"US", string>>;
233
203
  };
234
204
  zipCode: {
235
205
  key: string;
@@ -268,7 +238,9 @@ export declare const fields: {
268
238
  label: import('../shared/us-states').USStateName;
269
239
  }[];
270
240
  };
271
- zodSchema: import('zod').ZodEnum<[string, ...string[]]>;
241
+ zodSchema: import('zod').ZodEnum<{
242
+ [x: string]: string;
243
+ }>;
272
244
  format: (value: string) => "Alabama" | "Alaska" | "Arizona" | "Arkansas" | "California" | "Colorado" | "Connecticut" | "Delaware" | "Florida" | "Georgia" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Maryland" | "Massachusetts" | "Michigan" | "Minnesota" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Ohio" | "Oklahoma" | "Oregon" | "Pennsylvania" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming" | "District of Columbia" | "American Samoa" | "Guam" | "Northern Mariana Islands" | "Puerto Rico" | "United States Minor Outlying Islands" | "Virgin Islands";
273
245
  };
274
246
  issuanceDate: {
@@ -278,7 +250,7 @@ export declare const fields: {
278
250
  label: string;
279
251
  placeholder: string;
280
252
  };
281
- zodSchema: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>;
253
+ zodSchema: import('zod').ZodString;
282
254
  format: (value: string) => string;
283
255
  };
284
256
  expirationDate: {
@@ -288,7 +260,7 @@ export declare const fields: {
288
260
  label: string;
289
261
  placeholder: string;
290
262
  };
291
- zodSchema: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>;
263
+ zodSchema: import('zod').ZodString;
292
264
  format: (value: string) => string;
293
265
  };
294
266
  address: {
@@ -333,7 +305,9 @@ export declare const fields: {
333
305
  label: string;
334
306
  placeholder: string;
335
307
  };
336
- zodSchema: import('zod').ZodEnum<[string, ...string[]]>;
308
+ zodSchema: import('zod').ZodEnum<{
309
+ [x: string]: string;
310
+ }>;
337
311
  };
338
312
  country: {
339
313
  key: string;
@@ -342,7 +316,7 @@ export declare const fields: {
342
316
  label: string;
343
317
  placeholder: string;
344
318
  };
345
- zodSchema: import('zod').ZodEffects<import('zod').ZodString, "US", string>;
319
+ zodSchema: import('zod').ZodString & import('zod').ZodType<"US", string, import('zod/v4/core').$ZodTypeInternals<"US", string>>;
346
320
  };
347
321
  zipCode: {
348
322
  key: string;
@@ -354,42 +328,16 @@ export declare const fields: {
354
328
  zodSchema: import('zod').ZodString;
355
329
  };
356
330
  };
357
- zodSchema: import('zod').ZodEffects<import('zod').ZodObject<{
331
+ zodSchema: import('zod').ZodObject<{
358
332
  line1: import('zod').ZodOptional<import('zod').ZodString>;
359
333
  line2: import('zod').ZodOptional<import('zod').ZodString>;
360
334
  city: import('zod').ZodOptional<import('zod').ZodString>;
361
- state: import('zod').ZodOptional<import('zod').ZodEnum<[string, ...string[]]>>;
362
- country: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodString, "US", string>>;
335
+ state: import('zod').ZodOptional<import('zod').ZodEnum<{
336
+ [x: string]: string;
337
+ }>>;
338
+ country: import('zod').ZodOptional<import('zod').ZodString & import('zod').ZodType<"US", string, import('zod/v4/core').$ZodTypeInternals<"US", string>>>;
363
339
  zipCode: import('zod').ZodOptional<import('zod').ZodString>;
364
- }, "strip", import('zod').ZodTypeAny, {
365
- line1?: string | undefined;
366
- line2?: string | undefined;
367
- city?: string | undefined;
368
- state?: string | undefined;
369
- country?: "US" | undefined;
370
- zipCode?: string | undefined;
371
- }, {
372
- line1?: string | undefined;
373
- line2?: string | undefined;
374
- city?: string | undefined;
375
- state?: string | undefined;
376
- country?: string | undefined;
377
- zipCode?: string | undefined;
378
- }>, {
379
- line1?: string | undefined;
380
- line2?: string | undefined;
381
- city?: string | undefined;
382
- state?: string | undefined;
383
- country?: "US" | undefined;
384
- zipCode?: string | undefined;
385
- }, {
386
- line1?: string | undefined;
387
- line2?: string | undefined;
388
- city?: string | undefined;
389
- state?: string | undefined;
390
- country?: string | undefined;
391
- zipCode?: string | undefined;
392
- }>;
340
+ }, import('zod/v4/core').$strip>;
393
341
  format: (value: {
394
342
  line1?: string;
395
343
  line2?: string;
@@ -402,72 +350,22 @@ export declare const fields: {
402
350
  };
403
351
  zodSchema: import('zod').ZodObject<{
404
352
  documentNumber: import('zod').ZodString;
405
- issuanceState: import('zod').ZodEnum<[string, ...string[]]>;
406
- issuanceDate: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>;
407
- expirationDate: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>;
408
- address: import('zod').ZodEffects<import('zod').ZodObject<{
353
+ issuanceState: import('zod').ZodEnum<{
354
+ [x: string]: string;
355
+ }>;
356
+ issuanceDate: import('zod').ZodString;
357
+ expirationDate: import('zod').ZodString;
358
+ address: import('zod').ZodObject<{
409
359
  line1: import('zod').ZodOptional<import('zod').ZodString>;
410
360
  line2: import('zod').ZodOptional<import('zod').ZodString>;
411
361
  city: import('zod').ZodOptional<import('zod').ZodString>;
412
- state: import('zod').ZodOptional<import('zod').ZodEnum<[string, ...string[]]>>;
413
- country: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodString, "US", string>>;
362
+ state: import('zod').ZodOptional<import('zod').ZodEnum<{
363
+ [x: string]: string;
364
+ }>>;
365
+ country: import('zod').ZodOptional<import('zod').ZodString & import('zod').ZodType<"US", string, import('zod/v4/core').$ZodTypeInternals<"US", string>>>;
414
366
  zipCode: import('zod').ZodOptional<import('zod').ZodString>;
415
- }, "strip", import('zod').ZodTypeAny, {
416
- line1?: string | undefined;
417
- line2?: string | undefined;
418
- city?: string | undefined;
419
- state?: string | undefined;
420
- country?: "US" | undefined;
421
- zipCode?: string | undefined;
422
- }, {
423
- line1?: string | undefined;
424
- line2?: string | undefined;
425
- city?: string | undefined;
426
- state?: string | undefined;
427
- country?: string | undefined;
428
- zipCode?: string | undefined;
429
- }>, {
430
- line1?: string | undefined;
431
- line2?: string | undefined;
432
- city?: string | undefined;
433
- state?: string | undefined;
434
- country?: "US" | undefined;
435
- zipCode?: string | undefined;
436
- }, {
437
- line1?: string | undefined;
438
- line2?: string | undefined;
439
- city?: string | undefined;
440
- state?: string | undefined;
441
- country?: string | undefined;
442
- zipCode?: string | undefined;
443
- }>;
444
- }, "strip", import('zod').ZodTypeAny, {
445
- address: {
446
- line1?: string | undefined;
447
- line2?: string | undefined;
448
- city?: string | undefined;
449
- state?: string | undefined;
450
- country?: "US" | undefined;
451
- zipCode?: string | undefined;
452
- };
453
- documentNumber: string;
454
- issuanceState: string;
455
- issuanceDate: string;
456
- expirationDate: string;
457
- }, {
458
- address: {
459
- line1?: string | undefined;
460
- line2?: string | undefined;
461
- city?: string | undefined;
462
- state?: string | undefined;
463
- country?: string | undefined;
464
- zipCode?: string | undefined;
465
- };
466
- documentNumber: string;
467
- issuanceState: string;
468
- issuanceDate: string;
469
- expirationDate: string;
470
- }>;
367
+ }, import('zod/v4/core').$strip>;
368
+ }, import('zod/v4/core').$strip>;
471
369
  };
472
370
  documentNumber: {
473
371
  key: string;
@@ -489,7 +387,9 @@ export declare const fields: {
489
387
  label: import('../shared/us-states').USStateName;
490
388
  }[];
491
389
  };
492
- zodSchema: import('zod').ZodEnum<[string, ...string[]]>;
390
+ zodSchema: import('zod').ZodEnum<{
391
+ [x: string]: string;
392
+ }>;
493
393
  format: (value: string) => "Alabama" | "Alaska" | "Arizona" | "Arkansas" | "California" | "Colorado" | "Connecticut" | "Delaware" | "Florida" | "Georgia" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Maryland" | "Massachusetts" | "Michigan" | "Minnesota" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Ohio" | "Oklahoma" | "Oregon" | "Pennsylvania" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming" | "District of Columbia" | "American Samoa" | "Guam" | "Northern Mariana Islands" | "Puerto Rico" | "United States Minor Outlying Islands" | "Virgin Islands";
494
394
  };
495
395
  issuanceDate: {
@@ -499,7 +399,7 @@ export declare const fields: {
499
399
  label: string;
500
400
  placeholder: string;
501
401
  };
502
- zodSchema: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>;
402
+ zodSchema: import('zod').ZodString;
503
403
  format: (value: string) => string;
504
404
  };
505
405
  expirationDate: {
@@ -509,7 +409,7 @@ export declare const fields: {
509
409
  label: string;
510
410
  placeholder: string;
511
411
  };
512
- zodSchema: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>;
412
+ zodSchema: import('zod').ZodString;
513
413
  format: (value: string) => string;
514
414
  };
515
415
  healthInsurance: {
@@ -525,33 +425,9 @@ export declare const fields: {
525
425
  payer: import('zod').ZodObject<{
526
426
  verifiedId: import('zod').ZodString;
527
427
  name: import('zod').ZodString;
528
- logoUrl: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodUnion<[import('zod').ZodString, import('zod').ZodLiteral<"">]>>>;
529
- }, "strip", import('zod').ZodTypeAny, {
530
- name: string;
531
- verifiedId: string;
532
- logoUrl?: string | null | undefined;
533
- }, {
534
- name: string;
535
- verifiedId: string;
536
- logoUrl?: string | null | undefined;
537
- }>;
538
- }, "strip", import('zod').ZodTypeAny, {
539
- memberId: string;
540
- payer: {
541
- name: string;
542
- verifiedId: string;
543
- logoUrl?: string | null | undefined;
544
- };
545
- id?: number | undefined;
546
- }, {
547
- memberId: string;
548
- payer: {
549
- name: string;
550
- verifiedId: string;
551
- logoUrl?: string | null | undefined;
552
- };
553
- id?: number | undefined;
554
- }>;
428
+ logoUrl: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodUnion<readonly [import('zod').ZodURL, import('zod').ZodLiteral<"">]>>>;
429
+ }, import('zod/v4/core').$strip>;
430
+ }, import('zod/v4/core').$strip>;
555
431
  format: (value: import('../validations').HealthInsuranceValue) => string | null;
556
432
  };
557
433
  memberId: {
@@ -583,11 +459,7 @@ export declare const fields: {
583
459
  };
584
460
  zodSchema: import('zod').ZodObject<{
585
461
  name: import('zod').ZodOptional<import('zod').ZodString>;
586
- }, "strip", import('zod').ZodTypeAny, {
587
- name?: string | undefined;
588
- }, {
589
- name?: string | undefined;
590
- }>;
462
+ }, import('zod/v4/core').$strip>;
591
463
  };
592
464
  payerName: {
593
465
  key: string;
@@ -609,111 +481,19 @@ export declare const fields: {
609
481
  employer: import('zod').ZodObject<{
610
482
  name: import('zod').ZodString;
611
483
  legalName: import('zod').ZodOptional<import('zod').ZodString>;
612
- address: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodObject<{
484
+ address: import('zod').ZodOptional<import('zod').ZodObject<{
613
485
  line1: import('zod').ZodOptional<import('zod').ZodString>;
614
486
  line2: import('zod').ZodOptional<import('zod').ZodString>;
615
487
  city: import('zod').ZodOptional<import('zod').ZodString>;
616
- state: import('zod').ZodOptional<import('zod').ZodEnum<[string, ...string[]]>>;
617
- country: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodString, "US", string>>;
488
+ state: import('zod').ZodOptional<import('zod').ZodEnum<{
489
+ [x: string]: string;
490
+ }>>;
491
+ country: import('zod').ZodOptional<import('zod').ZodString & import('zod').ZodType<"US", string, import('zod/v4/core').$ZodTypeInternals<"US", string>>>;
618
492
  zipCode: import('zod').ZodOptional<import('zod').ZodString>;
619
- }, "strip", import('zod').ZodTypeAny, {
620
- line1?: string | undefined;
621
- line2?: string | undefined;
622
- city?: string | undefined;
623
- state?: string | undefined;
624
- country?: "US" | undefined;
625
- zipCode?: string | undefined;
626
- }, {
627
- line1?: string | undefined;
628
- line2?: string | undefined;
629
- city?: string | undefined;
630
- state?: string | undefined;
631
- country?: string | undefined;
632
- zipCode?: string | undefined;
633
- }>, {
634
- line1?: string | undefined;
635
- line2?: string | undefined;
636
- city?: string | undefined;
637
- state?: string | undefined;
638
- country?: "US" | undefined;
639
- zipCode?: string | undefined;
640
- }, {
641
- line1?: string | undefined;
642
- line2?: string | undefined;
643
- city?: string | undefined;
644
- state?: string | undefined;
645
- country?: string | undefined;
646
- zipCode?: string | undefined;
647
- }>, {
648
- line1?: string | undefined;
649
- line2?: string | undefined;
650
- city?: string | undefined;
651
- state?: string | undefined;
652
- country?: "US" | undefined;
653
- zipCode?: string | undefined;
654
- }, {
655
- line1?: string | undefined;
656
- line2?: string | undefined;
657
- city?: string | undefined;
658
- state?: string | undefined;
659
- country?: string | undefined;
660
- zipCode?: string | undefined;
661
- }>>;
662
- logoUrl: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodUnion<[import('zod').ZodString, import('zod').ZodLiteral<"">]>>>;
663
- }, "strip", import('zod').ZodTypeAny, {
664
- name: string;
665
- address?: {
666
- line1?: string | undefined;
667
- line2?: string | undefined;
668
- city?: string | undefined;
669
- state?: string | undefined;
670
- country?: "US" | undefined;
671
- zipCode?: string | undefined;
672
- } | undefined;
673
- logoUrl?: string | null | undefined;
674
- legalName?: string | undefined;
675
- }, {
676
- name: string;
677
- address?: {
678
- line1?: string | undefined;
679
- line2?: string | undefined;
680
- city?: string | undefined;
681
- state?: string | undefined;
682
- country?: string | undefined;
683
- zipCode?: string | undefined;
684
- } | undefined;
685
- logoUrl?: string | null | undefined;
686
- legalName?: string | undefined;
687
- }>;
688
- }, "strip", import('zod').ZodTypeAny, {
689
- employer: {
690
- name: string;
691
- address?: {
692
- line1?: string | undefined;
693
- line2?: string | undefined;
694
- city?: string | undefined;
695
- state?: string | undefined;
696
- country?: "US" | undefined;
697
- zipCode?: string | undefined;
698
- } | undefined;
699
- logoUrl?: string | null | undefined;
700
- legalName?: string | undefined;
701
- };
702
- }, {
703
- employer: {
704
- name: string;
705
- address?: {
706
- line1?: string | undefined;
707
- line2?: string | undefined;
708
- city?: string | undefined;
709
- state?: string | undefined;
710
- country?: string | undefined;
711
- zipCode?: string | undefined;
712
- } | undefined;
713
- logoUrl?: string | null | undefined;
714
- legalName?: string | undefined;
715
- };
716
- }>;
493
+ }, import('zod/v4/core').$strip>>;
494
+ logoUrl: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodUnion<readonly [import('zod').ZodURL, import('zod').ZodLiteral<"">]>>>;
495
+ }, import('zod/v4/core').$strip>;
496
+ }, import('zod/v4/core').$strip>;
717
497
  format: (value: import('../validations').EmployerValue) => string | null;
718
498
  };
719
499
  ssn: {
@@ -723,7 +503,7 @@ export declare const fields: {
723
503
  label: string;
724
504
  placeholder: string;
725
505
  };
726
- zodSchema: import('zod').ZodEffects<import('zod').ZodString, string, string>;
506
+ zodSchema: import('zod').ZodString;
727
507
  format: (value: string) => string;
728
508
  };
729
509
  phone: {
@@ -733,7 +513,7 @@ export declare const fields: {
733
513
  label: string;
734
514
  placeholder: string;
735
515
  };
736
- zodSchema: import('zod').ZodEffects<import('zod').ZodString, string, string>;
516
+ zodSchema: import('zod').ZodString;
737
517
  format: (value: string) => string;
738
518
  };
739
519
  sex: {
@@ -752,7 +532,9 @@ export declare const fields: {
752
532
  readonly value: "Non-Binary";
753
533
  }];
754
534
  };
755
- zodSchema: import('zod').ZodEnum<[string, ...string[]]>;
535
+ zodSchema: import('zod').ZodEnum<{
536
+ [x: string]: string;
537
+ }>;
756
538
  };
757
539
  birthDate: {
758
540
  key: string;
@@ -761,7 +543,7 @@ export declare const fields: {
761
543
  label: string;
762
544
  placeholder: string;
763
545
  };
764
- zodSchema: import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodEffects<import('zod').ZodString, string, string>, string, string>, string, string>;
546
+ zodSchema: import('zod').ZodString;
765
547
  format: (value: string) => string;
766
548
  };
767
549
  };
@@ -7,7 +7,7 @@ export declare const phone: {
7
7
  label: string;
8
8
  placeholder: string;
9
9
  };
10
- zodSchema: import('zod').ZodEffects<import('zod').ZodString, string, string>;
10
+ zodSchema: import('zod').ZodString;
11
11
  format: (value: string) => string;
12
12
  };
13
13
  declare module '../declarations' {
@@ -16,7 +16,9 @@ export declare const sex: {
16
16
  readonly value: "Non-Binary";
17
17
  }];
18
18
  };
19
- zodSchema: import('zod').ZodEnum<[string, ...string[]]>;
19
+ zodSchema: import('zod').ZodEnum<{
20
+ [x: string]: string;
21
+ }>;
20
22
  };
21
23
  declare module '../declarations' {
22
24
  interface FieldSchemaDefinitions {
@@ -7,7 +7,7 @@ export declare const ssn: {
7
7
  label: string;
8
8
  placeholder: string;
9
9
  };
10
- zodSchema: import('zod').ZodEffects<import('zod').ZodString, string, string>;
10
+ zodSchema: import('zod').ZodString;
11
11
  format: (value: string) => string;
12
12
  };
13
13
  declare module '../declarations' {
@@ -1 +1 @@
1
- "use strict";var y=Object.defineProperty,b=(n,e,t)=>e in n?y(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,l=(n,e,t)=>b(n,typeof e!="symbol"?e+"":e,t);import{z as v}from"zod";import m from"lodash/cloneDeep";import g from"lodash/isEqual";class p{constructor(e,t,s,i,r={}){if(l(this,"id"),l(this,"_defaultValue"),l(this,"_value"),l(this,"schema"),l(this,"children"),l(this,"touched"),l(this,"allowUserInput"),l(this,"mandatory"),l(this,"multi"),l(this,"variants"),l(this,"description"),this.id=e,this._defaultValue=t,this._value=s,this.children=r.children,this.touched=!1,this.allowUserInput=r.allowUserInput??!0,this.mandatory=r.mandatory??"no",this.multi=r.multi??!1,this.variants=r.variants,this.description=r.description,i.characteristics.inputType==="composite"&&r.children)if("_def"in i.zodSchema&&i.zodSchema._def.typeName==="ZodEffects")this.schema=i;else{let a;if("shape"in i.zodSchema)a=i.zodSchema;else throw new Error("Composite field could not be modified.");const h=a.shape,o={};Object.entries(r.children).forEach(([c,u])=>{if(h[c]){const d=h[c];u.isRequired?d instanceof v.ZodString?o[c]=d.refine(f=>!u.isRequired&&u.isEmpty?!0:f!==""&&f!==null&&f!==void 0,`${u.schema.characteristics.label} is required`):o[c]=d:o[c]=d.optional()}}),this.schema={...i,zodSchema:v.object(o)}}else this.schema={...i,zodSchema:i.zodSchema.refine(a=>!this.isRequired&&this.isEmpty?!0:a!==""&&a!==null&&a!==void 0,`${i.characteristics.label} is required`)}}get defaultValue(){if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,s])=>{e[t]=s.defaultValue}),Object.keys(e).length>0?e:void 0}return this._defaultValue}get value(){if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,s])=>{s.schema.characteristics.inputType==="composite"?e[t]=s.value:e[t]=s.isEmpty?"":s.value}),Object.keys(e).length>0?e:void 0}return this._value}set value(e){this._value=e}get hasVariants(){return this.variants?this.variants.length>1:!1}get isValid(){return this.errors===null}get isRequired(){return this.mandatory==="yes"||this.mandatory==="if_available"}get isDisabled(){return!this.allowUserInput}get isEmpty(){const e=t=>t==null||t===""?!0:typeof t=="object"&&t!==null?Object.values(t).every(e):!1;return e(this.value)}get isDirty(){return this.schema.characteristics.inputType==="composite"&&this.children?Object.values(this.children).some(e=>e.isDirty):!g(this._value,this._defaultValue)}get errors(){let e=null;const t={};if(this.schema.characteristics.inputType==="composite"&&this.children){const s={};Object.entries(this.children).forEach(([r,a])=>{a.isEmpty&&!a.isRequired?s[r]=void 0:s[r]=a.value});const i=this.schema.zodSchema.safeParse(s);e=i.success?null:i.error,e!=null&&e.issues&&e.issues.length>0||Object.entries(this.children).forEach(([r,a])=>{const h=a.errors;h&&(t[r]=h)})}else if(!this.isRequired&&this.isEmpty)e=null;else{const s=this.schema.zodSchema.safeParse(this.value);e=s.success?null:s.error}return!e&&Object.keys(t).length===0?null:{error:e,childrenErrors:t}}get errorMessage(){var e,t,s,i;return((i=(s=(t=(e=this.errors)==null?void 0:e.error)==null?void 0:t.issues)==null?void 0:s.find(r=>typeof r.message=="string"))==null?void 0:i.message)??null}get displayValue(){if(typeof this.schema.format=="function")if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,s])=>{e[t]=s.value}),this.schema.format(e)??null}else return this.isEmpty?null:this.schema.format(this.value)??this.value;return this.value}replaceWithVariant(e){if(!this.variants){console.warn(`Field ${this.id} has no variants`);return}const t=this.variants.find(i=>i.id===e);if(!t){console.warn(`Variant ${e} not found for field ${this.id}`);return}const s=this.variants;this.id=t.id,this.schema=t.schema,this.description=t.description,this.allowUserInput=t.allowUserInput,this.mandatory=t.mandatory,this.multi=t.multi,this._value=t.value&&typeof t.value=="object"?m(t.value):t.value,this._defaultValue=t.defaultValue&&typeof t.defaultValue=="object"?m(t.defaultValue):t.defaultValue,this.variants=s,t.children?(this.children={},Object.entries(t.children).forEach(([i,r])=>{this.children&&(this.children[i]=this.deepCloneFormField(r))})):this.children=void 0}deepCloneFormField(e){const t=e._value&&typeof e._value=="object"?m(e._value):e._value,s=e._defaultValue&&typeof e._defaultValue=="object"?m(e._defaultValue):e._defaultValue;let i;return e.children&&(i={},Object.entries(e.children).forEach(([r,a])=>{i&&(i[r]=this.deepCloneFormField(a))})),new p(e.id,s,t,e.schema,{children:i,allowUserInput:e.allowUserInput,mandatory:e.mandatory,multi:e.multi,variants:e.variants,description:e.description})}}export{p as FormField};
1
+ "use strict";var b=Object.defineProperty,g=(n,e,t)=>e in n?b(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,l=(n,e,t)=>g(n,typeof e!="symbol"?e+"":e,t);import{z as v}from"zod";import m from"lodash/cloneDeep";import V from"lodash/isEqual";const y=n=>{var e;return((e=n.def.checks)==null?void 0:e.some(t=>t._zod.def.check==="custom"))??!1};class f{constructor(e,t,i,s,r={}){if(l(this,"id"),l(this,"_defaultValue"),l(this,"_value"),l(this,"schema"),l(this,"children"),l(this,"touched"),l(this,"allowUserInput"),l(this,"mandatory"),l(this,"multi"),l(this,"variants"),l(this,"description"),this.id=e,this._defaultValue=t,this._value=i,this.children=r.children,this.touched=!1,this.allowUserInput=r.allowUserInput??!0,this.mandatory=r.mandatory??"no",this.multi=r.multi??!1,this.variants=r.variants,this.description=r.description,s.characteristics.inputType==="composite"&&r.children)if(y(s.zodSchema))this.schema=s;else{let a;if("shape"in s.zodSchema)a=s.zodSchema;else throw new Error("Composite field could not be modified.");const h=a.shape,u={};Object.entries(r.children).forEach(([c,d])=>{if(h[c]){const o=h[c];d.isRequired?o instanceof v.ZodString&&!y(o)?u[c]=o.refine(p=>!d.isRequired&&d.isEmpty?!0:p!==""&&p!==null&&p!==void 0,`${d.schema.characteristics.label} is required`):u[c]=o:u[c]=o.optional()}}),this.schema={...s,zodSchema:v.object(u)}}else this.schema={...s,zodSchema:s.zodSchema.refine(a=>!this.isRequired&&this.isEmpty?!0:a!==""&&a!==null&&a!==void 0,`${s.characteristics.label} is required`)}}get defaultValue(){if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,i])=>{e[t]=i.defaultValue}),Object.keys(e).length>0?e:void 0}return this._defaultValue}get value(){if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,i])=>{i.schema.characteristics.inputType==="composite"?e[t]=i.value:e[t]=i.isEmpty?"":i.value}),Object.keys(e).length>0?e:void 0}return this._value}set value(e){this._value=e}get hasVariants(){return this.variants?this.variants.length>1:!1}get isValid(){return this.errors===null}get isRequired(){return this.mandatory==="yes"||this.mandatory==="if_available"}get isDisabled(){return!this.allowUserInput}get isEmpty(){const e=t=>t==null||t===""?!0:typeof t=="object"&&t!==null?Object.values(t).every(e):!1;return e(this.value)}get isDirty(){return this.schema.characteristics.inputType==="composite"&&this.children?Object.values(this.children).some(e=>e.isDirty):!V(this._value,this._defaultValue)}get errors(){let e=null;const t={};if(this.schema.characteristics.inputType==="composite"&&this.children){const i={};Object.entries(this.children).forEach(([r,a])=>{a.isEmpty&&!a.isRequired?i[r]=void 0:i[r]=a.value});const s=this.schema.zodSchema.safeParse(i);e=s.success?null:s.error,e!=null&&e.issues&&e.issues.length>0||Object.entries(this.children).forEach(([r,a])=>{const h=a.errors;h&&(t[r]=h)})}else if(!this.isRequired&&this.isEmpty)e=null;else{const i=this.schema.zodSchema.safeParse(this.value);e=i.success?null:i.error}return!e&&Object.keys(t).length===0?null:{error:e,childrenErrors:t}}get errorMessage(){var e,t,i,s;return((s=(i=(t=(e=this.errors)==null?void 0:e.error)==null?void 0:t.issues)==null?void 0:i.find(r=>typeof r.message=="string"))==null?void 0:s.message)??null}get displayValue(){if(typeof this.schema.format=="function")if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,i])=>{e[t]=i.value}),this.schema.format(e)??null}else return this.isEmpty?null:this.schema.format(this.value)??this.value;return this.value}replaceWithVariant(e){if(!this.variants){console.warn(`Field ${this.id} has no variants`);return}const t=this.variants.find(s=>s.id===e);if(!t){console.warn(`Variant ${e} not found for field ${this.id}`);return}const i=this.variants;this.id=t.id,this.schema=t.schema,this.description=t.description,this.allowUserInput=t.allowUserInput,this.mandatory=t.mandatory,this.multi=t.multi,this._value=t.value&&typeof t.value=="object"?m(t.value):t.value,this._defaultValue=t.defaultValue&&typeof t.defaultValue=="object"?m(t.defaultValue):t.defaultValue,this.variants=i,t.children?(this.children={},Object.entries(t.children).forEach(([s,r])=>{this.children&&(this.children[s]=this.deepCloneFormField(r))})):this.children=void 0}deepCloneFormField(e){const t=e._value&&typeof e._value=="object"?m(e._value):e._value,i=e._defaultValue&&typeof e._defaultValue=="object"?m(e._defaultValue):e._defaultValue;let s;return e.children&&(s={},Object.entries(e.children).forEach(([r,a])=>{s&&(s[r]=this.deepCloneFormField(a))})),new f(e.id,i,t,e.schema,{children:s,allowUserInput:e.allowUserInput,mandatory:e.mandatory,multi:e.multi,variants:e.variants,description:e.description})}}export{f as FormField};
@@ -1 +1 @@
1
- "use strict";import b from"lodash/cloneDeep";import{z as d}from"zod";import{fields as y}from"../fields/index.mjs";import{FormField as v}from"./formField.mjs";import{normalizeCredentialType as w}from"./utils.mjs";import{fieldInputTypes as p}from"../fields/constants.mjs";function m(o){if(o instanceof d.ZodObject){const e=o.shape;return Object.fromEntries(Object.entries(e).map(([i,t])=>[i,m(t)]))}if(!(o instanceof d.ZodOptional||o instanceof d.ZodNullable)){if(o instanceof d.ZodEffects)return m(o.innerType());if(o instanceof d.ZodDefault)return o._def.defaultValue();if(o instanceof d.ZodLiteral)return o.value;if(o instanceof d.ZodString)return""}}class j{createFromCredential(e,i,t,r){var l;const a=y[e.type];if(!a)throw new Error(`Invalid credential type: ${e.type}`);const u=a.key;let n;if(a.characteristics.inputType===p.composite)if(e.value&&Object.keys(e.value).length>0)if(i&&Object.keys(i).length>0){const s={};Object.keys(i).forEach(c=>{c in e.value&&(s[c]=e.value[c])}),n=Object.keys(s).length>0?s:void 0}else n=e.value;else n=void 0;else n=(l=e.value)==null?void 0:l[u];return new v(e.uuid,n,n,a,{children:i,allowUserInput:t?.allowUserInput??!0,mandatory:t?.mandatory??"no",multi:t?.multi??!1,variants:r,description:t?.description})}createFromSchema(e,i,t){let r,l;const a={allowUserInput:e.allowUserInput??t?.allowUserInput??!0,mandatory:e.mandatory??t?.mandatory??"no",multi:e.multi??!1,description:e.description};if(i.characteristics.inputType===p.composite&&e.children){const n={};for(const s of e.children){const c=w(s.type),f=y[c];if(f){const h=this.createFromSchema(s,f,e);n[f.key]=h}}l=Object.keys(n).length>0?n:void 0}if(i.characteristics.inputType===p.composite)if(l&&Object.keys(l).length>0){const n={};Object.entries(l).forEach(([s,c])=>{n[s]=c.defaultValue}),r=n}else r=m(i.zodSchema);else r="";const u=typeof r=="object"&&r!==null?b(r):r;return new v(void 0,r,u,i,{children:l,allowUserInput:a.allowUserInput,mandatory:a.mandatory,multi:a.multi,variants:void 0,description:a.description})}}export{j as FormFieldBuilder};
1
+ "use strict";import b from"lodash/cloneDeep";import{z as d}from"zod";import{fields as y}from"../fields/index.mjs";import{FormField as v}from"./formField.mjs";import{normalizeCredentialType as w}from"./utils.mjs";import{fieldInputTypes as m}from"../fields/constants.mjs";function f(n){if(n instanceof d.ZodObject){const e=n.shape;return Object.fromEntries(Object.entries(e).map(([i,t])=>[i,f(t)]))}if(!(n instanceof d.ZodOptional||n instanceof d.ZodNullable)){if(n instanceof d.ZodPipe)return f(n.in);if(n instanceof d.ZodDefault)return n.def.defaultValue;if(n instanceof d.ZodLiteral)return n.value;if(n instanceof d.ZodString)return""}}class j{createFromCredential(e,i,t,r){var l;const a=y[e.type];if(!a)throw new Error(`Invalid credential type: ${e.type}`);const u=a.key;let o;if(a.characteristics.inputType===m.composite)if(e.value&&Object.keys(e.value).length>0)if(i&&Object.keys(i).length>0){const s={};Object.keys(i).forEach(c=>{c in e.value&&(s[c]=e.value[c])}),o=Object.keys(s).length>0?s:void 0}else o=e.value;else o=void 0;else o=(l=e.value)==null?void 0:l[u];return new v(e.uuid,o,o,a,{children:i,allowUserInput:t?.allowUserInput??!0,mandatory:t?.mandatory??"no",multi:t?.multi??!1,variants:r,description:t?.description})}createFromSchema(e,i,t){let r,l;const a={allowUserInput:e.allowUserInput??t?.allowUserInput??!0,mandatory:e.mandatory??t?.mandatory??"no",multi:e.multi??!1,description:e.description};if(i.characteristics.inputType===m.composite&&e.children){const o={};for(const s of e.children){const c=w(s.type),p=y[c];if(p){const h=this.createFromSchema(s,p,e);o[p.key]=h}}l=Object.keys(o).length>0?o:void 0}if(i.characteristics.inputType===m.composite)if(l&&Object.keys(l).length>0){const o={};Object.entries(l).forEach(([s,c])=>{o[s]=c.defaultValue}),r=o}else r=f(i.zodSchema);else r="";const u=typeof r=="object"&&r!==null?b(r):r;return new v(void 0,r,u,i,{children:l,allowUserInput:a.allowUserInput,mandatory:a.mandatory,multi:a.multi,variants:void 0,description:a.description})}}export{j as FormFieldBuilder};