udp-schema 2.9.0 → 2.10.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.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/profile-fields/03-electoral.d.ts +114 -15
- package/dist/profile-fields/03-electoral.d.ts.map +1 -1
- package/dist/profile-fields/03-electoral.js +54 -9
- package/dist/profile-fields/03-electoral.js.map +1 -1
- package/dist/profile-fields/types.d.ts.map +1 -1
- package/dist/profile-fields/types.js.map +1 -1
- package/dist/step-02.schema.d.ts.map +1 -1
- package/dist/step-02.schema.js +1 -8
- package/dist/step-02.schema.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
export { type OnboardingFormData, udpOnboardingFormSchema, } from './onboarding-form.js';
|
|
20
20
|
export { canProceed } from './validation.js';
|
|
21
21
|
export { calcAge, isFieldVisible, labelFor, labelsFor } from './helpers.js';
|
|
22
|
-
export { allFieldGroups, type BaseField, casteDiscriminationPlaceOptions, civicEngagementOptions, dietOptions, digitalAccessOptions, disabilityOptions, education, electoralBehaviour, employment, employmentStatusOptions, type FieldGroup, type FieldOption, familyMemberOptions, genderOptions, healthLifestyle, household, householdIncomeOptions, incomeRangeOptions, languageOptions, leadershipAmbitions, leadershipSkillsetOptions, lgbtqStatementOptions, type MultiSelectField, mbtiOptions, minorityOptions, type NumberField, neurodiversity, neurodiversityConditionOptions, type ProfileField, partyAssociationRoleOptions, partyOptions, politicalAssociation, politicalSpectrumOptions,
|
|
22
|
+
export { allFieldGroups, type BaseField, casteDiscriminationPlaceOptions, civicEngagementOptions, dietOptions, digitalAccessOptions, disabilityOptions, education, electionResultOptions, electoralBehaviour, employment, employmentStatusOptions, type FieldGroup, type FieldOption, familyMemberOptions, genderOptions, healthLifestyle, household, householdIncomeOptions, incomeRangeOptions, languageOptions, leadershipAmbitions, leadershipSkillsetOptions, lgbtqStatementOptions, type MultiSelectField, mbtiOptions, minorityOptions, type NumberField, neurodiversity, neurodiversityConditionOptions, officeElectionLevelOptions, type ProfileField, partyAssociationRoleOptions, partyOptions, politicalAssociation, politicalSpectrumOptions, profile, psychologicalAssessment, qualificationOptions, relativesInPoliticsOptions, religionOptions, reservationOptions, residence, type SelectField, sensoryPreferenceOptions, shiftOptions, substanceUseOptions, supportNeedOptions, type TextField, transgenderStatementOptions, votingIssueOptions, worldView, } from './profile-fields/index.js';
|
|
23
23
|
export { getFieldMeta, getFieldOptions, getImmutableFields, getStepSchema, } from './field-helpers.js';
|
|
24
24
|
export { getUdpOnboardingFieldConfig, UDP_ONBOARDING_FIELDS, UDP_ONBOARDING_STEP_GROUPS, UDP_TOTAL_MAIN_STEPS, UDP_TOTAL_SUB_STEPS, type UdpOnboardingFieldConfig, type UdpOnboardingStepGroup, } from './onboarding-config.js';
|
|
25
25
|
export { calculateOverallProgress as calculateUdpOverallProgress, calculateStepProgress as calculateUdpStepProgress, getNestedValue, isFieldFilled, UDP_PROGRESS_FIELDS, UDP_TOTAL_STEPS, } from './progress-fields.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EACL,KAAK,kBAAkB,EACvB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI7C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI5E,OAAO,EAEL,cAAc,EAEd,KAAK,SAAS,EACd,+BAA+B,EAC/B,sBAAsB,EACtB,WAAW,EACX,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,uBAAuB,EACvB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,mBAAmB,EAEnB,aAAa,EACb,eAAe,EACf,SAAS,EACT,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,WAAW,EACX,eAAe,EACf,KAAK,WAAW,EAChB,cAAc,EACd,8BAA8B,EAC9B,KAAK,YAAY,EACjB,2BAA2B,EAC3B,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACxB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EACL,KAAK,kBAAkB,EACvB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI7C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI5E,OAAO,EAEL,cAAc,EAEd,KAAK,SAAS,EACd,+BAA+B,EAC/B,sBAAsB,EACtB,WAAW,EACX,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EAClB,UAAU,EACV,uBAAuB,EACvB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,mBAAmB,EAEnB,aAAa,EACb,eAAe,EACf,SAAS,EACT,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,WAAW,EACX,eAAe,EACf,KAAK,WAAW,EAChB,cAAc,EACd,8BAA8B,EAC9B,0BAA0B,EAC1B,KAAK,YAAY,EACjB,2BAA2B,EAC3B,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACxB,OAAO,EACP,uBAAuB,EACvB,oBAAoB,EACpB,0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M,qBAAqB,CAAC;AACjG,OAAO,EAAE,KAAK,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,KAAK,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAIvF,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -25,9 +25,9 @@ export { calcAge, isFieldVisible, labelFor, labelsFor } from './helpers.js';
|
|
|
25
25
|
// ─── Profile Fields (rich metadata — like dating-schema) ────────────────────
|
|
26
26
|
export {
|
|
27
27
|
// Field groups
|
|
28
|
-
allFieldGroups, casteDiscriminationPlaceOptions, civicEngagementOptions, dietOptions, digitalAccessOptions, disabilityOptions, education, electoralBehaviour, employment, employmentStatusOptions, familyMemberOptions,
|
|
28
|
+
allFieldGroups, casteDiscriminationPlaceOptions, civicEngagementOptions, dietOptions, digitalAccessOptions, disabilityOptions, education, electionResultOptions, electoralBehaviour, employment, employmentStatusOptions, familyMemberOptions,
|
|
29
29
|
// Option arrays (with labels + descriptions)
|
|
30
|
-
genderOptions, healthLifestyle, household, householdIncomeOptions, incomeRangeOptions, languageOptions, leadershipAmbitions, leadershipSkillsetOptions, lgbtqStatementOptions, mbtiOptions, minorityOptions, neurodiversity, neurodiversityConditionOptions, partyAssociationRoleOptions, partyOptions, politicalAssociation, politicalSpectrumOptions,
|
|
30
|
+
genderOptions, healthLifestyle, household, householdIncomeOptions, incomeRangeOptions, languageOptions, leadershipAmbitions, leadershipSkillsetOptions, lgbtqStatementOptions, mbtiOptions, minorityOptions, neurodiversity, neurodiversityConditionOptions, officeElectionLevelOptions, partyAssociationRoleOptions, partyOptions, politicalAssociation, politicalSpectrumOptions, profile, psychologicalAssessment, qualificationOptions, relativesInPoliticsOptions, religionOptions, reservationOptions, residence, sensoryPreferenceOptions, shiftOptions, substanceUseOptions, supportNeedOptions, transgenderStatementOptions, votingIssueOptions, worldView, } from './profile-fields/index.js';
|
|
31
31
|
// ─── Field Helpers (like dating-schema) ─────────────────────────────────────
|
|
32
32
|
export { getFieldMeta, getFieldOptions, getImmutableFields, getStepSchema, } from './field-helpers.js';
|
|
33
33
|
// ─── Onboarding Configuration ───────────────────────────────────────────────
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,+EAA+E;AAE/E,OAAO,EAEL,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAE9B,+EAA+E;AAE/E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,+EAA+E;AAE/E,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE5E,+EAA+E;AAE/E,OAAO;AACL,eAAe;AACf,cAAc,EAGd,+BAA+B,EAC/B,sBAAsB,EACtB,WAAW,EACX,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,uBAAuB,EAGvB,mBAAmB;AACnB,6CAA6C;AAC7C,aAAa,EACb,eAAe,EACf,SAAS,EACT,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EAErB,WAAW,EACX,eAAe,EAEf,cAAc,EACd,8BAA8B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiB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cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAE9B,+EAA+E;AAE/E,OAAO,EAA2B,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAA6B,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAA6B,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAA8B,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAiC,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAEL,sBAAsB,EAEtB,iBAAiB,EAEjB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAA8B,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAkC,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjG,OAAO,EAA0B,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAA6B,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAGL,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAA6B,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEvF,+EAA+E;AAE/E,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC","sourcesContent":["/**\n * udp-schema — Shared schemas for User Detailed Profile (v2)\n *\n * Single source of truth consumed by both reform frontends and reform-backend.\n * 12-step \"1 question per screen\" architecture.\n *\n * Follows the same pattern as dating-schema:\n * - profile-fields/ with rich FieldGroup definitions\n * - getFieldOptions() / getFieldMeta() for runtime introspection\n * - Unified onboarding form schema (udpOnboardingFormSchema)\n * - Validation (canProceed) exported for frontend + backend\n * - Helpers (calcAge, labelFor, labelsFor) shared across codebases\n * - Onboarding-config for step grouping\n * - Zod step schemas for per-step validation\n * - Progress tracking (per-step + overall)\n *\n * @module udp-schema\n */\n\n// ─── Unified Form Schema (like dating's onboardingFormSchema) ───────────────\n\nexport {\n type OnboardingFormData,\n udpOnboardingFormSchema,\n} from './onboarding-form.js';\n\n// ─── Validation (single source of truth — used by frontend + backend) ───────\n\nexport { canProceed } from './validation.js';\n\n// ─── Shared Helpers ─────────────────────────────────────────────────────────\n\nexport { calcAge, isFieldVisible, labelFor, labelsFor } from './helpers.js';\n\n// ─── Profile Fields (rich metadata — like dating-schema) ────────────────────\n\nexport {\n // Field groups\n allFieldGroups,\n // Types\n type BaseField,\n casteDiscriminationPlaceOptions,\n civicEngagementOptions,\n dietOptions,\n digitalAccessOptions,\n disabilityOptions,\n education,\n electionResultOptions,\n electoralBehaviour,\n employment,\n employmentStatusOptions,\n type FieldGroup,\n type FieldOption,\n familyMemberOptions,\n // Option arrays (with labels + descriptions)\n genderOptions,\n healthLifestyle,\n household,\n householdIncomeOptions,\n incomeRangeOptions,\n languageOptions,\n leadershipAmbitions,\n leadershipSkillsetOptions,\n lgbtqStatementOptions,\n type MultiSelectField,\n mbtiOptions,\n minorityOptions,\n type NumberField,\n neurodiversity,\n neurodiversityConditionOptions,\n officeElectionLevelOptions,\n type ProfileField,\n partyAssociationRoleOptions,\n partyOptions,\n politicalAssociation,\n politicalSpectrumOptions,\n profile,\n psychologicalAssessment,\n qualificationOptions,\n relativesInPoliticsOptions,\n religionOptions,\n reservationOptions,\n residence,\n type SelectField,\n sensoryPreferenceOptions,\n shiftOptions,\n substanceUseOptions,\n supportNeedOptions,\n type TextField,\n transgenderStatementOptions,\n votingIssueOptions,\n worldView,\n} from './profile-fields/index.js';\n\n// ─── Field Helpers (like dating-schema) ─────────────────────────────────────\n\nexport {\n getFieldMeta,\n getFieldOptions,\n getImmutableFields,\n getStepSchema,\n} from './field-helpers.js';\n\n// ─── Onboarding Configuration ───────────────────────────────────────────────\n\nexport {\n getUdpOnboardingFieldConfig,\n UDP_ONBOARDING_FIELDS,\n UDP_ONBOARDING_STEP_GROUPS,\n UDP_TOTAL_MAIN_STEPS,\n UDP_TOTAL_SUB_STEPS,\n type UdpOnboardingFieldConfig,\n type UdpOnboardingStepGroup,\n} from './onboarding-config.js';\n\n// ─── Progress Fields ────────────────────────────────────────────────────────\n\nexport {\n calculateOverallProgress as calculateUdpOverallProgress,\n calculateStepProgress as calculateUdpStepProgress,\n getNestedValue,\n isFieldFilled,\n UDP_PROGRESS_FIELDS,\n UDP_TOTAL_STEPS,\n} from './progress-fields.js';\n\n// ─── Step Schemas (Zod validation) ──────────────────────────────────────────\n\nexport { type Step01ProfileInput, step01ProfileSchema } from './step-01.schema.js';\nexport { type Step02PoliticalInput, step02PoliticalSchema } from './step-02.schema.js';\nexport { type Step03ElectoralInput, step03ElectoralSchema } from './step-03.schema.js';\nexport { type Step04LeadershipInput, step04LeadershipSchema } from './step-04.schema.js';\nexport { type Step05PsychologicalInput, step05PsychologicalSchema } from './step-05.schema.js';\nexport {\n type CertificateEntryInput,\n certificateEntrySchema,\n type DegreeEntryInput,\n degreeEntrySchema,\n type Step06EducationInput,\n step06EducationSchema,\n} from './step-06.schema.js';\nexport { type Step07EmploymentInput, step07EmploymentSchema } from './step-07.schema.js';\nexport { type Step08NeurodiversityInput, step08NeurodiversitySchema } from './step-08.schema.js';\nexport { type Step09HealthInput, step09HealthSchema } from './step-09.schema.js';\nexport { type Step10WorldViewInput, step10WorldViewSchema } from './step-10.schema.js';\nexport {\n type SimplifiedAddressInput,\n type Step11ResidenceInput,\n simplifiedAddressSchema,\n step11ResidenceSchema,\n} from './step-11.schema.js';\nexport { type Step12HouseholdInput, step12HouseholdSchema } from './step-12.schema.js';\n\n// ─── Zod Helpers ────────────────────────────────────────────────────────────\n\nexport {\n emptyStringToUndefined,\n optionalPhoneSchema,\n optionalTrimmedString,\n optionalYearSchema,\n} from './zod-helpers.js';\n"]}
|
|
@@ -1,7 +1,34 @@
|
|
|
1
1
|
import type { FieldGroup } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Primary voting issues — exhaustive list of issues that shape voting
|
|
4
|
+
* decisions in Indian elections. Grouped below by theme (economic,
|
|
5
|
+
* social, governance, identity, environment, development) but kept flat
|
|
6
|
+
* in the exported array so they can be multi-selected freely.
|
|
7
|
+
*/
|
|
2
8
|
export declare const votingIssueOptions: readonly [{
|
|
3
9
|
readonly value: "economy";
|
|
4
10
|
readonly label: "Economy & Jobs";
|
|
11
|
+
}, {
|
|
12
|
+
readonly value: "unemployment";
|
|
13
|
+
readonly label: "Unemployment";
|
|
14
|
+
}, {
|
|
15
|
+
readonly value: "inflation";
|
|
16
|
+
readonly label: "Inflation / Cost of Living";
|
|
17
|
+
}, {
|
|
18
|
+
readonly value: "farmer_issues";
|
|
19
|
+
readonly label: "Farmer Issues / MSP";
|
|
20
|
+
}, {
|
|
21
|
+
readonly value: "labour_wages";
|
|
22
|
+
readonly label: "Labour Rights & Wages";
|
|
23
|
+
}, {
|
|
24
|
+
readonly value: "poverty";
|
|
25
|
+
readonly label: "Poverty Alleviation";
|
|
26
|
+
}, {
|
|
27
|
+
readonly value: "business_msme";
|
|
28
|
+
readonly label: "Business / MSME Development";
|
|
29
|
+
}, {
|
|
30
|
+
readonly value: "tax_policy";
|
|
31
|
+
readonly label: "Tax Policy";
|
|
5
32
|
}, {
|
|
6
33
|
readonly value: "healthcare";
|
|
7
34
|
readonly label: "Healthcare";
|
|
@@ -9,35 +36,107 @@ export declare const votingIssueOptions: readonly [{
|
|
|
9
36
|
readonly value: "education";
|
|
10
37
|
readonly label: "Education";
|
|
11
38
|
}, {
|
|
12
|
-
readonly value: "
|
|
13
|
-
readonly label: "
|
|
39
|
+
readonly value: "housing";
|
|
40
|
+
readonly label: "Housing & Shelter";
|
|
14
41
|
}, {
|
|
15
|
-
readonly value: "
|
|
16
|
-
readonly label: "
|
|
42
|
+
readonly value: "welfare_schemes";
|
|
43
|
+
readonly label: "Welfare Schemes (PDS, MGNREGA, PMAY)";
|
|
44
|
+
}, {
|
|
45
|
+
readonly value: "pension_social_security";
|
|
46
|
+
readonly label: "Pension & Social Security";
|
|
47
|
+
}, {
|
|
48
|
+
readonly value: "infrastructure";
|
|
49
|
+
readonly label: "Roads, Bridges & Infrastructure";
|
|
50
|
+
}, {
|
|
51
|
+
readonly value: "water_sanitation";
|
|
52
|
+
readonly label: "Water & Sanitation";
|
|
53
|
+
}, {
|
|
54
|
+
readonly value: "electricity";
|
|
55
|
+
readonly label: "Electricity / Power Supply";
|
|
56
|
+
}, {
|
|
57
|
+
readonly value: "public_transport";
|
|
58
|
+
readonly label: "Public Transport";
|
|
59
|
+
}, {
|
|
60
|
+
readonly value: "digital_infrastructure";
|
|
61
|
+
readonly label: "Digital & Internet Access";
|
|
17
62
|
}, {
|
|
18
63
|
readonly value: "womens_safety";
|
|
19
64
|
readonly label: "Women's Safety";
|
|
20
65
|
}, {
|
|
21
|
-
readonly value: "
|
|
22
|
-
readonly label: "
|
|
66
|
+
readonly value: "womens_rights";
|
|
67
|
+
readonly label: "Women's Rights & Empowerment";
|
|
23
68
|
}, {
|
|
24
69
|
readonly value: "caste_issues";
|
|
25
|
-
readonly label: "Caste
|
|
70
|
+
readonly label: "Caste & Reservation";
|
|
26
71
|
}, {
|
|
27
72
|
readonly value: "religious_issues";
|
|
28
|
-
readonly label: "
|
|
73
|
+
readonly label: "Religion & Secularism";
|
|
29
74
|
}, {
|
|
30
|
-
readonly value: "
|
|
31
|
-
readonly label: "
|
|
75
|
+
readonly value: "minority_rights";
|
|
76
|
+
readonly label: "Minority Rights";
|
|
77
|
+
}, {
|
|
78
|
+
readonly value: "lgbtq_rights";
|
|
79
|
+
readonly label: "LGBTQ+ Rights";
|
|
80
|
+
}, {
|
|
81
|
+
readonly value: "tribal_rights";
|
|
82
|
+
readonly label: "Tribal / Adivasi Rights";
|
|
83
|
+
}, {
|
|
84
|
+
readonly value: "corruption";
|
|
85
|
+
readonly label: "Corruption";
|
|
86
|
+
}, {
|
|
87
|
+
readonly value: "law_order";
|
|
88
|
+
readonly label: "Law & Order";
|
|
89
|
+
}, {
|
|
90
|
+
readonly value: "judicial_reform";
|
|
91
|
+
readonly label: "Judicial Reform";
|
|
92
|
+
}, {
|
|
93
|
+
readonly value: "bureaucratic_reform";
|
|
94
|
+
readonly label: "Bureaucratic Reform / Red Tape";
|
|
95
|
+
}, {
|
|
96
|
+
readonly value: "electoral_reform";
|
|
97
|
+
readonly label: "Electoral Reform";
|
|
32
98
|
}, {
|
|
33
99
|
readonly value: "national_security";
|
|
34
|
-
readonly label: "National Security";
|
|
100
|
+
readonly label: "National Security / Defence";
|
|
35
101
|
}, {
|
|
36
|
-
readonly value: "
|
|
37
|
-
readonly label: "
|
|
102
|
+
readonly value: "foreign_policy";
|
|
103
|
+
readonly label: "Foreign Policy";
|
|
38
104
|
}, {
|
|
39
|
-
readonly value: "
|
|
40
|
-
readonly label: "
|
|
105
|
+
readonly value: "nationalism";
|
|
106
|
+
readonly label: "Nationalism / Cultural Identity";
|
|
107
|
+
}, {
|
|
108
|
+
readonly value: "citizenship_caa_nrc";
|
|
109
|
+
readonly label: "Citizenship (CAA / NRC)";
|
|
110
|
+
}, {
|
|
111
|
+
readonly value: "border_security";
|
|
112
|
+
readonly label: "Border Security / Terrorism";
|
|
113
|
+
}, {
|
|
114
|
+
readonly value: "uniform_civil_code";
|
|
115
|
+
readonly label: "Uniform Civil Code";
|
|
116
|
+
}, {
|
|
117
|
+
readonly value: "environment";
|
|
118
|
+
readonly label: "Environment & Climate";
|
|
119
|
+
}, {
|
|
120
|
+
readonly value: "pollution";
|
|
121
|
+
readonly label: "Air & Water Pollution";
|
|
122
|
+
}, {
|
|
123
|
+
readonly value: "renewable_energy";
|
|
124
|
+
readonly label: "Renewable Energy";
|
|
125
|
+
}, {
|
|
126
|
+
readonly value: "urban_development";
|
|
127
|
+
readonly label: "Urban Development / Smart Cities";
|
|
128
|
+
}, {
|
|
129
|
+
readonly value: "rural_development";
|
|
130
|
+
readonly label: "Rural Development";
|
|
131
|
+
}, {
|
|
132
|
+
readonly value: "youth_issues";
|
|
133
|
+
readonly label: "Youth Issues & Aspirations";
|
|
134
|
+
}, {
|
|
135
|
+
readonly value: "drug_abuse";
|
|
136
|
+
readonly label: "Drug Abuse & Trafficking";
|
|
137
|
+
}, {
|
|
138
|
+
readonly value: "local_issues";
|
|
139
|
+
readonly label: "Local / Constituency Issues";
|
|
41
140
|
}, {
|
|
42
141
|
readonly value: "other";
|
|
43
142
|
readonly label: "Other";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"03-electoral.d.ts","sourceRoot":"","sources":["../../src/profile-fields/03-electoral.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"03-electoral.d.ts","sourceRoot":"","sources":["../../src/profile-fields/03-electoral.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8DrB,CAAC;AAEX,eAAO,MAAM,kBAAkB,EAAE,UAyEhC,CAAC"}
|
|
@@ -1,17 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Primary voting issues — exhaustive list of issues that shape voting
|
|
3
|
+
* decisions in Indian elections. Grouped below by theme (economic,
|
|
4
|
+
* social, governance, identity, environment, development) but kept flat
|
|
5
|
+
* in the exported array so they can be multi-selected freely.
|
|
6
|
+
*/
|
|
1
7
|
export const votingIssueOptions = [
|
|
8
|
+
// ── Economic ──
|
|
2
9
|
{ value: 'economy', label: 'Economy & Jobs' },
|
|
10
|
+
{ value: 'unemployment', label: 'Unemployment' },
|
|
11
|
+
{ value: 'inflation', label: 'Inflation / Cost of Living' },
|
|
12
|
+
{ value: 'farmer_issues', label: 'Farmer Issues / MSP' },
|
|
13
|
+
{ value: 'labour_wages', label: 'Labour Rights & Wages' },
|
|
14
|
+
{ value: 'poverty', label: 'Poverty Alleviation' },
|
|
15
|
+
{ value: 'business_msme', label: 'Business / MSME Development' },
|
|
16
|
+
{ value: 'tax_policy', label: 'Tax Policy' },
|
|
17
|
+
// ── Social services & welfare ──
|
|
3
18
|
{ value: 'healthcare', label: 'Healthcare' },
|
|
4
19
|
{ value: 'education', label: 'Education' },
|
|
5
|
-
{ value: '
|
|
6
|
-
{ value: '
|
|
7
|
-
{ value: '
|
|
8
|
-
|
|
9
|
-
{ value: '
|
|
10
|
-
{ value: 'religious_issues', label: 'Religious Issues' },
|
|
11
|
-
{ value: 'infrastructure', label: 'Infrastructure' },
|
|
12
|
-
{ value: 'national_security', label: 'National Security' },
|
|
13
|
-
{ value: 'farmer_issues', label: 'Farmer Issues' },
|
|
20
|
+
{ value: 'housing', label: 'Housing & Shelter' },
|
|
21
|
+
{ value: 'welfare_schemes', label: 'Welfare Schemes (PDS, MGNREGA, PMAY)' },
|
|
22
|
+
{ value: 'pension_social_security', label: 'Pension & Social Security' },
|
|
23
|
+
// ── Infrastructure ──
|
|
24
|
+
{ value: 'infrastructure', label: 'Roads, Bridges & Infrastructure' },
|
|
14
25
|
{ value: 'water_sanitation', label: 'Water & Sanitation' },
|
|
26
|
+
{ value: 'electricity', label: 'Electricity / Power Supply' },
|
|
27
|
+
{ value: 'public_transport', label: 'Public Transport' },
|
|
28
|
+
{ value: 'digital_infrastructure', label: 'Digital & Internet Access' },
|
|
29
|
+
// ── Social issues ──
|
|
30
|
+
{ value: 'womens_safety', label: "Women's Safety" },
|
|
31
|
+
{ value: 'womens_rights', label: "Women's Rights & Empowerment" },
|
|
32
|
+
{ value: 'caste_issues', label: 'Caste & Reservation' },
|
|
33
|
+
{ value: 'religious_issues', label: 'Religion & Secularism' },
|
|
34
|
+
{ value: 'minority_rights', label: 'Minority Rights' },
|
|
35
|
+
{ value: 'lgbtq_rights', label: 'LGBTQ+ Rights' },
|
|
36
|
+
{ value: 'tribal_rights', label: 'Tribal / Adivasi Rights' },
|
|
37
|
+
// ── Governance ──
|
|
38
|
+
{ value: 'corruption', label: 'Corruption' },
|
|
39
|
+
{ value: 'law_order', label: 'Law & Order' },
|
|
40
|
+
{ value: 'judicial_reform', label: 'Judicial Reform' },
|
|
41
|
+
{ value: 'bureaucratic_reform', label: 'Bureaucratic Reform / Red Tape' },
|
|
42
|
+
{ value: 'electoral_reform', label: 'Electoral Reform' },
|
|
43
|
+
// ── National / identity ──
|
|
44
|
+
{ value: 'national_security', label: 'National Security / Defence' },
|
|
45
|
+
{ value: 'foreign_policy', label: 'Foreign Policy' },
|
|
46
|
+
{ value: 'nationalism', label: 'Nationalism / Cultural Identity' },
|
|
47
|
+
{ value: 'citizenship_caa_nrc', label: 'Citizenship (CAA / NRC)' },
|
|
48
|
+
{ value: 'border_security', label: 'Border Security / Terrorism' },
|
|
49
|
+
{ value: 'uniform_civil_code', label: 'Uniform Civil Code' },
|
|
50
|
+
// ── Environment ──
|
|
51
|
+
{ value: 'environment', label: 'Environment & Climate' },
|
|
52
|
+
{ value: 'pollution', label: 'Air & Water Pollution' },
|
|
53
|
+
{ value: 'renewable_energy', label: 'Renewable Energy' },
|
|
54
|
+
// ── Development ──
|
|
55
|
+
{ value: 'urban_development', label: 'Urban Development / Smart Cities' },
|
|
56
|
+
{ value: 'rural_development', label: 'Rural Development' },
|
|
57
|
+
{ value: 'youth_issues', label: 'Youth Issues & Aspirations' },
|
|
58
|
+
{ value: 'drug_abuse', label: 'Drug Abuse & Trafficking' },
|
|
59
|
+
{ value: 'local_issues', label: 'Local / Constituency Issues' },
|
|
15
60
|
{ value: 'other', label: 'Other' },
|
|
16
61
|
];
|
|
17
62
|
export const electoralBehaviour = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"03-electoral.js","sourceRoot":"","sources":["../../src/profile-fields/03-electoral.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAE;IAC7C,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC5C,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;IAC1C,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"03-electoral.js","sourceRoot":"","sources":["../../src/profile-fields/03-electoral.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,iBAAiB;IACjB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAE;IAC7C,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;IAChD,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,4BAA4B,EAAE;IAC3D,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,qBAAqB,EAAE;IACxD,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,uBAAuB,EAAE;IACzD,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,qBAAqB,EAAE;IAClD,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,6BAA6B,EAAE;IAChE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAE5C,kCAAkC;IAClC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC5C,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;IAC1C,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,mBAAmB,EAAE;IAChD,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,sCAAsC,E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pD,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE;gBACpD,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;gBAC1C,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;gBACpC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;gBAClC,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,kBAAkB,EAAE;aACzD;SACF;QACD;YACE,KAAK,EAAE,CAAC;YACR,GAAG,EAAE,qBAAqB;YAC1B,KAAK,EAAE,uBAAuB;YAC9B,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,CAAC;YACP,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;SACjC;KACF;CACF,CAAC","sourcesContent":["import type { FieldGroup } from './types.js';\n\n/**\n * Primary voting issues — exhaustive list of issues that shape voting\n * decisions in Indian elections. Grouped below by theme (economic,\n * social, governance, identity, environment, development) but kept flat\n * in the exported array so they can be multi-selected freely.\n */\nexport const votingIssueOptions = [\n // ── Economic ──\n { value: 'economy', label: 'Economy & Jobs' },\n { value: 'unemployment', label: 'Unemployment' },\n { value: 'inflation', label: 'Inflation / Cost of Living' },\n { value: 'farmer_issues', label: 'Farmer Issues / MSP' },\n { value: 'labour_wages', label: 'Labour Rights & Wages' },\n { value: 'poverty', label: 'Poverty Alleviation' },\n { value: 'business_msme', label: 'Business / MSME Development' },\n { value: 'tax_policy', label: 'Tax Policy' },\n\n // ── Social services & welfare ──\n { value: 'healthcare', label: 'Healthcare' },\n { value: 'education', label: 'Education' },\n { value: 'housing', label: 'Housing & Shelter' },\n { value: 'welfare_schemes', label: 'Welfare Schemes (PDS, MGNREGA, PMAY)' },\n { value: 'pension_social_security', label: 'Pension & Social Security' },\n\n // ── Infrastructure ──\n { value: 'infrastructure', label: 'Roads, Bridges & Infrastructure' },\n { value: 'water_sanitation', label: 'Water & Sanitation' },\n { value: 'electricity', label: 'Electricity / Power Supply' },\n { value: 'public_transport', label: 'Public Transport' },\n { value: 'digital_infrastructure', label: 'Digital & Internet Access' },\n\n // ── Social issues ──\n { value: 'womens_safety', label: \"Women's Safety\" },\n { value: 'womens_rights', label: \"Women's Rights & Empowerment\" },\n { value: 'caste_issues', label: 'Caste & Reservation' },\n { value: 'religious_issues', label: 'Religion & Secularism' },\n { value: 'minority_rights', label: 'Minority Rights' },\n { value: 'lgbtq_rights', label: 'LGBTQ+ Rights' },\n { value: 'tribal_rights', label: 'Tribal / Adivasi Rights' },\n\n // ── Governance ──\n { value: 'corruption', label: 'Corruption' },\n { value: 'law_order', label: 'Law & Order' },\n { value: 'judicial_reform', label: 'Judicial Reform' },\n { value: 'bureaucratic_reform', label: 'Bureaucratic Reform / Red Tape' },\n { value: 'electoral_reform', label: 'Electoral Reform' },\n\n // ── National / identity ──\n { value: 'national_security', label: 'National Security / Defence' },\n { value: 'foreign_policy', label: 'Foreign Policy' },\n { value: 'nationalism', label: 'Nationalism / Cultural Identity' },\n { value: 'citizenship_caa_nrc', label: 'Citizenship (CAA / NRC)' },\n { value: 'border_security', label: 'Border Security / Terrorism' },\n { value: 'uniform_civil_code', label: 'Uniform Civil Code' },\n\n // ── Environment ──\n { value: 'environment', label: 'Environment & Climate' },\n { value: 'pollution', label: 'Air & Water Pollution' },\n { value: 'renewable_energy', label: 'Renewable Energy' },\n\n // ── Development ──\n { value: 'urban_development', label: 'Urban Development / Smart Cities' },\n { value: 'rural_development', label: 'Rural Development' },\n { value: 'youth_issues', label: 'Youth Issues & Aspirations' },\n { value: 'drug_abuse', label: 'Drug Abuse & Trafficking' },\n { value: 'local_issues', label: 'Local / Constituency Issues' },\n\n { value: 'other', label: 'Other' },\n] as const;\n\nexport const electoralBehaviour: FieldGroup = {\n key: 'electoral_behaviour',\n label: 'Electoral Behaviour',\n step: 3,\n description: 'Your voter ID, voting history, and the issues that matter to you.',\n fields: [\n {\n order: 1,\n key: 'epicNumber',\n label: 'Voter ID (EPIC)',\n type: 'text',\n step: 3,\n isOnboarding: true,\n optional: true,\n maxLength: 20,\n },\n {\n order: 2,\n key: 'willVoteThisTime',\n label: 'Will Vote This Time',\n type: 'single_select',\n step: 3,\n isOnboarding: true,\n optional: true,\n options: [\n { value: 'yes', label: 'Yes' },\n { value: 'no', label: 'No' },\n { value: 'maybe', label: 'Maybe' },\n { value: 'prefer_not_to_say', label: 'Prefer not to say' },\n ],\n },\n {\n order: 3,\n key: 'didVoteLastTime',\n label: 'Voted Last Time',\n type: 'single_select',\n step: 3,\n isOnboarding: true,\n optional: true,\n options: [\n { value: 'yes', label: 'Yes' },\n { value: 'no', label: 'No' },\n { value: 'prefer_not_to_say', label: 'Prefer not to say' },\n ],\n },\n {\n order: 4,\n key: 'votingFrequency',\n label: 'Voting Frequency',\n type: 'single_select',\n step: 3,\n isOnboarding: true,\n optional: true,\n options: [\n { value: 'every_election', label: 'Every election' },\n { value: 'most_elections', label: 'Most elections' },\n { value: 'sometimes', label: 'Sometimes' },\n { value: 'rarely', label: 'Rarely' },\n { value: 'never', label: 'Never' },\n { value: 'first_time_voter', label: 'First-time voter' },\n ],\n },\n {\n order: 5,\n key: 'primaryVotingIssues',\n label: 'Primary Voting Issues',\n type: 'multi_select',\n step: 3,\n isOnboarding: true,\n optional: true,\n options: [...votingIssueOptions],\n },\n ],\n};\n"]}
|
|
@@ -1 +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;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,aAAa,CAAC,
|
|
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;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,SAA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;;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 /**\n * All UDP fields are optional — users can skip any question.\n * This flag is kept for metadata/documentation but does not affect form flow.\n */\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 /**\n * If set, field visibility is conditional on another field's value.\n * - `values`: positive match — only visible when referenced field's value is in the list.\n * - `notIn`: negative match — only visible when referenced field's value is NOT in the list.\n * An undefined referenced value counts as \"not in the list\" (field is shown).\n */\n conditionalOn
|
|
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 /**\n * All UDP fields are optional — users can skip any question.\n * This flag is kept for metadata/documentation but does not affect form flow.\n */\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 /**\n * If set, field visibility is conditional on another field's value.\n * - `values`: positive match — only visible when referenced field's value is in the list.\n * - `notIn`: negative match — only visible when referenced field's value is NOT in the list.\n * An undefined referenced value counts as \"not in the list\" (field is shown).\n */\n conditionalOn?: { field: string; values: string[] } | { field: string; notIn: 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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-02.schema.d.ts","sourceRoot":"","sources":["../src/step-02.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"step-02.schema.d.ts","sourceRoot":"","sources":["../src/step-02.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkFhC,CAAC;AAIH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/step-02.schema.js
CHANGED
|
@@ -45,14 +45,7 @@ export const step02PoliticalSchema = z.object({
|
|
|
45
45
|
familyPartyAssociation: optionalTrimmedString,
|
|
46
46
|
/** Relatives in politics (immediate / extended / both / none / prefer-not). */
|
|
47
47
|
relativesInPolitics: z
|
|
48
|
-
.enum([
|
|
49
|
-
'none',
|
|
50
|
-
'immediate_family',
|
|
51
|
-
'extended_family',
|
|
52
|
-
'both',
|
|
53
|
-
'dont_know',
|
|
54
|
-
'prefer_not_to_say',
|
|
55
|
-
])
|
|
48
|
+
.enum(['none', 'immediate_family', 'extended_family', 'both', 'dont_know', 'prefer_not_to_say'])
|
|
56
49
|
.optional(),
|
|
57
50
|
/** Public office and elections history. */
|
|
58
51
|
publicOfficeAndElections: z
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-02.schema.js","sourceRoot":"","sources":["../src/step-02.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,+EAA+E;AAE/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,+FAA+F;IAC/F,iBAAiB,EAAE,CAAC;SACjB,IAAI,CAAC;QACJ,UAAU;QACV,MAAM;QACN,aAAa;QACb,UAAU;QACV,cAAc;QACd,OAAO;QACP,WAAW;QACX,aAAa;QACb,YAAY;QACZ,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;IAEb,qEAAqE;IACrE,oBAAoB,EAAE,qBAAqB;IAE3C,wGAAwG;IACxG,oBAAoB,EAAE,C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,CAAC;SACxB,MAAM,CAAC;QACN,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,QAAQ,EAAE;QACpE,WAAW,EAAE,CAAC;aACX,IAAI,CAAC;YACJ,WAAW;YACX,MAAM;YACN,cAAc;YACd,OAAO;YACP,UAAU;YACV,UAAU;YACV,YAAY;YACZ,OAAO;SACR,CAAC;aACD,QAAQ,EAAE;QACb,WAAW,EAAE,qBAAqB,EAAE,mBAAmB;QACvD,aAAa,EAAE,qBAAqB,EAAE,oCAAoC;QAC1E,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE;QACnD,aAAa,EAAE,CAAC;aACb,IAAI,CAAC;YACJ,WAAW;YACX,MAAM;YACN,cAAc;YACd,OAAO;YACP,UAAU;YACV,UAAU;YACV,YAAY;YACZ,OAAO;SACR,CAAC;aACD,QAAQ,EAAE;QACb,YAAY,EAAE,qBAAqB,EAAE,cAAc;QACnD,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;QACzE,eAAe,EAAE,qBAAqB;KACvC,CAAC;SACD,QAAQ,EAAE;IAEb,kDAAkD;IAClD,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;CACjE,CAAC,CAAC","sourcesContent":["/**\n * Step 02 — Political Association & History\n *\n * Fields: politicalSpectrum, selfPartyAssociation, familyPartyAssociation,\n * publicOfficeAndElections, networkAndCivicEngagement\n *\n * @module udp-schema/step-02\n */\n\nimport { z } from 'zod';\nimport { optionalTrimmedString } from './zod-helpers.js';\n\n// ─── Main Step 02 Schema ────────────────────────────────────────────────────\n\nexport const step02PoliticalSchema = z.object({\n /** Political spectrum — left/right axis (matches dating-schema politicalOrientation values) */\n politicalSpectrum: z\n .enum([\n 'far_left',\n 'left',\n 'centre_left',\n 'centrist',\n 'centre_right',\n 'right',\n 'far_right',\n 'libertarian',\n 'apolitical',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** Self party association — party key (e.g. \"bjp\", \"inc\", \"none\") */\n selfPartyAssociation: optionalTrimmedString,\n\n /** Nature of association with the party — only meaningful when selfPartyAssociation is a real party. */\n partyAssociationRole: z\n .enum([\n 'member',\n 'active_worker',\n 'office_bearer',\n 'candidate',\n 'spokesperson',\n 'volunteer',\n 'sympathizer',\n 'none',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** Family party association — same party-key enum via free string. */\n familyPartyAssociation: optionalTrimmedString,\n\n /** Relatives in politics (immediate / extended / both / none / prefer-not). */\n relativesInPolitics: z\n .enum(['none', 'immediate_family', 'extended_family', 'both', 'dont_know', 'prefer_not_to_say'])\n .optional(),\n\n /** Public office and elections history. */\n publicOfficeAndElections: z\n .object({\n hasHeldOffice: z.enum(['yes', 'no', 'prefer_not_to_say']).optional(),\n officeLevel: z\n .enum([\n 'panchayat',\n 'ward',\n 'municipality',\n 'block',\n 'district',\n 'assembly',\n 'parliament',\n 'other',\n ])\n .optional(),\n officeYears: optionalTrimmedString, // e.g. \"2018-2023\"\n officeDetails: optionalTrimmedString, // free text — position name / notes\n electionContested: z.enum(['yes', 'no']).optional(),\n electionLevel: z\n .enum([\n 'panchayat',\n 'ward',\n 'municipality',\n 'block',\n 'district',\n 'assembly',\n 'parliament',\n 'other',\n ])\n .optional(),\n electionYear: optionalTrimmedString, // e.g. \"2023\"\n electionResult: z.enum(['won', 'lost', 'withdrew', 'ongoing']).optional(),\n electionDetails: optionalTrimmedString,\n })\n .optional(),\n\n /** Network and civic engagement (multi-select) */\n networkAndCivicEngagement: z.array(z.string().trim()).optional(),\n});\n\n// ─── Inferred types ─────────────────────────────────────────────────────────\n\nexport type Step02PoliticalInput = z.infer<typeof step02PoliticalSchema>;\n"]}
|