bhl-forms 0.11.11 → 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 (95) hide show
  1. package/dist/forms/accidentsAndInjuries.es.js +22 -0
  2. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  3. package/dist/forms/applianceRepairMinimal.es.js +21 -0
  4. package/dist/forms/applianceRepairMinimal.iife.js +1 -1
  5. package/dist/forms/appraisals.es.js +21 -0
  6. package/dist/forms/appraisals.iife.js +1 -1
  7. package/dist/forms/business.es.js +22 -0
  8. package/dist/forms/business.iife.js +1 -1
  9. package/dist/forms/childAndFamily.es.js +22 -0
  10. package/dist/forms/childAndFamily.iife.js +1 -1
  11. package/dist/forms/childAndFamilySingle.es.js +147 -79
  12. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  13. package/dist/forms/childAndFamilySingle.json +1 -1
  14. package/dist/forms/civilLawsuit.es.js +132 -62
  15. package/dist/forms/civilLawsuit.iife.js +1 -1
  16. package/dist/forms/civilLawsuit.json +1 -1
  17. package/dist/forms/civilLawsuit1to1.es.js +23 -0
  18. package/dist/forms/civilLawsuit1to1.iife.js +1 -1
  19. package/dist/forms/coins.es.js +21 -0
  20. package/dist/forms/coins.iife.js +1 -1
  21. package/dist/forms/contracts.es.js +22 -0
  22. package/dist/forms/contracts.iife.js +1 -1
  23. package/dist/forms/criminal.es.js +22 -0
  24. package/dist/forms/criminal.iife.js +1 -1
  25. package/dist/forms/divorce.es.js +22 -0
  26. package/dist/forms/divorce.iife.js +1 -1
  27. package/dist/forms/employmentAndWorkplace.es.js +132 -62
  28. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  29. package/dist/forms/employmentAndWorkplace.json +1 -1
  30. package/dist/forms/foreclosure.es.js +22 -0
  31. package/dist/forms/foreclosure.iife.js +1 -1
  32. package/dist/forms/generalContractors.es.js +21 -0
  33. package/dist/forms/generalContractors.iife.js +1 -1
  34. package/dist/forms/generalHomeImprovement.es.js +21 -0
  35. package/dist/forms/generalHomeImprovement.iife.js +1 -1
  36. package/dist/forms/generalHomeImprovementThankYou.es.js +21 -0
  37. package/dist/forms/generalHomeImprovementThankYou.iife.js +1 -1
  38. package/dist/forms/generalLegal.es.js +24 -0
  39. package/dist/forms/generalLegal.iife.js +1 -1
  40. package/dist/forms/generalLegal.json +1 -1
  41. package/dist/forms/generalLegalJustAnswer.es.js +159 -88
  42. package/dist/forms/generalLegalJustAnswer.iife.js +1 -1
  43. package/dist/forms/generalLegalJustAnswer.json +1 -1
  44. package/dist/forms/generalLegalPopUnder.es.js +24 -0
  45. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  46. package/dist/forms/generalLegalPopUnder.json +1 -1
  47. package/dist/forms/generalLegalPopUnderSingle.es.js +159 -88
  48. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  49. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  50. package/dist/forms/generalLegalSingle.es.js +159 -88
  51. package/dist/forms/generalLegalSingle.iife.js +1 -1
  52. package/dist/forms/generalLegalSingle.json +1 -1
  53. package/dist/forms/generalLegalSingle1to1.es.js +23 -0
  54. package/dist/forms/generalLegalSingle1to1.iife.js +1 -1
  55. package/dist/forms/generalLegalSingleMinimal.es.js +22 -1
  56. package/dist/forms/generalLegalSingleMinimal.iife.js +1 -1
  57. package/dist/forms/generalLegalSingleMinimal.json +1 -1
  58. package/dist/forms/generalLegalThankYou.es.js +24 -0
  59. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  60. package/dist/forms/generalLegalThankYou.json +1 -1
  61. package/dist/forms/generalLegalThankYouConsultation.es.js +159 -88
  62. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  63. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  64. package/dist/forms/harassmentAndDiscrimination.es.js +313 -153
  65. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  66. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  67. package/dist/forms/landlordTenant.es.js +22 -0
  68. package/dist/forms/landlordTenant.iife.js +1 -1
  69. package/dist/forms/malpractice.es.js +22 -0
  70. package/dist/forms/malpractice.iife.js +1 -1
  71. package/dist/forms/mechanics.es.js +21 -0
  72. package/dist/forms/mechanics.iife.js +1 -1
  73. package/dist/forms/patentsAndIP.es.js +22 -0
  74. package/dist/forms/patentsAndIP.iife.js +1 -1
  75. package/dist/forms/realEstate.es.js +22 -0
  76. package/dist/forms/realEstate.iife.js +1 -1
  77. package/dist/forms/repossession.es.js +22 -0
  78. package/dist/forms/repossession.iife.js +1 -1
  79. package/dist/forms/ssdi.es.js +22 -0
  80. package/dist/forms/ssdi.iife.js +1 -1
  81. package/dist/forms/testForm.es.js +21 -0
  82. package/dist/forms/testForm.iife.js +1 -1
  83. package/dist/forms/testRedirects.es.js +23 -0
  84. package/dist/forms/testRedirects.iife.js +1 -1
  85. package/dist/forms/testRedirects.json +1 -1
  86. package/dist/forms/vets.es.js +21 -0
  87. package/dist/forms/vets.iife.js +1 -1
  88. package/dist/forms/willsAndTrusts.es.js +376 -159
  89. package/dist/forms/willsAndTrusts.iife.js +1 -1
  90. package/dist/forms/willsAndTrusts.json +1 -1
  91. package/dist/forms/windows.es.js +21 -0
  92. package/dist/forms/windows.iife.js +1 -1
  93. package/dist/forms/workersCompensation.es.js +22 -0
  94. package/dist/forms/workersCompensation.iife.js +1 -1
  95. 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
  };
@@ -853,10 +863,12 @@ const employeeAtCompany$1 = (scope, vertical, updates = {}) => {
853
863
  const employmentAndWorkplaceTOLPDisplay$1 = (scope, vertical, updates = {}) => {
854
864
  const func = vertical ? col2RadioCenter : col2Radio;
855
865
  const label = vertical ? updates.label : "Select The Workplace Issue:";
866
+ const _if = vertical ? updates.if : '$get(Type_Of_Legal_Problem).value == "Employment and Workplace"';
856
867
  return func(
857
868
  merge(
858
869
  {
859
870
  label,
871
+ if: _if,
860
872
  name: scope ? scope + ":" + "Type_Of_Legal_Problem_Display" : "Type_Of_Legal_Problem_Display",
861
873
  options: [
862
874
  "Workplace Harassment",
@@ -1488,6 +1500,24 @@ function secureIcon(updates = {}) {
1488
1500
  return merge(secureIconDefault, updates)
1489
1501
  }
1490
1502
 
1503
+ function secureIconStandalone(updates = {}) {
1504
+ return {
1505
+ if: "$activeStep === $lastStep()",
1506
+ style: {
1507
+ if: "$activeStep !== $lastStep()",
1508
+ then: "display: none;",
1509
+ },
1510
+ children: [
1511
+ secureIcon({
1512
+ attrs: {
1513
+ class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500 t-pb-6 sm:t-pb-8",
1514
+ },
1515
+ ...updates,
1516
+ }),
1517
+ ],
1518
+ }
1519
+ }
1520
+
1491
1521
  function crossSellQuestionsStepHeadline(updates) {
1492
1522
  return {
1493
1523
  $el: "h3",
@@ -1521,19 +1551,6 @@ function verticalStepHeadline(updates) {
1521
1551
  }
1522
1552
  }
1523
1553
 
1524
- function verticalStepSubHeadline(updates) {
1525
- return {
1526
- $el: "h5",
1527
- children: updates.subheadline || "",
1528
- attrs: {
1529
- class:
1530
- "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" +
1531
- " " +
1532
- (updates.subheadlineClass || ""),
1533
- },
1534
- }
1535
- }
1536
-
1537
1554
  function commentsStepHeadline(updates) {
1538
1555
  return {
1539
1556
  $el: "h3",
@@ -1703,6 +1720,7 @@ function commentsWithBankruptcy(updates = {}) {
1703
1720
  comments(updates.scope, false, {
1704
1721
  label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1705
1722
  placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1723
+ // TODO: this is a mess
1706
1724
  inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
1707
1725
  }),
1708
1726
  // TODO: needs scope support
@@ -1723,23 +1741,40 @@ function commentsWithBankruptcy(updates = {}) {
1723
1741
  )
1724
1742
  }
1725
1743
 
1726
- function contactInfo(updates = {}) {
1744
+ function contactInfoV2(updates = {}) {
1727
1745
  return step(
1728
1746
  "contactInfo",
1729
1747
  [
1730
1748
  contactStepHeadline(updates),
1731
1749
  contactStepSubHeadline(updates),
1732
1750
  trustedFormScript(),
1733
- email(updates.scope),
1734
- phone(updates.scope),
1735
- TCPAConsent(updates.scope),
1736
- secureIcon(),
1751
+ {
1752
+ $el: "div",
1753
+ attrs: {
1754
+ class: "t-flex t-flex-col t-justify-center t-items-center",
1755
+ },
1756
+ children: [
1757
+ emailFL(updates.scope, {
1758
+ outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
1759
+ innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
1760
+ }),
1761
+ phoneFL(updates.scope, {
1762
+ outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
1763
+ innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
1764
+ }),
1765
+ ],
1766
+ },
1767
+ TCPAConsent(updates.scope, {
1768
+ outerClass: "!t-flex !t-flex-col !t-justify-center !t-items-center",
1769
+ wrapperClass: "t-w-[95%] sm:t-w-[80%]",
1770
+ messagesClass: "t-w-[95%] sm:t-w-[80%]",
1771
+ }),
1737
1772
  ],
1738
1773
  { nextOnEnter: false }
1739
1774
  )
1740
1775
  }
1741
1776
 
1742
- function firstAndLastV3(updates = {}) {
1777
+ function firstAndLastV4(updates = {}) {
1743
1778
  return step(
1744
1779
  "firstAndLast",
1745
1780
  [
@@ -1747,12 +1782,13 @@ function firstAndLastV3(updates = {}) {
1747
1782
  headline: updates.headline ?? "Who is looking for help?",
1748
1783
  headlineClass: updates.headlineClass,
1749
1784
  }),
1750
- verticalStepSubHeadline({
1751
- subheadline: updates.subheadline ?? "We never share info without consent",
1752
- subheadlineClass: "!t-text-sm !t-text-gray-500",
1753
- }),
1754
- firstName(updates.scope),
1755
- lastName(updates.scope),
1785
+ {
1786
+ $el: "div",
1787
+ attrs: {
1788
+ class: "t-flex t-flex-col t-justify-center t-items-center t-pt-3",
1789
+ },
1790
+ children: [fullNameFLMobileCol(updates.scope)],
1791
+ },
1756
1792
  ],
1757
1793
  updates
1758
1794
  )
@@ -2124,13 +2160,17 @@ function wouldLikeLawyerTo(updates = {}) {
2124
2160
  )
2125
2161
  }
2126
2162
 
2127
- const formNavigation = (updates = {}) => ({
2163
+ const formNavigationNoFinalBack = (updates = {}) => ({
2128
2164
  $el: "div",
2129
2165
  attrs: {
2130
2166
  class: {
2131
2167
  if: "$activeStep === $firstStep()",
2132
2168
  then: "step-nav " + (updates.firstStepButtonClass || "!t-justify-center sm:!t-justify-between"),
2133
- else: "step-nav !t-justify-between",
2169
+ else: {
2170
+ if: "$activeStep === $lastStep()",
2171
+ then: "step-nav !t-justify-center ",
2172
+ else: "step-nav !t-justify-between",
2173
+ },
2134
2174
  },
2135
2175
  },
2136
2176
  children: [
@@ -2140,12 +2180,12 @@ const formNavigation = (updates = {}) => ({
2140
2180
  onClick: "$setPreviousStep($prevStepFunc($get(form)))",
2141
2181
  children: "Back",
2142
2182
  outerClass: {
2143
- if: "$activeStep === $firstStep()",
2183
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
2144
2184
  then: "t-hidden sm:t-block",
2145
2185
  else: "",
2146
2186
  },
2147
2187
  style: {
2148
- if: "$activeStep === $firstStep()",
2188
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
2149
2189
  then: "display: none;",
2150
2190
  },
2151
2191
  classes: {
@@ -2184,7 +2224,8 @@ const formNavigation = (updates = {}) => ({
2184
2224
  then: "display: none;",
2185
2225
  },
2186
2226
  classes: {
2187
- input: (updates.inputClass || "") + " !t-ml-2 sm:!t-ml-auto f-navigation-input",
2227
+ input: (updates.inputClass || "") + " f-navigation-input !t-w-60",
2228
+ outer: "!t-mt-0 !t-mb-0",
2188
2229
  },
2189
2230
  },
2190
2231
  ],
@@ -3260,6 +3301,27 @@ filterNextStepsMap(
3260
3301
  },
3261
3302
  });
3262
3303
 
3304
+ ({
3305
+ values: {
3306
+ Type_Of_Legal_Problem: {
3307
+ "Workplace Harassment": TOLPNextSteps["Workplace Harassment"],
3308
+ "Workplace Discrimination": TOLPNextSteps["Workplace Discrimination"],
3309
+ },
3310
+ "*": [...nextStepsLegalDefault],
3311
+ },
3312
+ });
3313
+
3314
+ ({
3315
+ values: {
3316
+ Type_Of_Legal_Problem: {
3317
+ "Probate and Estates": TOLPNextSteps["Probate and Estates"],
3318
+ "Wills and Trusts": TOLPNextSteps["Wills and Trusts"],
3319
+ "Wrongful Death": TOLPNextSteps["Wrongful Death"],
3320
+ },
3321
+ "*": [...nextStepsLegalDefault],
3322
+ },
3323
+ });
3324
+
3263
3325
  ({
3264
3326
  values: {
3265
3327
  Type_Of_Legal_Problem_Display: {
@@ -3349,7 +3411,6 @@ meta.data.dynamicSchema = [
3349
3411
  nextStepMap: nextStepsMapRealEstateTOLPDisplay,
3350
3412
  }),
3351
3413
  wouldLikeLawyerTo(),
3352
- zipcode(),
3353
3414
  commentsWithBankruptcy({
3354
3415
  label: null,
3355
3416
  headline: "Please briefly describe your situation:",
@@ -3368,7 +3429,7 @@ meta.data.dynamicSchema = [
3368
3429
  willsAndTrustsCrossSellQuestions(),
3369
3430
  divorceAndSeparationCrossSellQuestions(),
3370
3431
  childCustodyCrossSellQuestions(),
3371
- firstAndLastV3({
3432
+ firstAndLastV4({
3372
3433
  headlineClass: "!t-text-dark",
3373
3434
  }),
3374
3435
  ];
@@ -3403,8 +3464,17 @@ const schema = [
3403
3464
  nextStepMap: nextStepsMapCivilTolp,
3404
3465
  }),
3405
3466
  dynamicSchemaNode(),
3406
- contactInfo(),
3407
- formNavigation(),
3467
+ zipcode(),
3468
+ contactInfoV2({
3469
+ subheadlineClass: "!t-text-base",
3470
+ }),
3471
+ formNavigationNoFinalBack({
3472
+ startText: "Start Now",
3473
+ submitLabel: "Get Help Now",
3474
+ inputClass: "!t-font-extrabold",
3475
+ firstStepButtonClass: "!t-justify-center",
3476
+ }),
3477
+ secureIconStandalone(),
3408
3478
  formDetails(),
3409
3479
  ],
3410
3480
  },