bhl-forms 0.7.3 → 0.7.5

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 (101) hide show
  1. package/dist/bhl-forms.es.js +551 -543
  2. package/dist/bhl-forms.iife.js +4 -4
  3. package/dist/bhl-forms.modern.es.js +649 -649
  4. package/dist/bhl-forms.modern.iife.js +7 -7
  5. package/dist/bhl-forms.modern.umd.js +7 -7
  6. package/dist/bhl-forms.umd.js +4 -4
  7. package/dist/forms/accidentsAndInjuries.es.js +1461 -1151
  8. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  9. package/dist/forms/accidentsAndInjuries.json +1 -1
  10. package/dist/forms/appraisals.es.js +138 -137
  11. package/dist/forms/appraisals.iife.js +1 -1
  12. package/dist/forms/business.es.js +1434 -1149
  13. package/dist/forms/business.iife.js +1 -1
  14. package/dist/forms/business.json +1 -1
  15. package/dist/forms/childAndFamily.es.js +1329 -1043
  16. package/dist/forms/childAndFamily.iife.js +1 -1
  17. package/dist/forms/childAndFamily.json +1 -1
  18. package/dist/forms/childAndFamilySingle.es.js +1528 -1378
  19. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  20. package/dist/forms/childAndFamilySingle.json +1 -1
  21. package/dist/forms/civilLawsuit.es.js +2000 -1807
  22. package/dist/forms/civilLawsuit.iife.js +1 -1
  23. package/dist/forms/civilLawsuit.json +1 -1
  24. package/dist/forms/coins.es.js +138 -137
  25. package/dist/forms/coins.iife.js +1 -1
  26. package/dist/forms/contracts.es.js +1349 -1050
  27. package/dist/forms/contracts.iife.js +1 -1
  28. package/dist/forms/contracts.json +1 -1
  29. package/dist/forms/criminal.es.js +1832 -1711
  30. package/dist/forms/criminal.iife.js +1 -1
  31. package/dist/forms/criminal.json +1 -1
  32. package/dist/forms/divorce.es.js +1541 -1385
  33. package/dist/forms/divorce.iife.js +1 -1
  34. package/dist/forms/divorce.json +1 -1
  35. package/dist/forms/employmentAndWorkplace.es.js +1833 -1678
  36. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  37. package/dist/forms/employmentAndWorkplace.json +1 -1
  38. package/dist/forms/generalHomeImprovement.es.js +2381 -2010
  39. package/dist/forms/generalHomeImprovement.iife.js +1 -1
  40. package/dist/forms/generalHomeImprovement.json +1 -1
  41. package/dist/forms/generalHomeImprovementThankYou.es.js +1795 -2008
  42. package/dist/forms/generalHomeImprovementThankYou.iife.js +1 -1
  43. package/dist/forms/generalHomeImprovementThankYou.json +1 -1
  44. package/dist/forms/generalLegal.es.js +3037 -2535
  45. package/dist/forms/generalLegal.iife.js +1 -1
  46. package/dist/forms/generalLegal.json +1 -1
  47. package/dist/forms/generalLegalJustAnswer.es.js +3216 -2872
  48. package/dist/forms/generalLegalJustAnswer.iife.js +1 -1
  49. package/dist/forms/generalLegalJustAnswer.json +1 -1
  50. package/dist/forms/generalLegalPopUnder.es.js +3037 -2535
  51. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  52. package/dist/forms/generalLegalPopUnder.json +1 -1
  53. package/dist/forms/generalLegalPopUnderSingle.es.js +3216 -2872
  54. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  55. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  56. package/dist/forms/generalLegalSingle.es.js +3216 -2872
  57. package/dist/forms/generalLegalSingle.iife.js +1 -1
  58. package/dist/forms/generalLegalSingle.json +1 -1
  59. package/dist/forms/generalLegalThankYou.es.js +2825 -2303
  60. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  61. package/dist/forms/generalLegalThankYou.json +1 -1
  62. package/dist/forms/generalLegalThankYouConsultation.es.js +3216 -2872
  63. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  64. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  65. package/dist/forms/harassmentAndDiscrimination.es.js +1425 -1120
  66. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  67. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  68. package/dist/forms/landlordTenant.es.js +1395 -1106
  69. package/dist/forms/landlordTenant.iife.js +1 -1
  70. package/dist/forms/landlordTenant.json +1 -1
  71. package/dist/forms/malpractice.es.js +1531 -1223
  72. package/dist/forms/malpractice.iife.js +1 -1
  73. package/dist/forms/malpractice.json +1 -1
  74. package/dist/forms/mechanics.es.js +702 -530
  75. package/dist/forms/mechanics.iife.js +1 -1
  76. package/dist/forms/mechanics.json +1 -1
  77. package/dist/forms/patentsAndIP.es.js +1830 -1652
  78. package/dist/forms/patentsAndIP.iife.js +1 -1
  79. package/dist/forms/patentsAndIP.json +1 -1
  80. package/dist/forms/realEstate.es.js +2852 -2405
  81. package/dist/forms/realEstate.iife.js +1 -1
  82. package/dist/forms/realEstate.json +1 -1
  83. package/dist/forms/repossession.es.js +1568 -1251
  84. package/dist/forms/repossession.iife.js +1 -1
  85. package/dist/forms/repossession.json +1 -1
  86. package/dist/forms/ssdi.es.js +635 -520
  87. package/dist/forms/ssdi.iife.js +1 -1
  88. package/dist/forms/ssdi.json +1 -1
  89. package/dist/forms/testForm.es.js +409 -371
  90. package/dist/forms/testForm.iife.js +1 -1
  91. package/dist/forms/testForm.json +1 -1
  92. package/dist/forms/testRedirects.es.js +421 -316
  93. package/dist/forms/testRedirects.iife.js +1 -1
  94. package/dist/forms/testRedirects.json +1 -1
  95. package/dist/forms/vets.es.js +138 -137
  96. package/dist/forms/vets.iife.js +1 -1
  97. package/dist/forms/willsAndTrusts.es.js +1428 -1112
  98. package/dist/forms/willsAndTrusts.iife.js +1 -1
  99. package/dist/forms/willsAndTrusts.json +1 -1
  100. package/dist/main.css +1 -1
  101. package/package.json +1 -1
@@ -6,96 +6,101 @@ function LegalRedirectUrl() {
6
6
  return 'https://listings.ziplawyer.com/api/v1/redirect?zone_id=4&vertical=Legal&category=${properties.Type_Of_Legal_Problem}&Degree_Of_Interest=${properties.Degree_Of_Interest}&zip_code=${properties.Zip}&sub_id=${properties.vid}'
7
7
  }
8
8
 
9
- const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
10
- const DEFAULT_COMMENTS_LABEL_LEGAL = 'Please briefly describe your legal issue in a few words:';
11
- const DEFAULT_FINAL_HEADLINE_LEGAL = 'Submit Your Case';
12
- const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
13
- const DEFAULT_FINAL_SUBHEADLINE_LEGAL = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
14
- const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
15
- const TCPA_LANGUAGE_LEGAL = "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 878-213-4937.";
9
+ const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL =
10
+ '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
11
+ const DEFAULT_COMMENTS_LABEL_LEGAL = "Please briefly describe your legal issue in a few words:";
12
+ const DEFAULT_FINAL_HEADLINE_LEGAL = "Submit Your Case";
13
+ const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL =
14
+ '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
15
+ const DEFAULT_FINAL_SUBHEADLINE_LEGAL =
16
+ "You may benefit from speaking with a legal professional. Please verify your contact information.";
17
+ const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL =
18
+ '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
19
+ const TCPA_LANGUAGE_LEGAL =
20
+ "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 878-213-4937.";
16
21
  const defaultLegalImprovementCrossSells = {
17
- 'Auto and Car Accidents': 'Injured in a Car Accident',
18
- 'Personal Injury': 'Personal or Workplace Injury',
19
- 'DUI and DWI': 'Involved in a DUI/DWI',
20
- 'Wills and Trusts': 'Need a Will or Trust',
21
- 'Power of Attorney': 'Update Power of Attorney',
22
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
22
+ "Auto and Car Accidents": "Injured in a Car Accident",
23
+ "Personal Injury": "Personal or Workplace Injury",
24
+ "DUI and DWI": "Involved in a DUI/DWI",
25
+ "Wills and Trusts": "Need a Will or Trust",
26
+ "Power of Attorney": "Update Power of Attorney",
27
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
23
28
  };
24
29
  const CROSS_SELL_OPTION_MAP_LEGAL = {
25
30
  // Values can be a list or a map of value -> display value
26
- 'Auto and Car Accidents': {
27
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
28
- 'Wills and Trusts': 'Need a Will or Trust',
29
- 'Workers Compensation': 'Workplace Injury',
30
- 'Power of Attorney': 'Update Power of Attorney',
31
- 'Divorce and Separation': 'Need a Divorce or Separation',
32
- 'Child Custody': 'Need help with Child Custody',
31
+ "Auto and Car Accidents": {
32
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
33
+ "Wills and Trusts": "Need a Will or Trust",
34
+ "Workers Compensation": "Workplace Injury",
35
+ "Power of Attorney": "Update Power of Attorney",
36
+ "Divorce and Separation": "Need a Divorce or Separation",
37
+ "Child Custody": "Need help with Child Custody",
33
38
  },
34
39
  "Personal Injury": {
35
- 'DUI and DWI': 'Involved in a DUI/DWI',
36
- 'Wills and Trusts': 'Need a Will or Trust',
37
- 'Power of Attorney': 'Update Power of Attorney',
38
- 'Divorce and Separation': 'Need a Divorce or Separation',
39
- 'Child Custody': 'Need help with Child Custody',
40
+ "DUI and DWI": "Involved in a DUI/DWI",
41
+ "Wills and Trusts": "Need a Will or Trust",
42
+ "Power of Attorney": "Update Power of Attorney",
43
+ "Divorce and Separation": "Need a Divorce or Separation",
44
+ "Child Custody": "Need help with Child Custody",
40
45
  // TODO add one more?
41
46
  },
42
47
  "Workers Compensation": {
43
- 'DUI and DWI': 'Involved in a DUI/DWI',
44
- 'Wills and Trusts': 'Need a Will or Trust',
45
- 'Power of Attorney': 'Update Power of Attorney',
46
- 'Divorce and Separation': 'Need a Divorce or Separation',
47
- 'Child Custody': 'Need help with Child Custody',
48
+ "DUI and DWI": "Involved in a DUI/DWI",
49
+ "Wills and Trusts": "Need a Will or Trust",
50
+ "Power of Attorney": "Update Power of Attorney",
51
+ "Divorce and Separation": "Need a Divorce or Separation",
52
+ "Child Custody": "Need help with Child Custody",
48
53
  // TODO add one more?
49
54
  },
50
55
  "DUI and DWI": {
51
- 'Personal Injury': 'Personal or Workplace Injury',
52
- 'Wills and Trusts': 'Need a Will or Trust',
53
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
54
- 'Power of Attorney': 'Update Power of Attorney',
55
- 'Divorce and Separation': 'Need a Divorce or Separation',
56
- 'Child Custody': 'Need help with Child Custody',
56
+ "Personal Injury": "Personal or Workplace Injury",
57
+ "Wills and Trusts": "Need a Will or Trust",
58
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
59
+ "Power of Attorney": "Update Power of Attorney",
60
+ "Divorce and Separation": "Need a Divorce or Separation",
61
+ "Child Custody": "Need help with Child Custody",
57
62
  },
58
63
  "Wills and Trusts": {
59
- 'Auto and Car Accidents': 'Injured in a Car Accident',
60
- 'Personal Injury': 'Personal or Workplace Injury',
61
- 'DUI and DWI': 'Involved in a DUI/DWI',
62
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
63
- 'Divorce and Separation': 'Need a Divorce or Separation',
64
- 'Child Custody': 'Need help with Child Custody',
64
+ "Auto and Car Accidents": "Injured in a Car Accident",
65
+ "Personal Injury": "Personal or Workplace Injury",
66
+ "DUI and DWI": "Involved in a DUI/DWI",
67
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
68
+ "Divorce and Separation": "Need a Divorce or Separation",
69
+ "Child Custody": "Need help with Child Custody",
65
70
  },
66
71
  "Probate and Estates": {
67
- 'Auto and Car Accidents': 'Injured in a Car Accident',
68
- 'Personal Injury': 'Personal or Workplace Injury',
69
- 'DUI and DWI': 'Involved in a DUI/DWI',
70
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
71
- 'Divorce and Separation': 'Need a Divorce or Separation',
72
- 'Child Custody': 'Need help with Child Custody',
72
+ "Auto and Car Accidents": "Injured in a Car Accident",
73
+ "Personal Injury": "Personal or Workplace Injury",
74
+ "DUI and DWI": "Involved in a DUI/DWI",
75
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
76
+ "Divorce and Separation": "Need a Divorce or Separation",
77
+ "Child Custody": "Need help with Child Custody",
73
78
  },
74
79
  "Power of Attorney": {
75
- 'Auto and Car Accidents': 'Injured in a Car Accident',
76
- 'Personal Injury': 'Personal or Workplace Injury',
77
- 'DUI and DWI': 'Involved in a DUI/DWI',
78
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
79
- 'Divorce and Separation': 'Need a Divorce or Separation',
80
- 'Child Custody': 'Need help with Child Custody',
80
+ "Auto and Car Accidents": "Injured in a Car Accident",
81
+ "Personal Injury": "Personal or Workplace Injury",
82
+ "DUI and DWI": "Involved in a DUI/DWI",
83
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
84
+ "Divorce and Separation": "Need a Divorce or Separation",
85
+ "Child Custody": "Need help with Child Custody",
81
86
  },
82
87
  "Long Term Disability": {
83
- 'Auto and Car Accidents': 'Injured in a Car Accident',
84
- 'DUI and DWI': 'Involved in a DUI/DWI',
85
- 'Wills and Trusts': 'Need a Will or Trust',
86
- 'Power of Attorney': 'Update Power of Attorney',
87
- 'Divorce and Separation': 'Need a Divorce or Separation',
88
- 'Child Custody': 'Need help with Child Custody',
88
+ "Auto and Car Accidents": "Injured in a Car Accident",
89
+ "DUI and DWI": "Involved in a DUI/DWI",
90
+ "Wills and Trusts": "Need a Will or Trust",
91
+ "Power of Attorney": "Update Power of Attorney",
92
+ "Divorce and Separation": "Need a Divorce or Separation",
93
+ "Child Custody": "Need help with Child Custody",
89
94
  },
90
95
  "Social Security Disability and Insurance": {
91
- 'Auto and Car Accidents': 'Injured in a Car Accident',
92
- 'DUI and DWI': 'Involved in a DUI/DWI',
93
- 'Wills and Trusts': 'Need a Will or Trust',
94
- 'Power of Attorney': 'Update Power of Attorney',
95
- 'Divorce and Separation': 'Need a Divorce or Separation',
96
- 'Child Custody': 'Need help with Child Custody',
96
+ "Auto and Car Accidents": "Injured in a Car Accident",
97
+ "DUI and DWI": "Involved in a DUI/DWI",
98
+ "Wills and Trusts": "Need a Will or Trust",
99
+ "Power of Attorney": "Update Power of Attorney",
100
+ "Divorce and Separation": "Need a Divorce or Separation",
101
+ "Child Custody": "Need help with Child Custody",
97
102
  },
98
- '*': defaultLegalImprovementCrossSells,
103
+ "*": defaultLegalImprovementCrossSells,
99
104
  };
100
105
 
101
106
  // ------ Common Base Settings
@@ -104,32 +109,49 @@ const checkbox = (updates) => {
104
109
  if (updates.name && !updates.id) {
105
110
  updates.id = updates.name;
106
111
  }
107
- return merge({
108
- $formkit: 'checkbox',
109
- validation: 'required',
110
- validationMessages: {
111
- required: 'Field is required'
112
- }
113
- }, updates)
112
+ return merge(
113
+ {
114
+ $formkit: "checkbox",
115
+ validation: "required",
116
+ validationMessages: {
117
+ required: "Field is required",
118
+ },
119
+ },
120
+ updates
121
+ )
114
122
  };
115
123
 
116
124
  const sbsCheckbox = (updates) => {
117
- updates.legendClass = 'legend-left required';
118
- updates.fieldsetClass = '$reset side-by-side';
119
- updates.optionsClass = 't-pl-1';
120
- updates.innerClass = 't-flex t-items-center';
121
- updates.wrapperClass = 't-mb-3';
125
+ updates.legendClass = "legend-left required";
126
+ updates.fieldsetClass = "$reset side-by-side";
127
+ updates.optionsClass = "t-pl-1";
128
+ updates.innerClass = "t-flex t-items-center";
129
+ updates.wrapperClass = "t-mb-3";
122
130
  return checkbox(updates)
123
131
  };
124
132
 
125
133
  const col2Checkbox = (updates) => {
126
134
  if (!updates || !updates.legendClass) {
127
- updates.legendClass = 'required';
135
+ updates.legendClass = "required";
128
136
  }
129
- updates.fieldsetClass = '$reset';
130
- updates.optionsClass = 't-pl-8 md:t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
131
- updates.innerClass = 't-items-start';
132
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
137
+ updates.fieldsetClass = "$reset";
138
+ updates.optionsClass = "t-pl-8 md:t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
139
+ updates.innerClass = "t-items-start";
140
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
141
+ return checkbox(updates)
142
+ };
143
+
144
+ const verticalCol2Checkbox = (updates) => {
145
+ if (!updates || !updates.legendClass) {
146
+ updates.legendClass = "required t-w-[100%] t-text-center";
147
+ }
148
+ updates.fieldsetClass = "$reset t-flex t-justify-center t-flex-col";
149
+ updates.innerClass = "t-items-start";
150
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
151
+ updates.optionClass = "t-pl-4 md:t-pl-16 md:t-min-w-[200px]";
152
+ updates.optionsClass = "t-pl-4 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
153
+ updates.messagesClass = "t-flex t-justify-center";
154
+ updates.helpClass = "t-mt-0 t-mb-4 !t-text-sm t-text-center";
133
155
  return checkbox(updates)
134
156
  };
135
157
 
@@ -137,70 +159,121 @@ const radio = (updates) => {
137
159
  if (updates.name && !updates.id) {
138
160
  updates.id = updates.name;
139
161
  }
140
- return merge({
141
- $formkit: 'radio',
142
- validation: 'required',
143
- validationMessages: {
144
- required: 'Field is required'
162
+ return merge(
163
+ {
164
+ $formkit: "radio",
165
+ validation: "required",
166
+ validationMessages: {
167
+ required: "Field is required",
168
+ },
169
+ optionsClass: "t-pt-3 t-pl-1",
170
+ legendClass: "required",
145
171
  },
146
- optionsClass: 't-pt-3 t-pl-1',
147
- legendClass: 'required'
148
- }, updates)
172
+ updates
173
+ )
149
174
  };
150
175
 
151
176
  const col2Radio = (updates) => {
152
- updates.legendClass = 'required';
153
- updates.fieldsetClass = '$reset';
154
- updates.optionsClass = 't-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
155
- updates.innerClass = 't-items-start';
156
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
177
+ updates.legendClass = "required";
178
+ updates.fieldsetClass = "$reset";
179
+ updates.optionsClass = "t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
180
+ updates.innerClass = "t-items-start";
181
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
182
+ return radio(updates)
183
+ };
184
+
185
+ // TODO: rename
186
+ const col2RadioCenter = (updates) => {
187
+ updates.legendClass = "required t-w-[100%] t-text-center";
188
+ if (typeof updates.fieldsetClass === "undefined") {
189
+ updates.fieldsetClass = "$reset t-flex t-justify-center";
190
+ }
191
+ updates.innerClass = "t-items-start";
192
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
193
+ updates.optionClass = "t-pl-4 md:t-pl-8 md:t-min-w-[200px]";
194
+ updates.optionsClass = "t-pl-4 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
195
+ updates.messagesClass = "t-flex t-justify-center";
196
+ updates.helpClass = "t-mt-0 t-mb-4 !t-text-sm t-text-center";
157
197
  return radio(updates)
158
198
  };
159
199
 
160
200
  const sbs2ColRadio = (updates) => {
161
- updates.legendClass = 'legend-left-flex md:t-max-w-[40%] required';
162
- updates.fieldsetClass = '$reset side-by-side-flex';
163
- updates.optionsClass = 'md:t-ml-4 md:t-mt-2 t-grid t-grid-cols-1 md:t-grid-cols-2-125';
164
- updates.innerClass = 't-flex t-items-start';
165
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
201
+ updates.legendClass = "legend-left-flex md:t-max-w-[40%] required";
202
+ updates.fieldsetClass = "$reset side-by-side-flex";
203
+ updates.optionsClass = "md:t-ml-4 md:t-mt-2 t-grid t-grid-cols-1 md:t-grid-cols-2-125";
204
+ updates.innerClass = "t-flex t-items-start";
205
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
166
206
  return radio(updates)
167
207
  };
168
208
 
169
209
  const sbs2ItemRadio = (updates) => {
170
- updates.legendClass = 'legend-left t-pb-1 required';
171
- updates.fieldsetClass = '$reset side-by-side t-items-center';
172
- updates.optionsClass = 't-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center';
173
- updates.innerClass = 't-flex t-items-center';
174
- updates.optionClass = 't-pr-1';
210
+ updates.legendClass = "legend-left t-pb-1 required";
211
+ updates.fieldsetClass = "$reset side-by-side t-items-center";
212
+ updates.optionsClass = "t-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center";
213
+ updates.innerClass = "t-flex t-items-center";
214
+ updates.optionClass = "t-pr-1";
175
215
  return radio(updates)
176
216
  };
177
217
 
178
218
  const sbsYesNoRadio = (updates) => {
179
- updates.options = ['Yes', 'No'];
219
+ updates.options = ["Yes", "No"];
180
220
  return sbs2ItemRadio(updates)
181
221
  };
182
222
 
223
+ const verticalButtonRadio = (updates) => {
224
+ updates.legendClass = "legend-left";
225
+ updates.fieldsetClass = "$reset t-flex t-justify-center t-flex-col-reverse t-items-center";
226
+ if (typeof updates.optionsClass === "undefined") {
227
+ updates.optionsClass = "t-flex t-flex-col sm:t-flex-row t-justify-center t-my-3";
228
+ }
229
+ updates.optionClass = "radiobtn t-my-2 sm:t-my-0 t-mx-2 md:t-mx-5";
230
+ updates.wrapperClass = "$reset formkit-wrapper t-mb-0 t-flex t-items-center t-h-[100%]";
231
+ updates.labelClass = "t-font-semibold t-text-[#1e448f] t-w-[100%]";
232
+ updates.decoratorIcon = false;
233
+ updates.messagesClass = "t-flex t-justify-center";
234
+ updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
235
+ return radio(updates)
236
+ };
237
+
238
+ const verticalYesNoRadio = (updates) => {
239
+ updates.options = ["Yes", "No"];
240
+ updates.optionsClass = "t-flex t-justify-center t-my-3";
241
+ return verticalButtonRadio(updates)
242
+ };
243
+
183
244
  const select = (updates) => {
184
245
  if (updates.name && !updates.id) {
185
246
  updates.id = updates.name;
186
247
  }
187
- return merge({
188
- $formkit: 'select',
189
- placeholder: "Please Select",
190
- validation: 'required',
191
- validationMessages: {
192
- required: 'Field is required'
248
+ return merge(
249
+ {
250
+ $formkit: "select",
251
+ placeholder: "Please Select",
252
+ validation: "required",
253
+ validationMessages: {
254
+ required: "Field is required",
255
+ },
256
+ inputClass: "t-bg-white",
257
+ labelClass: "required",
193
258
  },
194
- inputClass: 't-bg-white',
195
- labelClass: 'required'
196
- }, updates)
259
+ updates
260
+ )
197
261
  };
198
262
 
199
263
  const sbsSelect = (updates) => {
200
- updates.labelClass = 'required';
201
- updates.wrapperClass = 'side-by-side t-items-center';
202
- updates.innerClass = 'select-height-content';
203
- updates.helpClass = 't-mt-2.5 md:t-text-right md:t-mt-[-5px]';
264
+ updates.labelClass = "required";
265
+ updates.wrapperClass = "side-by-side t-items-center";
266
+ updates.innerClass = "select-height-content";
267
+ updates.helpClass = "t-mt-2.5 md:t-text-right md:t-mt-[-5px]";
268
+ return select(updates)
269
+ };
270
+
271
+ const verticalSelect = (updates) => {
272
+ updates.labelClass = "required";
273
+ updates.wrapperClass = "t-flex t-justify-center";
274
+ updates.messagesClass = "t-flex t-justify-center";
275
+ updates.inputClass = "t-min-w-[150px] t-bg-white";
276
+ updates.helpClass = "t-mt-2.5 t-text-center";
204
277
  return select(updates)
205
278
  };
206
279
 
@@ -208,26 +281,29 @@ const text = (updates) => {
208
281
  if (updates.name && !updates.id) {
209
282
  updates.id = updates.name;
210
283
  }
211
- return merge({
212
- $formkit: 'text',
213
- validation: 'required',
214
- validationMessages: {
215
- required: 'Field is required'
284
+ return merge(
285
+ {
286
+ $formkit: "text",
287
+ validation: "required",
288
+ validationMessages: {
289
+ required: "Field is required",
290
+ },
291
+ labelClass: "required",
216
292
  },
217
- labelClass: 'required'
218
- }, updates)
293
+ updates
294
+ )
219
295
  };
220
296
 
221
297
  const sbsText = (updates) => {
222
- updates.wrapperClass = 'side-by-side t-items-center';
298
+ updates.wrapperClass = "side-by-side t-items-center";
223
299
  return text(updates)
224
300
  };
225
301
 
226
302
  const verticalText = (updates) => {
227
- updates.wrapperClass = 't-flex t-justify-center';
228
- updates.messagesClass = 't-flex t-justify-center';
229
- updates.inputClass = 't-text-center';
230
- updates.helpClass = 't-mt-2.5 !t-text-sm t-text-center';
303
+ updates.wrapperClass = "t-flex t-justify-center";
304
+ updates.messagesClass = "t-flex t-justify-center";
305
+ updates.inputClass = "t-text-center";
306
+ updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
231
307
  return text(updates)
232
308
  };
233
309
 
@@ -235,533 +311,789 @@ const textArea = (updates) => {
235
311
  if (updates.name && !updates.id) {
236
312
  updates.id = updates.name;
237
313
  }
238
- return merge({
239
- $formkit: 'textarea',
240
- rows: 5,
241
- maxlength: 500,
242
- validation: 'required',
243
- validationMessages: {
244
- required: 'Field is required'
314
+ return merge(
315
+ {
316
+ $formkit: "textarea",
317
+ rows: 5,
318
+ maxlength: 500,
319
+ validation: "required",
320
+ validationMessages: {
321
+ required: "Field is required",
322
+ },
323
+ innerClass: "t-max-w-xl",
324
+ labelClass: "required",
245
325
  },
246
- innerClass: 't-max-w-xl',
247
- labelClass: 'required'
248
- }, updates)
326
+ updates
327
+ )
249
328
  };
250
329
 
251
330
  const date = (updates) => {
252
331
  if (updates.name && !updates.id) {
253
332
  updates.id = updates.name;
254
333
  }
255
- return merge({
256
- $formkit: 'DatePicker',
257
- validation: 'required',
258
- validationMessages: {
259
- required: 'Field is required'
334
+ return merge(
335
+ {
336
+ $formkit: "DatePicker",
337
+ validation: "required",
338
+ validationMessages: {
339
+ required: "Field is required",
340
+ },
341
+ labelClass: "required t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500",
342
+ innerClass:
343
+ "t-border t-border-gray-400 formkit-invalid:t-border-red-500 t-rounded t-mb-1 focus-within:t-border-blue-500",
260
344
  },
261
- labelClass: 'required t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500',
262
- innerClass: 't-border t-border-gray-400 formkit-invalid:t-border-red-500 t-rounded t-mb-1 focus-within:t-border-blue-500'
263
- }, updates)
345
+ updates
346
+ )
264
347
  };
265
348
 
266
349
  const sbsDate = (updates) => {
267
- updates.wrapperClass = 'side-by-side t-items-center';
350
+ updates.wrapperClass = "side-by-side t-items-center";
268
351
  return date(updates)
269
352
  };
270
353
 
271
- const email = (scope) => sbsText({
272
- $formkit: 'email',
273
- name: scope ? scope + ':' + 'Email' : 'Email',
274
- label: 'Email Address:',
275
- placeholder: 'email@domain.com',
276
- autocomplete: 'email',
277
- 'data-tf-sensitive': 'false',
278
- validation: 'required|email',
279
- validationMessages: {
280
- required: 'Email is required',
281
- email: 'Invalid Email'
282
- }
283
- });
354
+ const verticalDate = (updates) => {
355
+ updates.wrapperClass = "t-flex t-justify-center";
356
+ updates.inputClass = "t-text-center";
357
+ updates.messagesClass = "t-flex t-justify-center";
358
+ return date(updates)
359
+ };
284
360
 
285
- const firstName = (scope) => sbsText({
286
- label: 'First Name:',
287
- placeholder: 'First',
288
- name: scope ? scope + ':' + 'First_Name' : 'First_Name',
289
- autocomplete: "given-name",
290
- validationMessages: {
291
- required: 'First Name is required'
292
- }
293
- });
361
+ const email = (scope, vertical, updates = {}) => {
362
+ const func = vertical ? verticalText : sbsText;
363
+ const label = vertical ? updates.label : "Email Address:";
364
+ return func({
365
+ $formkit: "email",
366
+ name: scope ? scope + ":" + "Email" : "Email",
367
+ label,
368
+ placeholder: "email@domain.com",
369
+ autocomplete: "email",
370
+ "data-tf-sensitive": "false",
371
+ validation: "required|email",
372
+ validationMessages: {
373
+ required: "Email is required",
374
+ email: "Invalid Email",
375
+ },
376
+ ...updates,
377
+ })
378
+ };
294
379
 
295
- const lastName = (scope) => sbsText({
296
- label: 'Last Name:',
297
- placeholder: 'Last',
298
- name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
299
- autocomplete: "family-name",
300
- validationMessages: {
301
- required: 'Last Name is required'
302
- }
303
- });
380
+ const firstName = (scope, vertical, updates = {}) => {
381
+ const func = vertical ? verticalText : sbsText;
382
+ const label = vertical ? updates.label : "First Name:";
383
+ return func({
384
+ label,
385
+ placeholder: "First",
386
+ name: scope ? scope + ":" + "First_Name" : "First_Name",
387
+ autocomplete: "given-name",
388
+ validationMessages: {
389
+ required: "First Name is required",
390
+ },
391
+ ...updates,
392
+ })
393
+ };
304
394
 
305
- const phone = (scope) => sbsText({
306
- $formkit: 'tel',
307
- name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
308
- label: 'Phone Number:',
309
- placeholder: '###-###-####',
310
- maxlength: 12,
311
- help: '10-digit phone number, hyphens optional',
312
- autocomplete: 'tel-national',
313
- 'data-tf-sensitive': 'false',
314
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
315
- validationMessages: {
316
- required: 'Field is required',
317
- matches: 'Invalid Phone Format, use ###-###-####',
318
- valid_phone: 'Invalid Phone Number'
319
- },
320
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
321
- });
395
+ const lastName = (scope, vertical, updates = {}) => {
396
+ const func = vertical ? verticalText : sbsText;
397
+ const label = vertical ? updates.label : "Last Name:";
398
+ return func({
399
+ label,
400
+ placeholder: "Last",
401
+ name: scope ? scope + ":" + "Last_Name" : "Last_Name",
402
+ autocomplete: "family-name",
403
+ validationMessages: {
404
+ required: "Last Name is required",
405
+ },
406
+ ...updates,
407
+ })
408
+ };
322
409
 
410
+ const phone = (scope, vertical, updates = {}) => {
411
+ const func = vertical ? verticalText : sbsText;
412
+ const label = vertical ? updates.label : "Phone Number:";
413
+ return func({
414
+ $formkit: "tel",
415
+ name: scope ? scope + ":" + "Primary_Phone" : "Primary_Phone",
416
+ label,
417
+ placeholder: "###-###-####",
418
+ maxlength: 12,
419
+ help: "10-digit phone number, hyphens optional",
420
+ autocomplete: "tel-national",
421
+ "data-tf-sensitive": "false",
422
+ validation: "required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone",
423
+ validationMessages: {
424
+ required: "Phone Number is required",
425
+ matches: "Invalid Phone Format, use ###-###-####",
426
+ valid_phone: "Invalid Phone Number",
427
+ },
428
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]",
429
+ ...updates,
430
+ })
431
+ };
323
432
 
324
433
  const zipcode = (scope, vertical, updates = {}) => {
325
434
  const func = vertical ? verticalText : sbsText;
326
- const label = vertical ? (updates.label) : 'Zip Code:';
327
- const help = vertical ? (updates.help ?? "We try to match you with local help") : null;
435
+ const label = vertical ? updates.label : "Zip Code:";
436
+ const help = vertical ? updates.help ?? "We try to match you with local help" : null;
328
437
  return func({
329
438
  label,
330
439
  help,
331
- placeholder: '#####',
332
- name: scope ? scope + ':' + 'Zip' : 'Zip',
440
+ placeholder: "#####",
441
+ name: scope ? scope + ":" + "Zip" : "Zip",
333
442
  maxlength: 5,
334
443
  inputmode: "numeric",
335
- autocomplete: 'postal-code',
336
- validation: 'required|matches:/^[0-9]{5}$/',
444
+ autocomplete: "postal-code",
445
+ validation: "required|matches:/^[0-9]{5}$/",
337
446
  validationMessages: {
338
- required: 'Zip Code is required',
339
- matches: 'Invalid Zip Code'
447
+ required: "Zip Code is required",
448
+ matches: "Invalid Zip Code",
340
449
  },
341
- ...updates
450
+ ...updates,
342
451
  })
343
452
  };
344
453
 
345
454
  const applicantAge = (scope, vertical, updates = {}) => {
346
455
  const func = vertical ? verticalText : sbsText;
347
- const label = vertical ? (updates.label) : 'Age of Applicant?';
348
- const value = vertical ? (updates.value ?? "50") : null;
349
- return func(merge({
350
- label,
351
- placeholder: 'Age between 18 and 65',
352
- name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
353
- value,
354
- maxlength: 2,
355
- inputmode: "numeric",
356
- validation: "required|min:18,max:65",
357
- validationMessages: {
358
- required: 'Applicant Age is required',
359
- min: 'Invalid Age - must be between 18 and 65',
360
- max: 'Invalid Age - must be between 18 and 65',
361
- },
362
- ...updates
363
- }))
456
+ const label = vertical ? updates.label : "Age of Applicant?";
457
+ const value = vertical ? updates.value ?? "50" : null;
458
+ return func(
459
+ merge({
460
+ label,
461
+ placeholder: "Age between 18 and 65",
462
+ name: scope ? scope + ":" + "Applicant_Age" : "Applicant_Age",
463
+ value,
464
+ maxlength: 2,
465
+ inputmode: "numeric",
466
+ validation: "required|min:18,max:65",
467
+ validationMessages: {
468
+ required: "Applicant Age is required",
469
+ min: "Invalid Age - must be between 18 and 65",
470
+ max: "Invalid Age - must be between 18 and 65",
471
+ },
472
+ ...updates,
473
+ })
474
+ )
364
475
  };
365
476
 
366
- const atFault = (scope) => sbsYesNoRadio({
367
- name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
368
- label: 'Were You at Fault?'
369
- });
477
+ const atFault = (scope, vertical, updates = {}) => {
478
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
479
+ const label = vertical ? updates.label : "Were You at Fault?";
480
+ return func(
481
+ merge(
482
+ {
483
+ label,
484
+ name: scope ? scope + ":" + "At_Fault" : "At_Fault",
485
+ },
486
+ updates
487
+ )
488
+ )
489
+ };
370
490
 
371
- const bankruptcyCrossSell = () => sbsCheckbox({
372
- label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
373
- help: "Note: you will be contacted separately by a bankruptcy/debt expert",
374
- name: 'CrossSell_Bankruptcy',
375
- id: 'CrossSell_Bankruptcy',
376
- if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
377
- validation: null,
378
- helpClass: "!t-text-sm"
379
- });
491
+ const bankruptcyCrossSell = (scope) =>
492
+ sbsCheckbox({
493
+ label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
494
+ help: "Note: you will be contacted separately by a bankruptcy/debt expert",
495
+ name: scope ? scope + ":CrossSell_Bankruptcy" : "CrossSell_Bankruptcy",
496
+ id: scope ? scope + ":CrossSell_Bankruptcy" : "CrossSell_Bankruptcy",
497
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
498
+ validation: null,
499
+ helpClass: "!t-text-sm",
500
+ });
501
+
502
+ const bloodContentAlcoholTest = (scope, vertical, updates = {}) => {
503
+ const func = vertical ? verticalSelect : sbsSelect;
504
+ const label = vertical ? updates.label : "Blood Alcohol Content Measured by Test:";
505
+ return func(
506
+ merge(
507
+ {
508
+ label,
509
+ name: scope ? scope + ":" + "Blood_Alcohol_Content_Test" : "Blood_Alcohol_Content_Test",
510
+ options: [
511
+ "No Test",
512
+ "0.00% - 0.04%",
513
+ "0.05% - 0.08%",
514
+ "0.09% - 0.12%",
515
+ "0.13% - 0.16%",
516
+ "0.17% - 0.20%",
517
+ "More than 0.20%",
518
+ "Don't know",
519
+ ],
520
+ },
521
+ updates
522
+ )
523
+ )
524
+ };
380
525
 
381
- const bloodContentAlcoholTest = (scope) => sbsSelect({
382
- name: scope ? scope + ':' + 'Blood_Alcohol_Content_Test' : 'Blood_Alcohol_Content_Test',
383
- label: 'Blood Alcohol Content Measured by Test:',
384
- options: [
385
- "No Test",
386
- "0.00% - 0.04%",
387
- "0.05% - 0.08%",
388
- "0.09% - 0.12%",
389
- "0.13% - 0.16%",
390
- "0.17% - 0.20%",
391
- "More than 0.20%",
392
- "Don't know"
393
- ]
394
- });
526
+ const causeOfInjury = (scope, vertical, updates = {}) => {
527
+ const func = vertical ? col2RadioCenter : sbsSelect;
528
+ const label = vertical ? updates.label : "Cause of Injury:";
529
+ return func(
530
+ merge(
531
+ {
532
+ label,
533
+ name: scope ? scope + ":" + "Cause_Of_Injury" : "Cause_Of_Injury",
534
+ options: [
535
+ "Traumatic Physical Injury (Accident)",
536
+ "Repeated Trauma Injury",
537
+ "Mental Injury",
538
+ "Occupational Disease",
539
+ "Not Sure",
540
+ ],
541
+ },
542
+ updates
543
+ )
544
+ )
545
+ };
395
546
 
396
- const causeOfInjury = (scope) => sbsSelect({
397
- name: scope ? scope + ':' + 'Cause_Of_Injury' : 'Cause_Of_Injury',
398
- label: 'Cause of Injury:',
399
- options: [
400
- "Traumatic Physical Injury (Accident)",
401
- "Repeated Trauma Injury",
402
- "Mental Injury",
403
- "Occupational Disease",
404
- "Not Sure"
405
- ]
406
- });
547
+ const childHome = (scope, vertical, updates = {}) => {
548
+ const func = vertical ? col2RadioCenter : sbsSelect;
549
+ const label = vertical ? updates.label : "With Whom Do the Children Currently Live?";
550
+ return func(
551
+ merge(
552
+ {
553
+ label,
554
+ name: scope ? scope + ":" + "Child_Home" : "Child_Home",
555
+ options: ["Mother", "Father", "Grandparents", "Other"],
556
+ },
557
+ updates
558
+ )
559
+ )
560
+ };
407
561
 
408
- const childHome = (scope) => sbsSelect({
409
- name: scope ? scope + ':' + 'Child_Home' : 'Child_Home',
410
- label: 'With Whom Do the Children Currently Live?',
411
- options: [
412
- 'Mother',
413
- 'Father',
414
- 'Grandparents',
415
- 'Other'
416
- ]
417
- });
562
+ const childPrimaryCaregiver = (scope, vertical, updates = {}) => {
563
+ const func = vertical ? verticalButtonRadio : sbsSelect;
564
+ const label = vertical ? updates.label : "Who is the Primary Caregiver?";
565
+ return func(
566
+ merge(
567
+ {
568
+ label,
569
+ name: scope ? scope + ":" + "Child_Primary_Caregiver" : "Child_Primary_Caregiver",
570
+ options: ["Mother", "Father", "Other"],
571
+ },
572
+ updates
573
+ )
574
+ )
575
+ };
418
576
 
419
- const childPrimaryCaregiver = (scope) => sbsSelect({
420
- name: scope ? scope + ':' + 'Child_Primary_Caregiver' : 'Child_Primary_Caregiver',
421
- label: 'Who is the Primary Caregiver?',
422
- options: [
423
- 'Mother',
424
- 'Father',
425
- 'Other'
426
- ]
427
- });
577
+ const childRelationship = (scope, vertical, updates = {}) => {
578
+ const func = vertical ? col2RadioCenter : sbsSelect;
579
+ const label = vertical ? updates.label : "Your Relationship to Child(ren):";
580
+ return func(
581
+ merge(
582
+ {
583
+ label,
584
+ name: scope ? scope + ":" + "Child_Relationship" : "Child_Relationship",
585
+ options: ["Father", "Mother", "Grandparent", "Aunt/Uncle", "Other"],
586
+ },
587
+ updates
588
+ )
589
+ )
590
+ };
428
591
 
429
- const childRelationship = (scope) => sbsSelect({
430
- name: scope ? scope + ':' + 'Child_Relationship' : 'Child_Relationship',
431
- label: 'Your Relationship to Child(ren):',
432
- options: [
433
- 'Father',
434
- 'Mother',
435
- 'Grandparent',
436
- 'Aunt/Uncle',
437
- 'Other'
438
- ]
439
- });
592
+ const claimStatus = (scope, vertical, updates = {}) => {
593
+ const func = vertical ? col2RadioCenter : sbsSelect;
594
+ const label = vertical ? updates.label : "Status of Claim:";
595
+ return func(
596
+ merge(
597
+ {
598
+ label,
599
+ name: scope ? scope + ":" + "Claim_Status" : "Claim_Status",
600
+ options: ["No action taken yet", "Demand for compensation made", "Lawsuit filed", "Other"],
601
+ },
602
+ updates
603
+ )
604
+ )
605
+ };
440
606
 
441
- const claimStatus = (scope) => sbsSelect({
442
- name: scope ? scope + ':' + 'Claim_Status' : 'Claim_Status',
443
- label: "Status of Claim:",
444
- options: [
445
- "No action taken yet",
446
- "Demand for compensation made",
447
- "Lawsuit filed",
448
- "Other"
449
- ]
450
- });
607
+ // TODO: vertical not supported yet
608
+ const comments = (scope, vertical, updates) =>
609
+ textArea(
610
+ merge(
611
+ {
612
+ name: scope ? scope + ":" + "Comments" : "Comments",
613
+ label: "Please briefly describe your situation in a few words:",
614
+ placeholder:
615
+ 'For Example: "I would like help with child support payments" or "I need help with visitation rights"',
616
+ },
617
+ updates
618
+ )
619
+ );
451
620
 
452
- const comments = (updates, scope) => textArea(
453
- merge({
454
- name: scope ? scope + ':' + 'Comments' : 'Comments',
455
- label: 'Please briefly describe your situation in a few words:',
456
- placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
457
- }, updates)
458
- );
459
-
460
- const degreeOfInterest = (scope, help) => sbsSelect({
461
- name: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
462
- id: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
463
- label: 'How Likely Are You to Pay if Your Issue Could be Resolved?',
464
- help: help,
465
- options: [
466
- 'Definitely',
467
- 'Probably',
468
- 'Maybe',
469
- "Absolutely Can't Afford"
470
- ]
471
- });
621
+ const degreeOfInterest = (scope, vertical, updates = {}) => {
622
+ const func = vertical ? col2RadioCenter : sbsSelect;
623
+ const label = vertical ? updates.label : "How Likely Are You to Pay if Your Issue Could be Resolved?";
624
+ const help = vertical ? updates.help : "No payment necessary to speak with lawyers.";
625
+ return func(
626
+ merge(
627
+ {
628
+ name: scope ? scope + ":" + "Degree_Of_Interest" : "Degree_Of_Interest",
629
+ id: scope ? scope + ":" + "Degree_Of_Interest" : "Degree_Of_Interest",
630
+ label,
631
+ help,
632
+ options: ["Definitely", "Probably", "Maybe", "Absolutely Can't Afford"],
633
+ },
634
+ updates
635
+ )
636
+ )
637
+ };
472
638
 
473
- const degreeOfInterestHelp = (scope) => degreeOfInterest(scope, 'No payment necessary to speak with lawyers.');
639
+ const degreeOfInterestHelp = (scope, vertical, updates = {}) =>
640
+ degreeOfInterest(scope, vertical, merge(updates, { help: "No payment necessary to speak with lawyers." }));
474
641
 
475
- const disabilityConditionStopWork = (scope) => sbsYesNoRadio({
476
- name: scope ? scope + ':' + 'Disability_Condition_Stop_Work' : 'Disability_Condition_Stop_Work',
477
- label: 'Do You Expect To Be Out Of Work For At Least a Year Due To Your Health?'
478
- });
642
+ const disabilityConditionStopWork = (scope, vertical, updates = {}) => {
643
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
644
+ const label = vertical
645
+ ? updates.label
646
+ : "Do You Expect To Be Out Of Work For At Least a Year Due To Your Health?";
647
+ return func(
648
+ merge(
649
+ {
650
+ name: scope ? scope + ":" + "Disability_Condition_Stop_Work" : "Disability_Condition_Stop_Work",
651
+ label,
652
+ },
653
+ updates
654
+ )
655
+ )
656
+ };
479
657
 
480
- const disabilityWorkHistory = (scope) => sbsYesNoRadio({
481
- name: scope ? scope + ':' + 'Disability_Work_History' : 'Disability_Work_History',
482
- label: 'Have You Had a Full-Time Job Within the Past 5 Years?'
483
- });
658
+ const disabilityWorkHistory = (scope, vertical, updates = {}) => {
659
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
660
+ const label = vertical ? updates.label : "Have You Had a Full-Time Job Within the Past 5 Years?";
661
+ return func(
662
+ merge(
663
+ {
664
+ name: scope ? scope + ":" + "Disability_Work_History" : "Disability_Work_History",
665
+ label,
666
+ },
667
+ updates
668
+ )
669
+ )
670
+ };
484
671
 
485
- const doctorTreatment = (scope) => sbsYesNoRadio({
486
- name: scope ? scope + ':' + 'Doctor_Treatment' : 'Doctor_Treatment',
487
- label: 'Have You Recently Been Treated by a Doctor, Hospital or Clinic?',
488
- });
672
+ const doctorTreatment = (scope, vertical, updates = {}) => {
673
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
674
+ const label = vertical ? updates.label : "Have You Recently Been Treated by a Doctor, Hospital or Clinic?";
675
+ return func(
676
+ merge(
677
+ {
678
+ name: scope ? scope + ":" + "Doctor_Treatment" : "Doctor_Treatment",
679
+ label,
680
+ },
681
+ updates
682
+ )
683
+ )
684
+ };
489
685
 
490
- const estateLegalServicesNeeded = (scope) => sbsSelect({
491
- name: scope ? scope + ':' + 'Estate_Legal_Services_Needed' : 'Estate_Legal_Services_Needed',
492
- label: "Legal Services Needed for Your Estate:",
493
- options: [
494
- "Charitable Giving",
495
- "Contested Wills",
496
- "Drafting Wills or Trust",
497
- "Estate Administration",
498
- "Asset Protection",
499
- "Other"
500
- ]
501
- });
686
+ const estateLegalServicesNeeded = (scope, vertical, updates = {}) => {
687
+ const func = vertical ? col2RadioCenter : sbsSelect;
688
+ const label = vertical ? updates.label : "Legal Services Needed for Your Estate:";
689
+ return func(
690
+ merge(
691
+ {
692
+ name: scope ? scope + ":" + "Estate_Legal_Services_Needed" : "Estate_Legal_Services_Needed",
693
+ label,
694
+ options: [
695
+ "Charitable Giving",
696
+ "Contested Wills",
697
+ "Drafting Wills or Trust",
698
+ "Estate Administration",
699
+ "Asset Protection",
700
+ "Other",
701
+ ],
702
+ },
703
+ updates
704
+ )
705
+ )
706
+ };
502
707
 
503
- const haveAttorney = (scope) => sbsYesNoRadio({
504
- name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
505
- label: 'Already Working with An Attorney?'
506
- });
708
+ const haveAttorney = (scope, vertical, updates = {}) => {
709
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
710
+ const label = vertical ? updates.label : "Already Working with An Attorney?";
711
+ return func(
712
+ merge(
713
+ {
714
+ label,
715
+ name: scope ? scope + ":" + "Have_Attorney" : "Have_Attorney",
716
+ },
717
+ updates
718
+ )
719
+ )
720
+ };
507
721
 
508
- const haveChildren = (scope) => sbsYesNoRadio({
509
- name: scope ? scope + ':' + 'Have_Children' : 'Have_Children',
510
- label: 'Do You Have Children?'
511
- });
722
+ const haveChildren = (scope, vertical, updates = {}) => {
723
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
724
+ const label = vertical ? updates.label : "Do You Have Children?";
725
+ return func(
726
+ merge(
727
+ {
728
+ name: scope ? scope + ":" + "Have_Children" : "Have_Children",
729
+ label,
730
+ },
731
+ updates
732
+ )
733
+ )
734
+ };
512
735
 
513
- const incidentDate = (scope) => sbsDate({
514
- name: scope ? scope + ':' + 'Incident_Date' : 'Incident_Date',
515
- label: 'Date of Incident:',
516
- });
736
+ const incidentDate = (scope, vertical, updates = {}) => {
737
+ const func = vertical ? verticalDate : sbsDate;
738
+ const label = vertical ? updates.label : "Date of Incident:";
739
+ return func(
740
+ merge(
741
+ {
742
+ label,
743
+ name: scope ? scope + ":" + "Incident_Date" : "Incident_Date",
744
+ },
745
+ updates
746
+ )
747
+ )
748
+ };
517
749
 
518
- const lawsuitOtherParty = () => sbsSelect({
519
- label: 'The Other Party is a:',
520
- name: 'Lawsuit_Other_Party',
521
- options: [
522
- "Individual",
523
- "Small Business",
524
- "Large Corporation",
525
- "Government Entity"
526
- ]
527
- });
750
+ const lawsuitOtherParty = (scope, vertical, updates = {}) => {
751
+ const func = vertical ? col2RadioCenter : sbsSelect;
752
+ const label = vertical ? updates.label : "The Other Party is a:";
753
+ return func(
754
+ merge(
755
+ {
756
+ label,
757
+ name: scope ? scope + ":" + "Lawsuit_Other_Party" : "Lawsuit_Other_Party",
758
+ options: ["Individual", "Small Business", "Large Corporation", "Government Entity"],
759
+ },
760
+ updates
761
+ )
762
+ )
763
+ };
528
764
 
529
- const lawyerPaymentMethod = (scope) => sbsSelect({
530
- name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
531
- label: 'How Will You Pay for Legal Fees if You Hire a Lawyer?',
532
- help: 'No payment necessary to speak with lawyers.',
533
- options: [
534
- 'Cash',
535
- 'Check',
536
- 'Credit Card',
537
- 'Friend',
538
- 'Family',
539
- 'Other'
540
- ]
541
- });
765
+ const lawyerPaymentMethod = (scope, vertical, updates = {}) => {
766
+ const func = vertical ? col2RadioCenter : sbsSelect;
767
+ const label = vertical ? updates.label : "How Will You Pay for Legal Fees if You Hire a Lawyer?";
768
+ const help = vertical ? updates.help : "No payment necessary to start a consultation.";
769
+ const options = vertical
770
+ ? {
771
+ Cash: "Cash",
772
+ "Credit Card": "Credit Card",
773
+ Family: "Family or Friend",
774
+ Other: "Other",
775
+ }
776
+ : ["Cash", "Check", "Credit Card", "Friend", "Family", "Other"];
777
+ return func(
778
+ merge(
779
+ {
780
+ label,
781
+ help,
782
+ name: scope ? scope + ":" + "Lawyer_Payment_Method" : "Lawyer_Payment_Method",
783
+ options,
784
+ fieldsetClass: vertical ? "$reset t-flex t-flex-col t-items-center" : undefined,
785
+ },
786
+ updates
787
+ )
788
+ )
789
+ };
542
790
 
543
- const legalCrossSells$1 = () => col2Checkbox({
544
- id: 'Legal_CrossSells',
545
- name: 'Legal_CrossSells',
546
- help: 'Just hit "Next" if none apply',
547
- helpClass: 't-text-center !t-text-sm',
548
- validation: null,
549
- options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
550
- });
791
+ const legalCrossSells$1 = () =>
792
+ col2Checkbox({
793
+ id: "Legal_CrossSells",
794
+ name: "Legal_CrossSells",
795
+ help: 'Just hit "Next" if none apply',
796
+ helpClass: "t-text-center !t-text-sm",
797
+ validation: null,
798
+ options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
799
+ });
800
+
801
+ const maritalStatus = (scope, vertical, updates = {}) => {
802
+ const func = vertical ? col2RadioCenter : sbsSelect;
803
+ const label = vertical ? updates.label : "Marital Status:";
804
+ return func(
805
+ merge(
806
+ {
807
+ label,
808
+ name: scope ? scope + ":" + "Marital_Status" : "Marital_Status",
809
+ options: [
810
+ "Unmarried, Living Together",
811
+ "Unmarried, Do Not Live Together",
812
+ "Married, Living Together",
813
+ "Separated",
814
+ "Divorced",
815
+ "Other",
816
+ ],
817
+ },
818
+ updates
819
+ )
820
+ )
821
+ };
551
822
 
552
- const maritalStatus = (scope) => sbsSelect({
553
- name: scope ? scope + ':' + 'Marital_Status' : 'Marital_Status',
554
- label: 'Marital Status:',
555
- options: [
556
- 'Unmarried, Living Together',
557
- 'Unmarried, Do Not Live Together',
558
- 'Married, Living Together',
559
- 'Separated',
560
- 'Divorced',
561
- 'Other'
562
- ]
563
- });
823
+ const medicalMalpracticeInjuries = (scope, vertical, updates = {}) => {
824
+ const func = vertical ? verticalSelect : sbsSelect;
825
+ const label = vertical ? updates.label : "Injuries from Medical Malpractice:";
826
+ return func(
827
+ merge(
828
+ {
829
+ label,
830
+ name: scope ? scope + ":" + "Medical_Malpractice_Injuries" : "Medical_Malpractice_Injuries",
831
+ options: [
832
+ "No Injury",
833
+ "Minor Injury",
834
+ "Disfigurement or cosmetic injury",
835
+ "Short term loss of physical ability",
836
+ "Long term loss of physical injury",
837
+ "Possibility of future harm",
838
+ "Death of Patient",
839
+ ],
840
+ },
841
+ updates
842
+ )
843
+ )
844
+ };
564
845
 
565
- const medicalMalpracticeInjuries = () => sbsSelect({
566
- label: "Injuries from Medical Malpractice:",
567
- name: 'Medical_Malpractice_Injuries',
568
- options: [
569
- "No Injury",
570
- "Minor Injury",
571
- "Disfigurement or cosmetic injury",
572
- "Short term loss of physical ability",
573
- "Long term loss of physical injury",
574
- "Possibility of future harm",
575
- "Death of Patient"
576
- ]
577
- });
846
+ const malpracticeTOLPDisplay = (scope, vertical, updates = {}) => {
847
+ const func = vertical ? col2RadioCenter : col2Radio;
848
+ const label = vertical ? updates.label : "Select The Malpractice Issue:";
849
+ return func(
850
+ merge(
851
+ {
852
+ label,
853
+ name: scope ? scope + ":" + "Type_Of_Legal_Problem_Display" : "Type_Of_Legal_Problem_Display",
854
+ options: ["Medical Malpractice", "Attorney Malpractice", "Other Malpractice Issues"],
855
+ },
856
+ updates
857
+ )
858
+ )
859
+ };
578
860
 
579
- const malpracticeTOLPDisplay = (updates) => col2Radio(merge({
580
- name: 'Type_Of_Legal_Problem_Display',
581
- label: 'Select The Malpractice Issue:',
582
- options: [
583
- 'Medical Malpractice',
584
- 'Attorney Malpractice',
585
- 'Other Malpractice Issues'
586
- ]
587
- }, updates));
588
-
589
- const pendingCharges = (scope) => sbsYesNoRadio({
590
- name: scope ? scope + ':' + 'Pending_Charges' : 'Pending_Charges',
591
- label: 'Do you currently have any pending charges?'
592
- });
861
+ // XXX HERE
593
862
 
594
- const primaryInjury = (scope) => sbs2ColRadio({
595
- name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
596
- label: 'Primary Injury:',
597
- options: [
598
- "Anxiety",
599
- "Back or Neck Pain",
600
- "Broken Bones",
601
- "Cuts and Bruises",
602
- "Headaches",
603
- "Memory Loss",
604
- "Loss of Limb",
605
- "Not Sure or Other"
606
- ]
607
- });
863
+ const pendingCharges = (scope, vertical, updates = {}) => {
864
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
865
+ const label = vertical ? updates.label : "Do you currently have any pending charges?";
866
+ return func(
867
+ merge(
868
+ {
869
+ name: scope ? scope + ":" + "Pending_Charges" : "Pending_Charges",
870
+ label,
871
+ },
872
+ updates
873
+ )
874
+ )
875
+ };
608
876
 
609
- const priorAlcoholOffenses = (scope) => sbsYesNoRadio({
610
- name: scope ? scope + ':' + 'Prior_Alcohol_Offenses' : 'Prior_Alcohol_Offenses',
611
- label: 'Any Prior Alcohol Related Offenses?'
612
- });
877
+ const primaryInjury = (scope, vertical, updates = {}) => {
878
+ const func = vertical ? col2RadioCenter : sbs2ColRadio;
879
+ const label = vertical ? updates.label : "Primary Injury:";
880
+ return func(
881
+ merge(
882
+ {
883
+ label,
884
+ name: scope ? scope + ":" + "Primary_Injury" : "Primary_Injury",
885
+ options: [
886
+ "Anxiety",
887
+ "Back or Neck Pain",
888
+ "Broken Bones",
889
+ "Cuts and Bruises",
890
+ "Headaches",
891
+ "Memory Loss",
892
+ "Loss of Limb",
893
+ "Not Sure or Other",
894
+ ],
895
+ },
896
+ updates
897
+ )
898
+ )
899
+ };
613
900
 
614
- const policeReportFiled = (scope) => sbsYesNoRadio({
615
- name: scope ? scope + ':' + 'Police_Report_Filed' : 'Police_Report_Filed',
616
- label: 'Was a Police Report Filed?'
617
- });
901
+ const priorAlcoholOffenses = (scope, vertical, updates = {}) => {
902
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
903
+ const label = vertical ? updates.label : "Any Prior Alcohol Related Offenses?";
904
+ return func(
905
+ merge(
906
+ {
907
+ name: scope ? scope + ":" + "Prior_Alcohol_Offenses" : "Prior_Alcohol_Offenses",
908
+ label,
909
+ },
910
+ updates
911
+ )
912
+ )
913
+ };
618
914
 
619
- const roleInMatterProbate = (scope) => sbsSelect({
620
- name: scope ? scope + ':' + 'Role_In_Matter_Probate' : 'Role_In_Matter_Probate',
621
- label: "What Is Your Role in this Matter?",
622
- options: [
623
- "Preparing My Will",
624
- "Executor",
625
- "Heir",
626
- "Other"
627
- ]
628
- });
915
+ const policeReportFiled = (scope, vertical, updates = {}) => {
916
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
917
+ const label = vertical ? updates.label : "Was a Police Report Filed?";
918
+ return func(
919
+ merge(
920
+ {
921
+ name: scope ? scope + ":" + "Police_Report_Filed" : "Police_Report_Filed",
922
+ label,
923
+ },
924
+ updates
925
+ )
926
+ )
927
+ };
629
928
 
630
- const socialSecurityDisabilityReceivingBenefits = (scope) => sbsYesNoRadio({
631
- name: scope ? scope + ':' + 'Social_Security_Disability_Receiving_Benefits' : 'Social_Security_Disability_Receiving_Benefits',
632
- label: 'Are You Currently Receiving Social Security Disability Benefits?'
633
- });
929
+ const roleInMatterProbate = (scope, vertical, updates = {}) => {
930
+ const func = vertical ? col2RadioCenter : sbsSelect;
931
+ const label = vertical ? updates.label : "What is Your Role in this Matter?";
932
+ return func(
933
+ merge(
934
+ {
935
+ label,
936
+ name: scope ? scope + ":" + "Role_In_Matter_Probate" : "Role_In_Matter_Probate",
937
+ options: ["Preparing My Will", "Executor", "Heir", "Other"],
938
+ },
939
+ updates
940
+ )
941
+ )
942
+ };
943
+
944
+ const socialSecurityDisabilityReceivingBenefits = (scope, vertical, updates = {}) => {
945
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
946
+ const label = vertical ? updates.label : "Are You Currently Receiving Social Security Disability Benefits?";
947
+ return func(
948
+ merge(
949
+ {
950
+ name: scope
951
+ ? scope + ":" + "Social_Security_Disability_Receiving_Benefits"
952
+ : "Social_Security_Disability_Receiving_Benefits",
953
+ label,
954
+ },
955
+ updates
956
+ )
957
+ )
958
+ };
634
959
 
635
960
  const TCPAConsent = (scope) => ({
636
- $formkit: 'checkbox',
637
- label: '$meta.tcpaLanguage',
638
- name: scope ? scope + ':' + 'TCPA_Opt_In' : 'TCPA_Opt_In',
639
- 'data-tf-sensitive': 'false',
640
- validation: 'required|accepted',
961
+ $formkit: "checkbox",
962
+ label: "$meta.tcpaLanguage",
963
+ // Necessary to get links to work in the tcpa language
964
+ __raw__sectionsSchema: {
965
+ label: { attrs: { innerHTML: "$label" } },
966
+ },
967
+ name: scope ? scope + ":" + "TCPA_Opt_In" : "TCPA_Opt_In",
968
+ "data-tf-sensitive": "false",
969
+ validation: "required|accepted",
641
970
  validationMessages: {
642
- required: 'Consent is required',
643
- accepted: 'Consent is required'
971
+ required: "Consent is required",
972
+ accepted: "Consent is required",
644
973
  },
645
974
  classes: {
646
- label: "t-text-xs t-text-slate-500 t-font-normal"
647
- }
975
+ label: "t-text-xs t-text-slate-500 t-font-normal",
976
+ },
648
977
  });
649
978
 
650
- const typeOfAlcoholTest = (scope) => sbsSelect({
651
- name: scope ? scope + ':' + 'Type_Of_Alcohol_Test' : 'Type_Of_Alcohol_Test',
652
- label: 'Type of Alcohol Test Performed?',
653
- options: [
654
- "No Test",
655
- "Refused Test",
656
- "Breath Test",
657
- "Blood Test",
658
- "Urine Test",
659
- "Don't Know"
660
- ]
661
- });
979
+ const typeOfAlcoholTest = (scope, vertical, updates = {}) => {
980
+ const func = vertical ? col2RadioCenter : sbsSelect;
981
+ const label = vertical ? updates.label : "Type of Alcohol Test Performed?";
982
+ return func(
983
+ merge(
984
+ {
985
+ label,
986
+ name: scope ? scope + ":" + "Type_Of_Alcohol_Test" : "Type_Of_Alcohol_Test",
987
+ options: ["No Test", "Refused Test", "Breath Test", "Blood Test", "Urine Test", "Don't Know"],
988
+ },
989
+ updates
990
+ )
991
+ )
992
+ };
662
993
 
663
- const typeOfAssets = (scope) => col2Checkbox({
664
- name: scope ? scope + ':' + 'Type_Of_Assets' : 'Type_Of_Assets',
665
- label: 'Type of Assets:',
666
- options: [
667
- "Business Interests",
668
- "Cash",
669
- "Life Insurance Policies",
670
- "Pensions/Retirement",
671
- "Personal Possessions",
672
- "Property",
673
- "Stock/Bonds"
674
- ]
675
- });
994
+ const typeOfAssets = (scope, vertical, updates = {}) => {
995
+ const func = vertical ? verticalCol2Checkbox : col2Checkbox;
996
+ const label = vertical ? updates.label : "Type of Assets:";
997
+ return func(
998
+ merge(
999
+ {
1000
+ label,
1001
+ name: scope ? scope + ":" + "Type_Of_Assets" : "Type_Of_Assets",
1002
+ options: [
1003
+ "Business Interests",
1004
+ "Cash",
1005
+ "Life Insurance Policies",
1006
+ "Pensions/Retirement",
1007
+ "Personal Possessions",
1008
+ "Property",
1009
+ "Stock/Bonds",
1010
+ ],
1011
+ },
1012
+ updates
1013
+ )
1014
+ )
1015
+ };
676
1016
 
677
- const valueOfAssets = (scope) => sbsSelect({
678
- name: scope ? scope + ':' + 'Value_Of_Assets' : 'Value_Of_Assets',
679
- label: 'Value of Your Assets?',
680
- options: [
681
- "Less than 50K",
682
- "50K to 100K",
683
- "100K to 250K",
684
- "250K to 500K",
685
- "500K to 1M",
686
- "More than 1M"
687
- ]
688
- });
1017
+ const valueOfAssets = (scope, vertical, updates = {}) => {
1018
+ const func = vertical ? col2RadioCenter : sbsSelect;
1019
+ const label = vertical ? updates.label : "Value of Your Assets?";
1020
+ return func(
1021
+ merge(
1022
+ {
1023
+ label,
1024
+ name: scope ? scope + ":" + "Value_Of_Assets" : "Value_Of_Assets",
1025
+ options: ["Less than 50K", "50K to 100K", "100K to 250K", "250K to 500K", "500K to 1M", "More than 1M"],
1026
+ },
1027
+ updates
1028
+ )
1029
+ )
1030
+ };
689
1031
 
690
- // ------ Question Groups
1032
+ // ------ Question Groups - TODO: move these go separate file groups.js
691
1033
 
692
1034
  // NOTE: name must be unique within a form!
693
1035
  const group = (name, updates) => {
694
- return merge({
695
- $cmp: 'FormKit',
696
- props: {
697
- type: 'group',
698
- key: name,
699
- id: name,
700
- name: name
701
- }
702
- }, updates)
1036
+ return merge(
1037
+ {
1038
+ $cmp: "FormKit",
1039
+ props: {
1040
+ type: "group",
1041
+ key: name,
1042
+ id: name,
1043
+ name: name,
1044
+ },
1045
+ },
1046
+ updates
1047
+ )
703
1048
  };
704
1049
 
705
- const AutoAndCarAccidentsQuestions = (condition, scope) => group(
706
- 'AutoAndCarAccidentsQuestions',
707
- {
708
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"'),
1050
+ const AutoAndCarAccidentsQuestions = (condition, scope) =>
1051
+ group("AutoAndCarAccidentsQuestions", {
1052
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"',
709
1053
  children: [
710
1054
  haveAttorney(scope),
711
1055
  incidentDate(scope),
712
1056
  atFault(scope),
713
1057
  primaryInjury(scope),
714
1058
  doctorTreatment(scope),
715
- policeReportFiled(scope)
716
- ]
717
- }
718
- );
1059
+ policeReportFiled(scope),
1060
+ ],
1061
+ });
719
1062
 
720
- const ChildCustodyQuestions = (condition, scope) => group(
721
- 'ChildCustodyQuestions',
722
- {
723
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"'),
1063
+ const ChildCustodyQuestions = (condition, scope) =>
1064
+ group("ChildCustodyQuestions", {
1065
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"',
724
1066
  children: [
725
1067
  haveAttorney(scope),
726
1068
  childRelationship(scope),
727
1069
  childHome(scope),
728
1070
  childPrimaryCaregiver(scope),
729
1071
  degreeOfInterest(scope),
730
- lawyerPaymentMethod(scope)
731
- ]
732
- }
733
- );
1072
+ lawyerPaymentMethod(scope),
1073
+ ],
1074
+ });
734
1075
 
735
- const CivilLawsuitQuestions = () => group(
736
- 'CivilLawsuitQuestions',
737
- {
738
- if: '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit"',
739
- children: [
740
- haveAttorney(),
741
- lawsuitOtherParty(),
742
- degreeOfInterestHelp()
743
- ]
744
- }
745
- );
1076
+ const CivilLawsuitQuestions = (condition, scope) =>
1077
+ group("CivilLawsuitQuestions", {
1078
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit"',
1079
+ children: [haveAttorney(scope), lawsuitOtherParty(scope), degreeOfInterestHelp(scope)],
1080
+ });
746
1081
 
747
- const DivorceQuestions = (condition, scope) => group(
748
- 'DivorceQuestions',
749
- {
750
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"'),
1082
+ const DivorceQuestions = (condition, scope) =>
1083
+ group("DivorceQuestions", {
1084
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"',
751
1085
  children: [
752
1086
  haveAttorney(scope),
753
1087
  maritalStatus(scope),
754
1088
  haveChildren(scope),
755
1089
  degreeOfInterest(scope),
756
- lawyerPaymentMethod(scope)
757
- ]
758
- }
759
- );
1090
+ lawyerPaymentMethod(scope),
1091
+ ],
1092
+ });
760
1093
 
761
- const DUIAndDWIQuestions = (condition, scope) => group(
762
- 'DUIAndDWIQuestions',
763
- {
764
- if: (condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"'),
1094
+ const DUIAndDWIQuestions = (condition, scope) =>
1095
+ group("DUIAndDWIQuestions", {
1096
+ if: condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"',
765
1097
  children: [
766
1098
  haveAttorney(scope),
767
1099
  incidentDate(scope),
@@ -769,119 +1101,100 @@ const DUIAndDWIQuestions = (condition, scope) => group(
769
1101
  typeOfAlcoholTest(scope),
770
1102
  bloodContentAlcoholTest(scope),
771
1103
  pendingCharges(scope),
772
- degreeOfInterestHelp(scope)
773
- ]
774
- }
775
- );
1104
+ degreeOfInterestHelp(scope),
1105
+ ],
1106
+ });
776
1107
 
777
- const MedicalMalpracticeQuestions = () => group(
778
- 'MedicalMalpracticeQuestions',
779
- {
780
- if: '$get(Type_Of_Legal_Problem).value == "Medical Malpractice"',
1108
+ const MedicalMalpracticeQuestions = (condition, scope) =>
1109
+ group("MedicalMalpracticeQuestions", {
1110
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Medical Malpractice"',
781
1111
  children: [
782
- haveAttorney(),
783
- incidentDate(),
784
- claimStatus(),
785
- doctorTreatment(),
786
- medicalMalpracticeInjuries(),
787
- degreeOfInterestHelp()
788
- ]
789
- }
790
- );
1112
+ haveAttorney(scope),
1113
+ incidentDate(scope),
1114
+ claimStatus(scope),
1115
+ doctorTreatment(scope),
1116
+ medicalMalpracticeInjuries(scope),
1117
+ degreeOfInterestHelp(scope),
1118
+ ],
1119
+ });
791
1120
 
792
- const PersonalInjuryQuestions = (condition, scope) => group(
793
- 'PersonalInjuryQuestions',
794
- {
795
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"'),
1121
+ const PersonalInjuryQuestions = (condition, scope) =>
1122
+ group("PersonalInjuryQuestions", {
1123
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"',
796
1124
  children: [
797
1125
  haveAttorney(scope),
798
1126
  incidentDate(scope),
799
1127
  claimStatus(scope),
800
1128
  atFault(scope),
801
1129
  primaryInjury(scope),
802
- doctorTreatment(scope)
803
- ]
804
- }
805
- );
1130
+ doctorTreatment(scope),
1131
+ ],
1132
+ });
806
1133
 
807
- const PowerofAttorneyQuestions = (condition, scope) => group(
808
- 'PowerofAttorneyQuestions',
809
- {
810
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"'),
811
- children: [
812
- haveAttorney(scope),
813
- degreeOfInterestHelp(scope)
814
- ]
815
- }
816
- );
1134
+ const PowerofAttorneyQuestions = (condition, scope) =>
1135
+ group("PowerofAttorneyQuestions", {
1136
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"',
1137
+ children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1138
+ });
817
1139
 
818
- const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) => group(
819
- 'SocialSecurityDisabilityAndInsuranceQuestions',
820
- {
821
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"'),
1140
+ const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) =>
1141
+ group("SocialSecurityDisabilityAndInsuranceQuestions", {
1142
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"',
822
1143
  children: [
823
1144
  haveAttorney(scope),
824
1145
  applicantAge(scope),
825
1146
  disabilityConditionStopWork(scope),
826
1147
  disabilityWorkHistory(scope),
827
1148
  socialSecurityDisabilityReceivingBenefits(scope),
828
- doctorTreatment(scope)
829
- ]
830
- }
831
- );
1149
+ doctorTreatment(scope),
1150
+ ],
1151
+ });
832
1152
 
833
- const WillsAndTrustsQuestions = (condition, scope) => group(
834
- 'WillsAndTrustsQuestions',
835
- {
836
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"'),
1153
+ const WillsAndTrustsQuestions = (condition, scope) =>
1154
+ group("WillsAndTrustsQuestions", {
1155
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"',
837
1156
  children: [
838
1157
  haveAttorney(scope),
839
1158
  valueOfAssets(scope),
840
1159
  typeOfAssets(scope),
841
1160
  roleInMatterProbate(scope),
842
1161
  estateLegalServicesNeeded(scope),
843
- degreeOfInterestHelp(scope)
844
- ]
845
- }
846
- );
1162
+ degreeOfInterestHelp(scope),
1163
+ ],
1164
+ });
847
1165
 
848
- const WorkersCompensationQuestions = (condition, scope) => group(
849
- 'WorkersCompensationQuestions',
850
- {
851
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Workers Compensation"'),
1166
+ const WorkersCompensationQuestions = (condition, scope) =>
1167
+ group("WorkersCompensationQuestions", {
1168
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Workers Compensation"',
852
1169
  children: [
853
1170
  haveAttorney(scope),
854
1171
  incidentDate(scope),
855
1172
  claimStatus(scope),
856
1173
  primaryInjury(scope),
857
1174
  causeOfInjury(scope),
858
- doctorTreatment(scope)
859
- ]
860
- }
861
- );
1175
+ doctorTreatment(scope),
1176
+ ],
1177
+ });
862
1178
 
863
- const NotSureOrOtherQuestions = () => group(
864
- 'NotSureOrOtherQuestions',
865
- {
866
- if: '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
867
- children: [
868
- haveAttorney(),
869
- degreeOfInterestHelp()
870
- ]
871
- }
872
- );
1179
+ const NotSureOrOtherQuestions = (condition, scope) =>
1180
+ group("NotSureOrOtherQuestions", {
1181
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
1182
+ children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1183
+ });
873
1184
 
874
- const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
875
- const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
1185
+ const NEXT_ON_ENTER = "$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
1186
+ const NEXT_ON_INPUT = "$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
876
1187
 
877
- const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
1188
+ const isInput = (n) => {
1189
+ return n.type !== "group" && n.type !== "section" && n.type !== "form" && n.$formkit !== "hidden" && !n.children
1190
+ };
878
1191
 
879
1192
  const findLastInput = (n) => {
880
1193
  if (isInput(n)) {
881
1194
  return n
882
1195
  }
883
1196
  for (var i = n.children.length - 1; i >= 0; i--) {
884
- if (typeof n.children === 'string') {
1197
+ if (typeof n.children === "string") {
885
1198
  continue
886
1199
  }
887
1200
  const child = n.children[i];
@@ -897,126 +1210,138 @@ const findLastInput = (n) => {
897
1210
  };
898
1211
 
899
1212
  const secureIconDefault = {
900
- $el: 'div',
901
- if: '$activeStep === $lastStep()',
1213
+ $el: "div",
1214
+ if: "$activeStep === $lastStep()",
902
1215
  attrs: {
903
- class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
1216
+ class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500",
904
1217
  },
905
1218
  children: [
906
1219
  {
907
- $el: 'img',
1220
+ $el: "img",
908
1221
  attrs: {
909
- loading: 'lazy',
910
- alt: '',
1222
+ loading: "lazy",
1223
+ alt: "",
911
1224
  style: {
912
- border: 0
1225
+ border: 0,
913
1226
  },
914
- width: '25',
915
- height: '25',
916
- src: 'https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg',
917
- }
1227
+ width: "25",
1228
+ height: "25",
1229
+ src: "https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg",
1230
+ },
918
1231
  },
919
1232
  {
920
- $el: 'span',
921
- children: 'Secure & Encrypted',
1233
+ $el: "span",
1234
+ children: "Secure & Encrypted",
922
1235
  attrs: {
923
- class: 't-pl-2 t-pt-1 t-font-medium'
924
- }
925
- }
926
- ]
1236
+ class: "t-pl-2 t-pt-1 t-font-medium",
1237
+ },
1238
+ },
1239
+ ],
927
1240
  };
928
1241
 
929
1242
  function secureIcon(updates) {
930
- return merge(
931
- secureIconDefault,
932
- updates
933
- )
1243
+ return merge(secureIconDefault, updates)
934
1244
  }
935
1245
 
936
1246
  function questionsStepHeadline(updates) {
937
1247
  return {
938
- $el: 'h3',
939
- children: updates.headline || 'Tell Us About Your Situation',
1248
+ $el: "h3",
1249
+ children: updates.headline || "Tell Us About Your Situation",
940
1250
  attrs: {
941
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1'
942
- }
1251
+ class: "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1",
1252
+ },
943
1253
  }
944
1254
  }
945
1255
 
946
1256
  function crossSellQuestionsStepHeadline(updates) {
947
1257
  return {
948
- $el: 'h3',
949
- children: updates.headline || 'Tell Us About Your Situation',
1258
+ $el: "h3",
1259
+ children: updates.headline || "Tell Us About Your Situation",
950
1260
  attrs: {
951
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1'
952
- }
1261
+ class: "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-4 t-pt-0 t-px-1",
1262
+ },
953
1263
  }
954
1264
  }
955
1265
 
956
1266
  function crossSellQuestionsStepSubHeadline(updates) {
957
1267
  return {
958
- $el: 'h5',
959
- children: updates.subheadline || 'Tell us about your situation:',
1268
+ $el: "h5",
1269
+ children: updates.subheadline || "Tell us about your situation:",
960
1270
  attrs: {
961
- class: 't-flex t-justify-center t-text-dark t-text-center !t-text-lg t-font-semibold t-pb-4 t-pt-0 t-px-3'
962
- }
1271
+ class: "t-flex t-justify-center t-text-dark t-text-center !t-text-lg t-font-semibold t-pb-4 t-pt-0 t-px-3",
1272
+ },
963
1273
  }
964
1274
  }
965
1275
 
966
1276
  function commentsStepHeadline(updates) {
967
1277
  return {
968
- $el: 'h3',
969
- children: updates.headline || 'Additional Details',
1278
+ $el: "h3",
1279
+ children: updates.headline || "Additional Details",
970
1280
  attrs: {
971
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
972
- }
1281
+ class:
1282
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1283
+ " " +
1284
+ (updates.headlineClass || ""),
1285
+ },
973
1286
  }
974
1287
  }
975
1288
 
976
1289
  function commentsStepHeadlineLegal(updates) {
977
1290
  return commentsStepHeadline({
978
- headline: updates.headline || 'Additional Case Details',
979
- headlineClass: updates.headlineClass
1291
+ headline: updates.headline || "Additional Case Details",
1292
+ headlineClass: updates.headlineClass,
980
1293
  })
981
1294
  }
982
1295
 
983
1296
  function firstAndLastStepHeadline(updates) {
984
1297
  return {
985
- $el: 'h3',
986
- children: updates.headline || 'Please Provide a Contact Name',
1298
+ $el: "h3",
1299
+ children: updates.headline || "Please Provide a Contact Name",
987
1300
  attrs: {
988
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
989
- }
1301
+ class:
1302
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1303
+ " " +
1304
+ (updates.headlineClass || ""),
1305
+ },
990
1306
  }
991
1307
  }
992
1308
 
993
1309
  function legalCrossSellsStepHeadline(updates) {
994
1310
  return {
995
- $el: 'h3',
996
- children: updates.headline || 'Do any of the following situations apply?',
1311
+ $el: "h3",
1312
+ children: updates.headline || "Do any of the following situations apply?",
997
1313
  attrs: {
998
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
999
- }
1314
+ class:
1315
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1316
+ " " +
1317
+ (updates.headlineClass || ""),
1318
+ },
1000
1319
  }
1001
1320
  }
1002
1321
 
1003
1322
  function contactStepHeadline(updates) {
1004
1323
  return {
1005
- $el: 'h3',
1324
+ $el: "h3",
1006
1325
  children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
1007
1326
  attrs: {
1008
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
1009
- }
1327
+ class:
1328
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1" +
1329
+ " " +
1330
+ (updates.headlineClass || ""),
1331
+ },
1010
1332
  }
1011
1333
  }
1012
1334
 
1013
1335
  function contactStepSubHeadline(updates) {
1014
1336
  return {
1015
- $el: 'h5',
1337
+ $el: "h5",
1016
1338
  children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
1017
1339
  attrs: {
1018
- class: 't-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3' + ' ' + (updates.subheadlineClass || '')
1019
- }
1340
+ class:
1341
+ "t-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3" +
1342
+ " " +
1343
+ (updates.subheadlineClass || ""),
1344
+ },
1020
1345
  }
1021
1346
  }
1022
1347
 
@@ -1038,19 +1363,19 @@ const TRUSTED_FORM_JS = `(function() {
1038
1363
 
1039
1364
  function trustedFormScript() {
1040
1365
  return {
1041
- $el: 'script',
1042
- if: '$activeStep === $lastStep()',
1043
- children: TRUSTED_FORM_JS
1366
+ $el: "script",
1367
+ if: "$activeStep === $lastStep()",
1368
+ children: TRUSTED_FORM_JS,
1044
1369
  }
1045
1370
  }
1046
1371
 
1047
1372
  const stepDefaults = (step, stepKey) => ({
1048
- $el: 'section',
1373
+ $el: "section",
1049
1374
  if: '$stepEnabled("' + step + '")',
1050
1375
  attrs: {
1051
1376
  hidden: '$activeStep !== "' + step + '"',
1052
- key: stepKey ? stepKey : step
1053
- }
1377
+ key: stepKey ? stepKey : step,
1378
+ },
1054
1379
  });
1055
1380
 
1056
1381
  function step(name, inputs, updates = {}) {
@@ -1073,27 +1398,24 @@ function step(name, inputs, updates = {}) {
1073
1398
  }
1074
1399
  }
1075
1400
 
1076
- return merge(
1077
- stepDefaults(name, stepKey),
1078
- {
1079
- children: [
1080
- {
1081
- $formkit: 'group',
1082
- id: name,
1083
- name: name,
1084
- nextStepMap: nextStepMap,
1085
- triggerRedirectMap: triggerRedirectMap,
1086
- autoFocus: autoFocus,
1087
- children: inputs
1088
- }
1089
- ]
1090
- }
1091
- )
1401
+ return merge(stepDefaults(name, stepKey), {
1402
+ children: [
1403
+ {
1404
+ $formkit: "group",
1405
+ id: name,
1406
+ name: name,
1407
+ nextStepMap: nextStepMap,
1408
+ triggerRedirectMap: triggerRedirectMap,
1409
+ autoFocus: autoFocus,
1410
+ children: inputs,
1411
+ },
1412
+ ],
1413
+ })
1092
1414
  }
1093
1415
 
1094
1416
  function contactInfo(updates = {}) {
1095
1417
  return step(
1096
- 'contactInfo',
1418
+ "contactInfo",
1097
1419
  [
1098
1420
  contactStepHeadline(updates),
1099
1421
  contactStepSubHeadline(updates),
@@ -1101,7 +1423,7 @@ function contactInfo(updates = {}) {
1101
1423
  email(updates.scope),
1102
1424
  phone(updates.scope),
1103
1425
  TCPAConsent(updates.scope),
1104
- secureIcon()
1426
+ secureIcon(),
1105
1427
  ],
1106
1428
  { nextOnEnter: false }
1107
1429
  )
@@ -1109,28 +1431,24 @@ function contactInfo(updates = {}) {
1109
1431
 
1110
1432
  function firstAndLastV2(updates = {}) {
1111
1433
  return step(
1112
- 'firstAndLast',
1113
- [
1114
- firstAndLastStepHeadline(updates),
1115
- firstName(),
1116
- lastName()
1117
- ],
1434
+ "firstAndLast",
1435
+ [firstAndLastStepHeadline(updates), firstName(updates.scope), lastName(updates.scope)],
1118
1436
  updates
1119
1437
  )
1120
1438
  }
1121
1439
 
1122
1440
  function malpracticeTOLPAndZip(updates = {}) {
1123
1441
  return step(
1124
- 'malpracticeTOLPAndZip',
1442
+ "malpracticeTOLPAndZip",
1125
1443
  [
1126
1444
  {
1127
- $formkit: 'hidden',
1445
+ $formkit: "hidden",
1128
1446
  name: "Type_Of_Legal_Problem",
1129
1447
  id: "Type_Of_Legal_Problem",
1130
- value: "Medical Malpractice"
1448
+ value: "Medical Malpractice",
1131
1449
  },
1132
- malpracticeTOLPDisplay(),
1133
- zipcode()
1450
+ malpracticeTOLPDisplay(updates.scope),
1451
+ zipcode(updates.scope),
1134
1452
  ],
1135
1453
  updates
1136
1454
  )
@@ -1138,12 +1456,12 @@ function malpracticeTOLPAndZip(updates = {}) {
1138
1456
 
1139
1457
  function malpracticeTOLPQuestions(updates = {}) {
1140
1458
  return step(
1141
- 'TOLPQuestions',
1459
+ "TOLPQuestions",
1142
1460
  [
1143
1461
  questionsStepHeadline(updates),
1144
1462
  MedicalMalpracticeQuestions(),
1145
1463
  CivilLawsuitQuestions(),
1146
- NotSureOrOtherQuestions()
1464
+ NotSureOrOtherQuestions(),
1147
1465
  ],
1148
1466
  updates
1149
1467
  )
@@ -1151,27 +1469,27 @@ function malpracticeTOLPQuestions(updates = {}) {
1151
1469
 
1152
1470
  function commentsWithBankruptcy(updates = {}) {
1153
1471
  return step(
1154
- 'commentsWithBankruptcy',
1472
+ "commentsWithBankruptcy",
1155
1473
  [
1156
1474
  commentsStepHeadlineLegal(updates),
1157
- comments({
1158
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1475
+ comments(updates.scope, false, {
1476
+ label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1159
1477
  placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1160
- inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1161
- }, updates.scope),
1478
+ inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
1479
+ }),
1162
1480
  // TODO: needs scope support
1163
1481
  bankruptcyCrossSell(),
1164
1482
  {
1165
- $el: 'div',
1166
- if: '$get(CrossSell_Bankruptcy).value == true',
1483
+ $el: "div",
1484
+ if: "$get(CrossSell_Bankruptcy).value == true",
1167
1485
  children: [
1168
- comments({
1169
- label: 'Bankruptcy or debt details:',
1170
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1171
- inputClass: '!t-h-16'
1172
- }, 'CrossSell:Bankruptcy')
1486
+ comments("CrossSell:Bankruptcy", false, {
1487
+ label: "Bankruptcy or debt details:",
1488
+ placeholder: "Please describe your bankrtupcy or debt situation in a few words...",
1489
+ inputClass: "!t-h-16",
1490
+ }),
1173
1491
  ],
1174
- }
1492
+ },
1175
1493
  ],
1176
1494
  { nextOnEnter: false }
1177
1495
  )
@@ -1179,19 +1497,20 @@ function commentsWithBankruptcy(updates = {}) {
1179
1497
 
1180
1498
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1181
1499
  return step(
1182
- 'autoAndCarAccidentCrossSellQuestions',
1500
+ "autoAndCarAccidentCrossSellQuestions",
1183
1501
  [
1184
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1185
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your accident:' }),
1186
- AutoAndCarAccidentsQuestions("true", 'CrossSell:Auto_and_Car_Accidents'),
1187
- comments(
1188
- {
1189
- label: 'Accident Description:',
1190
- placeholder: 'Please describe your accident in a few words...',
1191
- inputClass: '!t-h-16'
1192
- },
1193
- 'CrossSell:Auto_and_Car_Accidents'
1194
- )
1502
+ crossSellQuestionsStepHeadline({
1503
+ headline: "You May Be Entitled To Compensation",
1504
+ }),
1505
+ crossSellQuestionsStepSubHeadline({
1506
+ subheadline: "Tell us about your accident:",
1507
+ }),
1508
+ AutoAndCarAccidentsQuestions("true", "CrossSell:Auto_and_Car_Accidents"),
1509
+ comments("CrossSell:Auto_and_Car_Accidents", false, {
1510
+ label: "Accident Description:",
1511
+ placeholder: "Please describe your accident in a few words...",
1512
+ inputClass: "!t-h-16",
1513
+ }),
1195
1514
  ],
1196
1515
  updates
1197
1516
  )
@@ -1199,18 +1518,15 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1199
1518
 
1200
1519
  function childCustodyCrossSellQuestions(updates = {}) {
1201
1520
  return step(
1202
- 'childCustodyCrossSellQuestions',
1521
+ "childCustodyCrossSellQuestions",
1203
1522
  [
1204
- crossSellQuestionsStepHeadline({ headline: 'Child Custody Information' }),
1205
- ChildCustodyQuestions("true", 'CrossSell:Child_Custody'),
1206
- comments(
1207
- {
1208
- label: 'Description:',
1209
- placeholder: 'Please describe your situation in a few words...',
1210
- inputClass: '!t-h-16'
1211
- },
1212
- 'CrossSell:Child_Custody'
1213
- )
1523
+ crossSellQuestionsStepHeadline({ headline: "Child Custody Information" }),
1524
+ ChildCustodyQuestions("true", "CrossSell:Child_Custody"),
1525
+ comments("CrossSell:Child_Custody", false, {
1526
+ label: "Description:",
1527
+ placeholder: "Please describe your situation in a few words...",
1528
+ inputClass: "!t-h-16",
1529
+ }),
1214
1530
  ],
1215
1531
  updates
1216
1532
  )
@@ -1218,18 +1534,17 @@ function childCustodyCrossSellQuestions(updates = {}) {
1218
1534
 
1219
1535
  function divorceAndSeparationCrossSellQuestions(updates = {}) {
1220
1536
  return step(
1221
- 'divorceAndSeparationCrossSellQuestions',
1537
+ "divorceAndSeparationCrossSellQuestions",
1222
1538
  [
1223
- crossSellQuestionsStepHeadline({ headline: 'Divorce or Separation Information' }),
1224
- DivorceQuestions("true", 'CrossSell:Divorce_and_Separation'),
1225
- comments(
1226
- {
1227
- label: 'Description:',
1228
- placeholder: 'Please describe your situation in a few words...',
1229
- inputClass: '!t-h-16'
1230
- },
1231
- 'CrossSell:Divorce_and_Separation'
1232
- )
1539
+ crossSellQuestionsStepHeadline({
1540
+ headline: "Divorce or Separation Information",
1541
+ }),
1542
+ DivorceQuestions("true", "CrossSell:Divorce_and_Separation"),
1543
+ comments("CrossSell:Divorce_and_Separation", false, {
1544
+ label: "Description:",
1545
+ placeholder: "Please describe your situation in a few words...",
1546
+ inputClass: "!t-h-16",
1547
+ }),
1233
1548
  ],
1234
1549
  updates
1235
1550
  )
@@ -1237,18 +1552,15 @@ function divorceAndSeparationCrossSellQuestions(updates = {}) {
1237
1552
 
1238
1553
  function duiAndDWICrossSellQuestions(updates = {}) {
1239
1554
  return step(
1240
- 'duiAndDWICrossSellQuestions',
1555
+ "duiAndDWICrossSellQuestions",
1241
1556
  [
1242
- crossSellQuestionsStepHeadline({ headline: 'About Your DUI/DWI' }),
1243
- DUIAndDWIQuestions("true", 'CrossSell:DUI_and_DWI'),
1244
- comments(
1245
- {
1246
- label: 'Incident Description:',
1247
- placeholder: 'Please describe your incident in a few words...',
1248
- inputClass: '!t-h-16'
1249
- },
1250
- 'CrossSell:DUI_and_DWI'
1251
- )
1557
+ crossSellQuestionsStepHeadline({ headline: "About Your DUI/DWI" }),
1558
+ DUIAndDWIQuestions("true", "CrossSell:DUI_and_DWI"),
1559
+ comments("CrossSell:DUI_and_DWI", false, {
1560
+ label: "Incident Description:",
1561
+ placeholder: "Please describe your incident in a few words...",
1562
+ inputClass: "!t-h-16",
1563
+ }),
1252
1564
  ],
1253
1565
  updates
1254
1566
  )
@@ -1256,19 +1568,20 @@ function duiAndDWICrossSellQuestions(updates = {}) {
1256
1568
 
1257
1569
  function ssdiCrossSellQuestions(updates = {}) {
1258
1570
  return step(
1259
- 'ssdiCrossSellQuestions',
1571
+ "ssdiCrossSellQuestions",
1260
1572
  [
1261
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1262
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your disability:' }),
1263
- SocialSecurityDisabilityAndInsuranceQuestions("true", 'CrossSell:Social_Security_Disability_and_Insurance'),
1264
- comments(
1265
- {
1266
- label: 'Description:',
1267
- placeholder: 'Please describe your situation in a few words...',
1268
- inputClass: '!t-h-16'
1269
- },
1270
- 'CrossSell:Social_Security_Disability_and_Insurance'
1271
- )
1573
+ crossSellQuestionsStepHeadline({
1574
+ headline: "You May Be Entitled To Benefits",
1575
+ }),
1576
+ crossSellQuestionsStepSubHeadline({
1577
+ subheadline: "Tell us about your disability:",
1578
+ }),
1579
+ SocialSecurityDisabilityAndInsuranceQuestions("true", "CrossSell:Social_Security_Disability_and_Insurance"),
1580
+ comments("CrossSell:Social_Security_Disability_and_Insurance", false, {
1581
+ label: "Description:",
1582
+ placeholder: "Please describe your situation in a few words...",
1583
+ inputClass: "!t-h-16",
1584
+ }),
1272
1585
  ],
1273
1586
  updates
1274
1587
  )
@@ -1276,19 +1589,20 @@ function ssdiCrossSellQuestions(updates = {}) {
1276
1589
 
1277
1590
  function personalInjuryCrossSellQuestions(updates = {}) {
1278
1591
  return step(
1279
- 'personalInjuryCrossSellQuestions',
1592
+ "personalInjuryCrossSellQuestions",
1280
1593
  [
1281
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1282
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1283
- PersonalInjuryQuestions("true", 'CrossSell:Personal_Injury'),
1284
- comments(
1285
- {
1286
- label: 'Injury Description:',
1287
- placeholder: 'Please describe your injury in a few words...',
1288
- inputClass: '!t-h-16'
1289
- },
1290
- 'CrossSell:Personal_Injury'
1291
- )
1594
+ crossSellQuestionsStepHeadline({
1595
+ headline: "You May Be Entitled To Compensation",
1596
+ }),
1597
+ crossSellQuestionsStepSubHeadline({
1598
+ subheadline: "Tell us about your injury:",
1599
+ }),
1600
+ PersonalInjuryQuestions("true", "CrossSell:Personal_Injury"),
1601
+ comments("CrossSell:Personal_Injury", false, {
1602
+ label: "Injury Description:",
1603
+ placeholder: "Please describe your injury in a few words...",
1604
+ inputClass: "!t-h-16",
1605
+ }),
1292
1606
  ],
1293
1607
  updates
1294
1608
  )
@@ -1296,18 +1610,17 @@ function personalInjuryCrossSellQuestions(updates = {}) {
1296
1610
 
1297
1611
  function powerOfAttorneyCrossSellQuestions(updates = {}) {
1298
1612
  return step(
1299
- 'powerOfAttorneyCrossSellQuestions',
1613
+ "powerOfAttorneyCrossSellQuestions",
1300
1614
  [
1301
- crossSellQuestionsStepHeadline({ headline: 'Power of Attorney Information' }),
1302
- PowerofAttorneyQuestions("true", 'CrossSell:Power_of_Attorney'),
1303
- comments(
1304
- {
1305
- label: 'Description:',
1306
- placeholder: 'Please describe your situation in a few words...',
1307
- inputClass: '!t-h-16'
1308
- },
1309
- 'CrossSell:Power_of_Attorney'
1310
- )
1615
+ crossSellQuestionsStepHeadline({
1616
+ headline: "Power of Attorney Information",
1617
+ }),
1618
+ PowerofAttorneyQuestions("true", "CrossSell:Power_of_Attorney"),
1619
+ comments("CrossSell:Power_of_Attorney", false, {
1620
+ label: "Description:",
1621
+ placeholder: "Please describe your situation in a few words...",
1622
+ inputClass: "!t-h-16",
1623
+ }),
1311
1624
  ],
1312
1625
  updates
1313
1626
  )
@@ -1315,18 +1628,15 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1315
1628
 
1316
1629
  function willsAndTrustsCrossSellQuestions(updates = {}) {
1317
1630
  return step(
1318
- 'willsAndTrustsCrossSellQuestions',
1631
+ "willsAndTrustsCrossSellQuestions",
1319
1632
  [
1320
- crossSellQuestionsStepHeadline({ headline: 'Will or Trust Information' }),
1321
- WillsAndTrustsQuestions("true", 'CrossSell:Wills_and_Trusts'),
1322
- comments(
1323
- {
1324
- label: 'Description:',
1325
- placeholder: 'Please describe your situation in a few words...',
1326
- inputClass: '!t-h-16'
1327
- },
1328
- 'CrossSell:Wills_and_Trusts'
1329
- )
1633
+ crossSellQuestionsStepHeadline({ headline: "Will or Trust Information" }),
1634
+ WillsAndTrustsQuestions("true", "CrossSell:Wills_and_Trusts"),
1635
+ comments("CrossSell:Wills_and_Trusts", false, {
1636
+ label: "Description:",
1637
+ placeholder: "Please describe your situation in a few words...",
1638
+ inputClass: "!t-h-16",
1639
+ }),
1330
1640
  ],
1331
1641
  updates
1332
1642
  )
@@ -1334,19 +1644,20 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
1334
1644
 
1335
1645
  function workersCompensationCrossSellQuestions(updates = {}) {
1336
1646
  return step(
1337
- 'workersCompensationCrossSellQuestions',
1647
+ "workersCompensationCrossSellQuestions",
1338
1648
  [
1339
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1340
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1341
- WorkersCompensationQuestions("true", 'CrossSell:Workers_Compensation'),
1342
- comments(
1343
- {
1344
- label: 'Injury Description:',
1345
- placeholder: 'Please describe your injury in a few words...',
1346
- inputClass: '!t-h-16'
1347
- },
1348
- 'CrossSell:Workers_Compensation'
1349
- )
1649
+ crossSellQuestionsStepHeadline({
1650
+ headline: "You May Be Entitled To Benefits",
1651
+ }),
1652
+ crossSellQuestionsStepSubHeadline({
1653
+ subheadline: "Tell us about your injury:",
1654
+ }),
1655
+ WorkersCompensationQuestions("true", "CrossSell:Workers_Compensation"),
1656
+ comments("CrossSell:Workers_Compensation", false, {
1657
+ label: "Injury Description:",
1658
+ placeholder: "Please describe your injury in a few words...",
1659
+ inputClass: "!t-h-16",
1660
+ }),
1350
1661
  ],
1351
1662
  updates
1352
1663
  )
@@ -1354,123 +1665,116 @@ function workersCompensationCrossSellQuestions(updates = {}) {
1354
1665
 
1355
1666
  function legalCrossSells(updates = {}) {
1356
1667
  updates.nextOnInput = false;
1357
- updates.stepKey = '$get(Type_Of_Legal_Problem).value';
1358
- return step(
1359
- 'legalCrossSells',
1360
- [
1361
- legalCrossSellsStepHeadline(updates),
1362
- legalCrossSells$1(),
1363
- ],
1364
- updates
1365
- )
1668
+ updates.stepKey = "$get(Type_Of_Legal_Problem).value";
1669
+ return step("legalCrossSells", [legalCrossSellsStepHeadline(updates), legalCrossSells$1()], updates)
1366
1670
  }
1367
1671
 
1368
1672
  const formNavigation = (updates = {}) => ({
1369
- $el: 'div',
1673
+ $el: "div",
1370
1674
  attrs: {
1371
- class: 'step-nav'
1675
+ class: "step-nav",
1372
1676
  },
1373
1677
  children: [
1374
1678
  {
1375
- $formkit: 'button',
1376
- name: 'back_button',
1377
- onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1378
- children: 'Back',
1679
+ $formkit: "button",
1680
+ name: "back_button",
1681
+ onClick: "$setPreviousStep($prevStepFunc($get(form)))",
1682
+ children: "Back",
1379
1683
  style: {
1380
- if: '$activeStep === $firstStep()',
1381
- then: 'visibility: hidden;'
1382
- }
1684
+ if: "$activeStep === $firstStep()",
1685
+ then: "visibility: hidden;",
1686
+ },
1383
1687
  },
1384
1688
  {
1385
- $formkit: 'button',
1386
- name: 'next_button',
1387
- onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1689
+ $formkit: "button",
1690
+ name: "next_button",
1691
+ onClick: "$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))",
1388
1692
  children: {
1389
- if: '$activeStep === $firstStep()',
1390
- then: 'Start',
1391
- else: 'Next'
1693
+ if: "$activeStep === $firstStep()",
1694
+ then: "Start",
1695
+ else: "Next",
1392
1696
  },
1393
1697
  outerClass: {
1394
- if: '$activeStep === $lastStep()',
1395
- then: 't-hidden',
1396
- else: ''
1698
+ if: "$activeStep === $lastStep()",
1699
+ then: "t-hidden",
1700
+ else: "",
1397
1701
  },
1398
1702
  style: {
1399
- if: '$activeStep === $lastStep()',
1400
- then: 'display: none;'
1401
- }
1703
+ if: "$activeStep === $lastStep()",
1704
+ then: "display: none;",
1705
+ },
1402
1706
  },
1403
1707
  {
1404
- $formkit: 'submit',
1405
- name: 'submit_button',
1406
- label: updates.submitLabel || 'Submit',
1407
- if: '$activeStep === $lastStep()',
1708
+ $formkit: "submit",
1709
+ name: "submit_button",
1710
+ label: updates.submitLabel || "Submit",
1711
+ if: "$activeStep === $lastStep()",
1408
1712
  style: {
1409
- if: '$activeStep !== $lastStep()',
1410
- then: 'display: none;'
1411
- }
1412
- }
1413
- ]
1713
+ if: "$activeStep !== $lastStep()",
1714
+ then: "display: none;",
1715
+ },
1716
+ },
1717
+ ],
1414
1718
  });
1415
1719
 
1416
1720
  const formDetails = () => ({
1417
- $el: 'pre',
1721
+ $el: "pre",
1418
1722
  if: '$urlParam("fdbg", "") == 1',
1419
1723
  children: [
1420
1724
  {
1421
- $el: 'pre',
1422
- children: '$stringify( $get(form).value )',
1725
+ $el: "pre",
1726
+ children: "$stringify( $get(form).value )",
1423
1727
  attrs: {
1424
- class: 't-text-xs',
1425
- style: 'overflow: scroll'
1426
- }
1728
+ class: "t-text-xs",
1729
+ style: "overflow: scroll",
1730
+ },
1427
1731
  },
1428
1732
  {
1429
- $el: 'pre',
1430
- children: ['activeStep: ', '$activeStep'],
1733
+ $el: "pre",
1734
+ children: ["activeStep: ", "$activeStep"],
1431
1735
  attrs: {
1432
- class: 't-text-xs',
1433
- style: 'overflow: scroll'
1434
- }
1736
+ class: "t-text-xs",
1737
+ style: "overflow: scroll",
1738
+ },
1435
1739
  },
1436
1740
  {
1437
- $el: 'pre',
1438
- children: ['stepHistory: ', '$stepHistory'],
1741
+ $el: "pre",
1742
+ children: ["stepHistory: ", "$stepHistory"],
1439
1743
  attrs: {
1440
- class: 't-text-xs',
1441
- style: 'overflow: scroll'
1442
- }
1744
+ class: "t-text-xs",
1745
+ style: "overflow: scroll",
1746
+ },
1443
1747
  },
1444
1748
  {
1445
- $el: 'pre',
1446
- children: ['stepQueue: ', '$stepQueue'],
1749
+ $el: "pre",
1750
+ children: ["stepQueue: ", "$stepQueue"],
1447
1751
  attrs: {
1448
- class: 't-text-xs',
1449
- style: 'overflow: scroll'
1450
- }
1752
+ class: "t-text-xs",
1753
+ style: "overflow: scroll",
1754
+ },
1451
1755
  },
1452
1756
  {
1453
- $el: 'pre',
1454
- children: ['steps: ', '$stepKeys()'],
1757
+ $el: "pre",
1758
+ children: ["steps: ", "$stepKeys()"],
1455
1759
  attrs: {
1456
- class: 't-text-xs',
1457
- style: 'overflow: scroll'
1458
- }
1459
- }
1460
- ]
1760
+ class: "t-text-xs",
1761
+ style: "overflow: scroll",
1762
+ },
1763
+ },
1764
+ ],
1461
1765
  });
1462
1766
 
1463
1767
  const formPropDefaults = {
1464
- type: 'form',
1465
- id: 'form',
1466
- config: { validationVisibility: 'submit' },
1768
+ type: "form",
1769
+ id: "form",
1770
+ config: { validationVisibility: "submit" },
1467
1771
  onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
1468
- plugins: '$plugins',
1772
+ plugins: "$plugins",
1469
1773
  actions: false,
1470
- anchorElement: 'form-anchor',
1774
+ anchorElement: "form-anchor",
1471
1775
  useLocalStorage: true,
1472
1776
  prepop: {
1473
- fromURL: true
1777
+ fromURL: true,
1474
1778
  },
1475
1779
  errorCodes: {
1476
1780
  403: { message: "An Error Occurred", abort: false },
@@ -1478,13 +1782,11 @@ const formPropDefaults = {
1478
1782
  429: "An Error Occurred",
1479
1783
  504: { message: "An Error Occurred", abort: false },
1480
1784
  },
1481
- formClass: '!t-max-w-[40rem]'
1785
+ formClass: "!t-max-w-[40rem]",
1482
1786
  };
1483
1787
 
1484
1788
  function filterMapByKey(obj, keyList) {
1485
- return Object.fromEntries(
1486
- Object.entries(obj).filter(([key]) => keyList.includes(key))
1487
- );
1789
+ return Object.fromEntries(Object.entries(obj).filter(([key]) => keyList.includes(key)))
1488
1790
  }
1489
1791
 
1490
1792
  // export function filteredNextStepsMapLegal(keyList) {
@@ -1494,10 +1796,7 @@ function filterMapByKey(obj, keyList) {
1494
1796
  // }
1495
1797
 
1496
1798
  function formProps(updates) {
1497
- const props = merge(
1498
- formPropDefaults,
1499
- updates
1500
- );
1799
+ const props = merge(formPropDefaults, updates);
1501
1800
  if (props.formId && !props.name) {
1502
1801
  props.name = props.formId;
1503
1802
  }
@@ -1507,13 +1806,10 @@ function formProps(updates) {
1507
1806
  const metaDefaults = {};
1508
1807
 
1509
1808
  function metaProps(updates) {
1510
- const data = merge(
1511
- metaDefaults,
1512
- updates
1513
- );
1809
+ const data = merge(metaDefaults, updates);
1514
1810
  return {
1515
- type: 'meta',
1516
- data
1811
+ type: "meta",
1812
+ data,
1517
1813
  }
1518
1814
  }
1519
1815
 
@@ -1533,412 +1829,415 @@ function defaultMetaPropsLegal(tolps = null) {
1533
1829
  defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1534
1830
  finalHeadlines: finalHeadlines,
1535
1831
  defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1536
- finalSubHeadlines: finalSubHeadlines
1832
+ finalSubHeadlines: finalSubHeadlines,
1537
1833
  })
1538
1834
  }
1539
1835
 
1540
- function dynamicSchemaNode(field = 'Type_Of_Legal_Problem') {
1836
+ function dynamicSchemaNode(field = "Type_Of_Legal_Problem") {
1541
1837
  return {
1542
- $cmp: 'FormKitSchema',
1543
- if: '$get(' + field + ').value',
1838
+ $cmp: "FormKitSchema",
1839
+ if: "$get(" + field + ").value",
1544
1840
  props: {
1545
- schema: '$meta.dynamicSchema',
1546
- data: '$buildData($meta)'
1547
- }
1841
+ schema: "$meta.dynamicSchema",
1842
+ data: "$buildData($meta)",
1843
+ },
1548
1844
  }
1549
1845
  }
1550
1846
 
1551
1847
  const formAnchorDefaults = {
1552
- $el: 'div',
1848
+ $el: "div",
1553
1849
  children: [
1554
1850
  {
1555
- $el: 'div',
1851
+ $el: "div",
1556
1852
  attrs: {
1557
- id: 'form-anchor',
1558
- class: 't-absolute',
1559
- style: { top: '-30px', left: 0 }
1560
- }
1561
- }
1853
+ id: "form-anchor",
1854
+ class: "t-absolute",
1855
+ style: { top: "-30px", left: 0 },
1856
+ },
1857
+ },
1562
1858
  ],
1563
1859
  attrs: {
1564
- class: 't-relative'
1565
- }
1860
+ class: "t-relative",
1861
+ },
1566
1862
  };
1567
1863
 
1568
1864
  function formAnchor(updates) {
1569
- return merge(
1570
- formAnchorDefaults,
1571
- updates
1572
- )
1865
+ return merge(formAnchorDefaults, updates)
1573
1866
  }
1574
1867
 
1575
1868
  function headlineDefaults(updates = {}) {
1576
1869
  return {
1577
- $el: 'h1',
1870
+ $el: "h1",
1578
1871
  attrs: {
1579
- class: 't-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3' + ' ' + (updates.headlineClass || '')
1580
- }
1872
+ class:
1873
+ "t-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3" +
1874
+ " " +
1875
+ (updates.headlineClass || ""),
1876
+ },
1581
1877
  }
1582
1878
  }
1583
1879
 
1584
1880
  function headline(updates = {}) {
1585
- return merge(
1586
- headlineDefaults(updates),
1587
- updates
1588
- )
1881
+ return merge(headlineDefaults(updates), updates)
1589
1882
  }
1590
1883
 
1591
1884
  function subHeadlineDefaults(updates = {}) {
1592
1885
  return {
1593
- $el: 'h3',
1886
+ $el: "h3",
1594
1887
  attrs: {
1595
- class: 't-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10' + ' ' + (updates.subheadlineClass || '')
1596
- }
1888
+ class:
1889
+ "t-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10" +
1890
+ " " +
1891
+ (updates.subheadlineClass || ""),
1892
+ },
1597
1893
  }
1598
1894
  }
1599
1895
 
1600
1896
  function subHeadline(updates = {}) {
1601
- return merge(
1602
- subHeadlineDefaults(updates),
1603
- updates
1604
- )
1897
+ return merge(subHeadlineDefaults(updates), updates)
1605
1898
  }
1606
1899
 
1607
1900
  const hiddenInputsBase = [
1608
1901
  {
1609
- $formkit: 'hidden',
1902
+ $formkit: "hidden",
1610
1903
  name: "gclid",
1611
- value: null
1904
+ value: null,
1612
1905
  },
1613
1906
  {
1614
- $formkit: 'hidden',
1907
+ $formkit: "hidden",
1615
1908
  name: "campaignid",
1616
- value: null
1909
+ value: null,
1617
1910
  },
1618
1911
  {
1619
- $formkit: 'hidden',
1912
+ $formkit: "hidden",
1620
1913
  name: "s",
1621
- value: null
1622
- }
1914
+ value: null,
1915
+ },
1623
1916
  ];
1624
1917
 
1625
1918
  const hiddenInputsLegal = [
1626
1919
  {
1627
- $formkit: 'hidden',
1920
+ $formkit: "hidden",
1628
1921
  name: "vertical",
1629
- value: "Legal"
1922
+ value: "Legal",
1630
1923
  },
1631
1924
  {
1632
- $formkit: 'hidden',
1925
+ $formkit: "hidden",
1633
1926
  name: "TCPA_Language",
1634
- value: "$meta.tcpaLanguage"
1927
+ value: "$meta.tcpaLanguage",
1635
1928
  },
1636
- ...hiddenInputsBase
1929
+ ...hiddenInputsBase,
1637
1930
  ];
1638
1931
 
1639
1932
  const legalRedirectMapDefaults = {
1640
- '*': LegalRedirectUrl()
1933
+ "*": LegalRedirectUrl(),
1641
1934
  };
1642
1935
 
1643
-
1644
1936
  function legalRedirectMap(updates) {
1645
- return merge(
1646
- legalRedirectMapDefaults,
1647
- updates
1648
- )
1937
+ return merge(legalRedirectMapDefaults, updates)
1649
1938
  }
1650
1939
 
1651
1940
  const businessServicesOverrideMap = {
1652
- 'Business_Services_Display': {
1941
+ Business_Services_Display: {
1653
1942
  "Business Formation": {
1654
- 'Business_Services': 'Business Formation'
1943
+ Business_Services: "Business Formation",
1655
1944
  },
1656
- "Contracts": {
1657
- 'Business_Services': 'Contracts'
1945
+ Contracts: {
1946
+ Business_Services: "Contracts",
1658
1947
  },
1659
1948
  "Insurance and Liability": {
1660
- 'Business_Services': 'Insurance and Liability'
1949
+ Business_Services: "Insurance and Liability",
1661
1950
  },
1662
1951
  "Mergers and Acquisition": {
1663
- 'Business_Services': 'Mergers and Acquisition'
1952
+ Business_Services: "Mergers and Acquisition",
1664
1953
  },
1665
1954
  "Regulatory Compliance": {
1666
- 'Business_Services': 'Regulatory Compliance'
1955
+ Business_Services: "Regulatory Compliance",
1667
1956
  },
1668
1957
  "Employee Dispute": {
1669
- 'Business_Services': 'Employee Dispute'
1958
+ Business_Services: "Employee Dispute",
1670
1959
  },
1671
1960
  "Advice and Consulting": {
1672
- 'Business_Services': 'Other',
1961
+ Business_Services: "Other",
1962
+ },
1963
+ Other: {
1964
+ Business_Services: "Other",
1673
1965
  },
1674
- "Other": {
1675
- 'Business_Services': 'Other'
1676
- }
1677
1966
  },
1678
1967
  };
1679
1968
 
1680
1969
  const patentsAndIPTOLPDisplayOverrideMap = {
1681
- 'Copyrights': {
1682
- 'Type_Of_Legal_Problem': 'Copyrights and Trademarks'
1970
+ Copyrights: {
1971
+ Type_Of_Legal_Problem: "Copyrights and Trademarks",
1683
1972
  },
1684
- 'Trademarks': {
1685
- 'Type_Of_Legal_Problem': 'Copyrights and Trademarks'
1973
+ Trademarks: {
1974
+ Type_Of_Legal_Problem: "Copyrights and Trademarks",
1686
1975
  },
1687
- 'Patents': {
1688
- 'Type_Of_Legal_Problem': 'Patents and Intellectual Property'
1976
+ Patents: {
1977
+ Type_Of_Legal_Problem: "Patents and Intellectual Property",
1689
1978
  },
1690
- 'Business Lawyers': {
1691
- 'Type_Of_Legal_Problem': 'Business Lawyers'
1979
+ "Business Lawyers": {
1980
+ Type_Of_Legal_Problem: "Business Lawyers",
1692
1981
  },
1693
- 'Business Consulting': {
1694
- 'Type_Of_Legal_Problem': 'Business Lawyers'
1982
+ "Business Consulting": {
1983
+ Type_Of_Legal_Problem: "Business Lawyers",
1695
1984
  },
1696
- 'Not Sure or Other': {
1697
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
1985
+ "Not Sure or Other": {
1986
+ Type_Of_Legal_Problem: "Not Sure or Other",
1698
1987
  },
1699
1988
  };
1700
1989
 
1701
1990
  const legalAllValueOverrideMap = {
1702
- 'Civil_Defense': {
1703
- 'Yes': {
1704
- 'Type_Of_Legal_Problem': 'Defend a Lawsuit'
1991
+ Civil_Defense: {
1992
+ Yes: {
1993
+ Type_Of_Legal_Problem: "Defend a Lawsuit",
1994
+ },
1995
+ No: {
1996
+ Type_Of_Legal_Problem: "File a Lawsuit",
1705
1997
  },
1706
- 'No': {
1707
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
1708
- }
1709
1998
  },
1710
1999
  businessServicesOverrideMap,
1711
- 'Type_Of_Legal_Problem_Display': {
2000
+ Type_Of_Legal_Problem_Display: {
1712
2001
  ...patentsAndIPTOLPDisplayOverrideMap,
1713
2002
  // Accidents and PI
1714
- 'Auto Accident': {
1715
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
2003
+ "Auto Accident": {
2004
+ Type_Of_Legal_Problem: "Auto and Car Accidents",
1716
2005
  },
1717
- 'Dog Bite': {
1718
- 'Type_Of_Legal_Problem': 'Personal Injury'
2006
+ "Dog Bite": {
2007
+ Type_Of_Legal_Problem: "Personal Injury",
1719
2008
  },
1720
- 'Slip and Fall': {
1721
- 'Type_Of_Legal_Problem': 'Personal Injury'
2009
+ "Slip and Fall": {
2010
+ Type_Of_Legal_Problem: "Personal Injury",
1722
2011
  },
1723
- 'Workplace Injury': {
1724
- 'Type_Of_Legal_Problem': 'Workers Compensation'
2012
+ "Workplace Injury": {
2013
+ Type_Of_Legal_Problem: "Workers Compensation",
1725
2014
  },
1726
- 'Trucking Accident': {
1727
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
2015
+ "Trucking Accident": {
2016
+ Type_Of_Legal_Problem: "Auto and Car Accidents",
1728
2017
  },
1729
- 'Motorcycle Accident': {
1730
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents',
2018
+ "Motorcycle Accident": {
2019
+ Type_Of_Legal_Problem: "Auto and Car Accidents",
1731
2020
  },
1732
- 'Other Accidents or Injuries': {
1733
- 'Type_Of_Legal_Problem': 'Personal Injury'
2021
+ "Other Accidents or Injuries": {
2022
+ Type_Of_Legal_Problem: "Personal Injury",
1734
2023
  },
1735
2024
  // Civil
1736
- 'Automobile Accident': {
1737
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
2025
+ "Automobile Accident": {
2026
+ Type_Of_Legal_Problem: "Auto and Car Accidents",
1738
2027
  },
1739
- 'Contract Disputes': {
1740
- 'Type_Of_Legal_Problem': 'Business Lawyers'
2028
+ "Contract Disputes": {
2029
+ Type_Of_Legal_Problem: "Business Lawyers",
1741
2030
  },
1742
- 'Defamation and Slander': {
1743
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
2031
+ "Defamation and Slander": {
2032
+ Type_Of_Legal_Problem: "File a Lawsuit",
1744
2033
  },
1745
- 'Dog Bite': {
1746
- 'Type_Of_Legal_Problem': 'Personal Injury'
2034
+ "Dog Bite": {
2035
+ Type_Of_Legal_Problem: "Personal Injury",
1747
2036
  },
1748
- 'Employment and Workplace': {
1749
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
2037
+ "Employment and Workplace": {
2038
+ Type_Of_Legal_Problem: "Employment and Workplace",
1750
2039
  },
1751
- 'Fraud': {
1752
- 'Type_Of_Legal_Problem': 'Consumer Lawyers'
2040
+ Fraud: {
2041
+ Type_Of_Legal_Problem: "Consumer Lawyers",
1753
2042
  },
1754
- 'Medical Malpractice': {
1755
- 'Type_Of_Legal_Problem': 'Medical Malpractice'
2043
+ "Medical Malpractice": {
2044
+ Type_Of_Legal_Problem: "Medical Malpractice",
1756
2045
  },
1757
- 'Personal Injury': {
1758
- 'Type_Of_Legal_Problem': 'Personal Injury'
2046
+ "Personal Injury": {
2047
+ Type_Of_Legal_Problem: "Personal Injury",
1759
2048
  },
1760
- 'Property Damage': {
1761
- 'Type_Of_Legal_Problem': 'Property Damage'
2049
+ "Property Damage": {
2050
+ Type_Of_Legal_Problem: "Property Damage",
1762
2051
  },
1763
- 'Small Claims': {
1764
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
2052
+ "Small Claims": {
2053
+ Type_Of_Legal_Problem: "File a Lawsuit",
1765
2054
  },
1766
- 'Real Estate': {
1767
- 'Type_Of_Legal_Problem': 'Real Estate'
2055
+ "Real Estate": {
2056
+ Type_Of_Legal_Problem: "Real Estate",
1768
2057
  },
1769
- 'Other (describe on next page)': {
1770
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
2058
+ "Other (describe on next page)": {
2059
+ Type_Of_Legal_Problem: "Not Sure or Other",
1771
2060
  },
1772
2061
  // Contracts
1773
- 'Contract Creation': {
1774
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1775
- 'Business_Services': 'Contracts'
2062
+ "Contract Creation": {
2063
+ Type_Of_Legal_Problem: "Business Lawyers",
2064
+ Business_Services: "Contracts",
1776
2065
  },
1777
- 'Contract Enforcement': {
1778
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1779
- 'Business_Services': 'Contracts'
2066
+ "Contract Enforcement": {
2067
+ Type_Of_Legal_Problem: "Business Lawyers",
2068
+ Business_Services: "Contracts",
1780
2069
  },
1781
- 'Contract Cancellation': {
1782
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1783
- 'Business_Services': 'Contracts'
2070
+ "Contract Cancellation": {
2071
+ Type_Of_Legal_Problem: "Business Lawyers",
2072
+ Business_Services: "Contracts",
1784
2073
  },
1785
- 'Contract Fraud': {
1786
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1787
- 'Business_Services': 'Contracts'
2074
+ "Contract Fraud": {
2075
+ Type_Of_Legal_Problem: "Business Lawyers",
2076
+ Business_Services: "Contracts",
1788
2077
  },
1789
- 'Breach of Contract': {
1790
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1791
- 'Business_Services': 'Contracts'
2078
+ "Breach of Contract": {
2079
+ Type_Of_Legal_Problem: "Business Lawyers",
2080
+ Business_Services: "Contracts",
1792
2081
  },
1793
- 'Other Contract Issues': {
1794
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1795
- 'Business_Services': 'Contracts'
2082
+ "Other Contract Issues": {
2083
+ Type_Of_Legal_Problem: "Business Lawyers",
2084
+ Business_Services: "Contracts",
1796
2085
  },
1797
2086
  // Criminal
1798
- 'Criminal Defense': {
1799
- 'Type_Of_Legal_Problem': 'Criminal and Felony'
2087
+ "Criminal Defense": {
2088
+ Type_Of_Legal_Problem: "Criminal and Felony",
1800
2089
  },
1801
- 'Victim of a Crime': {
1802
- 'Type_Of_Legal_Problem': 'Victim of a Crime'
2090
+ "Victim of a Crime": {
2091
+ Type_Of_Legal_Problem: "Victim of a Crime",
1803
2092
  },
1804
- 'DUI and DWI': {
1805
- 'Type_Of_Legal_Problem': 'DUI and DWI'
2093
+ "DUI and DWI": {
2094
+ Type_Of_Legal_Problem: "DUI and DWI",
1806
2095
  },
1807
- 'Expungement': {
1808
- 'Type_Of_Legal_Problem': 'Expungement'
2096
+ Expungement: {
2097
+ Type_Of_Legal_Problem: "Expungement",
1809
2098
  },
1810
- 'Harassment': {
1811
- 'Type_Of_Legal_Problem': 'Criminal and Felony'
2099
+ Harassment: {
2100
+ Type_Of_Legal_Problem: "Criminal and Felony",
1812
2101
  },
1813
- 'Not Sure or Other': {
1814
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
2102
+ "Not Sure or Other": {
2103
+ Type_Of_Legal_Problem: "Not Sure or Other",
1815
2104
  },
1816
2105
  // Employment and Workplace
1817
- 'Workplace Harassment': {
1818
- 'Type_Of_Legal_Problem': 'Workplace Harassment'
2106
+ "Workplace Harassment": {
2107
+ Type_Of_Legal_Problem: "Workplace Harassment",
1819
2108
  },
1820
- 'Workplace Discrimination': {
1821
- 'Type_Of_Legal_Problem': 'Workplace Discrimination'
2109
+ "Workplace Discrimination": {
2110
+ Type_Of_Legal_Problem: "Workplace Discrimination",
1822
2111
  },
1823
- 'Wrongful Termination': {
1824
- 'Type_Of_Legal_Problem': 'Wrongful Termination'
2112
+ "Wrongful Termination": {
2113
+ Type_Of_Legal_Problem: "Wrongful Termination",
1825
2114
  },
1826
- 'Payment Disputes': {
1827
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
2115
+ "Payment Disputes": {
2116
+ Type_Of_Legal_Problem: "Employment and Workplace",
1828
2117
  },
1829
- 'Workers Compensation': {
1830
- 'Type_Of_Legal_Problem': 'Workers Compensation'
2118
+ "Workers Compensation": {
2119
+ Type_Of_Legal_Problem: "Workers Compensation",
1831
2120
  },
1832
- 'Unemployment': {
1833
- 'Type_Of_Legal_Problem': 'Unemployment'
2121
+ Unemployment: {
2122
+ Type_Of_Legal_Problem: "Unemployment",
1834
2123
  },
1835
- 'Other Workplace Issues': {
1836
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
2124
+ "Other Workplace Issues": {
2125
+ Type_Of_Legal_Problem: "Employment and Workplace",
1837
2126
  },
1838
2127
  // Malpractice
1839
- 'Attorney Malpractice': {
1840
- 'Type_Of_Legal_Problem': 'Civil Lawsuit'
2128
+ "Attorney Malpractice": {
2129
+ Type_Of_Legal_Problem: "Civil Lawsuit",
1841
2130
  },
1842
- 'Other Malpractice Issues': {
1843
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
2131
+ "Other Malpractice Issues": {
2132
+ Type_Of_Legal_Problem: "Not Sure or Other",
1844
2133
  },
1845
2134
  // Repossession
1846
- 'Vehicle Repossession': {
1847
- 'Type_Of_Legal_Problem': 'Bankruptcy'
2135
+ "Vehicle Repossession": {
2136
+ Type_Of_Legal_Problem: "Bankruptcy",
1848
2137
  },
1849
- 'Property Repossession': {
1850
- 'Type_Of_Legal_Problem': 'Bankruptcy'
2138
+ "Property Repossession": {
2139
+ Type_Of_Legal_Problem: "Bankruptcy",
1851
2140
  },
1852
- 'Other Repossession Issues': {
1853
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
2141
+ "Other Repossession Issues": {
2142
+ Type_Of_Legal_Problem: "Not Sure or Other",
1854
2143
  },
1855
2144
  // Real Estate
1856
- 'Contracts and Agreements': {
1857
- 'Type_Of_Legal_Problem': 'Real Estate'
2145
+ "Contracts and Agreements": {
2146
+ Type_Of_Legal_Problem: "Real Estate",
1858
2147
  },
1859
- 'Deeds, Liens, and Titles': {
1860
- 'Type_Of_Legal_Problem': 'Real Estate'
2148
+ "Deeds, Liens, and Titles": {
2149
+ Type_Of_Legal_Problem: "Real Estate",
1861
2150
  },
1862
- 'Foreclosure': {
1863
- 'Type_Of_Legal_Problem': 'Foreclosure'
2151
+ Foreclosure: {
2152
+ Type_Of_Legal_Problem: "Foreclosure",
1864
2153
  },
1865
- 'Insurance': {
1866
- 'Type_Of_Legal_Problem': 'Insurance'
2154
+ Insurance: {
2155
+ Type_Of_Legal_Problem: "Insurance",
1867
2156
  },
1868
- 'Landlord and Tenant': {
1869
- 'Type_Of_Legal_Problem': 'Landlord and Tenant',
2157
+ "Landlord and Tenant": {
2158
+ Type_Of_Legal_Problem: "Landlord and Tenant",
1870
2159
  },
1871
- 'Loans and Mortgages': {
1872
- 'Type_Of_Legal_Problem': 'Real Estate',
2160
+ "Loans and Mortgages": {
2161
+ Type_Of_Legal_Problem: "Real Estate",
1873
2162
  },
1874
- 'Wills, Trusts, and Estates': {
1875
- 'Type_Of_Legal_Problem': 'Wills and Trusts'
2163
+ "Wills, Trusts, and Estates": {
2164
+ Type_Of_Legal_Problem: "Wills and Trusts",
1876
2165
  },
1877
- 'Property Damage': {
1878
- 'Type_Of_Legal_Problem': 'Property Damage'
2166
+ "Property Damage": {
2167
+ Type_Of_Legal_Problem: "Property Damage",
1879
2168
  },
1880
- 'Other Real Estate Issues': {
1881
- 'Type_Of_Legal_Problem': 'Real Estate'
1882
- }
1883
- }
2169
+ "Other Real Estate Issues": {
2170
+ Type_Of_Legal_Problem: "Real Estate",
2171
+ },
2172
+ },
1884
2173
  };
1885
2174
 
1886
2175
  const TOLPCommentsPlaceholders = {
1887
- 'Adoption': 'Example: "I need help with adoption forms"',
1888
- 'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1889
- 'Auto and Car Accidents': 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1890
- 'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
1891
- 'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
1892
- 'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
1893
- 'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
1894
- 'Child Custody': 'Example: "Need help getting custody"',
1895
- 'Child Support': 'Example: "Issues with child support payments"',
1896
- 'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
1897
- 'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
1898
- 'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
1899
- 'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
1900
- 'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
1901
- 'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
1902
- 'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
1903
- 'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
1904
- 'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
1905
- 'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
1906
- 'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
1907
- 'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
1908
- 'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
1909
- 'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
1910
- 'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
1911
- 'Guardianship': 'Example: "I need help with guardianship documents"',
1912
- 'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
1913
- 'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
1914
- 'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
1915
- 'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
1916
- 'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
1917
- 'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
1918
- 'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
1919
- 'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
1920
- 'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
1921
- 'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
1922
- 'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
1923
- 'Long Term Disability': 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
1924
- 'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
1925
- 'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
1926
- 'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
1927
- 'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
1928
- 'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
1929
- 'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
1930
- 'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
1931
- 'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
1932
- 'Social Security Disability and Insurance': 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
1933
- 'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
1934
- 'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
1935
- 'Unemployment': 'Example: "I need help filing for unemployment benefits"',
1936
- 'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
1937
- 'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
1938
- 'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
1939
- 'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
1940
- 'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
1941
- 'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
2176
+ Adoption: 'Example: "I need help with adoption forms"',
2177
+ "Asbestos and Mesothelioma": 'Example: "I was exposed to asbestos at work and would like to file a claim"',
2178
+ "Auto and Car Accidents":
2179
+ 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
2180
+ Bankruptcy: 'Example: "I need help filing for bankruptcy"',
2181
+ "Birth Certificate and Name Change": 'Example: "Just married and would like to change my last name"',
2182
+ "Business Lawyers": 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
2183
+ "Child Custody and Support": 'Example: "Need help getting custody" or "Issues with child support payments"',
2184
+ "Child Custody": 'Example: "Need help getting custody"',
2185
+ "Child Support": 'Example: "Issues with child support payments"',
2186
+ "Civil Rights and Discrimination": 'Example: "Police brutality" or "Coworker keeps harassing me"',
2187
+ "Civil Lawsuit":
2188
+ 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
2189
+ "File a Lawsuit": 'Example: "A contractor took my money and never completed the job"',
2190
+ "Defend a Lawsuit": 'Example: "I am being sued by a neighbor"',
2191
+ "Consumer Lawyers":
2192
+ 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
2193
+ "Copyrights and Trademarks": 'Example: "I would like to register a trademark or copyright a name"',
2194
+ "Criminal and Felony":
2195
+ 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
2196
+ "Debt and Collections": 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
2197
+ "Divorce and Separation": 'Example: "I would like to file for an uncontested divorce"',
2198
+ "DUI and DWI": 'Example: "I was arrested for DUI and need legal defense"',
2199
+ "Elder Law": 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
2200
+ "Employment and Workplace": 'Example: "I was injured while on the job" or "My company is discriminating against me"',
2201
+ Expungement: 'Example: "I would like to file for an expungement and clear my record"',
2202
+ "Family Issues": 'Example: "I need help with guardianship" or "I need a simple will created"',
2203
+ Foreclosure: 'Example: "I need help to avoid foreclosure on my house"',
2204
+ Guardianship: 'Example: "I need help with guardianship documents"',
2205
+ "Harassment and Discrimination": 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
2206
+ "Sexual Harassment": 'Example: "I am being sexually harassed by a coworker"',
2207
+ "Workplace Harassment": 'Example: "My coworker is being aggressive towards me"',
2208
+ "Non-Workplace Harassment": 'Example: "My neighbor is harassing me"',
2209
+ "Workplace Discrimination": 'Example: "I am being discriminated at work based on my age"',
2210
+ "Non-Workplace Discrimination": 'Example: "I am being discriminated against by a local official"',
2211
+ "Identity Theft": 'Example: "Someone stole my identity and I need help fixing the issue"',
2212
+ "Immigration and Visas": 'Example: "I need help filing for a visa" or "Help with a green card"',
2213
+ Insurance: 'Example: "I need help filing an insurance claim for damage to my house"',
2214
+ "Landlord and Tenant":
2215
+ 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
2216
+ "Lemon Law": 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
2217
+ "Long Term Disability":
2218
+ 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
2219
+ "Medical Malpractice": 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
2220
+ "Patents and Intellectual Property": 'Example: "I would like to file for a patent" or "I need to copyright a name"',
2221
+ "Personal Injury": 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
2222
+ "Power of Attorney": 'Example: "I need help with a limited or general power of attorney"',
2223
+ "Probate and Estates":
2224
+ 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
2225
+ "Product Liability": 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
2226
+ "Property Damage": 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
2227
+ "Real Estate":
2228
+ 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
2229
+ "Social Security Disability and Insurance":
2230
+ 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
2231
+ "Tax and IRS": 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
2232
+ "Traffic and Tickets":
2233
+ 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
2234
+ Unemployment: 'Example: "I need help filing for unemployment benefits"',
2235
+ "Victim of a Crime": 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
2236
+ "Wills and Trusts": 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
2237
+ "Workers Compensation": 'Example: "I was injured at work and would like to file for workers compensation benefits"',
2238
+ "Wrongful Death": 'Example: "A family member was killed on the job and we need legal representation"',
2239
+ "Wrongful Termination": 'Example: "I was fired by my employer without cause"',
2240
+ "Not Sure or Other": 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"',
1942
2241
  };
1943
2242
 
1944
2243
  const TOLPFinalHeadlines = {
@@ -1946,49 +2245,64 @@ const TOLPFinalHeadlines = {
1946
2245
  };
1947
2246
 
1948
2247
  const TOLPFinalSubHeadlines = {
1949
- 'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
2248
+ Adoption: "You may benefit from speaking with an adoption professional. Please verify your contact information.",
1950
2249
  // 'Asbestos and Mesothelioma': '',
1951
- 'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
1952
- 'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
2250
+ "Auto and Car Accidents":
2251
+ "You may benefit from speaking with an accident professional. Please verify your contact information.",
2252
+ Bankruptcy: "You may benefit from speaking with a bankruptcy professional. Please verify your contact information.",
1953
2253
  // 'Birth Certificate and Name Change': '',
1954
2254
  // 'Business Lawyers': '',
1955
2255
  // 'Child Custody and Support': '',
1956
2256
  // 'Civil Rights and Discrimination': '',
1957
2257
  // 'Civil Lawsuit': '',
1958
2258
  // 'Consumer Lawyers': '',
1959
- 'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
2259
+ "Copyrights and Trademarks":
2260
+ "You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.",
1960
2261
  // 'Criminal and Felony': '',
1961
2262
  // 'Debt and Collections': '',
1962
- 'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
1963
- 'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
1964
- 'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
2263
+ "Divorce and Separation":
2264
+ "You may benefit from speaking with a divorce professional. Please verify your contact information.",
2265
+ "DUI and DWI": "You may benefit from speaking with a DUI professional. Please verify your contact information.",
2266
+ "Elder Law": "You may benefit from speaking with an elder law professional. Please verify your contact information.",
1965
2267
  // 'Employment and Workplace': '',
1966
2268
  // 'Expungement': '',
1967
2269
  // 'Family Issues': '',
1968
- 'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
1969
- 'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
2270
+ Foreclosure: "You may benefit from speaking with a foreclosure professional. Please verify your contact information.",
2271
+ Guardianship:
2272
+ "You may benefit from speaking with a guardianship professional. Please verify your contact information.",
1970
2273
  // 'Harassment and Discrimination': '',
1971
2274
  // 'Identity Theft': '',
1972
- 'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
2275
+ "Immigration and Visas":
2276
+ "You may benefit from speaking with a immigration professional. Please verify your contact information.",
1973
2277
  // 'Insurance': '',
1974
- 'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
2278
+ "Landlord and Tenant":
2279
+ "You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.",
1975
2280
  // 'Lemon Law': '',
1976
- 'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
1977
- 'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
1978
- 'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
1979
- 'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
2281
+ "Long Term Disability":
2282
+ "You may benefit from speaking with a disability legal professional. Please verify your contact information.",
2283
+ "Medical Malpractice":
2284
+ "You may benefit from speaking with a malpractice professional. Please verify your contact information.",
2285
+ "Patents and Intellectual Property":
2286
+ "You may benefit from speaking with a patent professional. Please verify your contact information.",
2287
+ "Personal Injury":
2288
+ "You may benefit from speaking with a personal injury professional. Please verify your contact information.",
1980
2289
  // 'Power of Attorney': '',
1981
- 'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
2290
+ "Probate and Estates":
2291
+ "You may benefit from speaking with a probate and estate professional. Please verify your contact information.",
1982
2292
  // 'Product Liability': '',
1983
2293
  // 'Property Damage': '',
1984
- 'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
1985
- 'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
1986
- 'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
2294
+ "Real Estate":
2295
+ "You may benefit from speaking with a real estate professional. Please verify your contact information.",
2296
+ "Social Security Disability and Insurance":
2297
+ "You may benefit from speaking with an SSDI professional. Please verify your contact information.",
2298
+ "Tax and IRS": "You may benefit from speaking with a tax professional. Please verify your contact information.",
1987
2299
  // 'Traffic and Tickets': '',
1988
- 'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
2300
+ Unemployment:
2301
+ "You may benefit from speaking with an unemployment professional. Please verify your contact information.",
1989
2302
  // 'Victim of a Crime': '',
1990
2303
  // 'Wills and Trusts': '',
1991
- 'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
2304
+ "Workers Compensation":
2305
+ "You may benefit from speaking with a workers compensation professional. Please verify your contact information.",
1992
2306
  // 'Wrongful Death': '',
1993
2307
  // 'Wrongful Termination': '',
1994
2308
  // 'Not Sure or Other': ''
@@ -2001,37 +2315,31 @@ const TOLPFinalSubHeadlines = {
2001
2315
 
2002
2316
  const nextStepsMapLegalLegacy = {
2003
2317
  values: {
2004
- '*': [
2005
- 'TOLPQuestions',
2006
- 'commentsWithBankruptcy',
2007
- 'legalCrossSells',
2008
- 'firstAndLast',
2009
- 'contactInfo',
2010
- ]
2011
- }
2318
+ "*": ["TOLPQuestions", "commentsWithBankruptcy", "legalCrossSells", "firstAndLast", "contactInfo"],
2319
+ },
2012
2320
  };
2013
2321
 
2014
2322
  const nextStepsMapLegalCrossSells = {
2015
2323
  values: {
2016
- 'Legal_CrossSells': {
2017
- 'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
2018
- 'Personal Injury': ['personalInjuryCrossSellQuestions'],
2019
- 'Workers Compensation': ['workersCompensationCrossSellQuestions'],
2020
- 'DUI and DWI': ['duiAndDWICrossSellQuestions'],
2021
- 'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
2022
- 'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
2023
- 'Bankruptcy': ['bankruptcyCrossSellQuestions'],
2024
- 'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
2025
- 'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
2026
- 'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
2027
- 'Child Custody': ['childCustodyCrossSellQuestions'],
2028
- },
2029
- '*': ['firstAndLast', 'contactInfo'],
2324
+ Legal_CrossSells: {
2325
+ "Auto and Car Accidents": ["autoAndCarAccidentCrossSellQuestions"],
2326
+ "Personal Injury": ["personalInjuryCrossSellQuestions"],
2327
+ "Workers Compensation": ["workersCompensationCrossSellQuestions"],
2328
+ "DUI and DWI": ["duiAndDWICrossSellQuestions"],
2329
+ "Long Term Disability": ["longTermDisabilityCrossSellQuestions"],
2330
+ "Social Security Disability and Insurance": ["ssdiCrossSellQuestions"],
2331
+ Bankruptcy: ["bankruptcyCrossSellQuestions"],
2332
+ "Power of Attorney": ["powerOfAttorneyCrossSellQuestions"],
2333
+ "Wills and Trusts": ["willsAndTrustsCrossSellQuestions"],
2334
+ "Divorce and Separation": ["divorceAndSeparationCrossSellQuestions"],
2335
+ "Child Custody": ["childCustodyCrossSellQuestions"],
2336
+ },
2337
+ "*": ["firstAndLast", "contactInfo"],
2030
2338
  },
2031
-
2339
+
2032
2340
  // NOTE: this assumes a certain placement of the cross sell question
2033
2341
  // in the form flow.
2034
- appendSteps: ['firstAndLast', 'contactInfo'],
2342
+ appendSteps: ["firstAndLast", "contactInfo"],
2035
2343
  matchesAllowed: 1,
2036
2344
  };
2037
2345