udp-schema 1.0.0 → 1.1.0

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 (98) hide show
  1. package/dist/field-helpers.d.ts +23 -8
  2. package/dist/field-helpers.d.ts.map +1 -1
  3. package/dist/field-helpers.js +43 -12
  4. package/dist/field-helpers.js.map +1 -1
  5. package/dist/field-meta.d.ts +14 -52
  6. package/dist/field-meta.d.ts.map +1 -1
  7. package/dist/field-meta.js +13 -307
  8. package/dist/field-meta.js.map +1 -1
  9. package/dist/index.d.ts +16 -15
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +15 -20
  12. package/dist/index.js.map +1 -1
  13. package/dist/profile-fields/01-profile.d.ts +264 -0
  14. package/dist/profile-fields/01-profile.d.ts.map +1 -0
  15. package/dist/profile-fields/01-profile.js +113 -0
  16. package/dist/profile-fields/01-profile.js.map +1 -0
  17. package/dist/profile-fields/02-political.d.ts +133 -0
  18. package/dist/profile-fields/02-political.d.ts.map +1 -0
  19. package/dist/profile-fields/02-political.js +42 -0
  20. package/dist/profile-fields/02-political.js.map +1 -0
  21. package/dist/profile-fields/03-electoral.d.ts +46 -0
  22. package/dist/profile-fields/03-electoral.d.ts.map +1 -0
  23. package/dist/profile-fields/03-electoral.js +21 -0
  24. package/dist/profile-fields/03-electoral.js.map +1 -0
  25. package/dist/profile-fields/04-leadership.d.ts +34 -0
  26. package/dist/profile-fields/04-leadership.d.ts.map +1 -0
  27. package/dist/profile-fields/04-leadership.js +22 -0
  28. package/dist/profile-fields/04-leadership.js.map +1 -0
  29. package/dist/profile-fields/05-psychological.d.ts +58 -0
  30. package/dist/profile-fields/05-psychological.d.ts.map +1 -0
  31. package/dist/profile-fields/05-psychological.js +20 -0
  32. package/dist/profile-fields/05-psychological.js.map +1 -0
  33. package/dist/profile-fields/06-education.d.ts +28 -0
  34. package/dist/profile-fields/06-education.d.ts.map +1 -0
  35. package/dist/profile-fields/06-education.js +23 -0
  36. package/dist/profile-fields/06-education.js.map +1 -0
  37. package/dist/profile-fields/07-employment.d.ts +75 -0
  38. package/dist/profile-fields/07-employment.d.ts.map +1 -0
  39. package/dist/profile-fields/07-employment.js +32 -0
  40. package/dist/profile-fields/07-employment.js.map +1 -0
  41. package/dist/profile-fields/08-neurodiversity.d.ts +100 -0
  42. package/dist/profile-fields/08-neurodiversity.d.ts.map +1 -0
  43. package/dist/profile-fields/08-neurodiversity.js +39 -0
  44. package/dist/profile-fields/08-neurodiversity.js.map +1 -0
  45. package/dist/profile-fields/09-health.d.ts +89 -0
  46. package/dist/profile-fields/09-health.d.ts.map +1 -0
  47. package/dist/profile-fields/09-health.js +38 -0
  48. package/dist/profile-fields/09-health.js.map +1 -0
  49. package/dist/profile-fields/10-worldview.d.ts +75 -0
  50. package/dist/profile-fields/10-worldview.d.ts.map +1 -0
  51. package/dist/profile-fields/10-worldview.js +41 -0
  52. package/dist/profile-fields/10-worldview.js.map +1 -0
  53. package/dist/profile-fields/11-residence.d.ts +3 -0
  54. package/dist/profile-fields/11-residence.d.ts.map +1 -0
  55. package/dist/profile-fields/11-residence.js +11 -0
  56. package/dist/profile-fields/11-residence.js.map +1 -0
  57. package/dist/profile-fields/12-household.d.ts +90 -0
  58. package/dist/profile-fields/12-household.d.ts.map +1 -0
  59. package/dist/profile-fields/12-household.js +37 -0
  60. package/dist/profile-fields/12-household.js.map +1 -0
  61. package/dist/profile-fields/index.d.ts +22 -0
  62. package/dist/profile-fields/index.d.ts.map +1 -0
  63. package/dist/profile-fields/index.js +47 -0
  64. package/dist/profile-fields/index.js.map +1 -0
  65. package/dist/profile-fields/types.d.ts +66 -0
  66. package/dist/profile-fields/types.d.ts.map +1 -0
  67. package/dist/profile-fields/types.js +8 -0
  68. package/dist/profile-fields/types.js.map +1 -0
  69. package/dist/progress-fields.d.ts +18 -0
  70. package/dist/progress-fields.d.ts.map +1 -1
  71. package/dist/progress-fields.js +21 -0
  72. package/dist/progress-fields.js.map +1 -1
  73. package/dist/step-01.schema.d.ts.map +1 -1
  74. package/dist/step-01.schema.js +1 -1
  75. package/dist/step-01.schema.js.map +1 -1
  76. package/dist/step-03.schema.d.ts +1 -1
  77. package/dist/step-03.schema.d.ts.map +1 -1
  78. package/dist/step-03.schema.js +1 -8
  79. package/dist/step-03.schema.js.map +1 -1
  80. package/dist/step-04.schema.d.ts +1 -1
  81. package/dist/step-04.schema.d.ts.map +1 -1
  82. package/dist/step-04.schema.js +2 -6
  83. package/dist/step-04.schema.js.map +1 -1
  84. package/dist/step-07.schema.d.ts.map +1 -1
  85. package/dist/step-07.schema.js +2 -16
  86. package/dist/step-07.schema.js.map +1 -1
  87. package/dist/step-08.schema.d.ts.map +1 -1
  88. package/dist/step-08.schema.js +1 -3
  89. package/dist/step-08.schema.js.map +1 -1
  90. package/dist/step-09.schema.d.ts +1 -1
  91. package/dist/step-09.schema.d.ts.map +1 -1
  92. package/dist/step-09.schema.js +5 -19
  93. package/dist/step-09.schema.js.map +1 -1
  94. package/dist/step-12.schema.d.ts +1 -1
  95. package/dist/step-12.schema.d.ts.map +1 -1
  96. package/dist/step-12.schema.js +3 -23
  97. package/dist/step-12.schema.js.map +1 -1
  98. package/package.json +1 -1
@@ -0,0 +1,41 @@
1
+ export const lgbtqStatementOptions = [
2
+ { value: 'LGBTQ_EQUAL_RIGHTS', label: 'LGBTQ+ people deserve equal rights' },
3
+ { value: 'LGBTQ_SOCIAL_ACCEPTANCE', label: 'Society should accept LGBTQ+ people' },
4
+ { value: 'LGBTQ_PRIVATE_MATTER', label: "It's a private matter" },
5
+ { value: 'LGBTQ_SHOULD_NOT_BE_DISCRIMINATED', label: 'They should not face discrimination' },
6
+ { value: 'LGBTQ_TRADITION_CONFLICT', label: 'It conflicts with our traditions' },
7
+ { value: 'LGBTQ_NOT_COMFORTABLE', label: "I'm not comfortable with it" },
8
+ { value: 'LGBTQ_DONT_KNOW', label: "I don't know enough about it" },
9
+ { value: 'LGBTQ_PREFER_NOT_SAY', label: 'Prefer not to say' },
10
+ ];
11
+ export const transgenderStatementOptions = [
12
+ { value: 'TRANS_CHILD_KEEP_IN_FAMILY', label: 'A transgender child should be kept in the family' },
13
+ { value: 'TRANS_EQUAL_RIGHTS', label: 'Transgender people deserve equal rights' },
14
+ { value: 'TRANS_PART_OF_NORMAL_SOCIETY', label: 'They are part of normal society' },
15
+ { value: 'TRANS_NO_ABANDONMENT', label: 'No one should abandon a transgender family member' },
16
+ { value: 'TRANS_ONLY_SPECIAL_COMMUNITY', label: 'They belong to their own special community' },
17
+ { value: 'TRANS_UNCOMFORTABLE', label: "I'm uncomfortable around transgender people" },
18
+ { value: 'TRANS_DONT_KNOW', label: "I don't know enough" },
19
+ { value: 'TRANS_PREFER_NOT_SAY', label: 'Prefer not to say' },
20
+ ];
21
+ export const casteDiscriminationPlaceOptions = [
22
+ { value: 'SCHOOL_EDUCATION', label: 'School / Education' }, { value: 'WORKPLACE', label: 'Workplace' },
23
+ { value: 'LOCALITY', label: 'Locality / Neighborhood' }, { value: 'GOVT_OFFICES', label: 'Government offices' },
24
+ { value: 'MARKET', label: 'Market / Shops' }, { value: 'RELIGIOUS_SPACE', label: 'Religious spaces' },
25
+ { value: 'OTHER', label: 'Other' },
26
+ ];
27
+ export const worldView = {
28
+ key: 'world_view', label: 'World View & Experience', step: 10,
29
+ description: 'Views on social issues, equality, and discrimination.',
30
+ fields: [
31
+ { order: 1, key: 'viewOnAnimalCruelty', label: 'View on Animal Cruelty', type: 'single_select', step: 10, isOnboarding: true, optional: true, options: [{ value: 'strongly_against', label: 'Strongly against all forms' }, { value: 'against_but_food', label: 'Against, but accept for food' }, { value: 'neutral', label: 'Neutral' }, { value: 'acceptable_in_tradition', label: 'Acceptable in tradition/culture' }, { value: 'prefer_not_to_say', label: 'Prefer not to say' }] },
32
+ { order: 2, key: 'viewOnLgbtqStatements', label: 'Views on LGBTQ+ Rights', type: 'multi_select', step: 10, isOnboarding: true, optional: true, options: [...lgbtqStatementOptions] },
33
+ { order: 3, key: 'viewOnLgbtqOpinion', label: 'LGBTQ+ Opinion', type: 'textarea', step: 10, isOnboarding: true, optional: true, maxLength: 500 },
34
+ { order: 4, key: 'viewOnTransgenderInclusion', label: 'Views on Transgender Inclusion', type: 'multi_select', step: 10, isOnboarding: true, optional: true, options: [...transgenderStatementOptions] },
35
+ { order: 5, key: 'viewOnTransgenderOpinion', label: 'Transgender Opinion', type: 'textarea', step: 10, isOnboarding: true, optional: true, maxLength: 500 },
36
+ { order: 6, key: 'facingCasteDiscrimination', label: 'Caste Discrimination Experience', type: 'single_select', step: 10, isOnboarding: true, optional: true, sensitive: true, options: [{ value: 'YES_OFTEN', label: 'Yes, often' }, { value: 'YES_SOMETIMES', label: 'Yes, sometimes' }, { value: 'NO', label: 'No' }, { value: 'PREFER_NOT_SAY', label: 'Prefer not to say' }] },
37
+ { order: 7, key: 'casteDiscriminationPlaces', label: 'Where Discrimination Faced', type: 'multi_select', step: 10, isOnboarding: true, optional: true, options: [...casteDiscriminationPlaceOptions], conditionalOn: { field: 'facingCasteDiscrimination', values: ['YES_OFTEN', 'YES_SOMETIMES'] } },
38
+ { order: 8, key: 'viewOnGenderEquality', label: 'View on Gender Equality', type: 'single_select', step: 10, isOnboarding: true, optional: true, options: [{ value: 'strong_advocate', label: 'Strong advocate for equality' }, { value: 'supportive', label: 'Supportive' }, { value: 'traditional_values', label: 'I prefer traditional values' }, { value: 'no_opinion', label: 'No opinion' }, { value: 'prefer_not_to_say', label: 'Prefer not to say' }] },
39
+ ],
40
+ };
41
+ //# sourceMappingURL=10-worldview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"10-worldview.js","sourceRoot":"","sources":["../../src/profile-fields/10-worldview.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oCAAoC,EAAE;IAC5E,EAAE,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,qCAAqC,EAAE;IA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IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,+BAA+B,CAAC,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,2BAA2B,EAAE,MAAM,EAAE,CAAC,WAAW,EAAE,eAAe,CAAC,EAAE,EAAE;QACrS,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,sBAAsB,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,8BAA8B,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,6BAA6B,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,EAAE;KAChc;CACF,CAAC","sourcesContent":["import type { FieldGroup } from './types.js';\n\nexport const lgbtqStatementOptions = [\n { value: 'LGBTQ_EQUAL_RIGHTS', label: 'LGBTQ+ people deserve equal rights' },\n { value: 'LGBTQ_SOCIAL_ACCEPTANCE', label: 'Society should accept LGBTQ+ people' },\n { value: 'LGBTQ_PRIVATE_MATTER', label: \"It's a private matter\" },\n { value: 'LGBTQ_SHOULD_NOT_BE_DISCRIMINATED', label: 'They should not face discrimination' },\n { value: 'LGBTQ_TRADITION_CONFLICT', label: 'It conflicts with our traditions' },\n { value: 'LGBTQ_NOT_COMFORTABLE', label: \"I'm not comfortable with it\" },\n { value: 'LGBTQ_DONT_KNOW', label: \"I don't know enough about it\" },\n { value: 'LGBTQ_PREFER_NOT_SAY', label: 'Prefer not to say' },\n] as const;\n\nexport const transgenderStatementOptions = [\n { value: 'TRANS_CHILD_KEEP_IN_FAMILY', label: 'A transgender child should be kept in the family' },\n { value: 'TRANS_EQUAL_RIGHTS', label: 'Transgender people deserve equal rights' },\n { value: 'TRANS_PART_OF_NORMAL_SOCIETY', label: 'They are part of normal society' },\n { value: 'TRANS_NO_ABANDONMENT', label: 'No one should abandon a transgender family member' },\n { value: 'TRANS_ONLY_SPECIAL_COMMUNITY', label: 'They belong to their own special community' },\n { value: 'TRANS_UNCOMFORTABLE', label: \"I'm uncomfortable around transgender people\" },\n { value: 'TRANS_DONT_KNOW', label: \"I don't know enough\" },\n { value: 'TRANS_PREFER_NOT_SAY', label: 'Prefer not to say' },\n] as const;\n\nexport const casteDiscriminationPlaceOptions = [\n { value: 'SCHOOL_EDUCATION', label: 'School / Education' }, { value: 'WORKPLACE', label: 'Workplace' },\n { value: 'LOCALITY', label: 'Locality / Neighborhood' }, { value: 'GOVT_OFFICES', label: 'Government offices' },\n { value: 'MARKET', label: 'Market / Shops' }, { value: 'RELIGIOUS_SPACE', label: 'Religious spaces' },\n { value: 'OTHER', label: 'Other' },\n] as const;\n\nexport const worldView: FieldGroup = {\n key: 'world_view', label: 'World View & Experience', step: 10,\n description: 'Views on social issues, equality, and discrimination.',\n fields: [\n { order: 1, key: 'viewOnAnimalCruelty', label: 'View on Animal Cruelty', type: 'single_select', step: 10, isOnboarding: true, optional: true, options: [{ value: 'strongly_against', label: 'Strongly against all forms' }, { value: 'against_but_food', label: 'Against, but accept for food' }, { value: 'neutral', label: 'Neutral' }, { value: 'acceptable_in_tradition', label: 'Acceptable in tradition/culture' }, { value: 'prefer_not_to_say', label: 'Prefer not to say' }] },\n { order: 2, key: 'viewOnLgbtqStatements', label: 'Views on LGBTQ+ Rights', type: 'multi_select', step: 10, isOnboarding: true, optional: true, options: [...lgbtqStatementOptions] },\n { order: 3, key: 'viewOnLgbtqOpinion', label: 'LGBTQ+ Opinion', type: 'textarea', step: 10, isOnboarding: true, optional: true, maxLength: 500 },\n { order: 4, key: 'viewOnTransgenderInclusion', label: 'Views on Transgender Inclusion', type: 'multi_select', step: 10, isOnboarding: true, optional: true, options: [...transgenderStatementOptions] },\n { order: 5, key: 'viewOnTransgenderOpinion', label: 'Transgender Opinion', type: 'textarea', step: 10, isOnboarding: true, optional: true, maxLength: 500 },\n { order: 6, key: 'facingCasteDiscrimination', label: 'Caste Discrimination Experience', type: 'single_select', step: 10, isOnboarding: true, optional: true, sensitive: true, options: [{ value: 'YES_OFTEN', label: 'Yes, often' }, { value: 'YES_SOMETIMES', label: 'Yes, sometimes' }, { value: 'NO', label: 'No' }, { value: 'PREFER_NOT_SAY', label: 'Prefer not to say' }] },\n { order: 7, key: 'casteDiscriminationPlaces', label: 'Where Discrimination Faced', type: 'multi_select', step: 10, isOnboarding: true, optional: true, options: [...casteDiscriminationPlaceOptions], conditionalOn: { field: 'facingCasteDiscrimination', values: ['YES_OFTEN', 'YES_SOMETIMES'] } },\n { order: 8, key: 'viewOnGenderEquality', label: 'View on Gender Equality', type: 'single_select', step: 10, isOnboarding: true, optional: true, options: [{ value: 'strong_advocate', label: 'Strong advocate for equality' }, { value: 'supportive', label: 'Supportive' }, { value: 'traditional_values', label: 'I prefer traditional values' }, { value: 'no_opinion', label: 'No opinion' }, { value: 'prefer_not_to_say', label: 'Prefer not to say' }] },\n ],\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import type { FieldGroup } from './types.js';
2
+ export declare const residence: FieldGroup;
3
+ //# sourceMappingURL=11-residence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"11-residence.d.ts","sourceRoot":"","sources":["../../src/profile-fields/11-residence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,eAAO,MAAM,SAAS,EAAE,UASvB,CAAC"}
@@ -0,0 +1,11 @@
1
+ export const residence = {
2
+ key: 'residence', label: 'Residence & Address', step: 11,
3
+ description: 'Current, permanent, native, and ancestral addresses.',
4
+ fields: [
5
+ { order: 1, key: 'currentAddress', label: 'Current Address', type: 'address', step: 11, isOnboarding: true, description: 'State → District → Village / Colony' },
6
+ { order: 2, key: 'permanentAddress', label: 'Permanent Address', type: 'address', step: 11, isOnboarding: true, optional: true },
7
+ { order: 3, key: 'homeNativePlace', label: 'Home Native Place', type: 'address', step: 11, isOnboarding: true, optional: true },
8
+ { order: 4, key: 'ancestralPlace', label: 'Ancestral Place', type: 'address', step: 11, isOnboarding: true, optional: true },
9
+ ],
10
+ };
11
+ //# sourceMappingURL=11-residence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"11-residence.js","sourceRoot":"","sources":["../../src/profile-fields/11-residence.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAe;IACnC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,qBAAqB,EAAE,IAAI,EAAE,EAAE;IACxD,WAAW,EAAE,sDAAsD;IACnE,MAAM,EAAE;QACN,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,qCAAqC,EAAE;QAChK,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;QAChI,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC/H,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC7H;CACF,CAAC","sourcesContent":["import type { FieldGroup } from './types.js';\n\nexport const residence: FieldGroup = {\n key: 'residence', label: 'Residence & Address', step: 11,\n description: 'Current, permanent, native, and ancestral addresses.',\n fields: [\n { order: 1, key: 'currentAddress', label: 'Current Address', type: 'address', step: 11, isOnboarding: true, description: 'State → District → Village / Colony' },\n { order: 2, key: 'permanentAddress', label: 'Permanent Address', type: 'address', step: 11, isOnboarding: true, optional: true },\n { order: 3, key: 'homeNativePlace', label: 'Home Native Place', type: 'address', step: 11, isOnboarding: true, optional: true },\n { order: 4, key: 'ancestralPlace', label: 'Ancestral Place', type: 'address', step: 11, isOnboarding: true, optional: true },\n ],\n};\n"]}
@@ -0,0 +1,90 @@
1
+ import type { FieldGroup } from './types.js';
2
+ export declare const familyMemberOptions: readonly [{
3
+ readonly value: "father";
4
+ readonly label: "Father";
5
+ }, {
6
+ readonly value: "mother";
7
+ readonly label: "Mother";
8
+ }, {
9
+ readonly value: "step_father";
10
+ readonly label: "Step-father";
11
+ }, {
12
+ readonly value: "step_mother";
13
+ readonly label: "Step-mother";
14
+ }, {
15
+ readonly value: "wife_husband";
16
+ readonly label: "Wife / Husband";
17
+ }, {
18
+ readonly value: "blood_brother";
19
+ readonly label: "Blood Brother";
20
+ }, {
21
+ readonly value: "blood_sister";
22
+ readonly label: "Blood Sister";
23
+ }, {
24
+ readonly value: "half_brother";
25
+ readonly label: "Half Brother";
26
+ }, {
27
+ readonly value: "half_sister";
28
+ readonly label: "Half Sister";
29
+ }, {
30
+ readonly value: "step_brother";
31
+ readonly label: "Step Brother";
32
+ }, {
33
+ readonly value: "step_sister";
34
+ readonly label: "Step Sister";
35
+ }, {
36
+ readonly value: "son";
37
+ readonly label: "Son";
38
+ }, {
39
+ readonly value: "daughter";
40
+ readonly label: "Daughter";
41
+ }, {
42
+ readonly value: "other";
43
+ readonly label: "Other";
44
+ }];
45
+ export declare const digitalAccessOptions: readonly [{
46
+ readonly value: "smartphone";
47
+ readonly label: "Smartphone";
48
+ }, {
49
+ readonly value: "feature_phone";
50
+ readonly label: "Feature phone";
51
+ }, {
52
+ readonly value: "computer_laptop";
53
+ readonly label: "Computer / Laptop";
54
+ }, {
55
+ readonly value: "internet_at_home";
56
+ readonly label: "Internet at home";
57
+ }, {
58
+ readonly value: "no_internet";
59
+ readonly label: "No internet access";
60
+ }, {
61
+ readonly value: "no_phone";
62
+ readonly label: "No phone";
63
+ }];
64
+ export declare const householdIncomeOptions: readonly [{
65
+ readonly value: "below_5k";
66
+ readonly label: "Below ₹5,000";
67
+ }, {
68
+ readonly value: "5k_10k";
69
+ readonly label: "₹5,000 – ₹10,000";
70
+ }, {
71
+ readonly value: "10k_25k";
72
+ readonly label: "₹10,000 – ₹25,000";
73
+ }, {
74
+ readonly value: "25k_50k";
75
+ readonly label: "₹25,000 – ₹50,000";
76
+ }, {
77
+ readonly value: "50k_1L";
78
+ readonly label: "₹50,000 – ₹1 Lakh";
79
+ }, {
80
+ readonly value: "1L_2.5L";
81
+ readonly label: "₹1 Lakh – ₹2.5 Lakh";
82
+ }, {
83
+ readonly value: "above_2.5L";
84
+ readonly label: "Above ₹2.5 Lakh";
85
+ }, {
86
+ readonly value: "prefer_not_to_say";
87
+ readonly label: "Prefer not to say";
88
+ }];
89
+ export declare const household: FieldGroup;
90
+ //# sourceMappingURL=12-household.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"12-household.d.ts","sourceRoot":"","sources":["../../src/profile-fields/12-household.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQtB,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAIvB,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;EAKzB,CAAC;AAEX,eAAO,MAAM,SAAS,EAAE,UAevB,CAAC"}
@@ -0,0 +1,37 @@
1
+ export const familyMemberOptions = [
2
+ { value: 'father', label: 'Father' }, { value: 'mother', label: 'Mother' },
3
+ { value: 'step_father', label: 'Step-father' }, { value: 'step_mother', label: 'Step-mother' },
4
+ { value: 'wife_husband', label: 'Wife / Husband' }, { value: 'blood_brother', label: 'Blood Brother' },
5
+ { value: 'blood_sister', label: 'Blood Sister' }, { value: 'half_brother', label: 'Half Brother' },
6
+ { value: 'half_sister', label: 'Half Sister' }, { value: 'step_brother', label: 'Step Brother' },
7
+ { value: 'step_sister', label: 'Step Sister' }, { value: 'son', label: 'Son' },
8
+ { value: 'daughter', label: 'Daughter' }, { value: 'other', label: 'Other' },
9
+ ];
10
+ export const digitalAccessOptions = [
11
+ { value: 'smartphone', label: 'Smartphone' }, { value: 'feature_phone', label: 'Feature phone' },
12
+ { value: 'computer_laptop', label: 'Computer / Laptop' }, { value: 'internet_at_home', label: 'Internet at home' },
13
+ { value: 'no_internet', label: 'No internet access' }, { value: 'no_phone', label: 'No phone' },
14
+ ];
15
+ export const householdIncomeOptions = [
16
+ { value: 'below_5k', label: 'Below ₹5,000' }, { value: '5k_10k', label: '₹5,000 – ₹10,000' },
17
+ { value: '10k_25k', label: '₹10,000 – ₹25,000' }, { value: '25k_50k', label: '₹25,000 – ₹50,000' },
18
+ { value: '50k_1L', label: '₹50,000 – ₹1 Lakh' }, { value: '1L_2.5L', label: '₹1 Lakh – ₹2.5 Lakh' },
19
+ { value: 'above_2.5L', label: 'Above ₹2.5 Lakh' }, { value: 'prefer_not_to_say', label: 'Prefer not to say' },
20
+ ];
21
+ export const household = {
22
+ key: 'household', label: 'Household & Economic Profile', step: 12,
23
+ description: 'Family, housing, income, and economic profile.',
24
+ fields: [
25
+ { order: 1, key: 'maritalStatus', label: 'Marital Status', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'single', label: 'Single' }, { value: 'married', label: 'Married' }, { value: 'divorced', label: 'Divorced' }, { value: 'widowed', label: 'Widowed' }, { value: 'separated', label: 'Separated' }, { value: 'prefer_not_to_say', label: 'Prefer not to say' }] },
26
+ { order: 2, key: 'familyMembers', label: 'Family Members', type: 'multi_select', step: 12, isOnboarding: true, optional: true, options: [...familyMemberOptions] },
27
+ { order: 3, key: 'numberOfDependents', label: 'Number of Dependents', type: 'number', step: 12, isOnboarding: true, optional: true, min: 0, max: 50 },
28
+ { order: 4, key: 'housingType', label: 'Housing Type', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'own_house', label: 'Own house' }, { value: 'rented', label: 'Rented' }, { value: 'government_quarters', label: 'Government quarters' }, { value: 'shared', label: 'Shared housing' }, { value: 'homeless', label: 'Homeless' }, { value: 'other', label: 'Other' }] },
29
+ { order: 5, key: 'householdIncome', label: 'Household Income', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [...householdIncomeOptions], sensitive: true },
30
+ { order: 6, key: 'bplCard', label: 'BPL Card', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'yes', label: 'Yes' }, { value: 'no', label: 'No' }, { value: 'applied', label: 'Applied / Pending' }, { value: 'dont_know', label: "Don't know" }] },
31
+ { order: 7, key: 'digitalAccess', label: 'Digital Access', type: 'multi_select', step: 12, isOnboarding: true, optional: true, options: [...digitalAccessOptions] },
32
+ { order: 8, key: 'migrationStatus', label: 'Migration Status', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'native', label: 'Native (always lived here)' }, { value: 'within_district', label: 'Migrated within district' }, { value: 'within_state', label: 'Migrated within state' }, { value: 'inter_state', label: 'Inter-state migrant' }, { value: 'international', label: 'International migrant' }] },
33
+ { order: 9, key: 'landOwnership', label: 'Land Ownership', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'own_agricultural', label: 'Own agricultural land' }, { value: 'own_residential', label: 'Own residential land' }, { value: 'government_allotted', label: 'Government allotted' }, { value: 'no_land', label: 'No land' }, { value: 'leased', label: 'Leased land' }, { value: 'other', label: 'Other' }] },
34
+ { order: 10, key: 'primaryIncomeSource', label: 'Primary Income Source', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'agriculture', label: 'Agriculture' }, { value: 'government_job', label: 'Government job' }, { value: 'private_job', label: 'Private job' }, { value: 'business', label: 'Business' }, { value: 'daily_wage', label: 'Daily wage' }, { value: 'pension', label: 'Pension' }, { value: 'remittance', label: 'Remittance' }, { value: 'no_fixed_income', label: 'No fixed income' }, { value: 'other', label: 'Other' }] },
35
+ ],
36
+ };
37
+ //# sourceMappingURL=12-household.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"12-household.js","sourceRoot":"","sources":["../../src/profile-fields/12-household.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IAC1E,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;IAC9F,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;IACtG,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;IAClG,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;IAChG,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EA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AAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE;QAC9b,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,qBAAqB,EAAE,KAAK,EAAE,uBAAuB,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE;KAC1jB;CACF,CAAC","sourcesContent":["import type { FieldGroup } from './types.js';\n\nexport const familyMemberOptions = [\n { value: 'father', label: 'Father' }, { value: 'mother', label: 'Mother' },\n { value: 'step_father', label: 'Step-father' }, { value: 'step_mother', label: 'Step-mother' },\n { value: 'wife_husband', label: 'Wife / Husband' }, { value: 'blood_brother', label: 'Blood Brother' },\n { value: 'blood_sister', label: 'Blood Sister' }, { value: 'half_brother', label: 'Half Brother' },\n { value: 'half_sister', label: 'Half Sister' }, { value: 'step_brother', label: 'Step Brother' },\n { value: 'step_sister', label: 'Step Sister' }, { value: 'son', label: 'Son' },\n { value: 'daughter', label: 'Daughter' }, { value: 'other', label: 'Other' },\n] as const;\n\nexport const digitalAccessOptions = [\n { value: 'smartphone', label: 'Smartphone' }, { value: 'feature_phone', label: 'Feature phone' },\n { value: 'computer_laptop', label: 'Computer / Laptop' }, { value: 'internet_at_home', label: 'Internet at home' },\n { value: 'no_internet', label: 'No internet access' }, { value: 'no_phone', label: 'No phone' },\n] as const;\n\nexport const householdIncomeOptions = [\n { value: 'below_5k', label: 'Below ₹5,000' }, { value: '5k_10k', label: '₹5,000 – ₹10,000' },\n { value: '10k_25k', label: '₹10,000 – ₹25,000' }, { value: '25k_50k', label: '₹25,000 – ₹50,000' },\n { value: '50k_1L', label: '₹50,000 – ₹1 Lakh' }, { value: '1L_2.5L', label: '₹1 Lakh – ₹2.5 Lakh' },\n { value: 'above_2.5L', label: 'Above ₹2.5 Lakh' }, { value: 'prefer_not_to_say', label: 'Prefer not to say' },\n] as const;\n\nexport const household: FieldGroup = {\n key: 'household', label: 'Household & Economic Profile', step: 12,\n description: 'Family, housing, income, and economic profile.',\n fields: [\n { order: 1, key: 'maritalStatus', label: 'Marital Status', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'single', label: 'Single' }, { value: 'married', label: 'Married' }, { value: 'divorced', label: 'Divorced' }, { value: 'widowed', label: 'Widowed' }, { value: 'separated', label: 'Separated' }, { value: 'prefer_not_to_say', label: 'Prefer not to say' }] },\n { order: 2, key: 'familyMembers', label: 'Family Members', type: 'multi_select', step: 12, isOnboarding: true, optional: true, options: [...familyMemberOptions] },\n { order: 3, key: 'numberOfDependents', label: 'Number of Dependents', type: 'number', step: 12, isOnboarding: true, optional: true, min: 0, max: 50 },\n { order: 4, key: 'housingType', label: 'Housing Type', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'own_house', label: 'Own house' }, { value: 'rented', label: 'Rented' }, { value: 'government_quarters', label: 'Government quarters' }, { value: 'shared', label: 'Shared housing' }, { value: 'homeless', label: 'Homeless' }, { value: 'other', label: 'Other' }] },\n { order: 5, key: 'householdIncome', label: 'Household Income', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [...householdIncomeOptions], sensitive: true },\n { order: 6, key: 'bplCard', label: 'BPL Card', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'yes', label: 'Yes' }, { value: 'no', label: 'No' }, { value: 'applied', label: 'Applied / Pending' }, { value: 'dont_know', label: \"Don't know\" }] },\n { order: 7, key: 'digitalAccess', label: 'Digital Access', type: 'multi_select', step: 12, isOnboarding: true, optional: true, options: [...digitalAccessOptions] },\n { order: 8, key: 'migrationStatus', label: 'Migration Status', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'native', label: 'Native (always lived here)' }, { value: 'within_district', label: 'Migrated within district' }, { value: 'within_state', label: 'Migrated within state' }, { value: 'inter_state', label: 'Inter-state migrant' }, { value: 'international', label: 'International migrant' }] },\n { order: 9, key: 'landOwnership', label: 'Land Ownership', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'own_agricultural', label: 'Own agricultural land' }, { value: 'own_residential', label: 'Own residential land' }, { value: 'government_allotted', label: 'Government allotted' }, { value: 'no_land', label: 'No land' }, { value: 'leased', label: 'Leased land' }, { value: 'other', label: 'Other' }] },\n { order: 10, key: 'primaryIncomeSource', label: 'Primary Income Source', type: 'single_select', step: 12, isOnboarding: true, optional: true, options: [{ value: 'agriculture', label: 'Agriculture' }, { value: 'government_job', label: 'Government job' }, { value: 'private_job', label: 'Private job' }, { value: 'business', label: 'Business' }, { value: 'daily_wage', label: 'Daily wage' }, { value: 'pension', label: 'Pension' }, { value: 'remittance', label: 'Remittance' }, { value: 'no_fixed_income', label: 'No fixed income' }, { value: 'other', label: 'Other' }] },\n ],\n};\n"]}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * UDP Profile Fields — barrel export.
3
+ *
4
+ * Mirrors the dating-schema profile-fields pattern.
5
+ * Each file defines a FieldGroup with rich field metadata and options.
6
+ */
7
+ export type { BaseField, FieldGroup, FieldOption, MultiSelectField, NumberField, ProfileField, SelectField, TextField, } from './types.js';
8
+ export { profile, genderOptions, religionOptions, languageOptions, reservationOptions, minorityOptions } from './01-profile.js';
9
+ export { politicalAssociation, politicalSpectrumOptions, partyOptions, civicEngagementOptions } from './02-political.js';
10
+ export { electoralBehaviour, votingIssueOptions } from './03-electoral.js';
11
+ export { leadershipAmbitions, leadershipSkillsetOptions } from './04-leadership.js';
12
+ export { psychologicalAssessment, mbtiOptions } from './05-psychological.js';
13
+ export { education, qualificationOptions } from './06-education.js';
14
+ export { employment, employmentStatusOptions, shiftOptions, incomeRangeOptions } from './07-employment.js';
15
+ export { neurodiversity, neurodiversityConditionOptions, sensoryPreferenceOptions, supportNeedOptions } from './08-neurodiversity.js';
16
+ export { healthLifestyle, disabilityOptions, substanceUseOptions, dietOptions } from './09-health.js';
17
+ export { worldView, lgbtqStatementOptions, transgenderStatementOptions, casteDiscriminationPlaceOptions } from './10-worldview.js';
18
+ export { residence } from './11-residence.js';
19
+ export { household, familyMemberOptions, digitalAccessOptions, householdIncomeOptions } from './12-household.js';
20
+ import type { FieldGroup } from './types.js';
21
+ export declare const allFieldGroups: readonly FieldGroup[];
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/profile-fields/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,SAAS,GACV,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAChI,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACzH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC3G,OAAO,EAAE,cAAc,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACtI,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AACnI,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAgBjH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,SAAS,UAAU,EAa/C,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * UDP Profile Fields — barrel export.
3
+ *
4
+ * Mirrors the dating-schema profile-fields pattern.
5
+ * Each file defines a FieldGroup with rich field metadata and options.
6
+ */
7
+ // ── Field groups ────────────────────────────────────────────────────────────
8
+ export { profile, genderOptions, religionOptions, languageOptions, reservationOptions, minorityOptions } from './01-profile.js';
9
+ export { politicalAssociation, politicalSpectrumOptions, partyOptions, civicEngagementOptions } from './02-political.js';
10
+ export { electoralBehaviour, votingIssueOptions } from './03-electoral.js';
11
+ export { leadershipAmbitions, leadershipSkillsetOptions } from './04-leadership.js';
12
+ export { psychologicalAssessment, mbtiOptions } from './05-psychological.js';
13
+ export { education, qualificationOptions } from './06-education.js';
14
+ export { employment, employmentStatusOptions, shiftOptions, incomeRangeOptions } from './07-employment.js';
15
+ export { neurodiversity, neurodiversityConditionOptions, sensoryPreferenceOptions, supportNeedOptions } from './08-neurodiversity.js';
16
+ export { healthLifestyle, disabilityOptions, substanceUseOptions, dietOptions } from './09-health.js';
17
+ export { worldView, lgbtqStatementOptions, transgenderStatementOptions, casteDiscriminationPlaceOptions } from './10-worldview.js';
18
+ export { residence } from './11-residence.js';
19
+ export { household, familyMemberOptions, digitalAccessOptions, householdIncomeOptions } from './12-household.js';
20
+ // ── All field groups (for building lookup maps) ─────────────────────────────
21
+ import { profile } from './01-profile.js';
22
+ import { politicalAssociation } from './02-political.js';
23
+ import { electoralBehaviour } from './03-electoral.js';
24
+ import { leadershipAmbitions } from './04-leadership.js';
25
+ import { psychologicalAssessment } from './05-psychological.js';
26
+ import { education } from './06-education.js';
27
+ import { employment } from './07-employment.js';
28
+ import { neurodiversity } from './08-neurodiversity.js';
29
+ import { healthLifestyle } from './09-health.js';
30
+ import { worldView } from './10-worldview.js';
31
+ import { residence } from './11-residence.js';
32
+ import { household } from './12-household.js';
33
+ export const allFieldGroups = [
34
+ profile,
35
+ politicalAssociation,
36
+ electoralBehaviour,
37
+ leadershipAmbitions,
38
+ psychologicalAssessment,
39
+ education,
40
+ employment,
41
+ neurodiversity,
42
+ healthLifestyle,
43
+ worldView,
44
+ residence,
45
+ household,
46
+ ];
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/profile-fields/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,+EAA+E;AAE/E,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAChI,OAAO,EAAE,oBAAo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AAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,MAAM,CAAC,MAAM,cAAc,GAA0B;IACnD,OAAO;IACP,oBAAoB;IACpB,kBAAkB;IAClB,mBAAmB;IACnB,uBAAuB;IACvB,SAAS;IACT,UAAU;IACV,cAAc;IACd,eAAe;IACf,SAAS;IACT,SAAS;IACT,SAAS;CACV,CAAC","sourcesContent":["/**\n * UDP Profile Fields — barrel export.\n *\n * Mirrors the dating-schema profile-fields pattern.\n * Each file defines a FieldGroup with rich field metadata and options.\n */\n\nexport type {\n BaseField,\n FieldGroup,\n FieldOption,\n MultiSelectField,\n NumberField,\n ProfileField,\n SelectField,\n TextField,\n} from './types.js';\n\n// ── Field groups ────────────────────────────────────────────────────────────\n\nexport { profile, genderOptions, religionOptions, languageOptions, reservationOptions, minorityOptions } from './01-profile.js';\nexport { politicalAssociation, politicalSpectrumOptions, partyOptions, civicEngagementOptions } from './02-political.js';\nexport { electoralBehaviour, votingIssueOptions } from './03-electoral.js';\nexport { leadershipAmbitions, leadershipSkillsetOptions } from './04-leadership.js';\nexport { psychologicalAssessment, mbtiOptions } from './05-psychological.js';\nexport { education, qualificationOptions } from './06-education.js';\nexport { employment, employmentStatusOptions, shiftOptions, incomeRangeOptions } from './07-employment.js';\nexport { neurodiversity, neurodiversityConditionOptions, sensoryPreferenceOptions, supportNeedOptions } from './08-neurodiversity.js';\nexport { healthLifestyle, disabilityOptions, substanceUseOptions, dietOptions } from './09-health.js';\nexport { worldView, lgbtqStatementOptions, transgenderStatementOptions, casteDiscriminationPlaceOptions } from './10-worldview.js';\nexport { residence } from './11-residence.js';\nexport { household, familyMemberOptions, digitalAccessOptions, householdIncomeOptions } from './12-household.js';\n\n// ── All field groups (for building lookup maps) ─────────────────────────────\n\nimport { profile } from './01-profile.js';\nimport { politicalAssociation } from './02-political.js';\nimport { electoralBehaviour } from './03-electoral.js';\nimport { leadershipAmbitions } from './04-leadership.js';\nimport { psychologicalAssessment } from './05-psychological.js';\nimport { education } from './06-education.js';\nimport { employment } from './07-employment.js';\nimport { neurodiversity } from './08-neurodiversity.js';\nimport { healthLifestyle } from './09-health.js';\nimport { worldView } from './10-worldview.js';\nimport { residence } from './11-residence.js';\nimport { household } from './12-household.js';\nimport type { FieldGroup } from './types.js';\n\nexport const allFieldGroups: readonly FieldGroup[] = [\n profile,\n politicalAssociation,\n electoralBehaviour,\n leadershipAmbitions,\n psychologicalAssessment,\n education,\n employment,\n neurodiversity,\n healthLifestyle,\n worldView,\n residence,\n household,\n];\n"]}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Type definitions for UDP profile field configuration.
3
+ *
4
+ * Mirrors the dating-schema profile-fields/types.ts pattern.
5
+ * These types describe field metadata — NOT the user's actual profile data.
6
+ */
7
+ export interface FieldOption {
8
+ value: string;
9
+ label: string;
10
+ /** Short description — shown on chips/cards */
11
+ description?: string;
12
+ }
13
+ export interface BaseField {
14
+ /** Display order within the step */
15
+ order: number;
16
+ /** Unique key — maps to DB field name */
17
+ key: string;
18
+ /** Human-readable label */
19
+ label: string;
20
+ /** Field type for form rendering */
21
+ type: 'text' | 'textarea' | 'number' | 'date' | 'single_select' | 'multi_select' | 'object' | 'object_array' | 'address';
22
+ /** Step number (1-12) this field belongs to */
23
+ step: number;
24
+ /** Whether this field is collected during onboarding */
25
+ isOnboarding: boolean;
26
+ /** If true, can be skipped during onboarding */
27
+ optional?: boolean;
28
+ /** Help text shown below the field */
29
+ description?: string;
30
+ /** Mark as sensitive (shown with privacy notice) */
31
+ sensitive?: boolean;
32
+ /** If set, field only applicable when referenced field has one of the listed values */
33
+ conditionalOn?: {
34
+ field: string;
35
+ values: string[];
36
+ };
37
+ }
38
+ export interface SelectField extends BaseField {
39
+ type: 'single_select';
40
+ options: FieldOption[];
41
+ }
42
+ export interface MultiSelectField extends BaseField {
43
+ type: 'multi_select';
44
+ options: FieldOption[];
45
+ maxSelect?: number;
46
+ }
47
+ export interface TextField extends BaseField {
48
+ type: 'text' | 'textarea';
49
+ maxLength?: number;
50
+ }
51
+ export interface NumberField extends BaseField {
52
+ type: 'number';
53
+ min?: number;
54
+ max?: number;
55
+ }
56
+ export type ProfileField = SelectField | MultiSelectField | TextField | NumberField | (BaseField & {
57
+ type: 'date' | 'object' | 'object_array' | 'address';
58
+ });
59
+ export interface FieldGroup {
60
+ key: string;
61
+ label: string;
62
+ description?: string;
63
+ step: number;
64
+ fields: ProfileField[];
65
+ }
66
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/profile-fields/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,IAAI,EACA,MAAM,GACN,UAAU,GACV,QAAQ,GACR,MAAM,GACN,eAAe,GACf,cAAc,GACd,QAAQ,GACR,cAAc,GACd,SAAS,CAAC;IACd,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,YAAY,EAAE,OAAO,CAAC;IACtB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uFAAuF;IACvF,aAAa,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACrD;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,IAAI,EAAE,QAAQ,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,gBAAgB,GAChB,SAAS,GACT,WAAW,GACX,CAAC,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,cAAc,GAAG,SAAS,CAAA;CAAE,CAAC,CAAC;AAE3E,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Type definitions for UDP profile field configuration.
3
+ *
4
+ * Mirrors the dating-schema profile-fields/types.ts pattern.
5
+ * These types describe field metadata — NOT the user's actual profile data.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/profile-fields/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG","sourcesContent":["/**\n * Type definitions for UDP profile field configuration.\n *\n * Mirrors the dating-schema profile-fields/types.ts pattern.\n * These types describe field metadata — NOT the user's actual profile data.\n */\n\nexport interface FieldOption {\n value: string;\n label: string;\n /** Short description — shown on chips/cards */\n description?: string;\n}\n\nexport interface BaseField {\n /** Display order within the step */\n order: number;\n /** Unique key — maps to DB field name */\n key: string;\n /** Human-readable label */\n label: string;\n /** Field type for form rendering */\n type:\n | 'text'\n | 'textarea'\n | 'number'\n | 'date'\n | 'single_select'\n | 'multi_select'\n | 'object'\n | 'object_array'\n | 'address';\n /** Step number (1-12) this field belongs to */\n step: number;\n /** Whether this field is collected during onboarding */\n isOnboarding: boolean;\n /** If true, can be skipped during onboarding */\n optional?: boolean;\n /** Help text shown below the field */\n description?: string;\n /** Mark as sensitive (shown with privacy notice) */\n sensitive?: boolean;\n /** If set, field only applicable when referenced field has one of the listed values */\n conditionalOn?: { field: string; values: string[] };\n}\n\nexport interface SelectField extends BaseField {\n type: 'single_select';\n options: FieldOption[];\n}\n\nexport interface MultiSelectField extends BaseField {\n type: 'multi_select';\n options: FieldOption[];\n maxSelect?: number;\n}\n\nexport interface TextField extends BaseField {\n type: 'text' | 'textarea';\n maxLength?: number;\n}\n\nexport interface NumberField extends BaseField {\n type: 'number';\n min?: number;\n max?: number;\n}\n\nexport type ProfileField =\n | SelectField\n | MultiSelectField\n | TextField\n | NumberField\n | (BaseField & { type: 'date' | 'object' | 'object_array' | 'address' });\n\nexport interface FieldGroup {\n key: string;\n label: string;\n description?: string;\n step: number;\n fields: ProfileField[];\n}\n"]}
@@ -25,4 +25,22 @@ export declare function calculateStepProgress(stepNumber: number, formData: Reco
25
25
  filled: number;
26
26
  total: number;
27
27
  };
28
+ /**
29
+ * Calculate overall progress across all steps.
30
+ * Returns per-step breakdown + overall percentage.
31
+ *
32
+ * Mirrors dating-schema's calculateDatingOverallProgress().
33
+ *
34
+ * @param stepData - Map of step number → form data (e.g., { 1: {...}, 2: {...} })
35
+ */
36
+ export declare function calculateOverallProgress(stepData: Record<number, Record<string, unknown> | undefined | null>): {
37
+ steps: {
38
+ stepNumber: number;
39
+ filled: number;
40
+ total: number;
41
+ }[];
42
+ totalFilled: number;
43
+ totalFields: number;
44
+ percent: number;
45
+ };
28
46
  //# sourceMappingURL=progress-fields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress-fields.d.ts","sourceRoot":"","sources":["../src/progress-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CA+GxD,CAAC;AAEX,gCAAgC;AAChC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAYlF;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAcrD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,GACnD;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAenC"}
1
+ {"version":3,"file":"progress-fields.d.ts","sourceRoot":"","sources":["../src/progress-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CA+GxD,CAAC;AAEX,gCAAgC;AAChC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAYlF;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAcrD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,GACnD;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAenC;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,GACnE;IACD,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAeA"}
@@ -176,4 +176,25 @@ export function calculateStepProgress(stepNumber, formData) {
176
176
  }
177
177
  return { filled, total };
178
178
  }
179
+ /**
180
+ * Calculate overall progress across all steps.
181
+ * Returns per-step breakdown + overall percentage.
182
+ *
183
+ * Mirrors dating-schema's calculateDatingOverallProgress().
184
+ *
185
+ * @param stepData - Map of step number → form data (e.g., { 1: {...}, 2: {...} })
186
+ */
187
+ export function calculateOverallProgress(stepData) {
188
+ const steps = [];
189
+ let totalFilled = 0;
190
+ let totalFields = 0;
191
+ for (let stepNumber = 1; stepNumber <= UDP_TOTAL_STEPS; stepNumber++) {
192
+ const { filled, total } = calculateStepProgress(stepNumber, stepData[stepNumber]);
193
+ steps.push({ stepNumber, filled, total });
194
+ totalFilled += filled;
195
+ totalFields += total;
196
+ }
197
+ const percent = totalFields > 0 ? Math.round((totalFilled / totalFields) * 100) : 0;
198
+ return { steps, totalFilled, totalFields, percent };
199
+ }
179
200
  //# sourceMappingURL=progress-fields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress-fields.js","sourceRoot":"","sources":["../src/progress-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAsC;IACpE,CAAC,EAAE;QACD,WAAW;QACX,UAAU;QACV,QAAQ;QACR,aAAa;QACb,gBAAgB;QAChB,iBAAiB;QACjB,oBAAoB;QACpB,gBAAgB;QAChB,kBAAkB;QAClB,mBAAmB;QACnB,gBAAgB;KACjB;IACD,CAAC,EAAE;QACD,mBAAmB;QACnB,sBAAsB;QACtB,wBAAwB;QACxB,0BAA0B;QAC1B,2BAA2B;KAC5B;IACD,CAAC,EAAE;QACD,YAAY;QACZ,kBAAkB;QAClB,iBAAiB;QACjB,iBAAiB;QACjB,qBAAqB;KACtB;IACD,CAAC,EAAE;QACD,yBAAyB;QACzB,0BAA0B;QAC1B,oBAAoB;QACpB,mBAAmB;QACnB,uBAAuB;QACvB,sBAAsB;QACtB,gBAAgB;QAChB,uBAAuB;KACxB;IACD,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC;IAC9B,CAAC,EAAE;QACD,sBAAsB;QACtB,qBAAqB;QACrB,0BAA0B;QAC1B,6BAA6B;QAC7B,+BAA+B;QAC/B,6BAA6B;QAC7B,UAAU;QACV,aAAa;QACb,iBAAiB;QACjB,YAAY;QACZ,gBAAgB;KACjB;IACD,CAAC,EAAE;QACD,kBAAkB;QAClB,YAAY;QACZ,WAAW;QACX,sBAAsB;QACtB,cAAc;QACd,aAAa;QACb,iBAAiB;KAClB;IACD,CAAC,EAAE;QACD,sBAAsB;QACtB,YAAY;QACZ,oBAAoB;QACpB,eAAe;QACf,yB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CAAC;IAED,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAC3B,CAAC","sourcesContent":["/**\n * UDP Progress Fields — Single source of truth for step progress counting.\n *\n * Used by both frontend (stepper UI) and backend (computeStepProgressCounts).\n * Each step lists the curated fields that determine filled/total progress.\n *\n * Dot-paths (e.g., \"currentAddress.state\") resolve nested subdocument fields.\n * Only these fields count toward progress — extra fields in the schema are ignored.\n */\n\nexport const UDP_PROGRESS_FIELDS: Record<number, readonly string[]> = {\n 1: [\n 'firstName',\n 'lastName',\n 'gender',\n 'dateOfBirth',\n 'whatsappNumber',\n 'primaryLanguage',\n 'secondaryLanguages',\n 'familyReligion',\n 'personalReligion',\n 'reservationStatus',\n 'minorityStatus',\n ],\n 2: [\n 'politicalSpectrum',\n 'selfPartyAssociation',\n 'familyPartyAssociation',\n 'publicOfficeAndElections',\n 'networkAndCivicEngagement',\n ],\n 3: [\n 'epicNumber',\n 'willVoteThisTime',\n 'didVoteLastTime',\n 'votingFrequency',\n 'primaryVotingIssues',\n ],\n 4: [\n 'participateInRevolution',\n 'desiredPoliticalPosition',\n 'leadershipSkillset',\n 'politicalExposure',\n 'comfortWithVisibility',\n 'socialInfluenceLevel',\n 'pastExperience',\n 'changesYouWantToBring',\n ],\n 5: ['mbtiType', 'oceanScores'],\n 6: [\n 'highestQualification',\n 'education10th.board',\n 'education10th.schoolName',\n 'education10th.yearOfPassing',\n 'education12th.institutionName',\n 'education12th.yearOfPassing',\n 'diplomas',\n 'graduations',\n 'postGraduations',\n 'doctorates',\n 'postDoctorates',\n ],\n 7: [\n 'employmentStatus',\n 'occupation',\n 'workShift',\n 'comfortableWithShift',\n 'desiredShift',\n 'incomeRange',\n 'dreamOccupation',\n ],\n 8: [\n 'neurodiverseIdentity',\n 'conditions',\n 'sensoryPreferences',\n 'learningStyle',\n 'communicationPreference',\n 'supportNeeds',\n ],\n 9: [\n 'disabilityStatus',\n 'generalHealth',\n 'healthInsurance',\n 'diet',\n 'physicalActivity',\n 'sleepQuality',\n 'substanceUse',\n 'stressLevel',\n ],\n 10: [\n 'viewOnAnimalCruelty',\n 'viewOnLgbtqStatements',\n 'viewOnTransgenderInclusion',\n 'facingCasteDiscrimination',\n 'casteDiscriminationPlaces',\n 'viewOnGenderEquality',\n ],\n 11: [\n 'currentAddress.state',\n 'currentAddress.district',\n 'currentAddress.village',\n 'permanentAddress.state',\n 'permanentAddress.district',\n 'permanentAddress.village',\n 'homeNativePlace.state',\n 'homeNativePlace.district',\n 'ancestralPlace.state',\n 'ancestralPlace.district',\n ],\n 12: [\n 'maritalStatus',\n 'familyMembers',\n 'numberOfDependents',\n 'housingType',\n 'householdIncome',\n 'bplCard',\n 'digitalAccess',\n 'migrationStatus',\n 'landOwnership',\n 'primaryIncomeSource',\n ],\n} as const;\n\n/** Total number of UDP steps */\nexport const UDP_TOTAL_STEPS = 12;\n\n/**\n * Resolve a dot-path (e.g., \"currentAddress.state\") against a data object.\n * Works with both plain objects and Mongoose subdocuments.\n */\nexport function getNestedValue(obj: Record<string, unknown>, path: string): unknown {\n const parts = path.split('.');\n let current: unknown = obj;\n\n for (const part of parts) {\n if (current === null || current === undefined || typeof current !== 'object') {\n return undefined;\n }\n current = (current as Record<string, unknown>)[part];\n }\n\n return current;\n}\n\n/** Determine if a field value counts as \"filled\" for progress */\nexport function isFieldFilled(value: unknown): boolean {\n if (value === null || value === undefined) return false;\n if (typeof value === 'string') return value.trim().length > 0;\n if (typeof value === 'number') return true;\n if (typeof value === 'boolean') return true;\n if (Array.isArray(value)) return value.length > 0;\n if (typeof value === 'object') {\n // Area entity ref - check for name\n if ('name' in value && typeof (value as Record<string, unknown>).name === 'string') {\n return (value as Record<string, unknown>).name !== '';\n }\n return Object.keys(value).length > 0;\n }\n return false;\n}\n\n/**\n * Calculate progress for a single step.\n * Shared between frontend (stepper UI) and backend (API response).\n */\nexport function calculateStepProgress(\n stepNumber: number,\n formData: Record<string, unknown> | undefined | null,\n): { filled: number; total: number } {\n const fields = UDP_PROGRESS_FIELDS[stepNumber];\n if (!fields) return { filled: 0, total: 0 };\n\n const total = fields.length;\n if (!formData || total === 0) return { filled: 0, total };\n\n let filled = 0;\n for (const fieldPath of fields) {\n if (isFieldFilled(getNestedValue(formData, fieldPath))) {\n filled++;\n }\n }\n\n return { filled, total };\n}\n"]}
1
+ {"version":3,"file":"progress-fields.js","sourceRoot":"","sources":["../src/progress-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAsC;IACpE,CAAC,EAAE;QACD,WAAW;QACX,UAAU;QACV,QAAQ;QACR,aAAa;QACb,gBAAgB;QAChB,iBAAiB;QACjB,oBAAoB;QACpB,gBAAgB;QAChB,kBAAkB;QAClB,mBAAmB;QACnB,gBAAgB;KACjB;IACD,CAAC,EAAE;QACD,mBAAmB;QACnB,sBAAsB;QACtB,wBAAwB;QACxB,0BAA0B;QAC1B,2BAA2B;KAC5B;IACD,CAAC,EAAE;QACD,YAAY;QACZ,kBAAkB;QAClB,iBAAiB;QACjB,iBAAiB;QACjB,qBAAqB;KACtB;IACD,CAAC,EAAE;QACD,yBAAyB;QACzB,0BAA0B;QAC1B,oBAAoB;QACpB,mBAAmB;QACnB,uBAAuB;QACvB,sBAAsB;QACtB,gBAAgB;QAChB,uBAAuB;KACxB;IACD,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC;IAC9B,CAAC,EAAE;QACD,sBAAsB;QACtB,qBAAqB;QACrB,0BAA0B;QAC1B,6BAA6B;QAC7B,+BAA+B;QAC/B,6BAA6B;QAC7B,UAAU;QACV,aAAa;QACb,iBAAiB;QACjB,YAAY;QACZ,gBAAgB;KACjB;IACD,CAAC,EAAE;QACD,kBAAkB;QAClB,YAAY;QACZ,WAAW;QACX,sBAAsB;QACtB,cAAc;QACd,aAAa;QACb,iBAAiB;KAClB;IACD,CAAC,EAAE;QACD,sBAAsB;QACtB,YAAY;QACZ,oBAAoB;QACpB,eAAe;QACf,yBA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AAC;IAED,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAC3B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CACtC,QAAoE;IAOpE,MAAM,KAAK,GAA4D,EAAE,CAAC;IAC1E,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,WAAW,GAAG,CAAC,CAAC;IAEpB,KAAK,IAAI,UAAU,GAAG,CAAC,EAAE,UAAU,IAAI,eAAe,EAAE,UAAU,EAAE,EAAE,CAAC;QACrE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,qBAAqB,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;QAClF,KAAK,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1C,WAAW,IAAI,MAAM,CAAC;QACtB,WAAW,IAAI,KAAK,CAAC;IACvB,CAAC;IAED,MAAM,OAAO,GAAG,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,GAAG,WAAW,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEpF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AACtD,CAAC","sourcesContent":["/**\n * UDP Progress Fields — Single source of truth for step progress counting.\n *\n * Used by both frontend (stepper UI) and backend (computeStepProgressCounts).\n * Each step lists the curated fields that determine filled/total progress.\n *\n * Dot-paths (e.g., \"currentAddress.state\") resolve nested subdocument fields.\n * Only these fields count toward progress — extra fields in the schema are ignored.\n */\n\nexport const UDP_PROGRESS_FIELDS: Record<number, readonly string[]> = {\n 1: [\n 'firstName',\n 'lastName',\n 'gender',\n 'dateOfBirth',\n 'whatsappNumber',\n 'primaryLanguage',\n 'secondaryLanguages',\n 'familyReligion',\n 'personalReligion',\n 'reservationStatus',\n 'minorityStatus',\n ],\n 2: [\n 'politicalSpectrum',\n 'selfPartyAssociation',\n 'familyPartyAssociation',\n 'publicOfficeAndElections',\n 'networkAndCivicEngagement',\n ],\n 3: [\n 'epicNumber',\n 'willVoteThisTime',\n 'didVoteLastTime',\n 'votingFrequency',\n 'primaryVotingIssues',\n ],\n 4: [\n 'participateInRevolution',\n 'desiredPoliticalPosition',\n 'leadershipSkillset',\n 'politicalExposure',\n 'comfortWithVisibility',\n 'socialInfluenceLevel',\n 'pastExperience',\n 'changesYouWantToBring',\n ],\n 5: ['mbtiType', 'oceanScores'],\n 6: [\n 'highestQualification',\n 'education10th.board',\n 'education10th.schoolName',\n 'education10th.yearOfPassing',\n 'education12th.institutionName',\n 'education12th.yearOfPassing',\n 'diplomas',\n 'graduations',\n 'postGraduations',\n 'doctorates',\n 'postDoctorates',\n ],\n 7: [\n 'employmentStatus',\n 'occupation',\n 'workShift',\n 'comfortableWithShift',\n 'desiredShift',\n 'incomeRange',\n 'dreamOccupation',\n ],\n 8: [\n 'neurodiverseIdentity',\n 'conditions',\n 'sensoryPreferences',\n 'learningStyle',\n 'communicationPreference',\n 'supportNeeds',\n ],\n 9: [\n 'disabilityStatus',\n 'generalHealth',\n 'healthInsurance',\n 'diet',\n 'physicalActivity',\n 'sleepQuality',\n 'substanceUse',\n 'stressLevel',\n ],\n 10: [\n 'viewOnAnimalCruelty',\n 'viewOnLgbtqStatements',\n 'viewOnTransgenderInclusion',\n 'facingCasteDiscrimination',\n 'casteDiscriminationPlaces',\n 'viewOnGenderEquality',\n ],\n 11: [\n 'currentAddress.state',\n 'currentAddress.district',\n 'currentAddress.village',\n 'permanentAddress.state',\n 'permanentAddress.district',\n 'permanentAddress.village',\n 'homeNativePlace.state',\n 'homeNativePlace.district',\n 'ancestralPlace.state',\n 'ancestralPlace.district',\n ],\n 12: [\n 'maritalStatus',\n 'familyMembers',\n 'numberOfDependents',\n 'housingType',\n 'householdIncome',\n 'bplCard',\n 'digitalAccess',\n 'migrationStatus',\n 'landOwnership',\n 'primaryIncomeSource',\n ],\n} as const;\n\n/** Total number of UDP steps */\nexport const UDP_TOTAL_STEPS = 12;\n\n/**\n * Resolve a dot-path (e.g., \"currentAddress.state\") against a data object.\n * Works with both plain objects and Mongoose subdocuments.\n */\nexport function getNestedValue(obj: Record<string, unknown>, path: string): unknown {\n const parts = path.split('.');\n let current: unknown = obj;\n\n for (const part of parts) {\n if (current === null || current === undefined || typeof current !== 'object') {\n return undefined;\n }\n current = (current as Record<string, unknown>)[part];\n }\n\n return current;\n}\n\n/** Determine if a field value counts as \"filled\" for progress */\nexport function isFieldFilled(value: unknown): boolean {\n if (value === null || value === undefined) return false;\n if (typeof value === 'string') return value.trim().length > 0;\n if (typeof value === 'number') return true;\n if (typeof value === 'boolean') return true;\n if (Array.isArray(value)) return value.length > 0;\n if (typeof value === 'object') {\n // Area entity ref - check for name\n if ('name' in value && typeof (value as Record<string, unknown>).name === 'string') {\n return (value as Record<string, unknown>).name !== '';\n }\n return Object.keys(value).length > 0;\n }\n return false;\n}\n\n/**\n * Calculate progress for a single step.\n * Shared between frontend (stepper UI) and backend (API response).\n */\nexport function calculateStepProgress(\n stepNumber: number,\n formData: Record<string, unknown> | undefined | null,\n): { filled: number; total: number } {\n const fields = UDP_PROGRESS_FIELDS[stepNumber];\n if (!fields) return { filled: 0, total: 0 };\n\n const total = fields.length;\n if (!formData || total === 0) return { filled: 0, total };\n\n let filled = 0;\n for (const fieldPath of fields) {\n if (isFieldFilled(getNestedValue(formData, fieldPath))) {\n filled++;\n }\n }\n\n return { filled, total };\n}\n\n/**\n * Calculate overall progress across all steps.\n * Returns per-step breakdown + overall percentage.\n *\n * Mirrors dating-schema's calculateDatingOverallProgress().\n *\n * @param stepData - Map of step number → form data (e.g., { 1: {...}, 2: {...} })\n */\nexport function calculateOverallProgress(\n stepData: Record<number, Record<string, unknown> | undefined | null>,\n): {\n steps: { stepNumber: number; filled: number; total: number }[];\n totalFilled: number;\n totalFields: number;\n percent: number;\n} {\n const steps: { stepNumber: number; filled: number; total: number }[] = [];\n let totalFilled = 0;\n let totalFields = 0;\n\n for (let stepNumber = 1; stepNumber <= UDP_TOTAL_STEPS; stepNumber++) {\n const { filled, total } = calculateStepProgress(stepNumber, stepData[stepNumber]);\n steps.push({ stepNumber, filled, total });\n totalFilled += filled;\n totalFields += total;\n }\n\n const percent = totalFields > 0 ? Math.round((totalFilled / totalFields) * 100) : 0;\n\n return { steps, totalFilled, totalFields, percent };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"step-01.schema.d.ts","sourceRoot":"","sources":["../src/step-01.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2G9B,CAAC;AAIH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"step-01.schema.d.ts","sourceRoot":"","sources":["../src/step-01.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2G9B,CAAC;AAIH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -8,7 +8,7 @@
8
8
  * @module udp-schema/step-01
9
9
  */
10
10
  import { z } from 'zod';
11
- import { emptyStringToUndefined, optionalTrimmedString, optionalPhoneSchema } from './zod-helpers.js';
11
+ import { emptyStringToUndefined, optionalPhoneSchema, optionalTrimmedString, } from './zod-helpers.js';
12
12
  // ─── Main Step 01 Schema ────────────────────────────────────────────────────
13
13
  export const step01ProfileSchema = z.object({
14
14
  firstName: z
@@ -1 +1 @@
1
- {"version":3,"file":"step-01.schema.js","sourceRoot":"","sources":["../src/step-01.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEtG,+EAA+E;AAE/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;SAChC,GAAG,CAAC,EAAE,EAAE,0CAA0C,CAAC;IAEtD,UAAU,EAAE,qBAAqB;IAEjC,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;SAC/B,GAAG,CAAC,EAAE,EAAE,yCAAyC,CAAC;IAErD,MAAM,EAAE,CAAC;SACN,IAAI,CAAC;QACJ,KAAK;QACL,OAAO;QACP,YAAY;QACZ,iBAAiB;QACjB,mBAAmB;QACnB,aAAa;QACb,aAAa;QACb,SAAS;QACT,YAAY;QACZ,OAAO;QACP,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;IAEb,WAAW,EAAE,CAAC,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC;IAE7E,cAAc,EAAE,mBAAmB;IAEnC,mGAAmG;IACnG,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAE7C,qCAAqC;IACrC,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEjE;;;OAGG;IACH,cAAc,EAAE,CAAC;SACd,IAAI,CAAC;QACJ,OAAO;QACP,cAAc;QACd,aAAa;QACb,aAAa;QACb,cAAc;QACd,oBAAoB;QACpB,sBAAsB;QACtB,iBAAiB;QACjB,MAAM;QACN,eAAe;QACf,iBAAiB;QACjB,UAAU;QACV,mBAAmB;QACnB,QAAQ;QACR,OAAO;QACP,WAAW;QACX,SAAS;QACT,UAAU;QACV,aAAa;QACb,gBAAgB;QAChB,OAAO;QACP,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;IAEb,yDAAyD;IACzD,gBAAgB,EAAE,CAAC;SAChB,IAAI,CAAC;QACJ,OAAO;QACP,cAAc;QACd,aAAa;QACb,aAAa;QACb,cAAc;QACd,oBAAoB;QACpB,sBAAsB;QACtB,iBAAiB;QACjB,MAAM;QACN,eAAe;QACf,iBAAiB;QACjB,UAAU;QACV,mBAAmB;QACnB,QAAQ;QACR,OAAO;QACP,WAAW;QACX,SAAS;QACT,UAAU;QACV,aAAa;QACb,gBAAgB;QAChB,OAAO;QACP,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;IAEb,mCAAmC;IACnC,iBAAiB,EAAE,CAAC;SACjB,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC;SACtF,QAAQ,EAAE;IAEb,gCAAgC;IAChC,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;CACjF,CAAC,CAAC","sourcesContent":["/**\n * Step 01 — Profile\n *\n * Fields: firstName, middleName, lastName, gender, dateOfBirth,\n * whatsappNumber, primaryLanguage, secondaryLanguages,\n * familyReligion, personalReligion, reservationStatus, minorityStatus\n *\n * @module udp-schema/step-01\n */\n\nimport { z } from 'zod';\nimport { emptyStringToUndefined, optionalTrimmedString, optionalPhoneSchema } from './zod-helpers.js';\n\n// ─── Main Step 01 Schema ────────────────────────────────────────────────────\n\nexport const step01ProfileSchema = z.object({\n firstName: z\n .string()\n .trim()\n .min(1, 'First name is required')\n .max(50, 'First name must be at most 50 characters'),\n\n middleName: optionalTrimmedString,\n\n lastName: z\n .string()\n .trim()\n .min(1, 'Last name is required')\n .max(50, 'Last name must be at most 50 characters'),\n\n gender: z\n .enum([\n 'man',\n 'woman',\n 'non_binary',\n 'transgender_man',\n 'transgender_woman',\n 'genderqueer',\n 'genderfluid',\n 'agender',\n 'two_spirit',\n 'other',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n dateOfBirth: z.preprocess(emptyStringToUndefined, z.coerce.date().optional()),\n\n whatsappNumber: optionalPhoneSchema,\n\n /** Single language code string (e.g., \"hindi\", \"english\") — matches dating motherTongue options */\n primaryLanguage: z.string().trim().optional(),\n\n /** Array of language code strings */\n secondaryLanguages: z.array(z.string().trim()).max(10).optional(),\n\n /**\n * Family religion — uses dating-schema religion option values.\n * e.g., \"hindu\", \"muslim_sunni\", \"christian_catholic\", etc.\n */\n familyReligion: z\n .enum([\n 'hindu',\n 'muslim_sunni',\n 'muslim_shia',\n 'muslim_sufi',\n 'muslim_other',\n 'christian_catholic',\n 'christian_protestant',\n 'christian_other',\n 'sikh',\n 'jain_digambar',\n 'jain_shwetambar',\n 'buddhist',\n 'parsi_zoroastrian',\n 'jewish',\n 'bahai',\n 'spiritual',\n 'atheist',\n 'agnostic',\n 'no_religion',\n 'inter_religion',\n 'other',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** Personal religion — same options as familyReligion */\n personalReligion: z\n .enum([\n 'hindu',\n 'muslim_sunni',\n 'muslim_shia',\n 'muslim_sufi',\n 'muslim_other',\n 'christian_catholic',\n 'christian_protestant',\n 'christian_other',\n 'sikh',\n 'jain_digambar',\n 'jain_shwetambar',\n 'buddhist',\n 'parsi_zoroastrian',\n 'jewish',\n 'bahai',\n 'spiritual',\n 'atheist',\n 'agnostic',\n 'no_religion',\n 'inter_religion',\n 'other',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** Reservation / caste category */\n reservationStatus: z\n .enum(['SC', 'ST', 'OBC_NC', 'OBC_C', 'EWS', 'GENERAL', 'DONT_KNOW', 'PREFER_NOT_SAY'])\n .optional(),\n\n /** Minority community status */\n minorityStatus: z.enum(['NO', 'RELIGIOUS', 'LINGUISTIC', 'NOT_SURE']).optional(),\n});\n\n// ─── Inferred types ─────────────────────────────────────────────────────────\n\nexport type Step01ProfileInput = z.infer<typeof step01ProfileSchema>;\n"]}
1
+ {"version":3,"file":"step-01.schema.js","sourceRoot":"","sources":["../src/step-01.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,+EAA+E;AAE/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;SAChC,GAAG,CAAC,EAAE,EAAE,0CAA0C,CAAC;IAEtD,UAAU,EAAE,qBAAqB;IAEjC,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;SAC/B,GAAG,CAAC,EAAE,EAAE,yCAAyC,CAAC;IAErD,MAAM,EAAE,CAAC;SACN,IAAI,CAAC;QACJ,KAAK;QACL,OAAO;QACP,YAAY;QACZ,iBAAiB;QACjB,mBAAmB;QACnB,aAAa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SACjB,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC;SACtF,QAAQ,EAAE;IAEb,gCAAgC;IAChC,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;CACjF,CAAC,CAAC","sourcesContent":["/**\n * Step 01 — Profile\n *\n * Fields: firstName, middleName, lastName, gender, dateOfBirth,\n * whatsappNumber, primaryLanguage, secondaryLanguages,\n * familyReligion, personalReligion, reservationStatus, minorityStatus\n *\n * @module udp-schema/step-01\n */\n\nimport { z } from 'zod';\nimport {\n emptyStringToUndefined,\n optionalPhoneSchema,\n optionalTrimmedString,\n} from './zod-helpers.js';\n\n// ─── Main Step 01 Schema ────────────────────────────────────────────────────\n\nexport const step01ProfileSchema = z.object({\n firstName: z\n .string()\n .trim()\n .min(1, 'First name is required')\n .max(50, 'First name must be at most 50 characters'),\n\n middleName: optionalTrimmedString,\n\n lastName: z\n .string()\n .trim()\n .min(1, 'Last name is required')\n .max(50, 'Last name must be at most 50 characters'),\n\n gender: z\n .enum([\n 'man',\n 'woman',\n 'non_binary',\n 'transgender_man',\n 'transgender_woman',\n 'genderqueer',\n 'genderfluid',\n 'agender',\n 'two_spirit',\n 'other',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n dateOfBirth: z.preprocess(emptyStringToUndefined, z.coerce.date().optional()),\n\n whatsappNumber: optionalPhoneSchema,\n\n /** Single language code string (e.g., \"hindi\", \"english\") — matches dating motherTongue options */\n primaryLanguage: z.string().trim().optional(),\n\n /** Array of language code strings */\n secondaryLanguages: z.array(z.string().trim()).max(10).optional(),\n\n /**\n * Family religion — uses dating-schema religion option values.\n * e.g., \"hindu\", \"muslim_sunni\", \"christian_catholic\", etc.\n */\n familyReligion: z\n .enum([\n 'hindu',\n 'muslim_sunni',\n 'muslim_shia',\n 'muslim_sufi',\n 'muslim_other',\n 'christian_catholic',\n 'christian_protestant',\n 'christian_other',\n 'sikh',\n 'jain_digambar',\n 'jain_shwetambar',\n 'buddhist',\n 'parsi_zoroastrian',\n 'jewish',\n 'bahai',\n 'spiritual',\n 'atheist',\n 'agnostic',\n 'no_religion',\n 'inter_religion',\n 'other',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** Personal religion — same options as familyReligion */\n personalReligion: z\n .enum([\n 'hindu',\n 'muslim_sunni',\n 'muslim_shia',\n 'muslim_sufi',\n 'muslim_other',\n 'christian_catholic',\n 'christian_protestant',\n 'christian_other',\n 'sikh',\n 'jain_digambar',\n 'jain_shwetambar',\n 'buddhist',\n 'parsi_zoroastrian',\n 'jewish',\n 'bahai',\n 'spiritual',\n 'atheist',\n 'agnostic',\n 'no_religion',\n 'inter_religion',\n 'other',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** Reservation / caste category */\n reservationStatus: z\n .enum(['SC', 'ST', 'OBC_NC', 'OBC_C', 'EWS', 'GENERAL', 'DONT_KNOW', 'PREFER_NOT_SAY'])\n .optional(),\n\n /** Minority community status */\n minorityStatus: z.enum(['NO', 'RELIGIOUS', 'LINGUISTIC', 'NOT_SURE']).optional(),\n});\n\n// ─── Inferred types ─────────────────────────────────────────────────────────\n\nexport type Step01ProfileInput = z.infer<typeof step01ProfileSchema>;\n"]}