bhl-forms 0.6.15 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) 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 +278 -215
  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 +288 -226
  13. package/dist/forms/business.iife.js +1 -1
  14. package/dist/forms/business.json +1 -1
  15. package/dist/forms/childAndFamily.es.js +271 -214
  16. package/dist/forms/childAndFamily.iife.js +1 -1
  17. package/dist/forms/childAndFamily.json +1 -1
  18. package/dist/forms/childAndFamilySingle.es.js +614 -545
  19. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  20. package/dist/forms/childAndFamilySingle.json +1 -1
  21. package/dist/forms/civilLawsuit.es.js +608 -541
  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 +275 -217
  27. package/dist/forms/contracts.iife.js +1 -1
  28. package/dist/forms/contracts.json +1 -1
  29. package/dist/forms/criminal.es.js +631 -562
  30. package/dist/forms/criminal.iife.js +1 -1
  31. package/dist/forms/criminal.json +1 -1
  32. package/dist/forms/divorce.es.js +614 -545
  33. package/dist/forms/divorce.iife.js +1 -1
  34. package/dist/forms/divorce.json +1 -1
  35. package/dist/forms/employmentAndWorkplace.es.js +555 -496
  36. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  37. package/dist/forms/employmentAndWorkplace.json +1 -1
  38. package/dist/forms/generalHomeImprovement.es.js +3224 -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 +274 -216
  42. package/dist/forms/generalLegal.iife.js +1 -1
  43. package/dist/forms/generalLegal.json +1 -1
  44. package/dist/forms/generalLegalJustAnswer.es.js +4534 -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 +275 -217
  48. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  49. package/dist/forms/generalLegalPopUnder.json +1 -1
  50. package/dist/forms/generalLegalPopUnderSingle.es.js +645 -573
  51. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  52. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  53. package/dist/forms/generalLegalSingle.es.js +645 -573
  54. package/dist/forms/generalLegalSingle.iife.js +1 -1
  55. package/dist/forms/generalLegalSingle.json +1 -1
  56. package/dist/forms/generalLegalThankYou.es.js +137 -130
  57. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  58. package/dist/forms/generalLegalThankYouConsultation.es.js +645 -573
  59. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  60. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  61. package/dist/forms/harassmentAndDiscrimination.es.js +271 -214
  62. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  63. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  64. package/dist/forms/landlordTenant.es.js +287 -230
  65. package/dist/forms/landlordTenant.iife.js +1 -1
  66. package/dist/forms/landlordTenant.json +1 -1
  67. package/dist/forms/malpractice.es.js +276 -217
  68. package/dist/forms/malpractice.iife.js +1 -1
  69. package/dist/forms/malpractice.json +1 -1
  70. package/dist/forms/mechanics.es.js +171 -165
  71. package/dist/forms/mechanics.iife.js +1 -1
  72. package/dist/forms/mechanics.json +1 -1
  73. package/dist/forms/patentsAndIP.es.js +617 -548
  74. package/dist/forms/patentsAndIP.iife.js +1 -1
  75. package/dist/forms/patentsAndIP.json +1 -1
  76. package/dist/forms/realEstate.es.js +272 -215
  77. package/dist/forms/realEstate.iife.js +1 -1
  78. package/dist/forms/realEstate.json +1 -1
  79. package/dist/forms/repossession.es.js +275 -217
  80. package/dist/forms/repossession.iife.js +1 -1
  81. package/dist/forms/repossession.json +1 -1
  82. package/dist/forms/ssdi.es.js +139 -138
  83. package/dist/forms/ssdi.iife.js +1 -1
  84. package/dist/forms/ssdi.json +1 -1
  85. package/dist/forms/testForm.es.js +55 -52
  86. package/dist/forms/testForm.iife.js +1 -1
  87. package/dist/forms/testRedirects.es.js +28 -22
  88. package/dist/forms/testRedirects.iife.js +1 -1
  89. package/dist/forms/vets.es.js +16 -7
  90. package/dist/forms/vets.iife.js +1 -1
  91. package/dist/forms/willsAndTrusts.es.js +272 -213
  92. package/dist/forms/willsAndTrusts.iife.js +1 -1
  93. package/dist/forms/willsAndTrusts.json +1 -1
  94. 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
 
@@ -212,6 +295,76 @@ const sbsDate = (updates) => {
212
295
  return date(updates)
213
296
  };
214
297
 
298
+ const email = (scope) => sbsText({
299
+ $formkit: 'email',
300
+ name: scope ? scope + ':' + 'Email' : 'Email',
301
+ label: 'Email Address:',
302
+ placeholder: 'email@domain.com',
303
+ autocomplete: 'email',
304
+ 'data-tf-sensitive': 'false',
305
+ validation: 'required|email',
306
+ validationMessages: {
307
+ required: 'Email is required',
308
+ email: 'Invalid Email'
309
+ }
310
+ });
311
+
312
+ const firstName = (scope) => sbsText({
313
+ label: 'First Name:',
314
+ placeholder: 'First',
315
+ name: scope ? scope + ':' + 'First_Name' : 'First_Name',
316
+ autocomplete: "given-name",
317
+ validationMessages: {
318
+ required: 'First Name is required'
319
+ }
320
+ });
321
+
322
+ const lastName = (scope) => sbsText({
323
+ label: 'Last Name:',
324
+ placeholder: 'Last',
325
+ name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
326
+ autocomplete: "family-name",
327
+ validationMessages: {
328
+ required: 'Last Name is required'
329
+ }
330
+ });
331
+
332
+ const phone = (scope) => sbsText({
333
+ $formkit: 'tel',
334
+ name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
335
+ label: 'Phone Number:',
336
+ placeholder: '###-###-####',
337
+ maxlength: 12,
338
+ help: '10-digit phone number, hyphens optional',
339
+ autocomplete: 'tel-national',
340
+ 'data-tf-sensitive': 'false',
341
+ validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
342
+ validationMessages: {
343
+ required: 'Field is required',
344
+ matches: 'Invalid Phone Format, use ###-###-####',
345
+ valid_phone: 'Invalid Phone Number'
346
+ },
347
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
348
+ });
349
+
350
+ const zipcodeCenter = (updates = {}, scope) => text({
351
+ placeholder: '#####',
352
+ help: updates.help ?? "We try to match you with local help",
353
+ name: scope ? scope + ':' + 'Zip' : 'Zip',
354
+ maxlength: 5,
355
+ inputmode: "numeric",
356
+ autocomplete: 'postal-code',
357
+ validation: 'required|matches:/^[0-9]{5}$/',
358
+ validationMessages: {
359
+ required: 'Zip Code is required',
360
+ matches: 'Invalid Zip Code'
361
+ },
362
+ wrapperClass: 't-flex t-justify-center',
363
+ messagesClass: 't-flex t-justify-center',
364
+ inputClass: 't-text-center',
365
+ helpClass: 't-mt-2.5 !t-text-sm t-text-center'
366
+ });
367
+
215
368
  const applicantAge = (scope) => sbsText({
216
369
  name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
217
370
  label: 'Age of Applicant?',
@@ -384,20 +537,6 @@ const doctorTreatment = (scope) => sbsYesNoRadio({
384
537
  label: 'Have You Recently Been Treated by a Doctor, Hospital or Clinic?',
385
538
  });
386
539
 
387
- const email = (scope) => sbsText({
388
- $formkit: 'email',
389
- name: scope ? scope + ':' + 'Email' : 'Email',
390
- label: 'Email Address:',
391
- placeholder: 'email@domain.com',
392
- autocomplete: 'email',
393
- 'data-tf-sensitive': 'false',
394
- validation: 'required|email',
395
- validationMessages: {
396
- required: 'Email is required',
397
- email: 'Invalid Email'
398
- }
399
- });
400
-
401
540
  const estateLegalServicesNeeded = (scope) => sbsSelect({
402
541
  name: scope ? scope + ':' + 'Estate_Legal_Services_Needed' : 'Estate_Legal_Services_Needed',
403
542
  label: "Legal Services Needed for Your Estate:",
@@ -411,17 +550,6 @@ const estateLegalServicesNeeded = (scope) => sbsSelect({
411
550
  ]
412
551
  });
413
552
 
414
- const firstName = (scope) => sbsText({
415
- $formkit: 'text',
416
- label: 'First Name:',
417
- placeholder: 'First',
418
- name: scope ? scope + ':' + 'First_Name' : 'First_Name',
419
- autocomplete: "given-name",
420
- validationMessages: {
421
- required: 'First Name is required'
422
- }
423
- });
424
-
425
553
  const haveAttorney$1 = (scope) => sbsYesNoRadio({
426
554
  name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
427
555
  label: 'Already Working with An Attorney?'
@@ -441,17 +569,6 @@ const incidentDate = (scope) => sbsDate({
441
569
  label: 'Date of Incident:',
442
570
  });
443
571
 
444
- const lastName = (scope) => sbsText({
445
- $formkit: 'text',
446
- label: 'Last Name:',
447
- placeholder: 'Last',
448
- name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
449
- autocomplete: "family-name",
450
- validationMessages: {
451
- required: 'Last Name is required'
452
- }
453
- });
454
-
455
572
  const lawyerPaymentMethod = (scope) => sbsSelect({
456
573
  name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
457
574
  label: 'How Will You Pay for Legal Fees if You Hire a Lawyer?',
@@ -472,69 +589,7 @@ const legalCrossSells$1 = () => col2Checkbox({
472
589
  help: 'Just hit "Next" if none apply',
473
590
  helpClass: 't-text-center !t-text-sm',
474
591
  validation: null,
475
- options: {
476
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Auto and Car Accidents"',
477
- then: {
478
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
479
- 'Wills and Trusts': 'Need a Will or Trust',
480
- 'Workers Compensation': 'Workplace Injury',
481
- 'Power of Attorney': 'Update Power of Attorney',
482
- 'Divorce and Separation': 'Need a Divorce or Separation',
483
- 'Child Custody': 'Need help with Child Custody',
484
- },
485
- else: {
486
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Personal Injury" || $getVal($get(form), "Type_Of_Legal_Problem") === "Workers Compensation"',
487
- then: {
488
- 'DUI and DWI': 'Involved in a DUI/DWI',
489
- 'Wills and Trusts': 'Need a Will or Trust',
490
- 'Power of Attorney': 'Update Power of Attorney',
491
- 'Divorce and Separation': 'Need a Divorce or Separation',
492
- 'Child Custody': 'Need help with Child Custody',
493
- // TODO add one more?
494
- },
495
- else: {
496
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "DUI and DWI"',
497
- then: {
498
- 'Personal Injury': 'Personal or Workplace Injury',
499
- 'Wills and Trusts': 'Need a Will or Trust',
500
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
501
- 'Power of Attorney': 'Update Power of Attorney',
502
- 'Divorce and Separation': 'Need a Divorce or Separation',
503
- 'Child Custody': 'Need help with Child Custody',
504
- },
505
- else: {
506
- 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"',
507
- then: {
508
- 'Auto and Car Accidents': 'Injured in a Car Accident',
509
- 'Personal Injury': 'Personal or Workplace Injury',
510
- 'DUI and DWI': 'Involved in a DUI/DWI',
511
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
512
- 'Divorce and Separation': 'Need a Divorce or Separation',
513
- 'Child Custody': 'Need help with Child Custody',
514
- },
515
- else: {
516
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Long Term Disability" || $getVal($get(form), "Type_Of_Legal_Problem") === "Social Security Disability and Insurance"',
517
- then: {
518
- 'Auto and Car Accidents': 'Injured in a Car Accident',
519
- 'DUI and DWI': 'Involved in a DUI/DWI',
520
- 'Wills and Trusts': 'Need a Will or Trust',
521
- 'Power of Attorney': 'Update Power of Attorney',
522
- 'Divorce and Separation': 'Need a Divorce or Separation',
523
- 'Child Custody': 'Need help with Child Custody',
524
- },
525
- else: {
526
- 'Auto and Car Accidents': 'Injured in a Car Accident',
527
- 'Personal Injury': 'Personal or Workplace Injury',
528
- 'DUI and DWI': 'Involved in a DUI/DWI',
529
- 'Wills and Trusts': 'Need a Will or Trust',
530
- 'Power of Attorney': 'Update Power of Attorney',
531
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
532
- }
533
- }
534
- }
535
- }
536
- }
537
- }
592
+ options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
538
593
  });
539
594
 
540
595
  const maritalStatus = (scope) => sbsSelect({
@@ -603,24 +658,6 @@ const pendingCharges = (scope) => sbsYesNoRadio({
603
658
  label: 'Do you currently have any pending charges?'
604
659
  });
605
660
 
606
- const phone = (scope) => sbsText({
607
- $formkit: 'tel',
608
- name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
609
- label: 'Phone Number:',
610
- placeholder: '###-###-####',
611
- maxlength: 12,
612
- help: '10-digit phone number, hyphens optional',
613
- autocomplete: 'tel-national',
614
- 'data-tf-sensitive': 'false',
615
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
616
- validationMessages: {
617
- required: 'Field is required',
618
- matches: 'Invalid Phone Format, use ###-###-####',
619
- valid_phone: 'Invalid Phone Number'
620
- },
621
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
622
- });
623
-
624
661
  const primaryInjury = (scope) => sbs2ColRadio({
625
662
  name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
626
663
  label: 'Primary Injury:',
@@ -717,25 +754,6 @@ const valueOfAssets = (scope) => sbsSelect({
717
754
  ]
718
755
  });
719
756
 
720
- const zipcodeCenter = (updates = {}, scope) => text({
721
- placeholder: '#####',
722
- help: updates.help ?? "We try to match you with local legal help",
723
- name: scope ? scope + ':' + 'Zip' : 'Zip',
724
- maxlength: 5,
725
- inputmode: "numeric",
726
- autocomplete: 'postal-code',
727
- validation: 'required|matches:/^[0-9]{5}$/',
728
- validationMessages: {
729
- required: 'Zip Code is required',
730
- matches: 'Invalid Zip Code'
731
- },
732
- wrapperClass: 't-flex t-justify-center',
733
- messagesClass: 't-flex t-justify-center',
734
- inputClass: 't-text-center',
735
- helpClass: 't-mt-2.5 !t-text-sm t-text-center'
736
- });
737
-
738
-
739
757
  // ------ Question Groups
740
758
 
741
759
  // NOTE: name must be unique within a form!
@@ -987,13 +1005,20 @@ function verticalStepSubHeadline(updates) {
987
1005
  function commentsStepHeadline(updates) {
988
1006
  return {
989
1007
  $el: 'h3',
990
- children: updates.headline || 'Additional Case Details',
1008
+ children: updates.headline || 'Additional Details',
991
1009
  attrs: {
992
1010
  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 || '')
993
1011
  }
994
1012
  }
995
1013
  }
996
1014
 
1015
+ function commentsStepHeadlineLegal(updates) {
1016
+ return commentsStepHeadline({
1017
+ headline: updates.headline || 'Additional Case Details',
1018
+ headlineClass: updates.headlineClass
1019
+ })
1020
+ }
1021
+
997
1022
  function firstAndLastStepHeadline(updates) {
998
1023
  return {
999
1024
  $el: 'h3',
@@ -1017,7 +1042,7 @@ function legalCrossSellsStepHeadline(updates) {
1017
1042
  function contactStepHeadline(updates) {
1018
1043
  return {
1019
1044
  $el: 'h3',
1020
- children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
1045
+ children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
1021
1046
  attrs: {
1022
1047
  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 || '')
1023
1048
  }
@@ -1027,7 +1052,7 @@ function contactStepHeadline(updates) {
1027
1052
  function contactStepSubHeadline(updates) {
1028
1053
  return {
1029
1054
  $el: 'h5',
1030
- children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
1055
+ children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
1031
1056
  attrs: {
1032
1057
  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 || '')
1033
1058
  }
@@ -1067,10 +1092,16 @@ const stepDefaults = (step, stepKey) => ({
1067
1092
  }
1068
1093
  });
1069
1094
 
1070
- function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
1071
- if (typeof nextOnEnter === 'undefined') {
1072
- nextOnEnter = true;
1073
- }
1095
+ function step(name, inputs, updates = {}) {
1096
+ const {
1097
+ nextOnEnter = true,
1098
+ nextOnInput = false,
1099
+ stepKey = undefined,
1100
+ nextStepMap = undefined,
1101
+ triggerRedirectMap = undefined,
1102
+ autoFocus = undefined,
1103
+ } = updates;
1104
+
1074
1105
  if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
1075
1106
  const lastInput = findLastInput(inputs[inputs.length - 1]);
1076
1107
  if (lastInput && nextOnEnter === true) {
@@ -1090,6 +1121,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
1090
1121
  id: name,
1091
1122
  name: name,
1092
1123
  nextStepMap: nextStepMap,
1124
+ triggerRedirectMap: triggerRedirectMap,
1093
1125
  autoFocus: autoFocus,
1094
1126
  children: inputs
1095
1127
  }
@@ -1100,44 +1132,17 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
1100
1132
 
1101
1133
  // Single question step
1102
1134
  function sqstep(name, input, defaultHeadline, updates = {}) {
1135
+ if (typeof updates.nextOnInput === 'undefined') {
1136
+ updates.nextOnInput = true;
1137
+ }
1138
+
1103
1139
  return step(
1104
1140
  name,
1105
1141
  [
1106
1142
  verticalStepHeadline({ headline: updates.headline ?? defaultHeadline, headlineClass: updates.headlineClass }),
1107
1143
  ...Array.isArray(input) ? input : [input],
1108
1144
  ],
1109
- updates.nextOnEnter,
1110
- typeof updates.nextOnInput === 'undefined' ? true : updates.nextOnInput,
1111
- updates.stepKey,
1112
- updates.nextStepMap
1113
- )
1114
- }
1115
-
1116
- function commentsWithBankruptcy(updates = {}) {
1117
- return step(
1118
- 'commentsWithBankruptcy',
1119
- [
1120
- commentsStepHeadline(updates),
1121
- comments({
1122
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL : updates.label,
1123
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1124
- inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1125
- }, updates.scope),
1126
- // TODO: needs scope support
1127
- bankruptcyCrossSell(),
1128
- {
1129
- $el: 'div',
1130
- if: '$get(CrossSell_Bankruptcy).value == true',
1131
- children: [
1132
- comments({
1133
- label: 'Bankruptcy or debt details:',
1134
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1135
- inputClass: '!t-h-16'
1136
- }, 'CrossSell:Bankruptcy')
1137
- ],
1138
- }
1139
- ],
1140
- false // nextOnEnter
1145
+ updates
1141
1146
  )
1142
1147
  }
1143
1148
 
@@ -1153,7 +1158,7 @@ function contactInfo(updates = {}) {
1153
1158
  TCPAConsent(updates.scope),
1154
1159
  secureIcon()
1155
1160
  ],
1156
- false, // nextOnEnter
1161
+ { nextOnEnter: false }
1157
1162
  )
1158
1163
  }
1159
1164
 
@@ -1172,10 +1177,46 @@ function firstAndLastV3(updates = {}, scope) {
1172
1177
  firstName(scope),
1173
1178
  lastName(scope)
1174
1179
  ],
1175
- updates.nextOnEnter
1180
+ updates
1176
1181
  )
1177
1182
  }
1178
1183
 
1184
+ function zipcode(updates = {}) {
1185
+ return sqstep(
1186
+ 'zipcode',
1187
+ zipcodeCenter(updates, updates.scope),
1188
+ 'Please verify your Zip Code',
1189
+ updates
1190
+ )
1191
+ }
1192
+
1193
+ function commentsWithBankruptcy(updates = {}) {
1194
+ return step(
1195
+ 'commentsWithBankruptcy',
1196
+ [
1197
+ commentsStepHeadlineLegal(updates),
1198
+ comments({
1199
+ label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1200
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1201
+ inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1202
+ }, updates.scope),
1203
+ // TODO: needs scope support
1204
+ bankruptcyCrossSell(),
1205
+ {
1206
+ $el: 'div',
1207
+ if: '$get(CrossSell_Bankruptcy).value == true',
1208
+ children: [
1209
+ comments({
1210
+ label: 'Bankruptcy or debt details:',
1211
+ placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1212
+ inputClass: '!t-h-16'
1213
+ }, 'CrossSell:Bankruptcy')
1214
+ ],
1215
+ }
1216
+ ],
1217
+ { nextOnEnter: false }
1218
+ )
1219
+ }
1179
1220
 
1180
1221
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1181
1222
  return step(
@@ -1193,7 +1234,7 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1193
1234
  'CrossSell:Auto_and_Car_Accidents'
1194
1235
  )
1195
1236
  ],
1196
- updates.nextOnEnter
1237
+ updates
1197
1238
  )
1198
1239
  }
1199
1240
 
@@ -1212,7 +1253,7 @@ function childCustodyCrossSellQuestions(updates = {}) {
1212
1253
  'CrossSell:Child_Custody'
1213
1254
  )
1214
1255
  ],
1215
- updates.nextOnEnter
1256
+ updates
1216
1257
  )
1217
1258
  }
1218
1259
 
@@ -1231,7 +1272,7 @@ function divorceAndSeparationCrossSellQuestions(updates = {}) {
1231
1272
  'CrossSell:Divorce_and_Separation'
1232
1273
  )
1233
1274
  ],
1234
- updates.nextOnEnter
1275
+ updates
1235
1276
  )
1236
1277
  }
1237
1278
 
@@ -1250,7 +1291,7 @@ function duiAndDWICrossSellQuestions(updates = {}) {
1250
1291
  'CrossSell:DUI_and_DWI'
1251
1292
  )
1252
1293
  ],
1253
- updates.nextOnEnter
1294
+ updates
1254
1295
  )
1255
1296
  }
1256
1297
 
@@ -1270,7 +1311,7 @@ function ssdiCrossSellQuestions(updates = {}) {
1270
1311
  'CrossSell:Social_Security_Disability_and_Insurance'
1271
1312
  )
1272
1313
  ],
1273
- updates.nextOnEnter
1314
+ updates
1274
1315
  )
1275
1316
  }
1276
1317
 
@@ -1290,7 +1331,7 @@ function personalInjuryCrossSellQuestions(updates = {}) {
1290
1331
  'CrossSell:Personal_Injury'
1291
1332
  )
1292
1333
  ],
1293
- updates.nextOnEnter
1334
+ updates
1294
1335
  )
1295
1336
  }
1296
1337
 
@@ -1309,7 +1350,7 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1309
1350
  'CrossSell:Power_of_Attorney'
1310
1351
  )
1311
1352
  ],
1312
- updates.nextOnEnter
1353
+ updates
1313
1354
  )
1314
1355
  }
1315
1356
 
@@ -1328,7 +1369,7 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
1328
1369
  'CrossSell:Wills_and_Trusts'
1329
1370
  )
1330
1371
  ],
1331
- updates.nextOnEnter
1372
+ updates
1332
1373
  )
1333
1374
  }
1334
1375
 
@@ -1348,29 +1389,19 @@ function workersCompensationCrossSellQuestions(updates = {}) {
1348
1389
  'CrossSell:Workers_Compensation'
1349
1390
  )
1350
1391
  ],
1351
- updates.nextOnEnter
1392
+ updates
1352
1393
  )
1353
1394
  }
1354
1395
 
1355
1396
  function legalCrossSells(updates = {}) {
1397
+ updates.nextOnInput = false;
1398
+ updates.stepKey = '$get(Type_Of_Legal_Problem).value';
1356
1399
  return step(
1357
1400
  'legalCrossSells',
1358
1401
  [
1359
1402
  legalCrossSellsStepHeadline(updates),
1360
1403
  legalCrossSells$1(),
1361
1404
  ],
1362
- updates.nextOnEnter,
1363
- false,
1364
- // Note: we should probably scope this stepKey to this step name
1365
- '$get(Type_Of_Legal_Problem).value'
1366
- )
1367
- }
1368
-
1369
- function zipcode(updates = {}) {
1370
- return sqstep(
1371
- 'zipcode',
1372
- zipcodeCenter(updates, updates.scope),
1373
- 'Please verify your Zip Code',
1374
1405
  updates
1375
1406
  )
1376
1407
  }
@@ -1432,10 +1463,7 @@ function patentsAndIPTOLP(updates = {}) {
1432
1463
  },
1433
1464
  patentsAndIPTOLPDisplayCenter(),
1434
1465
  ],
1435
- updates.nextOnEnter,
1436
- updates.nextOnInput,
1437
- updates.stepKey,
1438
- updates.nextStepMap
1466
+ updates
1439
1467
  )
1440
1468
  }
1441
1469
 
@@ -1596,9 +1624,7 @@ function formProps(updates) {
1596
1624
  return props
1597
1625
  }
1598
1626
 
1599
- const metaDefaults = {
1600
- tcpaLanguage: TCPA_LANGUAGE
1601
- };
1627
+ const metaDefaults = {};
1602
1628
 
1603
1629
  function metaProps(updates) {
1604
1630
  const data = merge(
@@ -1611,7 +1637,7 @@ function metaProps(updates) {
1611
1637
  }
1612
1638
  }
1613
1639
 
1614
- function defaultMetaProps(tolps = null) {
1640
+ function defaultMetaPropsLegal(tolps = null) {
1615
1641
  let commentsPlaceholders = TOLPCommentsPlaceholders;
1616
1642
  let finalHeadlines = TOLPFinalHeadlines;
1617
1643
  let finalSubHeadlines = TOLPFinalSubHeadlines;
@@ -1621,12 +1647,13 @@ function defaultMetaProps(tolps = null) {
1621
1647
  finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
1622
1648
  }
1623
1649
  return metaProps({
1624
- defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1650
+ tcpaLanguage: TCPA_LANGUAGE_LEGAL,
1651
+ defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1625
1652
  commentsPlaceholders: commentsPlaceholders,
1626
- defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
1653
+ defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1627
1654
  finalHeadlines: finalHeadlines,
1628
- defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
1629
- finalSubHeadlines: finalSubHeadlines,
1655
+ defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1656
+ finalSubHeadlines: finalSubHeadlines
1630
1657
  })
1631
1658
  }
1632
1659
 
@@ -2195,354 +2222,394 @@ const nextStepsLegalNoHA = [
2195
2222
  ];
2196
2223
 
2197
2224
  const nextStepsMapGeneralLegal = {
2198
- 'Type_Of_Legal_Problem': {
2199
- 'Adoption': [
2200
- 'maritalStatus',
2201
- 'haveChildren',
2202
- ...nextStepsLegalDefaultLPM
2203
- ],
2204
- 'Asbestos and Mesothelioma': [
2205
- 'incidentDate',
2206
- 'doctorTreatment',
2207
- ...nextStepsLegalDefault
2208
- ],
2209
- 'Auto and Car Accidents': [
2210
- 'incidentDate',
2211
- 'atFault',
2212
- 'primaryInjury',
2213
- 'doctorTreatment',
2214
- 'policeReportFiled',
2215
- ...nextStepsLegalNoDOI
2216
- ],
2217
- 'Bankruptcy': [
2218
- 'totalMonthlyIncome',
2219
- 'totalDebt',
2220
- 'ownRealEstate',
2221
- 'valueOfAssets',
2222
- ...nextStepsLegalDefault
2223
- ],
2224
- 'Business Lawyers': [
2225
- 'businessServices',
2226
- 'businessType',
2227
- 'numEmployeesOfBusiness',
2228
- ...nextStepsLegalDefault
2229
- ],
2230
- 'Child Custody': [
2231
- 'childRelationship',
2232
- 'childHome',
2233
- 'childPrimaryCaregiver',
2234
- ...nextStepsLegalDefaultLPM
2235
- ],
2236
- 'Child Support': [
2237
- 'childRelationship',
2238
- 'childHome',
2239
- 'childPrimaryCaregiver',
2240
- ...nextStepsLegalDefaultLPM
2241
- ],
2242
- 'Civil Rights and Discrimination': [
2243
- 'civilRightsType',
2244
- ...nextStepsLegalDefault
2245
- ],
2246
- 'Civil Lawsuit': [
2247
- 'civilDefense',
2248
- 'lawsuitOtherParty',
2249
- ...nextStepsLegalDefault
2250
- ],
2251
- 'File a Lawsuit': [
2252
- 'civilLawsuitTOLPDisplay',
2253
- 'lawsuitOtherParty',
2254
- ...nextStepsLegalDefault
2255
- ],
2256
- 'Defend a Lawsuit': [
2257
- 'lawsuitOtherParty',
2258
- ...nextStepsLegalDefault
2259
- ],
2260
- 'Consumer Lawyers': [
2261
- 'consumerLawyerType',
2262
- 'incidentDate',
2263
- 'lawsuitOtherParty',
2264
- ...nextStepsLegalDefault
2265
- ],
2266
- 'Criminal and Felony': [
2267
- 'criminalTOLPDisplay',
2268
- 'crimeCommittedDate',
2269
- 'roleInMatterCriminal',
2270
- 'pendingCharges',
2271
- ...nextStepsLegalDefaultLPM
2272
- ],
2273
- 'Debt and Collections': [
2274
- 'totalMonthlyIncome',
2275
- 'totalDebt',
2276
- 'ownRealEstate',
2277
- 'valueOfAssets',
2278
- ...nextStepsLegalDefault
2279
- ],
2280
- 'Divorce and Separation': [
2281
- 'maritalStatus',
2282
- 'haveChildren',
2283
- ...nextStepsLegalDefaultLPM
2284
- ],
2285
- 'DUI and DWI': [
2286
- 'incidentDate',
2287
- 'priorAlcoholOffenses',
2288
- 'typeOfAlcoholTest',
2289
- 'bloodContentAlcoholTest',
2290
- 'pendingCharges',
2291
- ...nextStepsLegalDefault
2292
- ],
2293
- 'Employment and Workplace': [
2294
- 'employmentAndWorkplaceTOLPDisplay',
2295
- 'numEmployeesOfBusiness',
2296
- 'employerType',
2297
- 'employeeAtCompany',
2298
- ...nextStepsLegalDefault
2299
- ],
2300
- 'Expungement': [
2301
- 'incidentDate',
2302
- 'criminalChargeType',
2303
- ...nextStepsLegalDefaultLPM
2304
- ],
2305
- 'Family Issues': [
2306
- 'maritalStatus',
2307
- 'haveChildren',
2308
- ...nextStepsLegalDefaultLPM
2309
- ],
2310
- 'Foreclosure': [
2311
- 'ownRealEstate',
2312
- 'typeOfProperty',
2313
- 'amountPaymentsPastDue',
2314
- 'loanAmount',
2315
- 'defaultNotice',
2316
- ...nextStepsLegalDefault
2317
- ],
2318
- 'Guardianship': [
2319
- 'maritalStatus',
2320
- 'haveChildren',
2321
- ...nextStepsLegalDefaultLPM
2322
- ],
2323
- 'Immigration and Visas': [
2324
- 'countryOfCitizenship',
2325
- 'immigrationLocation',
2326
- 'immigrationEntry',
2327
- 'immigrationType',
2328
- 'immigrationStatus',
2329
- 'immigrationDetails',
2330
- ...nextStepsLegalDefault
2331
- ],
2332
- 'Landlord and Tenant': [
2333
- 'landlordTenantIssue',
2334
- 'landlordTenantParty',
2335
- ...nextStepsLegalDefault
2336
- ],
2337
- 'Lemon Law': [
2338
- 'incidentDate',
2339
- 'lawsuitOtherParty',
2340
- ...nextStepsLegalDefault
2341
- ],
2342
- 'Long Term Disability': [
2343
- 'applicantOccupation',
2344
- 'applicantAge',
2345
- 'applicantLTDisabilityPolicy',
2346
- 'applicantDisabilityHowObtain',
2347
- 'applicantPreviouslyAppliedLtdBenefits',
2348
- 'applicantReceivedDisabilityBenefits',
2349
- 'applicantMonthlySalary',
2350
- ...nextStepsLegalNoDOI
2351
- ],
2352
- 'Medical Malpractice': [
2353
- 'incidentDate',
2354
- 'claimStatus',
2355
- 'doctorTreatment',
2356
- 'medicalMalpracticeInjuries',
2357
- ...nextStepsLegalDefault
2358
- ],
2359
- 'Patents and Intellectual Property': [
2360
- 'patentAssistanceType',
2361
- 'patentFor',
2362
- ...nextStepsLegalDefault
2363
- ],
2364
- 'Personal Injury': [
2365
- 'incidentDate',
2366
- 'claimStatus',
2367
- 'atFault',
2368
- 'primaryInjury',
2369
- 'doctorTreatment',
2370
- ...nextStepsLegalNoDOI
2371
- ],
2372
- 'Probate and Estates': [
2373
- 'valueOfAssets',
2374
- 'typeOfAssets',
2375
- 'roleInMatterProbate',
2376
- 'estateLegalServicesNeeded',
2377
- ...nextStepsLegalDefault
2378
- ],
2379
- 'Property Damage': [
2380
- 'realEstateArea',
2381
- 'wouldLikeLawyerTo',
2382
- ...nextStepsLegalDefault
2383
- ],
2384
- 'Real Estate': [
2385
- 'realEstateTOLPDisplay',
2386
- 'realEstateArea',
2387
- 'wouldLikeLawyerTo',
2388
- ...nextStepsLegalDefault
2389
- ],
2390
- 'Social Security Disability and Insurance': [
2391
- 'applicantAge',
2392
- 'disabilityConditionStopWork',
2393
- 'disabilityWorkHistory',
2394
- 'socialSecurityDisabilityReceivingBenefits',
2395
- 'doctorTreatment',
2396
- ...nextStepsLegalNoDOI
2397
- ],
2398
- 'Tax and IRS': [
2399
- 'totalDebt',
2400
- 'taxProblemDetails',
2401
- 'taxLevel',
2402
- 'taxIssueType',
2403
- ...nextStepsLegalDefault
2404
- ],
2405
- 'Traffic and Tickets': [
2406
- 'driversLicenseType',
2407
- 'trafficViolations',
2408
- 'haveCourtDate',
2409
- ...nextStepsLegalDefault
2410
- ],
2411
- 'Unemployment': [
2412
- 'numEmployeesOfBusiness',
2413
- 'employerType',
2414
- ...nextStepsLegalNoHA
2415
- ],
2416
- 'Victim of a Crime': [
2417
- 'crimeCommittedDate',
2418
- 'roleInMatterCriminal',
2419
- 'pendingCharges',
2420
- ...nextStepsLegalDefaultLPM
2421
- ],
2422
- 'Wills and Trusts': [
2423
- 'valueOfAssets',
2424
- 'typeOfAssets',
2425
- 'roleInMatterProbate',
2426
- 'estateLegalServicesNeeded',
2427
- ...nextStepsLegalDefault
2428
- ],
2429
- 'Workers Compensation': [
2430
- 'incidentDate',
2431
- 'claimStatus',
2432
- 'primaryInjury',
2433
- 'causeOfInjury',
2434
- 'doctorTreatment',
2435
- ...nextStepsLegalNoDOI
2436
- ],
2437
- 'Workplace Harassment': [
2438
- 'numEmployeesOfBusiness',
2439
- 'employerType',
2440
- 'employeeAtCompany',
2441
- ...nextStepsLegalDefault
2442
- ],
2443
- 'Workplace Discrimination': [
2444
- 'numEmployeesOfBusiness',
2445
- 'employerType',
2446
- 'employeeAtCompany',
2447
- ...nextStepsLegalDefault
2448
- ],
2449
- 'Wrongful Death': [
2450
- 'incidentDate',
2451
- 'relationshipToVictim',
2452
- 'criminalChargesFiled',
2453
- 'causeOfDeath',
2454
- ...nextStepsLegalNoDOI
2455
- ],
2456
- 'Wrongful Termination': [
2457
- 'numEmployeesOfBusiness',
2458
- 'employerType',
2459
- ...nextStepsLegalDefault
2460
- ],
2461
- },
2462
- '*': nextStepsLegalDefault
2225
+ values: {
2226
+ 'Type_Of_Legal_Problem': {
2227
+ 'Adoption': [
2228
+ 'maritalStatus',
2229
+ 'haveChildren',
2230
+ ...nextStepsLegalDefaultLPM
2231
+ ],
2232
+ 'Asbestos and Mesothelioma': [
2233
+ 'incidentDate',
2234
+ 'doctorTreatment',
2235
+ ...nextStepsLegalDefault
2236
+ ],
2237
+ 'Auto and Car Accidents': [
2238
+ 'incidentDate',
2239
+ 'atFault',
2240
+ 'primaryInjury',
2241
+ 'doctorTreatment',
2242
+ 'policeReportFiled',
2243
+ ...nextStepsLegalNoDOI
2244
+ ],
2245
+ 'Bankruptcy': [
2246
+ 'totalMonthlyIncome',
2247
+ 'totalDebt',
2248
+ 'ownRealEstate',
2249
+ 'valueOfAssets',
2250
+ ...nextStepsLegalDefault
2251
+ ],
2252
+ 'Business Lawyers': [
2253
+ 'businessServices',
2254
+ 'businessType',
2255
+ 'numEmployeesOfBusiness',
2256
+ ...nextStepsLegalDefault
2257
+ ],
2258
+ 'Child Custody': [
2259
+ 'childRelationship',
2260
+ 'childHome',
2261
+ 'childPrimaryCaregiver',
2262
+ ...nextStepsLegalDefaultLPM
2263
+ ],
2264
+ 'Child Support': [
2265
+ 'childRelationship',
2266
+ 'childHome',
2267
+ 'childPrimaryCaregiver',
2268
+ ...nextStepsLegalDefaultLPM
2269
+ ],
2270
+ 'Civil Rights and Discrimination': [
2271
+ 'civilRightsType',
2272
+ ...nextStepsLegalDefault
2273
+ ],
2274
+ 'Civil Lawsuit': [
2275
+ 'civilDefense',
2276
+ 'lawsuitOtherParty',
2277
+ ...nextStepsLegalDefault
2278
+ ],
2279
+ 'File a Lawsuit': [
2280
+ 'civilLawsuitTOLPDisplay',
2281
+ 'lawsuitOtherParty',
2282
+ ...nextStepsLegalDefault
2283
+ ],
2284
+ 'Defend a Lawsuit': [
2285
+ 'lawsuitOtherParty',
2286
+ ...nextStepsLegalDefault
2287
+ ],
2288
+ 'Consumer Lawyers': [
2289
+ 'consumerLawyerType',
2290
+ 'incidentDate',
2291
+ 'lawsuitOtherParty',
2292
+ ...nextStepsLegalDefault
2293
+ ],
2294
+ 'Criminal and Felony': [
2295
+ 'criminalTOLPDisplay',
2296
+ 'crimeCommittedDate',
2297
+ 'roleInMatterCriminal',
2298
+ 'pendingCharges',
2299
+ ...nextStepsLegalDefaultLPM
2300
+ ],
2301
+ 'Debt and Collections': [
2302
+ 'totalMonthlyIncome',
2303
+ 'totalDebt',
2304
+ 'ownRealEstate',
2305
+ 'valueOfAssets',
2306
+ ...nextStepsLegalDefault
2307
+ ],
2308
+ 'Divorce and Separation': [
2309
+ 'maritalStatus',
2310
+ 'haveChildren',
2311
+ ...nextStepsLegalDefaultLPM
2312
+ ],
2313
+ 'DUI and DWI': [
2314
+ 'incidentDate',
2315
+ 'priorAlcoholOffenses',
2316
+ 'typeOfAlcoholTest',
2317
+ 'bloodContentAlcoholTest',
2318
+ 'pendingCharges',
2319
+ ...nextStepsLegalDefault
2320
+ ],
2321
+ 'Employment and Workplace': [
2322
+ 'employmentAndWorkplaceTOLPDisplay',
2323
+ 'numEmployeesOfBusiness',
2324
+ 'employerType',
2325
+ 'employeeAtCompany',
2326
+ ...nextStepsLegalDefault
2327
+ ],
2328
+ 'Expungement': [
2329
+ 'incidentDate',
2330
+ 'criminalChargeType',
2331
+ ...nextStepsLegalDefaultLPM
2332
+ ],
2333
+ 'Family Issues': [
2334
+ 'maritalStatus',
2335
+ 'haveChildren',
2336
+ ...nextStepsLegalDefaultLPM
2337
+ ],
2338
+ 'Foreclosure': [
2339
+ 'ownRealEstate',
2340
+ 'typeOfProperty',
2341
+ 'amountPaymentsPastDue',
2342
+ 'loanAmount',
2343
+ 'defaultNotice',
2344
+ ...nextStepsLegalDefault
2345
+ ],
2346
+ 'Guardianship': [
2347
+ 'maritalStatus',
2348
+ 'haveChildren',
2349
+ ...nextStepsLegalDefaultLPM
2350
+ ],
2351
+ 'Immigration and Visas': [
2352
+ 'countryOfCitizenship',
2353
+ 'immigrationLocation',
2354
+ 'immigrationEntry',
2355
+ 'immigrationType',
2356
+ 'immigrationStatus',
2357
+ 'immigrationDetails',
2358
+ ...nextStepsLegalDefault
2359
+ ],
2360
+ 'Landlord and Tenant': [
2361
+ 'landlordTenantIssue',
2362
+ 'landlordTenantParty',
2363
+ ...nextStepsLegalDefault
2364
+ ],
2365
+ 'Lemon Law': [
2366
+ 'incidentDate',
2367
+ 'lawsuitOtherParty',
2368
+ ...nextStepsLegalDefault
2369
+ ],
2370
+ 'Long Term Disability': [
2371
+ 'applicantOccupation',
2372
+ 'applicantAge',
2373
+ 'applicantLTDisabilityPolicy',
2374
+ 'applicantDisabilityHowObtain',
2375
+ 'applicantPreviouslyAppliedLtdBenefits',
2376
+ 'applicantReceivedDisabilityBenefits',
2377
+ 'applicantMonthlySalary',
2378
+ ...nextStepsLegalNoDOI
2379
+ ],
2380
+ 'Medical Malpractice': [
2381
+ 'incidentDate',
2382
+ 'claimStatus',
2383
+ 'doctorTreatment',
2384
+ 'medicalMalpracticeInjuries',
2385
+ ...nextStepsLegalDefault
2386
+ ],
2387
+ 'Patents and Intellectual Property': [
2388
+ 'patentAssistanceType',
2389
+ 'patentFor',
2390
+ ...nextStepsLegalDefault
2391
+ ],
2392
+ 'Personal Injury': [
2393
+ 'incidentDate',
2394
+ 'claimStatus',
2395
+ 'atFault',
2396
+ 'primaryInjury',
2397
+ 'doctorTreatment',
2398
+ ...nextStepsLegalNoDOI
2399
+ ],
2400
+ 'Probate and Estates': [
2401
+ 'valueOfAssets',
2402
+ 'typeOfAssets',
2403
+ 'roleInMatterProbate',
2404
+ 'estateLegalServicesNeeded',
2405
+ ...nextStepsLegalDefault
2406
+ ],
2407
+ 'Property Damage': [
2408
+ 'realEstateArea',
2409
+ 'wouldLikeLawyerTo',
2410
+ ...nextStepsLegalDefault
2411
+ ],
2412
+ 'Real Estate': [
2413
+ 'realEstateTOLPDisplay',
2414
+ 'realEstateArea',
2415
+ 'wouldLikeLawyerTo',
2416
+ ...nextStepsLegalDefault
2417
+ ],
2418
+ 'Social Security Disability and Insurance': [
2419
+ 'applicantAge',
2420
+ 'disabilityConditionStopWork',
2421
+ 'disabilityWorkHistory',
2422
+ 'socialSecurityDisabilityReceivingBenefits',
2423
+ 'doctorTreatment',
2424
+ ...nextStepsLegalNoDOI
2425
+ ],
2426
+ 'Tax and IRS': [
2427
+ 'totalDebt',
2428
+ 'taxProblemDetails',
2429
+ 'taxLevel',
2430
+ 'taxIssueType',
2431
+ ...nextStepsLegalDefault
2432
+ ],
2433
+ 'Traffic and Tickets': [
2434
+ 'driversLicenseType',
2435
+ 'trafficViolations',
2436
+ 'haveCourtDate',
2437
+ ...nextStepsLegalDefault
2438
+ ],
2439
+ 'Unemployment': [
2440
+ 'numEmployeesOfBusiness',
2441
+ 'employerType',
2442
+ ...nextStepsLegalNoHA
2443
+ ],
2444
+ 'Victim of a Crime': [
2445
+ 'crimeCommittedDate',
2446
+ 'roleInMatterCriminal',
2447
+ 'pendingCharges',
2448
+ ...nextStepsLegalDefaultLPM
2449
+ ],
2450
+ 'Wills and Trusts': [
2451
+ 'valueOfAssets',
2452
+ 'typeOfAssets',
2453
+ 'roleInMatterProbate',
2454
+ 'estateLegalServicesNeeded',
2455
+ ...nextStepsLegalDefault
2456
+ ],
2457
+ 'Workers Compensation': [
2458
+ 'incidentDate',
2459
+ 'claimStatus',
2460
+ 'primaryInjury',
2461
+ 'causeOfInjury',
2462
+ 'doctorTreatment',
2463
+ ...nextStepsLegalNoDOI
2464
+ ],
2465
+ 'Workplace Harassment': [
2466
+ 'numEmployeesOfBusiness',
2467
+ 'employerType',
2468
+ 'employeeAtCompany',
2469
+ ...nextStepsLegalDefault
2470
+ ],
2471
+ 'Workplace Discrimination': [
2472
+ 'numEmployeesOfBusiness',
2473
+ 'employerType',
2474
+ 'employeeAtCompany',
2475
+ ...nextStepsLegalDefault
2476
+ ],
2477
+ 'Wrongful Death': [
2478
+ 'incidentDate',
2479
+ 'relationshipToVictim',
2480
+ 'criminalChargesFiled',
2481
+ 'causeOfDeath',
2482
+ ...nextStepsLegalNoDOI
2483
+ ],
2484
+ 'Wrongful Termination': [
2485
+ 'numEmployeesOfBusiness',
2486
+ 'employerType',
2487
+ ...nextStepsLegalDefault
2488
+ ],
2489
+ },
2490
+ '*': nextStepsLegalDefault
2491
+ }
2463
2492
  };
2464
2493
 
2465
- const TOLPNextSteps = nextStepsMapGeneralLegal["Type_Of_Legal_Problem"];
2494
+ const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"];
2466
2495
 
2467
2496
  ({
2468
- 'Civil_Defense': {
2469
- 'Yes': TOLPNextSteps["Defend a Lawsuit"],
2470
- 'No': TOLPNextSteps["File a Lawsuit"],
2471
- },
2472
- '*': [
2473
- 'lawsuitOtherParty',
2474
- ...nextStepsLegalDefault
2475
- ]
2497
+ values: {
2498
+ 'Civil_Defense': {
2499
+ 'Yes': TOLPNextSteps["Defend a Lawsuit"],
2500
+ 'No': TOLPNextSteps["File a Lawsuit"],
2501
+ },
2502
+ '*': [
2503
+ 'lawsuitOtherParty',
2504
+ ...nextStepsLegalDefault
2505
+ ]
2506
+ }
2476
2507
  });
2477
2508
 
2478
2509
  ({
2479
- 'Type_Of_Legal_Problem': {
2480
- 'Defend a Lawsuit': TOLPNextSteps["Defend a Lawsuit"],
2481
- 'File a Lawsuit': TOLPNextSteps["File a Lawsuit"],
2482
- },
2483
- '*': [
2484
- 'lawsuitOtherParty',
2485
- ...nextStepsLegalDefault
2486
- ]
2510
+ values: {
2511
+ 'Type_Of_Legal_Problem': {
2512
+ 'Defend a Lawsuit': TOLPNextSteps["Defend a Lawsuit"],
2513
+ 'File a Lawsuit': TOLPNextSteps["File a Lawsuit"],
2514
+ },
2515
+ '*': [
2516
+ 'lawsuitOtherParty',
2517
+ ...nextStepsLegalDefault
2518
+ ]
2519
+ }
2487
2520
  });
2488
2521
 
2489
2522
  ({
2490
- 'Type_Of_Legal_Problem_Display': {
2491
- 'Automobile Accident': TOLPNextSteps["Auto and Car Accidents"],
2492
- 'Contract Disputes': TOLPNextSteps["Business Lawyers"],
2493
- 'Dog Bite': TOLPNextSteps["Personal Injury"],
2494
- 'Employment and Workplace': TOLPNextSteps["Employment and Workplace"],
2495
- 'Fraud': TOLPNextSteps["Consumer Lawyers"],
2496
- 'Medical Malpractice': TOLPNextSteps["Medical Malpractice"],
2497
- 'Personal Injury': TOLPNextSteps["Personal Injury"],
2498
- 'Property Damage': TOLPNextSteps["Property Damage"],
2499
- 'Real Estate': TOLPNextSteps["Real Estate"],
2500
- 'Not Sure or Other': nextStepsMapGeneralLegal["*"],
2501
- },
2502
- '*': [
2503
- 'lawsuitOtherParty',
2504
- ...nextStepsLegalDefault
2505
- ]
2523
+ values: {
2524
+ 'Type_Of_Legal_Problem_Display': {
2525
+ 'Automobile Accident': TOLPNextSteps["Auto and Car Accidents"],
2526
+ 'Contract Disputes': TOLPNextSteps["Business Lawyers"],
2527
+ 'Dog Bite': TOLPNextSteps["Personal Injury"],
2528
+ 'Employment and Workplace': TOLPNextSteps["Employment and Workplace"],
2529
+ 'Fraud': TOLPNextSteps["Consumer Lawyers"],
2530
+ 'Medical Malpractice': TOLPNextSteps["Medical Malpractice"],
2531
+ 'Personal Injury': TOLPNextSteps["Personal Injury"],
2532
+ 'Property Damage': TOLPNextSteps["Property Damage"],
2533
+ 'Real Estate': TOLPNextSteps["Real Estate"],
2534
+ 'Not Sure or Other': nextStepsMapGeneralLegal["values"]["*"],
2535
+ },
2536
+ '*': [
2537
+ 'lawsuitOtherParty',
2538
+ ...nextStepsLegalDefault
2539
+ ]
2540
+ }
2506
2541
  });
2507
2542
 
2508
2543
  ({
2509
- 'Type_Of_Legal_Problem_Display': {
2510
- 'Wrongful Termination': TOLPNextSteps["Wrongful Termination"],
2511
- 'Workers Compensation': TOLPNextSteps["Workers Compensation"],
2512
- 'Personal Injury': TOLPNextSteps["Personal Injury"],
2513
- 'Unemployment': TOLPNextSteps["Unemployment"],
2514
- },
2515
- '*': [
2516
- 'numEmployeesOfBusiness',
2517
- 'employerType',
2518
- 'employeeAtCompany',
2519
- ...nextStepsLegalDefault
2520
- ]
2544
+ values: {
2545
+ 'Type_Of_Legal_Problem_Display': {
2546
+ 'Wrongful Termination': TOLPNextSteps["Wrongful Termination"],
2547
+ 'Workers Compensation': TOLPNextSteps["Workers Compensation"],
2548
+ 'Personal Injury': TOLPNextSteps["Personal Injury"],
2549
+ 'Unemployment': TOLPNextSteps["Unemployment"],
2550
+ },
2551
+ '*': [
2552
+ 'numEmployeesOfBusiness',
2553
+ 'employerType',
2554
+ 'employeeAtCompany',
2555
+ ...nextStepsLegalDefault
2556
+ ]
2557
+ }
2521
2558
  });
2522
2559
 
2523
2560
  const nextStepsMapPatentsAndIPTOLPDisplay = {
2524
- 'Type_Of_Legal_Problem_Display': {
2525
- 'Patents': TOLPNextSteps["Patents and Intellectual Property"],
2526
- 'Business Lawyers': TOLPNextSteps["Business Lawyers"],
2527
- 'Business Consulting': TOLPNextSteps["Business Lawyers"],
2528
- },
2529
- '*': nextStepsMapGeneralLegal["*"],
2561
+ values: {
2562
+ 'Type_Of_Legal_Problem_Display': {
2563
+ 'Patents': TOLPNextSteps["Patents and Intellectual Property"],
2564
+ 'Business Lawyers': TOLPNextSteps["Business Lawyers"],
2565
+ 'Business Consulting': TOLPNextSteps["Business Lawyers"],
2566
+ },
2567
+ '*': nextStepsMapGeneralLegal["values"]["*"],
2568
+ }
2530
2569
  };
2531
2570
 
2532
2571
  ({
2533
- 'Type_Of_Legal_Problem_Display': {
2534
- 'Foreclosure': TOLPNextSteps["Foreclosure"],
2535
- 'Landlord and Tenant': TOLPNextSteps["Landlord and Tenant"],
2536
- 'Wills, Trusts, and Estates': TOLPNextSteps["Wills and Trusts"],
2537
- 'Property Damage': TOLPNextSteps['Property Damage'],
2538
- },
2539
- '*': [
2540
- 'realEstateArea',
2541
- 'wouldLikeLawyerTo',
2542
- ...nextStepsLegalDefault
2543
- ]
2572
+ values: {
2573
+ 'Type_Of_Legal_Problem_Display': {
2574
+ 'Foreclosure': TOLPNextSteps["Foreclosure"],
2575
+ 'Landlord and Tenant': TOLPNextSteps["Landlord and Tenant"],
2576
+ 'Wills, Trusts, and Estates': TOLPNextSteps["Wills and Trusts"],
2577
+ 'Property Damage': TOLPNextSteps['Property Damage'],
2578
+ },
2579
+ '*': [
2580
+ 'realEstateArea',
2581
+ 'wouldLikeLawyerTo',
2582
+ ...nextStepsLegalDefault
2583
+ ]
2584
+ }
2544
2585
  });
2545
2586
 
2587
+ const nextStepsMapLegalCrossSells = {
2588
+ values: {
2589
+ 'Legal_CrossSells': {
2590
+ 'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
2591
+ 'Personal Injury': ['personalInjuryCrossSellQuestions'],
2592
+ 'Workers Compensation': ['workersCompensationCrossSellQuestions'],
2593
+ 'DUI and DWI': ['duiAndDWICrossSellQuestions'],
2594
+ 'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
2595
+ 'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
2596
+ 'Bankruptcy': ['bankruptcyCrossSellQuestions'],
2597
+ 'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
2598
+ 'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
2599
+ 'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
2600
+ 'Child Custody': ['childCustodyCrossSellQuestions'],
2601
+ },
2602
+ '*': ['firstAndLast', 'contactInfo'],
2603
+ },
2604
+
2605
+ // NOTE: this assumes a certain placement of the cross sell question
2606
+ // in the form flow.
2607
+ appendSteps: ['firstAndLast', 'contactInfo'],
2608
+ matchesAllowed: 1,
2609
+ };
2610
+
2611
+ const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
2612
+
2546
2613
  const tolps = [
2547
2614
  'Patents and Intellectual Property',
2548
2615
  'Copyrights and Trademarks',
@@ -2550,7 +2617,7 @@ const tolps = [
2550
2617
  'Not Sure or Other'
2551
2618
  ];
2552
2619
 
2553
- const meta = defaultMetaProps(tolps);
2620
+ const meta = defaultMetaPropsLegal(tolps);
2554
2621
 
2555
2622
  meta.data.commentsPlaceholders["Not Sure or Other"] = meta.data.commentsPlaceholders['Patents and Intellectual Property'];
2556
2623
 
@@ -2569,7 +2636,8 @@ meta.data.dynamicSchema = [
2569
2636
  headlineClass: '!t-text-dark',
2570
2637
  }),
2571
2638
  legalCrossSells({
2572
- headlineClass: '!t-text-dark'
2639
+ headlineClass: '!t-text-dark',
2640
+ nextStepMap: nextStepsMapLegalCrossSells,
2573
2641
  }),
2574
2642
  autoAndCarAccidentCrossSellQuestions(),
2575
2643
  personalInjuryCrossSellQuestions(),
@@ -2595,7 +2663,8 @@ const schema = [
2595
2663
  redirectMap: legalRedirectMap(),
2596
2664
  valueOverrideMap: {
2597
2665
  'Type_Of_Legal_Problem_Display': patentsAndIPTOLPDisplayOverrideMap,
2598
- }
2666
+ },
2667
+ crossSellOptionMap: legalCrossSellOptionMap
2599
2668
  }),
2600
2669
  children: [
2601
2670
  progressBar(),