bhl-forms 0.3.4 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/bhl-forms.es.js +58 -39
  2. package/dist/bhl-forms.iife.js +7 -7
  3. package/dist/bhl-forms.modern.es.js +68 -44
  4. package/dist/bhl-forms.modern.iife.js +9 -9
  5. package/dist/bhl-forms.modern.umd.js +9 -9
  6. package/dist/bhl-forms.umd.js +7 -7
  7. package/dist/forms/accidentsAndInjuries.es.js +19 -9
  8. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  9. package/dist/forms/accidentsAndInjuries.json +1 -1
  10. package/dist/forms/appraisals.es.js +14 -4
  11. package/dist/forms/appraisals.iife.js +1 -1
  12. package/dist/forms/appraisals.json +1 -1
  13. package/dist/forms/childAndFamily.es.js +19 -9
  14. package/dist/forms/childAndFamily.iife.js +1 -1
  15. package/dist/forms/childAndFamily.json +1 -1
  16. package/dist/forms/civilLawsuit.es.js +22 -10
  17. package/dist/forms/civilLawsuit.iife.js +1 -1
  18. package/dist/forms/civilLawsuit.json +1 -1
  19. package/dist/forms/coins.es.js +14 -4
  20. package/dist/forms/coins.iife.js +1 -1
  21. package/dist/forms/coins.json +1 -1
  22. package/dist/forms/contracts.es.js +19 -9
  23. package/dist/forms/contracts.iife.js +1 -1
  24. package/dist/forms/contracts.json +1 -1
  25. package/dist/forms/criminal.es.js +19 -9
  26. package/dist/forms/criminal.iife.js +1 -1
  27. package/dist/forms/criminal.json +1 -1
  28. package/dist/forms/employmentAndWorkplace.es.js +19 -9
  29. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  30. package/dist/forms/employmentAndWorkplace.json +1 -1
  31. package/dist/forms/generalLegal.es.js +247 -18
  32. package/dist/forms/generalLegal.iife.js +1 -1
  33. package/dist/forms/generalLegal.json +1 -1
  34. package/dist/forms/generalLegalPopUnder.es.js +22 -10
  35. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  36. package/dist/forms/generalLegalPopUnder.json +1 -1
  37. package/dist/forms/generalLegalPopUnderTF.es.js +19 -9
  38. package/dist/forms/generalLegalPopUnderTF.iife.js +1 -1
  39. package/dist/forms/generalLegalPopUnderTF.json +1 -1
  40. package/dist/forms/generalLegalThankYou.es.js +19 -9
  41. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  42. package/dist/forms/generalLegalThankYou.json +1 -1
  43. package/dist/forms/harassmentAndDiscrimination.es.js +19 -9
  44. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  45. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  46. package/dist/forms/malpractice.es.js +19 -9
  47. package/dist/forms/malpractice.iife.js +1 -1
  48. package/dist/forms/malpractice.json +1 -1
  49. package/dist/forms/mechanics.es.js +14 -4
  50. package/dist/forms/mechanics.iife.js +1 -1
  51. package/dist/forms/mechanics.json +1 -1
  52. package/dist/forms/realEstate.es.js +19 -9
  53. package/dist/forms/realEstate.iife.js +1 -1
  54. package/dist/forms/realEstate.json +1 -1
  55. package/dist/forms/repossession.es.js +19 -9
  56. package/dist/forms/repossession.iife.js +1 -1
  57. package/dist/forms/repossession.json +1 -1
  58. package/dist/forms/ssdi.es.js +19 -9
  59. package/dist/forms/ssdi.iife.js +1 -1
  60. package/dist/forms/ssdi.json +1 -1
  61. package/dist/forms/testForm.es.js +19 -9
  62. package/dist/forms/testForm.iife.js +1 -1
  63. package/dist/forms/testForm.json +1 -1
  64. package/dist/forms/testRedirects.es.js +14 -4
  65. package/dist/forms/testRedirects.iife.js +1 -1
  66. package/dist/forms/testRedirects.json +1 -1
  67. package/dist/forms/vets.es.js +14 -4
  68. package/dist/forms/vets.iife.js +1 -1
  69. package/dist/forms/vets.json +1 -1
  70. package/dist/forms/willsAndTrusts.es.js +19 -9
  71. package/dist/forms/willsAndTrusts.iife.js +1 -1
  72. package/dist/forms/willsAndTrusts.json +1 -1
  73. package/package.json +5 -5
@@ -1491,6 +1491,78 @@ const lawyerPaymentMethod = (scope) => sbsSelect({
1491
1491
  ]
1492
1492
  });
1493
1493
 
1494
+
1495
+ const legalCrossSells$1 = () => col2Checkbox({
1496
+ id: 'Legal_CrossSells',
1497
+ name: 'Legal_CrossSells',
1498
+ help: 'Note: just hit "Next" if none apply',
1499
+ helpClass: 't-text-center !t-text-sm',
1500
+ validation: null,
1501
+ options: {
1502
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Auto and Car Accidents"',
1503
+ then: {
1504
+ 'Long Term Disability': 'Interest in Disability Benefits',
1505
+ 'Wills and Trusts': 'Need a Will or Trust',
1506
+ 'Workers Compensation': 'Workplace Injury',
1507
+ 'Power of Attorney': 'Update Power of Attorney',
1508
+ 'Divorce and Separation': 'Need a Divorce or Separation',
1509
+ 'Child Custody': 'Need help with Child Custody',
1510
+ },
1511
+ else: {
1512
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Personal Injury" || $getVal($get(form), "Type_Of_Legal_Problem") === "Workers Compensation"',
1513
+ then: {
1514
+ 'DUI and DWI': 'Charged with a DUI/DWI',
1515
+ 'Wills and Trusts': 'Need a Will or Trust',
1516
+ 'Power of Attorney': 'Update Power of Attorney',
1517
+ 'Divorce and Separation': 'Need a Divorce or Separation',
1518
+ 'Child Custody': 'Need help with Child Custody',
1519
+ // TODO add one more?
1520
+ },
1521
+ else: {
1522
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") === "DUI and DWI"',
1523
+ then: {
1524
+ 'Personal Injury': 'Personal or Workplace Injury',
1525
+ 'Wills and Trusts': 'Need a Will or Trust',
1526
+ 'Long Term Disability': 'Interest in Disability Benefits',
1527
+ 'Power of Attorney': 'Update Power of Attorney',
1528
+ 'Divorce and Separation': 'Need a Divorce or Separation',
1529
+ 'Child Custody': 'Need help with Child Custody',
1530
+ },
1531
+ else: {
1532
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Wills and Trusts" || $getVal($get(form), "Type_Of_Legal_Problem") === "Probate and Estates" || $getVal($get(form), "Type_Of_Legal_Problem") === "Power of Attorney"',
1533
+ then: {
1534
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
1535
+ 'Personal Injury': 'Personal or Workplace Injury',
1536
+ 'DUI and DWI': 'Charged with a DUI/DWI',
1537
+ 'Long Term Disability': 'Interest in Disability Benefits',
1538
+ 'Divorce and Separation': 'Need a Divorce or Separation',
1539
+ 'Child Custody': 'Need help with Child Custody',
1540
+ },
1541
+ else: {
1542
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Long Term Disability" || $getVal($get(form), "Type_Of_Legal_Problem") === "Social Security Disability and Insurance"',
1543
+ then: {
1544
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
1545
+ 'DUI and DWI': 'Charged with a DUI/DWI',
1546
+ 'Wills and Trusts': 'Need a Will or Trust',
1547
+ 'Power of Attorney': 'Update Power of Attorney',
1548
+ 'Divorce and Separation': 'Need a Divorce or Separation',
1549
+ 'Child Custody': 'Need help with Child Custody',
1550
+ },
1551
+ else: {
1552
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
1553
+ 'Personal Injury': 'Personal or Workplace Injury',
1554
+ 'DUI and DWI': 'Charged with a DUI/DWI',
1555
+ 'Wills and Trusts': 'Need a Will or Trust',
1556
+ 'Power of Attorney': 'Update Power of Attorney',
1557
+ 'Long Term Disability': 'Interest in Disability Benefits',
1558
+ }
1559
+ }
1560
+ }
1561
+ }
1562
+ }
1563
+ }
1564
+ });
1565
+
1494
1566
  const loanAmount = () => sbsSelect({
1495
1567
  label: 'Total Amount of Loan?',
1496
1568
  name: 'Loan_Amount',
@@ -2658,14 +2730,17 @@ const findLastInput = (n) => {
2658
2730
  return null
2659
2731
  };
2660
2732
 
2661
- const stepDefaults = (step) => ({
2662
- $el: 'section',
2663
- attrs: {
2664
- hidden: '$activeStep !== "' + step + '"'
2733
+ function questionsStepHeadline(updates) {
2734
+ return {
2735
+ $el: 'h3',
2736
+ children: updates.headline || 'Tell Us About Your Situation',
2737
+ attrs: {
2738
+ 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'
2739
+ }
2665
2740
  }
2666
- });
2741
+ }
2667
2742
 
2668
- function questionsStepHeadline(updates) {
2743
+ function crossSellQuestionsStepHeadline(updates) {
2669
2744
  return {
2670
2745
  $el: 'h3',
2671
2746
  children: updates.headline || 'Tell Us About Your Situation',
@@ -2675,6 +2750,16 @@ function questionsStepHeadline(updates) {
2675
2750
  }
2676
2751
  }
2677
2752
 
2753
+ function crossSellQuestionsStepSubHeadline(updates) {
2754
+ return {
2755
+ $el: 'h5',
2756
+ children: updates.subheadline || 'Tell us about your situation:',
2757
+ attrs: {
2758
+ class: 't-flex t-justify-center t-text-dark t-text-center !t-text-lg t-font-semibold t-pb-4 t-pt-0 t-px-3'
2759
+ }
2760
+ }
2761
+ }
2762
+
2678
2763
 
2679
2764
  function commentsStepHeadline(updates) {
2680
2765
  return {
@@ -2696,6 +2781,16 @@ function firstAndLastStepHeadline(updates) {
2696
2781
  }
2697
2782
  }
2698
2783
 
2784
+ function legalCrossSellsStepHeadline(updates) {
2785
+ return {
2786
+ $el: 'h3',
2787
+ children: updates.headline || 'Do any of the following situations apply?',
2788
+ attrs: {
2789
+ class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
2790
+ }
2791
+ }
2792
+ }
2793
+
2699
2794
  function contactStepHeadline(updates) {
2700
2795
  return {
2701
2796
  $el: 'h3',
@@ -2742,7 +2837,16 @@ function trustedFormScript() {
2742
2837
  }
2743
2838
  }
2744
2839
 
2745
- function step(name, inputs, nextOnEnter = true, nextOnInput = false) {
2840
+ const stepDefaults = (step, stepKey) => ({
2841
+ $el: 'section',
2842
+ if: '$stepEnabled("' + step + '")',
2843
+ attrs: {
2844
+ hidden: '$activeStep !== "' + step + '"',
2845
+ key: stepKey ? stepKey : step
2846
+ }
2847
+ });
2848
+
2849
+ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined) {
2746
2850
  if (typeof nextOnEnter === 'undefined') {
2747
2851
  nextOnEnter = true;
2748
2852
  }
@@ -2757,7 +2861,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false) {
2757
2861
  }
2758
2862
 
2759
2863
  return merge(
2760
- stepDefaults(name),
2864
+ stepDefaults(name, stepKey),
2761
2865
  {
2762
2866
  children: [
2763
2867
  {
@@ -2906,6 +3010,123 @@ function generalLegalTOLPQuestions(updates = {}) {
2906
3010
  )
2907
3011
  }
2908
3012
 
3013
+
3014
+ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
3015
+ return step(
3016
+ 'autoAndCarAccidentCrossSellQuestions',
3017
+ [
3018
+ crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
3019
+ crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your accident:' }),
3020
+ AutoAndCarAccidentsQuestions("true", 'CrossSell:Auto_and_Car_Accidents'),
3021
+ ],
3022
+ updates.nextOnEnter
3023
+ )
3024
+ }
3025
+
3026
+ function childCustodyCrossSellQuestions(updates = {}) {
3027
+ return step(
3028
+ 'childCustodyCrossSellQuestions',
3029
+ [
3030
+ crossSellQuestionsStepHeadline({ headline: 'Child Custody Information' }),
3031
+ ChildCustodyQuestions("true", 'CrossSell:Child_Custody'),
3032
+ ],
3033
+ updates.nextOnEnter
3034
+ )
3035
+ }
3036
+
3037
+ function divorceAndSeparationCrossSellQuestions(updates = {}) {
3038
+ return step(
3039
+ 'divorceAndSeparationCrossSellQuestions',
3040
+ [
3041
+ crossSellQuestionsStepHeadline({ headline: 'Divorce or Separation Information' }),
3042
+ DivorceQuestions("true", 'CrossSell:Divorce_and_Separation'),
3043
+ ],
3044
+ updates.nextOnEnter
3045
+ )
3046
+ }
3047
+
3048
+ function duiAndDWICrossSellQuestions(updates = {}) {
3049
+ return step(
3050
+ 'duiAndDWICrossSellQuestions',
3051
+ [
3052
+ crossSellQuestionsStepHeadline({ headline: 'About Your DUI/DWI' }),
3053
+ DUIAndDWIQuestions("true", 'CrossSell:DUI_and_DWI'),
3054
+ ],
3055
+ updates.nextOnEnter
3056
+ )
3057
+ }
3058
+
3059
+ function longTermDisabilityCrossSellQuestions(updates = {}) {
3060
+ return step(
3061
+ 'longTermDisabilityCrossSellQuestions',
3062
+ [
3063
+ crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
3064
+ crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your disability:' }),
3065
+ LongTermDisabilityQuestions("true", 'CrossSell:Long_Term_Disability'),
3066
+ ],
3067
+ updates.nextOnEnter
3068
+ )
3069
+ }
3070
+
3071
+ function personalInjuryCrossSellQuestions(updates = {}) {
3072
+ return step(
3073
+ 'personalInjuryCrossSellQuestions',
3074
+ [
3075
+ crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
3076
+ crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
3077
+ PersonalInjuryQuestions("true", 'CrossSell:Personal_Injury'),
3078
+ ],
3079
+ updates.nextOnEnter
3080
+ )
3081
+ }
3082
+
3083
+ function powerOfAttorneyCrossSellQuestions(updates = {}) {
3084
+ return step(
3085
+ 'powerOfAttorneyCrossSellQuestions',
3086
+ [
3087
+ crossSellQuestionsStepHeadline({ headline: 'Power of Attorney Information' }),
3088
+ PowerofAttorneyQuestions("true", 'CrossSell:Power_of_Attorney'),
3089
+ ],
3090
+ updates.nextOnEnter
3091
+ )
3092
+ }
3093
+
3094
+ function willsAndTrustsCrossSellQuestions(updates = {}) {
3095
+ return step(
3096
+ 'willsAndTrustsCrossSellQuestions',
3097
+ [
3098
+ crossSellQuestionsStepHeadline({ headline: 'Will or Trust Information' }),
3099
+ WillsAndTrustsQuestions("true", 'CrossSell:Wills_and_Trusts'),
3100
+ ],
3101
+ updates.nextOnEnter
3102
+ )
3103
+ }
3104
+
3105
+ function workersCompensationCrossSellQuestions(updates = {}) {
3106
+ return step(
3107
+ 'workersCompensationCrossSellQuestions',
3108
+ [
3109
+ crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
3110
+ crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
3111
+ WorkersCompensationQuestions("true", 'CrossSell:Workers_Compensation'),
3112
+ ],
3113
+ updates.nextOnEnter
3114
+ )
3115
+ }
3116
+
3117
+ function legalCrossSells(updates = {}) {
3118
+ return step(
3119
+ 'legalCrossSells',
3120
+ [
3121
+ legalCrossSellsStepHeadline(updates),
3122
+ legalCrossSells$1(),
3123
+ ],
3124
+ updates.nextOnEnter,
3125
+ false,
3126
+ '$get(Type_Of_Legal_Problem).value'
3127
+ )
3128
+ }
3129
+
2909
3130
  const formNavigationV2 = () => ({
2910
3131
  $el: 'div',
2911
3132
  attrs: {
@@ -2989,6 +3210,14 @@ const formDetails = () => ({
2989
3210
  class: 't-text-xs',
2990
3211
  style: 'overflow: scroll'
2991
3212
  }
3213
+ },
3214
+ {
3215
+ $el: 'pre',
3216
+ children: ['steps: ', '$stepKeys()'],
3217
+ attrs: {
3218
+ class: 't-text-xs',
3219
+ style: 'overflow: scroll'
3220
+ }
2992
3221
  }
2993
3222
  ]
2994
3223
  });
@@ -3021,16 +3250,16 @@ const schema = [
3021
3250
  commentsWithBankruptcyV2({
3022
3251
  nextOnEnter: false
3023
3252
  }),
3024
- // steps.legalCrossSells(),
3025
- // steps.autoAndCarAccidentCrossSellQuestions(),
3026
- // steps.personalInjuryCrossSellQuestions(),
3027
- // steps.workersCompensationCrossSellQuestions(),
3028
- // steps.duiAndDWICrossSellQuestions(),
3029
- // steps.longTermDisabilityCrossSellQuestions(),
3030
- // steps.powerOfAttorneyCrossSellQuestions(),
3031
- // steps.willsAndTrustsCrossSellQuestions(),
3032
- // steps.divorceAndSeparationCrossSellQuestions(),
3033
- // steps.childCustodyCrossSellQuestions(),
3253
+ legalCrossSells(),
3254
+ autoAndCarAccidentCrossSellQuestions(),
3255
+ personalInjuryCrossSellQuestions(),
3256
+ workersCompensationCrossSellQuestions(),
3257
+ duiAndDWICrossSellQuestions(),
3258
+ longTermDisabilityCrossSellQuestions(),
3259
+ powerOfAttorneyCrossSellQuestions(),
3260
+ willsAndTrustsCrossSellQuestions(),
3261
+ divorceAndSeparationCrossSellQuestions(),
3262
+ childCustodyCrossSellQuestions(),
3034
3263
  firstAndLastV2(),
3035
3264
  contactInfoV2({
3036
3265
  nextOnEnter: false