bhl-forms 0.9.4 → 0.9.5

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.
@@ -1,4 +1,3 @@
1
- const DEFAULT_COMMENTS_LABEL = "Please briefly describe your issue in a few words:";
2
1
  const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC =
3
2
  '$getKey($meta, "commentsPlaceholders." + $get(Category).value, $meta.defaultCommentsPlaceholder)';
4
3
  const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL =
@@ -53,26 +52,6 @@ const verticalText = (updates) => {
53
52
  return text(updates)
54
53
  };
55
54
 
56
- const textArea = (updates) => {
57
- if (updates.name && !updates.id) {
58
- updates.id = updates.name;
59
- }
60
- return merge(
61
- {
62
- $formkit: "textarea",
63
- rows: 5,
64
- maxlength: 500,
65
- validation: "required",
66
- validationMessages: {
67
- required: "Field is required",
68
- },
69
- innerClass: "t-max-w-xl",
70
- labelClass: "required",
71
- },
72
- updates
73
- )
74
- };
75
-
76
55
  const firstName = (scope, vertical, updates = {}) => {
77
56
  const func = vertical ? verticalText : sbsText;
78
57
  const label = vertical ? updates.label : "First Name:";
@@ -147,20 +126,6 @@ const zipcode = (scope, vertical, updates = {}) => {
147
126
  })
148
127
  };
149
128
 
150
- // TODO: vertical not supported yet
151
- const comments = (scope, vertical, updates) =>
152
- textArea(
153
- merge(
154
- {
155
- name: scope ? scope + ":" + "Comments" : "Comments",
156
- label: "Please briefly describe your situation in a few words:",
157
- placeholder:
158
- 'For Example: "I would like help with child support payments" or "I need help with visitation rights"',
159
- },
160
- updates
161
- )
162
- );
163
-
164
129
  const TCPAConsent = (scope) => ({
165
130
  $formkit: "checkbox",
166
131
  label: "$meta.tcpaLanguage",
@@ -254,19 +219,6 @@ function verticalStepSubHeadline(updates) {
254
219
  }
255
220
  }
256
221
 
257
- function commentsStepHeadline(updates) {
258
- return {
259
- $el: "h3",
260
- children: updates.headline || "Additional Details",
261
- attrs: {
262
- class:
263
- "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" +
264
- " " +
265
- (updates.headlineClass || ""),
266
- },
267
- }
268
- }
269
-
270
222
  function firstAndLastStepHeadline(updates) {
271
223
  return {
272
224
  $el: "h3",
@@ -376,23 +328,6 @@ function step(name, inputs, updates = {}) {
376
328
  })
377
329
  }
378
330
 
379
- function commentsHeadline(updates = {}) {
380
- const mergedUpdates = { ...updates, nextOnEnter: false };
381
-
382
- return step(
383
- "comments",
384
- [
385
- commentsStepHeadline(updates),
386
- comments(updates.scope, false, {
387
- label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL : updates.label,
388
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
389
- inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
390
- }),
391
- ],
392
- mergedUpdates
393
- )
394
- }
395
-
396
331
  function contactInfoNoEmail(updates = {}) {
397
332
  return step(
398
333
  "contactInfo",
@@ -953,18 +888,18 @@ const HomeImprovementFinalSubHeadlines = {
953
888
  const nextStepsMapApplianceRepairMinimal = {
954
889
  values: {
955
890
  // Custom because we ask zip on s1
956
- "*": ["comments", "firstAndLast", "contactInfo"],
891
+ "*": ["firstAndLast", "contactInfo"],
957
892
  },
958
893
  };
959
894
 
960
895
  const meta = defaultMetaPropsHomeImprovement();
961
896
 
962
897
  meta.data.dynamicSchema = [
963
- commentsHeadline({
964
- label: null,
965
- headline: "Please describe your appliance issue:",
966
- headlineClass: "!t-text-dark",
967
- }),
898
+ // steps.commentsHeadline({
899
+ // label: null,
900
+ // headline: "Please describe your appliance issue:",
901
+ // headlineClass: "!t-text-dark",
902
+ // }),
968
903
  firstAndLastV3({
969
904
  headline: "Who needs appliance help?",
970
905
  headlineClass: "!t-text-dark",
@@ -1 +1 @@
1
- var applianceRepairMinimal=function(){"use strict";const e='$getKey($meta, "commentsPlaceholders." + $get(Category).value, $meta.defaultCommentsPlaceholder)',t='$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)',a='$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)',n=e;function i(){return Object.assign({},...arguments)}const l=e=>(e.name&&!e.id&&(e.id=e.name),i({$formkit:"text",validation:"required",validationMessages:{required:"Field is required"},labelClass:"required"},e)),r=e=>(e.wrapperClass="side-by-side t-items-center",l(e)),s=e=>(e.wrapperClass="t-flex t-justify-center",e.messagesClass="t-flex t-justify-center",e.inputClass="t-text-center",e.helpClass="t-mt-2.5 !t-text-sm t-text-center",l(e)),o=(e,t,a={})=>(t?s:r)({label:t?a.label:"First Name:",placeholder:"First",name:e?e+":First_Name":"First_Name",autocomplete:"given-name",validationMessages:{required:"First Name is required"},...a}),d=(e,t,a={})=>(t?s:r)({label:t?a.label:"Last Name:",placeholder:"Last",name:e?e+":Last_Name":"Last_Name",autocomplete:"family-name",validationMessages:{required:"Last Name is required"},...a}),c=(e,t,a={})=>(t?s:r)({$formkit:"tel",name:e?e+":Primary_Phone":"Primary_Phone",label:t?a.label:"Phone Number:",placeholder:"###-###-####",maxlength:12,help:"10-digit phone number, hyphens optional",autocomplete:"tel-national","data-tf-sensitive":"false",validation:"required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone",validationMessages:{required:"Phone Number is required",matches:"Invalid Phone Format, use ###-###-####",valid_phone:"Invalid Phone Number"},helpClass:"t-mt-2.5 md:t-text-right md:t-mt-[-2px]",...a}),m=(e,t,a={})=>(t?s:r)({label:t?a.label:"Zip Code:",help:t?a.help??"We try to match you with local help":null,placeholder:"#####",name:e?e+":Zip":"Zip",maxlength:5,inputmode:"numeric",autocomplete:"postal-code",validation:"required|matches:/^[0-9]{5}$/",validationMessages:{required:"Zip Code is required",matches:"Invalid Zip Code"},...a}),p=(e,t,a)=>(e=>(e.name&&!e.id&&(e.id=e.name),i({$formkit:"textarea",rows:5,maxlength:500,validation:"required",validationMessages:{required:"Field is required"},innerClass:"t-max-w-xl",labelClass:"required"},e)))(i({name:e?e+":Comments":"Comments",label:"Please briefly describe your situation in a few words:",placeholder:'For Example: "I would like help with child support payments" or "I need help with visitation rights"'},a)),u="$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))",f="$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))",h=e=>"group"!==e.type&&"section"!==e.type&&"form"!==e.type&&"hidden"!==e.$formkit&&!e.children,x=e=>{if(h(e))return e;for(var t=e.children.length-1;t>=0;t--){if("string"==typeof e.children)continue;const a=e.children[t];if(h(a))return a;const n=x(a);if(n)return n}return null},y={$el:"div",if:"$activeStep === $lastStep()",attrs:{class:"t-flex t-justify-center t-items-center t-text-sm t-text-gray-500"},children:[{$el:"img",attrs:{loading:"lazy",alt:"",style:{border:0},width:"25",height:"25",src:"https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg"}},{$el:"span",children:"Secure & Encrypted",attrs:{class:"t-pl-2 t-pt-1 t-font-medium"}}]};function g(e){return i(y,e)}function b(e){return{$el:"h5",children:e.subheadline||"",attrs:{class:"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 "+(e.subheadlineClass||"")}}}function $(e){return{$el:"h3",children:e.headline||"Additional Details",attrs:{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 "+(e.headlineClass||"")}}}function v(e){return{$el:"h3",children:e.headline||"Please Provide a Contact Name",attrs:{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 "+(e.headlineClass||"")}}}function w(e){return{$el:"h3",children:e.headline||t,attrs:{class:"t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1 "+(e.headlineClass||"")+" f-contact-info-headline"}}}function I(e){return{$el:"h5",children:e.subheadline||a,attrs:{class:"t-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3 "+(e.subheadlineClass||"")+" f-contact-info-subheadline"}}}const E="(function() {\n if (window.xxTrustedFormLoaded) {\n return\n }\n var vid = '';\n if (typeof window.zar !== 'undefined') {\n vid = window.zar.getVID();\n }\n window.xxTrustedFormLoaded = true;\n var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'\n var tf = document.createElement('script');\n tf.type = 'text/javascript'; tf.async = true;\n tf.src = (\"https:\" == document.location.protocol ? 'https' : 'http') + \"://api.trustedform.com/trustedform.js?field=xxTrustedFormCertUrl&identifier=\" + vid + \"&ping_field=xxTrustedFormPingUrl&provideReferrer=false&invert_field_sensitivity=true&sandbox=\" + sandbox + \"&l=\" + new Date().getTime() + Math.random();\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);\n})();";const C=(e,t)=>({$el:"section",if:'$stepEnabled("'+e+'")',attrs:{hidden:'$activeStep !== "'+e+'"',key:t||e}});function S(e,t,a={}){const{nextOnEnter:n=!0,nextOnInput:l=!1,stepKey:r,nextStepMap:s,triggerRedirectMap:o,autoFocus:d}=a;if(t&&t.length&&(n||l)){const e=x(t[t.length-1]);e&&!0===n&&(e.onKeypress=u),e&&!0===l&&(e.onInput=f)}return i(C(e,r),{children:[{$formkit:"group",id:e,name:e,nextStepMap:s,triggerRedirectMap:o,autoFocus:d,children:t}]})}const k={type:"form",id:"form",config:{validationVisibility:"submit"},onSubmit:'$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',plugins:"$plugins",actions:!1,anchorElement:"form-anchor",useLocalStorage:!0,prepop:{fromURL:!0},errorCodes:{403:{message:"An Error Occurred",abort:!1},409:{abort:!1},429:"An Error Occurred",504:{message:"An Error Occurred",abort:!1}},formClass:"!t-max-w-[40rem]"};function P(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>t.includes(e))))}const _={};const F={$el:"div",children:[{$el:"div",attrs:{id:"form-anchor",class:"t-absolute",style:{top:"-30px",left:0}}}],attrs:{class:"t-relative"}};const H={$el:"div",attrs:{class:"t-mt-7 t-mb-5 t-w-full t-flex t-flex-col t-justify-center t-items-center",style:{if:"$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",then:"display: none"}},children:[{$el:"div",attrs:{class:"t-flex t-justify-center"},children:[{$el:"span",attrs:{id:"progress-bar-text",class:"t-text-sm t-mb-1"},children:["0% Complete"]}]},{$el:"div",attrs:{class:"t-bg-gray-100 t-w-9/12 t-rounded"},children:[{$el:"div",attrs:{id:"progress-bar",class:"t-flex t-flex-col t-justify-center t-text-center t-whitespace-nowrap t-w-[10%] t-h-1.5 t-rounded t-text-white t-bg-[#007bff]",style:{transition:"width 0.5s ease"}}}]}]};const q=[{$formkit:"hidden",name:"vertical",value:"HomeImprovement"},{$formkit:"hidden",name:"TCPA_Language",value:"$meta.tcpaLanguage"},{$formkit:"hidden",name:"gclid",value:null},{$formkit:"hidden",name:"campaignid",value:null},{$formkit:"hidden",name:"s",value:null}],j={Additions:'Example: "I would like to add a sunroom to my home"',Appliances:'Example: "I need to repair a dishwasher"',Appraisals:'Example: "I need to get my home appraised"',Cabinets:'Example: "I want to install new kitchen cabinets"',Carpentry:'Example: "I need someone to build custom shelves"',Carpets:'Example: "I want to replace the carpets in my living room"',Cleaning:'Example: "I need a professional cleaning service for my home"',Countertops:'Example: "I want to install granite countertops in my kitchen"',"Decks and Porches":'Example: "I want to build a new deck in my backyard"',Demolition:'Example: "I need to demolish a wall in my home"',Doors:'Example: "I want to replace the front door of my house"',Driveways:'Example: "I need to repair my driveway"',"Drywall and Plaster":'Example: "I need to repair a hole in my drywall"',Electrical:'Example: "I need an electrician to install new light fixtures"',Fencing:'Example: "I want to install a privacy fence in my backyard"',Flooring:'Example: "I want to install hardwood flooring in my living room"',Foundations:'Example: "I need to repair the foundation of my house"',"Garage Doors":'Example: "I want to replace my garage door"',"General Contractors":'Example: "I need a general contractor for a home renovation"',Gutters:'Example: "I need to clean and repair my gutters"',Handyman:'Example: "I need a handyman to fix various things around my house"',"Holiday Decorators":'Example: "I want to hire someone to decorate my home for the holidays"',"Smart Home":'Example: "I want to install a smart home automation system"',"Home Builders":'Example: "I want to build a custom home"',"Home Inspection":'Example: "I need a home inspection before buying a house"',"Home Organization":'Example: "I need help organizing my closets and storage"',"Home Security":'Example: "I want to install a home security system"',"Home Staging":'Example: "I need a home staging service to prepare my house for sale"',"Home Theater":'Example: "I want to set up a home theater system"',"Home Warranties":'Example: "I want to purchase a home warranty"',"Hot Tubs":'Example: "I want to install a hot tub in my backyard"',"Heating and Cooling":'Example: "I need to repair my air conditioning unit"',Insulation:'Example: "I want to improve the insulation in my home"',"Junk Removal":'Example: "I need a service to remove junk and debris from my property"',Landscaping:'Example: "I want to redesign my backyard landscaping"',Locksmiths:'Example: "I need a locksmith to change the locks on my doors"',"Masonry and Concrete":'Example: "I need to repair a cracked concrete driveway"',Restoration:'Example: "I need water damage restoration services"',Moving:'Example: "I need a moving company to help me relocate"',Painting:'Example: "I want to paint the interior walls of my house"',"Pest Control":'Example: "I need pest control services for my home"',Pools:'Example: "I want to install a swimming pool in my backyard"',Plumbing:'Example: "I need a plumber to fix a leaky faucet"',"Pressure Washing":'Example: "I want to pressure wash the exterior of my house"',Remodeling:'Example: "I want to remodel my kitchen"',Roofing:'Example: "I need to repair a leaky roof"',Sheds:'Example: "I want to build a storage shed in my backyard"',Siding:'Example: "I want to replace the siding on my house"',Solar:'Example: "I want to install solar panels on my roof"',Tiling:'Example: "I want to install new tiles in my bathroom"',"Tree Services":'Example: "I need a large tree removed"',"Walk-in Tubs":'Example: "I want to install a walk-in tub in my bathroom"',Waterproofing:'Example: "I need to waterproof my basement"',"Window Cleaning":'Example: "I need a professional window cleaning service"',Windows:'Example: "I want to replace 3 windows in my house"',"Not Sure or Other":'Example: "I need general handyman services"'},L={Appliances:"We Have Appliance Pros Standing By!"},T={Appliances:"What is the best number to reach you?"},N=function(e=null){let t=j,a=L,l=T;return e&&(t=P(j,e),a=P(L,e),l=P(T,e)),{type:"meta",data:i(_,{tcpaLanguage:"By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by contractors and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services.",defaultCommentsPlaceholder:n,commentsPlaceholders:t,defaultFinalHeadline:"We Found Contractors!",finalHeadlines:a,defaultFinalSubHeadline:"Compare quotes and save. Verify contact info:",finalSubHeadlines:l})}}();N.data.dynamicSchema=[function(t={}){const a={...t,nextOnEnter:!1};return S("comments",[$(t),p(t.scope,0,{label:void 0===t.label?"Please briefly describe your issue in a few words:":t.label,placeholder:t.placeholder||e,inputClass:void 0===t.inputClass?"!t-h-32":t.inputClass})],a)}({label:null,headline:"Please describe your appliance issue:",headlineClass:"!t-text-dark"}),function(e={}){return S("firstAndLast",[v({headline:e.headline??"Who is looking for help?",headlineClass:e.headlineClass}),b({subheadline:e.subheadline??"Note: we never share info without consent",subheadlineClass:"!t-text-sm !t-text-gray-500"}),o(e.scope),d(e.scope)],e)}({headline:"Who needs appliance help?",headlineClass:"!t-text-dark",subheadline:""})];const M=[N,i(F,O),{$cmp:"FormKit",props:function(e){const t=i(k,e);return t.formId&&!t.name&&(t.name=t.formId),t}({formId:"applianceRepairMinimal",redirectMap:{"*":"/thank-you"}}),children:[function(e){return i(H,e)}(),function(e={}){return i(function(e={}){return{$el:"h1",attrs:{class:"t-flex t-justify-center t-text-center t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3 "+(e.headlineClass||"")+" f-first-headline"}}}(e),e)}({children:'$urlParam("hl", "Get Started Here!")',if:"$activeStep === $firstStep()"}),function(e={}){return i(function(e={}){return{$el:"h3",attrs:{class:"t-flex t-justify-center t-text-center t-text-[1.1rem] md:t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10 "+(e.subheadlineClass||"")+" f-first-subheadline"}}}(e),e)}({children:'$urlParam("shl", "Please Enter Your Zip Code:")',if:"$activeStep === $firstStep()",subheadlineClass:"!t-font-bold !t-text-[#465f87]"}),...q,{$el:"div",attrs:{class:"form-body"},children:[function(e={}){return S("applianceRepairFirstStep",[{$formkit:"hidden",name:"Category",id:"Category",value:"Appliances"},m(e.scope,!0,e.input)],e)}({nextOnInput:!1,headlineClass:"t-text-lg",nextStepMap:{values:{"*":["comments","firstAndLast","contactInfo"]}},input:{help:null}}),function(e="Type_Of_Legal_Problem"){return{$cmp:"FormKitSchema",if:"$get("+e+").value",props:{schema:"$meta.dynamicSchema",data:"$buildData($meta)"}}}("Category"),function(e={}){return S("contactInfo",[w(e),I(e),{$el:"script",if:"$activeStep === $lastStep()",children:E},c(e.scope,!0),(t=e.scope,{$formkit:"checkbox",label:"$meta.tcpaLanguage",__raw__sectionsSchema:{label:{attrs:{innerHTML:"$label"}}},name:t?t+":TCPA_Opt_In":"TCPA_Opt_In","data-tf-sensitive":"false",validation:"required|accepted",validationMessages:{required:"Consent is required",accepted:"Consent is required"},classes:{label:"t-text-xs t-text-slate-500 t-font-normal !t-leading-[0.9rem]"}}),g()],{nextOnEnter:!1});var t}({headlineClass:"!t-text-[#465f87]",subheadlineClass:"!t-text-[#353739]",headline:'$getKey($meta, "finalHeadlines." + $get(Category).value, $meta.defaultFinalHeadline)',subheadline:'$getKey($meta, "finalSubHeadlines." + $get(Category).value, $meta.defaultFinalSubHeadline)'}),((e={})=>({$el:"div",attrs:{class:{if:"$activeStep === $firstStep()",then:"step-nav "+(e.firstStepButtonClass||"!t-justify-center sm:!t-justify-between"),else:"step-nav !t-justify-between"}},children:[{$formkit:"button",name:"back_button",onClick:"$setPreviousStep($prevStepFunc($get(form)))",children:"Back",outerClass:{if:"$activeStep === $firstStep()",then:"t-hidden sm:t-block",else:""},style:{if:"$activeStep === $firstStep()",then:"display: none;"},classes:{input:(e.inputClass||"")+" f-navigation-input"}},{$formkit:"button",name:"next_button",onClick:"$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))",children:{if:"$activeStep === $firstStep()",then:e.startText||"Start",else:"Next"},outerClass:{if:"$activeStep === $lastStep()",then:"t-hidden",else:""},style:{if:"$activeStep === $lastStep()",then:"display: none;"},classes:{input:(e.inputClass||"")+" f-navigation-input"}},{$formkit:"submit",name:"submit_button",label:e.submitLabel||"Submit",if:"$activeStep === $lastStep()",style:{if:"$activeStep !== $lastStep()",then:"display: none;"},classes:{input:(e.inputClass||"")+" !t-ml-2 sm:!t-ml-auto f-navigation-input"}}]}))({startText:"Schedule Now",inputClass:"!t-text-black !t-font-extrabold !t-bg-[#ffce51]",firstStepButtonClass:"!t-justify-center"}),{$el:"pre",if:'$urlParam("fdbg", "") == 1',children:[{$el:"pre",children:"$stringify( $get(form).value )",attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["activeStep: ","$activeStep"],attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["stepHistory: ","$stepHistory"],attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["stepQueue: ","$stepQueue"],attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["steps: ","$stepKeys()"],attrs:{class:"t-text-xs",style:"overflow: scroll"}}]}]}]}];var O;return M}();
1
+ var applianceRepairMinimal=function(){"use strict";const e='$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)',t='$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';function a(){return Object.assign({},...arguments)}const n=e=>(e.name&&!e.id&&(e.id=e.name),a({$formkit:"text",validation:"required",validationMessages:{required:"Field is required"},labelClass:"required"},e)),i=e=>(e.wrapperClass="side-by-side t-items-center",n(e)),r=e=>(e.wrapperClass="t-flex t-justify-center",e.messagesClass="t-flex t-justify-center",e.inputClass="t-text-center",e.helpClass="t-mt-2.5 !t-text-sm t-text-center",n(e)),l=(e,t,a={})=>(t?r:i)({label:t?a.label:"First Name:",placeholder:"First",name:e?e+":First_Name":"First_Name",autocomplete:"given-name",validationMessages:{required:"First Name is required"},...a}),s=(e,t,a={})=>(t?r:i)({label:t?a.label:"Last Name:",placeholder:"Last",name:e?e+":Last_Name":"Last_Name",autocomplete:"family-name",validationMessages:{required:"Last Name is required"},...a}),o=(e,t,a={})=>(t?r:i)({$formkit:"tel",name:e?e+":Primary_Phone":"Primary_Phone",label:t?a.label:"Phone Number:",placeholder:"###-###-####",maxlength:12,help:"10-digit phone number, hyphens optional",autocomplete:"tel-national","data-tf-sensitive":"false",validation:"required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone",validationMessages:{required:"Phone Number is required",matches:"Invalid Phone Format, use ###-###-####",valid_phone:"Invalid Phone Number"},helpClass:"t-mt-2.5 md:t-text-right md:t-mt-[-2px]",...a}),d=(e,t,a={})=>(t?r:i)({label:t?a.label:"Zip Code:",help:t?a.help??"We try to match you with local help":null,placeholder:"#####",name:e?e+":Zip":"Zip",maxlength:5,inputmode:"numeric",autocomplete:"postal-code",validation:"required|matches:/^[0-9]{5}$/",validationMessages:{required:"Zip Code is required",matches:"Invalid Zip Code"},...a}),c="$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))",m="$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))",p=e=>"group"!==e.type&&"section"!==e.type&&"form"!==e.type&&"hidden"!==e.$formkit&&!e.children,u=e=>{if(p(e))return e;for(var t=e.children.length-1;t>=0;t--){if("string"==typeof e.children)continue;const a=e.children[t];if(p(a))return a;const n=u(a);if(n)return n}return null},f={$el:"div",if:"$activeStep === $lastStep()",attrs:{class:"t-flex t-justify-center t-items-center t-text-sm t-text-gray-500"},children:[{$el:"img",attrs:{loading:"lazy",alt:"",style:{border:0},width:"25",height:"25",src:"https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg"}},{$el:"span",children:"Secure & Encrypted",attrs:{class:"t-pl-2 t-pt-1 t-font-medium"}}]};function h(e){return a(f,e)}function x(e){return{$el:"h5",children:e.subheadline||"",attrs:{class:"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 "+(e.subheadlineClass||"")}}}function y(e){return{$el:"h3",children:e.headline||"Please Provide a Contact Name",attrs:{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 "+(e.headlineClass||"")}}}function g(t){return{$el:"h3",children:t.headline||e,attrs:{class:"t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1 "+(t.headlineClass||"")+" f-contact-info-headline"}}}function $(e){return{$el:"h5",children:e.subheadline||t,attrs:{class:"t-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3 "+(e.subheadlineClass||"")+" f-contact-info-subheadline"}}}const b="(function() {\n if (window.xxTrustedFormLoaded) {\n return\n }\n var vid = '';\n if (typeof window.zar !== 'undefined') {\n vid = window.zar.getVID();\n }\n window.xxTrustedFormLoaded = true;\n var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'\n var tf = document.createElement('script');\n tf.type = 'text/javascript'; tf.async = true;\n tf.src = (\"https:\" == document.location.protocol ? 'https' : 'http') + \"://api.trustedform.com/trustedform.js?field=xxTrustedFormCertUrl&identifier=\" + vid + \"&ping_field=xxTrustedFormPingUrl&provideReferrer=false&invert_field_sensitivity=true&sandbox=\" + sandbox + \"&l=\" + new Date().getTime() + Math.random();\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);\n})();";const v=(e,t)=>({$el:"section",if:'$stepEnabled("'+e+'")',attrs:{hidden:'$activeStep !== "'+e+'"',key:t||e}});function w(e,t,n={}){const{nextOnEnter:i=!0,nextOnInput:r=!1,stepKey:l,nextStepMap:s,triggerRedirectMap:o,autoFocus:d}=n;if(t&&t.length&&(i||r)){const e=u(t[t.length-1]);e&&!0===i&&(e.onKeypress=c),e&&!0===r&&(e.onInput=m)}return a(v(e,l),{children:[{$formkit:"group",id:e,name:e,nextStepMap:s,triggerRedirectMap:o,autoFocus:d,children:t}]})}const I={type:"form",id:"form",config:{validationVisibility:"submit"},onSubmit:'$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',plugins:"$plugins",actions:!1,anchorElement:"form-anchor",useLocalStorage:!0,prepop:{fromURL:!0},errorCodes:{403:{message:"An Error Occurred",abort:!1},409:{abort:!1},429:"An Error Occurred",504:{message:"An Error Occurred",abort:!1}},formClass:"!t-max-w-[40rem]"};function S(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>t.includes(e))))}const E={};const C={$el:"div",children:[{$el:"div",attrs:{id:"form-anchor",class:"t-absolute",style:{top:"-30px",left:0}}}],attrs:{class:"t-relative"}};const k={$el:"div",attrs:{class:"t-mt-7 t-mb-5 t-w-full t-flex t-flex-col t-justify-center t-items-center",style:{if:"$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",then:"display: none"}},children:[{$el:"div",attrs:{class:"t-flex t-justify-center"},children:[{$el:"span",attrs:{id:"progress-bar-text",class:"t-text-sm t-mb-1"},children:["0% Complete"]}]},{$el:"div",attrs:{class:"t-bg-gray-100 t-w-9/12 t-rounded"},children:[{$el:"div",attrs:{id:"progress-bar",class:"t-flex t-flex-col t-justify-center t-text-center t-whitespace-nowrap t-w-[10%] t-h-1.5 t-rounded t-text-white t-bg-[#007bff]",style:{transition:"width 0.5s ease"}}}]}]};const P=[{$formkit:"hidden",name:"vertical",value:"HomeImprovement"},{$formkit:"hidden",name:"TCPA_Language",value:"$meta.tcpaLanguage"},{$formkit:"hidden",name:"gclid",value:null},{$formkit:"hidden",name:"campaignid",value:null},{$formkit:"hidden",name:"s",value:null}],_={Additions:'Example: "I would like to add a sunroom to my home"',Appliances:'Example: "I need to repair a dishwasher"',Appraisals:'Example: "I need to get my home appraised"',Cabinets:'Example: "I want to install new kitchen cabinets"',Carpentry:'Example: "I need someone to build custom shelves"',Carpets:'Example: "I want to replace the carpets in my living room"',Cleaning:'Example: "I need a professional cleaning service for my home"',Countertops:'Example: "I want to install granite countertops in my kitchen"',"Decks and Porches":'Example: "I want to build a new deck in my backyard"',Demolition:'Example: "I need to demolish a wall in my home"',Doors:'Example: "I want to replace the front door of my house"',Driveways:'Example: "I need to repair my driveway"',"Drywall and Plaster":'Example: "I need to repair a hole in my drywall"',Electrical:'Example: "I need an electrician to install new light fixtures"',Fencing:'Example: "I want to install a privacy fence in my backyard"',Flooring:'Example: "I want to install hardwood flooring in my living room"',Foundations:'Example: "I need to repair the foundation of my house"',"Garage Doors":'Example: "I want to replace my garage door"',"General Contractors":'Example: "I need a general contractor for a home renovation"',Gutters:'Example: "I need to clean and repair my gutters"',Handyman:'Example: "I need a handyman to fix various things around my house"',"Holiday Decorators":'Example: "I want to hire someone to decorate my home for the holidays"',"Smart Home":'Example: "I want to install a smart home automation system"',"Home Builders":'Example: "I want to build a custom home"',"Home Inspection":'Example: "I need a home inspection before buying a house"',"Home Organization":'Example: "I need help organizing my closets and storage"',"Home Security":'Example: "I want to install a home security system"',"Home Staging":'Example: "I need a home staging service to prepare my house for sale"',"Home Theater":'Example: "I want to set up a home theater system"',"Home Warranties":'Example: "I want to purchase a home warranty"',"Hot Tubs":'Example: "I want to install a hot tub in my backyard"',"Heating and Cooling":'Example: "I need to repair my air conditioning unit"',Insulation:'Example: "I want to improve the insulation in my home"',"Junk Removal":'Example: "I need a service to remove junk and debris from my property"',Landscaping:'Example: "I want to redesign my backyard landscaping"',Locksmiths:'Example: "I need a locksmith to change the locks on my doors"',"Masonry and Concrete":'Example: "I need to repair a cracked concrete driveway"',Restoration:'Example: "I need water damage restoration services"',Moving:'Example: "I need a moving company to help me relocate"',Painting:'Example: "I want to paint the interior walls of my house"',"Pest Control":'Example: "I need pest control services for my home"',Pools:'Example: "I want to install a swimming pool in my backyard"',Plumbing:'Example: "I need a plumber to fix a leaky faucet"',"Pressure Washing":'Example: "I want to pressure wash the exterior of my house"',Remodeling:'Example: "I want to remodel my kitchen"',Roofing:'Example: "I need to repair a leaky roof"',Sheds:'Example: "I want to build a storage shed in my backyard"',Siding:'Example: "I want to replace the siding on my house"',Solar:'Example: "I want to install solar panels on my roof"',Tiling:'Example: "I want to install new tiles in my bathroom"',"Tree Services":'Example: "I need a large tree removed"',"Walk-in Tubs":'Example: "I want to install a walk-in tub in my bathroom"',Waterproofing:'Example: "I need to waterproof my basement"',"Window Cleaning":'Example: "I need a professional window cleaning service"',Windows:'Example: "I want to replace 3 windows in my house"',"Not Sure or Other":'Example: "I need general handyman services"'},F={Appliances:"We Have Appliance Pros Standing By!"},H={Appliances:"What is the best number to reach you?"},j=function(e=null){let t=_,n=F,i=H;return e&&(t=S(_,e),n=S(F,e),i=S(H,e)),{type:"meta",data:a(E,{tcpaLanguage:"By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by contractors and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services.",defaultCommentsPlaceholder:'$getKey($meta, "commentsPlaceholders." + $get(Category).value, $meta.defaultCommentsPlaceholder)',commentsPlaceholders:t,defaultFinalHeadline:"We Found Contractors!",finalHeadlines:n,defaultFinalSubHeadline:"Compare quotes and save. Verify contact info:",finalSubHeadlines:i})}}();j.data.dynamicSchema=[function(e={}){return w("firstAndLast",[y({headline:e.headline??"Who is looking for help?",headlineClass:e.headlineClass}),x({subheadline:e.subheadline??"Note: we never share info without consent",subheadlineClass:"!t-text-sm !t-text-gray-500"}),l(e.scope),s(e.scope)],e)}({headline:"Who needs appliance help?",headlineClass:"!t-text-dark",subheadline:""})];const q=[j,a(C,L),{$cmp:"FormKit",props:function(e){const t=a(I,e);return t.formId&&!t.name&&(t.name=t.formId),t}({formId:"applianceRepairMinimal",redirectMap:{"*":"/thank-you"}}),children:[function(e){return a(k,e)}(),function(e={}){return a(function(e={}){return{$el:"h1",attrs:{class:"t-flex t-justify-center t-text-center t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3 "+(e.headlineClass||"")+" f-first-headline"}}}(e),e)}({children:'$urlParam("hl", "Get Started Here!")',if:"$activeStep === $firstStep()"}),function(e={}){return a(function(e={}){return{$el:"h3",attrs:{class:"t-flex t-justify-center t-text-center t-text-[1.1rem] md:t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10 "+(e.subheadlineClass||"")+" f-first-subheadline"}}}(e),e)}({children:'$urlParam("shl", "Please Enter Your Zip Code:")',if:"$activeStep === $firstStep()",subheadlineClass:"!t-font-bold !t-text-[#465f87]"}),...P,{$el:"div",attrs:{class:"form-body"},children:[function(e={}){return w("applianceRepairFirstStep",[{$formkit:"hidden",name:"Category",id:"Category",value:"Appliances"},d(e.scope,!0,e.input)],e)}({nextOnInput:!1,headlineClass:"t-text-lg",nextStepMap:{values:{"*":["firstAndLast","contactInfo"]}},input:{help:null}}),function(e="Type_Of_Legal_Problem"){return{$cmp:"FormKitSchema",if:"$get("+e+").value",props:{schema:"$meta.dynamicSchema",data:"$buildData($meta)"}}}("Category"),function(e={}){return w("contactInfo",[g(e),$(e),{$el:"script",if:"$activeStep === $lastStep()",children:b},o(e.scope,!0),(t=e.scope,{$formkit:"checkbox",label:"$meta.tcpaLanguage",__raw__sectionsSchema:{label:{attrs:{innerHTML:"$label"}}},name:t?t+":TCPA_Opt_In":"TCPA_Opt_In","data-tf-sensitive":"false",validation:"required|accepted",validationMessages:{required:"Consent is required",accepted:"Consent is required"},classes:{label:"t-text-xs t-text-slate-500 t-font-normal !t-leading-[0.9rem]"}}),h()],{nextOnEnter:!1});var t}({headlineClass:"!t-text-[#465f87]",subheadlineClass:"!t-text-[#353739]",headline:'$getKey($meta, "finalHeadlines." + $get(Category).value, $meta.defaultFinalHeadline)',subheadline:'$getKey($meta, "finalSubHeadlines." + $get(Category).value, $meta.defaultFinalSubHeadline)'}),((e={})=>({$el:"div",attrs:{class:{if:"$activeStep === $firstStep()",then:"step-nav "+(e.firstStepButtonClass||"!t-justify-center sm:!t-justify-between"),else:"step-nav !t-justify-between"}},children:[{$formkit:"button",name:"back_button",onClick:"$setPreviousStep($prevStepFunc($get(form)))",children:"Back",outerClass:{if:"$activeStep === $firstStep()",then:"t-hidden sm:t-block",else:""},style:{if:"$activeStep === $firstStep()",then:"display: none;"},classes:{input:(e.inputClass||"")+" f-navigation-input"}},{$formkit:"button",name:"next_button",onClick:"$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))",children:{if:"$activeStep === $firstStep()",then:e.startText||"Start",else:"Next"},outerClass:{if:"$activeStep === $lastStep()",then:"t-hidden",else:""},style:{if:"$activeStep === $lastStep()",then:"display: none;"},classes:{input:(e.inputClass||"")+" f-navigation-input"}},{$formkit:"submit",name:"submit_button",label:e.submitLabel||"Submit",if:"$activeStep === $lastStep()",style:{if:"$activeStep !== $lastStep()",then:"display: none;"},classes:{input:(e.inputClass||"")+" !t-ml-2 sm:!t-ml-auto f-navigation-input"}}]}))({startText:"Schedule Now",inputClass:"!t-text-black !t-font-extrabold !t-bg-[#ffce51]",firstStepButtonClass:"!t-justify-center"}),{$el:"pre",if:'$urlParam("fdbg", "") == 1',children:[{$el:"pre",children:"$stringify( $get(form).value )",attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["activeStep: ","$activeStep"],attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["stepHistory: ","$stepHistory"],attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["stepQueue: ","$stepQueue"],attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["steps: ","$stepKeys()"],attrs:{class:"t-text-xs",style:"overflow: scroll"}}]}]}]}];var L;return q}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhl-forms",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },