bhl-forms 0.6.15 → 0.7.1

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 (97) hide show
  1. package/dist/bhl-forms.es.js +1757 -1759
  2. package/dist/bhl-forms.iife.js +4 -4
  3. package/dist/bhl-forms.modern.es.js +2804 -2811
  4. package/dist/bhl-forms.modern.iife.js +6 -6
  5. package/dist/bhl-forms.modern.umd.js +6 -6
  6. package/dist/bhl-forms.umd.js +4 -4
  7. package/dist/forms/accidentsAndInjuries.es.js +314 -228
  8. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  9. package/dist/forms/accidentsAndInjuries.json +1 -1
  10. package/dist/forms/appraisals.es.js +16 -7
  11. package/dist/forms/appraisals.iife.js +1 -1
  12. package/dist/forms/business.es.js +317 -236
  13. package/dist/forms/business.iife.js +1 -1
  14. package/dist/forms/business.json +1 -1
  15. package/dist/forms/childAndFamily.es.js +303 -224
  16. package/dist/forms/childAndFamily.iife.js +1 -1
  17. package/dist/forms/childAndFamily.json +1 -1
  18. package/dist/forms/childAndFamilySingle.es.js +643 -555
  19. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  20. package/dist/forms/childAndFamilySingle.json +1 -1
  21. package/dist/forms/civilLawsuit.es.js +637 -551
  22. package/dist/forms/civilLawsuit.iife.js +1 -1
  23. package/dist/forms/civilLawsuit.json +1 -1
  24. package/dist/forms/coins.es.js +16 -7
  25. package/dist/forms/coins.iife.js +1 -1
  26. package/dist/forms/contracts.es.js +307 -227
  27. package/dist/forms/contracts.iife.js +1 -1
  28. package/dist/forms/contracts.json +1 -1
  29. package/dist/forms/criminal.es.js +660 -572
  30. package/dist/forms/criminal.iife.js +1 -1
  31. package/dist/forms/criminal.json +1 -1
  32. package/dist/forms/divorce.es.js +643 -555
  33. package/dist/forms/divorce.iife.js +1 -1
  34. package/dist/forms/divorce.json +1 -1
  35. package/dist/forms/employmentAndWorkplace.es.js +584 -506
  36. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  37. package/dist/forms/employmentAndWorkplace.json +1 -1
  38. package/dist/forms/generalHomeImprovement.es.js +3015 -0
  39. package/dist/forms/generalHomeImprovement.iife.js +1 -0
  40. package/dist/forms/generalHomeImprovement.json +1 -0
  41. package/dist/forms/generalLegal.es.js +341 -244
  42. package/dist/forms/generalLegal.iife.js +1 -1
  43. package/dist/forms/generalLegal.json +1 -1
  44. package/dist/forms/generalLegalJustAnswer.es.js +4542 -0
  45. package/dist/forms/generalLegalJustAnswer.iife.js +1 -0
  46. package/dist/forms/generalLegalJustAnswer.json +1 -0
  47. package/dist/forms/generalLegalPopUnder.es.js +342 -245
  48. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  49. package/dist/forms/generalLegalPopUnder.json +1 -1
  50. package/dist/forms/generalLegalPopUnderSingle.es.js +692 -612
  51. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  52. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  53. package/dist/forms/generalLegalSingle.es.js +692 -612
  54. package/dist/forms/generalLegalSingle.iife.js +1 -1
  55. package/dist/forms/generalLegalSingle.json +1 -1
  56. package/dist/forms/generalLegalThankYou.es.js +204 -158
  57. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  58. package/dist/forms/generalLegalThankYou.json +1 -1
  59. package/dist/forms/generalLegalThankYouConsultation.es.js +692 -612
  60. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  61. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  62. package/dist/forms/harassmentAndDiscrimination.es.js +303 -224
  63. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  64. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  65. package/dist/forms/landlordTenant.es.js +316 -240
  66. package/dist/forms/landlordTenant.iife.js +1 -1
  67. package/dist/forms/landlordTenant.json +1 -1
  68. package/dist/forms/malpractice.es.js +308 -227
  69. package/dist/forms/malpractice.iife.js +1 -1
  70. package/dist/forms/malpractice.json +1 -1
  71. package/dist/forms/mechanics.es.js +184 -166
  72. package/dist/forms/mechanics.iife.js +1 -1
  73. package/dist/forms/mechanics.json +1 -1
  74. package/dist/forms/patentsAndIP.es.js +646 -558
  75. package/dist/forms/patentsAndIP.iife.js +1 -1
  76. package/dist/forms/patentsAndIP.json +1 -1
  77. package/dist/forms/realEstate.es.js +339 -243
  78. package/dist/forms/realEstate.iife.js +1 -1
  79. package/dist/forms/realEstate.json +1 -1
  80. package/dist/forms/repossession.es.js +307 -227
  81. package/dist/forms/repossession.iife.js +1 -1
  82. package/dist/forms/repossession.json +1 -1
  83. package/dist/forms/ssdi.es.js +156 -140
  84. package/dist/forms/ssdi.iife.js +1 -1
  85. package/dist/forms/ssdi.json +1 -1
  86. package/dist/forms/testForm.es.js +69 -51
  87. package/dist/forms/testForm.iife.js +1 -1
  88. package/dist/forms/testForm.json +1 -1
  89. package/dist/forms/testRedirects.es.js +43 -22
  90. package/dist/forms/testRedirects.iife.js +1 -1
  91. package/dist/forms/testRedirects.json +1 -1
  92. package/dist/forms/vets.es.js +16 -7
  93. package/dist/forms/vets.iife.js +1 -1
  94. package/dist/forms/willsAndTrusts.es.js +304 -223
  95. package/dist/forms/willsAndTrusts.iife.js +1 -1
  96. package/dist/forms/willsAndTrusts.json +1 -1
  97. package/package.json +3 -3
@@ -2,14 +2,13 @@ function merge() {
2
2
  return Object.assign({}, ...arguments)
3
3
  }
4
4
 
5
- var TCPA_LANGUAGE = "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.";
6
-
7
- const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
8
- const DEFAULT_COMMENTS_LABEL = 'Please briefly describe your legal issue in a few words:';
9
- const DEFAULT_FINAL_HEADLINE = 'Submit Your Case';
10
- const DEFAULT_FINAL_HEADLINE_DYNAMIC = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
11
- const DEFAULT_FINAL_SUBHEADLINE = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
12
- const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
5
+ const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
6
+ const DEFAULT_COMMENTS_LABEL_LEGAL = 'Please briefly describe your legal issue in a few words:';
7
+ const DEFAULT_FINAL_HEADLINE_LEGAL = 'Submit Your Case';
8
+ const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
9
+ const DEFAULT_FINAL_SUBHEADLINE_LEGAL = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
10
+ const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
11
+ 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.";
13
12
 
14
13
  // ------ Common Base Settings
15
14
 
@@ -126,6 +125,15 @@ const sbsSelect = (updates) => {
126
125
  return select(updates)
127
126
  };
128
127
 
128
+ const verticalSelect = (updates) => {
129
+ updates.labelClass = 'required';
130
+ updates.wrapperClass = 't-flex t-justify-center';
131
+ updates.messagesClass = 't-flex t-justify-center';
132
+ updates.inputClass = 't-min-w-[150px] t-bg-white';
133
+ updates.helpClass = 't-mt-2.5 t-text-center';
134
+ return select(updates)
135
+ };
136
+
129
137
  const text = (updates) => {
130
138
  if (updates.name && !updates.id) {
131
139
  updates.id = updates.name;
@@ -145,6 +153,14 @@ const sbsText = (updates) => {
145
153
  return text(updates)
146
154
  };
147
155
 
156
+ const verticalText = (updates) => {
157
+ updates.wrapperClass = 't-flex t-justify-center';
158
+ updates.messagesClass = 't-flex t-justify-center';
159
+ updates.inputClass = 't-text-center';
160
+ updates.helpClass = 't-mt-2.5 !t-text-sm t-text-center';
161
+ return text(updates)
162
+ };
163
+
148
164
  const textArea = (updates) => {
149
165
  if (updates.name && !updates.id) {
150
166
  updates.id = updates.name;
@@ -182,42 +198,131 @@ const sbsDate = (updates) => {
182
198
  return date(updates)
183
199
  };
184
200
 
185
- const amountPaymentsPastDue = () => sbsSelect({
186
- label: 'Total Amount of Payments that are Past Due:',
187
- name: 'Amount_Payments_Past_Due',
188
- options: [
189
- "$0 - $499",
190
- "$500 - $999",
191
- "$1,000 - $2,499",
192
- "$2,500 - $4,999",
193
- "$5,000 - $9,999",
194
- "$10,000 - $24,999",
195
- "$25,000 - $49,999",
196
- "$50,000 - $99,999",
197
- "More than $100,000"
198
- ]
201
+ const email = (scope) => sbsText({
202
+ $formkit: 'email',
203
+ name: scope ? scope + ':' + 'Email' : 'Email',
204
+ label: 'Email Address:',
205
+ placeholder: 'email@domain.com',
206
+ autocomplete: 'email',
207
+ 'data-tf-sensitive': 'false',
208
+ validation: 'required|email',
209
+ validationMessages: {
210
+ required: 'Email is required',
211
+ email: 'Invalid Email'
212
+ }
199
213
  });
200
214
 
201
- const applicantOccupation = (scope) => sbsText({
202
- name: scope ? scope + ':' + 'Applicant_Occupation' : 'Applicant_Occupation',
203
- label: "What is the Applicant's Occupation?",
204
- placeholder: "Occupation"
215
+ const firstName = (scope) => sbsText({
216
+ label: 'First Name:',
217
+ placeholder: 'First',
218
+ name: scope ? scope + ':' + 'First_Name' : 'First_Name',
219
+ autocomplete: "given-name",
220
+ validationMessages: {
221
+ required: 'First Name is required'
222
+ }
205
223
  });
206
224
 
207
- const applicantAge = (scope) => sbsText({
208
- name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
209
- label: 'Age of Applicant?',
210
- placeholder: 'Age between 18 and 65',
211
- maxlength: 2,
212
- inputmode: "numeric",
213
- validation: "required|min:18,max:65",
225
+ const lastName = (scope) => sbsText({
226
+ label: 'Last Name:',
227
+ placeholder: 'Last',
228
+ name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
229
+ autocomplete: "family-name",
214
230
  validationMessages: {
215
- required: 'Applicant Age is required',
216
- min: 'Invalid Age - must be between 18 and 65',
217
- max: 'Invalid Age - must be between 18 and 65',
231
+ required: 'Last Name is required'
218
232
  }
219
233
  });
220
234
 
235
+ const phone = (scope) => sbsText({
236
+ $formkit: 'tel',
237
+ name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
238
+ label: 'Phone Number:',
239
+ placeholder: '###-###-####',
240
+ maxlength: 12,
241
+ help: '10-digit phone number, hyphens optional',
242
+ autocomplete: 'tel-national',
243
+ 'data-tf-sensitive': 'false',
244
+ validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
245
+ validationMessages: {
246
+ required: 'Field is required',
247
+ matches: 'Invalid Phone Format, use ###-###-####',
248
+ valid_phone: 'Invalid Phone Number'
249
+ },
250
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
251
+ });
252
+
253
+
254
+ const zipcode = (scope, vertical, updates = {}) => {
255
+ const func = vertical ? verticalText : sbsText;
256
+ const label = vertical ? (updates.label) : 'Zip Code:';
257
+ const help = vertical ? (updates.help ?? "We try to match you with local help") : null;
258
+ return func({
259
+ label,
260
+ help,
261
+ placeholder: '#####',
262
+ name: scope ? scope + ':' + 'Zip' : 'Zip',
263
+ maxlength: 5,
264
+ inputmode: "numeric",
265
+ autocomplete: 'postal-code',
266
+ validation: 'required|matches:/^[0-9]{5}$/',
267
+ validationMessages: {
268
+ required: 'Zip Code is required',
269
+ matches: 'Invalid Zip Code'
270
+ },
271
+ ...updates
272
+ })
273
+ };
274
+
275
+ const amountPaymentsPastDue = (scope, vertical, updates = {}) => {
276
+ const func = vertical ? verticalSelect : sbsSelect;
277
+ const label = vertical ? (updates.label) : 'Total Amount of Payments that are Past Due:';
278
+ return func(merge({
279
+ label,
280
+ name: scope ? scope + ':' + 'Amount_Payments_Past_Due' : 'Amount_Payments_Past_Due',
281
+ options: [
282
+ "$0 - $499",
283
+ "$500 - $999",
284
+ "$1,000 - $2,499",
285
+ "$2,500 - $4,999",
286
+ "$5,000 - $9,999",
287
+ "$10,000 - $24,999",
288
+ "$25,000 - $49,999",
289
+ "$50,000 - $99,999",
290
+ "More than $100,000"
291
+ ]
292
+ }, updates))
293
+ };
294
+
295
+ const applicantOccupation = (scope, vertical, updates = {}) => {
296
+ const func = vertical ? verticalText : sbsText;
297
+ const label = vertical ? (updates.label) : "What is the Applicant's Occupation?";
298
+ return func(merge({
299
+ label,
300
+ placeholder: "Occupation",
301
+ name: scope ? scope + ':' + 'Applicant_Occupation' : 'Applicant_Occupation',
302
+ }, updates))
303
+ };
304
+
305
+ const applicantAge = (scope, vertical, updates = {}) => {
306
+ const func = vertical ? verticalText : sbsText;
307
+ const label = vertical ? (updates.label) : 'Age of Applicant?';
308
+ const value = vertical ? (updates.value ?? "50") : null;
309
+ return func(merge({
310
+ label,
311
+ placeholder: 'Age between 18 and 65',
312
+ name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
313
+ value,
314
+ maxlength: 2,
315
+ inputmode: "numeric",
316
+ validation: "required|min:18,max:65",
317
+ validationMessages: {
318
+ required: 'Applicant Age is required',
319
+ min: 'Invalid Age - must be between 18 and 65',
320
+ max: 'Invalid Age - must be between 18 and 65',
321
+ },
322
+ ...updates
323
+ }))
324
+ };
325
+
221
326
  const applicantDisabilityHowObtain = (scope) => sbsSelect({
222
327
  name: scope ? scope + ':' + 'Applicant_Disability_How_Obtain' : 'Applicant_Disability_How_Obtain',
223
328
  label: 'How Did Applicant Obtain the Disability Policy?',
@@ -732,20 +837,6 @@ const driversLicenseType = () => sbs2ItemRadio({
732
837
  ]
733
838
  });
734
839
 
735
- const email = (scope) => sbsText({
736
- $formkit: 'email',
737
- name: scope ? scope + ':' + 'Email' : 'Email',
738
- label: 'Email Address:',
739
- placeholder: 'email@domain.com',
740
- autocomplete: 'email',
741
- 'data-tf-sensitive': 'false',
742
- validation: 'required|email',
743
- validationMessages: {
744
- required: 'Email is required',
745
- email: 'Invalid Email'
746
- }
747
- });
748
-
749
840
  const employerType = () => sbsSelect({
750
841
  label: 'The Employer Is a:',
751
842
  name: 'Employer_Type',
@@ -794,16 +885,6 @@ const estateLegalServicesNeeded = (scope) => sbsSelect({
794
885
  ]
795
886
  });
796
887
 
797
- const firstName = (scope) => sbsText({
798
- $formkit: 'text',
799
- label: 'First Name:',
800
- placeholder: 'First',
801
- name: scope ? scope + ':' + 'First_Name' : 'First_Name',
802
- autocomplete: "given-name",
803
- validationMessages: {
804
- required: 'First Name is required'
805
- }
806
- });
807
888
 
808
889
  const TOLPOptions = [
809
890
  'Adoption',
@@ -951,17 +1032,6 @@ const incidentDate = (scope) => sbsDate({
951
1032
  label: 'Date of Incident:',
952
1033
  });
953
1034
 
954
- const lastName = (scope) => sbsText({
955
- $formkit: 'text',
956
- label: 'Last Name:',
957
- placeholder: 'Last',
958
- name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
959
- autocomplete: "family-name",
960
- validationMessages: {
961
- required: 'Last Name is required'
962
- }
963
- });
964
-
965
1035
  const landlordTenantParty = () => sbsSelect({
966
1036
  label: 'I am the:',
967
1037
  name: 'Landlord_Tenant_Party',
@@ -1108,24 +1178,6 @@ const pendingCharges = (scope) => sbsYesNoRadio({
1108
1178
  label: 'Do you currently have any pending charges?'
1109
1179
  });
1110
1180
 
1111
- const phone = (scope) => sbsText({
1112
- $formkit: 'tel',
1113
- name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
1114
- label: 'Phone Number:',
1115
- placeholder: '###-###-####',
1116
- maxlength: 12,
1117
- help: '10-digit phone number, hyphens optional',
1118
- autocomplete: 'tel-national',
1119
- 'data-tf-sensitive': 'false',
1120
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
1121
- validationMessages: {
1122
- required: 'Field is required',
1123
- matches: 'Invalid Phone Format, use ###-###-####',
1124
- valid_phone: 'Invalid Phone Number'
1125
- },
1126
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
1127
- });
1128
-
1129
1181
  const primaryInjury = (scope) => sbs2ColRadio({
1130
1182
  name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
1131
1183
  label: 'Primary Injury:',
@@ -1392,21 +1444,6 @@ const wouldLikeLawyerTo = () => sbsRadio({
1392
1444
  ]
1393
1445
  });
1394
1446
 
1395
- const zipcode = (scope) => sbsText({
1396
- label: 'Zip Code:',
1397
- placeholder: '#####',
1398
- name: scope ? scope + ':' + 'Zip' : 'Zip',
1399
- maxlength: 5,
1400
- inputmode: "numeric",
1401
- autocomplete: 'postal-code',
1402
- validation: 'required|matches:/^[0-9]{5}$/',
1403
- validationMessages: {
1404
- required: 'Zip Code is required',
1405
- matches: 'Invalid Zip Code'
1406
- }
1407
- });
1408
-
1409
-
1410
1447
  // ------ Question Groups
1411
1448
 
1412
1449
  // NOTE: name must be unique within a form!
@@ -2245,13 +2282,20 @@ function questionsStepHeadline(updates) {
2245
2282
  function commentsStepHeadline(updates) {
2246
2283
  return {
2247
2284
  $el: 'h3',
2248
- children: updates.headline || 'Additional Case Details',
2285
+ children: updates.headline || 'Additional Details',
2249
2286
  attrs: {
2250
2287
  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 || '')
2251
2288
  }
2252
2289
  }
2253
2290
  }
2254
2291
 
2292
+ function commentsStepHeadlineLegal(updates) {
2293
+ return commentsStepHeadline({
2294
+ headline: updates.headline || 'Additional Case Details',
2295
+ headlineClass: updates.headlineClass
2296
+ })
2297
+ }
2298
+
2255
2299
  function firstAndLastStepHeadline(updates) {
2256
2300
  return {
2257
2301
  $el: 'h3',
@@ -2265,7 +2309,7 @@ function firstAndLastStepHeadline(updates) {
2265
2309
  function contactStepHeadline(updates) {
2266
2310
  return {
2267
2311
  $el: 'h3',
2268
- children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
2312
+ children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
2269
2313
  attrs: {
2270
2314
  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 || '')
2271
2315
  }
@@ -2275,7 +2319,7 @@ function contactStepHeadline(updates) {
2275
2319
  function contactStepSubHeadline(updates) {
2276
2320
  return {
2277
2321
  $el: 'h5',
2278
- children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
2322
+ children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
2279
2323
  attrs: {
2280
2324
  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 || '')
2281
2325
  }
@@ -2315,10 +2359,16 @@ const stepDefaults = (step, stepKey) => ({
2315
2359
  }
2316
2360
  });
2317
2361
 
2318
- function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
2319
- if (typeof nextOnEnter === 'undefined') {
2320
- nextOnEnter = true;
2321
- }
2362
+ function step(name, inputs, updates = {}) {
2363
+ const {
2364
+ nextOnEnter = true,
2365
+ nextOnInput = false,
2366
+ stepKey = undefined,
2367
+ nextStepMap = undefined,
2368
+ triggerRedirectMap = undefined,
2369
+ autoFocus = undefined,
2370
+ } = updates;
2371
+
2322
2372
  if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
2323
2373
  const lastInput = findLastInput(inputs[inputs.length - 1]);
2324
2374
  if (lastInput && nextOnEnter === true) {
@@ -2338,6 +2388,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
2338
2388
  id: name,
2339
2389
  name: name,
2340
2390
  nextStepMap: nextStepMap,
2391
+ triggerRedirectMap: triggerRedirectMap,
2341
2392
  autoFocus: autoFocus,
2342
2393
  children: inputs
2343
2394
  }
@@ -2346,6 +2397,34 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
2346
2397
  )
2347
2398
  }
2348
2399
 
2400
+ function contactInfo(updates = {}) {
2401
+ return step(
2402
+ 'contactInfo',
2403
+ [
2404
+ contactStepHeadline(updates),
2405
+ contactStepSubHeadline(updates),
2406
+ trustedFormScript(),
2407
+ email(updates.scope),
2408
+ phone(updates.scope),
2409
+ TCPAConsent(updates.scope),
2410
+ secureIcon()
2411
+ ],
2412
+ { nextOnEnter: false }
2413
+ )
2414
+ }
2415
+
2416
+ function firstAndLastV2(updates = {}) {
2417
+ return step(
2418
+ 'firstAndLast',
2419
+ [
2420
+ firstAndLastStepHeadline(updates),
2421
+ firstName(),
2422
+ lastName()
2423
+ ],
2424
+ updates
2425
+ )
2426
+ }
2427
+
2349
2428
  function generalLegalTOLPAndZip(updates = {}) {
2350
2429
  return step(
2351
2430
  'generalLegalTOLPAndZip',
@@ -2359,10 +2438,7 @@ function generalLegalTOLPAndZip(updates = {}) {
2359
2438
  realEstateTOLPDisplay(),
2360
2439
  zipcode()
2361
2440
  ],
2362
- updates.nextOnEnter,
2363
- updates.nextOnInput,
2364
- updates.stepKey,
2365
- updates.nextStepMap
2441
+ updates
2366
2442
  )
2367
2443
  }
2368
2444
 
@@ -2370,10 +2446,10 @@ function commentsWithBankruptcy(updates = {}) {
2370
2446
  return step(
2371
2447
  'commentsWithBankruptcy',
2372
2448
  [
2373
- commentsStepHeadline(updates),
2449
+ commentsStepHeadlineLegal(updates),
2374
2450
  comments({
2375
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL : updates.label,
2376
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
2451
+ label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
2452
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
2377
2453
  inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
2378
2454
  }, updates.scope),
2379
2455
  // TODO: needs scope support
@@ -2390,39 +2466,10 @@ function commentsWithBankruptcy(updates = {}) {
2390
2466
  ],
2391
2467
  }
2392
2468
  ],
2393
- false // nextOnEnter
2469
+ { nextOnEnter: false }
2394
2470
  )
2395
2471
  }
2396
2472
 
2397
- function contactInfo(updates = {}) {
2398
- return step(
2399
- 'contactInfo',
2400
- [
2401
- contactStepHeadline(updates),
2402
- contactStepSubHeadline(updates),
2403
- trustedFormScript(),
2404
- email(updates.scope),
2405
- phone(updates.scope),
2406
- TCPAConsent(updates.scope),
2407
- secureIcon()
2408
- ],
2409
- false, // nextOnEnter
2410
- )
2411
- }
2412
-
2413
- function firstAndLastV2(updates = {}) {
2414
- return step(
2415
- 'firstAndLast',
2416
- [
2417
- firstAndLastStepHeadline(updates),
2418
- firstName(),
2419
- lastName()
2420
- ],
2421
- updates.nextOnEnter
2422
- )
2423
- }
2424
-
2425
-
2426
2473
  const AllTOLPQuestions = () => {
2427
2474
  return [
2428
2475
  AdoptionQuestions(),
@@ -2493,7 +2540,7 @@ function generalLegalTOLPQuestions(updates = {}) {
2493
2540
  return step(
2494
2541
  'TOLPQuestions',
2495
2542
  questions,
2496
- updates.nextOnEnter
2543
+ updates
2497
2544
  )
2498
2545
  }
2499
2546
 
@@ -2636,9 +2683,7 @@ function formProps(updates) {
2636
2683
  return props
2637
2684
  }
2638
2685
 
2639
- const metaDefaults = {
2640
- tcpaLanguage: TCPA_LANGUAGE
2641
- };
2686
+ const metaDefaults = {};
2642
2687
 
2643
2688
  function metaProps(updates) {
2644
2689
  const data = merge(
@@ -2651,7 +2696,7 @@ function metaProps(updates) {
2651
2696
  }
2652
2697
  }
2653
2698
 
2654
- function defaultMetaProps(tolps = null) {
2699
+ function defaultMetaPropsLegal(tolps = null) {
2655
2700
  let commentsPlaceholders = TOLPCommentsPlaceholders;
2656
2701
  let finalHeadlines = TOLPFinalHeadlines;
2657
2702
  let finalSubHeadlines = TOLPFinalSubHeadlines;
@@ -2661,12 +2706,13 @@ function defaultMetaProps(tolps = null) {
2661
2706
  finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
2662
2707
  }
2663
2708
  return metaProps({
2664
- defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
2709
+ tcpaLanguage: TCPA_LANGUAGE_LEGAL,
2710
+ defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
2665
2711
  commentsPlaceholders: commentsPlaceholders,
2666
- defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
2712
+ defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
2667
2713
  finalHeadlines: finalHeadlines,
2668
- defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
2669
- finalSubHeadlines: finalSubHeadlines,
2714
+ defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
2715
+ finalSubHeadlines: finalSubHeadlines
2670
2716
  })
2671
2717
  }
2672
2718
 
@@ -3110,7 +3156,7 @@ const TOLPFinalSubHeadlines = {
3110
3156
  };
3111
3157
 
3112
3158
  const schema = [
3113
- defaultMetaProps(),
3159
+ defaultMetaPropsLegal(),
3114
3160
  formAnchor(),
3115
3161
  {
3116
3162
  $cmp: 'FormKit',