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
@@ -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,59 +364,72 @@ 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
  };
@@ -1129,6 +1139,24 @@ function secureIcon(updates = {}) {
1129
1139
  return merge(secureIconDefault, updates)
1130
1140
  }
1131
1141
 
1142
+ function secureIconStandalone(updates = {}) {
1143
+ return {
1144
+ if: "$activeStep === $lastStep()",
1145
+ style: {
1146
+ if: "$activeStep !== $lastStep()",
1147
+ then: "display: none;",
1148
+ },
1149
+ children: [
1150
+ secureIcon({
1151
+ attrs: {
1152
+ class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500 t-pb-6 sm:t-pb-8",
1153
+ },
1154
+ ...updates,
1155
+ }),
1156
+ ],
1157
+ }
1158
+ }
1159
+
1132
1160
  function crossSellQuestionsStepHeadline(updates) {
1133
1161
  return {
1134
1162
  $el: "h3",
@@ -1162,19 +1190,6 @@ function verticalStepHeadline(updates) {
1162
1190
  }
1163
1191
  }
1164
1192
 
1165
- function verticalStepSubHeadline(updates) {
1166
- return {
1167
- $el: "h5",
1168
- children: updates.subheadline || "",
1169
- attrs: {
1170
- class:
1171
- "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" +
1172
- " " +
1173
- (updates.subheadlineClass || ""),
1174
- },
1175
- }
1176
- }
1177
-
1178
1193
  function commentsStepHeadline(updates) {
1179
1194
  return {
1180
1195
  $el: "h3",
@@ -1344,6 +1359,7 @@ function commentsWithBankruptcy(updates = {}) {
1344
1359
  comments(updates.scope, false, {
1345
1360
  label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1346
1361
  placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1362
+ // TODO: this is a mess
1347
1363
  inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
1348
1364
  }),
1349
1365
  // TODO: needs scope support
@@ -1364,23 +1380,40 @@ function commentsWithBankruptcy(updates = {}) {
1364
1380
  )
1365
1381
  }
1366
1382
 
1367
- function contactInfo(updates = {}) {
1383
+ function contactInfoV2(updates = {}) {
1368
1384
  return step(
1369
1385
  "contactInfo",
1370
1386
  [
1371
1387
  contactStepHeadline(updates),
1372
1388
  contactStepSubHeadline(updates),
1373
1389
  trustedFormScript(),
1374
- email(updates.scope),
1375
- phone(updates.scope),
1376
- TCPAConsent(updates.scope),
1377
- secureIcon(),
1390
+ {
1391
+ $el: "div",
1392
+ attrs: {
1393
+ class: "t-flex t-flex-col t-justify-center t-items-center",
1394
+ },
1395
+ children: [
1396
+ emailFL(updates.scope, {
1397
+ outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
1398
+ innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
1399
+ }),
1400
+ phoneFL(updates.scope, {
1401
+ outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
1402
+ innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
1403
+ }),
1404
+ ],
1405
+ },
1406
+ TCPAConsent(updates.scope, {
1407
+ outerClass: "!t-flex !t-flex-col !t-justify-center !t-items-center",
1408
+ wrapperClass: "t-w-[95%] sm:t-w-[80%]",
1409
+ messagesClass: "t-w-[95%] sm:t-w-[80%]",
1410
+ }),
1378
1411
  ],
1379
1412
  { nextOnEnter: false }
1380
1413
  )
1381
1414
  }
1382
1415
 
1383
- function firstAndLastV3(updates = {}) {
1416
+ function firstAndLastV4(updates = {}) {
1384
1417
  return step(
1385
1418
  "firstAndLast",
1386
1419
  [
@@ -1388,12 +1421,13 @@ function firstAndLastV3(updates = {}) {
1388
1421
  headline: updates.headline ?? "Who is looking for help?",
1389
1422
  headlineClass: updates.headlineClass,
1390
1423
  }),
1391
- verticalStepSubHeadline({
1392
- subheadline: updates.subheadline ?? "We never share info without consent",
1393
- subheadlineClass: "!t-text-sm !t-text-gray-500",
1394
- }),
1395
- firstName(updates.scope),
1396
- lastName(updates.scope),
1424
+ {
1425
+ $el: "div",
1426
+ attrs: {
1427
+ class: "t-flex t-flex-col t-justify-center t-items-center t-pt-3",
1428
+ },
1429
+ children: [fullNameFLMobileCol(updates.scope)],
1430
+ },
1397
1431
  ],
1398
1432
  updates
1399
1433
  )
@@ -1593,13 +1627,17 @@ function lawyerPaymentMethod(updates = {}) {
1593
1627
  )
1594
1628
  }
1595
1629
 
1596
- const formNavigation = (updates = {}) => ({
1630
+ const formNavigationNoFinalBack = (updates = {}) => ({
1597
1631
  $el: "div",
1598
1632
  attrs: {
1599
1633
  class: {
1600
1634
  if: "$activeStep === $firstStep()",
1601
1635
  then: "step-nav " + (updates.firstStepButtonClass || "!t-justify-center sm:!t-justify-between"),
1602
- else: "step-nav !t-justify-between",
1636
+ else: {
1637
+ if: "$activeStep === $lastStep()",
1638
+ then: "step-nav !t-justify-center ",
1639
+ else: "step-nav !t-justify-between",
1640
+ },
1603
1641
  },
1604
1642
  },
1605
1643
  children: [
@@ -1609,12 +1647,12 @@ const formNavigation = (updates = {}) => ({
1609
1647
  onClick: "$setPreviousStep($prevStepFunc($get(form)))",
1610
1648
  children: "Back",
1611
1649
  outerClass: {
1612
- if: "$activeStep === $firstStep()",
1650
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
1613
1651
  then: "t-hidden sm:t-block",
1614
1652
  else: "",
1615
1653
  },
1616
1654
  style: {
1617
- if: "$activeStep === $firstStep()",
1655
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
1618
1656
  then: "display: none;",
1619
1657
  },
1620
1658
  classes: {
@@ -1653,7 +1691,8 @@ const formNavigation = (updates = {}) => ({
1653
1691
  then: "display: none;",
1654
1692
  },
1655
1693
  classes: {
1656
- input: (updates.inputClass || "") + " !t-ml-2 sm:!t-ml-auto f-navigation-input",
1694
+ input: (updates.inputClass || "") + " f-navigation-input !t-w-60",
1695
+ outer: "!t-mt-0 !t-mb-0",
1657
1696
  },
1658
1697
  },
1659
1698
  ],
@@ -2487,6 +2526,27 @@ filterNextStepsMap(
2487
2526
  },
2488
2527
  });
2489
2528
 
2529
+ ({
2530
+ values: {
2531
+ Type_Of_Legal_Problem: {
2532
+ "Workplace Harassment": TOLPNextSteps["Workplace Harassment"],
2533
+ "Workplace Discrimination": TOLPNextSteps["Workplace Discrimination"],
2534
+ },
2535
+ "*": [...nextStepsLegalDefault],
2536
+ },
2537
+ });
2538
+
2539
+ ({
2540
+ values: {
2541
+ Type_Of_Legal_Problem: {
2542
+ "Probate and Estates": TOLPNextSteps["Probate and Estates"],
2543
+ "Wills and Trusts": TOLPNextSteps["Wills and Trusts"],
2544
+ "Wrongful Death": TOLPNextSteps["Wrongful Death"],
2545
+ },
2546
+ "*": [...nextStepsLegalDefault],
2547
+ },
2548
+ });
2549
+
2490
2550
  ({
2491
2551
  values: {
2492
2552
  Type_Of_Legal_Problem_Display: {
@@ -2547,7 +2607,6 @@ const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
2547
2607
  const meta = defaultMetaPropsLegal();
2548
2608
 
2549
2609
  meta.data.dynamicSchema = [
2550
- zipcode(),
2551
2610
  maritalStatus(),
2552
2611
  haveChildren(),
2553
2612
  childRelationship(),
@@ -2558,11 +2617,11 @@ meta.data.dynamicSchema = [
2558
2617
  lawyerPaymentMethod(),
2559
2618
  commentsWithBankruptcy({
2560
2619
  label: null,
2561
- headline: 'Please briefly describe your situation:',
2562
- headlineClass: '!t-text-dark',
2620
+ headline: "Please briefly describe your situation:",
2621
+ headlineClass: "!t-text-dark",
2563
2622
  }),
2564
2623
  legalCrossSells({
2565
- headlineClass: '!t-text-dark',
2624
+ headlineClass: "!t-text-dark",
2566
2625
  nextStepMap: nextStepsMapLegalCrossSells,
2567
2626
  }),
2568
2627
  // Note: this is purposefully limited to a subset of values
@@ -2574,8 +2633,8 @@ meta.data.dynamicSchema = [
2574
2633
  ssdiCrossSellQuestions(),
2575
2634
  powerOfAttorneyCrossSellQuestions(),
2576
2635
  willsAndTrustsCrossSellQuestions(),
2577
- firstAndLastV3({
2578
- headlineClass: '!t-text-dark'
2636
+ firstAndLastV4({
2637
+ headlineClass: "!t-text-dark",
2579
2638
  }),
2580
2639
  ];
2581
2640
 
@@ -2583,40 +2642,49 @@ const schema = [
2583
2642
  meta,
2584
2643
  formAnchor(),
2585
2644
  {
2586
- $cmp: 'FormKit',
2645
+ $cmp: "FormKit",
2587
2646
  props: formProps({
2588
- formId: 'childAndFamilySingle',
2647
+ formId: "childAndFamilySingle",
2589
2648
  redirectMap: legalRedirectMap(),
2590
- crossSellOptionMap: legalCrossSellOptionMap
2649
+ crossSellOptionMap: legalCrossSellOptionMap,
2591
2650
  }),
2592
2651
  children: [
2593
2652
  progressBar(),
2594
2653
  headline({
2595
2654
  children: '$urlParam("hl", "Get Child & Family Help Today")',
2596
- if: '$activeStep === $firstStep()',
2655
+ if: "$activeStep === $firstStep()",
2597
2656
  }),
2598
2657
  subHeadline({
2599
2658
  children: '$urlParam("shl", "Select a Category to Start!")',
2600
- if: '$activeStep === $firstStep()',
2659
+ if: "$activeStep === $firstStep()",
2601
2660
  }),
2602
2661
  ...hiddenInputsLegal,
2603
2662
  {
2604
- $el: 'div',
2663
+ $el: "div",
2605
2664
  attrs: {
2606
- class: 'form-body'
2665
+ class: "form-body",
2607
2666
  },
2608
2667
  children: [
2609
2668
  childAndFamilyTOLP({
2610
- nextStepMap: nextStepsMapChildAndFamily
2669
+ nextStepMap: nextStepsMapChildAndFamily,
2611
2670
  }),
2612
2671
  dynamicSchemaNode(),
2613
- contactInfo(),
2614
- formNavigation(),
2615
- formDetails()
2616
- ]
2617
- }
2618
- ]
2619
- }
2672
+ zipcode(),
2673
+ contactInfoV2({
2674
+ subheadlineClass: "!t-text-base",
2675
+ }),
2676
+ formNavigationNoFinalBack({
2677
+ startText: "Start Now",
2678
+ submitLabel: "Get Help Now",
2679
+ inputClass: "!t-font-extrabold",
2680
+ firstStepButtonClass: "!t-justify-center",
2681
+ }),
2682
+ secureIconStandalone(),
2683
+ formDetails(),
2684
+ ],
2685
+ },
2686
+ ],
2687
+ },
2620
2688
  ];
2621
2689
 
2622
2690
  export { schema as default };