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,583 +311,846 @@ 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 ownRealEstate = (scope, vertical, updates = {}) => {
824
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
825
+ const label = vertical ? updates.label : "Do You Own Real Estate?";
826
+ return func(
827
+ merge(
828
+ {
829
+ name: scope ? scope + ":" + "Own_Real_Estate" : "Own_Real_Estate",
830
+ label,
831
+ },
832
+ updates
833
+ )
834
+ )
835
+ };
564
836
 
565
- const ownRealEstate = () => sbsYesNoRadio({
566
- name: 'Own_Real_Estate',
567
- label: 'Do You Own Real Estate?'
568
- });
837
+ // XXX HERE
569
838
 
570
- const pendingCharges = (scope) => sbsYesNoRadio({
571
- name: scope ? scope + ':' + 'Pending_Charges' : 'Pending_Charges',
572
- label: 'Do you currently have any pending charges?'
573
- });
839
+ const pendingCharges = (scope, vertical, updates = {}) => {
840
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
841
+ const label = vertical ? updates.label : "Do you currently have any pending charges?";
842
+ return func(
843
+ merge(
844
+ {
845
+ name: scope ? scope + ":" + "Pending_Charges" : "Pending_Charges",
846
+ label,
847
+ },
848
+ updates
849
+ )
850
+ )
851
+ };
574
852
 
575
- const primaryInjury = (scope) => sbs2ColRadio({
576
- name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
577
- label: 'Primary Injury:',
578
- options: [
579
- "Anxiety",
580
- "Back or Neck Pain",
581
- "Broken Bones",
582
- "Cuts and Bruises",
583
- "Headaches",
584
- "Memory Loss",
585
- "Loss of Limb",
586
- "Not Sure or Other"
587
- ]
588
- });
853
+ const primaryInjury = (scope, vertical, updates = {}) => {
854
+ const func = vertical ? col2RadioCenter : sbs2ColRadio;
855
+ const label = vertical ? updates.label : "Primary Injury:";
856
+ return func(
857
+ merge(
858
+ {
859
+ label,
860
+ name: scope ? scope + ":" + "Primary_Injury" : "Primary_Injury",
861
+ options: [
862
+ "Anxiety",
863
+ "Back or Neck Pain",
864
+ "Broken Bones",
865
+ "Cuts and Bruises",
866
+ "Headaches",
867
+ "Memory Loss",
868
+ "Loss of Limb",
869
+ "Not Sure or Other",
870
+ ],
871
+ },
872
+ updates
873
+ )
874
+ )
875
+ };
589
876
 
590
- const priorAlcoholOffenses = (scope) => sbsYesNoRadio({
591
- name: scope ? scope + ':' + 'Prior_Alcohol_Offenses' : 'Prior_Alcohol_Offenses',
592
- label: 'Any Prior Alcohol Related Offenses?'
593
- });
877
+ const priorAlcoholOffenses = (scope, vertical, updates = {}) => {
878
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
879
+ const label = vertical ? updates.label : "Any Prior Alcohol Related Offenses?";
880
+ return func(
881
+ merge(
882
+ {
883
+ name: scope ? scope + ":" + "Prior_Alcohol_Offenses" : "Prior_Alcohol_Offenses",
884
+ label,
885
+ },
886
+ updates
887
+ )
888
+ )
889
+ };
594
890
 
595
- const policeReportFiled = (scope) => sbsYesNoRadio({
596
- name: scope ? scope + ':' + 'Police_Report_Filed' : 'Police_Report_Filed',
597
- label: 'Was a Police Report Filed?'
598
- });
891
+ const policeReportFiled = (scope, vertical, updates = {}) => {
892
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
893
+ const label = vertical ? updates.label : "Was a Police Report Filed?";
894
+ return func(
895
+ merge(
896
+ {
897
+ name: scope ? scope + ":" + "Police_Report_Filed" : "Police_Report_Filed",
898
+ label,
899
+ },
900
+ updates
901
+ )
902
+ )
903
+ };
599
904
 
600
- const repossessionTOLPDisplay = (updates) => col2Radio(merge({
601
- name: 'Type_Of_Legal_Problem_Display',
602
- label: 'Select The Repossession Issue:',
603
- options: [
604
- 'Vehicle Repossession',
605
- 'Property Repossession',
606
- 'Other Repossession Issues'
607
- ]
608
- }, updates));
609
-
610
- const roleInMatterProbate = (scope) => sbsSelect({
611
- name: scope ? scope + ':' + 'Role_In_Matter_Probate' : 'Role_In_Matter_Probate',
612
- label: "What Is Your Role in this Matter?",
613
- options: [
614
- "Preparing My Will",
615
- "Executor",
616
- "Heir",
617
- "Other"
618
- ]
619
- });
905
+ const repossessionTOLPDisplay = (scope, vertical, updates = {}) => {
906
+ const func = vertical ? col2RadioCenter : col2Radio;
907
+ const label = vertical ? updates.label : "Select The Repossession Issue:";
908
+ return func(
909
+ merge(
910
+ {
911
+ label,
912
+ name: scope ? scope + ":" + "Type_Of_Legal_Problem_Display" : "Type_Of_Legal_Problem_Display",
913
+ options: ["Vehicle Repossession", "Property Repossession", "Other Repossession Issues"],
914
+ },
915
+ updates
916
+ )
917
+ )
918
+ };
620
919
 
621
- const socialSecurityDisabilityReceivingBenefits = (scope) => sbsYesNoRadio({
622
- name: scope ? scope + ':' + 'Social_Security_Disability_Receiving_Benefits' : 'Social_Security_Disability_Receiving_Benefits',
623
- label: 'Are You Currently Receiving Social Security Disability Benefits?'
624
- });
920
+ const roleInMatterProbate = (scope, vertical, updates = {}) => {
921
+ const func = vertical ? col2RadioCenter : sbsSelect;
922
+ const label = vertical ? updates.label : "What is Your Role in this Matter?";
923
+ return func(
924
+ merge(
925
+ {
926
+ label,
927
+ name: scope ? scope + ":" + "Role_In_Matter_Probate" : "Role_In_Matter_Probate",
928
+ options: ["Preparing My Will", "Executor", "Heir", "Other"],
929
+ },
930
+ updates
931
+ )
932
+ )
933
+ };
625
934
 
626
- const totalDebt = () => sbsSelect({
627
- label: 'Total Debt?',
628
- name: 'Total_Debt',
629
- options: [
630
- "Less than 5K",
631
- "5K to 10K",
632
- "10K to 20K",
633
- "20K to 50K",
634
- "More than 50K"
635
- ]
636
- });
935
+ const socialSecurityDisabilityReceivingBenefits = (scope, vertical, updates = {}) => {
936
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
937
+ const label = vertical ? updates.label : "Are You Currently Receiving Social Security Disability Benefits?";
938
+ return func(
939
+ merge(
940
+ {
941
+ name: scope
942
+ ? scope + ":" + "Social_Security_Disability_Receiving_Benefits"
943
+ : "Social_Security_Disability_Receiving_Benefits",
944
+ label,
945
+ },
946
+ updates
947
+ )
948
+ )
949
+ };
637
950
 
951
+ const totalDebt = (scope, vertical, updates = {}) => {
952
+ const func = vertical ? col2RadioCenter : sbsSelect;
953
+ const label = vertical ? updates.label : "Total Debt?";
954
+ return func(
955
+ merge(
956
+ {
957
+ label,
958
+ name: scope ? scope + ":" + "Total_Debt" : "Total_Debt",
959
+ options: ["Less than 5K", "5K to 10K", "10K to 20K", "20K to 50K", "More than 50K"],
960
+ },
961
+ updates
962
+ )
963
+ )
964
+ };
638
965
 
639
- const totalMonthlyIncome = () => sbsSelect({
640
- label: 'Total Monthly Income?',
641
- name: 'Total_Monthly_Income',
642
- options: [
643
- "Less than 1K",
644
- "1K to 2K",
645
- "2K to 3K",
646
- "3K to 4K",
647
- "4K to 5K",
648
- "5K to 7K",
649
- "7K to 10K",
650
- "10K to 15K",
651
- "More than 15K"
652
- ]
653
- });
966
+ const totalMonthlyIncome = (scope, vertical, updates = {}) => {
967
+ const func = vertical ? verticalSelect : sbsSelect;
968
+ const label = vertical ? updates.label : "Total Monthly Income?";
969
+ return func(
970
+ merge(
971
+ {
972
+ label,
973
+ name: scope ? scope + ":" + "Total_Monthly_Income" : "Total_Monthly_Income",
974
+ options: [
975
+ "Less than 1K",
976
+ "1K to 2K",
977
+ "2K to 3K",
978
+ "3K to 4K",
979
+ "4K to 5K",
980
+ "5K to 7K",
981
+ "7K to 10K",
982
+ "10K to 15K",
983
+ "More than 15K",
984
+ ],
985
+ },
986
+ updates
987
+ )
988
+ )
989
+ };
654
990
 
655
991
  const TCPAConsent = (scope) => ({
656
- $formkit: 'checkbox',
657
- label: '$meta.tcpaLanguage',
658
- name: scope ? scope + ':' + 'TCPA_Opt_In' : 'TCPA_Opt_In',
659
- 'data-tf-sensitive': 'false',
660
- validation: 'required|accepted',
992
+ $formkit: "checkbox",
993
+ label: "$meta.tcpaLanguage",
994
+ // Necessary to get links to work in the tcpa language
995
+ __raw__sectionsSchema: {
996
+ label: { attrs: { innerHTML: "$label" } },
997
+ },
998
+ name: scope ? scope + ":" + "TCPA_Opt_In" : "TCPA_Opt_In",
999
+ "data-tf-sensitive": "false",
1000
+ validation: "required|accepted",
661
1001
  validationMessages: {
662
- required: 'Consent is required',
663
- accepted: 'Consent is required'
1002
+ required: "Consent is required",
1003
+ accepted: "Consent is required",
664
1004
  },
665
1005
  classes: {
666
- label: "t-text-xs t-text-slate-500 t-font-normal"
667
- }
1006
+ label: "t-text-xs t-text-slate-500 t-font-normal",
1007
+ },
668
1008
  });
669
1009
 
670
- const typeOfAlcoholTest = (scope) => sbsSelect({
671
- name: scope ? scope + ':' + 'Type_Of_Alcohol_Test' : 'Type_Of_Alcohol_Test',
672
- label: 'Type of Alcohol Test Performed?',
673
- options: [
674
- "No Test",
675
- "Refused Test",
676
- "Breath Test",
677
- "Blood Test",
678
- "Urine Test",
679
- "Don't Know"
680
- ]
681
- });
1010
+ const typeOfAlcoholTest = (scope, vertical, updates = {}) => {
1011
+ const func = vertical ? col2RadioCenter : sbsSelect;
1012
+ const label = vertical ? updates.label : "Type of Alcohol Test Performed?";
1013
+ return func(
1014
+ merge(
1015
+ {
1016
+ label,
1017
+ name: scope ? scope + ":" + "Type_Of_Alcohol_Test" : "Type_Of_Alcohol_Test",
1018
+ options: ["No Test", "Refused Test", "Breath Test", "Blood Test", "Urine Test", "Don't Know"],
1019
+ },
1020
+ updates
1021
+ )
1022
+ )
1023
+ };
682
1024
 
683
- const typeOfAssets = (scope) => col2Checkbox({
684
- name: scope ? scope + ':' + 'Type_Of_Assets' : 'Type_Of_Assets',
685
- label: 'Type of Assets:',
686
- options: [
687
- "Business Interests",
688
- "Cash",
689
- "Life Insurance Policies",
690
- "Pensions/Retirement",
691
- "Personal Possessions",
692
- "Property",
693
- "Stock/Bonds"
694
- ]
695
- });
1025
+ const typeOfAssets = (scope, vertical, updates = {}) => {
1026
+ const func = vertical ? verticalCol2Checkbox : col2Checkbox;
1027
+ const label = vertical ? updates.label : "Type of Assets:";
1028
+ return func(
1029
+ merge(
1030
+ {
1031
+ label,
1032
+ name: scope ? scope + ":" + "Type_Of_Assets" : "Type_Of_Assets",
1033
+ options: [
1034
+ "Business Interests",
1035
+ "Cash",
1036
+ "Life Insurance Policies",
1037
+ "Pensions/Retirement",
1038
+ "Personal Possessions",
1039
+ "Property",
1040
+ "Stock/Bonds",
1041
+ ],
1042
+ },
1043
+ updates
1044
+ )
1045
+ )
1046
+ };
696
1047
 
697
- const valueOfAssets = (scope) => sbsSelect({
698
- name: scope ? scope + ':' + 'Value_Of_Assets' : 'Value_Of_Assets',
699
- label: 'Value of Your Assets?',
700
- options: [
701
- "Less than 50K",
702
- "50K to 100K",
703
- "100K to 250K",
704
- "250K to 500K",
705
- "500K to 1M",
706
- "More than 1M"
707
- ]
708
- });
1048
+ const valueOfAssets = (scope, vertical, updates = {}) => {
1049
+ const func = vertical ? col2RadioCenter : sbsSelect;
1050
+ const label = vertical ? updates.label : "Value of Your Assets?";
1051
+ return func(
1052
+ merge(
1053
+ {
1054
+ label,
1055
+ name: scope ? scope + ":" + "Value_Of_Assets" : "Value_Of_Assets",
1056
+ options: ["Less than 50K", "50K to 100K", "100K to 250K", "250K to 500K", "500K to 1M", "More than 1M"],
1057
+ },
1058
+ updates
1059
+ )
1060
+ )
1061
+ };
709
1062
 
710
- // ------ Question Groups
1063
+ // ------ Question Groups - TODO: move these go separate file groups.js
711
1064
 
712
1065
  // NOTE: name must be unique within a form!
713
1066
  const group = (name, updates) => {
714
- return merge({
715
- $cmp: 'FormKit',
716
- props: {
717
- type: 'group',
718
- key: name,
719
- id: name,
720
- name: name
721
- }
722
- }, updates)
1067
+ return merge(
1068
+ {
1069
+ $cmp: "FormKit",
1070
+ props: {
1071
+ type: "group",
1072
+ key: name,
1073
+ id: name,
1074
+ name: name,
1075
+ },
1076
+ },
1077
+ updates
1078
+ )
723
1079
  };
724
1080
 
725
- const AutoAndCarAccidentsQuestions = (condition, scope) => group(
726
- 'AutoAndCarAccidentsQuestions',
727
- {
728
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"'),
1081
+ const AutoAndCarAccidentsQuestions = (condition, scope) =>
1082
+ group("AutoAndCarAccidentsQuestions", {
1083
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"',
729
1084
  children: [
730
1085
  haveAttorney(scope),
731
1086
  incidentDate(scope),
732
1087
  atFault(scope),
733
1088
  primaryInjury(scope),
734
1089
  doctorTreatment(scope),
735
- policeReportFiled(scope)
736
- ]
737
- }
738
- );
1090
+ policeReportFiled(scope),
1091
+ ],
1092
+ });
739
1093
 
740
- const BankruptcyQuestions = (condition, scope) => group(
741
- 'BankruptcyQuestions',
742
- {
743
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Bankruptcy"'),
1094
+ const BankruptcyQuestions = (condition, scope) =>
1095
+ group("BankruptcyQuestions", {
1096
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Bankruptcy"',
744
1097
  children: [
745
1098
  haveAttorney(scope),
746
- totalMonthlyIncome(),
747
- totalDebt(),
748
- ownRealEstate(),
1099
+ totalMonthlyIncome(scope),
1100
+ totalDebt(scope),
1101
+ ownRealEstate(scope),
749
1102
  valueOfAssets(scope),
750
- degreeOfInterestHelp(scope)
751
- ]
752
- }
753
- );
1103
+ degreeOfInterestHelp(scope),
1104
+ ],
1105
+ });
754
1106
 
755
- const ChildCustodyQuestions = (condition, scope) => group(
756
- 'ChildCustodyQuestions',
757
- {
758
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"'),
1107
+ const ChildCustodyQuestions = (condition, scope) =>
1108
+ group("ChildCustodyQuestions", {
1109
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"',
759
1110
  children: [
760
1111
  haveAttorney(scope),
761
1112
  childRelationship(scope),
762
1113
  childHome(scope),
763
1114
  childPrimaryCaregiver(scope),
764
1115
  degreeOfInterest(scope),
765
- lawyerPaymentMethod(scope)
766
- ]
767
- }
768
- );
1116
+ lawyerPaymentMethod(scope),
1117
+ ],
1118
+ });
769
1119
 
770
- const CivilLawsuitQuestions = () => group(
771
- 'CivilLawsuitQuestions',
772
- {
773
- if: '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit"',
774
- children: [
775
- haveAttorney(),
776
- lawsuitOtherParty(),
777
- degreeOfInterestHelp()
778
- ]
779
- }
780
- );
1120
+ const CivilLawsuitQuestions = (condition, scope) =>
1121
+ group("CivilLawsuitQuestions", {
1122
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit"',
1123
+ children: [haveAttorney(scope), lawsuitOtherParty(scope), degreeOfInterestHelp(scope)],
1124
+ });
781
1125
 
782
- const DebtAndCollectionsQuestions = () => group(
783
- 'DebtAndCollectionsQuestions',
784
- {
785
- if: '$get(Type_Of_Legal_Problem).value == "Debt and Collections"',
1126
+ const DebtAndCollectionsQuestions = (condition, scope) =>
1127
+ group("DebtAndCollectionsQuestions", {
1128
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Debt and Collections"',
786
1129
  children: [
787
- haveAttorney(),
788
- totalMonthlyIncome(),
789
- totalDebt(),
790
- ownRealEstate(),
791
- valueOfAssets(),
792
- degreeOfInterestHelp()
793
- ]
794
- }
795
- );
1130
+ haveAttorney(scope),
1131
+ totalMonthlyIncome(scope),
1132
+ totalDebt(scope),
1133
+ ownRealEstate(scope),
1134
+ valueOfAssets(scope),
1135
+ degreeOfInterestHelp(scope),
1136
+ ],
1137
+ });
796
1138
 
797
- const DivorceQuestions = (condition, scope) => group(
798
- 'DivorceQuestions',
799
- {
800
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"'),
1139
+ const DivorceQuestions = (condition, scope) =>
1140
+ group("DivorceQuestions", {
1141
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"',
801
1142
  children: [
802
1143
  haveAttorney(scope),
803
1144
  maritalStatus(scope),
804
1145
  haveChildren(scope),
805
1146
  degreeOfInterest(scope),
806
- lawyerPaymentMethod(scope)
807
- ]
808
- }
809
- );
1147
+ lawyerPaymentMethod(scope),
1148
+ ],
1149
+ });
810
1150
 
811
- const DUIAndDWIQuestions = (condition, scope) => group(
812
- 'DUIAndDWIQuestions',
813
- {
814
- if: (condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"'),
1151
+ const DUIAndDWIQuestions = (condition, scope) =>
1152
+ group("DUIAndDWIQuestions", {
1153
+ if: condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"',
815
1154
  children: [
816
1155
  haveAttorney(scope),
817
1156
  incidentDate(scope),
@@ -819,104 +1158,87 @@ const DUIAndDWIQuestions = (condition, scope) => group(
819
1158
  typeOfAlcoholTest(scope),
820
1159
  bloodContentAlcoholTest(scope),
821
1160
  pendingCharges(scope),
822
- degreeOfInterestHelp(scope)
823
- ]
824
- }
825
- );
1161
+ degreeOfInterestHelp(scope),
1162
+ ],
1163
+ });
826
1164
 
827
- const PersonalInjuryQuestions = (condition, scope) => group(
828
- 'PersonalInjuryQuestions',
829
- {
830
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"'),
1165
+ const PersonalInjuryQuestions = (condition, scope) =>
1166
+ group("PersonalInjuryQuestions", {
1167
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"',
831
1168
  children: [
832
1169
  haveAttorney(scope),
833
1170
  incidentDate(scope),
834
1171
  claimStatus(scope),
835
1172
  atFault(scope),
836
1173
  primaryInjury(scope),
837
- doctorTreatment(scope)
838
- ]
839
- }
840
- );
1174
+ doctorTreatment(scope),
1175
+ ],
1176
+ });
841
1177
 
842
- const PowerofAttorneyQuestions = (condition, scope) => group(
843
- 'PowerofAttorneyQuestions',
844
- {
845
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"'),
846
- children: [
847
- haveAttorney(scope),
848
- degreeOfInterestHelp(scope)
849
- ]
850
- }
851
- );
1178
+ const PowerofAttorneyQuestions = (condition, scope) =>
1179
+ group("PowerofAttorneyQuestions", {
1180
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"',
1181
+ children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1182
+ });
852
1183
 
853
- const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) => group(
854
- 'SocialSecurityDisabilityAndInsuranceQuestions',
855
- {
856
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"'),
1184
+ const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) =>
1185
+ group("SocialSecurityDisabilityAndInsuranceQuestions", {
1186
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"',
857
1187
  children: [
858
1188
  haveAttorney(scope),
859
1189
  applicantAge(scope),
860
1190
  disabilityConditionStopWork(scope),
861
1191
  disabilityWorkHistory(scope),
862
1192
  socialSecurityDisabilityReceivingBenefits(scope),
863
- doctorTreatment(scope)
864
- ]
865
- }
866
- );
1193
+ doctorTreatment(scope),
1194
+ ],
1195
+ });
867
1196
 
868
- const WillsAndTrustsQuestions = (condition, scope) => group(
869
- 'WillsAndTrustsQuestions',
870
- {
871
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"'),
1197
+ const WillsAndTrustsQuestions = (condition, scope) =>
1198
+ group("WillsAndTrustsQuestions", {
1199
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"',
872
1200
  children: [
873
1201
  haveAttorney(scope),
874
1202
  valueOfAssets(scope),
875
1203
  typeOfAssets(scope),
876
1204
  roleInMatterProbate(scope),
877
1205
  estateLegalServicesNeeded(scope),
878
- degreeOfInterestHelp(scope)
879
- ]
880
- }
881
- );
1206
+ degreeOfInterestHelp(scope),
1207
+ ],
1208
+ });
882
1209
 
883
- const WorkersCompensationQuestions = (condition, scope) => group(
884
- 'WorkersCompensationQuestions',
885
- {
886
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Workers Compensation"'),
1210
+ const WorkersCompensationQuestions = (condition, scope) =>
1211
+ group("WorkersCompensationQuestions", {
1212
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Workers Compensation"',
887
1213
  children: [
888
1214
  haveAttorney(scope),
889
1215
  incidentDate(scope),
890
1216
  claimStatus(scope),
891
1217
  primaryInjury(scope),
892
1218
  causeOfInjury(scope),
893
- doctorTreatment(scope)
894
- ]
895
- }
896
- );
1219
+ doctorTreatment(scope),
1220
+ ],
1221
+ });
897
1222
 
898
- const NotSureOrOtherQuestions = () => group(
899
- 'NotSureOrOtherQuestions',
900
- {
901
- if: '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
902
- children: [
903
- haveAttorney(),
904
- degreeOfInterestHelp()
905
- ]
906
- }
907
- );
1223
+ const NotSureOrOtherQuestions = (condition, scope) =>
1224
+ group("NotSureOrOtherQuestions", {
1225
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
1226
+ children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1227
+ });
908
1228
 
909
- const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
910
- const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
1229
+ const NEXT_ON_ENTER = "$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
1230
+ const NEXT_ON_INPUT = "$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
911
1231
 
912
- const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
1232
+ const isInput = (n) => {
1233
+ return n.type !== "group" && n.type !== "section" && n.type !== "form" && n.$formkit !== "hidden" && !n.children
1234
+ };
913
1235
 
914
1236
  const findLastInput = (n) => {
915
1237
  if (isInput(n)) {
916
1238
  return n
917
1239
  }
918
1240
  for (var i = n.children.length - 1; i >= 0; i--) {
919
- if (typeof n.children === 'string') {
1241
+ if (typeof n.children === "string") {
920
1242
  continue
921
1243
  }
922
1244
  const child = n.children[i];
@@ -932,126 +1254,138 @@ const findLastInput = (n) => {
932
1254
  };
933
1255
 
934
1256
  const secureIconDefault = {
935
- $el: 'div',
936
- if: '$activeStep === $lastStep()',
1257
+ $el: "div",
1258
+ if: "$activeStep === $lastStep()",
937
1259
  attrs: {
938
- class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
1260
+ class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500",
939
1261
  },
940
1262
  children: [
941
1263
  {
942
- $el: 'img',
1264
+ $el: "img",
943
1265
  attrs: {
944
- loading: 'lazy',
945
- alt: '',
1266
+ loading: "lazy",
1267
+ alt: "",
946
1268
  style: {
947
- border: 0
1269
+ border: 0,
948
1270
  },
949
- width: '25',
950
- height: '25',
951
- src: 'https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg',
952
- }
1271
+ width: "25",
1272
+ height: "25",
1273
+ src: "https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg",
1274
+ },
953
1275
  },
954
1276
  {
955
- $el: 'span',
956
- children: 'Secure & Encrypted',
1277
+ $el: "span",
1278
+ children: "Secure & Encrypted",
957
1279
  attrs: {
958
- class: 't-pl-2 t-pt-1 t-font-medium'
959
- }
960
- }
961
- ]
1280
+ class: "t-pl-2 t-pt-1 t-font-medium",
1281
+ },
1282
+ },
1283
+ ],
962
1284
  };
963
1285
 
964
1286
  function secureIcon(updates) {
965
- return merge(
966
- secureIconDefault,
967
- updates
968
- )
1287
+ return merge(secureIconDefault, updates)
969
1288
  }
970
1289
 
971
1290
  function questionsStepHeadline(updates) {
972
1291
  return {
973
- $el: 'h3',
974
- children: updates.headline || 'Tell Us About Your Situation',
1292
+ $el: "h3",
1293
+ children: updates.headline || "Tell Us About Your Situation",
975
1294
  attrs: {
976
- 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'
977
- }
1295
+ 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",
1296
+ },
978
1297
  }
979
1298
  }
980
1299
 
981
1300
  function crossSellQuestionsStepHeadline(updates) {
982
1301
  return {
983
- $el: 'h3',
984
- children: updates.headline || 'Tell Us About Your Situation',
1302
+ $el: "h3",
1303
+ children: updates.headline || "Tell Us About Your Situation",
985
1304
  attrs: {
986
- 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'
987
- }
1305
+ 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",
1306
+ },
988
1307
  }
989
1308
  }
990
1309
 
991
1310
  function crossSellQuestionsStepSubHeadline(updates) {
992
1311
  return {
993
- $el: 'h5',
994
- children: updates.subheadline || 'Tell us about your situation:',
1312
+ $el: "h5",
1313
+ children: updates.subheadline || "Tell us about your situation:",
995
1314
  attrs: {
996
- 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'
997
- }
1315
+ 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",
1316
+ },
998
1317
  }
999
1318
  }
1000
1319
 
1001
1320
  function commentsStepHeadline(updates) {
1002
1321
  return {
1003
- $el: 'h3',
1004
- children: updates.headline || 'Additional Details',
1322
+ $el: "h3",
1323
+ children: updates.headline || "Additional Details",
1005
1324
  attrs: {
1006
- 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 || '')
1007
- }
1325
+ class:
1326
+ "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" +
1327
+ " " +
1328
+ (updates.headlineClass || ""),
1329
+ },
1008
1330
  }
1009
1331
  }
1010
1332
 
1011
1333
  function commentsStepHeadlineLegal(updates) {
1012
1334
  return commentsStepHeadline({
1013
- headline: updates.headline || 'Additional Case Details',
1014
- headlineClass: updates.headlineClass
1335
+ headline: updates.headline || "Additional Case Details",
1336
+ headlineClass: updates.headlineClass,
1015
1337
  })
1016
1338
  }
1017
1339
 
1018
1340
  function firstAndLastStepHeadline(updates) {
1019
1341
  return {
1020
- $el: 'h3',
1021
- children: updates.headline || 'Please Provide a Contact Name',
1342
+ $el: "h3",
1343
+ children: updates.headline || "Please Provide a Contact Name",
1022
1344
  attrs: {
1023
- 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 || '')
1024
- }
1345
+ class:
1346
+ "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" +
1347
+ " " +
1348
+ (updates.headlineClass || ""),
1349
+ },
1025
1350
  }
1026
1351
  }
1027
1352
 
1028
1353
  function legalCrossSellsStepHeadline(updates) {
1029
1354
  return {
1030
- $el: 'h3',
1031
- children: updates.headline || 'Do any of the following situations apply?',
1355
+ $el: "h3",
1356
+ children: updates.headline || "Do any of the following situations apply?",
1032
1357
  attrs: {
1033
- 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 || '')
1034
- }
1358
+ class:
1359
+ "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" +
1360
+ " " +
1361
+ (updates.headlineClass || ""),
1362
+ },
1035
1363
  }
1036
1364
  }
1037
1365
 
1038
1366
  function contactStepHeadline(updates) {
1039
1367
  return {
1040
- $el: 'h3',
1368
+ $el: "h3",
1041
1369
  children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
1042
1370
  attrs: {
1043
- 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 || '')
1044
- }
1371
+ class:
1372
+ "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" +
1373
+ " " +
1374
+ (updates.headlineClass || ""),
1375
+ },
1045
1376
  }
1046
1377
  }
1047
1378
 
1048
1379
  function contactStepSubHeadline(updates) {
1049
1380
  return {
1050
- $el: 'h5',
1381
+ $el: "h5",
1051
1382
  children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
1052
1383
  attrs: {
1053
- 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 || '')
1054
- }
1384
+ class:
1385
+ "t-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3" +
1386
+ " " +
1387
+ (updates.subheadlineClass || ""),
1388
+ },
1055
1389
  }
1056
1390
  }
1057
1391
 
@@ -1073,19 +1407,19 @@ const TRUSTED_FORM_JS = `(function() {
1073
1407
 
1074
1408
  function trustedFormScript() {
1075
1409
  return {
1076
- $el: 'script',
1077
- if: '$activeStep === $lastStep()',
1078
- children: TRUSTED_FORM_JS
1410
+ $el: "script",
1411
+ if: "$activeStep === $lastStep()",
1412
+ children: TRUSTED_FORM_JS,
1079
1413
  }
1080
1414
  }
1081
1415
 
1082
1416
  const stepDefaults = (step, stepKey) => ({
1083
- $el: 'section',
1417
+ $el: "section",
1084
1418
  if: '$stepEnabled("' + step + '")',
1085
1419
  attrs: {
1086
1420
  hidden: '$activeStep !== "' + step + '"',
1087
- key: stepKey ? stepKey : step
1088
- }
1421
+ key: stepKey ? stepKey : step,
1422
+ },
1089
1423
  });
1090
1424
 
1091
1425
  function step(name, inputs, updates = {}) {
@@ -1108,27 +1442,24 @@ function step(name, inputs, updates = {}) {
1108
1442
  }
1109
1443
  }
1110
1444
 
1111
- return merge(
1112
- stepDefaults(name, stepKey),
1113
- {
1114
- children: [
1115
- {
1116
- $formkit: 'group',
1117
- id: name,
1118
- name: name,
1119
- nextStepMap: nextStepMap,
1120
- triggerRedirectMap: triggerRedirectMap,
1121
- autoFocus: autoFocus,
1122
- children: inputs
1123
- }
1124
- ]
1125
- }
1126
- )
1445
+ return merge(stepDefaults(name, stepKey), {
1446
+ children: [
1447
+ {
1448
+ $formkit: "group",
1449
+ id: name,
1450
+ name: name,
1451
+ nextStepMap: nextStepMap,
1452
+ triggerRedirectMap: triggerRedirectMap,
1453
+ autoFocus: autoFocus,
1454
+ children: inputs,
1455
+ },
1456
+ ],
1457
+ })
1127
1458
  }
1128
1459
 
1129
1460
  function contactInfo(updates = {}) {
1130
1461
  return step(
1131
- 'contactInfo',
1462
+ "contactInfo",
1132
1463
  [
1133
1464
  contactStepHeadline(updates),
1134
1465
  contactStepSubHeadline(updates),
@@ -1136,7 +1467,7 @@ function contactInfo(updates = {}) {
1136
1467
  email(updates.scope),
1137
1468
  phone(updates.scope),
1138
1469
  TCPAConsent(updates.scope),
1139
- secureIcon()
1470
+ secureIcon(),
1140
1471
  ],
1141
1472
  { nextOnEnter: false }
1142
1473
  )
@@ -1144,28 +1475,24 @@ function contactInfo(updates = {}) {
1144
1475
 
1145
1476
  function firstAndLastV2(updates = {}) {
1146
1477
  return step(
1147
- 'firstAndLast',
1148
- [
1149
- firstAndLastStepHeadline(updates),
1150
- firstName(),
1151
- lastName()
1152
- ],
1478
+ "firstAndLast",
1479
+ [firstAndLastStepHeadline(updates), firstName(updates.scope), lastName(updates.scope)],
1153
1480
  updates
1154
1481
  )
1155
1482
  }
1156
1483
 
1157
1484
  function repossessionTOLPAndZip(updates = {}) {
1158
1485
  return step(
1159
- 'repossessionTOLPAndZip',
1486
+ "repossessionTOLPAndZip",
1160
1487
  [
1161
1488
  {
1162
- $formkit: 'hidden',
1489
+ $formkit: "hidden",
1163
1490
  name: "Type_Of_Legal_Problem",
1164
1491
  id: "Type_Of_Legal_Problem",
1165
- value: "Debt and Collections"
1492
+ value: "Debt and Collections",
1166
1493
  },
1167
- repossessionTOLPDisplay(),
1168
- zipcode()
1494
+ repossessionTOLPDisplay(updates.scope),
1495
+ zipcode(updates.scope),
1169
1496
  ],
1170
1497
  updates
1171
1498
  )
@@ -1173,27 +1500,27 @@ function repossessionTOLPAndZip(updates = {}) {
1173
1500
 
1174
1501
  function commentsWithBankruptcy(updates = {}) {
1175
1502
  return step(
1176
- 'commentsWithBankruptcy',
1503
+ "commentsWithBankruptcy",
1177
1504
  [
1178
1505
  commentsStepHeadlineLegal(updates),
1179
- comments({
1180
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1506
+ comments(updates.scope, false, {
1507
+ label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1181
1508
  placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1182
- inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1183
- }, updates.scope),
1509
+ inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
1510
+ }),
1184
1511
  // TODO: needs scope support
1185
1512
  bankruptcyCrossSell(),
1186
1513
  {
1187
- $el: 'div',
1188
- if: '$get(CrossSell_Bankruptcy).value == true',
1514
+ $el: "div",
1515
+ if: "$get(CrossSell_Bankruptcy).value == true",
1189
1516
  children: [
1190
- comments({
1191
- label: 'Bankruptcy or debt details:',
1192
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1193
- inputClass: '!t-h-16'
1194
- }, 'CrossSell:Bankruptcy')
1517
+ comments("CrossSell:Bankruptcy", false, {
1518
+ label: "Bankruptcy or debt details:",
1519
+ placeholder: "Please describe your bankrtupcy or debt situation in a few words...",
1520
+ inputClass: "!t-h-16",
1521
+ }),
1195
1522
  ],
1196
- }
1523
+ },
1197
1524
  ],
1198
1525
  { nextOnEnter: false }
1199
1526
  )
@@ -1201,19 +1528,20 @@ function commentsWithBankruptcy(updates = {}) {
1201
1528
 
1202
1529
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1203
1530
  return step(
1204
- 'autoAndCarAccidentCrossSellQuestions',
1531
+ "autoAndCarAccidentCrossSellQuestions",
1205
1532
  [
1206
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1207
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your accident:' }),
1208
- AutoAndCarAccidentsQuestions("true", 'CrossSell:Auto_and_Car_Accidents'),
1209
- comments(
1210
- {
1211
- label: 'Accident Description:',
1212
- placeholder: 'Please describe your accident in a few words...',
1213
- inputClass: '!t-h-16'
1214
- },
1215
- 'CrossSell:Auto_and_Car_Accidents'
1216
- )
1533
+ crossSellQuestionsStepHeadline({
1534
+ headline: "You May Be Entitled To Compensation",
1535
+ }),
1536
+ crossSellQuestionsStepSubHeadline({
1537
+ subheadline: "Tell us about your accident:",
1538
+ }),
1539
+ AutoAndCarAccidentsQuestions("true", "CrossSell:Auto_and_Car_Accidents"),
1540
+ comments("CrossSell:Auto_and_Car_Accidents", false, {
1541
+ label: "Accident Description:",
1542
+ placeholder: "Please describe your accident in a few words...",
1543
+ inputClass: "!t-h-16",
1544
+ }),
1217
1545
  ],
1218
1546
  updates
1219
1547
  )
@@ -1221,18 +1549,15 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1221
1549
 
1222
1550
  function childCustodyCrossSellQuestions(updates = {}) {
1223
1551
  return step(
1224
- 'childCustodyCrossSellQuestions',
1552
+ "childCustodyCrossSellQuestions",
1225
1553
  [
1226
- crossSellQuestionsStepHeadline({ headline: 'Child Custody Information' }),
1227
- ChildCustodyQuestions("true", 'CrossSell:Child_Custody'),
1228
- comments(
1229
- {
1230
- label: 'Description:',
1231
- placeholder: 'Please describe your situation in a few words...',
1232
- inputClass: '!t-h-16'
1233
- },
1234
- 'CrossSell:Child_Custody'
1235
- )
1554
+ crossSellQuestionsStepHeadline({ headline: "Child Custody Information" }),
1555
+ ChildCustodyQuestions("true", "CrossSell:Child_Custody"),
1556
+ comments("CrossSell:Child_Custody", false, {
1557
+ label: "Description:",
1558
+ placeholder: "Please describe your situation in a few words...",
1559
+ inputClass: "!t-h-16",
1560
+ }),
1236
1561
  ],
1237
1562
  updates
1238
1563
  )
@@ -1240,18 +1565,17 @@ function childCustodyCrossSellQuestions(updates = {}) {
1240
1565
 
1241
1566
  function divorceAndSeparationCrossSellQuestions(updates = {}) {
1242
1567
  return step(
1243
- 'divorceAndSeparationCrossSellQuestions',
1568
+ "divorceAndSeparationCrossSellQuestions",
1244
1569
  [
1245
- crossSellQuestionsStepHeadline({ headline: 'Divorce or Separation Information' }),
1246
- DivorceQuestions("true", 'CrossSell:Divorce_and_Separation'),
1247
- comments(
1248
- {
1249
- label: 'Description:',
1250
- placeholder: 'Please describe your situation in a few words...',
1251
- inputClass: '!t-h-16'
1252
- },
1253
- 'CrossSell:Divorce_and_Separation'
1254
- )
1570
+ crossSellQuestionsStepHeadline({
1571
+ headline: "Divorce or Separation Information",
1572
+ }),
1573
+ DivorceQuestions("true", "CrossSell:Divorce_and_Separation"),
1574
+ comments("CrossSell:Divorce_and_Separation", false, {
1575
+ label: "Description:",
1576
+ placeholder: "Please describe your situation in a few words...",
1577
+ inputClass: "!t-h-16",
1578
+ }),
1255
1579
  ],
1256
1580
  updates
1257
1581
  )
@@ -1259,18 +1583,15 @@ function divorceAndSeparationCrossSellQuestions(updates = {}) {
1259
1583
 
1260
1584
  function duiAndDWICrossSellQuestions(updates = {}) {
1261
1585
  return step(
1262
- 'duiAndDWICrossSellQuestions',
1586
+ "duiAndDWICrossSellQuestions",
1263
1587
  [
1264
- crossSellQuestionsStepHeadline({ headline: 'About Your DUI/DWI' }),
1265
- DUIAndDWIQuestions("true", 'CrossSell:DUI_and_DWI'),
1266
- comments(
1267
- {
1268
- label: 'Incident Description:',
1269
- placeholder: 'Please describe your incident in a few words...',
1270
- inputClass: '!t-h-16'
1271
- },
1272
- 'CrossSell:DUI_and_DWI'
1273
- )
1588
+ crossSellQuestionsStepHeadline({ headline: "About Your DUI/DWI" }),
1589
+ DUIAndDWIQuestions("true", "CrossSell:DUI_and_DWI"),
1590
+ comments("CrossSell:DUI_and_DWI", false, {
1591
+ label: "Incident Description:",
1592
+ placeholder: "Please describe your incident in a few words...",
1593
+ inputClass: "!t-h-16",
1594
+ }),
1274
1595
  ],
1275
1596
  updates
1276
1597
  )
@@ -1278,19 +1599,20 @@ function duiAndDWICrossSellQuestions(updates = {}) {
1278
1599
 
1279
1600
  function ssdiCrossSellQuestions(updates = {}) {
1280
1601
  return step(
1281
- 'ssdiCrossSellQuestions',
1602
+ "ssdiCrossSellQuestions",
1282
1603
  [
1283
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1284
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your disability:' }),
1285
- SocialSecurityDisabilityAndInsuranceQuestions("true", 'CrossSell:Social_Security_Disability_and_Insurance'),
1286
- comments(
1287
- {
1288
- label: 'Description:',
1289
- placeholder: 'Please describe your situation in a few words...',
1290
- inputClass: '!t-h-16'
1291
- },
1292
- 'CrossSell:Social_Security_Disability_and_Insurance'
1293
- )
1604
+ crossSellQuestionsStepHeadline({
1605
+ headline: "You May Be Entitled To Benefits",
1606
+ }),
1607
+ crossSellQuestionsStepSubHeadline({
1608
+ subheadline: "Tell us about your disability:",
1609
+ }),
1610
+ SocialSecurityDisabilityAndInsuranceQuestions("true", "CrossSell:Social_Security_Disability_and_Insurance"),
1611
+ comments("CrossSell:Social_Security_Disability_and_Insurance", false, {
1612
+ label: "Description:",
1613
+ placeholder: "Please describe your situation in a few words...",
1614
+ inputClass: "!t-h-16",
1615
+ }),
1294
1616
  ],
1295
1617
  updates
1296
1618
  )
@@ -1298,19 +1620,20 @@ function ssdiCrossSellQuestions(updates = {}) {
1298
1620
 
1299
1621
  function personalInjuryCrossSellQuestions(updates = {}) {
1300
1622
  return step(
1301
- 'personalInjuryCrossSellQuestions',
1623
+ "personalInjuryCrossSellQuestions",
1302
1624
  [
1303
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1304
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1305
- PersonalInjuryQuestions("true", 'CrossSell:Personal_Injury'),
1306
- comments(
1307
- {
1308
- label: 'Injury Description:',
1309
- placeholder: 'Please describe your injury in a few words...',
1310
- inputClass: '!t-h-16'
1311
- },
1312
- 'CrossSell:Personal_Injury'
1313
- )
1625
+ crossSellQuestionsStepHeadline({
1626
+ headline: "You May Be Entitled To Compensation",
1627
+ }),
1628
+ crossSellQuestionsStepSubHeadline({
1629
+ subheadline: "Tell us about your injury:",
1630
+ }),
1631
+ PersonalInjuryQuestions("true", "CrossSell:Personal_Injury"),
1632
+ comments("CrossSell:Personal_Injury", false, {
1633
+ label: "Injury Description:",
1634
+ placeholder: "Please describe your injury in a few words...",
1635
+ inputClass: "!t-h-16",
1636
+ }),
1314
1637
  ],
1315
1638
  updates
1316
1639
  )
@@ -1318,18 +1641,17 @@ function personalInjuryCrossSellQuestions(updates = {}) {
1318
1641
 
1319
1642
  function powerOfAttorneyCrossSellQuestions(updates = {}) {
1320
1643
  return step(
1321
- 'powerOfAttorneyCrossSellQuestions',
1644
+ "powerOfAttorneyCrossSellQuestions",
1322
1645
  [
1323
- crossSellQuestionsStepHeadline({ headline: 'Power of Attorney Information' }),
1324
- PowerofAttorneyQuestions("true", 'CrossSell:Power_of_Attorney'),
1325
- comments(
1326
- {
1327
- label: 'Description:',
1328
- placeholder: 'Please describe your situation in a few words...',
1329
- inputClass: '!t-h-16'
1330
- },
1331
- 'CrossSell:Power_of_Attorney'
1332
- )
1646
+ crossSellQuestionsStepHeadline({
1647
+ headline: "Power of Attorney Information",
1648
+ }),
1649
+ PowerofAttorneyQuestions("true", "CrossSell:Power_of_Attorney"),
1650
+ comments("CrossSell:Power_of_Attorney", false, {
1651
+ label: "Description:",
1652
+ placeholder: "Please describe your situation in a few words...",
1653
+ inputClass: "!t-h-16",
1654
+ }),
1333
1655
  ],
1334
1656
  updates
1335
1657
  )
@@ -1337,18 +1659,15 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1337
1659
 
1338
1660
  function willsAndTrustsCrossSellQuestions(updates = {}) {
1339
1661
  return step(
1340
- 'willsAndTrustsCrossSellQuestions',
1662
+ "willsAndTrustsCrossSellQuestions",
1341
1663
  [
1342
- crossSellQuestionsStepHeadline({ headline: 'Will or Trust Information' }),
1343
- WillsAndTrustsQuestions("true", 'CrossSell:Wills_and_Trusts'),
1344
- comments(
1345
- {
1346
- label: 'Description:',
1347
- placeholder: 'Please describe your situation in a few words...',
1348
- inputClass: '!t-h-16'
1349
- },
1350
- 'CrossSell:Wills_and_Trusts'
1351
- )
1664
+ crossSellQuestionsStepHeadline({ headline: "Will or Trust Information" }),
1665
+ WillsAndTrustsQuestions("true", "CrossSell:Wills_and_Trusts"),
1666
+ comments("CrossSell:Wills_and_Trusts", false, {
1667
+ label: "Description:",
1668
+ placeholder: "Please describe your situation in a few words...",
1669
+ inputClass: "!t-h-16",
1670
+ }),
1352
1671
  ],
1353
1672
  updates
1354
1673
  )
@@ -1356,19 +1675,20 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
1356
1675
 
1357
1676
  function workersCompensationCrossSellQuestions(updates = {}) {
1358
1677
  return step(
1359
- 'workersCompensationCrossSellQuestions',
1678
+ "workersCompensationCrossSellQuestions",
1360
1679
  [
1361
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1362
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1363
- WorkersCompensationQuestions("true", 'CrossSell:Workers_Compensation'),
1364
- comments(
1365
- {
1366
- label: 'Injury Description:',
1367
- placeholder: 'Please describe your injury in a few words...',
1368
- inputClass: '!t-h-16'
1369
- },
1370
- 'CrossSell:Workers_Compensation'
1371
- )
1680
+ crossSellQuestionsStepHeadline({
1681
+ headline: "You May Be Entitled To Benefits",
1682
+ }),
1683
+ crossSellQuestionsStepSubHeadline({
1684
+ subheadline: "Tell us about your injury:",
1685
+ }),
1686
+ WorkersCompensationQuestions("true", "CrossSell:Workers_Compensation"),
1687
+ comments("CrossSell:Workers_Compensation", false, {
1688
+ label: "Injury Description:",
1689
+ placeholder: "Please describe your injury in a few words...",
1690
+ inputClass: "!t-h-16",
1691
+ }),
1372
1692
  ],
1373
1693
  updates
1374
1694
  )
@@ -1376,137 +1696,130 @@ function workersCompensationCrossSellQuestions(updates = {}) {
1376
1696
 
1377
1697
  function legalCrossSells(updates = {}) {
1378
1698
  updates.nextOnInput = false;
1379
- updates.stepKey = '$get(Type_Of_Legal_Problem).value';
1380
- return step(
1381
- 'legalCrossSells',
1382
- [
1383
- legalCrossSellsStepHeadline(updates),
1384
- legalCrossSells$1(),
1385
- ],
1386
- updates
1387
- )
1699
+ updates.stepKey = "$get(Type_Of_Legal_Problem).value";
1700
+ return step("legalCrossSells", [legalCrossSellsStepHeadline(updates), legalCrossSells$1()], updates)
1388
1701
  }
1389
1702
 
1390
1703
  function repossessionTOLPQuestions(updates = {}) {
1391
1704
  return step(
1392
- 'TOLPQuestions',
1705
+ "TOLPQuestions",
1393
1706
  [
1394
1707
  questionsStepHeadline(updates),
1395
1708
  DebtAndCollectionsQuestions(),
1396
1709
  CivilLawsuitQuestions(),
1397
1710
  BankruptcyQuestions(),
1398
- NotSureOrOtherQuestions()
1711
+ NotSureOrOtherQuestions(),
1399
1712
  ],
1400
1713
  updates
1401
1714
  )
1402
1715
  }
1403
1716
 
1404
1717
  const formNavigation = (updates = {}) => ({
1405
- $el: 'div',
1718
+ $el: "div",
1406
1719
  attrs: {
1407
- class: 'step-nav'
1720
+ class: "step-nav",
1408
1721
  },
1409
1722
  children: [
1410
1723
  {
1411
- $formkit: 'button',
1412
- name: 'back_button',
1413
- onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1414
- children: 'Back',
1724
+ $formkit: "button",
1725
+ name: "back_button",
1726
+ onClick: "$setPreviousStep($prevStepFunc($get(form)))",
1727
+ children: "Back",
1415
1728
  style: {
1416
- if: '$activeStep === $firstStep()',
1417
- then: 'visibility: hidden;'
1418
- }
1729
+ if: "$activeStep === $firstStep()",
1730
+ then: "visibility: hidden;",
1731
+ },
1419
1732
  },
1420
1733
  {
1421
- $formkit: 'button',
1422
- name: 'next_button',
1423
- onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1734
+ $formkit: "button",
1735
+ name: "next_button",
1736
+ onClick: "$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))",
1424
1737
  children: {
1425
- if: '$activeStep === $firstStep()',
1426
- then: 'Start',
1427
- else: 'Next'
1738
+ if: "$activeStep === $firstStep()",
1739
+ then: "Start",
1740
+ else: "Next",
1428
1741
  },
1429
1742
  outerClass: {
1430
- if: '$activeStep === $lastStep()',
1431
- then: 't-hidden',
1432
- else: ''
1743
+ if: "$activeStep === $lastStep()",
1744
+ then: "t-hidden",
1745
+ else: "",
1433
1746
  },
1434
1747
  style: {
1435
- if: '$activeStep === $lastStep()',
1436
- then: 'display: none;'
1437
- }
1748
+ if: "$activeStep === $lastStep()",
1749
+ then: "display: none;",
1750
+ },
1438
1751
  },
1439
1752
  {
1440
- $formkit: 'submit',
1441
- name: 'submit_button',
1442
- label: updates.submitLabel || 'Submit',
1443
- if: '$activeStep === $lastStep()',
1753
+ $formkit: "submit",
1754
+ name: "submit_button",
1755
+ label: updates.submitLabel || "Submit",
1756
+ if: "$activeStep === $lastStep()",
1444
1757
  style: {
1445
- if: '$activeStep !== $lastStep()',
1446
- then: 'display: none;'
1447
- }
1448
- }
1449
- ]
1758
+ if: "$activeStep !== $lastStep()",
1759
+ then: "display: none;",
1760
+ },
1761
+ },
1762
+ ],
1450
1763
  });
1451
1764
 
1452
1765
  const formDetails = () => ({
1453
- $el: 'pre',
1766
+ $el: "pre",
1454
1767
  if: '$urlParam("fdbg", "") == 1',
1455
1768
  children: [
1456
1769
  {
1457
- $el: 'pre',
1458
- children: '$stringify( $get(form).value )',
1770
+ $el: "pre",
1771
+ children: "$stringify( $get(form).value )",
1459
1772
  attrs: {
1460
- class: 't-text-xs',
1461
- style: 'overflow: scroll'
1462
- }
1773
+ class: "t-text-xs",
1774
+ style: "overflow: scroll",
1775
+ },
1463
1776
  },
1464
1777
  {
1465
- $el: 'pre',
1466
- children: ['activeStep: ', '$activeStep'],
1778
+ $el: "pre",
1779
+ children: ["activeStep: ", "$activeStep"],
1467
1780
  attrs: {
1468
- class: 't-text-xs',
1469
- style: 'overflow: scroll'
1470
- }
1781
+ class: "t-text-xs",
1782
+ style: "overflow: scroll",
1783
+ },
1471
1784
  },
1472
1785
  {
1473
- $el: 'pre',
1474
- children: ['stepHistory: ', '$stepHistory'],
1786
+ $el: "pre",
1787
+ children: ["stepHistory: ", "$stepHistory"],
1475
1788
  attrs: {
1476
- class: 't-text-xs',
1477
- style: 'overflow: scroll'
1478
- }
1789
+ class: "t-text-xs",
1790
+ style: "overflow: scroll",
1791
+ },
1479
1792
  },
1480
1793
  {
1481
- $el: 'pre',
1482
- children: ['stepQueue: ', '$stepQueue'],
1794
+ $el: "pre",
1795
+ children: ["stepQueue: ", "$stepQueue"],
1483
1796
  attrs: {
1484
- class: 't-text-xs',
1485
- style: 'overflow: scroll'
1486
- }
1797
+ class: "t-text-xs",
1798
+ style: "overflow: scroll",
1799
+ },
1487
1800
  },
1488
1801
  {
1489
- $el: 'pre',
1490
- children: ['steps: ', '$stepKeys()'],
1802
+ $el: "pre",
1803
+ children: ["steps: ", "$stepKeys()"],
1491
1804
  attrs: {
1492
- class: 't-text-xs',
1493
- style: 'overflow: scroll'
1494
- }
1495
- }
1496
- ]
1805
+ class: "t-text-xs",
1806
+ style: "overflow: scroll",
1807
+ },
1808
+ },
1809
+ ],
1497
1810
  });
1498
1811
 
1499
1812
  const formPropDefaults = {
1500
- type: 'form',
1501
- id: 'form',
1502
- config: { validationVisibility: 'submit' },
1813
+ type: "form",
1814
+ id: "form",
1815
+ config: { validationVisibility: "submit" },
1503
1816
  onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
1504
- plugins: '$plugins',
1817
+ plugins: "$plugins",
1505
1818
  actions: false,
1506
- anchorElement: 'form-anchor',
1819
+ anchorElement: "form-anchor",
1507
1820
  useLocalStorage: true,
1508
1821
  prepop: {
1509
- fromURL: true
1822
+ fromURL: true,
1510
1823
  },
1511
1824
  errorCodes: {
1512
1825
  403: { message: "An Error Occurred", abort: false },
@@ -1514,13 +1827,11 @@ const formPropDefaults = {
1514
1827
  429: "An Error Occurred",
1515
1828
  504: { message: "An Error Occurred", abort: false },
1516
1829
  },
1517
- formClass: '!t-max-w-[40rem]'
1830
+ formClass: "!t-max-w-[40rem]",
1518
1831
  };
1519
1832
 
1520
1833
  function filterMapByKey(obj, keyList) {
1521
- return Object.fromEntries(
1522
- Object.entries(obj).filter(([key]) => keyList.includes(key))
1523
- );
1834
+ return Object.fromEntries(Object.entries(obj).filter(([key]) => keyList.includes(key)))
1524
1835
  }
1525
1836
 
1526
1837
  // export function filteredNextStepsMapLegal(keyList) {
@@ -1530,10 +1841,7 @@ function filterMapByKey(obj, keyList) {
1530
1841
  // }
1531
1842
 
1532
1843
  function formProps(updates) {
1533
- const props = merge(
1534
- formPropDefaults,
1535
- updates
1536
- );
1844
+ const props = merge(formPropDefaults, updates);
1537
1845
  if (props.formId && !props.name) {
1538
1846
  props.name = props.formId;
1539
1847
  }
@@ -1543,13 +1851,10 @@ function formProps(updates) {
1543
1851
  const metaDefaults = {};
1544
1852
 
1545
1853
  function metaProps(updates) {
1546
- const data = merge(
1547
- metaDefaults,
1548
- updates
1549
- );
1854
+ const data = merge(metaDefaults, updates);
1550
1855
  return {
1551
- type: 'meta',
1552
- data
1856
+ type: "meta",
1857
+ data,
1553
1858
  }
1554
1859
  }
1555
1860
 
@@ -1569,412 +1874,415 @@ function defaultMetaPropsLegal(tolps = null) {
1569
1874
  defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1570
1875
  finalHeadlines: finalHeadlines,
1571
1876
  defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1572
- finalSubHeadlines: finalSubHeadlines
1877
+ finalSubHeadlines: finalSubHeadlines,
1573
1878
  })
1574
1879
  }
1575
1880
 
1576
- function dynamicSchemaNode(field = 'Type_Of_Legal_Problem') {
1881
+ function dynamicSchemaNode(field = "Type_Of_Legal_Problem") {
1577
1882
  return {
1578
- $cmp: 'FormKitSchema',
1579
- if: '$get(' + field + ').value',
1883
+ $cmp: "FormKitSchema",
1884
+ if: "$get(" + field + ").value",
1580
1885
  props: {
1581
- schema: '$meta.dynamicSchema',
1582
- data: '$buildData($meta)'
1583
- }
1886
+ schema: "$meta.dynamicSchema",
1887
+ data: "$buildData($meta)",
1888
+ },
1584
1889
  }
1585
1890
  }
1586
1891
 
1587
1892
  const formAnchorDefaults = {
1588
- $el: 'div',
1893
+ $el: "div",
1589
1894
  children: [
1590
1895
  {
1591
- $el: 'div',
1896
+ $el: "div",
1592
1897
  attrs: {
1593
- id: 'form-anchor',
1594
- class: 't-absolute',
1595
- style: { top: '-30px', left: 0 }
1596
- }
1597
- }
1898
+ id: "form-anchor",
1899
+ class: "t-absolute",
1900
+ style: { top: "-30px", left: 0 },
1901
+ },
1902
+ },
1598
1903
  ],
1599
1904
  attrs: {
1600
- class: 't-relative'
1601
- }
1905
+ class: "t-relative",
1906
+ },
1602
1907
  };
1603
1908
 
1604
1909
  function formAnchor(updates) {
1605
- return merge(
1606
- formAnchorDefaults,
1607
- updates
1608
- )
1910
+ return merge(formAnchorDefaults, updates)
1609
1911
  }
1610
1912
 
1611
1913
  function headlineDefaults(updates = {}) {
1612
1914
  return {
1613
- $el: 'h1',
1915
+ $el: "h1",
1614
1916
  attrs: {
1615
- 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 || '')
1616
- }
1917
+ class:
1918
+ "t-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3" +
1919
+ " " +
1920
+ (updates.headlineClass || ""),
1921
+ },
1617
1922
  }
1618
1923
  }
1619
1924
 
1620
1925
  function headline(updates = {}) {
1621
- return merge(
1622
- headlineDefaults(updates),
1623
- updates
1624
- )
1926
+ return merge(headlineDefaults(updates), updates)
1625
1927
  }
1626
1928
 
1627
1929
  function subHeadlineDefaults(updates = {}) {
1628
1930
  return {
1629
- $el: 'h3',
1931
+ $el: "h3",
1630
1932
  attrs: {
1631
- 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 || '')
1632
- }
1933
+ class:
1934
+ "t-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10" +
1935
+ " " +
1936
+ (updates.subheadlineClass || ""),
1937
+ },
1633
1938
  }
1634
1939
  }
1635
1940
 
1636
1941
  function subHeadline(updates = {}) {
1637
- return merge(
1638
- subHeadlineDefaults(updates),
1639
- updates
1640
- )
1942
+ return merge(subHeadlineDefaults(updates), updates)
1641
1943
  }
1642
1944
 
1643
1945
  const hiddenInputsBase = [
1644
1946
  {
1645
- $formkit: 'hidden',
1947
+ $formkit: "hidden",
1646
1948
  name: "gclid",
1647
- value: null
1949
+ value: null,
1648
1950
  },
1649
1951
  {
1650
- $formkit: 'hidden',
1952
+ $formkit: "hidden",
1651
1953
  name: "campaignid",
1652
- value: null
1954
+ value: null,
1653
1955
  },
1654
1956
  {
1655
- $formkit: 'hidden',
1957
+ $formkit: "hidden",
1656
1958
  name: "s",
1657
- value: null
1658
- }
1959
+ value: null,
1960
+ },
1659
1961
  ];
1660
1962
 
1661
1963
  const hiddenInputsLegal = [
1662
1964
  {
1663
- $formkit: 'hidden',
1965
+ $formkit: "hidden",
1664
1966
  name: "vertical",
1665
- value: "Legal"
1967
+ value: "Legal",
1666
1968
  },
1667
1969
  {
1668
- $formkit: 'hidden',
1970
+ $formkit: "hidden",
1669
1971
  name: "TCPA_Language",
1670
- value: "$meta.tcpaLanguage"
1972
+ value: "$meta.tcpaLanguage",
1671
1973
  },
1672
- ...hiddenInputsBase
1974
+ ...hiddenInputsBase,
1673
1975
  ];
1674
1976
 
1675
1977
  const legalRedirectMapDefaults = {
1676
- '*': LegalRedirectUrl()
1978
+ "*": LegalRedirectUrl(),
1677
1979
  };
1678
1980
 
1679
-
1680
1981
  function legalRedirectMap(updates) {
1681
- return merge(
1682
- legalRedirectMapDefaults,
1683
- updates
1684
- )
1982
+ return merge(legalRedirectMapDefaults, updates)
1685
1983
  }
1686
1984
 
1687
1985
  const businessServicesOverrideMap = {
1688
- 'Business_Services_Display': {
1986
+ Business_Services_Display: {
1689
1987
  "Business Formation": {
1690
- 'Business_Services': 'Business Formation'
1988
+ Business_Services: "Business Formation",
1691
1989
  },
1692
- "Contracts": {
1693
- 'Business_Services': 'Contracts'
1990
+ Contracts: {
1991
+ Business_Services: "Contracts",
1694
1992
  },
1695
1993
  "Insurance and Liability": {
1696
- 'Business_Services': 'Insurance and Liability'
1994
+ Business_Services: "Insurance and Liability",
1697
1995
  },
1698
1996
  "Mergers and Acquisition": {
1699
- 'Business_Services': 'Mergers and Acquisition'
1997
+ Business_Services: "Mergers and Acquisition",
1700
1998
  },
1701
1999
  "Regulatory Compliance": {
1702
- 'Business_Services': 'Regulatory Compliance'
2000
+ Business_Services: "Regulatory Compliance",
1703
2001
  },
1704
2002
  "Employee Dispute": {
1705
- 'Business_Services': 'Employee Dispute'
2003
+ Business_Services: "Employee Dispute",
1706
2004
  },
1707
2005
  "Advice and Consulting": {
1708
- 'Business_Services': 'Other',
2006
+ Business_Services: "Other",
2007
+ },
2008
+ Other: {
2009
+ Business_Services: "Other",
1709
2010
  },
1710
- "Other": {
1711
- 'Business_Services': 'Other'
1712
- }
1713
2011
  },
1714
2012
  };
1715
2013
 
1716
2014
  const patentsAndIPTOLPDisplayOverrideMap = {
1717
- 'Copyrights': {
1718
- 'Type_Of_Legal_Problem': 'Copyrights and Trademarks'
2015
+ Copyrights: {
2016
+ Type_Of_Legal_Problem: "Copyrights and Trademarks",
1719
2017
  },
1720
- 'Trademarks': {
1721
- 'Type_Of_Legal_Problem': 'Copyrights and Trademarks'
2018
+ Trademarks: {
2019
+ Type_Of_Legal_Problem: "Copyrights and Trademarks",
1722
2020
  },
1723
- 'Patents': {
1724
- 'Type_Of_Legal_Problem': 'Patents and Intellectual Property'
2021
+ Patents: {
2022
+ Type_Of_Legal_Problem: "Patents and Intellectual Property",
1725
2023
  },
1726
- 'Business Lawyers': {
1727
- 'Type_Of_Legal_Problem': 'Business Lawyers'
2024
+ "Business Lawyers": {
2025
+ Type_Of_Legal_Problem: "Business Lawyers",
1728
2026
  },
1729
- 'Business Consulting': {
1730
- 'Type_Of_Legal_Problem': 'Business Lawyers'
2027
+ "Business Consulting": {
2028
+ Type_Of_Legal_Problem: "Business Lawyers",
1731
2029
  },
1732
- 'Not Sure or Other': {
1733
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
2030
+ "Not Sure or Other": {
2031
+ Type_Of_Legal_Problem: "Not Sure or Other",
1734
2032
  },
1735
2033
  };
1736
2034
 
1737
2035
  const legalAllValueOverrideMap = {
1738
- 'Civil_Defense': {
1739
- 'Yes': {
1740
- 'Type_Of_Legal_Problem': 'Defend a Lawsuit'
2036
+ Civil_Defense: {
2037
+ Yes: {
2038
+ Type_Of_Legal_Problem: "Defend a Lawsuit",
2039
+ },
2040
+ No: {
2041
+ Type_Of_Legal_Problem: "File a Lawsuit",
1741
2042
  },
1742
- 'No': {
1743
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
1744
- }
1745
2043
  },
1746
2044
  businessServicesOverrideMap,
1747
- 'Type_Of_Legal_Problem_Display': {
2045
+ Type_Of_Legal_Problem_Display: {
1748
2046
  ...patentsAndIPTOLPDisplayOverrideMap,
1749
2047
  // Accidents and PI
1750
- 'Auto Accident': {
1751
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
2048
+ "Auto Accident": {
2049
+ Type_Of_Legal_Problem: "Auto and Car Accidents",
1752
2050
  },
1753
- 'Dog Bite': {
1754
- 'Type_Of_Legal_Problem': 'Personal Injury'
2051
+ "Dog Bite": {
2052
+ Type_Of_Legal_Problem: "Personal Injury",
1755
2053
  },
1756
- 'Slip and Fall': {
1757
- 'Type_Of_Legal_Problem': 'Personal Injury'
2054
+ "Slip and Fall": {
2055
+ Type_Of_Legal_Problem: "Personal Injury",
1758
2056
  },
1759
- 'Workplace Injury': {
1760
- 'Type_Of_Legal_Problem': 'Workers Compensation'
2057
+ "Workplace Injury": {
2058
+ Type_Of_Legal_Problem: "Workers Compensation",
1761
2059
  },
1762
- 'Trucking Accident': {
1763
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
2060
+ "Trucking Accident": {
2061
+ Type_Of_Legal_Problem: "Auto and Car Accidents",
1764
2062
  },
1765
- 'Motorcycle Accident': {
1766
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents',
2063
+ "Motorcycle Accident": {
2064
+ Type_Of_Legal_Problem: "Auto and Car Accidents",
1767
2065
  },
1768
- 'Other Accidents or Injuries': {
1769
- 'Type_Of_Legal_Problem': 'Personal Injury'
2066
+ "Other Accidents or Injuries": {
2067
+ Type_Of_Legal_Problem: "Personal Injury",
1770
2068
  },
1771
2069
  // Civil
1772
- 'Automobile Accident': {
1773
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
2070
+ "Automobile Accident": {
2071
+ Type_Of_Legal_Problem: "Auto and Car Accidents",
1774
2072
  },
1775
- 'Contract Disputes': {
1776
- 'Type_Of_Legal_Problem': 'Business Lawyers'
2073
+ "Contract Disputes": {
2074
+ Type_Of_Legal_Problem: "Business Lawyers",
1777
2075
  },
1778
- 'Defamation and Slander': {
1779
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
2076
+ "Defamation and Slander": {
2077
+ Type_Of_Legal_Problem: "File a Lawsuit",
1780
2078
  },
1781
- 'Dog Bite': {
1782
- 'Type_Of_Legal_Problem': 'Personal Injury'
2079
+ "Dog Bite": {
2080
+ Type_Of_Legal_Problem: "Personal Injury",
1783
2081
  },
1784
- 'Employment and Workplace': {
1785
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
2082
+ "Employment and Workplace": {
2083
+ Type_Of_Legal_Problem: "Employment and Workplace",
1786
2084
  },
1787
- 'Fraud': {
1788
- 'Type_Of_Legal_Problem': 'Consumer Lawyers'
2085
+ Fraud: {
2086
+ Type_Of_Legal_Problem: "Consumer Lawyers",
1789
2087
  },
1790
- 'Medical Malpractice': {
1791
- 'Type_Of_Legal_Problem': 'Medical Malpractice'
2088
+ "Medical Malpractice": {
2089
+ Type_Of_Legal_Problem: "Medical Malpractice",
1792
2090
  },
1793
- 'Personal Injury': {
1794
- 'Type_Of_Legal_Problem': 'Personal Injury'
2091
+ "Personal Injury": {
2092
+ Type_Of_Legal_Problem: "Personal Injury",
1795
2093
  },
1796
- 'Property Damage': {
1797
- 'Type_Of_Legal_Problem': 'Property Damage'
2094
+ "Property Damage": {
2095
+ Type_Of_Legal_Problem: "Property Damage",
1798
2096
  },
1799
- 'Small Claims': {
1800
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
2097
+ "Small Claims": {
2098
+ Type_Of_Legal_Problem: "File a Lawsuit",
1801
2099
  },
1802
- 'Real Estate': {
1803
- 'Type_Of_Legal_Problem': 'Real Estate'
2100
+ "Real Estate": {
2101
+ Type_Of_Legal_Problem: "Real Estate",
1804
2102
  },
1805
- 'Other (describe on next page)': {
1806
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
2103
+ "Other (describe on next page)": {
2104
+ Type_Of_Legal_Problem: "Not Sure or Other",
1807
2105
  },
1808
2106
  // Contracts
1809
- 'Contract Creation': {
1810
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1811
- 'Business_Services': 'Contracts'
2107
+ "Contract Creation": {
2108
+ Type_Of_Legal_Problem: "Business Lawyers",
2109
+ Business_Services: "Contracts",
1812
2110
  },
1813
- 'Contract Enforcement': {
1814
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1815
- 'Business_Services': 'Contracts'
2111
+ "Contract Enforcement": {
2112
+ Type_Of_Legal_Problem: "Business Lawyers",
2113
+ Business_Services: "Contracts",
1816
2114
  },
1817
- 'Contract Cancellation': {
1818
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1819
- 'Business_Services': 'Contracts'
2115
+ "Contract Cancellation": {
2116
+ Type_Of_Legal_Problem: "Business Lawyers",
2117
+ Business_Services: "Contracts",
1820
2118
  },
1821
- 'Contract Fraud': {
1822
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1823
- 'Business_Services': 'Contracts'
2119
+ "Contract Fraud": {
2120
+ Type_Of_Legal_Problem: "Business Lawyers",
2121
+ Business_Services: "Contracts",
1824
2122
  },
1825
- 'Breach of Contract': {
1826
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1827
- 'Business_Services': 'Contracts'
2123
+ "Breach of Contract": {
2124
+ Type_Of_Legal_Problem: "Business Lawyers",
2125
+ Business_Services: "Contracts",
1828
2126
  },
1829
- 'Other Contract Issues': {
1830
- 'Type_Of_Legal_Problem': 'Business Lawyers',
1831
- 'Business_Services': 'Contracts'
2127
+ "Other Contract Issues": {
2128
+ Type_Of_Legal_Problem: "Business Lawyers",
2129
+ Business_Services: "Contracts",
1832
2130
  },
1833
2131
  // Criminal
1834
- 'Criminal Defense': {
1835
- 'Type_Of_Legal_Problem': 'Criminal and Felony'
2132
+ "Criminal Defense": {
2133
+ Type_Of_Legal_Problem: "Criminal and Felony",
1836
2134
  },
1837
- 'Victim of a Crime': {
1838
- 'Type_Of_Legal_Problem': 'Victim of a Crime'
2135
+ "Victim of a Crime": {
2136
+ Type_Of_Legal_Problem: "Victim of a Crime",
1839
2137
  },
1840
- 'DUI and DWI': {
1841
- 'Type_Of_Legal_Problem': 'DUI and DWI'
2138
+ "DUI and DWI": {
2139
+ Type_Of_Legal_Problem: "DUI and DWI",
1842
2140
  },
1843
- 'Expungement': {
1844
- 'Type_Of_Legal_Problem': 'Expungement'
2141
+ Expungement: {
2142
+ Type_Of_Legal_Problem: "Expungement",
1845
2143
  },
1846
- 'Harassment': {
1847
- 'Type_Of_Legal_Problem': 'Criminal and Felony'
2144
+ Harassment: {
2145
+ Type_Of_Legal_Problem: "Criminal and Felony",
1848
2146
  },
1849
- 'Not Sure or Other': {
1850
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
2147
+ "Not Sure or Other": {
2148
+ Type_Of_Legal_Problem: "Not Sure or Other",
1851
2149
  },
1852
2150
  // Employment and Workplace
1853
- 'Workplace Harassment': {
1854
- 'Type_Of_Legal_Problem': 'Workplace Harassment'
2151
+ "Workplace Harassment": {
2152
+ Type_Of_Legal_Problem: "Workplace Harassment",
1855
2153
  },
1856
- 'Workplace Discrimination': {
1857
- 'Type_Of_Legal_Problem': 'Workplace Discrimination'
2154
+ "Workplace Discrimination": {
2155
+ Type_Of_Legal_Problem: "Workplace Discrimination",
1858
2156
  },
1859
- 'Wrongful Termination': {
1860
- 'Type_Of_Legal_Problem': 'Wrongful Termination'
2157
+ "Wrongful Termination": {
2158
+ Type_Of_Legal_Problem: "Wrongful Termination",
1861
2159
  },
1862
- 'Payment Disputes': {
1863
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
2160
+ "Payment Disputes": {
2161
+ Type_Of_Legal_Problem: "Employment and Workplace",
1864
2162
  },
1865
- 'Workers Compensation': {
1866
- 'Type_Of_Legal_Problem': 'Workers Compensation'
2163
+ "Workers Compensation": {
2164
+ Type_Of_Legal_Problem: "Workers Compensation",
1867
2165
  },
1868
- 'Unemployment': {
1869
- 'Type_Of_Legal_Problem': 'Unemployment'
2166
+ Unemployment: {
2167
+ Type_Of_Legal_Problem: "Unemployment",
1870
2168
  },
1871
- 'Other Workplace Issues': {
1872
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
2169
+ "Other Workplace Issues": {
2170
+ Type_Of_Legal_Problem: "Employment and Workplace",
1873
2171
  },
1874
2172
  // Malpractice
1875
- 'Attorney Malpractice': {
1876
- 'Type_Of_Legal_Problem': 'Civil Lawsuit'
2173
+ "Attorney Malpractice": {
2174
+ Type_Of_Legal_Problem: "Civil Lawsuit",
1877
2175
  },
1878
- 'Other Malpractice Issues': {
1879
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
2176
+ "Other Malpractice Issues": {
2177
+ Type_Of_Legal_Problem: "Not Sure or Other",
1880
2178
  },
1881
2179
  // Repossession
1882
- 'Vehicle Repossession': {
1883
- 'Type_Of_Legal_Problem': 'Bankruptcy'
2180
+ "Vehicle Repossession": {
2181
+ Type_Of_Legal_Problem: "Bankruptcy",
1884
2182
  },
1885
- 'Property Repossession': {
1886
- 'Type_Of_Legal_Problem': 'Bankruptcy'
2183
+ "Property Repossession": {
2184
+ Type_Of_Legal_Problem: "Bankruptcy",
1887
2185
  },
1888
- 'Other Repossession Issues': {
1889
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
2186
+ "Other Repossession Issues": {
2187
+ Type_Of_Legal_Problem: "Not Sure or Other",
1890
2188
  },
1891
2189
  // Real Estate
1892
- 'Contracts and Agreements': {
1893
- 'Type_Of_Legal_Problem': 'Real Estate'
2190
+ "Contracts and Agreements": {
2191
+ Type_Of_Legal_Problem: "Real Estate",
1894
2192
  },
1895
- 'Deeds, Liens, and Titles': {
1896
- 'Type_Of_Legal_Problem': 'Real Estate'
2193
+ "Deeds, Liens, and Titles": {
2194
+ Type_Of_Legal_Problem: "Real Estate",
1897
2195
  },
1898
- 'Foreclosure': {
1899
- 'Type_Of_Legal_Problem': 'Foreclosure'
2196
+ Foreclosure: {
2197
+ Type_Of_Legal_Problem: "Foreclosure",
1900
2198
  },
1901
- 'Insurance': {
1902
- 'Type_Of_Legal_Problem': 'Insurance'
2199
+ Insurance: {
2200
+ Type_Of_Legal_Problem: "Insurance",
1903
2201
  },
1904
- 'Landlord and Tenant': {
1905
- 'Type_Of_Legal_Problem': 'Landlord and Tenant',
2202
+ "Landlord and Tenant": {
2203
+ Type_Of_Legal_Problem: "Landlord and Tenant",
1906
2204
  },
1907
- 'Loans and Mortgages': {
1908
- 'Type_Of_Legal_Problem': 'Real Estate',
2205
+ "Loans and Mortgages": {
2206
+ Type_Of_Legal_Problem: "Real Estate",
1909
2207
  },
1910
- 'Wills, Trusts, and Estates': {
1911
- 'Type_Of_Legal_Problem': 'Wills and Trusts'
2208
+ "Wills, Trusts, and Estates": {
2209
+ Type_Of_Legal_Problem: "Wills and Trusts",
1912
2210
  },
1913
- 'Property Damage': {
1914
- 'Type_Of_Legal_Problem': 'Property Damage'
2211
+ "Property Damage": {
2212
+ Type_Of_Legal_Problem: "Property Damage",
1915
2213
  },
1916
- 'Other Real Estate Issues': {
1917
- 'Type_Of_Legal_Problem': 'Real Estate'
1918
- }
1919
- }
2214
+ "Other Real Estate Issues": {
2215
+ Type_Of_Legal_Problem: "Real Estate",
2216
+ },
2217
+ },
1920
2218
  };
1921
2219
 
1922
2220
  const TOLPCommentsPlaceholders = {
1923
- 'Adoption': 'Example: "I need help with adoption forms"',
1924
- 'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1925
- '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"',
1926
- 'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
1927
- 'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
1928
- 'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
1929
- 'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
1930
- 'Child Custody': 'Example: "Need help getting custody"',
1931
- 'Child Support': 'Example: "Issues with child support payments"',
1932
- 'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
1933
- 'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
1934
- 'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
1935
- 'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
1936
- 'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
1937
- 'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
1938
- 'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
1939
- 'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
1940
- 'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
1941
- 'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
1942
- 'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
1943
- 'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
1944
- 'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
1945
- 'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
1946
- 'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
1947
- 'Guardianship': 'Example: "I need help with guardianship documents"',
1948
- 'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
1949
- 'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
1950
- 'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
1951
- 'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
1952
- 'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
1953
- 'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
1954
- 'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
1955
- 'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
1956
- 'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
1957
- 'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
1958
- 'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
1959
- '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"',
1960
- 'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
1961
- 'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
1962
- 'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
1963
- 'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
1964
- 'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
1965
- 'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
1966
- 'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
1967
- 'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
1968
- '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"',
1969
- 'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
1970
- 'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
1971
- 'Unemployment': 'Example: "I need help filing for unemployment benefits"',
1972
- 'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
1973
- 'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
1974
- 'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
1975
- 'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
1976
- 'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
1977
- 'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
2221
+ Adoption: 'Example: "I need help with adoption forms"',
2222
+ "Asbestos and Mesothelioma": 'Example: "I was exposed to asbestos at work and would like to file a claim"',
2223
+ "Auto and Car Accidents":
2224
+ 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
2225
+ Bankruptcy: 'Example: "I need help filing for bankruptcy"',
2226
+ "Birth Certificate and Name Change": 'Example: "Just married and would like to change my last name"',
2227
+ "Business Lawyers": 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
2228
+ "Child Custody and Support": 'Example: "Need help getting custody" or "Issues with child support payments"',
2229
+ "Child Custody": 'Example: "Need help getting custody"',
2230
+ "Child Support": 'Example: "Issues with child support payments"',
2231
+ "Civil Rights and Discrimination": 'Example: "Police brutality" or "Coworker keeps harassing me"',
2232
+ "Civil Lawsuit":
2233
+ 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
2234
+ "File a Lawsuit": 'Example: "A contractor took my money and never completed the job"',
2235
+ "Defend a Lawsuit": 'Example: "I am being sued by a neighbor"',
2236
+ "Consumer Lawyers":
2237
+ 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
2238
+ "Copyrights and Trademarks": 'Example: "I would like to register a trademark or copyright a name"',
2239
+ "Criminal and Felony":
2240
+ 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
2241
+ "Debt and Collections": 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
2242
+ "Divorce and Separation": 'Example: "I would like to file for an uncontested divorce"',
2243
+ "DUI and DWI": 'Example: "I was arrested for DUI and need legal defense"',
2244
+ "Elder Law": 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
2245
+ "Employment and Workplace": 'Example: "I was injured while on the job" or "My company is discriminating against me"',
2246
+ Expungement: 'Example: "I would like to file for an expungement and clear my record"',
2247
+ "Family Issues": 'Example: "I need help with guardianship" or "I need a simple will created"',
2248
+ Foreclosure: 'Example: "I need help to avoid foreclosure on my house"',
2249
+ Guardianship: 'Example: "I need help with guardianship documents"',
2250
+ "Harassment and Discrimination": 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
2251
+ "Sexual Harassment": 'Example: "I am being sexually harassed by a coworker"',
2252
+ "Workplace Harassment": 'Example: "My coworker is being aggressive towards me"',
2253
+ "Non-Workplace Harassment": 'Example: "My neighbor is harassing me"',
2254
+ "Workplace Discrimination": 'Example: "I am being discriminated at work based on my age"',
2255
+ "Non-Workplace Discrimination": 'Example: "I am being discriminated against by a local official"',
2256
+ "Identity Theft": 'Example: "Someone stole my identity and I need help fixing the issue"',
2257
+ "Immigration and Visas": 'Example: "I need help filing for a visa" or "Help with a green card"',
2258
+ Insurance: 'Example: "I need help filing an insurance claim for damage to my house"',
2259
+ "Landlord and Tenant":
2260
+ 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
2261
+ "Lemon Law": 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
2262
+ "Long Term Disability":
2263
+ 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
2264
+ "Medical Malpractice": 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
2265
+ "Patents and Intellectual Property": 'Example: "I would like to file for a patent" or "I need to copyright a name"',
2266
+ "Personal Injury": 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
2267
+ "Power of Attorney": 'Example: "I need help with a limited or general power of attorney"',
2268
+ "Probate and Estates":
2269
+ 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
2270
+ "Product Liability": 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
2271
+ "Property Damage": 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
2272
+ "Real Estate":
2273
+ 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
2274
+ "Social Security Disability and Insurance":
2275
+ 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
2276
+ "Tax and IRS": 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
2277
+ "Traffic and Tickets":
2278
+ 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
2279
+ Unemployment: 'Example: "I need help filing for unemployment benefits"',
2280
+ "Victim of a Crime": 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
2281
+ "Wills and Trusts": 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
2282
+ "Workers Compensation": 'Example: "I was injured at work and would like to file for workers compensation benefits"',
2283
+ "Wrongful Death": 'Example: "A family member was killed on the job and we need legal representation"',
2284
+ "Wrongful Termination": 'Example: "I was fired by my employer without cause"',
2285
+ "Not Sure or Other": 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"',
1978
2286
  };
1979
2287
 
1980
2288
  const TOLPFinalHeadlines = {
@@ -1982,49 +2290,64 @@ const TOLPFinalHeadlines = {
1982
2290
  };
1983
2291
 
1984
2292
  const TOLPFinalSubHeadlines = {
1985
- 'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
2293
+ Adoption: "You may benefit from speaking with an adoption professional. Please verify your contact information.",
1986
2294
  // 'Asbestos and Mesothelioma': '',
1987
- 'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
1988
- 'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
2295
+ "Auto and Car Accidents":
2296
+ "You may benefit from speaking with an accident professional. Please verify your contact information.",
2297
+ Bankruptcy: "You may benefit from speaking with a bankruptcy professional. Please verify your contact information.",
1989
2298
  // 'Birth Certificate and Name Change': '',
1990
2299
  // 'Business Lawyers': '',
1991
2300
  // 'Child Custody and Support': '',
1992
2301
  // 'Civil Rights and Discrimination': '',
1993
2302
  // 'Civil Lawsuit': '',
1994
2303
  // 'Consumer Lawyers': '',
1995
- 'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
2304
+ "Copyrights and Trademarks":
2305
+ "You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.",
1996
2306
  // 'Criminal and Felony': '',
1997
2307
  // 'Debt and Collections': '',
1998
- 'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
1999
- 'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
2000
- 'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
2308
+ "Divorce and Separation":
2309
+ "You may benefit from speaking with a divorce professional. Please verify your contact information.",
2310
+ "DUI and DWI": "You may benefit from speaking with a DUI professional. Please verify your contact information.",
2311
+ "Elder Law": "You may benefit from speaking with an elder law professional. Please verify your contact information.",
2001
2312
  // 'Employment and Workplace': '',
2002
2313
  // 'Expungement': '',
2003
2314
  // 'Family Issues': '',
2004
- 'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
2005
- 'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
2315
+ Foreclosure: "You may benefit from speaking with a foreclosure professional. Please verify your contact information.",
2316
+ Guardianship:
2317
+ "You may benefit from speaking with a guardianship professional. Please verify your contact information.",
2006
2318
  // 'Harassment and Discrimination': '',
2007
2319
  // 'Identity Theft': '',
2008
- 'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
2320
+ "Immigration and Visas":
2321
+ "You may benefit from speaking with a immigration professional. Please verify your contact information.",
2009
2322
  // 'Insurance': '',
2010
- 'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
2323
+ "Landlord and Tenant":
2324
+ "You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.",
2011
2325
  // 'Lemon Law': '',
2012
- 'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
2013
- 'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
2014
- 'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
2015
- 'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
2326
+ "Long Term Disability":
2327
+ "You may benefit from speaking with a disability legal professional. Please verify your contact information.",
2328
+ "Medical Malpractice":
2329
+ "You may benefit from speaking with a malpractice professional. Please verify your contact information.",
2330
+ "Patents and Intellectual Property":
2331
+ "You may benefit from speaking with a patent professional. Please verify your contact information.",
2332
+ "Personal Injury":
2333
+ "You may benefit from speaking with a personal injury professional. Please verify your contact information.",
2016
2334
  // 'Power of Attorney': '',
2017
- 'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
2335
+ "Probate and Estates":
2336
+ "You may benefit from speaking with a probate and estate professional. Please verify your contact information.",
2018
2337
  // 'Product Liability': '',
2019
2338
  // 'Property Damage': '',
2020
- 'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
2021
- 'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
2022
- 'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
2339
+ "Real Estate":
2340
+ "You may benefit from speaking with a real estate professional. Please verify your contact information.",
2341
+ "Social Security Disability and Insurance":
2342
+ "You may benefit from speaking with an SSDI professional. Please verify your contact information.",
2343
+ "Tax and IRS": "You may benefit from speaking with a tax professional. Please verify your contact information.",
2023
2344
  // 'Traffic and Tickets': '',
2024
- 'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
2345
+ Unemployment:
2346
+ "You may benefit from speaking with an unemployment professional. Please verify your contact information.",
2025
2347
  // 'Victim of a Crime': '',
2026
2348
  // 'Wills and Trusts': '',
2027
- 'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
2349
+ "Workers Compensation":
2350
+ "You may benefit from speaking with a workers compensation professional. Please verify your contact information.",
2028
2351
  // 'Wrongful Death': '',
2029
2352
  // 'Wrongful Termination': '',
2030
2353
  // 'Not Sure or Other': ''
@@ -2037,37 +2360,31 @@ const TOLPFinalSubHeadlines = {
2037
2360
 
2038
2361
  const nextStepsMapLegalLegacy = {
2039
2362
  values: {
2040
- '*': [
2041
- 'TOLPQuestions',
2042
- 'commentsWithBankruptcy',
2043
- 'legalCrossSells',
2044
- 'firstAndLast',
2045
- 'contactInfo',
2046
- ]
2047
- }
2363
+ "*": ["TOLPQuestions", "commentsWithBankruptcy", "legalCrossSells", "firstAndLast", "contactInfo"],
2364
+ },
2048
2365
  };
2049
2366
 
2050
2367
  const nextStepsMapLegalCrossSells = {
2051
2368
  values: {
2052
- 'Legal_CrossSells': {
2053
- 'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
2054
- 'Personal Injury': ['personalInjuryCrossSellQuestions'],
2055
- 'Workers Compensation': ['workersCompensationCrossSellQuestions'],
2056
- 'DUI and DWI': ['duiAndDWICrossSellQuestions'],
2057
- 'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
2058
- 'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
2059
- 'Bankruptcy': ['bankruptcyCrossSellQuestions'],
2060
- 'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
2061
- 'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
2062
- 'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
2063
- 'Child Custody': ['childCustodyCrossSellQuestions'],
2064
- },
2065
- '*': ['firstAndLast', 'contactInfo'],
2369
+ Legal_CrossSells: {
2370
+ "Auto and Car Accidents": ["autoAndCarAccidentCrossSellQuestions"],
2371
+ "Personal Injury": ["personalInjuryCrossSellQuestions"],
2372
+ "Workers Compensation": ["workersCompensationCrossSellQuestions"],
2373
+ "DUI and DWI": ["duiAndDWICrossSellQuestions"],
2374
+ "Long Term Disability": ["longTermDisabilityCrossSellQuestions"],
2375
+ "Social Security Disability and Insurance": ["ssdiCrossSellQuestions"],
2376
+ Bankruptcy: ["bankruptcyCrossSellQuestions"],
2377
+ "Power of Attorney": ["powerOfAttorneyCrossSellQuestions"],
2378
+ "Wills and Trusts": ["willsAndTrustsCrossSellQuestions"],
2379
+ "Divorce and Separation": ["divorceAndSeparationCrossSellQuestions"],
2380
+ "Child Custody": ["childCustodyCrossSellQuestions"],
2381
+ },
2382
+ "*": ["firstAndLast", "contactInfo"],
2066
2383
  },
2067
-
2384
+
2068
2385
  // NOTE: this assumes a certain placement of the cross sell question
2069
2386
  // in the form flow.
2070
- appendSteps: ['firstAndLast', 'contactInfo'],
2387
+ appendSteps: ["firstAndLast", "contactInfo"],
2071
2388
  matchesAllowed: 1,
2072
2389
  };
2073
2390