bhl-forms 0.11.10 → 0.11.12

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 (98) hide show
  1. package/dist/forms/accidentsAndInjuries.es.js +28 -2
  2. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  3. package/dist/forms/applianceRepairMinimal.es.js +27 -2
  4. package/dist/forms/applianceRepairMinimal.iife.js +1 -1
  5. package/dist/forms/appraisals.es.js +27 -2
  6. package/dist/forms/appraisals.iife.js +1 -1
  7. package/dist/forms/business.es.js +28 -2
  8. package/dist/forms/business.iife.js +1 -1
  9. package/dist/forms/childAndFamily.es.js +28 -2
  10. package/dist/forms/childAndFamily.iife.js +1 -1
  11. package/dist/forms/childAndFamilySingle.es.js +153 -81
  12. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  13. package/dist/forms/childAndFamilySingle.json +1 -1
  14. package/dist/forms/civilLawsuit.es.js +231 -82
  15. package/dist/forms/civilLawsuit.iife.js +1 -1
  16. package/dist/forms/civilLawsuit.json +1 -1
  17. package/dist/forms/civilLawsuit1to1.es.js +2599 -0
  18. package/dist/forms/civilLawsuit1to1.iife.js +1 -0
  19. package/dist/forms/civilLawsuit1to1.json +1 -0
  20. package/dist/forms/coins.es.js +27 -2
  21. package/dist/forms/coins.iife.js +1 -1
  22. package/dist/forms/contracts.es.js +28 -2
  23. package/dist/forms/contracts.iife.js +1 -1
  24. package/dist/forms/criminal.es.js +28 -2
  25. package/dist/forms/criminal.iife.js +1 -1
  26. package/dist/forms/divorce.es.js +28 -2
  27. package/dist/forms/divorce.iife.js +1 -1
  28. package/dist/forms/employmentAndWorkplace.es.js +138 -64
  29. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  30. package/dist/forms/employmentAndWorkplace.json +1 -1
  31. package/dist/forms/foreclosure.es.js +28 -2
  32. package/dist/forms/foreclosure.iife.js +1 -1
  33. package/dist/forms/generalContractors.es.js +27 -2
  34. package/dist/forms/generalContractors.iife.js +1 -1
  35. package/dist/forms/generalHomeImprovement.es.js +27 -2
  36. package/dist/forms/generalHomeImprovement.iife.js +1 -1
  37. package/dist/forms/generalHomeImprovementThankYou.es.js +27 -2
  38. package/dist/forms/generalHomeImprovementThankYou.iife.js +1 -1
  39. package/dist/forms/generalLegal.es.js +30 -2
  40. package/dist/forms/generalLegal.iife.js +1 -1
  41. package/dist/forms/generalLegal.json +1 -1
  42. package/dist/forms/generalLegalJustAnswer.es.js +166 -91
  43. package/dist/forms/generalLegalJustAnswer.iife.js +1 -1
  44. package/dist/forms/generalLegalJustAnswer.json +1 -1
  45. package/dist/forms/generalLegalPopUnder.es.js +30 -2
  46. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  47. package/dist/forms/generalLegalPopUnder.json +1 -1
  48. package/dist/forms/generalLegalPopUnderSingle.es.js +166 -91
  49. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  50. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  51. package/dist/forms/generalLegalSingle.es.js +166 -91
  52. package/dist/forms/generalLegalSingle.iife.js +1 -1
  53. package/dist/forms/generalLegalSingle.json +1 -1
  54. package/dist/forms/generalLegalSingle1to1.es.js +30 -3
  55. package/dist/forms/generalLegalSingle1to1.iife.js +1 -1
  56. package/dist/forms/generalLegalSingle1to1.json +1 -1
  57. package/dist/forms/generalLegalSingleMinimal.es.js +28 -3
  58. package/dist/forms/generalLegalSingleMinimal.iife.js +1 -1
  59. package/dist/forms/generalLegalSingleMinimal.json +1 -1
  60. package/dist/forms/generalLegalThankYou.es.js +30 -2
  61. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  62. package/dist/forms/generalLegalThankYou.json +1 -1
  63. package/dist/forms/generalLegalThankYouConsultation.es.js +166 -91
  64. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  65. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  66. package/dist/forms/harassmentAndDiscrimination.es.js +319 -155
  67. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  68. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  69. package/dist/forms/landlordTenant.es.js +28 -2
  70. package/dist/forms/landlordTenant.iife.js +1 -1
  71. package/dist/forms/malpractice.es.js +28 -2
  72. package/dist/forms/malpractice.iife.js +1 -1
  73. package/dist/forms/mechanics.es.js +27 -2
  74. package/dist/forms/mechanics.iife.js +1 -1
  75. package/dist/forms/patentsAndIP.es.js +29 -3
  76. package/dist/forms/patentsAndIP.iife.js +1 -1
  77. package/dist/forms/patentsAndIP.json +1 -1
  78. package/dist/forms/realEstate.es.js +28 -2
  79. package/dist/forms/realEstate.iife.js +1 -1
  80. package/dist/forms/repossession.es.js +28 -2
  81. package/dist/forms/repossession.iife.js +1 -1
  82. package/dist/forms/ssdi.es.js +28 -2
  83. package/dist/forms/ssdi.iife.js +1 -1
  84. package/dist/forms/testForm.es.js +27 -2
  85. package/dist/forms/testForm.iife.js +1 -1
  86. package/dist/forms/testRedirects.es.js +29 -2
  87. package/dist/forms/testRedirects.iife.js +1 -1
  88. package/dist/forms/testRedirects.json +1 -1
  89. package/dist/forms/vets.es.js +27 -2
  90. package/dist/forms/vets.iife.js +1 -1
  91. package/dist/forms/willsAndTrusts.es.js +382 -161
  92. package/dist/forms/willsAndTrusts.iife.js +1 -1
  93. package/dist/forms/willsAndTrusts.json +1 -1
  94. package/dist/forms/windows.es.js +27 -2
  95. package/dist/forms/windows.iife.js +1 -1
  96. package/dist/forms/workersCompensation.es.js +28 -2
  97. package/dist/forms/workersCompensation.iife.js +1 -1
  98. package/package.json +1 -1
@@ -352,14 +352,11 @@ const verticalDate = (updates) => {
352
352
  return date(updates)
353
353
  };
354
354
 
355
- const email = (scope, vertical, updates = {}) => {
356
- const func = vertical ? verticalText : sbsText;
357
- const label = vertical ? updates.label : "Email Address:";
358
- return func({
359
- $formkit: "email",
355
+ const emailFL = (scope, updates = {}) => {
356
+ return text({
357
+ $formkit: "FloatingLabelText",
360
358
  name: scope ? scope + ":" + "Email" : "Email",
361
- label,
362
- placeholder: "email@domain.com",
359
+ placeholder: "Email Address",
363
360
  autocomplete: "email",
364
361
  "data-tf-sensitive": "false",
365
362
  validation: "required|email",
@@ -367,64 +364,77 @@ const email = (scope, vertical, updates = {}) => {
367
364
  required: "Email is required",
368
365
  email: "Invalid Email",
369
366
  },
367
+ inputClass: "t-text-center",
368
+ wrapperClass: "t-flex t-justify-center",
370
369
  ...updates,
371
370
  })
372
371
  };
373
372
 
374
- const firstName = (scope, vertical, updates = {}) => {
375
- const func = vertical ? verticalText : sbsText;
376
- const label = vertical ? updates.label : "First Name:";
377
- return func({
378
- label,
373
+ const firstNameFL = (scope, updates = {}) => {
374
+ return text({
375
+ $formkit: "FloatingLabelText",
379
376
  placeholder: "First Name",
380
377
  name: scope ? scope + ":" + "First_Name" : "First_Name",
381
378
  autocomplete: "given-name",
382
379
  validationMessages: {
383
380
  required: "First Name is required",
384
381
  },
382
+ inputClass: "t-text-center",
385
383
  ...updates,
386
384
  })
387
385
  };
388
386
 
389
- const lastName = (scope, vertical, updates = {}) => {
390
- const func = vertical ? verticalText : sbsText;
391
- const label = vertical ? updates.label : "Last Name:";
392
- return func({
393
- label,
387
+ const lastNameFL = (scope, updates = {}) => {
388
+ return text({
389
+ $formkit: "FloatingLabelText",
394
390
  placeholder: "Last Name",
395
391
  name: scope ? scope + ":" + "Last_Name" : "Last_Name",
396
392
  autocomplete: "family-name",
397
393
  validationMessages: {
398
394
  required: "Last Name is required",
399
395
  },
396
+ inputClass: "t-text-center",
400
397
  ...updates,
401
398
  })
402
399
  };
403
400
 
404
- const phone = (scope, vertical, updates = {}) => {
405
- const func = vertical ? verticalText : sbsText;
406
- const label = vertical ? updates.label : "Phone Number:";
407
- return func({
408
- $formkit: "tel",
401
+ const fullNameFLMobileCol = (scope, updates = {}) => {
402
+ return {
403
+ $el: "div",
404
+ attrs: {
405
+ class: "t-flex t-flex-col sm:t-flex-row t-flex-wrap t-gap-x-[2%] t-justify-center sm:!t-max-w-[70%]",
406
+ },
407
+ children: [
408
+ firstNameFL(scope, { outerClass: "sm:!t-max-w-[49%]", ...updates }),
409
+ lastNameFL(scope, { outerClass: "sm:!t-max-w-[49%]", ...updates }),
410
+ ],
411
+ }
412
+ };
413
+
414
+ const phoneFL = (scope, updates = {}) => {
415
+ return text({
416
+ $formkit: "FloatingLabelText",
417
+ datatype: "tel",
409
418
  name: scope ? scope + ":" + "Primary_Phone" : "Primary_Phone",
410
- label,
411
- placeholder: updates.placeholder || "###-###-####",
412
- maxlength: 12,
413
- help: updates.help || "10-digit phone number, hyphens optional",
419
+ placeholder: updates.placeholder || "Phone Number",
420
+ maxlength: 14,
421
+ help: updates.help || null,
414
422
  autocomplete: "tel-national",
415
423
  "data-tf-sensitive": "false",
416
- validation: "required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone",
424
+ validation: "required|matches:/^[0-9]{3}[0-9]{3}[0-9]{4}$/|valid_phone",
417
425
  validationMessages: {
418
426
  required: "Phone Number is required",
419
- matches: "Invalid Phone Format, use ###-###-####",
427
+ matches: "Invalid Phone Format, use (XXX) YYY-ZZZZ",
420
428
  valid_phone: "Invalid Phone Number",
421
429
  },
422
430
  helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]",
431
+ inputClass: "t-text-center",
432
+ wrapperClass: "t-flex t-justify-center",
423
433
  ...updates,
424
434
  })
425
435
  };
426
436
 
427
- const zipcode = (scope, vertical, updates = {}) => {
437
+ const zipcode$1 = (scope, vertical, updates = {}) => {
428
438
  const func = vertical ? verticalText : sbsText;
429
439
  const label = vertical ? updates.label : "Zip Code:";
430
440
  const help = vertical ? updates.help ?? "We try to match you with local help" : null;
@@ -612,7 +622,7 @@ const comments = (scope, vertical, updates) =>
612
622
  )
613
623
  );
614
624
 
615
- const degreeOfInterest = (scope, vertical, updates = {}) => {
625
+ const degreeOfInterest$1 = (scope, vertical, updates = {}) => {
616
626
  const func = vertical ? col2RadioCenter : sbsSelect;
617
627
  const label = vertical ? updates.label : "How Likely Are You to Pay if Your Issue Could be Resolved?";
618
628
  const help = vertical ? updates.help : "No payment necessary to speak with lawyers.";
@@ -631,7 +641,7 @@ const degreeOfInterest = (scope, vertical, updates = {}) => {
631
641
  };
632
642
 
633
643
  const degreeOfInterestHelp = (scope, vertical, updates = {}) =>
634
- degreeOfInterest(scope, vertical, merge(updates, { help: "No payment necessary to speak with lawyers." }));
644
+ degreeOfInterest$1(scope, vertical, merge(updates, { help: "No payment necessary to speak with lawyers." }));
635
645
 
636
646
  const disabilityConditionStopWork = (scope, vertical, updates = {}) => {
637
647
  const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
@@ -677,7 +687,7 @@ const doctorTreatment = (scope, vertical, updates = {}) => {
677
687
  )
678
688
  };
679
689
 
680
- const employerType = (scope, vertical, updates = {}) => {
690
+ const employerType$1 = (scope, vertical, updates = {}) => {
681
691
  const func = vertical ? col2RadioCenter : sbsSelect;
682
692
  const label = vertical ? updates.label : "The Employer Is a:";
683
693
  return func(
@@ -700,7 +710,7 @@ const employerType = (scope, vertical, updates = {}) => {
700
710
  )
701
711
  };
702
712
 
703
- const employeeAtCompany = (scope, vertical, updates = {}) => {
713
+ const employeeAtCompany$1 = (scope, vertical, updates = {}) => {
704
714
  const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
705
715
  const label = vertical ? updates.label : "Do You Still Work at the Company?";
706
716
  return func(
@@ -736,7 +746,7 @@ const estateLegalServicesNeeded = (scope, vertical, updates = {}) => {
736
746
  )
737
747
  };
738
748
 
739
- const harassmentAndDiscriminationTOLP = (scope, vertical, updates = {}) => {
749
+ const harassmentAndDiscriminationTOLP$1 = (scope, vertical, updates = {}) => {
740
750
  const func = vertical ? col2RadioCenter : col2Radio;
741
751
  const label = vertical ? updates.label : "Type of Help Needed:";
742
752
  return func(
@@ -759,7 +769,7 @@ const harassmentAndDiscriminationTOLP = (scope, vertical, updates = {}) => {
759
769
  )
760
770
  };
761
771
 
762
- const haveAttorney = (scope, vertical, updates = {}) => {
772
+ const haveAttorney$1 = (scope, vertical, updates = {}) => {
763
773
  const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
764
774
  const label = vertical ? updates.label : "Already Working with An Attorney?";
765
775
  return func(
@@ -859,7 +869,7 @@ const maritalStatus = (scope, vertical, updates = {}) => {
859
869
  )
860
870
  };
861
871
 
862
- const numEmployeesOfBusiness = (scope, vertical, updates = {}) => {
872
+ const numEmployeesOfBusiness$1 = (scope, vertical, updates = {}) => {
863
873
  const func = vertical ? col2RadioCenter : sbsSelect;
864
874
  const label = vertical ? updates.label : "Total Employees of Business? (estimated)";
865
875
  return func(
@@ -1068,13 +1078,11 @@ const group = (name, updates) => {
1068
1078
  )
1069
1079
  };
1070
1080
 
1071
- const defaultQuestions = () => [haveAttorney(), degreeOfInterestHelp()];
1072
-
1073
1081
  const AutoAndCarAccidentsQuestions = (condition, scope) =>
1074
1082
  group("AutoAndCarAccidentsQuestions", {
1075
1083
  if: condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"',
1076
1084
  children: [
1077
- haveAttorney(scope),
1085
+ haveAttorney$1(scope),
1078
1086
  incidentDate(scope),
1079
1087
  atFault(scope),
1080
1088
  primaryInjury(scope),
@@ -1087,11 +1095,11 @@ const ChildCustodyQuestions = (condition, scope) =>
1087
1095
  group("ChildCustodyQuestions", {
1088
1096
  if: condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"',
1089
1097
  children: [
1090
- haveAttorney(scope),
1098
+ haveAttorney$1(scope),
1091
1099
  childRelationship(scope),
1092
1100
  childHome(scope),
1093
1101
  childPrimaryCaregiver(scope),
1094
- degreeOfInterest(scope),
1102
+ degreeOfInterest$1(scope),
1095
1103
  lawyerPaymentMethod(scope),
1096
1104
  ],
1097
1105
  });
@@ -1100,10 +1108,10 @@ const DivorceQuestions = (condition, scope) =>
1100
1108
  group("DivorceQuestions", {
1101
1109
  if: condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"',
1102
1110
  children: [
1103
- haveAttorney(scope),
1111
+ haveAttorney$1(scope),
1104
1112
  maritalStatus(scope),
1105
1113
  haveChildren(scope),
1106
- degreeOfInterest(scope),
1114
+ degreeOfInterest$1(scope),
1107
1115
  lawyerPaymentMethod(scope),
1108
1116
  ],
1109
1117
  });
@@ -1112,7 +1120,7 @@ const DUIAndDWIQuestions = (condition, scope) =>
1112
1120
  group("DUIAndDWIQuestions", {
1113
1121
  if: condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"',
1114
1122
  children: [
1115
- haveAttorney(scope),
1123
+ haveAttorney$1(scope),
1116
1124
  incidentDate(scope),
1117
1125
  priorAlcoholOffenses(scope),
1118
1126
  typeOfAlcoholTest(scope),
@@ -1122,53 +1130,11 @@ const DUIAndDWIQuestions = (condition, scope) =>
1122
1130
  ],
1123
1131
  });
1124
1132
 
1125
- const SexualHarassmentQuestions = (condition, scope) =>
1126
- group("SexualHarassmentQuestions", {
1127
- if: condition || '$get(Type_Of_Legal_Problem).value == "Sexual Harassment"',
1128
- children: defaultQuestions(),
1129
- });
1130
-
1131
- const WorkplaceHarassmentQuestions = (condition, scope) =>
1132
- group("WorkplaceHarassmentQuestions", {
1133
- if: condition || '$get(Type_Of_Legal_Problem).value == "Workplace Harassment"',
1134
- children: [
1135
- haveAttorney(scope),
1136
- numEmployeesOfBusiness(scope),
1137
- employerType(scope),
1138
- employeeAtCompany(scope),
1139
- degreeOfInterestHelp(scope),
1140
- ],
1141
- });
1142
-
1143
- const NonWorkplaceHarassmentQuestions = (condition, scope) =>
1144
- group("NonWorkplaceHarassmentQuestions", {
1145
- if: condition || '$get(Type_Of_Legal_Problem).value == "Non-Workplace Harassment"',
1146
- children: defaultQuestions(),
1147
- });
1148
-
1149
- const WorkplaceDiscriminationQuestions = (condition, scope) =>
1150
- group("WorkplaceDiscriminationQuestions", {
1151
- if: condition || '$get(Type_Of_Legal_Problem).value == "Workplace Discrimination"',
1152
- children: [
1153
- haveAttorney(scope),
1154
- numEmployeesOfBusiness(scope),
1155
- employerType(scope),
1156
- employeeAtCompany(scope),
1157
- degreeOfInterestHelp(scope),
1158
- ],
1159
- });
1160
-
1161
- const NonWorkplaceDiscriminationQuestions = (condition, scope) =>
1162
- group("NonWorkplaceDiscriminationQuestions", {
1163
- if: condition || '$get(Type_Of_Legal_Problem).value == "Non-Workplace Discrimination"',
1164
- children: defaultQuestions(),
1165
- });
1166
-
1167
1133
  const PersonalInjuryQuestions = (condition, scope) =>
1168
1134
  group("PersonalInjuryQuestions", {
1169
1135
  if: condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"',
1170
1136
  children: [
1171
- haveAttorney(scope),
1137
+ haveAttorney$1(scope),
1172
1138
  incidentDate(scope),
1173
1139
  claimStatus(scope),
1174
1140
  atFault(scope),
@@ -1180,14 +1146,14 @@ const PersonalInjuryQuestions = (condition, scope) =>
1180
1146
  const PowerofAttorneyQuestions = (condition, scope) =>
1181
1147
  group("PowerofAttorneyQuestions", {
1182
1148
  if: condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"',
1183
- children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1149
+ children: [haveAttorney$1(scope), degreeOfInterestHelp(scope)],
1184
1150
  });
1185
1151
 
1186
1152
  const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) =>
1187
1153
  group("SocialSecurityDisabilityAndInsuranceQuestions", {
1188
1154
  if: condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"',
1189
1155
  children: [
1190
- haveAttorney(scope),
1156
+ haveAttorney$1(scope),
1191
1157
  applicantAge(scope),
1192
1158
  disabilityConditionStopWork(scope),
1193
1159
  disabilityWorkHistory(scope),
@@ -1200,7 +1166,7 @@ const WillsAndTrustsQuestions = (condition, scope) =>
1200
1166
  group("WillsAndTrustsQuestions", {
1201
1167
  if: condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"',
1202
1168
  children: [
1203
- haveAttorney(scope),
1169
+ haveAttorney$1(scope),
1204
1170
  valueOfAssets(scope),
1205
1171
  typeOfAssets(scope),
1206
1172
  roleInMatterProbate(scope),
@@ -1213,7 +1179,7 @@ const WorkersCompensationQuestions = (condition, scope) =>
1213
1179
  group("WorkersCompensationQuestions", {
1214
1180
  if: condition || '$get(Type_Of_Legal_Problem).value == "Workers Compensation"',
1215
1181
  children: [
1216
- haveAttorney(scope),
1182
+ haveAttorney$1(scope),
1217
1183
  incidentDate(scope),
1218
1184
  claimStatus(scope),
1219
1185
  primaryInjury(scope),
@@ -1222,12 +1188,6 @@ const WorkersCompensationQuestions = (condition, scope) =>
1222
1188
  ],
1223
1189
  });
1224
1190
 
1225
- const NotSureOrOtherQuestions = (condition, scope) =>
1226
- group("NotSureOrOtherQuestions", {
1227
- if: condition || '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
1228
- children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1229
- });
1230
-
1231
1191
  const NEXT_ON_ENTER = "$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
1232
1192
  const NEXT_ON_INPUT = "$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
1233
1193
 
@@ -1289,13 +1249,21 @@ function secureIcon(updates = {}) {
1289
1249
  return merge(secureIconDefault, updates)
1290
1250
  }
1291
1251
 
1292
- function questionsStepHeadline(updates) {
1252
+ function secureIconStandalone(updates = {}) {
1293
1253
  return {
1294
- $el: "h3",
1295
- children: updates.headline || "Tell Us About Your Situation",
1296
- attrs: {
1297
- 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",
1254
+ if: "$activeStep === $lastStep()",
1255
+ style: {
1256
+ if: "$activeStep !== $lastStep()",
1257
+ then: "display: none;",
1298
1258
  },
1259
+ children: [
1260
+ secureIcon({
1261
+ attrs: {
1262
+ class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500 t-pb-6 sm:t-pb-8",
1263
+ },
1264
+ ...updates,
1265
+ }),
1266
+ ],
1299
1267
  }
1300
1268
  }
1301
1269
 
@@ -1319,6 +1287,19 @@ function crossSellQuestionsStepSubHeadline(updates) {
1319
1287
  }
1320
1288
  }
1321
1289
 
1290
+ function verticalStepHeadline(updates) {
1291
+ return {
1292
+ $el: "h3",
1293
+ children: updates.headline || "Tell Us About Your Situation",
1294
+ attrs: {
1295
+ class:
1296
+ "t-flex t-justify-center t-text-center t-text-lg sm:t-text-xl t-font-bold t-text-dark t-pb-5 t-pt-0 t-px-1" +
1297
+ " " +
1298
+ (updates.headlineClass || ""),
1299
+ },
1300
+ }
1301
+ }
1302
+
1322
1303
  function commentsStepHeadline(updates) {
1323
1304
  return {
1324
1305
  $el: "h3",
@@ -1461,6 +1442,25 @@ function step(name, inputs, updates = {}) {
1461
1442
  })
1462
1443
  }
1463
1444
 
1445
+ // Single question step
1446
+ function sqstep(name, input, defaultHeadline, updates = {}) {
1447
+ if (typeof updates.nextOnInput === "undefined") {
1448
+ updates.nextOnInput = true;
1449
+ }
1450
+
1451
+ return step(
1452
+ name,
1453
+ [
1454
+ verticalStepHeadline({
1455
+ headline: updates.headline ?? defaultHeadline,
1456
+ headlineClass: updates.headlineClass,
1457
+ }),
1458
+ ...(Array.isArray(input) ? input : [input]),
1459
+ ],
1460
+ updates
1461
+ )
1462
+ }
1463
+
1464
1464
  function commentsWithBankruptcy(updates = {}) {
1465
1465
  return step(
1466
1466
  "commentsWithBankruptcy",
@@ -1469,6 +1469,7 @@ function commentsWithBankruptcy(updates = {}) {
1469
1469
  comments(updates.scope, false, {
1470
1470
  label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1471
1471
  placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1472
+ // TODO: this is a mess
1472
1473
  inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
1473
1474
  }),
1474
1475
  // TODO: needs scope support
@@ -1489,30 +1490,63 @@ function commentsWithBankruptcy(updates = {}) {
1489
1490
  )
1490
1491
  }
1491
1492
 
1492
- function contactInfo(updates = {}) {
1493
+ function contactInfoV2(updates = {}) {
1493
1494
  return step(
1494
1495
  "contactInfo",
1495
1496
  [
1496
1497
  contactStepHeadline(updates),
1497
1498
  contactStepSubHeadline(updates),
1498
1499
  trustedFormScript(),
1499
- email(updates.scope),
1500
- phone(updates.scope),
1501
- TCPAConsent(updates.scope),
1502
- secureIcon(),
1500
+ {
1501
+ $el: "div",
1502
+ attrs: {
1503
+ class: "t-flex t-flex-col t-justify-center t-items-center",
1504
+ },
1505
+ children: [
1506
+ emailFL(updates.scope, {
1507
+ outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
1508
+ innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
1509
+ }),
1510
+ phoneFL(updates.scope, {
1511
+ outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
1512
+ innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
1513
+ }),
1514
+ ],
1515
+ },
1516
+ TCPAConsent(updates.scope, {
1517
+ outerClass: "!t-flex !t-flex-col !t-justify-center !t-items-center",
1518
+ wrapperClass: "t-w-[95%] sm:t-w-[80%]",
1519
+ messagesClass: "t-w-[95%] sm:t-w-[80%]",
1520
+ }),
1503
1521
  ],
1504
1522
  { nextOnEnter: false }
1505
1523
  )
1506
1524
  }
1507
1525
 
1508
- function firstAndLastV2(updates = {}) {
1526
+ function firstAndLastV4(updates = {}) {
1509
1527
  return step(
1510
1528
  "firstAndLast",
1511
- [firstAndLastStepHeadline(updates), firstName(updates.scope), lastName(updates.scope)],
1529
+ [
1530
+ firstAndLastStepHeadline({
1531
+ headline: updates.headline ?? "Who is looking for help?",
1532
+ headlineClass: updates.headlineClass,
1533
+ }),
1534
+ {
1535
+ $el: "div",
1536
+ attrs: {
1537
+ class: "t-flex t-flex-col t-justify-center t-items-center t-pt-3",
1538
+ },
1539
+ children: [fullNameFLMobileCol(updates.scope)],
1540
+ },
1541
+ ],
1512
1542
  updates
1513
1543
  )
1514
1544
  }
1515
1545
 
1546
+ function zipcode(updates = {}) {
1547
+ return sqstep("zipcode", zipcode$1(updates.scope, true, updates.input), "Please verify your Zip Code", updates)
1548
+ }
1549
+
1516
1550
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1517
1551
  return step(
1518
1552
  "autoAndCarAccidentCrossSellQuestions",
@@ -1681,22 +1715,10 @@ function workersCompensationCrossSellQuestions(updates = {}) {
1681
1715
  )
1682
1716
  }
1683
1717
 
1684
- function harassmentAndDiscriminationTOLPAndZip(updates = {}) {
1685
- return step("harassmentAndDiscriminationTOLPAndZip", [harassmentAndDiscriminationTOLP(), zipcode()], updates)
1686
- }
1687
-
1688
- function harassmentAndDiscriminationTOLPQuestions(updates = {}) {
1718
+ function harassmentAndDiscriminationTOLP(updates = {}) {
1689
1719
  return step(
1690
- "TOLPQuestions",
1691
- [
1692
- questionsStepHeadline(updates),
1693
- SexualHarassmentQuestions(),
1694
- WorkplaceHarassmentQuestions(),
1695
- NonWorkplaceHarassmentQuestions(),
1696
- WorkplaceDiscriminationQuestions(),
1697
- NonWorkplaceDiscriminationQuestions(),
1698
- NotSureOrOtherQuestions(),
1699
- ],
1720
+ "harassmentAndDiscriminationTOLP",
1721
+ [harassmentAndDiscriminationTOLP$1(updates.scope, true, updates.input)],
1700
1722
  updates
1701
1723
  )
1702
1724
  }
@@ -1707,13 +1729,62 @@ function legalCrossSells(updates = {}) {
1707
1729
  return step("legalCrossSells", [legalCrossSellsStepHeadline(updates), legalCrossSells$1()], updates)
1708
1730
  }
1709
1731
 
1710
- const formNavigation = (updates = {}) => ({
1732
+ function haveAttorney(updates = {}) {
1733
+ return sqstep(
1734
+ "haveAttorney",
1735
+ haveAttorney$1(updates.scope, true, updates.input),
1736
+ "Already working with an attorney?",
1737
+ updates
1738
+ )
1739
+ }
1740
+
1741
+ function degreeOfInterest(updates = {}) {
1742
+ return sqstep(
1743
+ "degreeOfInterest",
1744
+ degreeOfInterest$1(updates.scope, true, updates.input),
1745
+ "Could you pay if your issue could be resolved?",
1746
+ updates
1747
+ )
1748
+ }
1749
+
1750
+ function employerType(updates = {}) {
1751
+ return sqstep(
1752
+ "employerType",
1753
+ employerType$1(updates.scope, true, updates.input),
1754
+ "What type of employer is it?",
1755
+ updates
1756
+ )
1757
+ }
1758
+
1759
+ function employeeAtCompany(updates = {}) {
1760
+ return sqstep(
1761
+ "employeeAtCompany",
1762
+ employeeAtCompany$1(updates.scope, true, updates.input),
1763
+ "Do you/they still work at the company?",
1764
+ updates
1765
+ )
1766
+ }
1767
+
1768
+ function numEmployeesOfBusiness(updates = {}) {
1769
+ return sqstep(
1770
+ "numEmployeesOfBusiness",
1771
+ numEmployeesOfBusiness$1(updates.scope, true, updates.input),
1772
+ "How many employees does the business have?",
1773
+ updates
1774
+ )
1775
+ }
1776
+
1777
+ const formNavigationNoFinalBack = (updates = {}) => ({
1711
1778
  $el: "div",
1712
1779
  attrs: {
1713
1780
  class: {
1714
1781
  if: "$activeStep === $firstStep()",
1715
1782
  then: "step-nav " + (updates.firstStepButtonClass || "!t-justify-center sm:!t-justify-between"),
1716
- else: "step-nav !t-justify-between",
1783
+ else: {
1784
+ if: "$activeStep === $lastStep()",
1785
+ then: "step-nav !t-justify-center ",
1786
+ else: "step-nav !t-justify-between",
1787
+ },
1717
1788
  },
1718
1789
  },
1719
1790
  children: [
@@ -1723,12 +1794,12 @@ const formNavigation = (updates = {}) => ({
1723
1794
  onClick: "$setPreviousStep($prevStepFunc($get(form)))",
1724
1795
  children: "Back",
1725
1796
  outerClass: {
1726
- if: "$activeStep === $firstStep()",
1797
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
1727
1798
  then: "t-hidden sm:t-block",
1728
1799
  else: "",
1729
1800
  },
1730
1801
  style: {
1731
- if: "$activeStep === $firstStep()",
1802
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
1732
1803
  then: "display: none;",
1733
1804
  },
1734
1805
  classes: {
@@ -1767,7 +1838,8 @@ const formNavigation = (updates = {}) => ({
1767
1838
  then: "display: none;",
1768
1839
  },
1769
1840
  classes: {
1770
- input: (updates.inputClass || "") + " !t-ml-2 sm:!t-ml-auto f-navigation-input",
1841
+ input: (updates.inputClass || "") + " f-navigation-input !t-w-60",
1842
+ outer: "!t-mt-0 !t-mb-0",
1771
1843
  },
1772
1844
  },
1773
1845
  ],
@@ -1921,6 +1993,58 @@ function formAnchor(updates) {
1921
1993
  return merge(formAnchorDefaults, updates)
1922
1994
  }
1923
1995
 
1996
+ const progressBarDefaults = {
1997
+ $el: "div",
1998
+ attrs: {
1999
+ class: "t-mt-7 t-mb-5 t-w-full t-flex t-flex-col t-justify-center t-items-center",
2000
+ style: {
2001
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
2002
+ then: "display: none",
2003
+ },
2004
+ },
2005
+ children: [
2006
+ {
2007
+ $el: "div",
2008
+ attrs: {
2009
+ class: "t-flex t-justify-center",
2010
+ },
2011
+ children: [
2012
+ {
2013
+ $el: "span",
2014
+ attrs: {
2015
+ id: "progress-bar-text",
2016
+ class: "t-text-sm t-mb-1",
2017
+ },
2018
+ children: ["0% Complete"],
2019
+ },
2020
+ ],
2021
+ },
2022
+ {
2023
+ $el: "div",
2024
+ attrs: {
2025
+ class: "t-bg-gray-100 t-w-9/12 t-rounded",
2026
+ },
2027
+ children: [
2028
+ {
2029
+ $el: "div",
2030
+ attrs: {
2031
+ id: "progress-bar",
2032
+ class:
2033
+ "t-flex t-flex-col t-justify-center t-text-center t-whitespace-nowrap t-w-[10%] t-h-1.5 t-rounded t-text-white t-bg-[#007bff]",
2034
+ style: {
2035
+ transition: "width 0.5s ease",
2036
+ },
2037
+ },
2038
+ },
2039
+ ],
2040
+ },
2041
+ ],
2042
+ };
2043
+
2044
+ function progressBar(updates) {
2045
+ return merge(progressBarDefaults, updates)
2046
+ }
2047
+
1924
2048
  function headlineDefaults(updates = {}) {
1925
2049
  return {
1926
2050
  $el: "h1",
@@ -2347,7 +2471,7 @@ const nextStepsMapGeneralLegal = {
2347
2471
  "estateLegalServicesNeeded",
2348
2472
  ...nextStepsLegalDefault,
2349
2473
  ],
2350
- "Property Damage": ["realEstateArea", "wouldLikeLawyerTo", ...nextStepsLegalDefault],
2474
+ "Property Damage": ["wouldLikeLawyerTo", ...nextStepsLegalDefault],
2351
2475
  "Real Estate": ["realEstateTOLPDisplay", "realEstateArea", "wouldLikeLawyerTo", ...nextStepsLegalDefault],
2352
2476
  "Social Security Disability and Insurance": [
2353
2477
  "applicantAge",
@@ -2431,12 +2555,6 @@ filterNextStepsMap(nextStepsMapGeneralLegal, ["legalCrossSells"], {
2431
2555
  commentsWithBankruptcy: "comments",
2432
2556
  });
2433
2557
 
2434
- const nextStepsMapLegalLegacy = {
2435
- values: {
2436
- "*": ["TOLPQuestions", "commentsWithBankruptcy", "legalCrossSells", "firstAndLast", "contactInfo"],
2437
- },
2438
- };
2439
-
2440
2558
  const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"];
2441
2559
 
2442
2560
  ({
@@ -2486,7 +2604,7 @@ const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"
2486
2604
  },
2487
2605
  });
2488
2606
 
2489
- ({
2607
+ const nextStepsMapCivilTolp = {
2490
2608
  values: {
2491
2609
  Type_Of_Legal_Problem: {
2492
2610
  "Defend a Lawsuit": TOLPNextSteps["Defend a Lawsuit"],
@@ -2494,6 +2612,10 @@ const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"
2494
2612
  },
2495
2613
  "*": ["lawsuitOtherParty", ...nextStepsLegalDefault],
2496
2614
  },
2615
+ };
2616
+
2617
+ filterNextStepsMap(nextStepsMapCivilTolp, ["legalCrossSells"], {
2618
+ commentsWithBankruptcy: "comments",
2497
2619
  });
2498
2620
 
2499
2621
  const nextStepsMapCivilTOLPDisplay = {
@@ -2565,6 +2687,27 @@ filterNextStepsMap(
2565
2687
  },
2566
2688
  });
2567
2689
 
2690
+ const nextStepsMapHarassmentAndDiscrimination = {
2691
+ values: {
2692
+ Type_Of_Legal_Problem: {
2693
+ "Workplace Harassment": TOLPNextSteps["Workplace Harassment"],
2694
+ "Workplace Discrimination": TOLPNextSteps["Workplace Discrimination"],
2695
+ },
2696
+ "*": [...nextStepsLegalDefault],
2697
+ },
2698
+ };
2699
+
2700
+ ({
2701
+ values: {
2702
+ Type_Of_Legal_Problem: {
2703
+ "Probate and Estates": TOLPNextSteps["Probate and Estates"],
2704
+ "Wills and Trusts": TOLPNextSteps["Wills and Trusts"],
2705
+ "Wrongful Death": TOLPNextSteps["Wrongful Death"],
2706
+ },
2707
+ "*": [...nextStepsLegalDefault],
2708
+ },
2709
+ });
2710
+
2568
2711
  ({
2569
2712
  values: {
2570
2713
  Type_Of_Legal_Problem_Display: {
@@ -2625,10 +2768,18 @@ const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
2625
2768
  const meta = defaultMetaPropsLegal();
2626
2769
 
2627
2770
  meta.data.dynamicSchema = [
2628
- harassmentAndDiscriminationTOLPQuestions(),
2629
- commentsWithBankruptcy(),
2771
+ numEmployeesOfBusiness(),
2772
+ employerType(),
2773
+ employeeAtCompany(),
2774
+ haveAttorney(),
2775
+ degreeOfInterest(),
2776
+ commentsWithBankruptcy({
2777
+ label: null,
2778
+ headline: "Please briefly describe your situation:",
2779
+ headlineClass: "!t-text-dark",
2780
+ }),
2630
2781
  legalCrossSells({
2631
- headlineClass: '!t-text-dark',
2782
+ headlineClass: "!t-text-dark",
2632
2783
  nextStepMap: nextStepsMapLegalCrossSells,
2633
2784
  }),
2634
2785
  autoAndCarAccidentCrossSellQuestions(),
@@ -2640,40 +2791,53 @@ meta.data.dynamicSchema = [
2640
2791
  willsAndTrustsCrossSellQuestions(),
2641
2792
  divorceAndSeparationCrossSellQuestions(),
2642
2793
  childCustodyCrossSellQuestions(),
2643
- firstAndLastV2(),
2794
+ firstAndLastV4({
2795
+ headlineClass: "!t-text-dark",
2796
+ }),
2644
2797
  ];
2645
2798
 
2646
2799
  const schema = [
2647
2800
  meta,
2648
2801
  formAnchor(),
2649
2802
  {
2650
- $cmp: 'FormKit',
2803
+ $cmp: "FormKit",
2651
2804
  props: formProps({
2652
- formId: 'harassmentAndDiscrimination',
2805
+ formId: "harassmentAndDiscrimination",
2653
2806
  redirectMap: legalRedirectMap(),
2654
- crossSellOptionMap: legalCrossSellOptionMap
2807
+ crossSellOptionMap: legalCrossSellOptionMap,
2655
2808
  }),
2656
2809
  children: [
2810
+ progressBar(),
2657
2811
  defaultHeadline(),
2658
2812
  defaultSubHeadline(),
2659
2813
  ...hiddenInputsLegal,
2660
2814
  {
2661
- $el: 'div',
2815
+ $el: "div",
2662
2816
  attrs: {
2663
- class: 'form-body'
2817
+ class: "form-body",
2664
2818
  },
2665
2819
  children: [
2666
- harassmentAndDiscriminationTOLPAndZip({
2667
- nextStepMap: nextStepsMapLegalLegacy
2820
+ harassmentAndDiscriminationTOLP({
2821
+ nextOnInput: false,
2822
+ nextStepMap: nextStepsMapHarassmentAndDiscrimination,
2668
2823
  }),
2669
2824
  dynamicSchemaNode(),
2670
- contactInfo(),
2671
- formNavigation(),
2672
- formDetails()
2673
- ]
2674
- }
2675
- ]
2676
- }
2825
+ zipcode(),
2826
+ contactInfoV2({
2827
+ subheadlineClass: "!t-text-base",
2828
+ }),
2829
+ formNavigationNoFinalBack({
2830
+ startText: "Start Now",
2831
+ submitLabel: "Get Help Now",
2832
+ inputClass: "!t-font-extrabold",
2833
+ firstStepButtonClass: "!t-justify-center",
2834
+ }),
2835
+ secureIconStandalone(),
2836
+ formDetails(),
2837
+ ],
2838
+ },
2839
+ ],
2840
+ },
2677
2841
  ];
2678
2842
 
2679
2843
  export { schema as default };