@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.
- package/dist/components/NetworkRules/editor/schema.d.ts +14 -110
- package/dist/components/NetworkRules/editor/schema.mjs +1 -1
- package/dist/components/form/NewOneClickForm/core/fields/address.d.ts +14 -36
- package/dist/components/form/NewOneClickForm/core/fields/birthDate.d.ts +1 -1
- package/dist/components/form/NewOneClickForm/core/fields/driversLicense.d.ts +32 -102
- package/dist/components/form/NewOneClickForm/core/fields/employer.d.ts +9 -101
- package/dist/components/form/NewOneClickForm/core/fields/fullName.d.ts +1 -9
- package/dist/components/form/NewOneClickForm/core/fields/healthInsurance.d.ts +4 -32
- package/dist/components/form/NewOneClickForm/core/fields/index.d.ts +66 -284
- package/dist/components/form/NewOneClickForm/core/fields/phone.d.ts +1 -1
- package/dist/components/form/NewOneClickForm/core/fields/sex.d.ts +3 -1
- package/dist/components/form/NewOneClickForm/core/fields/ssn.d.ts +1 -1
- package/dist/components/form/NewOneClickForm/core/form/formField.mjs +1 -1
- package/dist/components/form/NewOneClickForm/core/form/formFieldBuilder.mjs +1 -1
- package/dist/components/form/NewOneClickForm/core/validations/address/address.schema.d.ts +12 -78
- package/dist/components/form/NewOneClickForm/core/validations/address/address.schema.mjs +1 -1
- package/dist/components/form/NewOneClickForm/core/validations/address/country.schema.d.ts +1 -1
- package/dist/components/form/NewOneClickForm/core/validations/address/state.schema.d.ts +3 -1
- package/dist/components/form/NewOneClickForm/core/validations/driversLicense/driversLicense.schema.d.ts +12 -62
- package/dist/components/form/NewOneClickForm/core/validations/employer/employer.schema.d.ts +9 -101
- package/dist/components/form/NewOneClickForm/core/validations/employer/employer.schema.mjs +1 -1
- package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/healthInsurance.schema.d.ts +3 -27
- package/dist/components/form/NewOneClickForm/core/validations/healthInsurance/healthInsurance.schema.mjs +1 -1
- package/dist/components/form/NewOneClickForm/core/validations/name/fullName.schema.d.ts +1 -9
- package/dist/components/form/NewOneClickForm/core/validations/other/birthDate.schema.d.ts +1 -1
- package/dist/components/form/NewOneClickForm/core/validations/other/date.schema.d.ts +1 -1
- package/dist/components/form/NewOneClickForm/core/validations/other/phone.schema.d.ts +1 -1
- package/dist/components/form/NewOneClickForm/core/validations/other/sex.schema.d.ts +3 -1
- package/dist/components/form/NewOneClickForm/core/validations/other/sex.schema.mjs +1 -1
- package/dist/components/form/NewOneClickForm/core/validations/other/ssn.schema.d.ts +1 -1
- package/dist/components/form/NewOneClickForm/react/core/field.hook.mjs +1 -1
- package/dist/components/form/NewOneClickForm/react/ui/fields/shared.d.ts +4 -4
- package/dist/hooks/useQRCode.mjs +1 -1
- package/dist/utils/zod.d.ts +6 -0
- package/dist/utils/zod.mjs +1 -0
- package/dist/validations/address.schema.d.ts +3 -1
- package/dist/validations/date.schema.d.ts +4 -4
- package/dist/validations/date.schema.mjs +1 -1
- package/dist/validations/email.schema.d.ts +2 -2
- package/dist/validations/email.schema.mjs +1 -1
- package/dist/validations/field.schema.mjs +1 -1
- package/dist/validations/npi.schema.d.ts +1 -1
- package/dist/validations/phone.schema.d.ts +1 -1
- package/dist/validations/ssn.schema.d.ts +1 -1
- package/dist/validations/ssn.schema.mjs +1 -1
- package/dist/validations/unix.schema.d.ts +1 -1
- package/package.json +14 -19
|
@@ -1,87 +1,21 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const addressSchema: z.
|
|
2
|
+
export declare const addressSchema: z.ZodObject<{
|
|
3
3
|
line1: z.ZodOptional<z.ZodString>;
|
|
4
4
|
line2: z.ZodOptional<z.ZodString>;
|
|
5
5
|
city: z.ZodOptional<z.ZodString>;
|
|
6
|
-
state: z.ZodOptional<z.ZodEnum<
|
|
7
|
-
|
|
6
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
7
|
+
[x: string]: string;
|
|
8
|
+
}>>;
|
|
9
|
+
country: z.ZodOptional<z.ZodString & z.ZodType<"US", string, z.core.$ZodTypeInternals<"US", string>>>;
|
|
8
10
|
zipCode: z.ZodOptional<z.ZodString>;
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
line2?: string | undefined;
|
|
12
|
-
city?: string | undefined;
|
|
13
|
-
state?: string | undefined;
|
|
14
|
-
country?: "US" | undefined;
|
|
15
|
-
zipCode?: string | undefined;
|
|
16
|
-
}, {
|
|
17
|
-
line1?: string | undefined;
|
|
18
|
-
line2?: string | undefined;
|
|
19
|
-
city?: string | undefined;
|
|
20
|
-
state?: string | undefined;
|
|
21
|
-
country?: string | undefined;
|
|
22
|
-
zipCode?: string | undefined;
|
|
23
|
-
}>, {
|
|
24
|
-
line1?: string | undefined;
|
|
25
|
-
line2?: string | undefined;
|
|
26
|
-
city?: string | undefined;
|
|
27
|
-
state?: string | undefined;
|
|
28
|
-
country?: "US" | undefined;
|
|
29
|
-
zipCode?: string | undefined;
|
|
30
|
-
}, {
|
|
31
|
-
line1?: string | undefined;
|
|
32
|
-
line2?: string | undefined;
|
|
33
|
-
city?: string | undefined;
|
|
34
|
-
state?: string | undefined;
|
|
35
|
-
country?: string | undefined;
|
|
36
|
-
zipCode?: string | undefined;
|
|
37
|
-
}>;
|
|
38
|
-
export declare const requiredAddressSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const requiredAddressSchema: z.ZodObject<{
|
|
39
13
|
line1: z.ZodOptional<z.ZodString>;
|
|
40
14
|
line2: z.ZodOptional<z.ZodString>;
|
|
41
15
|
city: z.ZodOptional<z.ZodString>;
|
|
42
|
-
state: z.ZodOptional<z.ZodEnum<
|
|
43
|
-
|
|
16
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
[x: string]: string;
|
|
18
|
+
}>>;
|
|
19
|
+
country: z.ZodOptional<z.ZodString & z.ZodType<"US", string, z.core.$ZodTypeInternals<"US", string>>>;
|
|
44
20
|
zipCode: z.ZodOptional<z.ZodString>;
|
|
45
|
-
},
|
|
46
|
-
line1?: string | undefined;
|
|
47
|
-
line2?: string | undefined;
|
|
48
|
-
city?: string | undefined;
|
|
49
|
-
state?: string | undefined;
|
|
50
|
-
country?: "US" | undefined;
|
|
51
|
-
zipCode?: string | undefined;
|
|
52
|
-
}, {
|
|
53
|
-
line1?: string | undefined;
|
|
54
|
-
line2?: string | undefined;
|
|
55
|
-
city?: string | undefined;
|
|
56
|
-
state?: string | undefined;
|
|
57
|
-
country?: string | undefined;
|
|
58
|
-
zipCode?: string | undefined;
|
|
59
|
-
}>, {
|
|
60
|
-
line1?: string | undefined;
|
|
61
|
-
line2?: string | undefined;
|
|
62
|
-
city?: string | undefined;
|
|
63
|
-
state?: string | undefined;
|
|
64
|
-
country?: "US" | undefined;
|
|
65
|
-
zipCode?: string | undefined;
|
|
66
|
-
}, {
|
|
67
|
-
line1?: string | undefined;
|
|
68
|
-
line2?: string | undefined;
|
|
69
|
-
city?: string | undefined;
|
|
70
|
-
state?: string | undefined;
|
|
71
|
-
country?: string | undefined;
|
|
72
|
-
zipCode?: string | undefined;
|
|
73
|
-
}>, {
|
|
74
|
-
line1?: string | undefined;
|
|
75
|
-
line2?: string | undefined;
|
|
76
|
-
city?: string | undefined;
|
|
77
|
-
state?: string | undefined;
|
|
78
|
-
country?: "US" | undefined;
|
|
79
|
-
zipCode?: string | undefined;
|
|
80
|
-
}, {
|
|
81
|
-
line1?: string | undefined;
|
|
82
|
-
line2?: string | undefined;
|
|
83
|
-
city?: string | undefined;
|
|
84
|
-
state?: string | undefined;
|
|
85
|
-
country?: string | undefined;
|
|
86
|
-
zipCode?: string | undefined;
|
|
87
|
-
}>;
|
|
21
|
+
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as
|
|
1
|
+
"use strict";import{z as h}from"zod";import{line1Schema as s,line1ValidationMessage as o}from"./line1.schema.mjs";import{line2Schema as O}from"./line2.schema.mjs";import{citySchema as c,cityValidationMessage as r}from"./city.schema.mjs";import{stateSchema as p,stateValidationMessage as i}from"./state.schema.mjs";import{countrySchema as l,countryValidationMessage as n}from"./country.schema.mjs";import{zipCodeSchema as y,zipCodeValidationMessage as d}from"./zipcode.schema.mjs";const m=h.object({line1:s.optional(),line2:O.optional(),city:c.optional(),state:p.optional(),country:l.optional(),zipCode:y.optional()}).superRefine((e,t)=>{Object.values(e).every(a=>!a)||(Object.prototype.hasOwnProperty.call(e,"line1")||Object.prototype.hasOwnProperty.call(e,"line2")||Object.prototype.hasOwnProperty.call(e,"city")||Object.prototype.hasOwnProperty.call(e,"state")||Object.prototype.hasOwnProperty.call(e,"country")||Object.prototype.hasOwnProperty.call(e,"zipCode"))&&(Object.prototype.hasOwnProperty.call(e,"line1")&&(!e.line1||e.line1.trim()==="")&&(s.safeParse(e.line1).success||t.addIssue({code:"custom",path:["line1"],message:o})),Object.prototype.hasOwnProperty.call(e,"city")&&(!e.city||e.city.trim()==="")&&(c.safeParse(e.city).success||t.addIssue({code:"custom",path:["city"],message:r})),Object.prototype.hasOwnProperty.call(e,"state")&&(p.safeParse(e.state).success||t.addIssue({code:"custom",path:["state"],message:i})),Object.prototype.hasOwnProperty.call(e,"country")&&(l.safeParse(e.country).success||t.addIssue({code:"custom",path:["country"],message:n})),Object.prototype.hasOwnProperty.call(e,"zipCode")&&(y.safeParse(e.zipCode).success||t.addIssue({code:"custom",path:["zipCode"],message:d})))}),f=[["line1",o],["city",r],["state",i],["zipCode",d],["country",n]],P=m.superRefine((e,t)=>{f.forEach(([a,u])=>{e[a]||t.addIssue({code:"custom",path:[a],message:u})})});export{m as addressSchema,P as requiredAddressSchema};
|
|
@@ -4,4 +4,4 @@ export declare const countryValidationMessage = "Country must be US";
|
|
|
4
4
|
* Validation schema for country
|
|
5
5
|
* Currently only supports US
|
|
6
6
|
*/
|
|
7
|
-
export declare const countrySchema: z.
|
|
7
|
+
export declare const countrySchema: z.ZodString & z.ZodType<"US", string, z.core.$ZodTypeInternals<"US", string>>;
|
|
@@ -4,4 +4,6 @@ export declare const stateValidationMessage = "Invalid state";
|
|
|
4
4
|
* Validation schema for US state
|
|
5
5
|
* Validates against US state codes
|
|
6
6
|
*/
|
|
7
|
-
export declare const stateSchema: z.ZodEnum<
|
|
7
|
+
export declare const stateSchema: z.ZodEnum<{
|
|
8
|
+
[x: string]: string;
|
|
9
|
+
}>;
|
|
@@ -1,69 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const driversLicenseSchema: z.ZodObject<{
|
|
3
3
|
documentNumber: z.ZodString;
|
|
4
|
-
issuanceState: z.ZodEnum<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
issuanceState: z.ZodEnum<{
|
|
5
|
+
[x: string]: string;
|
|
6
|
+
}>;
|
|
7
|
+
issuanceDate: z.ZodString;
|
|
8
|
+
expirationDate: z.ZodString;
|
|
9
|
+
address: z.ZodObject<{
|
|
8
10
|
line1: z.ZodOptional<z.ZodString>;
|
|
9
11
|
line2: z.ZodOptional<z.ZodString>;
|
|
10
12
|
city: z.ZodOptional<z.ZodString>;
|
|
11
|
-
state: z.ZodOptional<z.ZodEnum<
|
|
12
|
-
|
|
13
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
[x: string]: string;
|
|
15
|
+
}>>;
|
|
16
|
+
country: z.ZodOptional<z.ZodString & z.ZodType<"US", string, z.core.$ZodTypeInternals<"US", string>>>;
|
|
13
17
|
zipCode: z.ZodOptional<z.ZodString>;
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
line2?: string | undefined;
|
|
17
|
-
city?: string | undefined;
|
|
18
|
-
state?: string | undefined;
|
|
19
|
-
country?: "US" | undefined;
|
|
20
|
-
zipCode?: string | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
line1?: string | undefined;
|
|
23
|
-
line2?: string | undefined;
|
|
24
|
-
city?: string | undefined;
|
|
25
|
-
state?: string | undefined;
|
|
26
|
-
country?: string | undefined;
|
|
27
|
-
zipCode?: string | undefined;
|
|
28
|
-
}>, {
|
|
29
|
-
line1?: string | undefined;
|
|
30
|
-
line2?: string | undefined;
|
|
31
|
-
city?: string | undefined;
|
|
32
|
-
state?: string | undefined;
|
|
33
|
-
country?: "US" | undefined;
|
|
34
|
-
zipCode?: string | undefined;
|
|
35
|
-
}, {
|
|
36
|
-
line1?: string | undefined;
|
|
37
|
-
line2?: string | undefined;
|
|
38
|
-
city?: string | undefined;
|
|
39
|
-
state?: string | undefined;
|
|
40
|
-
country?: string | undefined;
|
|
41
|
-
zipCode?: string | undefined;
|
|
42
|
-
}>;
|
|
43
|
-
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
address: {
|
|
45
|
-
line1?: string | undefined;
|
|
46
|
-
line2?: string | undefined;
|
|
47
|
-
city?: string | undefined;
|
|
48
|
-
state?: string | undefined;
|
|
49
|
-
country?: "US" | undefined;
|
|
50
|
-
zipCode?: string | undefined;
|
|
51
|
-
};
|
|
52
|
-
documentNumber: string;
|
|
53
|
-
issuanceState: string;
|
|
54
|
-
issuanceDate: string;
|
|
55
|
-
expirationDate: string;
|
|
56
|
-
}, {
|
|
57
|
-
address: {
|
|
58
|
-
line1?: string | undefined;
|
|
59
|
-
line2?: string | undefined;
|
|
60
|
-
city?: string | undefined;
|
|
61
|
-
state?: string | undefined;
|
|
62
|
-
country?: string | undefined;
|
|
63
|
-
zipCode?: string | undefined;
|
|
64
|
-
};
|
|
65
|
-
documentNumber: string;
|
|
66
|
-
issuanceState: string;
|
|
67
|
-
issuanceDate: string;
|
|
68
|
-
expirationDate: string;
|
|
69
|
-
}>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
}, z.core.$strip>;
|
|
@@ -3,109 +3,17 @@ export declare const employerSchema: z.ZodObject<{
|
|
|
3
3
|
employer: z.ZodObject<{
|
|
4
4
|
name: z.ZodString;
|
|
5
5
|
legalName: z.ZodOptional<z.ZodString>;
|
|
6
|
-
address: z.ZodOptional<z.
|
|
6
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
7
7
|
line1: z.ZodOptional<z.ZodString>;
|
|
8
8
|
line2: z.ZodOptional<z.ZodString>;
|
|
9
9
|
city: z.ZodOptional<z.ZodString>;
|
|
10
|
-
state: z.ZodOptional<z.ZodEnum<
|
|
11
|
-
|
|
10
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
[x: string]: string;
|
|
12
|
+
}>>;
|
|
13
|
+
country: z.ZodOptional<z.ZodString & z.ZodType<"US", string, z.core.$ZodTypeInternals<"US", string>>>;
|
|
12
14
|
zipCode: z.ZodOptional<z.ZodString>;
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
state?: string | undefined;
|
|
18
|
-
country?: "US" | undefined;
|
|
19
|
-
zipCode?: string | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
line1?: string | undefined;
|
|
22
|
-
line2?: string | undefined;
|
|
23
|
-
city?: string | undefined;
|
|
24
|
-
state?: string | undefined;
|
|
25
|
-
country?: string | undefined;
|
|
26
|
-
zipCode?: string | undefined;
|
|
27
|
-
}>, {
|
|
28
|
-
line1?: string | undefined;
|
|
29
|
-
line2?: string | undefined;
|
|
30
|
-
city?: string | undefined;
|
|
31
|
-
state?: string | undefined;
|
|
32
|
-
country?: "US" | undefined;
|
|
33
|
-
zipCode?: string | undefined;
|
|
34
|
-
}, {
|
|
35
|
-
line1?: string | undefined;
|
|
36
|
-
line2?: string | undefined;
|
|
37
|
-
city?: string | undefined;
|
|
38
|
-
state?: string | undefined;
|
|
39
|
-
country?: string | undefined;
|
|
40
|
-
zipCode?: string | undefined;
|
|
41
|
-
}>, {
|
|
42
|
-
line1?: string | undefined;
|
|
43
|
-
line2?: string | undefined;
|
|
44
|
-
city?: string | undefined;
|
|
45
|
-
state?: string | undefined;
|
|
46
|
-
country?: "US" | undefined;
|
|
47
|
-
zipCode?: string | undefined;
|
|
48
|
-
}, {
|
|
49
|
-
line1?: string | undefined;
|
|
50
|
-
line2?: string | undefined;
|
|
51
|
-
city?: string | undefined;
|
|
52
|
-
state?: string | undefined;
|
|
53
|
-
country?: string | undefined;
|
|
54
|
-
zipCode?: string | undefined;
|
|
55
|
-
}>>;
|
|
56
|
-
logoUrl: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>>;
|
|
57
|
-
}, "strip", z.ZodTypeAny, {
|
|
58
|
-
name: string;
|
|
59
|
-
address?: {
|
|
60
|
-
line1?: string | undefined;
|
|
61
|
-
line2?: string | undefined;
|
|
62
|
-
city?: string | undefined;
|
|
63
|
-
state?: string | undefined;
|
|
64
|
-
country?: "US" | undefined;
|
|
65
|
-
zipCode?: string | undefined;
|
|
66
|
-
} | undefined;
|
|
67
|
-
logoUrl?: string | null | undefined;
|
|
68
|
-
legalName?: string | undefined;
|
|
69
|
-
}, {
|
|
70
|
-
name: string;
|
|
71
|
-
address?: {
|
|
72
|
-
line1?: string | undefined;
|
|
73
|
-
line2?: string | undefined;
|
|
74
|
-
city?: string | undefined;
|
|
75
|
-
state?: string | undefined;
|
|
76
|
-
country?: string | undefined;
|
|
77
|
-
zipCode?: string | undefined;
|
|
78
|
-
} | undefined;
|
|
79
|
-
logoUrl?: string | null | undefined;
|
|
80
|
-
legalName?: string | undefined;
|
|
81
|
-
}>;
|
|
82
|
-
}, "strip", z.ZodTypeAny, {
|
|
83
|
-
employer: {
|
|
84
|
-
name: string;
|
|
85
|
-
address?: {
|
|
86
|
-
line1?: string | undefined;
|
|
87
|
-
line2?: string | undefined;
|
|
88
|
-
city?: string | undefined;
|
|
89
|
-
state?: string | undefined;
|
|
90
|
-
country?: "US" | undefined;
|
|
91
|
-
zipCode?: string | undefined;
|
|
92
|
-
} | undefined;
|
|
93
|
-
logoUrl?: string | null | undefined;
|
|
94
|
-
legalName?: string | undefined;
|
|
95
|
-
};
|
|
96
|
-
}, {
|
|
97
|
-
employer: {
|
|
98
|
-
name: string;
|
|
99
|
-
address?: {
|
|
100
|
-
line1?: string | undefined;
|
|
101
|
-
line2?: string | undefined;
|
|
102
|
-
city?: string | undefined;
|
|
103
|
-
state?: string | undefined;
|
|
104
|
-
country?: string | undefined;
|
|
105
|
-
zipCode?: string | undefined;
|
|
106
|
-
} | undefined;
|
|
107
|
-
logoUrl?: string | null | undefined;
|
|
108
|
-
legalName?: string | undefined;
|
|
109
|
-
};
|
|
110
|
-
}>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
logoUrl: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
}, z.core.$strip>;
|
|
111
19
|
export type EmployerValue = z.infer<typeof employerSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as e}from"zod";import{employerNameSchema as o}from"./employerName.schema.mjs";import{legalNameSchema as r}from"./legalName.schema.mjs";import{requiredAddressSchema as
|
|
1
|
+
"use strict";import{z as e}from"zod";import{employerNameSchema as o}from"./employerName.schema.mjs";import{legalNameSchema as r}from"./legalName.schema.mjs";import{requiredAddressSchema as a}from"../address/address.schema.mjs";const m=e.object({employer:e.object({name:o,legalName:r.optional(),address:a.optional(),logoUrl:e.union([e.url("Invalid url"),e.literal("")]).nullish()})});export{m as employerSchema};
|
|
@@ -5,31 +5,7 @@ export declare const healthInsuranceSchema: z.ZodObject<{
|
|
|
5
5
|
payer: z.ZodObject<{
|
|
6
6
|
verifiedId: z.ZodString;
|
|
7
7
|
name: z.ZodString;
|
|
8
|
-
logoUrl: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
verifiedId: string;
|
|
12
|
-
logoUrl?: string | null | undefined;
|
|
13
|
-
}, {
|
|
14
|
-
name: string;
|
|
15
|
-
verifiedId: string;
|
|
16
|
-
logoUrl?: string | null | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
memberId: string;
|
|
20
|
-
payer: {
|
|
21
|
-
name: string;
|
|
22
|
-
verifiedId: string;
|
|
23
|
-
logoUrl?: string | null | undefined;
|
|
24
|
-
};
|
|
25
|
-
id?: number | undefined;
|
|
26
|
-
}, {
|
|
27
|
-
memberId: string;
|
|
28
|
-
payer: {
|
|
29
|
-
name: string;
|
|
30
|
-
verifiedId: string;
|
|
31
|
-
logoUrl?: string | null | undefined;
|
|
32
|
-
};
|
|
33
|
-
id?: number | undefined;
|
|
34
|
-
}>;
|
|
8
|
+
logoUrl: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
}, z.core.$strip>;
|
|
35
11
|
export type HealthInsuranceValue = z.infer<typeof healthInsuranceSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as e}from"zod";import{memberIdSchema as r}from"./memberId.schema.mjs";import{payerNameSchema as
|
|
1
|
+
"use strict";import{z as e}from"zod";import{memberIdSchema as r}from"./memberId.schema.mjs";import{payerNameSchema as a}from"./payerName.schema.mjs";const m=e.object({id:e.number().optional(),memberId:r,payer:e.object({verifiedId:e.string().regex(/^V\d+$/,"Invalid"),name:a,logoUrl:e.union([e.url("Invalid url"),e.literal("")]).nullish()})});export{m as healthInsuranceSchema};
|
|
@@ -3,12 +3,4 @@ export declare const fullNameSchema: z.ZodObject<{
|
|
|
3
3
|
firstName: z.ZodString;
|
|
4
4
|
lastName: z.ZodString;
|
|
5
5
|
middleName: z.ZodString;
|
|
6
|
-
},
|
|
7
|
-
firstName: string;
|
|
8
|
-
lastName: string;
|
|
9
|
-
middleName: string;
|
|
10
|
-
}, {
|
|
11
|
-
firstName: string;
|
|
12
|
-
lastName: string;
|
|
13
|
-
middleName: string;
|
|
14
|
-
}>;
|
|
6
|
+
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const birthDateSchema: import('zod').
|
|
1
|
+
export declare const birthDateSchema: import('zod').ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const dateSchema: import('zod').
|
|
1
|
+
export declare const dateSchema: import('zod').ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const phoneSchema: import('zod').
|
|
1
|
+
export declare const phoneSchema: import('zod').ZodString;
|
|
@@ -16,4 +16,6 @@ export declare const sexOptions: readonly [{
|
|
|
16
16
|
* Validation schema for sex selection
|
|
17
17
|
* Validates against predefined sex options
|
|
18
18
|
*/
|
|
19
|
-
export declare const sexSchema: z.ZodEnum<
|
|
19
|
+
export declare const sexSchema: z.ZodEnum<{
|
|
20
|
+
[x: string]: string;
|
|
21
|
+
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as l}from"zod";const a=[{label:"Male",value:"Male"},{label:"Female",value:"Female"},{label:"Non-Binary",value:"Non-Binary"}],
|
|
1
|
+
"use strict";import{z as l}from"zod";import{zod3EnumError as o}from"../../../../../../utils/zod.mjs";const a=[{label:"Male",value:"Male"},{label:"Female",value:"Female"},{label:"Non-Binary",value:"Non-Binary"}],r=l.enum(a.map(e=>e.value),{error:o});export{a as sexOptions,r as sexSchema};
|
|
@@ -3,4 +3,4 @@ import { z } from 'zod';
|
|
|
3
3
|
* Validation schema for SSN field in forms
|
|
4
4
|
* Supports both masked (•••-••-1234 or ***-**-1234) and unmasked (123456789) formats
|
|
5
5
|
*/
|
|
6
|
-
export declare const ssnSchema: z.
|
|
6
|
+
export declare const ssnSchema: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useCallback as
|
|
1
|
+
"use strict";import{useCallback as s}from"react";import{useForm as f}from"./form.context.mjs";import{fieldInputTypes as S}from"../../core/fields/constants.mjs";const y=({key:i,validateOnChange:d=!0,validateOnBlur:u=!0})=>{var t,n,c,v;const{updateFieldValue:e,setFieldTouched:r,getField:p,validateForm:o}=f(),l=p(i),V=s(a=>{e(i,a),d&&o()},[i,e,o,d]),F=s((a,h)=>{e(`${i}.${a}`,h),d&&o()},[i,e,o,d]),T=s(a=>{r(i,a),a&&u&&o()},[i,r,o,u]),g=s(()=>o(),[o]),$=s(a=>{l?.schema.characteristics.inputType===S.composite?Object.keys(l?.children??{}).forEach(h=>{var m;(m=a?.ignoreKeys)!=null&&m.includes(h)||(e(`${i}.${h}`,""),r(`${i}.${h}`,!0))}):(e(i,""),r(i,!0))},[i,l,e,r]),D=s(()=>{l&&(e(i,l.defaultValue),r(i,!1))},[i,l,e,r]),k=((v=(c=(n=(t=l?.errors)==null?void 0:t.error)==null?void 0:n.issues)==null?void 0:c[0])==null?void 0:v.message)??null,C=l?.touched??!1;return{field:l,value:l?.value??"",setValue:V,setChildValue:F,error:k,isDirty:l?.isDirty??!1,isValid:l?.isValid??!0,isTouched:C,setTouched:T,validate:g,reset:D,clear:$}},b=i=>{const d=y(i);return{...d,inputProps:{id:i.key,value:d.value||"",onChange:u=>{d.setValue(u.target.value)},onBlur:()=>{d.setTouched(!0)},"aria-invalid":!d.isValid,"aria-describedby":d.error?`${i.key}-error`:void 0}}},q=i=>{var d,u,t,n,c,v;const e=b(i),{state:{isSubmitting:r,isSubmitSuccess:p}}=f();return{...e,fieldProps:{label:(d=e.field)==null?void 0:d.schema.characteristics.label,placeholder:e.field&&"placeholder"in((u=e.field)==null?void 0:u.schema.characteristics)?(t=e.field)==null?void 0:t.schema.characteristics.placeholder:void 0,required:(n=e.field)==null?void 0:n.isRequired,disabled:r||p||((c=e.field)==null?void 0:c.isDisabled),description:(v=e.field)==null?void 0:v.description,error:e.error,isDirty:e.isDirty,isValid:e.isValid,isTouched:e.isTouched}}};export{y as useField,b as useFieldInput,q as useFormField};
|
|
@@ -24,14 +24,15 @@ export declare const makeAttributes: ({ userPrivacyEnabled, field, fieldKey, opt
|
|
|
24
24
|
'data-verified-sdk-field-value': string | {
|
|
25
25
|
memberId: string;
|
|
26
26
|
payer: {
|
|
27
|
-
name: string;
|
|
28
27
|
verifiedId: string;
|
|
28
|
+
name: string;
|
|
29
29
|
logoUrl?: string | null | undefined;
|
|
30
30
|
};
|
|
31
31
|
id?: number | undefined;
|
|
32
32
|
} | {
|
|
33
33
|
employer: {
|
|
34
34
|
name: string;
|
|
35
|
+
legalName?: string | undefined;
|
|
35
36
|
address?: {
|
|
36
37
|
line1?: string | undefined;
|
|
37
38
|
line2?: string | undefined;
|
|
@@ -41,7 +42,6 @@ export declare const makeAttributes: ({ userPrivacyEnabled, field, fieldKey, opt
|
|
|
41
42
|
zipCode?: string | undefined;
|
|
42
43
|
} | undefined;
|
|
43
44
|
logoUrl?: string | null | undefined;
|
|
44
|
-
legalName?: string | undefined;
|
|
45
45
|
};
|
|
46
46
|
} | {
|
|
47
47
|
firstName?: string | undefined;
|
|
@@ -76,14 +76,15 @@ export declare function getAutoCompleteAttributeValue(key: string): "off" | "tel
|
|
|
76
76
|
export declare const getFieldValue: (field: FormField, options: OneClickFormOptions) => string | {
|
|
77
77
|
memberId: string;
|
|
78
78
|
payer: {
|
|
79
|
-
name: string;
|
|
80
79
|
verifiedId: string;
|
|
80
|
+
name: string;
|
|
81
81
|
logoUrl?: string | null | undefined;
|
|
82
82
|
};
|
|
83
83
|
id?: number | undefined;
|
|
84
84
|
} | {
|
|
85
85
|
employer: {
|
|
86
86
|
name: string;
|
|
87
|
+
legalName?: string | undefined;
|
|
87
88
|
address?: {
|
|
88
89
|
line1?: string | undefined;
|
|
89
90
|
line2?: string | undefined;
|
|
@@ -93,7 +94,6 @@ export declare const getFieldValue: (field: FormField, options: OneClickFormOpti
|
|
|
93
94
|
zipCode?: string | undefined;
|
|
94
95
|
} | undefined;
|
|
95
96
|
logoUrl?: string | null | undefined;
|
|
96
|
-
legalName?: string | undefined;
|
|
97
97
|
};
|
|
98
98
|
} | {
|
|
99
99
|
firstName?: string | undefined;
|
package/dist/hooks/useQRCode.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useMemo as
|
|
1
|
+
"use strict";import{useMemo as h}from"react";import*as $ from"qrcode";function f(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function d(t){const r=h(()=>$.create(t.data),[t.data]).modules.data;return h(()=>{const e=t.size/Math.sqrt(r.length);let o=`<svg viewBox="0 0 ${t.size} ${t.size}" xmlns="http://www.w3.org/2000/svg">`;const a=t.imageSize,i=(t.size-a)/2,n=(t.size-a)/2,p=f(t.fill||"#000000");for(let s=0;s<r.length;s++){const l=s%Math.sqrt(r.length)*e,g=Math.floor(s/Math.sqrt(r.length))*e,c=e/2,m=r[s]===1,u=l+e>=i&&l<i+a&&g+e>=n&&g<n+a;!m||u||(o+=`<rect x="${l}" y="${g}" width="${e}" height="${e}" rx="${c}" ry="${c}" fill='${p}' />`)}return o+="</svg>",o},[r,t])}export{d as useQRCode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=e=>e===null?"null":Array.isArray(e)?"array":typeof e=="number"&&Number.isNaN(e)?"nan":typeof e,u=e=>{if(e.code!=="invalid_value")return;const n=e.values.map(i=>`'${String(i)}'`).join(" | ");return e.input===void 0?"Required":typeof e.input=="string"?`Invalid enum value. Expected ${n}, received '${e.input}'`:`Expected ${n}, received ${t(e.input)}`};export{u as zod3EnumError};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
|
-
export declare const USDateSchema: zod.
|
|
3
|
-
export declare const getDateSchemaWithPastValidation: (message: string) => zod.
|
|
2
|
+
export declare const USDateSchema: zod.ZodString;
|
|
3
|
+
export declare const getDateSchemaWithPastValidation: (message: string) => zod.ZodDate;
|
|
4
4
|
export declare const validateTimestamp: (timestampString: string) => boolean;
|
|
5
5
|
export declare const validateMinimumDate1900: (timestampString: string) => boolean;
|
|
6
6
|
export declare const refineTimestamp: (value: string) => boolean;
|
|
7
7
|
export declare const refineMinimumDate1900: (value: string) => boolean;
|
|
8
8
|
export declare const validateAge18Plus: (timestampString: string) => boolean;
|
|
9
9
|
export declare const refineAge18Plus: (value: string) => boolean;
|
|
10
|
-
export declare const dateSchema: zod.
|
|
11
|
-
export declare const birthDateSchema: zod.
|
|
10
|
+
export declare const dateSchema: zod.ZodString;
|
|
11
|
+
export declare const birthDateSchema: zod.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import*as
|
|
1
|
+
"use strict";import*as i from"zod";const l=i.string().refine(e=>{if(/^\d{2}\/\d{2}\/\d{4}$/.test(e)){const t=Date.parse(String(new Date(e)));return!isNaN(t)}return!1},"Date is invalid"),N=e=>i.date().refine(t=>t.getTime()<Date.now(),{message:e}),m=e=>{if(!/^-?\d+$/.test(e)||e==="NaN"||e==="")return!1;const t=parseInt(e,10);if(isNaN(t))return!1;const a=new Date(t);if(isNaN(a.getTime()))return!1;const r=a.getUTCHours(),o=a.getUTCMinutes(),f=a.getUTCSeconds(),c=a.getUTCMilliseconds();return!(r!==12||o!==0||f!==0||c!==0)},d=e=>{if(e==="NaN"||e==="")return!1;const t=parseInt(e,10);if(isNaN(t))return!1;const a=new Date(t);if(isNaN(a.getTime()))return!1;const r=Date.UTC(1900,0,1,0,0,0,0);return t>=r},u=e=>m(e),g=e=>/^-?\d+$/.test(e)?d(e):!1,D=e=>{const t=parseInt(e,10),a=new Date(t),r=new Date,o=new Date(Date.UTC(r.getUTCFullYear()-18,r.getUTCMonth(),r.getUTCDate(),23,59,59,999));return a.getTime()<=o.getTime()},T=e=>D(e),U=/^\d{4}-\d{2}-\d{2}$/,C=/^•{4}-\d{2}-\d{2}$/,s=e=>U.test(e)&&!isNaN(new Date(e).getTime()),n=e=>C.test(e),w=e=>{const t=new Date(e),a=new Date;return a.setUTCFullYear(a.getUTCFullYear()-18),t<=a},p=i.string().refine(e=>n(e)||s(e)||u(e),{error:""}).refine(e=>n(e)||s(e)||g(e),{error:""}),h=i.string().refine(e=>n(e)||s(e)||u(e),{error:""}).refine(e=>n(e)||(s(e)?Number(e.slice(0,4))>=1900:g(e)),{error:""}).refine(e=>n(e)?!0:s(e)?w(e):T(e),"Must be 18 years or older");export{l as USDateSchema,h as birthDateSchema,p as dateSchema,N as getDateSchemaWithPastValidation,T as refineAge18Plus,g as refineMinimumDate1900,u as refineTimestamp,D as validateAge18Plus,d as validateMinimumDate1900,m as validateTimestamp};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const emailSchema: z.
|
|
3
|
-
export declare const businessEmailSchema: z.
|
|
2
|
+
export declare const emailSchema: z.ZodEmail;
|
|
3
|
+
export declare const businessEmailSchema: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as s}from"zod";import{emailRegexPattern as
|
|
1
|
+
"use strict";import{z as s}from"zod";import{emailRegexPattern as m}from"../constants/email.mjs";const a=s.email("Invalid email"),i=s.string().refine(e=>a.safeParse(e).success&&new RegExp(m).test(e));export{i as businessEmailSchema,a as emailSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as
|
|
1
|
+
"use strict";import{z as t}from"zod";const a=t.string().min(1,"String must contain at least 1 character(s)");export{a as fieldSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { z as zod } from 'zod';
|
|
2
|
-
export declare const npiSchema: zod.
|
|
2
|
+
export declare const npiSchema: zod.ZodString;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
|
-
export declare const phoneSchema: zod.
|
|
2
|
+
export declare const phoneSchema: zod.ZodString;
|
|
@@ -5,4 +5,4 @@ export declare const SSNSchema: z.ZodString;
|
|
|
5
5
|
* When dealing with masked SSN, in the backend you will need to call 1-Click API GET to get the unmasked version of SSN again.
|
|
6
6
|
* If this is the user input SSN there will be no need to call the 1-Click API GET.
|
|
7
7
|
*/
|
|
8
|
-
export declare const MaskedAndUnmaskedSSNSchema: z.
|
|
8
|
+
export declare const MaskedAndUnmaskedSSNSchema: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as e}from"zod";const
|
|
1
|
+
"use strict";import{z as e}from"zod";const a=/^(?!666|9\d{2})\d{3}(?!00)\d{2}(?!0{4})\d{4}$/,d=e.string().regex(a,"Invalid"),n=e.string().refine(s=>/^•••-••-(\d{4})$/.test(s)||a.test(s),{message:"Invalid SSN"});export{n as MaskedAndUnmaskedSSNSchema,d as SSNSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { z as zod } from 'zod';
|
|
2
|
-
export declare const getUnixSchema: (message?: string) => zod.
|
|
2
|
+
export declare const getUnixSchema: (message?: string) => zod.ZodString;
|