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
@@ -6,14 +6,97 @@ 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
- 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.";
10
-
11
- const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
12
- const DEFAULT_COMMENTS_LABEL = 'Please briefly describe your legal issue in a few words:';
13
- const DEFAULT_FINAL_HEADLINE = 'Submit Your Case';
14
- const DEFAULT_FINAL_HEADLINE_DYNAMIC = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
15
- const DEFAULT_FINAL_SUBHEADLINE = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
16
- const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
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.";
16
+ 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',
23
+ };
24
+ const CROSS_SELL_OPTION_MAP_LEGAL = {
25
+ // 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',
33
+ },
34
+ "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
+ // TODO add one more?
41
+ },
42
+ "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
+ // TODO add one more?
49
+ },
50
+ "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',
57
+ },
58
+ "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',
65
+ },
66
+ "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',
73
+ },
74
+ "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',
81
+ },
82
+ "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',
89
+ },
90
+ "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',
97
+ },
98
+ '*': defaultLegalImprovementCrossSells,
99
+ };
17
100
 
18
101
  // ------ Common Base Settings
19
102
 
@@ -166,6 +249,14 @@ const sbsText = (updates) => {
166
249
  return text(updates)
167
250
  };
168
251
 
252
+ const verticalText = (updates) => {
253
+ updates.wrapperClass = 't-flex t-justify-center';
254
+ updates.messagesClass = 't-flex t-justify-center';
255
+ updates.inputClass = 't-text-center';
256
+ updates.helpClass = 't-mt-2.5 !t-text-sm t-text-center';
257
+ return text(updates)
258
+ };
259
+
169
260
  const textArea = (updates) => {
170
261
  if (updates.name && !updates.id) {
171
262
  updates.id = updates.name;
@@ -203,20 +294,101 @@ const sbsDate = (updates) => {
203
294
  return date(updates)
204
295
  };
205
296
 
206
- const applicantAge = (scope) => sbsText({
207
- name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
208
- label: 'Age of Applicant?',
209
- placeholder: 'Age between 18 and 65',
210
- maxlength: 2,
211
- inputmode: "numeric",
212
- validation: "required|min:18,max:65",
297
+ const email = (scope) => sbsText({
298
+ $formkit: 'email',
299
+ name: scope ? scope + ':' + 'Email' : 'Email',
300
+ label: 'Email Address:',
301
+ placeholder: 'email@domain.com',
302
+ autocomplete: 'email',
303
+ 'data-tf-sensitive': 'false',
304
+ validation: 'required|email',
305
+ validationMessages: {
306
+ required: 'Email is required',
307
+ email: 'Invalid Email'
308
+ }
309
+ });
310
+
311
+ const firstName = (scope) => sbsText({
312
+ label: 'First Name:',
313
+ placeholder: 'First',
314
+ name: scope ? scope + ':' + 'First_Name' : 'First_Name',
315
+ autocomplete: "given-name",
213
316
  validationMessages: {
214
- required: 'Applicant Age is required',
215
- min: 'Invalid Age - must be between 18 and 65',
216
- max: 'Invalid Age - must be between 18 and 65',
317
+ required: 'First Name is required'
217
318
  }
218
319
  });
219
320
 
321
+ const lastName = (scope) => sbsText({
322
+ label: 'Last Name:',
323
+ placeholder: 'Last',
324
+ name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
325
+ autocomplete: "family-name",
326
+ validationMessages: {
327
+ required: 'Last Name is required'
328
+ }
329
+ });
330
+
331
+ const phone = (scope) => sbsText({
332
+ $formkit: 'tel',
333
+ name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
334
+ label: 'Phone Number:',
335
+ placeholder: '###-###-####',
336
+ maxlength: 12,
337
+ help: '10-digit phone number, hyphens optional',
338
+ autocomplete: 'tel-national',
339
+ 'data-tf-sensitive': 'false',
340
+ validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
341
+ validationMessages: {
342
+ required: 'Field is required',
343
+ matches: 'Invalid Phone Format, use ###-###-####',
344
+ valid_phone: 'Invalid Phone Number'
345
+ },
346
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
347
+ });
348
+
349
+
350
+ const zipcode$1 = (scope, vertical, updates = {}) => {
351
+ const func = vertical ? verticalText : sbsText;
352
+ const label = vertical ? (updates.label) : 'Zip Code:';
353
+ const help = vertical ? (updates.help ?? "We try to match you with local help") : null;
354
+ return func({
355
+ label,
356
+ help,
357
+ placeholder: '#####',
358
+ name: scope ? scope + ':' + 'Zip' : 'Zip',
359
+ maxlength: 5,
360
+ inputmode: "numeric",
361
+ autocomplete: 'postal-code',
362
+ validation: 'required|matches:/^[0-9]{5}$/',
363
+ validationMessages: {
364
+ required: 'Zip Code is required',
365
+ matches: 'Invalid Zip Code'
366
+ },
367
+ ...updates
368
+ })
369
+ };
370
+
371
+ const applicantAge = (scope, vertical, updates = {}) => {
372
+ const func = vertical ? verticalText : sbsText;
373
+ const label = vertical ? (updates.label) : 'Age of Applicant?';
374
+ const value = vertical ? (updates.value ?? "50") : null;
375
+ return func(merge({
376
+ label,
377
+ placeholder: 'Age between 18 and 65',
378
+ name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
379
+ value,
380
+ maxlength: 2,
381
+ inputmode: "numeric",
382
+ validation: "required|min:18,max:65",
383
+ validationMessages: {
384
+ required: 'Applicant Age is required',
385
+ min: 'Invalid Age - must be between 18 and 65',
386
+ max: 'Invalid Age - must be between 18 and 65',
387
+ },
388
+ ...updates
389
+ }))
390
+ };
391
+
220
392
  const atFault = (scope) => sbsYesNoRadio({
221
393
  name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
222
394
  label: 'Were You at Fault?'
@@ -350,20 +522,6 @@ const doctorTreatment = (scope) => sbsYesNoRadio({
350
522
  label: 'Have You Recently Been Treated by a Doctor, Hospital or Clinic?',
351
523
  });
352
524
 
353
- const email = (scope) => sbsText({
354
- $formkit: 'email',
355
- name: scope ? scope + ':' + 'Email' : 'Email',
356
- label: 'Email Address:',
357
- placeholder: 'email@domain.com',
358
- autocomplete: 'email',
359
- 'data-tf-sensitive': 'false',
360
- validation: 'required|email',
361
- validationMessages: {
362
- required: 'Email is required',
363
- email: 'Invalid Email'
364
- }
365
- });
366
-
367
525
  const estateLegalServicesNeeded = (scope) => sbsSelect({
368
526
  name: scope ? scope + ':' + 'Estate_Legal_Services_Needed' : 'Estate_Legal_Services_Needed',
369
527
  label: "Legal Services Needed for Your Estate:",
@@ -377,17 +535,6 @@ const estateLegalServicesNeeded = (scope) => sbsSelect({
377
535
  ]
378
536
  });
379
537
 
380
- const firstName = (scope) => sbsText({
381
- $formkit: 'text',
382
- label: 'First Name:',
383
- placeholder: 'First',
384
- name: scope ? scope + ':' + 'First_Name' : 'First_Name',
385
- autocomplete: "given-name",
386
- validationMessages: {
387
- required: 'First Name is required'
388
- }
389
- });
390
-
391
538
  const haveAttorney$1 = (scope) => sbsYesNoRadio({
392
539
  name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
393
540
  label: 'Already Working with An Attorney?'
@@ -406,17 +553,6 @@ const incidentDate = (scope) => sbsDate({
406
553
  label: 'Date of Incident:',
407
554
  });
408
555
 
409
- const lastName = (scope) => sbsText({
410
- $formkit: 'text',
411
- label: 'Last Name:',
412
- placeholder: 'Last',
413
- name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
414
- autocomplete: "family-name",
415
- validationMessages: {
416
- required: 'Last Name is required'
417
- }
418
- });
419
-
420
556
  const lawyerPaymentMethodCenter = (scope) => col2RadioCenter({
421
557
  name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
422
558
  help: 'No payment necessary to start a consultation.',
@@ -435,69 +571,7 @@ const legalCrossSells$1 = () => col2Checkbox({
435
571
  help: 'Just hit "Next" if none apply',
436
572
  helpClass: 't-text-center !t-text-sm',
437
573
  validation: null,
438
- options: {
439
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Auto and Car Accidents"',
440
- then: {
441
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
442
- 'Wills and Trusts': 'Need a Will or Trust',
443
- 'Workers Compensation': 'Workplace Injury',
444
- 'Power of Attorney': 'Update Power of Attorney',
445
- 'Divorce and Separation': 'Need a Divorce or Separation',
446
- 'Child Custody': 'Need help with Child Custody',
447
- },
448
- else: {
449
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Personal Injury" || $getVal($get(form), "Type_Of_Legal_Problem") === "Workers Compensation"',
450
- then: {
451
- 'DUI and DWI': 'Involved in a DUI/DWI',
452
- 'Wills and Trusts': 'Need a Will or Trust',
453
- 'Power of Attorney': 'Update Power of Attorney',
454
- 'Divorce and Separation': 'Need a Divorce or Separation',
455
- 'Child Custody': 'Need help with Child Custody',
456
- // TODO add one more?
457
- },
458
- else: {
459
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "DUI and DWI"',
460
- then: {
461
- 'Personal Injury': 'Personal or Workplace Injury',
462
- 'Wills and Trusts': 'Need a Will or Trust',
463
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
464
- 'Power of Attorney': 'Update Power of Attorney',
465
- 'Divorce and Separation': 'Need a Divorce or Separation',
466
- 'Child Custody': 'Need help with Child Custody',
467
- },
468
- else: {
469
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Wills and Trusts" || $getVal($get(form), "Type_Of_Legal_Problem") === "Probate and Estates" || $getVal($get(form), "Type_Of_Legal_Problem") === "Power of Attorney"',
470
- then: {
471
- 'Auto and Car Accidents': 'Injured in a Car Accident',
472
- 'Personal Injury': 'Personal or Workplace Injury',
473
- 'DUI and DWI': 'Involved in a DUI/DWI',
474
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
475
- 'Divorce and Separation': 'Need a Divorce or Separation',
476
- 'Child Custody': 'Need help with Child Custody',
477
- },
478
- else: {
479
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Long Term Disability" || $getVal($get(form), "Type_Of_Legal_Problem") === "Social Security Disability and Insurance"',
480
- then: {
481
- 'Auto and Car Accidents': 'Injured in a Car Accident',
482
- 'DUI and DWI': 'Involved in a DUI/DWI',
483
- 'Wills and Trusts': 'Need a Will or Trust',
484
- 'Power of Attorney': 'Update Power of Attorney',
485
- 'Divorce and Separation': 'Need a Divorce or Separation',
486
- 'Child Custody': 'Need help with Child Custody',
487
- },
488
- else: {
489
- 'Auto and Car Accidents': 'Injured in a Car Accident',
490
- 'Personal Injury': 'Personal or Workplace Injury',
491
- 'DUI and DWI': 'Involved in a DUI/DWI',
492
- 'Wills and Trusts': 'Need a Will or Trust',
493
- 'Power of Attorney': 'Update Power of Attorney',
494
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
495
- }
496
- }
497
- }
498
- }
499
- }
500
- }
574
+ options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
501
575
  });
502
576
 
503
577
  const maritalStatusCenter = (scope) => col2RadioCenter({
@@ -517,24 +591,6 @@ const pendingCharges = (scope) => sbsYesNoRadio({
517
591
  label: 'Do you currently have any pending charges?'
518
592
  });
519
593
 
520
- const phone = (scope) => sbsText({
521
- $formkit: 'tel',
522
- name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
523
- label: 'Phone Number:',
524
- placeholder: '###-###-####',
525
- maxlength: 12,
526
- help: '10-digit phone number, hyphens optional',
527
- autocomplete: 'tel-national',
528
- 'data-tf-sensitive': 'false',
529
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
530
- validationMessages: {
531
- required: 'Field is required',
532
- matches: 'Invalid Phone Format, use ###-###-####',
533
- valid_phone: 'Invalid Phone Number'
534
- },
535
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
536
- });
537
-
538
594
  const primaryInjury = (scope) => sbs2ColRadio({
539
595
  name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
540
596
  label: 'Primary Injury:',
@@ -631,25 +687,6 @@ const valueOfAssets = (scope) => sbsSelect({
631
687
  ]
632
688
  });
633
689
 
634
- const zipcodeCenter = (updates = {}, scope) => text({
635
- placeholder: '#####',
636
- help: updates.help ?? "We try to match you with local legal help",
637
- name: scope ? scope + ':' + 'Zip' : 'Zip',
638
- maxlength: 5,
639
- inputmode: "numeric",
640
- autocomplete: 'postal-code',
641
- validation: 'required|matches:/^[0-9]{5}$/',
642
- validationMessages: {
643
- required: 'Zip Code is required',
644
- matches: 'Invalid Zip Code'
645
- },
646
- wrapperClass: 't-flex t-justify-center',
647
- messagesClass: 't-flex t-justify-center',
648
- inputClass: 't-text-center',
649
- helpClass: 't-mt-2.5 !t-text-sm t-text-center'
650
- });
651
-
652
-
653
690
  // ------ Question Groups
654
691
 
655
692
  // NOTE: name must be unique within a form!
@@ -857,13 +894,20 @@ function verticalStepSubHeadline(updates) {
857
894
  function commentsStepHeadline(updates) {
858
895
  return {
859
896
  $el: 'h3',
860
- children: updates.headline || 'Additional Case Details',
897
+ children: updates.headline || 'Additional Details',
861
898
  attrs: {
862
899
  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 || '')
863
900
  }
864
901
  }
865
902
  }
866
903
 
904
+ function commentsStepHeadlineLegal(updates) {
905
+ return commentsStepHeadline({
906
+ headline: updates.headline || 'Additional Case Details',
907
+ headlineClass: updates.headlineClass
908
+ })
909
+ }
910
+
867
911
  function firstAndLastStepHeadline(updates) {
868
912
  return {
869
913
  $el: 'h3',
@@ -887,7 +931,7 @@ function legalCrossSellsStepHeadline(updates) {
887
931
  function contactStepHeadline(updates) {
888
932
  return {
889
933
  $el: 'h3',
890
- children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
934
+ children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
891
935
  attrs: {
892
936
  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 || '')
893
937
  }
@@ -897,7 +941,7 @@ function contactStepHeadline(updates) {
897
941
  function contactStepSubHeadline(updates) {
898
942
  return {
899
943
  $el: 'h5',
900
- children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
944
+ children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
901
945
  attrs: {
902
946
  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 || '')
903
947
  }
@@ -937,10 +981,16 @@ const stepDefaults = (step, stepKey) => ({
937
981
  }
938
982
  });
939
983
 
940
- function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
941
- if (typeof nextOnEnter === 'undefined') {
942
- nextOnEnter = true;
943
- }
984
+ function step(name, inputs, updates = {}) {
985
+ const {
986
+ nextOnEnter = true,
987
+ nextOnInput = false,
988
+ stepKey = undefined,
989
+ nextStepMap = undefined,
990
+ triggerRedirectMap = undefined,
991
+ autoFocus = undefined,
992
+ } = updates;
993
+
944
994
  if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
945
995
  const lastInput = findLastInput(inputs[inputs.length - 1]);
946
996
  if (lastInput && nextOnEnter === true) {
@@ -960,6 +1010,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
960
1010
  id: name,
961
1011
  name: name,
962
1012
  nextStepMap: nextStepMap,
1013
+ triggerRedirectMap: triggerRedirectMap,
963
1014
  autoFocus: autoFocus,
964
1015
  children: inputs
965
1016
  }
@@ -970,44 +1021,17 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
970
1021
 
971
1022
  // Single question step
972
1023
  function sqstep(name, input, defaultHeadline, updates = {}) {
1024
+ if (typeof updates.nextOnInput === 'undefined') {
1025
+ updates.nextOnInput = true;
1026
+ }
1027
+
973
1028
  return step(
974
1029
  name,
975
1030
  [
976
1031
  verticalStepHeadline({ headline: updates.headline ?? defaultHeadline, headlineClass: updates.headlineClass }),
977
1032
  ...Array.isArray(input) ? input : [input],
978
1033
  ],
979
- updates.nextOnEnter,
980
- typeof updates.nextOnInput === 'undefined' ? true : updates.nextOnInput,
981
- updates.stepKey,
982
- updates.nextStepMap
983
- )
984
- }
985
-
986
- function commentsWithBankruptcy(updates = {}) {
987
- return step(
988
- 'commentsWithBankruptcy',
989
- [
990
- commentsStepHeadline(updates),
991
- comments({
992
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL : updates.label,
993
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
994
- inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
995
- }, updates.scope),
996
- // TODO: needs scope support
997
- bankruptcyCrossSell(),
998
- {
999
- $el: 'div',
1000
- if: '$get(CrossSell_Bankruptcy).value == true',
1001
- children: [
1002
- comments({
1003
- label: 'Bankruptcy or debt details:',
1004
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1005
- inputClass: '!t-h-16'
1006
- }, 'CrossSell:Bankruptcy')
1007
- ],
1008
- }
1009
- ],
1010
- false // nextOnEnter
1034
+ updates
1011
1035
  )
1012
1036
  }
1013
1037
 
@@ -1023,7 +1047,7 @@ function contactInfo(updates = {}) {
1023
1047
  TCPAConsent(updates.scope),
1024
1048
  secureIcon()
1025
1049
  ],
1026
- false, // nextOnEnter
1050
+ { nextOnEnter: false }
1027
1051
  )
1028
1052
  }
1029
1053
 
@@ -1042,10 +1066,46 @@ function firstAndLastV3(updates = {}, scope) {
1042
1066
  firstName(scope),
1043
1067
  lastName(scope)
1044
1068
  ],
1045
- updates.nextOnEnter
1069
+ updates
1070
+ )
1071
+ }
1072
+
1073
+ function zipcode(updates = {}) {
1074
+ return sqstep(
1075
+ 'zipcode',
1076
+ zipcode$1(updates.scope, true, updates),
1077
+ 'Please verify your Zip Code',
1078
+ updates
1046
1079
  )
1047
1080
  }
1048
1081
 
1082
+ function commentsWithBankruptcy(updates = {}) {
1083
+ return step(
1084
+ 'commentsWithBankruptcy',
1085
+ [
1086
+ commentsStepHeadlineLegal(updates),
1087
+ comments({
1088
+ label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1089
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1090
+ inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1091
+ }, updates.scope),
1092
+ // TODO: needs scope support
1093
+ bankruptcyCrossSell(),
1094
+ {
1095
+ $el: 'div',
1096
+ if: '$get(CrossSell_Bankruptcy).value == true',
1097
+ children: [
1098
+ comments({
1099
+ label: 'Bankruptcy or debt details:',
1100
+ placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1101
+ inputClass: '!t-h-16'
1102
+ }, 'CrossSell:Bankruptcy')
1103
+ ],
1104
+ }
1105
+ ],
1106
+ { nextOnEnter: false }
1107
+ )
1108
+ }
1049
1109
 
1050
1110
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1051
1111
  return step(
@@ -1063,7 +1123,7 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1063
1123
  'CrossSell:Auto_and_Car_Accidents'
1064
1124
  )
1065
1125
  ],
1066
- updates.nextOnEnter
1126
+ updates
1067
1127
  )
1068
1128
  }
1069
1129
 
@@ -1082,7 +1142,7 @@ function duiAndDWICrossSellQuestions(updates = {}) {
1082
1142
  'CrossSell:DUI_and_DWI'
1083
1143
  )
1084
1144
  ],
1085
- updates.nextOnEnter
1145
+ updates
1086
1146
  )
1087
1147
  }
1088
1148
 
@@ -1102,7 +1162,7 @@ function ssdiCrossSellQuestions(updates = {}) {
1102
1162
  'CrossSell:Social_Security_Disability_and_Insurance'
1103
1163
  )
1104
1164
  ],
1105
- updates.nextOnEnter
1165
+ updates
1106
1166
  )
1107
1167
  }
1108
1168
 
@@ -1122,7 +1182,7 @@ function personalInjuryCrossSellQuestions(updates = {}) {
1122
1182
  'CrossSell:Personal_Injury'
1123
1183
  )
1124
1184
  ],
1125
- updates.nextOnEnter
1185
+ updates
1126
1186
  )
1127
1187
  }
1128
1188
 
@@ -1141,7 +1201,7 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1141
1201
  'CrossSell:Power_of_Attorney'
1142
1202
  )
1143
1203
  ],
1144
- updates.nextOnEnter
1204
+ updates
1145
1205
  )
1146
1206
  }
1147
1207
 
@@ -1160,7 +1220,7 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
1160
1220
  'CrossSell:Wills_and_Trusts'
1161
1221
  )
1162
1222
  ],
1163
- updates.nextOnEnter
1223
+ updates
1164
1224
  )
1165
1225
  }
1166
1226
 
@@ -1176,32 +1236,19 @@ function divorceTOLP(updates = {}) {
1176
1236
  },
1177
1237
  divorceTOLPDisplayCenter(),
1178
1238
  ],
1179
- updates.nextOnEnter,
1180
- updates.nextOnInput,
1181
- updates.stepKey,
1182
- updates.nextStepMap
1239
+ updates
1183
1240
  )
1184
1241
  }
1185
1242
 
1186
1243
  function legalCrossSells(updates = {}) {
1244
+ updates.nextOnInput = false;
1245
+ updates.stepKey = '$get(Type_Of_Legal_Problem).value';
1187
1246
  return step(
1188
1247
  'legalCrossSells',
1189
1248
  [
1190
1249
  legalCrossSellsStepHeadline(updates),
1191
1250
  legalCrossSells$1(),
1192
1251
  ],
1193
- updates.nextOnEnter,
1194
- false,
1195
- // Note: we should probably scope this stepKey to this step name
1196
- '$get(Type_Of_Legal_Problem).value'
1197
- )
1198
- }
1199
-
1200
- function zipcode(updates = {}) {
1201
- return sqstep(
1202
- 'zipcode',
1203
- zipcodeCenter(updates, updates.scope),
1204
- 'Please verify your Zip Code',
1205
1252
  updates
1206
1253
  )
1207
1254
  }
@@ -1417,9 +1464,7 @@ function formProps(updates) {
1417
1464
  return props
1418
1465
  }
1419
1466
 
1420
- const metaDefaults = {
1421
- tcpaLanguage: TCPA_LANGUAGE
1422
- };
1467
+ const metaDefaults = {};
1423
1468
 
1424
1469
  function metaProps(updates) {
1425
1470
  const data = merge(
@@ -1432,7 +1477,7 @@ function metaProps(updates) {
1432
1477
  }
1433
1478
  }
1434
1479
 
1435
- function defaultMetaProps(tolps = null) {
1480
+ function defaultMetaPropsLegal(tolps = null) {
1436
1481
  let commentsPlaceholders = TOLPCommentsPlaceholders;
1437
1482
  let finalHeadlines = TOLPFinalHeadlines;
1438
1483
  let finalSubHeadlines = TOLPFinalSubHeadlines;
@@ -1442,12 +1487,13 @@ function defaultMetaProps(tolps = null) {
1442
1487
  finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
1443
1488
  }
1444
1489
  return metaProps({
1445
- defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1490
+ tcpaLanguage: TCPA_LANGUAGE_LEGAL,
1491
+ defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1446
1492
  commentsPlaceholders: commentsPlaceholders,
1447
- defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
1493
+ defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1448
1494
  finalHeadlines: finalHeadlines,
1449
- defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
1450
- finalSubHeadlines: finalSubHeadlines,
1495
+ defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1496
+ finalSubHeadlines: finalSubHeadlines
1451
1497
  })
1452
1498
  }
1453
1499
 
@@ -1795,355 +1841,395 @@ const nextStepsLegalNoHA = [
1795
1841
  ];
1796
1842
 
1797
1843
  const nextStepsMapGeneralLegal = {
1798
- 'Type_Of_Legal_Problem': {
1799
- 'Adoption': [
1800
- 'maritalStatus',
1801
- 'haveChildren',
1802
- ...nextStepsLegalDefaultLPM
1803
- ],
1804
- 'Asbestos and Mesothelioma': [
1805
- 'incidentDate',
1806
- 'doctorTreatment',
1807
- ...nextStepsLegalDefault
1808
- ],
1809
- 'Auto and Car Accidents': [
1810
- 'incidentDate',
1811
- 'atFault',
1812
- 'primaryInjury',
1813
- 'doctorTreatment',
1814
- 'policeReportFiled',
1815
- ...nextStepsLegalNoDOI
1816
- ],
1817
- 'Bankruptcy': [
1818
- 'totalMonthlyIncome',
1819
- 'totalDebt',
1820
- 'ownRealEstate',
1821
- 'valueOfAssets',
1822
- ...nextStepsLegalDefault
1823
- ],
1824
- 'Business Lawyers': [
1825
- 'businessServices',
1826
- 'businessType',
1827
- 'numEmployeesOfBusiness',
1828
- ...nextStepsLegalDefault
1829
- ],
1830
- 'Child Custody': [
1831
- 'childRelationship',
1832
- 'childHome',
1833
- 'childPrimaryCaregiver',
1834
- ...nextStepsLegalDefaultLPM
1835
- ],
1836
- 'Child Support': [
1837
- 'childRelationship',
1838
- 'childHome',
1839
- 'childPrimaryCaregiver',
1840
- ...nextStepsLegalDefaultLPM
1841
- ],
1842
- 'Civil Rights and Discrimination': [
1843
- 'civilRightsType',
1844
- ...nextStepsLegalDefault
1845
- ],
1846
- 'Civil Lawsuit': [
1847
- 'civilDefense',
1848
- 'lawsuitOtherParty',
1849
- ...nextStepsLegalDefault
1850
- ],
1851
- 'File a Lawsuit': [
1852
- 'civilLawsuitTOLPDisplay',
1853
- 'lawsuitOtherParty',
1854
- ...nextStepsLegalDefault
1855
- ],
1856
- 'Defend a Lawsuit': [
1857
- 'lawsuitOtherParty',
1858
- ...nextStepsLegalDefault
1859
- ],
1860
- 'Consumer Lawyers': [
1861
- 'consumerLawyerType',
1862
- 'incidentDate',
1863
- 'lawsuitOtherParty',
1864
- ...nextStepsLegalDefault
1865
- ],
1866
- 'Criminal and Felony': [
1867
- 'criminalTOLPDisplay',
1868
- 'crimeCommittedDate',
1869
- 'roleInMatterCriminal',
1870
- 'pendingCharges',
1871
- ...nextStepsLegalDefaultLPM
1872
- ],
1873
- 'Debt and Collections': [
1874
- 'totalMonthlyIncome',
1875
- 'totalDebt',
1876
- 'ownRealEstate',
1877
- 'valueOfAssets',
1878
- ...nextStepsLegalDefault
1879
- ],
1880
- 'Divorce and Separation': [
1881
- 'maritalStatus',
1882
- 'haveChildren',
1883
- ...nextStepsLegalDefaultLPM
1884
- ],
1885
- 'DUI and DWI': [
1886
- 'incidentDate',
1887
- 'priorAlcoholOffenses',
1888
- 'typeOfAlcoholTest',
1889
- 'bloodContentAlcoholTest',
1890
- 'pendingCharges',
1891
- ...nextStepsLegalDefault
1892
- ],
1893
- 'Employment and Workplace': [
1894
- 'employmentAndWorkplaceTOLPDisplay',
1895
- 'numEmployeesOfBusiness',
1896
- 'employerType',
1897
- 'employeeAtCompany',
1898
- ...nextStepsLegalDefault
1899
- ],
1900
- 'Expungement': [
1901
- 'incidentDate',
1902
- 'criminalChargeType',
1903
- ...nextStepsLegalDefaultLPM
1904
- ],
1905
- 'Family Issues': [
1906
- 'maritalStatus',
1907
- 'haveChildren',
1908
- ...nextStepsLegalDefaultLPM
1909
- ],
1910
- 'Foreclosure': [
1911
- 'ownRealEstate',
1912
- 'typeOfProperty',
1913
- 'amountPaymentsPastDue',
1914
- 'loanAmount',
1915
- 'defaultNotice',
1916
- ...nextStepsLegalDefault
1917
- ],
1918
- 'Guardianship': [
1919
- 'maritalStatus',
1920
- 'haveChildren',
1921
- ...nextStepsLegalDefaultLPM
1922
- ],
1923
- 'Immigration and Visas': [
1924
- 'countryOfCitizenship',
1925
- 'immigrationLocation',
1926
- 'immigrationEntry',
1927
- 'immigrationType',
1928
- 'immigrationStatus',
1929
- 'immigrationDetails',
1930
- ...nextStepsLegalDefault
1931
- ],
1932
- 'Landlord and Tenant': [
1933
- 'landlordTenantIssue',
1934
- 'landlordTenantParty',
1935
- ...nextStepsLegalDefault
1936
- ],
1937
- 'Lemon Law': [
1938
- 'incidentDate',
1939
- 'lawsuitOtherParty',
1940
- ...nextStepsLegalDefault
1941
- ],
1942
- 'Long Term Disability': [
1943
- 'applicantOccupation',
1944
- 'applicantAge',
1945
- 'applicantLTDisabilityPolicy',
1946
- 'applicantDisabilityHowObtain',
1947
- 'applicantPreviouslyAppliedLtdBenefits',
1948
- 'applicantReceivedDisabilityBenefits',
1949
- 'applicantMonthlySalary',
1950
- ...nextStepsLegalNoDOI
1951
- ],
1952
- 'Medical Malpractice': [
1953
- 'incidentDate',
1954
- 'claimStatus',
1955
- 'doctorTreatment',
1956
- 'medicalMalpracticeInjuries',
1957
- ...nextStepsLegalDefault
1958
- ],
1959
- 'Patents and Intellectual Property': [
1960
- 'patentAssistanceType',
1961
- 'patentFor',
1962
- ...nextStepsLegalDefault
1963
- ],
1964
- 'Personal Injury': [
1965
- 'incidentDate',
1966
- 'claimStatus',
1967
- 'atFault',
1968
- 'primaryInjury',
1969
- 'doctorTreatment',
1970
- ...nextStepsLegalNoDOI
1971
- ],
1972
- 'Probate and Estates': [
1973
- 'valueOfAssets',
1974
- 'typeOfAssets',
1975
- 'roleInMatterProbate',
1976
- 'estateLegalServicesNeeded',
1977
- ...nextStepsLegalDefault
1978
- ],
1979
- 'Property Damage': [
1980
- 'realEstateArea',
1981
- 'wouldLikeLawyerTo',
1982
- ...nextStepsLegalDefault
1983
- ],
1984
- 'Real Estate': [
1985
- 'realEstateTOLPDisplay',
1986
- 'realEstateArea',
1987
- 'wouldLikeLawyerTo',
1988
- ...nextStepsLegalDefault
1989
- ],
1990
- 'Social Security Disability and Insurance': [
1991
- 'applicantAge',
1992
- 'disabilityConditionStopWork',
1993
- 'disabilityWorkHistory',
1994
- 'socialSecurityDisabilityReceivingBenefits',
1995
- 'doctorTreatment',
1996
- ...nextStepsLegalNoDOI
1997
- ],
1998
- 'Tax and IRS': [
1999
- 'totalDebt',
2000
- 'taxProblemDetails',
2001
- 'taxLevel',
2002
- 'taxIssueType',
2003
- ...nextStepsLegalDefault
2004
- ],
2005
- 'Traffic and Tickets': [
2006
- 'driversLicenseType',
2007
- 'trafficViolations',
2008
- 'haveCourtDate',
2009
- ...nextStepsLegalDefault
2010
- ],
2011
- 'Unemployment': [
2012
- 'numEmployeesOfBusiness',
2013
- 'employerType',
2014
- ...nextStepsLegalNoHA
2015
- ],
2016
- 'Victim of a Crime': [
2017
- 'crimeCommittedDate',
2018
- 'roleInMatterCriminal',
2019
- 'pendingCharges',
2020
- ...nextStepsLegalDefaultLPM
2021
- ],
2022
- 'Wills and Trusts': [
2023
- 'valueOfAssets',
2024
- 'typeOfAssets',
2025
- 'roleInMatterProbate',
2026
- 'estateLegalServicesNeeded',
2027
- ...nextStepsLegalDefault
2028
- ],
2029
- 'Workers Compensation': [
2030
- 'incidentDate',
2031
- 'claimStatus',
2032
- 'primaryInjury',
2033
- 'causeOfInjury',
2034
- 'doctorTreatment',
2035
- ...nextStepsLegalNoDOI
2036
- ],
2037
- 'Workplace Harassment': [
2038
- 'numEmployeesOfBusiness',
2039
- 'employerType',
2040
- 'employeeAtCompany',
2041
- ...nextStepsLegalDefault
2042
- ],
2043
- 'Workplace Discrimination': [
2044
- 'numEmployeesOfBusiness',
2045
- 'employerType',
2046
- 'employeeAtCompany',
2047
- ...nextStepsLegalDefault
2048
- ],
2049
- 'Wrongful Death': [
2050
- 'incidentDate',
2051
- 'relationshipToVictim',
2052
- 'criminalChargesFiled',
2053
- 'causeOfDeath',
2054
- ...nextStepsLegalNoDOI
2055
- ],
2056
- 'Wrongful Termination': [
2057
- 'numEmployeesOfBusiness',
2058
- 'employerType',
2059
- ...nextStepsLegalDefault
2060
- ],
2061
- },
2062
- '*': nextStepsLegalDefault
1844
+ values: {
1845
+ 'Type_Of_Legal_Problem': {
1846
+ 'Adoption': [
1847
+ 'maritalStatus',
1848
+ 'haveChildren',
1849
+ ...nextStepsLegalDefaultLPM
1850
+ ],
1851
+ 'Asbestos and Mesothelioma': [
1852
+ 'incidentDate',
1853
+ 'doctorTreatment',
1854
+ ...nextStepsLegalDefault
1855
+ ],
1856
+ 'Auto and Car Accidents': [
1857
+ 'incidentDate',
1858
+ 'atFault',
1859
+ 'primaryInjury',
1860
+ 'doctorTreatment',
1861
+ 'policeReportFiled',
1862
+ ...nextStepsLegalNoDOI
1863
+ ],
1864
+ 'Bankruptcy': [
1865
+ 'totalMonthlyIncome',
1866
+ 'totalDebt',
1867
+ 'ownRealEstate',
1868
+ 'valueOfAssets',
1869
+ ...nextStepsLegalDefault
1870
+ ],
1871
+ 'Business Lawyers': [
1872
+ 'businessServices',
1873
+ 'businessType',
1874
+ 'numEmployeesOfBusiness',
1875
+ ...nextStepsLegalDefault
1876
+ ],
1877
+ 'Child Custody': [
1878
+ 'childRelationship',
1879
+ 'childHome',
1880
+ 'childPrimaryCaregiver',
1881
+ ...nextStepsLegalDefaultLPM
1882
+ ],
1883
+ 'Child Support': [
1884
+ 'childRelationship',
1885
+ 'childHome',
1886
+ 'childPrimaryCaregiver',
1887
+ ...nextStepsLegalDefaultLPM
1888
+ ],
1889
+ 'Civil Rights and Discrimination': [
1890
+ 'civilRightsType',
1891
+ ...nextStepsLegalDefault
1892
+ ],
1893
+ 'Civil Lawsuit': [
1894
+ 'civilDefense',
1895
+ 'lawsuitOtherParty',
1896
+ ...nextStepsLegalDefault
1897
+ ],
1898
+ 'File a Lawsuit': [
1899
+ 'civilLawsuitTOLPDisplay',
1900
+ 'lawsuitOtherParty',
1901
+ ...nextStepsLegalDefault
1902
+ ],
1903
+ 'Defend a Lawsuit': [
1904
+ 'lawsuitOtherParty',
1905
+ ...nextStepsLegalDefault
1906
+ ],
1907
+ 'Consumer Lawyers': [
1908
+ 'consumerLawyerType',
1909
+ 'incidentDate',
1910
+ 'lawsuitOtherParty',
1911
+ ...nextStepsLegalDefault
1912
+ ],
1913
+ 'Criminal and Felony': [
1914
+ 'criminalTOLPDisplay',
1915
+ 'crimeCommittedDate',
1916
+ 'roleInMatterCriminal',
1917
+ 'pendingCharges',
1918
+ ...nextStepsLegalDefaultLPM
1919
+ ],
1920
+ 'Debt and Collections': [
1921
+ 'totalMonthlyIncome',
1922
+ 'totalDebt',
1923
+ 'ownRealEstate',
1924
+ 'valueOfAssets',
1925
+ ...nextStepsLegalDefault
1926
+ ],
1927
+ 'Divorce and Separation': [
1928
+ 'maritalStatus',
1929
+ 'haveChildren',
1930
+ ...nextStepsLegalDefaultLPM
1931
+ ],
1932
+ 'DUI and DWI': [
1933
+ 'incidentDate',
1934
+ 'priorAlcoholOffenses',
1935
+ 'typeOfAlcoholTest',
1936
+ 'bloodContentAlcoholTest',
1937
+ 'pendingCharges',
1938
+ ...nextStepsLegalDefault
1939
+ ],
1940
+ 'Employment and Workplace': [
1941
+ 'employmentAndWorkplaceTOLPDisplay',
1942
+ 'numEmployeesOfBusiness',
1943
+ 'employerType',
1944
+ 'employeeAtCompany',
1945
+ ...nextStepsLegalDefault
1946
+ ],
1947
+ 'Expungement': [
1948
+ 'incidentDate',
1949
+ 'criminalChargeType',
1950
+ ...nextStepsLegalDefaultLPM
1951
+ ],
1952
+ 'Family Issues': [
1953
+ 'maritalStatus',
1954
+ 'haveChildren',
1955
+ ...nextStepsLegalDefaultLPM
1956
+ ],
1957
+ 'Foreclosure': [
1958
+ 'ownRealEstate',
1959
+ 'typeOfProperty',
1960
+ 'amountPaymentsPastDue',
1961
+ 'loanAmount',
1962
+ 'defaultNotice',
1963
+ ...nextStepsLegalDefault
1964
+ ],
1965
+ 'Guardianship': [
1966
+ 'maritalStatus',
1967
+ 'haveChildren',
1968
+ ...nextStepsLegalDefaultLPM
1969
+ ],
1970
+ 'Immigration and Visas': [
1971
+ 'countryOfCitizenship',
1972
+ 'immigrationLocation',
1973
+ 'immigrationEntry',
1974
+ 'immigrationType',
1975
+ 'immigrationStatus',
1976
+ 'immigrationDetails',
1977
+ ...nextStepsLegalDefault
1978
+ ],
1979
+ 'Landlord and Tenant': [
1980
+ 'landlordTenantIssue',
1981
+ 'landlordTenantParty',
1982
+ ...nextStepsLegalDefault
1983
+ ],
1984
+ 'Lemon Law': [
1985
+ 'incidentDate',
1986
+ 'lawsuitOtherParty',
1987
+ ...nextStepsLegalDefault
1988
+ ],
1989
+ 'Long Term Disability': [
1990
+ 'applicantOccupation',
1991
+ 'applicantAge',
1992
+ 'applicantLTDisabilityPolicy',
1993
+ 'applicantDisabilityHowObtain',
1994
+ 'applicantPreviouslyAppliedLtdBenefits',
1995
+ 'applicantReceivedDisabilityBenefits',
1996
+ 'applicantMonthlySalary',
1997
+ ...nextStepsLegalNoDOI
1998
+ ],
1999
+ 'Medical Malpractice': [
2000
+ 'incidentDate',
2001
+ 'claimStatus',
2002
+ 'doctorTreatment',
2003
+ 'medicalMalpracticeInjuries',
2004
+ ...nextStepsLegalDefault
2005
+ ],
2006
+ 'Patents and Intellectual Property': [
2007
+ 'patentAssistanceType',
2008
+ 'patentFor',
2009
+ ...nextStepsLegalDefault
2010
+ ],
2011
+ 'Personal Injury': [
2012
+ 'incidentDate',
2013
+ 'claimStatus',
2014
+ 'atFault',
2015
+ 'primaryInjury',
2016
+ 'doctorTreatment',
2017
+ ...nextStepsLegalNoDOI
2018
+ ],
2019
+ 'Probate and Estates': [
2020
+ 'valueOfAssets',
2021
+ 'typeOfAssets',
2022
+ 'roleInMatterProbate',
2023
+ 'estateLegalServicesNeeded',
2024
+ ...nextStepsLegalDefault
2025
+ ],
2026
+ 'Property Damage': [
2027
+ 'realEstateArea',
2028
+ 'wouldLikeLawyerTo',
2029
+ ...nextStepsLegalDefault
2030
+ ],
2031
+ 'Real Estate': [
2032
+ 'realEstateTOLPDisplay',
2033
+ 'realEstateArea',
2034
+ 'wouldLikeLawyerTo',
2035
+ ...nextStepsLegalDefault
2036
+ ],
2037
+ 'Social Security Disability and Insurance': [
2038
+ 'applicantAge',
2039
+ 'disabilityConditionStopWork',
2040
+ 'disabilityWorkHistory',
2041
+ 'socialSecurityDisabilityReceivingBenefits',
2042
+ 'doctorTreatment',
2043
+ ...nextStepsLegalNoDOI
2044
+ ],
2045
+ 'Tax and IRS': [
2046
+ 'totalDebt',
2047
+ 'taxProblemDetails',
2048
+ 'taxLevel',
2049
+ 'taxIssueType',
2050
+ ...nextStepsLegalDefault
2051
+ ],
2052
+ 'Traffic and Tickets': [
2053
+ 'driversLicenseType',
2054
+ 'trafficViolations',
2055
+ 'haveCourtDate',
2056
+ ...nextStepsLegalDefault
2057
+ ],
2058
+ 'Unemployment': [
2059
+ 'numEmployeesOfBusiness',
2060
+ 'employerType',
2061
+ ...nextStepsLegalNoHA
2062
+ ],
2063
+ 'Victim of a Crime': [
2064
+ 'crimeCommittedDate',
2065
+ 'roleInMatterCriminal',
2066
+ 'pendingCharges',
2067
+ ...nextStepsLegalDefaultLPM
2068
+ ],
2069
+ 'Wills and Trusts': [
2070
+ 'valueOfAssets',
2071
+ 'typeOfAssets',
2072
+ 'roleInMatterProbate',
2073
+ 'estateLegalServicesNeeded',
2074
+ ...nextStepsLegalDefault
2075
+ ],
2076
+ 'Workers Compensation': [
2077
+ 'incidentDate',
2078
+ 'claimStatus',
2079
+ 'primaryInjury',
2080
+ 'causeOfInjury',
2081
+ 'doctorTreatment',
2082
+ ...nextStepsLegalNoDOI
2083
+ ],
2084
+ 'Workplace Harassment': [
2085
+ 'numEmployeesOfBusiness',
2086
+ 'employerType',
2087
+ 'employeeAtCompany',
2088
+ ...nextStepsLegalDefault
2089
+ ],
2090
+ 'Workplace Discrimination': [
2091
+ 'numEmployeesOfBusiness',
2092
+ 'employerType',
2093
+ 'employeeAtCompany',
2094
+ ...nextStepsLegalDefault
2095
+ ],
2096
+ 'Wrongful Death': [
2097
+ 'incidentDate',
2098
+ 'relationshipToVictim',
2099
+ 'criminalChargesFiled',
2100
+ 'causeOfDeath',
2101
+ ...nextStepsLegalNoDOI
2102
+ ],
2103
+ 'Wrongful Termination': [
2104
+ 'numEmployeesOfBusiness',
2105
+ 'employerType',
2106
+ ...nextStepsLegalDefault
2107
+ ],
2108
+ },
2109
+ '*': nextStepsLegalDefault
2110
+ }
2063
2111
  };
2064
2112
 
2065
- const TOLPNextSteps = nextStepsMapGeneralLegal["Type_Of_Legal_Problem"];
2113
+ const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"];
2066
2114
 
2067
2115
  const nextStepsMapDivorce = {
2068
- 'Type_Of_Legal_Problem_Display': {
2069
- 'Alimony or Child Support': TOLPNextSteps["Child Support"],
2070
- 'Child Custody': TOLPNextSteps["Child Custody"],
2071
- 'Not Sure or Other': nextStepsMapGeneralLegal["*"],
2072
- },
2073
- '*': TOLPNextSteps["Divorce and Separation"]
2116
+ values: {
2117
+ 'Type_Of_Legal_Problem_Display': {
2118
+ 'Alimony or Child Support': TOLPNextSteps["Child Support"],
2119
+ 'Child Custody': TOLPNextSteps["Child Custody"],
2120
+ 'Not Sure or Other': nextStepsMapGeneralLegal["values"]["*"],
2121
+ },
2122
+ '*': TOLPNextSteps["Divorce and Separation"]
2123
+ }
2074
2124
  };
2075
2125
 
2076
2126
  ({
2077
- 'Civil_Defense': {
2078
- 'Yes': TOLPNextSteps["Defend a Lawsuit"],
2079
- 'No': TOLPNextSteps["File a Lawsuit"],
2080
- },
2081
- '*': [
2082
- 'lawsuitOtherParty',
2083
- ...nextStepsLegalDefault
2084
- ]
2127
+ values: {
2128
+ 'Civil_Defense': {
2129
+ 'Yes': TOLPNextSteps["Defend a Lawsuit"],
2130
+ 'No': TOLPNextSteps["File a Lawsuit"],
2131
+ },
2132
+ '*': [
2133
+ 'lawsuitOtherParty',
2134
+ ...nextStepsLegalDefault
2135
+ ]
2136
+ }
2085
2137
  });
2086
2138
 
2087
2139
  ({
2088
- 'Type_Of_Legal_Problem': {
2089
- 'Defend a Lawsuit': TOLPNextSteps["Defend a Lawsuit"],
2090
- 'File a Lawsuit': TOLPNextSteps["File a Lawsuit"],
2091
- },
2092
- '*': [
2093
- 'lawsuitOtherParty',
2094
- ...nextStepsLegalDefault
2095
- ]
2140
+ values: {
2141
+ 'Type_Of_Legal_Problem': {
2142
+ 'Defend a Lawsuit': TOLPNextSteps["Defend a Lawsuit"],
2143
+ 'File a Lawsuit': TOLPNextSteps["File a Lawsuit"],
2144
+ },
2145
+ '*': [
2146
+ 'lawsuitOtherParty',
2147
+ ...nextStepsLegalDefault
2148
+ ]
2149
+ }
2096
2150
  });
2097
2151
 
2098
2152
  ({
2099
- 'Type_Of_Legal_Problem_Display': {
2100
- 'Automobile Accident': TOLPNextSteps["Auto and Car Accidents"],
2101
- 'Contract Disputes': TOLPNextSteps["Business Lawyers"],
2102
- 'Dog Bite': TOLPNextSteps["Personal Injury"],
2103
- 'Employment and Workplace': TOLPNextSteps["Employment and Workplace"],
2104
- 'Fraud': TOLPNextSteps["Consumer Lawyers"],
2105
- 'Medical Malpractice': TOLPNextSteps["Medical Malpractice"],
2106
- 'Personal Injury': TOLPNextSteps["Personal Injury"],
2107
- 'Property Damage': TOLPNextSteps["Property Damage"],
2108
- 'Real Estate': TOLPNextSteps["Real Estate"],
2109
- 'Not Sure or Other': nextStepsMapGeneralLegal["*"],
2110
- },
2111
- '*': [
2112
- 'lawsuitOtherParty',
2113
- ...nextStepsLegalDefault
2114
- ]
2153
+ values: {
2154
+ 'Type_Of_Legal_Problem_Display': {
2155
+ 'Automobile Accident': TOLPNextSteps["Auto and Car Accidents"],
2156
+ 'Contract Disputes': TOLPNextSteps["Business Lawyers"],
2157
+ 'Dog Bite': TOLPNextSteps["Personal Injury"],
2158
+ 'Employment and Workplace': TOLPNextSteps["Employment and Workplace"],
2159
+ 'Fraud': TOLPNextSteps["Consumer Lawyers"],
2160
+ 'Medical Malpractice': TOLPNextSteps["Medical Malpractice"],
2161
+ 'Personal Injury': TOLPNextSteps["Personal Injury"],
2162
+ 'Property Damage': TOLPNextSteps["Property Damage"],
2163
+ 'Real Estate': TOLPNextSteps["Real Estate"],
2164
+ 'Not Sure or Other': nextStepsMapGeneralLegal["values"]["*"],
2165
+ },
2166
+ '*': [
2167
+ 'lawsuitOtherParty',
2168
+ ...nextStepsLegalDefault
2169
+ ]
2170
+ }
2115
2171
  });
2116
2172
 
2117
2173
  ({
2118
- 'Type_Of_Legal_Problem_Display': {
2119
- 'Wrongful Termination': TOLPNextSteps["Wrongful Termination"],
2120
- 'Workers Compensation': TOLPNextSteps["Workers Compensation"],
2121
- 'Personal Injury': TOLPNextSteps["Personal Injury"],
2122
- 'Unemployment': TOLPNextSteps["Unemployment"],
2123
- },
2124
- '*': [
2125
- 'numEmployeesOfBusiness',
2126
- 'employerType',
2127
- 'employeeAtCompany',
2128
- ...nextStepsLegalDefault
2129
- ]
2174
+ values: {
2175
+ 'Type_Of_Legal_Problem_Display': {
2176
+ 'Wrongful Termination': TOLPNextSteps["Wrongful Termination"],
2177
+ 'Workers Compensation': TOLPNextSteps["Workers Compensation"],
2178
+ 'Personal Injury': TOLPNextSteps["Personal Injury"],
2179
+ 'Unemployment': TOLPNextSteps["Unemployment"],
2180
+ },
2181
+ '*': [
2182
+ 'numEmployeesOfBusiness',
2183
+ 'employerType',
2184
+ 'employeeAtCompany',
2185
+ ...nextStepsLegalDefault
2186
+ ]
2187
+ }
2130
2188
  });
2131
2189
 
2132
2190
  ({
2133
- 'Type_Of_Legal_Problem_Display': {
2134
- 'Foreclosure': TOLPNextSteps["Foreclosure"],
2135
- 'Landlord and Tenant': TOLPNextSteps["Landlord and Tenant"],
2136
- 'Wills, Trusts, and Estates': TOLPNextSteps["Wills and Trusts"],
2137
- 'Property Damage': TOLPNextSteps['Property Damage'],
2138
- },
2139
- '*': [
2140
- 'realEstateArea',
2141
- 'wouldLikeLawyerTo',
2142
- ...nextStepsLegalDefault
2143
- ]
2191
+ values: {
2192
+ 'Type_Of_Legal_Problem_Display': {
2193
+ 'Foreclosure': TOLPNextSteps["Foreclosure"],
2194
+ 'Landlord and Tenant': TOLPNextSteps["Landlord and Tenant"],
2195
+ 'Wills, Trusts, and Estates': TOLPNextSteps["Wills and Trusts"],
2196
+ 'Property Damage': TOLPNextSteps['Property Damage'],
2197
+ },
2198
+ '*': [
2199
+ 'realEstateArea',
2200
+ 'wouldLikeLawyerTo',
2201
+ ...nextStepsLegalDefault
2202
+ ]
2203
+ }
2144
2204
  });
2145
2205
 
2146
- const meta = defaultMetaProps();
2206
+ const nextStepsMapLegalCrossSells = {
2207
+ values: {
2208
+ 'Legal_CrossSells': {
2209
+ 'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
2210
+ 'Personal Injury': ['personalInjuryCrossSellQuestions'],
2211
+ 'Workers Compensation': ['workersCompensationCrossSellQuestions'],
2212
+ 'DUI and DWI': ['duiAndDWICrossSellQuestions'],
2213
+ 'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
2214
+ 'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
2215
+ 'Bankruptcy': ['bankruptcyCrossSellQuestions'],
2216
+ 'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
2217
+ 'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
2218
+ 'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
2219
+ 'Child Custody': ['childCustodyCrossSellQuestions'],
2220
+ },
2221
+ '*': ['firstAndLast', 'contactInfo'],
2222
+ },
2223
+
2224
+ // NOTE: this assumes a certain placement of the cross sell question
2225
+ // in the form flow.
2226
+ appendSteps: ['firstAndLast', 'contactInfo'],
2227
+ matchesAllowed: 1,
2228
+ };
2229
+
2230
+ const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
2231
+
2232
+ const meta = defaultMetaPropsLegal();
2147
2233
 
2148
2234
  meta.data.dynamicSchema = [
2149
2235
  zipcode(),
@@ -2161,7 +2247,8 @@ meta.data.dynamicSchema = [
2161
2247
  headlineClass: '!t-text-dark',
2162
2248
  }),
2163
2249
  legalCrossSells({
2164
- headlineClass: '!t-text-dark'
2250
+ headlineClass: '!t-text-dark',
2251
+ nextStepMap: nextStepsMapLegalCrossSells,
2165
2252
  }),
2166
2253
  // Note: this is purposefully limited to a subset of values
2167
2254
  // that could show up in the Legal_CrossSells input because
@@ -2187,7 +2274,8 @@ const schema = [
2187
2274
  redirectMap: legalRedirectMap(),
2188
2275
  valueOverrideMap: {
2189
2276
  'Type_Of_Legal_Problem_Display': divorceTOLPDisplayOverrideMap,
2190
- }
2277
+ },
2278
+ crossSellOptionMap: legalCrossSellOptionMap
2191
2279
  }),
2192
2280
  children: [
2193
2281
  progressBar(),