bhl-forms 0.6.14 → 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 +647 -575
  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
 
@@ -221,6 +304,76 @@ const verticalDate = (updates) => {
221
304
  return date(updates)
222
305
  };
223
306
 
307
+ const email = (scope) => sbsText({
308
+ $formkit: 'email',
309
+ name: scope ? scope + ':' + 'Email' : 'Email',
310
+ label: 'Email Address:',
311
+ placeholder: 'email@domain.com',
312
+ autocomplete: 'email',
313
+ 'data-tf-sensitive': 'false',
314
+ validation: 'required|email',
315
+ validationMessages: {
316
+ required: 'Email is required',
317
+ email: 'Invalid Email'
318
+ }
319
+ });
320
+
321
+ const firstName = (scope) => sbsText({
322
+ label: 'First Name:',
323
+ placeholder: 'First',
324
+ name: scope ? scope + ':' + 'First_Name' : 'First_Name',
325
+ autocomplete: "given-name",
326
+ validationMessages: {
327
+ required: 'First Name is required'
328
+ }
329
+ });
330
+
331
+ const lastName = (scope) => sbsText({
332
+ label: 'Last Name:',
333
+ placeholder: 'Last',
334
+ name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
335
+ autocomplete: "family-name",
336
+ validationMessages: {
337
+ required: 'Last Name is required'
338
+ }
339
+ });
340
+
341
+ const phone = (scope) => sbsText({
342
+ $formkit: 'tel',
343
+ name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
344
+ label: 'Phone Number:',
345
+ placeholder: '###-###-####',
346
+ maxlength: 12,
347
+ help: '10-digit phone number, hyphens optional',
348
+ autocomplete: 'tel-national',
349
+ 'data-tf-sensitive': 'false',
350
+ validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
351
+ validationMessages: {
352
+ required: 'Field is required',
353
+ matches: 'Invalid Phone Format, use ###-###-####',
354
+ valid_phone: 'Invalid Phone Number'
355
+ },
356
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
357
+ });
358
+
359
+ const zipcodeCenter = (updates = {}, scope) => text({
360
+ placeholder: '#####',
361
+ help: updates.help ?? "We try to match you with local help",
362
+ name: scope ? scope + ':' + 'Zip' : 'Zip',
363
+ maxlength: 5,
364
+ inputmode: "numeric",
365
+ autocomplete: 'postal-code',
366
+ validation: 'required|matches:/^[0-9]{5}$/',
367
+ validationMessages: {
368
+ required: 'Zip Code is required',
369
+ matches: 'Invalid Zip Code'
370
+ },
371
+ wrapperClass: 't-flex t-justify-center',
372
+ messagesClass: 't-flex t-justify-center',
373
+ inputClass: 't-text-center',
374
+ helpClass: 't-mt-2.5 !t-text-sm t-text-center'
375
+ });
376
+
224
377
  const applicantAge = (scope) => sbsText({
225
378
  name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
226
379
  label: 'Age of Applicant?',
@@ -419,20 +572,6 @@ const doctorTreatmentCenter = (scope) => verticalYesNoRadio({
419
572
  name: scope ? scope + ':' + 'Doctor_Treatment' : 'Doctor_Treatment',
420
573
  });
421
574
 
422
- const email = (scope) => sbsText({
423
- $formkit: 'email',
424
- name: scope ? scope + ':' + 'Email' : 'Email',
425
- label: 'Email Address:',
426
- placeholder: 'email@domain.com',
427
- autocomplete: 'email',
428
- 'data-tf-sensitive': 'false',
429
- validation: 'required|email',
430
- validationMessages: {
431
- required: 'Email is required',
432
- email: 'Invalid Email'
433
- }
434
- });
435
-
436
575
  const employerTypeCenter = () => col2RadioCenter({
437
576
  name: 'Employer_Type',
438
577
  options: [
@@ -477,17 +616,6 @@ const estateLegalServicesNeeded = (scope) => sbsSelect({
477
616
  ]
478
617
  });
479
618
 
480
- const firstName = (scope) => sbsText({
481
- $formkit: 'text',
482
- label: 'First Name:',
483
- placeholder: 'First',
484
- name: scope ? scope + ':' + 'First_Name' : 'First_Name',
485
- autocomplete: "given-name",
486
- validationMessages: {
487
- required: 'First Name is required'
488
- }
489
- });
490
-
491
619
  const haveAttorney$1 = (scope) => sbsYesNoRadio({
492
620
  name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
493
621
  label: 'Already Working with An Attorney?'
@@ -511,17 +639,6 @@ const incidentDateCenter = (scope) => verticalDate({
511
639
  name: scope ? scope + ':' + 'Incident_Date' : 'Incident_Date',
512
640
  });
513
641
 
514
- const lastName = (scope) => sbsText({
515
- $formkit: 'text',
516
- label: 'Last Name:',
517
- placeholder: 'Last',
518
- name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
519
- autocomplete: "family-name",
520
- validationMessages: {
521
- required: 'Last Name is required'
522
- }
523
- });
524
-
525
642
  const lawyerPaymentMethod = (scope) => sbsSelect({
526
643
  name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
527
644
  label: 'How Will You Pay for Legal Fees if You Hire a Lawyer?',
@@ -542,69 +659,7 @@ const legalCrossSells$1 = () => col2Checkbox({
542
659
  help: 'Just hit "Next" if none apply',
543
660
  helpClass: 't-text-center !t-text-sm',
544
661
  validation: null,
545
- options: {
546
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Auto and Car Accidents"',
547
- then: {
548
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
549
- 'Wills and Trusts': 'Need a Will or Trust',
550
- 'Workers Compensation': 'Workplace Injury',
551
- 'Power of Attorney': 'Update Power of Attorney',
552
- 'Divorce and Separation': 'Need a Divorce or Separation',
553
- 'Child Custody': 'Need help with Child Custody',
554
- },
555
- else: {
556
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Personal Injury" || $getVal($get(form), "Type_Of_Legal_Problem") === "Workers Compensation"',
557
- then: {
558
- 'DUI and DWI': 'Involved in a DUI/DWI',
559
- 'Wills and Trusts': 'Need a Will or Trust',
560
- 'Power of Attorney': 'Update Power of Attorney',
561
- 'Divorce and Separation': 'Need a Divorce or Separation',
562
- 'Child Custody': 'Need help with Child Custody',
563
- // TODO add one more?
564
- },
565
- else: {
566
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "DUI and DWI"',
567
- then: {
568
- 'Personal Injury': 'Personal or Workplace Injury',
569
- 'Wills and Trusts': 'Need a Will or Trust',
570
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
571
- 'Power of Attorney': 'Update Power of Attorney',
572
- 'Divorce and Separation': 'Need a Divorce or Separation',
573
- 'Child Custody': 'Need help with Child Custody',
574
- },
575
- else: {
576
- 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"',
577
- then: {
578
- 'Auto and Car Accidents': 'Injured in a Car Accident',
579
- 'Personal Injury': 'Personal or Workplace Injury',
580
- 'DUI and DWI': 'Involved in a DUI/DWI',
581
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
582
- 'Divorce and Separation': 'Need a Divorce or Separation',
583
- 'Child Custody': 'Need help with Child Custody',
584
- },
585
- else: {
586
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Long Term Disability" || $getVal($get(form), "Type_Of_Legal_Problem") === "Social Security Disability and Insurance"',
587
- then: {
588
- 'Auto and Car Accidents': 'Injured in a Car Accident',
589
- 'DUI and DWI': 'Involved in a DUI/DWI',
590
- 'Wills and Trusts': 'Need a Will or Trust',
591
- 'Power of Attorney': 'Update Power of Attorney',
592
- 'Divorce and Separation': 'Need a Divorce or Separation',
593
- 'Child Custody': 'Need help with Child Custody',
594
- },
595
- else: {
596
- 'Auto and Car Accidents': 'Injured in a Car Accident',
597
- 'Personal Injury': 'Personal or Workplace Injury',
598
- 'DUI and DWI': 'Involved in a DUI/DWI',
599
- 'Wills and Trusts': 'Need a Will or Trust',
600
- 'Power of Attorney': 'Update Power of Attorney',
601
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
602
- }
603
- }
604
- }
605
- }
606
- }
607
- }
662
+ options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
608
663
  });
609
664
 
610
665
  const maritalStatus = (scope) => sbsSelect({
@@ -638,24 +693,6 @@ const pendingCharges = (scope) => sbsYesNoRadio({
638
693
  label: 'Do you currently have any pending charges?'
639
694
  });
640
695
 
641
- const phone = (scope) => sbsText({
642
- $formkit: 'tel',
643
- name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
644
- label: 'Phone Number:',
645
- placeholder: '###-###-####',
646
- maxlength: 12,
647
- help: '10-digit phone number, hyphens optional',
648
- autocomplete: 'tel-national',
649
- 'data-tf-sensitive': 'false',
650
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
651
- validationMessages: {
652
- required: 'Field is required',
653
- matches: 'Invalid Phone Format, use ###-###-####',
654
- valid_phone: 'Invalid Phone Number'
655
- },
656
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
657
- });
658
-
659
696
  const primaryInjury$1 = (scope) => sbs2ColRadio({
660
697
  name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
661
698
  label: 'Primary Injury:',
@@ -777,25 +814,6 @@ const valueOfAssets = (scope) => sbsSelect({
777
814
  ]
778
815
  });
779
816
 
780
- const zipcodeCenter = (updates = {}, scope) => text({
781
- placeholder: '#####',
782
- help: updates.help ?? "We try to match you with local legal help",
783
- name: scope ? scope + ':' + 'Zip' : 'Zip',
784
- maxlength: 5,
785
- inputmode: "numeric",
786
- autocomplete: 'postal-code',
787
- validation: 'required|matches:/^[0-9]{5}$/',
788
- validationMessages: {
789
- required: 'Zip Code is required',
790
- matches: 'Invalid Zip Code'
791
- },
792
- wrapperClass: 't-flex t-justify-center',
793
- messagesClass: 't-flex t-justify-center',
794
- inputClass: 't-text-center',
795
- helpClass: 't-mt-2.5 !t-text-sm t-text-center'
796
- });
797
-
798
-
799
817
  // ------ Question Groups
800
818
 
801
819
  // NOTE: name must be unique within a form!
@@ -1047,13 +1065,20 @@ function verticalStepSubHeadline(updates) {
1047
1065
  function commentsStepHeadline(updates) {
1048
1066
  return {
1049
1067
  $el: 'h3',
1050
- children: updates.headline || 'Additional Case Details',
1068
+ children: updates.headline || 'Additional Details',
1051
1069
  attrs: {
1052
1070
  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 || '')
1053
1071
  }
1054
1072
  }
1055
1073
  }
1056
1074
 
1075
+ function commentsStepHeadlineLegal(updates) {
1076
+ return commentsStepHeadline({
1077
+ headline: updates.headline || 'Additional Case Details',
1078
+ headlineClass: updates.headlineClass
1079
+ })
1080
+ }
1081
+
1057
1082
  function firstAndLastStepHeadline(updates) {
1058
1083
  return {
1059
1084
  $el: 'h3',
@@ -1077,7 +1102,7 @@ function legalCrossSellsStepHeadline(updates) {
1077
1102
  function contactStepHeadline(updates) {
1078
1103
  return {
1079
1104
  $el: 'h3',
1080
- children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
1105
+ children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
1081
1106
  attrs: {
1082
1107
  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 || '')
1083
1108
  }
@@ -1087,7 +1112,7 @@ function contactStepHeadline(updates) {
1087
1112
  function contactStepSubHeadline(updates) {
1088
1113
  return {
1089
1114
  $el: 'h5',
1090
- children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
1115
+ children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
1091
1116
  attrs: {
1092
1117
  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 || '')
1093
1118
  }
@@ -1127,10 +1152,16 @@ const stepDefaults = (step, stepKey) => ({
1127
1152
  }
1128
1153
  });
1129
1154
 
1130
- function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
1131
- if (typeof nextOnEnter === 'undefined') {
1132
- nextOnEnter = true;
1133
- }
1155
+ function step(name, inputs, updates = {}) {
1156
+ const {
1157
+ nextOnEnter = true,
1158
+ nextOnInput = false,
1159
+ stepKey = undefined,
1160
+ nextStepMap = undefined,
1161
+ triggerRedirectMap = undefined,
1162
+ autoFocus = undefined,
1163
+ } = updates;
1164
+
1134
1165
  if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
1135
1166
  const lastInput = findLastInput(inputs[inputs.length - 1]);
1136
1167
  if (lastInput && nextOnEnter === true) {
@@ -1150,6 +1181,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
1150
1181
  id: name,
1151
1182
  name: name,
1152
1183
  nextStepMap: nextStepMap,
1184
+ triggerRedirectMap: triggerRedirectMap,
1153
1185
  autoFocus: autoFocus,
1154
1186
  children: inputs
1155
1187
  }
@@ -1160,44 +1192,17 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
1160
1192
 
1161
1193
  // Single question step
1162
1194
  function sqstep(name, input, defaultHeadline, updates = {}) {
1195
+ if (typeof updates.nextOnInput === 'undefined') {
1196
+ updates.nextOnInput = true;
1197
+ }
1198
+
1163
1199
  return step(
1164
1200
  name,
1165
1201
  [
1166
1202
  verticalStepHeadline({ headline: updates.headline ?? defaultHeadline, headlineClass: updates.headlineClass }),
1167
1203
  ...Array.isArray(input) ? input : [input],
1168
1204
  ],
1169
- updates.nextOnEnter,
1170
- typeof updates.nextOnInput === 'undefined' ? true : updates.nextOnInput,
1171
- updates.stepKey,
1172
- updates.nextStepMap
1173
- )
1174
- }
1175
-
1176
- function commentsWithBankruptcy(updates = {}) {
1177
- return step(
1178
- 'commentsWithBankruptcy',
1179
- [
1180
- commentsStepHeadline(updates),
1181
- comments({
1182
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL : updates.label,
1183
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1184
- inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1185
- }, updates.scope),
1186
- // TODO: needs scope support
1187
- bankruptcyCrossSell(),
1188
- {
1189
- $el: 'div',
1190
- if: '$get(CrossSell_Bankruptcy).value == true',
1191
- children: [
1192
- comments({
1193
- label: 'Bankruptcy or debt details:',
1194
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1195
- inputClass: '!t-h-16'
1196
- }, 'CrossSell:Bankruptcy')
1197
- ],
1198
- }
1199
- ],
1200
- false // nextOnEnter
1205
+ updates
1201
1206
  )
1202
1207
  }
1203
1208
 
@@ -1213,7 +1218,7 @@ function contactInfo(updates = {}) {
1213
1218
  TCPAConsent(updates.scope),
1214
1219
  secureIcon()
1215
1220
  ],
1216
- false, // nextOnEnter
1221
+ { nextOnEnter: false }
1217
1222
  )
1218
1223
  }
1219
1224
 
@@ -1232,10 +1237,46 @@ function firstAndLastV3(updates = {}, scope) {
1232
1237
  firstName(scope),
1233
1238
  lastName(scope)
1234
1239
  ],
1235
- updates.nextOnEnter
1240
+ updates
1236
1241
  )
1237
1242
  }
1238
1243
 
1244
+ function zipcode(updates = {}) {
1245
+ return sqstep(
1246
+ 'zipcode',
1247
+ zipcodeCenter(updates, updates.scope),
1248
+ 'Please verify your Zip Code',
1249
+ updates
1250
+ )
1251
+ }
1252
+
1253
+ function commentsWithBankruptcy(updates = {}) {
1254
+ return step(
1255
+ 'commentsWithBankruptcy',
1256
+ [
1257
+ commentsStepHeadlineLegal(updates),
1258
+ comments({
1259
+ label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1260
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1261
+ inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1262
+ }, updates.scope),
1263
+ // TODO: needs scope support
1264
+ bankruptcyCrossSell(),
1265
+ {
1266
+ $el: 'div',
1267
+ if: '$get(CrossSell_Bankruptcy).value == true',
1268
+ children: [
1269
+ comments({
1270
+ label: 'Bankruptcy or debt details:',
1271
+ placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1272
+ inputClass: '!t-h-16'
1273
+ }, 'CrossSell:Bankruptcy')
1274
+ ],
1275
+ }
1276
+ ],
1277
+ { nextOnEnter: false }
1278
+ )
1279
+ }
1239
1280
 
1240
1281
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1241
1282
  return step(
@@ -1253,7 +1294,7 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1253
1294
  'CrossSell:Auto_and_Car_Accidents'
1254
1295
  )
1255
1296
  ],
1256
- updates.nextOnEnter
1297
+ updates
1257
1298
  )
1258
1299
  }
1259
1300
 
@@ -1272,7 +1313,7 @@ function childCustodyCrossSellQuestions(updates = {}) {
1272
1313
  'CrossSell:Child_Custody'
1273
1314
  )
1274
1315
  ],
1275
- updates.nextOnEnter
1316
+ updates
1276
1317
  )
1277
1318
  }
1278
1319
 
@@ -1291,7 +1332,7 @@ function divorceAndSeparationCrossSellQuestions(updates = {}) {
1291
1332
  'CrossSell:Divorce_and_Separation'
1292
1333
  )
1293
1334
  ],
1294
- updates.nextOnEnter
1335
+ updates
1295
1336
  )
1296
1337
  }
1297
1338
 
@@ -1310,7 +1351,7 @@ function duiAndDWICrossSellQuestions(updates = {}) {
1310
1351
  'CrossSell:DUI_and_DWI'
1311
1352
  )
1312
1353
  ],
1313
- updates.nextOnEnter
1354
+ updates
1314
1355
  )
1315
1356
  }
1316
1357
 
@@ -1330,7 +1371,7 @@ function ssdiCrossSellQuestions(updates = {}) {
1330
1371
  'CrossSell:Social_Security_Disability_and_Insurance'
1331
1372
  )
1332
1373
  ],
1333
- updates.nextOnEnter
1374
+ updates
1334
1375
  )
1335
1376
  }
1336
1377
 
@@ -1350,7 +1391,7 @@ function personalInjuryCrossSellQuestions(updates = {}) {
1350
1391
  'CrossSell:Personal_Injury'
1351
1392
  )
1352
1393
  ],
1353
- updates.nextOnEnter
1394
+ updates
1354
1395
  )
1355
1396
  }
1356
1397
 
@@ -1369,7 +1410,7 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1369
1410
  'CrossSell:Power_of_Attorney'
1370
1411
  )
1371
1412
  ],
1372
- updates.nextOnEnter
1413
+ updates
1373
1414
  )
1374
1415
  }
1375
1416
 
@@ -1388,7 +1429,7 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
1388
1429
  'CrossSell:Wills_and_Trusts'
1389
1430
  )
1390
1431
  ],
1391
- updates.nextOnEnter
1432
+ updates
1392
1433
  )
1393
1434
  }
1394
1435
 
@@ -1408,7 +1449,7 @@ function workersCompensationCrossSellQuestions(updates = {}) {
1408
1449
  'CrossSell:Workers_Compensation'
1409
1450
  )
1410
1451
  ],
1411
- updates.nextOnEnter
1452
+ updates
1412
1453
  )
1413
1454
  }
1414
1455
 
@@ -1424,32 +1465,19 @@ function employmentAndWorkplaceTOLP(updates = {}) {
1424
1465
  },
1425
1466
  employmentAndWorkplaceTOLPDisplayCenter(),
1426
1467
  ],
1427
- updates.nextOnEnter,
1428
- updates.nextOnInput,
1429
- updates.stepKey,
1430
- updates.nextStepMap
1468
+ updates
1431
1469
  )
1432
1470
  }
1433
1471
 
1434
1472
  function legalCrossSells(updates = {}) {
1473
+ updates.nextOnInput = false;
1474
+ updates.stepKey = '$get(Type_Of_Legal_Problem).value';
1435
1475
  return step(
1436
1476
  'legalCrossSells',
1437
1477
  [
1438
1478
  legalCrossSellsStepHeadline(updates),
1439
1479
  legalCrossSells$1(),
1440
1480
  ],
1441
- updates.nextOnEnter,
1442
- false,
1443
- // Note: we should probably scope this stepKey to this step name
1444
- '$get(Type_Of_Legal_Problem).value'
1445
- )
1446
- }
1447
-
1448
- function zipcode(updates = {}) {
1449
- return sqstep(
1450
- 'zipcode',
1451
- zipcodeCenter(updates, updates.scope),
1452
- 'Please verify your Zip Code',
1453
1481
  updates
1454
1482
  )
1455
1483
  }
@@ -1719,9 +1747,7 @@ function formProps(updates) {
1719
1747
  return props
1720
1748
  }
1721
1749
 
1722
- const metaDefaults = {
1723
- tcpaLanguage: TCPA_LANGUAGE
1724
- };
1750
+ const metaDefaults = {};
1725
1751
 
1726
1752
  function metaProps(updates) {
1727
1753
  const data = merge(
@@ -1734,7 +1760,7 @@ function metaProps(updates) {
1734
1760
  }
1735
1761
  }
1736
1762
 
1737
- function defaultMetaProps(tolps = null) {
1763
+ function defaultMetaPropsLegal(tolps = null) {
1738
1764
  let commentsPlaceholders = TOLPCommentsPlaceholders;
1739
1765
  let finalHeadlines = TOLPFinalHeadlines;
1740
1766
  let finalSubHeadlines = TOLPFinalSubHeadlines;
@@ -1744,12 +1770,13 @@ function defaultMetaProps(tolps = null) {
1744
1770
  finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
1745
1771
  }
1746
1772
  return metaProps({
1747
- defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1773
+ tcpaLanguage: TCPA_LANGUAGE_LEGAL,
1774
+ defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1748
1775
  commentsPlaceholders: commentsPlaceholders,
1749
- defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
1776
+ defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1750
1777
  finalHeadlines: finalHeadlines,
1751
- defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
1752
- finalSubHeadlines: finalSubHeadlines,
1778
+ defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1779
+ finalSubHeadlines: finalSubHeadlines
1753
1780
  })
1754
1781
  }
1755
1782
 
@@ -2318,291 +2345,321 @@ const nextStepsLegalNoHA = [
2318
2345
  ];
2319
2346
 
2320
2347
  const nextStepsMapGeneralLegal = {
2321
- 'Type_Of_Legal_Problem': {
2322
- 'Adoption': [
2323
- 'maritalStatus',
2324
- 'haveChildren',
2325
- ...nextStepsLegalDefaultLPM
2326
- ],
2327
- 'Asbestos and Mesothelioma': [
2328
- 'incidentDate',
2329
- 'doctorTreatment',
2330
- ...nextStepsLegalDefault
2331
- ],
2332
- 'Auto and Car Accidents': [
2333
- 'incidentDate',
2334
- 'atFault',
2335
- 'primaryInjury',
2336
- 'doctorTreatment',
2337
- 'policeReportFiled',
2338
- ...nextStepsLegalNoDOI
2339
- ],
2340
- 'Bankruptcy': [
2341
- 'totalMonthlyIncome',
2342
- 'totalDebt',
2343
- 'ownRealEstate',
2344
- 'valueOfAssets',
2345
- ...nextStepsLegalDefault
2346
- ],
2347
- 'Business Lawyers': [
2348
- 'businessServices',
2349
- 'businessType',
2350
- 'numEmployeesOfBusiness',
2351
- ...nextStepsLegalDefault
2352
- ],
2353
- 'Child Custody': [
2354
- 'childRelationship',
2355
- 'childHome',
2356
- 'childPrimaryCaregiver',
2357
- ...nextStepsLegalDefaultLPM
2358
- ],
2359
- 'Child Support': [
2360
- 'childRelationship',
2361
- 'childHome',
2362
- 'childPrimaryCaregiver',
2363
- ...nextStepsLegalDefaultLPM
2364
- ],
2365
- 'Civil Rights and Discrimination': [
2366
- 'civilRightsType',
2367
- ...nextStepsLegalDefault
2368
- ],
2369
- 'Civil Lawsuit': [
2370
- 'civilDefense',
2371
- 'lawsuitOtherParty',
2372
- ...nextStepsLegalDefault
2373
- ],
2374
- 'File a Lawsuit': [
2375
- 'civilLawsuitTOLPDisplay',
2376
- 'lawsuitOtherParty',
2377
- ...nextStepsLegalDefault
2378
- ],
2379
- 'Defend a Lawsuit': [
2380
- 'lawsuitOtherParty',
2381
- ...nextStepsLegalDefault
2382
- ],
2383
- 'Consumer Lawyers': [
2384
- 'consumerLawyerType',
2385
- 'incidentDate',
2386
- 'lawsuitOtherParty',
2387
- ...nextStepsLegalDefault
2388
- ],
2389
- 'Criminal and Felony': [
2390
- 'criminalTOLPDisplay',
2391
- 'crimeCommittedDate',
2392
- 'roleInMatterCriminal',
2393
- 'pendingCharges',
2394
- ...nextStepsLegalDefaultLPM
2395
- ],
2396
- 'Debt and Collections': [
2397
- 'totalMonthlyIncome',
2398
- 'totalDebt',
2399
- 'ownRealEstate',
2400
- 'valueOfAssets',
2401
- ...nextStepsLegalDefault
2402
- ],
2403
- 'Divorce and Separation': [
2404
- 'maritalStatus',
2405
- 'haveChildren',
2406
- ...nextStepsLegalDefaultLPM
2407
- ],
2408
- 'DUI and DWI': [
2409
- 'incidentDate',
2410
- 'priorAlcoholOffenses',
2411
- 'typeOfAlcoholTest',
2412
- 'bloodContentAlcoholTest',
2413
- 'pendingCharges',
2414
- ...nextStepsLegalDefault
2415
- ],
2416
- 'Employment and Workplace': [
2417
- 'employmentAndWorkplaceTOLPDisplay',
2418
- 'numEmployeesOfBusiness',
2419
- 'employerType',
2420
- 'employeeAtCompany',
2421
- ...nextStepsLegalDefault
2422
- ],
2423
- 'Expungement': [
2424
- 'incidentDate',
2425
- 'criminalChargeType',
2426
- ...nextStepsLegalDefaultLPM
2427
- ],
2428
- 'Family Issues': [
2429
- 'maritalStatus',
2430
- 'haveChildren',
2431
- ...nextStepsLegalDefaultLPM
2432
- ],
2433
- 'Foreclosure': [
2434
- 'ownRealEstate',
2435
- 'typeOfProperty',
2436
- 'amountPaymentsPastDue',
2437
- 'loanAmount',
2438
- 'defaultNotice',
2439
- ...nextStepsLegalDefault
2440
- ],
2441
- 'Guardianship': [
2442
- 'maritalStatus',
2443
- 'haveChildren',
2444
- ...nextStepsLegalDefaultLPM
2445
- ],
2446
- 'Immigration and Visas': [
2447
- 'countryOfCitizenship',
2448
- 'immigrationLocation',
2449
- 'immigrationEntry',
2450
- 'immigrationType',
2451
- 'immigrationStatus',
2452
- 'immigrationDetails',
2453
- ...nextStepsLegalDefault
2454
- ],
2455
- 'Landlord and Tenant': [
2456
- 'landlordTenantIssue',
2457
- 'landlordTenantParty',
2458
- ...nextStepsLegalDefault
2459
- ],
2460
- 'Lemon Law': [
2461
- 'incidentDate',
2462
- 'lawsuitOtherParty',
2463
- ...nextStepsLegalDefault
2464
- ],
2465
- 'Long Term Disability': [
2466
- 'applicantOccupation',
2467
- 'applicantAge',
2468
- 'applicantLTDisabilityPolicy',
2469
- 'applicantDisabilityHowObtain',
2470
- 'applicantPreviouslyAppliedLtdBenefits',
2471
- 'applicantReceivedDisabilityBenefits',
2472
- 'applicantMonthlySalary',
2473
- ...nextStepsLegalNoDOI
2474
- ],
2475
- 'Medical Malpractice': [
2476
- 'incidentDate',
2477
- 'claimStatus',
2478
- 'doctorTreatment',
2479
- 'medicalMalpracticeInjuries',
2480
- ...nextStepsLegalDefault
2481
- ],
2482
- 'Patents and Intellectual Property': [
2483
- 'patentAssistanceType',
2484
- 'patentFor',
2485
- ...nextStepsLegalDefault
2486
- ],
2487
- 'Personal Injury': [
2488
- 'incidentDate',
2489
- 'claimStatus',
2490
- 'atFault',
2491
- 'primaryInjury',
2492
- 'doctorTreatment',
2493
- ...nextStepsLegalNoDOI
2494
- ],
2495
- 'Probate and Estates': [
2496
- 'valueOfAssets',
2497
- 'typeOfAssets',
2498
- 'roleInMatterProbate',
2499
- 'estateLegalServicesNeeded',
2500
- ...nextStepsLegalDefault
2501
- ],
2502
- 'Property Damage': [
2503
- 'realEstateArea',
2504
- 'wouldLikeLawyerTo',
2505
- ...nextStepsLegalDefault
2506
- ],
2507
- 'Real Estate': [
2508
- 'realEstateTOLPDisplay',
2509
- 'realEstateArea',
2510
- 'wouldLikeLawyerTo',
2511
- ...nextStepsLegalDefault
2512
- ],
2513
- 'Social Security Disability and Insurance': [
2514
- 'applicantAge',
2515
- 'disabilityConditionStopWork',
2516
- 'disabilityWorkHistory',
2517
- 'socialSecurityDisabilityReceivingBenefits',
2518
- 'doctorTreatment',
2519
- ...nextStepsLegalNoDOI
2520
- ],
2521
- 'Tax and IRS': [
2522
- 'totalDebt',
2523
- 'taxProblemDetails',
2524
- 'taxLevel',
2525
- 'taxIssueType',
2526
- ...nextStepsLegalDefault
2527
- ],
2528
- 'Traffic and Tickets': [
2529
- 'driversLicenseType',
2530
- 'trafficViolations',
2531
- 'haveCourtDate',
2532
- ...nextStepsLegalDefault
2533
- ],
2534
- 'Unemployment': [
2535
- 'numEmployeesOfBusiness',
2536
- 'employerType',
2537
- ...nextStepsLegalNoHA
2538
- ],
2539
- 'Victim of a Crime': [
2540
- 'crimeCommittedDate',
2541
- 'roleInMatterCriminal',
2542
- 'pendingCharges',
2543
- ...nextStepsLegalDefaultLPM
2544
- ],
2545
- 'Wills and Trusts': [
2546
- 'valueOfAssets',
2547
- 'typeOfAssets',
2548
- 'roleInMatterProbate',
2549
- 'estateLegalServicesNeeded',
2550
- ...nextStepsLegalDefault
2551
- ],
2552
- 'Workers Compensation': [
2553
- 'incidentDate',
2554
- 'claimStatus',
2555
- 'primaryInjury',
2556
- 'causeOfInjury',
2557
- 'doctorTreatment',
2558
- ...nextStepsLegalNoDOI
2559
- ],
2560
- 'Workplace Harassment': [
2561
- 'numEmployeesOfBusiness',
2562
- 'employerType',
2563
- 'employeeAtCompany',
2564
- ...nextStepsLegalDefault
2565
- ],
2566
- 'Workplace Discrimination': [
2348
+ values: {
2349
+ 'Type_Of_Legal_Problem': {
2350
+ 'Adoption': [
2351
+ 'maritalStatus',
2352
+ 'haveChildren',
2353
+ ...nextStepsLegalDefaultLPM
2354
+ ],
2355
+ 'Asbestos and Mesothelioma': [
2356
+ 'incidentDate',
2357
+ 'doctorTreatment',
2358
+ ...nextStepsLegalDefault
2359
+ ],
2360
+ 'Auto and Car Accidents': [
2361
+ 'incidentDate',
2362
+ 'atFault',
2363
+ 'primaryInjury',
2364
+ 'doctorTreatment',
2365
+ 'policeReportFiled',
2366
+ ...nextStepsLegalNoDOI
2367
+ ],
2368
+ 'Bankruptcy': [
2369
+ 'totalMonthlyIncome',
2370
+ 'totalDebt',
2371
+ 'ownRealEstate',
2372
+ 'valueOfAssets',
2373
+ ...nextStepsLegalDefault
2374
+ ],
2375
+ 'Business Lawyers': [
2376
+ 'businessServices',
2377
+ 'businessType',
2378
+ 'numEmployeesOfBusiness',
2379
+ ...nextStepsLegalDefault
2380
+ ],
2381
+ 'Child Custody': [
2382
+ 'childRelationship',
2383
+ 'childHome',
2384
+ 'childPrimaryCaregiver',
2385
+ ...nextStepsLegalDefaultLPM
2386
+ ],
2387
+ 'Child Support': [
2388
+ 'childRelationship',
2389
+ 'childHome',
2390
+ 'childPrimaryCaregiver',
2391
+ ...nextStepsLegalDefaultLPM
2392
+ ],
2393
+ 'Civil Rights and Discrimination': [
2394
+ 'civilRightsType',
2395
+ ...nextStepsLegalDefault
2396
+ ],
2397
+ 'Civil Lawsuit': [
2398
+ 'civilDefense',
2399
+ 'lawsuitOtherParty',
2400
+ ...nextStepsLegalDefault
2401
+ ],
2402
+ 'File a Lawsuit': [
2403
+ 'civilLawsuitTOLPDisplay',
2404
+ 'lawsuitOtherParty',
2405
+ ...nextStepsLegalDefault
2406
+ ],
2407
+ 'Defend a Lawsuit': [
2408
+ 'lawsuitOtherParty',
2409
+ ...nextStepsLegalDefault
2410
+ ],
2411
+ 'Consumer Lawyers': [
2412
+ 'consumerLawyerType',
2413
+ 'incidentDate',
2414
+ 'lawsuitOtherParty',
2415
+ ...nextStepsLegalDefault
2416
+ ],
2417
+ 'Criminal and Felony': [
2418
+ 'criminalTOLPDisplay',
2419
+ 'crimeCommittedDate',
2420
+ 'roleInMatterCriminal',
2421
+ 'pendingCharges',
2422
+ ...nextStepsLegalDefaultLPM
2423
+ ],
2424
+ 'Debt and Collections': [
2425
+ 'totalMonthlyIncome',
2426
+ 'totalDebt',
2427
+ 'ownRealEstate',
2428
+ 'valueOfAssets',
2429
+ ...nextStepsLegalDefault
2430
+ ],
2431
+ 'Divorce and Separation': [
2432
+ 'maritalStatus',
2433
+ 'haveChildren',
2434
+ ...nextStepsLegalDefaultLPM
2435
+ ],
2436
+ 'DUI and DWI': [
2437
+ 'incidentDate',
2438
+ 'priorAlcoholOffenses',
2439
+ 'typeOfAlcoholTest',
2440
+ 'bloodContentAlcoholTest',
2441
+ 'pendingCharges',
2442
+ ...nextStepsLegalDefault
2443
+ ],
2444
+ 'Employment and Workplace': [
2445
+ 'employmentAndWorkplaceTOLPDisplay',
2446
+ 'numEmployeesOfBusiness',
2447
+ 'employerType',
2448
+ 'employeeAtCompany',
2449
+ ...nextStepsLegalDefault
2450
+ ],
2451
+ 'Expungement': [
2452
+ 'incidentDate',
2453
+ 'criminalChargeType',
2454
+ ...nextStepsLegalDefaultLPM
2455
+ ],
2456
+ 'Family Issues': [
2457
+ 'maritalStatus',
2458
+ 'haveChildren',
2459
+ ...nextStepsLegalDefaultLPM
2460
+ ],
2461
+ 'Foreclosure': [
2462
+ 'ownRealEstate',
2463
+ 'typeOfProperty',
2464
+ 'amountPaymentsPastDue',
2465
+ 'loanAmount',
2466
+ 'defaultNotice',
2467
+ ...nextStepsLegalDefault
2468
+ ],
2469
+ 'Guardianship': [
2470
+ 'maritalStatus',
2471
+ 'haveChildren',
2472
+ ...nextStepsLegalDefaultLPM
2473
+ ],
2474
+ 'Immigration and Visas': [
2475
+ 'countryOfCitizenship',
2476
+ 'immigrationLocation',
2477
+ 'immigrationEntry',
2478
+ 'immigrationType',
2479
+ 'immigrationStatus',
2480
+ 'immigrationDetails',
2481
+ ...nextStepsLegalDefault
2482
+ ],
2483
+ 'Landlord and Tenant': [
2484
+ 'landlordTenantIssue',
2485
+ 'landlordTenantParty',
2486
+ ...nextStepsLegalDefault
2487
+ ],
2488
+ 'Lemon Law': [
2489
+ 'incidentDate',
2490
+ 'lawsuitOtherParty',
2491
+ ...nextStepsLegalDefault
2492
+ ],
2493
+ 'Long Term Disability': [
2494
+ 'applicantOccupation',
2495
+ 'applicantAge',
2496
+ 'applicantLTDisabilityPolicy',
2497
+ 'applicantDisabilityHowObtain',
2498
+ 'applicantPreviouslyAppliedLtdBenefits',
2499
+ 'applicantReceivedDisabilityBenefits',
2500
+ 'applicantMonthlySalary',
2501
+ ...nextStepsLegalNoDOI
2502
+ ],
2503
+ 'Medical Malpractice': [
2504
+ 'incidentDate',
2505
+ 'claimStatus',
2506
+ 'doctorTreatment',
2507
+ 'medicalMalpracticeInjuries',
2508
+ ...nextStepsLegalDefault
2509
+ ],
2510
+ 'Patents and Intellectual Property': [
2511
+ 'patentAssistanceType',
2512
+ 'patentFor',
2513
+ ...nextStepsLegalDefault
2514
+ ],
2515
+ 'Personal Injury': [
2516
+ 'incidentDate',
2517
+ 'claimStatus',
2518
+ 'atFault',
2519
+ 'primaryInjury',
2520
+ 'doctorTreatment',
2521
+ ...nextStepsLegalNoDOI
2522
+ ],
2523
+ 'Probate and Estates': [
2524
+ 'valueOfAssets',
2525
+ 'typeOfAssets',
2526
+ 'roleInMatterProbate',
2527
+ 'estateLegalServicesNeeded',
2528
+ ...nextStepsLegalDefault
2529
+ ],
2530
+ 'Property Damage': [
2531
+ 'realEstateArea',
2532
+ 'wouldLikeLawyerTo',
2533
+ ...nextStepsLegalDefault
2534
+ ],
2535
+ 'Real Estate': [
2536
+ 'realEstateTOLPDisplay',
2537
+ 'realEstateArea',
2538
+ 'wouldLikeLawyerTo',
2539
+ ...nextStepsLegalDefault
2540
+ ],
2541
+ 'Social Security Disability and Insurance': [
2542
+ 'applicantAge',
2543
+ 'disabilityConditionStopWork',
2544
+ 'disabilityWorkHistory',
2545
+ 'socialSecurityDisabilityReceivingBenefits',
2546
+ 'doctorTreatment',
2547
+ ...nextStepsLegalNoDOI
2548
+ ],
2549
+ 'Tax and IRS': [
2550
+ 'totalDebt',
2551
+ 'taxProblemDetails',
2552
+ 'taxLevel',
2553
+ 'taxIssueType',
2554
+ ...nextStepsLegalDefault
2555
+ ],
2556
+ 'Traffic and Tickets': [
2557
+ 'driversLicenseType',
2558
+ 'trafficViolations',
2559
+ 'haveCourtDate',
2560
+ ...nextStepsLegalDefault
2561
+ ],
2562
+ 'Unemployment': [
2563
+ 'numEmployeesOfBusiness',
2564
+ 'employerType',
2565
+ ...nextStepsLegalNoHA
2566
+ ],
2567
+ 'Victim of a Crime': [
2568
+ 'crimeCommittedDate',
2569
+ 'roleInMatterCriminal',
2570
+ 'pendingCharges',
2571
+ ...nextStepsLegalDefaultLPM
2572
+ ],
2573
+ 'Wills and Trusts': [
2574
+ 'valueOfAssets',
2575
+ 'typeOfAssets',
2576
+ 'roleInMatterProbate',
2577
+ 'estateLegalServicesNeeded',
2578
+ ...nextStepsLegalDefault
2579
+ ],
2580
+ 'Workers Compensation': [
2581
+ 'incidentDate',
2582
+ 'claimStatus',
2583
+ 'primaryInjury',
2584
+ 'causeOfInjury',
2585
+ 'doctorTreatment',
2586
+ ...nextStepsLegalNoDOI
2587
+ ],
2588
+ 'Workplace Harassment': [
2589
+ 'numEmployeesOfBusiness',
2590
+ 'employerType',
2591
+ 'employeeAtCompany',
2592
+ ...nextStepsLegalDefault
2593
+ ],
2594
+ 'Workplace Discrimination': [
2595
+ 'numEmployeesOfBusiness',
2596
+ 'employerType',
2597
+ 'employeeAtCompany',
2598
+ ...nextStepsLegalDefault
2599
+ ],
2600
+ 'Wrongful Death': [
2601
+ 'incidentDate',
2602
+ 'relationshipToVictim',
2603
+ 'criminalChargesFiled',
2604
+ 'causeOfDeath',
2605
+ ...nextStepsLegalNoDOI
2606
+ ],
2607
+ 'Wrongful Termination': [
2608
+ 'numEmployeesOfBusiness',
2609
+ 'employerType',
2610
+ ...nextStepsLegalDefault
2611
+ ],
2612
+ },
2613
+ '*': nextStepsLegalDefault
2614
+ }
2615
+ };
2616
+
2617
+ const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"];
2618
+
2619
+ const nextStepsMapEmploymentAndWorkplaceTOLPDisplay = {
2620
+ values: {
2621
+ 'Type_Of_Legal_Problem_Display': {
2622
+ 'Wrongful Termination': TOLPNextSteps["Wrongful Termination"],
2623
+ 'Workers Compensation': TOLPNextSteps["Workers Compensation"],
2624
+ 'Personal Injury': TOLPNextSteps["Personal Injury"],
2625
+ 'Unemployment': TOLPNextSteps["Unemployment"],
2626
+ },
2627
+ '*': [
2567
2628
  'numEmployeesOfBusiness',
2568
2629
  'employerType',
2569
2630
  'employeeAtCompany',
2570
2631
  ...nextStepsLegalDefault
2571
- ],
2572
- 'Wrongful Death': [
2573
- 'incidentDate',
2574
- 'relationshipToVictim',
2575
- 'criminalChargesFiled',
2576
- 'causeOfDeath',
2577
- ...nextStepsLegalNoDOI
2578
- ],
2579
- 'Wrongful Termination': [
2580
- 'numEmployeesOfBusiness',
2581
- 'employerType',
2582
- ...nextStepsLegalDefault
2583
- ],
2584
- },
2585
- '*': nextStepsLegalDefault
2632
+ ]
2633
+ }
2586
2634
  };
2587
2635
 
2588
- const TOLPNextSteps = nextStepsMapGeneralLegal["Type_Of_Legal_Problem"];
2589
-
2590
- const nextStepsMapEmploymentAndWorkplaceTOLPDisplay = {
2591
- 'Type_Of_Legal_Problem_Display': {
2592
- 'Wrongful Termination': TOLPNextSteps["Wrongful Termination"],
2593
- 'Workers Compensation': TOLPNextSteps["Workers Compensation"],
2594
- 'Personal Injury': TOLPNextSteps["Personal Injury"],
2595
- 'Unemployment': TOLPNextSteps["Unemployment"],
2636
+ const nextStepsMapLegalCrossSells = {
2637
+ values: {
2638
+ 'Legal_CrossSells': {
2639
+ 'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
2640
+ 'Personal Injury': ['personalInjuryCrossSellQuestions'],
2641
+ 'Workers Compensation': ['workersCompensationCrossSellQuestions'],
2642
+ 'DUI and DWI': ['duiAndDWICrossSellQuestions'],
2643
+ 'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
2644
+ 'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
2645
+ 'Bankruptcy': ['bankruptcyCrossSellQuestions'],
2646
+ 'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
2647
+ 'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
2648
+ 'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
2649
+ 'Child Custody': ['childCustodyCrossSellQuestions'],
2650
+ },
2651
+ '*': ['firstAndLast', 'contactInfo'],
2596
2652
  },
2597
- '*': [
2598
- 'numEmployeesOfBusiness',
2599
- 'employerType',
2600
- 'employeeAtCompany',
2601
- ...nextStepsLegalDefault
2602
- ]
2653
+
2654
+ // NOTE: this assumes a certain placement of the cross sell question
2655
+ // in the form flow.
2656
+ appendSteps: ['firstAndLast', 'contactInfo'],
2657
+ matchesAllowed: 1,
2603
2658
  };
2604
2659
 
2605
- const meta = defaultMetaProps();
2660
+ const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
2661
+
2662
+ const meta = defaultMetaPropsLegal();
2606
2663
 
2607
2664
  meta.data.dynamicSchema = [
2608
2665
  atFault(),
@@ -2628,7 +2685,8 @@ meta.data.dynamicSchema = [
2628
2685
  headlineClass: '!t-text-dark',
2629
2686
  }),
2630
2687
  legalCrossSells({
2631
- headlineClass: '!t-text-dark'
2688
+ headlineClass: '!t-text-dark',
2689
+ nextStepMap: nextStepsMapLegalCrossSells,
2632
2690
  }),
2633
2691
  autoAndCarAccidentCrossSellQuestions(),
2634
2692
  personalInjuryCrossSellQuestions(),
@@ -2652,7 +2710,8 @@ const schema = [
2652
2710
  props: formProps({
2653
2711
  formId: 'employmentAndWorkplace',
2654
2712
  redirectMap: legalRedirectMap(),
2655
- valueOverrideMap: legalAllValueOverrideMap
2713
+ valueOverrideMap: legalAllValueOverrideMap,
2714
+ crossSellOptionMap: legalCrossSellOptionMap
2656
2715
  }),
2657
2716
  children: [
2658
2717
  progressBar(),