bhl-forms 0.6.15 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/bhl-forms.es.js +1757 -1759
  2. package/dist/bhl-forms.iife.js +4 -4
  3. package/dist/bhl-forms.modern.es.js +2804 -2811
  4. package/dist/bhl-forms.modern.iife.js +6 -6
  5. package/dist/bhl-forms.modern.umd.js +6 -6
  6. package/dist/bhl-forms.umd.js +4 -4
  7. package/dist/forms/accidentsAndInjuries.es.js +314 -228
  8. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  9. package/dist/forms/accidentsAndInjuries.json +1 -1
  10. package/dist/forms/appraisals.es.js +16 -7
  11. package/dist/forms/appraisals.iife.js +1 -1
  12. package/dist/forms/business.es.js +317 -236
  13. package/dist/forms/business.iife.js +1 -1
  14. package/dist/forms/business.json +1 -1
  15. package/dist/forms/childAndFamily.es.js +303 -224
  16. package/dist/forms/childAndFamily.iife.js +1 -1
  17. package/dist/forms/childAndFamily.json +1 -1
  18. package/dist/forms/childAndFamilySingle.es.js +643 -555
  19. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  20. package/dist/forms/childAndFamilySingle.json +1 -1
  21. package/dist/forms/civilLawsuit.es.js +637 -551
  22. package/dist/forms/civilLawsuit.iife.js +1 -1
  23. package/dist/forms/civilLawsuit.json +1 -1
  24. package/dist/forms/coins.es.js +16 -7
  25. package/dist/forms/coins.iife.js +1 -1
  26. package/dist/forms/contracts.es.js +307 -227
  27. package/dist/forms/contracts.iife.js +1 -1
  28. package/dist/forms/contracts.json +1 -1
  29. package/dist/forms/criminal.es.js +660 -572
  30. package/dist/forms/criminal.iife.js +1 -1
  31. package/dist/forms/criminal.json +1 -1
  32. package/dist/forms/divorce.es.js +643 -555
  33. package/dist/forms/divorce.iife.js +1 -1
  34. package/dist/forms/divorce.json +1 -1
  35. package/dist/forms/employmentAndWorkplace.es.js +584 -506
  36. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  37. package/dist/forms/employmentAndWorkplace.json +1 -1
  38. package/dist/forms/generalHomeImprovement.es.js +3015 -0
  39. package/dist/forms/generalHomeImprovement.iife.js +1 -0
  40. package/dist/forms/generalHomeImprovement.json +1 -0
  41. package/dist/forms/generalLegal.es.js +341 -244
  42. package/dist/forms/generalLegal.iife.js +1 -1
  43. package/dist/forms/generalLegal.json +1 -1
  44. package/dist/forms/generalLegalJustAnswer.es.js +4542 -0
  45. package/dist/forms/generalLegalJustAnswer.iife.js +1 -0
  46. package/dist/forms/generalLegalJustAnswer.json +1 -0
  47. package/dist/forms/generalLegalPopUnder.es.js +342 -245
  48. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  49. package/dist/forms/generalLegalPopUnder.json +1 -1
  50. package/dist/forms/generalLegalPopUnderSingle.es.js +692 -612
  51. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  52. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  53. package/dist/forms/generalLegalSingle.es.js +692 -612
  54. package/dist/forms/generalLegalSingle.iife.js +1 -1
  55. package/dist/forms/generalLegalSingle.json +1 -1
  56. package/dist/forms/generalLegalThankYou.es.js +204 -158
  57. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  58. package/dist/forms/generalLegalThankYou.json +1 -1
  59. package/dist/forms/generalLegalThankYouConsultation.es.js +692 -612
  60. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  61. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  62. package/dist/forms/harassmentAndDiscrimination.es.js +303 -224
  63. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  64. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  65. package/dist/forms/landlordTenant.es.js +316 -240
  66. package/dist/forms/landlordTenant.iife.js +1 -1
  67. package/dist/forms/landlordTenant.json +1 -1
  68. package/dist/forms/malpractice.es.js +308 -227
  69. package/dist/forms/malpractice.iife.js +1 -1
  70. package/dist/forms/malpractice.json +1 -1
  71. package/dist/forms/mechanics.es.js +184 -166
  72. package/dist/forms/mechanics.iife.js +1 -1
  73. package/dist/forms/mechanics.json +1 -1
  74. package/dist/forms/patentsAndIP.es.js +646 -558
  75. package/dist/forms/patentsAndIP.iife.js +1 -1
  76. package/dist/forms/patentsAndIP.json +1 -1
  77. package/dist/forms/realEstate.es.js +339 -243
  78. package/dist/forms/realEstate.iife.js +1 -1
  79. package/dist/forms/realEstate.json +1 -1
  80. package/dist/forms/repossession.es.js +307 -227
  81. package/dist/forms/repossession.iife.js +1 -1
  82. package/dist/forms/repossession.json +1 -1
  83. package/dist/forms/ssdi.es.js +156 -140
  84. package/dist/forms/ssdi.iife.js +1 -1
  85. package/dist/forms/ssdi.json +1 -1
  86. package/dist/forms/testForm.es.js +69 -51
  87. package/dist/forms/testForm.iife.js +1 -1
  88. package/dist/forms/testForm.json +1 -1
  89. package/dist/forms/testRedirects.es.js +43 -22
  90. package/dist/forms/testRedirects.iife.js +1 -1
  91. package/dist/forms/testRedirects.json +1 -1
  92. package/dist/forms/vets.es.js +16 -7
  93. package/dist/forms/vets.iife.js +1 -1
  94. package/dist/forms/willsAndTrusts.es.js +304 -223
  95. package/dist/forms/willsAndTrusts.iife.js +1 -1
  96. package/dist/forms/willsAndTrusts.json +1 -1
  97. package/package.json +3 -3
@@ -6,14 +6,97 @@ function LegalRedirectUrl() {
6
6
  return 'https://listings.ziplawyer.com/api/v1/redirect?zone_id=4&vertical=Legal&category=${properties.Type_Of_Legal_Problem}&Degree_Of_Interest=${properties.Degree_Of_Interest}&zip_code=${properties.Zip}&sub_id=${properties.vid}'
7
7
  }
8
8
 
9
- var TCPA_LANGUAGE = "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 878-213-4937.";
10
-
11
- const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
12
- const DEFAULT_COMMENTS_LABEL = 'Please briefly describe your legal issue in a few words:';
13
- const DEFAULT_FINAL_HEADLINE = 'Submit Your Case';
14
- const DEFAULT_FINAL_HEADLINE_DYNAMIC = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
15
- const DEFAULT_FINAL_SUBHEADLINE = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
16
- const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
9
+ const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
10
+ const DEFAULT_COMMENTS_LABEL_LEGAL = 'Please briefly describe your legal issue in a few words:';
11
+ const DEFAULT_FINAL_HEADLINE_LEGAL = 'Submit Your Case';
12
+ const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
13
+ const DEFAULT_FINAL_SUBHEADLINE_LEGAL = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
14
+ const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
15
+ const TCPA_LANGUAGE_LEGAL = "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 878-213-4937.";
16
+ const defaultLegalImprovementCrossSells = {
17
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
18
+ 'Personal Injury': 'Personal or Workplace Injury',
19
+ 'DUI and DWI': 'Involved in a DUI/DWI',
20
+ 'Wills and Trusts': 'Need a Will or Trust',
21
+ 'Power of Attorney': 'Update Power of Attorney',
22
+ 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
23
+ };
24
+ const CROSS_SELL_OPTION_MAP_LEGAL = {
25
+ // Values can be a list or a map of value -> display value
26
+ 'Auto and Car Accidents': {
27
+ 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
28
+ 'Wills and Trusts': 'Need a Will or Trust',
29
+ 'Workers Compensation': 'Workplace Injury',
30
+ 'Power of Attorney': 'Update Power of Attorney',
31
+ 'Divorce and Separation': 'Need a Divorce or Separation',
32
+ 'Child Custody': 'Need help with Child Custody',
33
+ },
34
+ "Personal Injury": {
35
+ 'DUI and DWI': 'Involved in a DUI/DWI',
36
+ 'Wills and Trusts': 'Need a Will or Trust',
37
+ 'Power of Attorney': 'Update Power of Attorney',
38
+ 'Divorce and Separation': 'Need a Divorce or Separation',
39
+ 'Child Custody': 'Need help with Child Custody',
40
+ // TODO add one more?
41
+ },
42
+ "Workers Compensation": {
43
+ 'DUI and DWI': 'Involved in a DUI/DWI',
44
+ 'Wills and Trusts': 'Need a Will or Trust',
45
+ 'Power of Attorney': 'Update Power of Attorney',
46
+ 'Divorce and Separation': 'Need a Divorce or Separation',
47
+ 'Child Custody': 'Need help with Child Custody',
48
+ // TODO add one more?
49
+ },
50
+ "DUI and DWI": {
51
+ 'Personal Injury': 'Personal or Workplace Injury',
52
+ 'Wills and Trusts': 'Need a Will or Trust',
53
+ 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
54
+ 'Power of Attorney': 'Update Power of Attorney',
55
+ 'Divorce and Separation': 'Need a Divorce or Separation',
56
+ 'Child Custody': 'Need help with Child Custody',
57
+ },
58
+ "Wills and Trusts": {
59
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
60
+ 'Personal Injury': 'Personal or Workplace Injury',
61
+ 'DUI and DWI': 'Involved in a DUI/DWI',
62
+ 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
63
+ 'Divorce and Separation': 'Need a Divorce or Separation',
64
+ 'Child Custody': 'Need help with Child Custody',
65
+ },
66
+ "Probate and Estates": {
67
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
68
+ 'Personal Injury': 'Personal or Workplace Injury',
69
+ 'DUI and DWI': 'Involved in a DUI/DWI',
70
+ 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
71
+ 'Divorce and Separation': 'Need a Divorce or Separation',
72
+ 'Child Custody': 'Need help with Child Custody',
73
+ },
74
+ "Power of Attorney": {
75
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
76
+ 'Personal Injury': 'Personal or Workplace Injury',
77
+ 'DUI and DWI': 'Involved in a DUI/DWI',
78
+ 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
79
+ 'Divorce and Separation': 'Need a Divorce or Separation',
80
+ 'Child Custody': 'Need help with Child Custody',
81
+ },
82
+ "Long Term Disability": {
83
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
84
+ 'DUI and DWI': 'Involved in a DUI/DWI',
85
+ 'Wills and Trusts': 'Need a Will or Trust',
86
+ 'Power of Attorney': 'Update Power of Attorney',
87
+ 'Divorce and Separation': 'Need a Divorce or Separation',
88
+ 'Child Custody': 'Need help with Child Custody',
89
+ },
90
+ "Social Security Disability and Insurance": {
91
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
92
+ 'DUI and DWI': 'Involved in a DUI/DWI',
93
+ 'Wills and Trusts': 'Need a Will or Trust',
94
+ 'Power of Attorney': 'Update Power of Attorney',
95
+ 'Divorce and Separation': 'Need a Divorce or Separation',
96
+ 'Child Custody': 'Need help with Child Custody',
97
+ },
98
+ '*': defaultLegalImprovementCrossSells,
99
+ };
17
100
 
18
101
  // ------ Common Base Settings
19
102
 
@@ -177,6 +260,14 @@ const sbsText = (updates) => {
177
260
  return text(updates)
178
261
  };
179
262
 
263
+ const verticalText = (updates) => {
264
+ updates.wrapperClass = 't-flex t-justify-center';
265
+ updates.messagesClass = 't-flex t-justify-center';
266
+ updates.inputClass = 't-text-center';
267
+ updates.helpClass = 't-mt-2.5 !t-text-sm t-text-center';
268
+ return text(updates)
269
+ };
270
+
180
271
  const textArea = (updates) => {
181
272
  if (updates.name && !updates.id) {
182
273
  updates.id = updates.name;
@@ -221,20 +312,101 @@ const verticalDate = (updates) => {
221
312
  return date(updates)
222
313
  };
223
314
 
224
- const applicantAge = (scope) => sbsText({
225
- name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
226
- label: 'Age of Applicant?',
227
- placeholder: 'Age between 18 and 65',
228
- maxlength: 2,
229
- inputmode: "numeric",
230
- validation: "required|min:18,max:65",
315
+ const email = (scope) => sbsText({
316
+ $formkit: 'email',
317
+ name: scope ? scope + ':' + 'Email' : 'Email',
318
+ label: 'Email Address:',
319
+ placeholder: 'email@domain.com',
320
+ autocomplete: 'email',
321
+ 'data-tf-sensitive': 'false',
322
+ validation: 'required|email',
323
+ validationMessages: {
324
+ required: 'Email is required',
325
+ email: 'Invalid Email'
326
+ }
327
+ });
328
+
329
+ const firstName = (scope) => sbsText({
330
+ label: 'First Name:',
331
+ placeholder: 'First',
332
+ name: scope ? scope + ':' + 'First_Name' : 'First_Name',
333
+ autocomplete: "given-name",
334
+ validationMessages: {
335
+ required: 'First Name is required'
336
+ }
337
+ });
338
+
339
+ const lastName = (scope) => sbsText({
340
+ label: 'Last Name:',
341
+ placeholder: 'Last',
342
+ name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
343
+ autocomplete: "family-name",
231
344
  validationMessages: {
232
- required: 'Applicant Age is required',
233
- min: 'Invalid Age - must be between 18 and 65',
234
- max: 'Invalid Age - must be between 18 and 65',
345
+ required: 'Last Name is required'
235
346
  }
236
347
  });
237
348
 
349
+ const phone = (scope) => sbsText({
350
+ $formkit: 'tel',
351
+ name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
352
+ label: 'Phone Number:',
353
+ placeholder: '###-###-####',
354
+ maxlength: 12,
355
+ help: '10-digit phone number, hyphens optional',
356
+ autocomplete: 'tel-national',
357
+ 'data-tf-sensitive': 'false',
358
+ validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
359
+ validationMessages: {
360
+ required: 'Field is required',
361
+ matches: 'Invalid Phone Format, use ###-###-####',
362
+ valid_phone: 'Invalid Phone Number'
363
+ },
364
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
365
+ });
366
+
367
+
368
+ const zipcode$1 = (scope, vertical, updates = {}) => {
369
+ const func = vertical ? verticalText : sbsText;
370
+ const label = vertical ? (updates.label) : 'Zip Code:';
371
+ const help = vertical ? (updates.help ?? "We try to match you with local help") : null;
372
+ return func({
373
+ label,
374
+ help,
375
+ placeholder: '#####',
376
+ name: scope ? scope + ':' + 'Zip' : 'Zip',
377
+ maxlength: 5,
378
+ inputmode: "numeric",
379
+ autocomplete: 'postal-code',
380
+ validation: 'required|matches:/^[0-9]{5}$/',
381
+ validationMessages: {
382
+ required: 'Zip Code is required',
383
+ matches: 'Invalid Zip Code'
384
+ },
385
+ ...updates
386
+ })
387
+ };
388
+
389
+ const applicantAge = (scope, vertical, updates = {}) => {
390
+ const func = vertical ? verticalText : sbsText;
391
+ const label = vertical ? (updates.label) : 'Age of Applicant?';
392
+ const value = vertical ? (updates.value ?? "50") : null;
393
+ return func(merge({
394
+ label,
395
+ placeholder: 'Age between 18 and 65',
396
+ name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
397
+ value,
398
+ maxlength: 2,
399
+ inputmode: "numeric",
400
+ validation: "required|min:18,max:65",
401
+ validationMessages: {
402
+ required: 'Applicant Age is required',
403
+ min: 'Invalid Age - must be between 18 and 65',
404
+ max: 'Invalid Age - must be between 18 and 65',
405
+ },
406
+ ...updates
407
+ }))
408
+ };
409
+
238
410
  const atFault$1 = (scope) => sbsYesNoRadio({
239
411
  name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
240
412
  label: 'Were You at Fault?'
@@ -419,20 +591,6 @@ const doctorTreatmentCenter = (scope) => verticalYesNoRadio({
419
591
  name: scope ? scope + ':' + 'Doctor_Treatment' : 'Doctor_Treatment',
420
592
  });
421
593
 
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
594
  const employerTypeCenter = () => col2RadioCenter({
437
595
  name: 'Employer_Type',
438
596
  options: [
@@ -477,17 +635,6 @@ const estateLegalServicesNeeded = (scope) => sbsSelect({
477
635
  ]
478
636
  });
479
637
 
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
638
  const haveAttorney$1 = (scope) => sbsYesNoRadio({
492
639
  name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
493
640
  label: 'Already Working with An Attorney?'
@@ -511,17 +658,6 @@ const incidentDateCenter = (scope) => verticalDate({
511
658
  name: scope ? scope + ':' + 'Incident_Date' : 'Incident_Date',
512
659
  });
513
660
 
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
661
  const lawyerPaymentMethod = (scope) => sbsSelect({
526
662
  name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
527
663
  label: 'How Will You Pay for Legal Fees if You Hire a Lawyer?',
@@ -542,69 +678,7 @@ const legalCrossSells$1 = () => col2Checkbox({
542
678
  help: 'Just hit "Next" if none apply',
543
679
  helpClass: 't-text-center !t-text-sm',
544
680
  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
- }
681
+ options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
608
682
  });
609
683
 
610
684
  const maritalStatus = (scope) => sbsSelect({
@@ -638,24 +712,6 @@ const pendingCharges = (scope) => sbsYesNoRadio({
638
712
  label: 'Do you currently have any pending charges?'
639
713
  });
640
714
 
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
715
  const primaryInjury$1 = (scope) => sbs2ColRadio({
660
716
  name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
661
717
  label: 'Primary Injury:',
@@ -777,25 +833,6 @@ const valueOfAssets = (scope) => sbsSelect({
777
833
  ]
778
834
  });
779
835
 
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
836
  // ------ Question Groups
800
837
 
801
838
  // NOTE: name must be unique within a form!
@@ -1047,13 +1084,20 @@ function verticalStepSubHeadline(updates) {
1047
1084
  function commentsStepHeadline(updates) {
1048
1085
  return {
1049
1086
  $el: 'h3',
1050
- children: updates.headline || 'Additional Case Details',
1087
+ children: updates.headline || 'Additional Details',
1051
1088
  attrs: {
1052
1089
  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
1090
  }
1054
1091
  }
1055
1092
  }
1056
1093
 
1094
+ function commentsStepHeadlineLegal(updates) {
1095
+ return commentsStepHeadline({
1096
+ headline: updates.headline || 'Additional Case Details',
1097
+ headlineClass: updates.headlineClass
1098
+ })
1099
+ }
1100
+
1057
1101
  function firstAndLastStepHeadline(updates) {
1058
1102
  return {
1059
1103
  $el: 'h3',
@@ -1077,7 +1121,7 @@ function legalCrossSellsStepHeadline(updates) {
1077
1121
  function contactStepHeadline(updates) {
1078
1122
  return {
1079
1123
  $el: 'h3',
1080
- children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
1124
+ children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
1081
1125
  attrs: {
1082
1126
  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
1127
  }
@@ -1087,7 +1131,7 @@ function contactStepHeadline(updates) {
1087
1131
  function contactStepSubHeadline(updates) {
1088
1132
  return {
1089
1133
  $el: 'h5',
1090
- children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
1134
+ children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
1091
1135
  attrs: {
1092
1136
  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
1137
  }
@@ -1127,10 +1171,16 @@ const stepDefaults = (step, stepKey) => ({
1127
1171
  }
1128
1172
  });
1129
1173
 
1130
- function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
1131
- if (typeof nextOnEnter === 'undefined') {
1132
- nextOnEnter = true;
1133
- }
1174
+ function step(name, inputs, updates = {}) {
1175
+ const {
1176
+ nextOnEnter = true,
1177
+ nextOnInput = false,
1178
+ stepKey = undefined,
1179
+ nextStepMap = undefined,
1180
+ triggerRedirectMap = undefined,
1181
+ autoFocus = undefined,
1182
+ } = updates;
1183
+
1134
1184
  if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
1135
1185
  const lastInput = findLastInput(inputs[inputs.length - 1]);
1136
1186
  if (lastInput && nextOnEnter === true) {
@@ -1150,6 +1200,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
1150
1200
  id: name,
1151
1201
  name: name,
1152
1202
  nextStepMap: nextStepMap,
1203
+ triggerRedirectMap: triggerRedirectMap,
1153
1204
  autoFocus: autoFocus,
1154
1205
  children: inputs
1155
1206
  }
@@ -1160,44 +1211,17 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
1160
1211
 
1161
1212
  // Single question step
1162
1213
  function sqstep(name, input, defaultHeadline, updates = {}) {
1214
+ if (typeof updates.nextOnInput === 'undefined') {
1215
+ updates.nextOnInput = true;
1216
+ }
1217
+
1163
1218
  return step(
1164
1219
  name,
1165
1220
  [
1166
1221
  verticalStepHeadline({ headline: updates.headline ?? defaultHeadline, headlineClass: updates.headlineClass }),
1167
1222
  ...Array.isArray(input) ? input : [input],
1168
1223
  ],
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
1224
+ updates
1201
1225
  )
1202
1226
  }
1203
1227
 
@@ -1213,7 +1237,7 @@ function contactInfo(updates = {}) {
1213
1237
  TCPAConsent(updates.scope),
1214
1238
  secureIcon()
1215
1239
  ],
1216
- false, // nextOnEnter
1240
+ { nextOnEnter: false }
1217
1241
  )
1218
1242
  }
1219
1243
 
@@ -1232,10 +1256,46 @@ function firstAndLastV3(updates = {}, scope) {
1232
1256
  firstName(scope),
1233
1257
  lastName(scope)
1234
1258
  ],
1235
- updates.nextOnEnter
1259
+ updates
1260
+ )
1261
+ }
1262
+
1263
+ function zipcode(updates = {}) {
1264
+ return sqstep(
1265
+ 'zipcode',
1266
+ zipcode$1(updates.scope, true, updates),
1267
+ 'Please verify your Zip Code',
1268
+ updates
1236
1269
  )
1237
1270
  }
1238
1271
 
1272
+ function commentsWithBankruptcy(updates = {}) {
1273
+ return step(
1274
+ 'commentsWithBankruptcy',
1275
+ [
1276
+ commentsStepHeadlineLegal(updates),
1277
+ comments({
1278
+ label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1279
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1280
+ inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1281
+ }, updates.scope),
1282
+ // TODO: needs scope support
1283
+ bankruptcyCrossSell(),
1284
+ {
1285
+ $el: 'div',
1286
+ if: '$get(CrossSell_Bankruptcy).value == true',
1287
+ children: [
1288
+ comments({
1289
+ label: 'Bankruptcy or debt details:',
1290
+ placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1291
+ inputClass: '!t-h-16'
1292
+ }, 'CrossSell:Bankruptcy')
1293
+ ],
1294
+ }
1295
+ ],
1296
+ { nextOnEnter: false }
1297
+ )
1298
+ }
1239
1299
 
1240
1300
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1241
1301
  return step(
@@ -1253,7 +1313,7 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1253
1313
  'CrossSell:Auto_and_Car_Accidents'
1254
1314
  )
1255
1315
  ],
1256
- updates.nextOnEnter
1316
+ updates
1257
1317
  )
1258
1318
  }
1259
1319
 
@@ -1272,7 +1332,7 @@ function childCustodyCrossSellQuestions(updates = {}) {
1272
1332
  'CrossSell:Child_Custody'
1273
1333
  )
1274
1334
  ],
1275
- updates.nextOnEnter
1335
+ updates
1276
1336
  )
1277
1337
  }
1278
1338
 
@@ -1291,7 +1351,7 @@ function divorceAndSeparationCrossSellQuestions(updates = {}) {
1291
1351
  'CrossSell:Divorce_and_Separation'
1292
1352
  )
1293
1353
  ],
1294
- updates.nextOnEnter
1354
+ updates
1295
1355
  )
1296
1356
  }
1297
1357
 
@@ -1310,7 +1370,7 @@ function duiAndDWICrossSellQuestions(updates = {}) {
1310
1370
  'CrossSell:DUI_and_DWI'
1311
1371
  )
1312
1372
  ],
1313
- updates.nextOnEnter
1373
+ updates
1314
1374
  )
1315
1375
  }
1316
1376
 
@@ -1330,7 +1390,7 @@ function ssdiCrossSellQuestions(updates = {}) {
1330
1390
  'CrossSell:Social_Security_Disability_and_Insurance'
1331
1391
  )
1332
1392
  ],
1333
- updates.nextOnEnter
1393
+ updates
1334
1394
  )
1335
1395
  }
1336
1396
 
@@ -1350,7 +1410,7 @@ function personalInjuryCrossSellQuestions(updates = {}) {
1350
1410
  'CrossSell:Personal_Injury'
1351
1411
  )
1352
1412
  ],
1353
- updates.nextOnEnter
1413
+ updates
1354
1414
  )
1355
1415
  }
1356
1416
 
@@ -1369,7 +1429,7 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1369
1429
  'CrossSell:Power_of_Attorney'
1370
1430
  )
1371
1431
  ],
1372
- updates.nextOnEnter
1432
+ updates
1373
1433
  )
1374
1434
  }
1375
1435
 
@@ -1388,7 +1448,7 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
1388
1448
  'CrossSell:Wills_and_Trusts'
1389
1449
  )
1390
1450
  ],
1391
- updates.nextOnEnter
1451
+ updates
1392
1452
  )
1393
1453
  }
1394
1454
 
@@ -1408,7 +1468,7 @@ function workersCompensationCrossSellQuestions(updates = {}) {
1408
1468
  'CrossSell:Workers_Compensation'
1409
1469
  )
1410
1470
  ],
1411
- updates.nextOnEnter
1471
+ updates
1412
1472
  )
1413
1473
  }
1414
1474
 
@@ -1424,32 +1484,19 @@ function employmentAndWorkplaceTOLP(updates = {}) {
1424
1484
  },
1425
1485
  employmentAndWorkplaceTOLPDisplayCenter(),
1426
1486
  ],
1427
- updates.nextOnEnter,
1428
- updates.nextOnInput,
1429
- updates.stepKey,
1430
- updates.nextStepMap
1487
+ updates
1431
1488
  )
1432
1489
  }
1433
1490
 
1434
1491
  function legalCrossSells(updates = {}) {
1492
+ updates.nextOnInput = false;
1493
+ updates.stepKey = '$get(Type_Of_Legal_Problem).value';
1435
1494
  return step(
1436
1495
  'legalCrossSells',
1437
1496
  [
1438
1497
  legalCrossSellsStepHeadline(updates),
1439
1498
  legalCrossSells$1(),
1440
1499
  ],
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
1500
  updates
1454
1501
  )
1455
1502
  }
@@ -1719,9 +1766,7 @@ function formProps(updates) {
1719
1766
  return props
1720
1767
  }
1721
1768
 
1722
- const metaDefaults = {
1723
- tcpaLanguage: TCPA_LANGUAGE
1724
- };
1769
+ const metaDefaults = {};
1725
1770
 
1726
1771
  function metaProps(updates) {
1727
1772
  const data = merge(
@@ -1734,7 +1779,7 @@ function metaProps(updates) {
1734
1779
  }
1735
1780
  }
1736
1781
 
1737
- function defaultMetaProps(tolps = null) {
1782
+ function defaultMetaPropsLegal(tolps = null) {
1738
1783
  let commentsPlaceholders = TOLPCommentsPlaceholders;
1739
1784
  let finalHeadlines = TOLPFinalHeadlines;
1740
1785
  let finalSubHeadlines = TOLPFinalSubHeadlines;
@@ -1744,12 +1789,13 @@ function defaultMetaProps(tolps = null) {
1744
1789
  finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
1745
1790
  }
1746
1791
  return metaProps({
1747
- defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1792
+ tcpaLanguage: TCPA_LANGUAGE_LEGAL,
1793
+ defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1748
1794
  commentsPlaceholders: commentsPlaceholders,
1749
- defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
1795
+ defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1750
1796
  finalHeadlines: finalHeadlines,
1751
- defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
1752
- finalSubHeadlines: finalSubHeadlines,
1797
+ defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1798
+ finalSubHeadlines: finalSubHeadlines
1753
1799
  })
1754
1800
  }
1755
1801
 
@@ -2318,291 +2364,321 @@ const nextStepsLegalNoHA = [
2318
2364
  ];
2319
2365
 
2320
2366
  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': [
2367
+ values: {
2368
+ 'Type_Of_Legal_Problem': {
2369
+ 'Adoption': [
2370
+ 'maritalStatus',
2371
+ 'haveChildren',
2372
+ ...nextStepsLegalDefaultLPM
2373
+ ],
2374
+ 'Asbestos and Mesothelioma': [
2375
+ 'incidentDate',
2376
+ 'doctorTreatment',
2377
+ ...nextStepsLegalDefault
2378
+ ],
2379
+ 'Auto and Car Accidents': [
2380
+ 'incidentDate',
2381
+ 'atFault',
2382
+ 'primaryInjury',
2383
+ 'doctorTreatment',
2384
+ 'policeReportFiled',
2385
+ ...nextStepsLegalNoDOI
2386
+ ],
2387
+ 'Bankruptcy': [
2388
+ 'totalMonthlyIncome',
2389
+ 'totalDebt',
2390
+ 'ownRealEstate',
2391
+ 'valueOfAssets',
2392
+ ...nextStepsLegalDefault
2393
+ ],
2394
+ 'Business Lawyers': [
2395
+ 'businessServices',
2396
+ 'businessType',
2397
+ 'numEmployeesOfBusiness',
2398
+ ...nextStepsLegalDefault
2399
+ ],
2400
+ 'Child Custody': [
2401
+ 'childRelationship',
2402
+ 'childHome',
2403
+ 'childPrimaryCaregiver',
2404
+ ...nextStepsLegalDefaultLPM
2405
+ ],
2406
+ 'Child Support': [
2407
+ 'childRelationship',
2408
+ 'childHome',
2409
+ 'childPrimaryCaregiver',
2410
+ ...nextStepsLegalDefaultLPM
2411
+ ],
2412
+ 'Civil Rights and Discrimination': [
2413
+ 'civilRightsType',
2414
+ ...nextStepsLegalDefault
2415
+ ],
2416
+ 'Civil Lawsuit': [
2417
+ 'civilDefense',
2418
+ 'lawsuitOtherParty',
2419
+ ...nextStepsLegalDefault
2420
+ ],
2421
+ 'File a Lawsuit': [
2422
+ 'civilLawsuitTOLPDisplay',
2423
+ 'lawsuitOtherParty',
2424
+ ...nextStepsLegalDefault
2425
+ ],
2426
+ 'Defend a Lawsuit': [
2427
+ 'lawsuitOtherParty',
2428
+ ...nextStepsLegalDefault
2429
+ ],
2430
+ 'Consumer Lawyers': [
2431
+ 'consumerLawyerType',
2432
+ 'incidentDate',
2433
+ 'lawsuitOtherParty',
2434
+ ...nextStepsLegalDefault
2435
+ ],
2436
+ 'Criminal and Felony': [
2437
+ 'criminalTOLPDisplay',
2438
+ 'crimeCommittedDate',
2439
+ 'roleInMatterCriminal',
2440
+ 'pendingCharges',
2441
+ ...nextStepsLegalDefaultLPM
2442
+ ],
2443
+ 'Debt and Collections': [
2444
+ 'totalMonthlyIncome',
2445
+ 'totalDebt',
2446
+ 'ownRealEstate',
2447
+ 'valueOfAssets',
2448
+ ...nextStepsLegalDefault
2449
+ ],
2450
+ 'Divorce and Separation': [
2451
+ 'maritalStatus',
2452
+ 'haveChildren',
2453
+ ...nextStepsLegalDefaultLPM
2454
+ ],
2455
+ 'DUI and DWI': [
2456
+ 'incidentDate',
2457
+ 'priorAlcoholOffenses',
2458
+ 'typeOfAlcoholTest',
2459
+ 'bloodContentAlcoholTest',
2460
+ 'pendingCharges',
2461
+ ...nextStepsLegalDefault
2462
+ ],
2463
+ 'Employment and Workplace': [
2464
+ 'employmentAndWorkplaceTOLPDisplay',
2465
+ 'numEmployeesOfBusiness',
2466
+ 'employerType',
2467
+ 'employeeAtCompany',
2468
+ ...nextStepsLegalDefault
2469
+ ],
2470
+ 'Expungement': [
2471
+ 'incidentDate',
2472
+ 'criminalChargeType',
2473
+ ...nextStepsLegalDefaultLPM
2474
+ ],
2475
+ 'Family Issues': [
2476
+ 'maritalStatus',
2477
+ 'haveChildren',
2478
+ ...nextStepsLegalDefaultLPM
2479
+ ],
2480
+ 'Foreclosure': [
2481
+ 'ownRealEstate',
2482
+ 'typeOfProperty',
2483
+ 'amountPaymentsPastDue',
2484
+ 'loanAmount',
2485
+ 'defaultNotice',
2486
+ ...nextStepsLegalDefault
2487
+ ],
2488
+ 'Guardianship': [
2489
+ 'maritalStatus',
2490
+ 'haveChildren',
2491
+ ...nextStepsLegalDefaultLPM
2492
+ ],
2493
+ 'Immigration and Visas': [
2494
+ 'countryOfCitizenship',
2495
+ 'immigrationLocation',
2496
+ 'immigrationEntry',
2497
+ 'immigrationType',
2498
+ 'immigrationStatus',
2499
+ 'immigrationDetails',
2500
+ ...nextStepsLegalDefault
2501
+ ],
2502
+ 'Landlord and Tenant': [
2503
+ 'landlordTenantIssue',
2504
+ 'landlordTenantParty',
2505
+ ...nextStepsLegalDefault
2506
+ ],
2507
+ 'Lemon Law': [
2508
+ 'incidentDate',
2509
+ 'lawsuitOtherParty',
2510
+ ...nextStepsLegalDefault
2511
+ ],
2512
+ 'Long Term Disability': [
2513
+ 'applicantOccupation',
2514
+ 'applicantAge',
2515
+ 'applicantLTDisabilityPolicy',
2516
+ 'applicantDisabilityHowObtain',
2517
+ 'applicantPreviouslyAppliedLtdBenefits',
2518
+ 'applicantReceivedDisabilityBenefits',
2519
+ 'applicantMonthlySalary',
2520
+ ...nextStepsLegalNoDOI
2521
+ ],
2522
+ 'Medical Malpractice': [
2523
+ 'incidentDate',
2524
+ 'claimStatus',
2525
+ 'doctorTreatment',
2526
+ 'medicalMalpracticeInjuries',
2527
+ ...nextStepsLegalDefault
2528
+ ],
2529
+ 'Patents and Intellectual Property': [
2530
+ 'patentAssistanceType',
2531
+ 'patentFor',
2532
+ ...nextStepsLegalDefault
2533
+ ],
2534
+ 'Personal Injury': [
2535
+ 'incidentDate',
2536
+ 'claimStatus',
2537
+ 'atFault',
2538
+ 'primaryInjury',
2539
+ 'doctorTreatment',
2540
+ ...nextStepsLegalNoDOI
2541
+ ],
2542
+ 'Probate and Estates': [
2543
+ 'valueOfAssets',
2544
+ 'typeOfAssets',
2545
+ 'roleInMatterProbate',
2546
+ 'estateLegalServicesNeeded',
2547
+ ...nextStepsLegalDefault
2548
+ ],
2549
+ 'Property Damage': [
2550
+ 'realEstateArea',
2551
+ 'wouldLikeLawyerTo',
2552
+ ...nextStepsLegalDefault
2553
+ ],
2554
+ 'Real Estate': [
2555
+ 'realEstateTOLPDisplay',
2556
+ 'realEstateArea',
2557
+ 'wouldLikeLawyerTo',
2558
+ ...nextStepsLegalDefault
2559
+ ],
2560
+ 'Social Security Disability and Insurance': [
2561
+ 'applicantAge',
2562
+ 'disabilityConditionStopWork',
2563
+ 'disabilityWorkHistory',
2564
+ 'socialSecurityDisabilityReceivingBenefits',
2565
+ 'doctorTreatment',
2566
+ ...nextStepsLegalNoDOI
2567
+ ],
2568
+ 'Tax and IRS': [
2569
+ 'totalDebt',
2570
+ 'taxProblemDetails',
2571
+ 'taxLevel',
2572
+ 'taxIssueType',
2573
+ ...nextStepsLegalDefault
2574
+ ],
2575
+ 'Traffic and Tickets': [
2576
+ 'driversLicenseType',
2577
+ 'trafficViolations',
2578
+ 'haveCourtDate',
2579
+ ...nextStepsLegalDefault
2580
+ ],
2581
+ 'Unemployment': [
2582
+ 'numEmployeesOfBusiness',
2583
+ 'employerType',
2584
+ ...nextStepsLegalNoHA
2585
+ ],
2586
+ 'Victim of a Crime': [
2587
+ 'crimeCommittedDate',
2588
+ 'roleInMatterCriminal',
2589
+ 'pendingCharges',
2590
+ ...nextStepsLegalDefaultLPM
2591
+ ],
2592
+ 'Wills and Trusts': [
2593
+ 'valueOfAssets',
2594
+ 'typeOfAssets',
2595
+ 'roleInMatterProbate',
2596
+ 'estateLegalServicesNeeded',
2597
+ ...nextStepsLegalDefault
2598
+ ],
2599
+ 'Workers Compensation': [
2600
+ 'incidentDate',
2601
+ 'claimStatus',
2602
+ 'primaryInjury',
2603
+ 'causeOfInjury',
2604
+ 'doctorTreatment',
2605
+ ...nextStepsLegalNoDOI
2606
+ ],
2607
+ 'Workplace Harassment': [
2608
+ 'numEmployeesOfBusiness',
2609
+ 'employerType',
2610
+ 'employeeAtCompany',
2611
+ ...nextStepsLegalDefault
2612
+ ],
2613
+ 'Workplace Discrimination': [
2614
+ 'numEmployeesOfBusiness',
2615
+ 'employerType',
2616
+ 'employeeAtCompany',
2617
+ ...nextStepsLegalDefault
2618
+ ],
2619
+ 'Wrongful Death': [
2620
+ 'incidentDate',
2621
+ 'relationshipToVictim',
2622
+ 'criminalChargesFiled',
2623
+ 'causeOfDeath',
2624
+ ...nextStepsLegalNoDOI
2625
+ ],
2626
+ 'Wrongful Termination': [
2627
+ 'numEmployeesOfBusiness',
2628
+ 'employerType',
2629
+ ...nextStepsLegalDefault
2630
+ ],
2631
+ },
2632
+ '*': nextStepsLegalDefault
2633
+ }
2634
+ };
2635
+
2636
+ const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"];
2637
+
2638
+ const nextStepsMapEmploymentAndWorkplaceTOLPDisplay = {
2639
+ values: {
2640
+ 'Type_Of_Legal_Problem_Display': {
2641
+ 'Wrongful Termination': TOLPNextSteps["Wrongful Termination"],
2642
+ 'Workers Compensation': TOLPNextSteps["Workers Compensation"],
2643
+ 'Personal Injury': TOLPNextSteps["Personal Injury"],
2644
+ 'Unemployment': TOLPNextSteps["Unemployment"],
2645
+ },
2646
+ '*': [
2567
2647
  'numEmployeesOfBusiness',
2568
2648
  'employerType',
2569
2649
  'employeeAtCompany',
2570
2650
  ...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
2651
+ ]
2652
+ }
2586
2653
  };
2587
2654
 
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"],
2655
+ const nextStepsMapLegalCrossSells = {
2656
+ values: {
2657
+ 'Legal_CrossSells': {
2658
+ 'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
2659
+ 'Personal Injury': ['personalInjuryCrossSellQuestions'],
2660
+ 'Workers Compensation': ['workersCompensationCrossSellQuestions'],
2661
+ 'DUI and DWI': ['duiAndDWICrossSellQuestions'],
2662
+ 'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
2663
+ 'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
2664
+ 'Bankruptcy': ['bankruptcyCrossSellQuestions'],
2665
+ 'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
2666
+ 'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
2667
+ 'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
2668
+ 'Child Custody': ['childCustodyCrossSellQuestions'],
2669
+ },
2670
+ '*': ['firstAndLast', 'contactInfo'],
2596
2671
  },
2597
- '*': [
2598
- 'numEmployeesOfBusiness',
2599
- 'employerType',
2600
- 'employeeAtCompany',
2601
- ...nextStepsLegalDefault
2602
- ]
2672
+
2673
+ // NOTE: this assumes a certain placement of the cross sell question
2674
+ // in the form flow.
2675
+ appendSteps: ['firstAndLast', 'contactInfo'],
2676
+ matchesAllowed: 1,
2603
2677
  };
2604
2678
 
2605
- const meta = defaultMetaProps();
2679
+ const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
2680
+
2681
+ const meta = defaultMetaPropsLegal();
2606
2682
 
2607
2683
  meta.data.dynamicSchema = [
2608
2684
  atFault(),
@@ -2628,7 +2704,8 @@ meta.data.dynamicSchema = [
2628
2704
  headlineClass: '!t-text-dark',
2629
2705
  }),
2630
2706
  legalCrossSells({
2631
- headlineClass: '!t-text-dark'
2707
+ headlineClass: '!t-text-dark',
2708
+ nextStepMap: nextStepsMapLegalCrossSells,
2632
2709
  }),
2633
2710
  autoAndCarAccidentCrossSellQuestions(),
2634
2711
  personalInjuryCrossSellQuestions(),
@@ -2652,7 +2729,8 @@ const schema = [
2652
2729
  props: formProps({
2653
2730
  formId: 'employmentAndWorkplace',
2654
2731
  redirectMap: legalRedirectMap(),
2655
- valueOverrideMap: legalAllValueOverrideMap
2732
+ valueOverrideMap: legalAllValueOverrideMap,
2733
+ crossSellOptionMap: legalCrossSellOptionMap
2656
2734
  }),
2657
2735
  children: [
2658
2736
  progressBar(),