bhl-forms 0.13.7 → 0.13.8

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.
@@ -2091,6 +2091,30 @@ const totalMonthlyIncome$1 = (scope, vertical, updates = {}) => {
2091
2091
  )
2092
2092
  };
2093
2093
 
2094
+ const TCPAConsent = (scope, updates = {}) => ({
2095
+ $formkit: "checkbox",
2096
+ label: "$meta.tcpaLanguage",
2097
+ // Necessary to get links to work in the tcpa language
2098
+ __raw__sectionsSchema: {
2099
+ label: { attrs: { innerHTML: "$label" } },
2100
+ },
2101
+ name: scope ? scope + ":" + "TCPA_Opt_In" : "TCPA_Opt_In",
2102
+ "data-tf-sensitive": "false",
2103
+ validation: "required|accepted",
2104
+ validationMessages: {
2105
+ required: "Consent is required",
2106
+ accepted: "Consent is required",
2107
+ },
2108
+ classes: {
2109
+ outer: updates.outerClass ? updates.outerClass : "",
2110
+ wrapper: updates.wrapperClass ? updates.wrapperClass : "",
2111
+ messages: updates.messagesClass ? updates.messagesClass : "",
2112
+ label:
2113
+ "!t-text-[0.7rem] t-text-slate-500 t-font-normal !t-leading-[0.9rem]" +
2114
+ (updates.labelClass ? " " + updates.labelClass : ""),
2115
+ },
2116
+ });
2117
+
2094
2118
  const typeOfAlcoholTest$1 = (scope, vertical, updates = {}) => {
2095
2119
  const func = vertical ? col2RadioCenter : sbsSelect;
2096
2120
  const label = vertical ? updates.label : "Type of Alcohol Test Performed?";
@@ -2526,26 +2550,6 @@ function secureIconStandalone(updates = {}) {
2526
2550
  }
2527
2551
  }
2528
2552
 
2529
- function tcpaLanguageStandalone(updates = {}) {
2530
- return {
2531
- if: "$activeStep === $lastStep()",
2532
- style: {
2533
- if: "$activeStep !== $lastStep()",
2534
- then: "display: none;",
2535
- },
2536
- children: [
2537
- {
2538
- $el: "div",
2539
- attrs: {
2540
- class:
2541
- "!t-text-[0.7rem] t-text-slate-500 t-font-normal !t-leading-tight !t-pt-0 !t-pb-3 !t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%] !t-mx-auto",
2542
- innerHTML: "$meta.tcpaLanguage",
2543
- },
2544
- },
2545
- ],
2546
- }
2547
- }
2548
-
2549
2553
  function crossSellQuestionsStepHeadline(updates) {
2550
2554
  return {
2551
2555
  $el: "h3",
@@ -2775,7 +2779,7 @@ function commentsWithBankruptcy(updates = {}) {
2775
2779
  )
2776
2780
  }
2777
2781
 
2778
- function contactInfoNoTCPA(updates = {}) {
2782
+ function contactInfoV2(updates = {}) {
2779
2783
  return step(
2780
2784
  "contactInfo",
2781
2785
  [
@@ -2798,6 +2802,11 @@ function contactInfoNoTCPA(updates = {}) {
2798
2802
  }),
2799
2803
  ],
2800
2804
  },
2805
+ TCPAConsent(updates.scope, {
2806
+ outerClass: "!t-flex !t-flex-col !t-justify-center !t-items-center",
2807
+ wrapperClass: "t-w-[95%] sm:t-w-[80%]",
2808
+ messagesClass: "t-w-[95%] sm:t-w-[80%]",
2809
+ }),
2801
2810
  ],
2802
2811
  { nextOnEnter: false }
2803
2812
  )
@@ -4037,17 +4046,12 @@ const hiddenInputsBase = [
4037
4046
  },
4038
4047
  ];
4039
4048
 
4040
- const hiddenInputsLegalTCPA = [
4049
+ const hiddenInputsLegal = [
4041
4050
  {
4042
4051
  $formkit: "hidden",
4043
4052
  name: "vertical",
4044
4053
  value: "Legal",
4045
4054
  },
4046
- {
4047
- $formkit: "hidden",
4048
- name: "TCPA_Opt_In",
4049
- value: true,
4050
- },
4051
4055
  {
4052
4056
  $formkit: "hidden",
4053
4057
  name: "TCPA_Language",
@@ -4931,7 +4935,7 @@ const nextStepsMapLegalCrossSells = {
4931
4935
 
4932
4936
  const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
4933
4937
 
4934
- const meta = defaultMetaPropsLegal(null, true);
4938
+ const meta = defaultMetaPropsLegal();
4935
4939
 
4936
4940
  meta.data.dynamicSchema = [
4937
4941
  amountPaymentsPastDue(),
@@ -5070,7 +5074,7 @@ const schema = [
5070
5074
  if: "$activeStep === $firstStep()",
5071
5075
  }),
5072
5076
  defaultSubHeadline(),
5073
- ...hiddenInputsLegalTCPA,
5077
+ ...hiddenInputsLegal,
5074
5078
  {
5075
5079
  $el: "div",
5076
5080
  attrs: {
@@ -5089,7 +5093,7 @@ const schema = [
5089
5093
  }),
5090
5094
  dynamicSchemaNode(),
5091
5095
  zipcode(),
5092
- contactInfoNoTCPA({
5096
+ contactInfoV2({
5093
5097
  subheadlineClass: "!t-text-base",
5094
5098
  }),
5095
5099
  formNavigationNoFinalBack({
@@ -5099,7 +5103,6 @@ const schema = [
5099
5103
  firstStepButtonClass: "!t-justify-center",
5100
5104
  lastStepButtonClass: "!t-justify-center !t-my-0 !t-py-0",
5101
5105
  }),
5102
- tcpaLanguageStandalone(),
5103
5106
  secureIconStandalone(),
5104
5107
  formDetails(),
5105
5108
  ],