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
@@ -372,14 +372,11 @@ const verticalDate = (updates) => {
372
372
  return date(updates)
373
373
  };
374
374
 
375
- const email = (scope, vertical, updates = {}) => {
376
- const func = vertical ? verticalText : sbsText;
377
- const label = vertical ? updates.label : "Email Address:";
378
- return func({
379
- $formkit: "email",
375
+ const emailFL = (scope, updates = {}) => {
376
+ return text({
377
+ $formkit: "FloatingLabelText",
380
378
  name: scope ? scope + ":" + "Email" : "Email",
381
- label,
382
- placeholder: "email@domain.com",
379
+ placeholder: "Email Address",
383
380
  autocomplete: "email",
384
381
  "data-tf-sensitive": "false",
385
382
  validation: "required|email",
@@ -387,59 +384,72 @@ const email = (scope, vertical, updates = {}) => {
387
384
  required: "Email is required",
388
385
  email: "Invalid Email",
389
386
  },
387
+ inputClass: "t-text-center",
388
+ wrapperClass: "t-flex t-justify-center",
390
389
  ...updates,
391
390
  })
392
391
  };
393
392
 
394
- const firstName = (scope, vertical, updates = {}) => {
395
- const func = vertical ? verticalText : sbsText;
396
- const label = vertical ? updates.label : "First Name:";
397
- return func({
398
- label,
393
+ const firstNameFL = (scope, updates = {}) => {
394
+ return text({
395
+ $formkit: "FloatingLabelText",
399
396
  placeholder: "First Name",
400
397
  name: scope ? scope + ":" + "First_Name" : "First_Name",
401
398
  autocomplete: "given-name",
402
399
  validationMessages: {
403
400
  required: "First Name is required",
404
401
  },
402
+ inputClass: "t-text-center",
405
403
  ...updates,
406
404
  })
407
405
  };
408
406
 
409
- const lastName = (scope, vertical, updates = {}) => {
410
- const func = vertical ? verticalText : sbsText;
411
- const label = vertical ? updates.label : "Last Name:";
412
- return func({
413
- label,
407
+ const lastNameFL = (scope, updates = {}) => {
408
+ return text({
409
+ $formkit: "FloatingLabelText",
414
410
  placeholder: "Last Name",
415
411
  name: scope ? scope + ":" + "Last_Name" : "Last_Name",
416
412
  autocomplete: "family-name",
417
413
  validationMessages: {
418
414
  required: "Last Name is required",
419
415
  },
416
+ inputClass: "t-text-center",
420
417
  ...updates,
421
418
  })
422
419
  };
423
420
 
424
- const phone = (scope, vertical, updates = {}) => {
425
- const func = vertical ? verticalText : sbsText;
426
- const label = vertical ? updates.label : "Phone Number:";
427
- return func({
428
- $formkit: "tel",
421
+ const fullNameFLMobileCol = (scope, updates = {}) => {
422
+ return {
423
+ $el: "div",
424
+ attrs: {
425
+ 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%]",
426
+ },
427
+ children: [
428
+ firstNameFL(scope, { outerClass: "sm:!t-max-w-[49%]", ...updates }),
429
+ lastNameFL(scope, { outerClass: "sm:!t-max-w-[49%]", ...updates }),
430
+ ],
431
+ }
432
+ };
433
+
434
+ const phoneFL = (scope, updates = {}) => {
435
+ return text({
436
+ $formkit: "FloatingLabelText",
437
+ datatype: "tel",
429
438
  name: scope ? scope + ":" + "Primary_Phone" : "Primary_Phone",
430
- label,
431
- placeholder: updates.placeholder || "###-###-####",
432
- maxlength: 12,
433
- help: updates.help || "10-digit phone number, hyphens optional",
439
+ placeholder: updates.placeholder || "Phone Number",
440
+ maxlength: 14,
441
+ help: updates.help || null,
434
442
  autocomplete: "tel-national",
435
443
  "data-tf-sensitive": "false",
436
- validation: "required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone",
444
+ validation: "required|matches:/^[0-9]{3}[0-9]{3}[0-9]{4}$/|valid_phone",
437
445
  validationMessages: {
438
446
  required: "Phone Number is required",
439
- matches: "Invalid Phone Format, use ###-###-####",
447
+ matches: "Invalid Phone Format, use (XXX) YYY-ZZZZ",
440
448
  valid_phone: "Invalid Phone Number",
441
449
  },
442
450
  helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]",
451
+ inputClass: "t-text-center",
452
+ wrapperClass: "t-flex t-justify-center",
443
453
  ...updates,
444
454
  })
445
455
  };
@@ -767,10 +777,12 @@ const employeeAtCompany$1 = (scope, vertical, updates = {}) => {
767
777
  const employmentAndWorkplaceTOLPDisplay = (scope, vertical, updates = {}) => {
768
778
  const func = vertical ? col2RadioCenter : col2Radio;
769
779
  const label = vertical ? updates.label : "Select The Workplace Issue:";
780
+ const _if = vertical ? updates.if : '$get(Type_Of_Legal_Problem).value == "Employment and Workplace"';
770
781
  return func(
771
782
  merge(
772
783
  {
773
784
  label,
785
+ if: _if,
774
786
  name: scope ? scope + ":" + "Type_Of_Legal_Problem_Display" : "Type_Of_Legal_Problem_Display",
775
787
  options: [
776
788
  "Workplace Harassment",
@@ -1305,6 +1317,24 @@ function secureIcon(updates = {}) {
1305
1317
  return merge(secureIconDefault, updates)
1306
1318
  }
1307
1319
 
1320
+ function secureIconStandalone(updates = {}) {
1321
+ return {
1322
+ if: "$activeStep === $lastStep()",
1323
+ style: {
1324
+ if: "$activeStep !== $lastStep()",
1325
+ then: "display: none;",
1326
+ },
1327
+ children: [
1328
+ secureIcon({
1329
+ attrs: {
1330
+ class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500 t-pb-6 sm:t-pb-8",
1331
+ },
1332
+ ...updates,
1333
+ }),
1334
+ ],
1335
+ }
1336
+ }
1337
+
1308
1338
  function crossSellQuestionsStepHeadline(updates) {
1309
1339
  return {
1310
1340
  $el: "h3",
@@ -1338,19 +1368,6 @@ function verticalStepHeadline(updates) {
1338
1368
  }
1339
1369
  }
1340
1370
 
1341
- function verticalStepSubHeadline(updates) {
1342
- return {
1343
- $el: "h5",
1344
- children: updates.subheadline || "",
1345
- attrs: {
1346
- class:
1347
- "t-flex t-justify-center t-text-center !t-text-lg t-font-normal t-text-dark t-pb-5 t-pt-0 t-px-1" +
1348
- " " +
1349
- (updates.subheadlineClass || ""),
1350
- },
1351
- }
1352
- }
1353
-
1354
1371
  function commentsStepHeadline(updates) {
1355
1372
  return {
1356
1373
  $el: "h3",
@@ -1520,6 +1537,7 @@ function commentsWithBankruptcy(updates = {}) {
1520
1537
  comments(updates.scope, false, {
1521
1538
  label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1522
1539
  placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1540
+ // TODO: this is a mess
1523
1541
  inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
1524
1542
  }),
1525
1543
  // TODO: needs scope support
@@ -1540,23 +1558,40 @@ function commentsWithBankruptcy(updates = {}) {
1540
1558
  )
1541
1559
  }
1542
1560
 
1543
- function contactInfo(updates = {}) {
1561
+ function contactInfoV2(updates = {}) {
1544
1562
  return step(
1545
1563
  "contactInfo",
1546
1564
  [
1547
1565
  contactStepHeadline(updates),
1548
1566
  contactStepSubHeadline(updates),
1549
1567
  trustedFormScript(),
1550
- email(updates.scope),
1551
- phone(updates.scope),
1552
- TCPAConsent(updates.scope),
1553
- secureIcon(),
1568
+ {
1569
+ $el: "div",
1570
+ attrs: {
1571
+ class: "t-flex t-flex-col t-justify-center t-items-center",
1572
+ },
1573
+ children: [
1574
+ emailFL(updates.scope, {
1575
+ outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
1576
+ innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
1577
+ }),
1578
+ phoneFL(updates.scope, {
1579
+ outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
1580
+ innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
1581
+ }),
1582
+ ],
1583
+ },
1584
+ TCPAConsent(updates.scope, {
1585
+ outerClass: "!t-flex !t-flex-col !t-justify-center !t-items-center",
1586
+ wrapperClass: "t-w-[95%] sm:t-w-[80%]",
1587
+ messagesClass: "t-w-[95%] sm:t-w-[80%]",
1588
+ }),
1554
1589
  ],
1555
1590
  { nextOnEnter: false }
1556
1591
  )
1557
1592
  }
1558
1593
 
1559
- function firstAndLastV3(updates = {}) {
1594
+ function firstAndLastV4(updates = {}) {
1560
1595
  return step(
1561
1596
  "firstAndLast",
1562
1597
  [
@@ -1564,12 +1599,13 @@ function firstAndLastV3(updates = {}) {
1564
1599
  headline: updates.headline ?? "Who is looking for help?",
1565
1600
  headlineClass: updates.headlineClass,
1566
1601
  }),
1567
- verticalStepSubHeadline({
1568
- subheadline: updates.subheadline ?? "We never share info without consent",
1569
- subheadlineClass: "!t-text-sm !t-text-gray-500",
1570
- }),
1571
- firstName(updates.scope),
1572
- lastName(updates.scope),
1602
+ {
1603
+ $el: "div",
1604
+ attrs: {
1605
+ class: "t-flex t-flex-col t-justify-center t-items-center t-pt-3",
1606
+ },
1607
+ children: [fullNameFLMobileCol(updates.scope)],
1608
+ },
1573
1609
  ],
1574
1610
  updates
1575
1611
  )
@@ -1890,13 +1926,17 @@ function criminalChargesFiled(updates = {}) {
1890
1926
  )
1891
1927
  }
1892
1928
 
1893
- const formNavigation = (updates = {}) => ({
1929
+ const formNavigationNoFinalBack = (updates = {}) => ({
1894
1930
  $el: "div",
1895
1931
  attrs: {
1896
1932
  class: {
1897
1933
  if: "$activeStep === $firstStep()",
1898
1934
  then: "step-nav " + (updates.firstStepButtonClass || "!t-justify-center sm:!t-justify-between"),
1899
- else: "step-nav !t-justify-between",
1935
+ else: {
1936
+ if: "$activeStep === $lastStep()",
1937
+ then: "step-nav !t-justify-center ",
1938
+ else: "step-nav !t-justify-between",
1939
+ },
1900
1940
  },
1901
1941
  },
1902
1942
  children: [
@@ -1906,12 +1946,12 @@ const formNavigation = (updates = {}) => ({
1906
1946
  onClick: "$setPreviousStep($prevStepFunc($get(form)))",
1907
1947
  children: "Back",
1908
1948
  outerClass: {
1909
- if: "$activeStep === $firstStep()",
1949
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
1910
1950
  then: "t-hidden sm:t-block",
1911
1951
  else: "",
1912
1952
  },
1913
1953
  style: {
1914
- if: "$activeStep === $firstStep()",
1954
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
1915
1955
  then: "display: none;",
1916
1956
  },
1917
1957
  classes: {
@@ -1950,7 +1990,8 @@ const formNavigation = (updates = {}) => ({
1950
1990
  then: "display: none;",
1951
1991
  },
1952
1992
  classes: {
1953
- input: (updates.inputClass || "") + " !t-ml-2 sm:!t-ml-auto f-navigation-input",
1993
+ input: (updates.inputClass || "") + " f-navigation-input !t-w-60",
1994
+ outer: "!t-mt-0 !t-mb-0",
1954
1995
  },
1955
1996
  },
1956
1997
  ],
@@ -2810,7 +2851,7 @@ const nextStepsMapGeneralLegal = {
2810
2851
  "estateLegalServicesNeeded",
2811
2852
  ...nextStepsLegalDefault,
2812
2853
  ],
2813
- "Property Damage": ["realEstateArea", "wouldLikeLawyerTo", ...nextStepsLegalDefault],
2854
+ "Property Damage": ["wouldLikeLawyerTo", ...nextStepsLegalDefault],
2814
2855
  "Real Estate": ["realEstateTOLPDisplay", "realEstateArea", "wouldLikeLawyerTo", ...nextStepsLegalDefault],
2815
2856
  "Social Security Disability and Insurance": [
2816
2857
  "applicantAge",
@@ -2943,7 +2984,7 @@ const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"
2943
2984
  },
2944
2985
  });
2945
2986
 
2946
- ({
2987
+ const nextStepsMapCivilTolp = {
2947
2988
  values: {
2948
2989
  Type_Of_Legal_Problem: {
2949
2990
  "Defend a Lawsuit": TOLPNextSteps["Defend a Lawsuit"],
@@ -2951,6 +2992,10 @@ const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"
2951
2992
  },
2952
2993
  "*": ["lawsuitOtherParty", ...nextStepsLegalDefault],
2953
2994
  },
2995
+ };
2996
+
2997
+ filterNextStepsMap(nextStepsMapCivilTolp, ["legalCrossSells"], {
2998
+ commentsWithBankruptcy: "comments",
2954
2999
  });
2955
3000
 
2956
3001
  const nextStepsMapCivilTOLPDisplay = {
@@ -3022,6 +3067,27 @@ filterNextStepsMap(
3022
3067
  },
3023
3068
  });
3024
3069
 
3070
+ ({
3071
+ values: {
3072
+ Type_Of_Legal_Problem: {
3073
+ "Workplace Harassment": TOLPNextSteps["Workplace Harassment"],
3074
+ "Workplace Discrimination": TOLPNextSteps["Workplace Discrimination"],
3075
+ },
3076
+ "*": [...nextStepsLegalDefault],
3077
+ },
3078
+ });
3079
+
3080
+ ({
3081
+ values: {
3082
+ Type_Of_Legal_Problem: {
3083
+ "Probate and Estates": TOLPNextSteps["Probate and Estates"],
3084
+ "Wills and Trusts": TOLPNextSteps["Wills and Trusts"],
3085
+ "Wrongful Death": TOLPNextSteps["Wrongful Death"],
3086
+ },
3087
+ "*": [...nextStepsLegalDefault],
3088
+ },
3089
+ });
3090
+
3025
3091
  ({
3026
3092
  values: {
3027
3093
  Type_Of_Legal_Problem_Display: {
@@ -3098,7 +3164,6 @@ meta.data.dynamicSchema = [
3098
3164
  numEmployeesOfBusiness(),
3099
3165
  primaryInjury(),
3100
3166
  relationshipToVictim(),
3101
- zipcode(),
3102
3167
  commentsWithBankruptcy({
3103
3168
  label: null,
3104
3169
  headline: "Please briefly describe your situation:",
@@ -3117,7 +3182,7 @@ meta.data.dynamicSchema = [
3117
3182
  willsAndTrustsCrossSellQuestions(),
3118
3183
  divorceAndSeparationCrossSellQuestions(),
3119
3184
  childCustodyCrossSellQuestions(),
3120
- firstAndLastV3({
3185
+ firstAndLastV4({
3121
3186
  headlineClass: "!t-text-dark",
3122
3187
  }),
3123
3188
  ];
@@ -3152,8 +3217,17 @@ const schema = [
3152
3217
  nextStepMap: nextStepsMapEmploymentAndWorkplaceTOLPDisplay,
3153
3218
  }),
3154
3219
  dynamicSchemaNode(),
3155
- contactInfo(),
3156
- formNavigation(),
3220
+ zipcode(),
3221
+ contactInfoV2({
3222
+ subheadlineClass: "!t-text-base",
3223
+ }),
3224
+ formNavigationNoFinalBack({
3225
+ startText: "Start Now",
3226
+ submitLabel: "Get Help Now",
3227
+ inputClass: "!t-font-extrabold",
3228
+ firstStepButtonClass: "!t-justify-center",
3229
+ }),
3230
+ secureIconStandalone(),
3157
3231
  formDetails(),
3158
3232
  ],
3159
3233
  },