@appcorp/fusion-storybook 0.2.21 → 0.2.22

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.
@@ -20,6 +20,9 @@ export declare const GENDER_OPTIONS: readonly [{
20
20
  }, {
21
21
  readonly label: "Other";
22
22
  readonly value: "OTHER";
23
+ }, {
24
+ readonly label: "Prefer not to say";
25
+ readonly value: "PREFER_NOT_TO_SAY";
23
26
  }];
24
27
  export declare const AVATAR_MAX_FILE_SIZE: number;
25
28
  export declare const AVATAR_ALLOWED_MIME_TYPES: readonly ["image/webp", "image/png", "image/jpeg", "image/jpg", "image/gif", "image/bmp"];
@@ -26,6 +26,7 @@ export const GENDER_OPTIONS = [
26
26
  { label: "Male", value: "MALE" },
27
27
  { label: "Female", value: "FEMALE" },
28
28
  { label: "Other", value: "OTHER" },
29
+ { label: "Prefer not to say", value: "PREFER_NOT_TO_SAY" },
29
30
  ];
30
31
  // ============================================================================
31
32
  // AVATAR UPLOAD CONFIGURATION
@@ -12,10 +12,16 @@ export declare const teacherFormValidation: z.ZodObject<{
12
12
  country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
13
13
  dateOfBirth: z.ZodNullable<z.ZodOptional<z.ZodString>>;
14
14
  emergencyPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ campusId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
15
16
  experience: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
16
17
  firstName: z.ZodString;
17
- gender: z.ZodNullable<z.ZodOptional<z.ZodString>>;
18
- joiningDate: z.ZodString;
18
+ gender: z.ZodPreprocess<z.ZodNullable<z.ZodOptional<z.ZodEnum<{
19
+ MALE: "MALE";
20
+ FEMALE: "FEMALE";
21
+ OTHER: "OTHER";
22
+ PREFER_NOT_TO_SAY: "PREFER_NOT_TO_SAY";
23
+ }>>>>;
24
+ joiningDate: z.ZodOptional<z.ZodString>;
19
25
  lastName: z.ZodString;
20
26
  phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
27
  postalCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -26,10 +26,15 @@ export const teacherFormValidation = z.object({
26
26
  // });
27
27
  // }
28
28
  // }),
29
+ campusId: z.string().optional().nullable(),
29
30
  experience: z.number().optional().nullable(),
30
31
  firstName: z.string().min(1, "First name is required"),
31
- gender: z.string().optional().nullable(),
32
- joiningDate: z.string(),
32
+ gender: z
33
+ .preprocess((val) => (val === "" ? undefined : val), z
34
+ .enum(["MALE", "FEMALE", "OTHER", "PREFER_NOT_TO_SAY"])
35
+ .optional()
36
+ .nullable()),
37
+ joiningDate: z.string().optional(),
33
38
  lastName: z.string().min(1, "Last name is required"),
34
39
  phone: z.string().nullable().optional(),
35
40
  // .superRefine((val, ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",