bhl-forms 0.6.5 → 0.6.6
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.
- package/dist/bhl-forms.iife.js +1 -1
- package/dist/bhl-forms.modern.iife.js +1 -1
- package/dist/bhl-forms.modern.umd.js +1 -1
- package/dist/bhl-forms.umd.js +1 -1
- package/dist/forms/accidentsAndInjuries.es.js +1441 -861
- package/dist/forms/accidentsAndInjuries.iife.js +1 -1
- package/dist/forms/accidentsAndInjuries.json +1 -1
- package/dist/forms/appraisals.es.js +115 -115
- package/dist/forms/appraisals.iife.js +1 -1
- package/dist/forms/childAndFamily.es.js +789 -763
- package/dist/forms/childAndFamily.iife.js +1 -1
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/childAndFamilySingle.es.js +755 -745
- package/dist/forms/childAndFamilySingle.iife.js +1 -1
- package/dist/forms/childAndFamilySingle.json +1 -1
- package/dist/forms/civilLawsuit.es.js +835 -804
- package/dist/forms/civilLawsuit.iife.js +1 -1
- package/dist/forms/civilLawsuit.json +1 -1
- package/dist/forms/coins.es.js +115 -115
- package/dist/forms/coins.iife.js +1 -1
- package/dist/forms/contracts.es.js +1454 -715
- package/dist/forms/contracts.iife.js +1 -1
- package/dist/forms/contracts.json +1 -1
- package/dist/forms/criminal.es.js +870 -823
- package/dist/forms/criminal.iife.js +1 -1
- package/dist/forms/criminal.json +1 -1
- package/dist/forms/employmentAndWorkplace.es.js +1827 -1188
- package/dist/forms/employmentAndWorkplace.iife.js +1 -1
- package/dist/forms/employmentAndWorkplace.json +1 -1
- package/dist/forms/generalLegal.es.js +852 -806
- package/dist/forms/generalLegal.iife.js +1 -1
- package/dist/forms/generalLegal.json +1 -1
- package/dist/forms/generalLegalPopUnder.es.js +852 -805
- package/dist/forms/generalLegalPopUnder.iife.js +1 -1
- package/dist/forms/generalLegalPopUnder.json +1 -1
- package/dist/forms/generalLegalSingle.es.js +1525 -1501
- package/dist/forms/generalLegalSingle.iife.js +1 -1
- package/dist/forms/generalLegalSingle.json +1 -1
- package/dist/forms/generalLegalThankYou.es.js +708 -693
- package/dist/forms/generalLegalThankYou.iife.js +1 -1
- package/dist/forms/generalLegalThankYou.json +1 -1
- package/dist/forms/harassmentAndDiscrimination.es.js +1465 -681
- package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
- package/dist/forms/harassmentAndDiscrimination.json +1 -1
- package/dist/forms/malpractice.es.js +1764 -1066
- package/dist/forms/malpractice.iife.js +1 -1
- package/dist/forms/malpractice.json +1 -1
- package/dist/forms/mechanics.es.js +115 -115
- package/dist/forms/mechanics.iife.js +1 -1
- package/dist/forms/realEstate.es.js +1556 -1208
- package/dist/forms/realEstate.iife.js +1 -1
- package/dist/forms/realEstate.json +1 -1
- package/dist/forms/repossession.es.js +1811 -1085
- package/dist/forms/repossession.iife.js +1 -1
- package/dist/forms/repossession.json +1 -1
- package/dist/forms/ssdi.es.js +672 -672
- package/dist/forms/ssdi.iife.js +1 -1
- package/dist/forms/ssdi.json +1 -1
- package/dist/forms/testForm.es.js +473 -468
- package/dist/forms/testForm.iife.js +1 -1
- package/dist/forms/testForm.json +1 -1
- package/dist/forms/testRedirects.es.js +104 -101
- package/dist/forms/testRedirects.iife.js +1 -1
- package/dist/forms/testRedirects.json +1 -1
- package/dist/forms/vets.es.js +115 -115
- package/dist/forms/vets.iife.js +1 -1
- package/dist/forms/willsAndTrusts.es.js +1298 -705
- package/dist/forms/willsAndTrusts.iife.js +1 -1
- package/dist/forms/willsAndTrusts.json +1 -1
- package/dist/main.css +1 -1
- package/package.json +1 -1
- package/dist/forms/generalLegalPopUnderTF.es.js +0 -3087
- package/dist/forms/generalLegalPopUnderTF.iife.js +0 -1
- package/dist/forms/generalLegalPopUnderTF.json +0 -1
|
@@ -13,121 +13,6 @@ function RedirectUrlComments(domain, vertical, category) {
|
|
|
13
13
|
const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
|
|
14
14
|
const DEFAULT_COMMENTS_LABEL = 'Please briefly describe your legal issue in a few words:';
|
|
15
15
|
|
|
16
|
-
const formPropDefaults = {
|
|
17
|
-
type: 'form',
|
|
18
|
-
id: 'form',
|
|
19
|
-
config: { validationVisibility: 'submit' },
|
|
20
|
-
onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
|
|
21
|
-
plugins: '$plugins',
|
|
22
|
-
actions: false,
|
|
23
|
-
anchorElement: 'form-anchor',
|
|
24
|
-
useLocalStorage: true,
|
|
25
|
-
prepop: {
|
|
26
|
-
fromURL: true
|
|
27
|
-
},
|
|
28
|
-
errorCodes: {
|
|
29
|
-
403: { message: "An Error Occurred", abort: false },
|
|
30
|
-
409: { abort: false },
|
|
31
|
-
429: "An Error Occurred",
|
|
32
|
-
504: { message: "An Error Occurred", abort: false },
|
|
33
|
-
},
|
|
34
|
-
formClass: '!t-max-w-[40rem]'
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
function formProps(updates) {
|
|
38
|
-
const props = merge(
|
|
39
|
-
formPropDefaults,
|
|
40
|
-
updates
|
|
41
|
-
);
|
|
42
|
-
if (props.formId && !props.name) {
|
|
43
|
-
props.name = props.formId;
|
|
44
|
-
}
|
|
45
|
-
return props
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const formAnchorDefaults = {
|
|
49
|
-
$el: 'div',
|
|
50
|
-
children: [
|
|
51
|
-
{
|
|
52
|
-
$el: 'div',
|
|
53
|
-
attrs: {
|
|
54
|
-
id: 'form-anchor',
|
|
55
|
-
class: 't-absolute',
|
|
56
|
-
style: { top: '-30px', left: 0 }
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
attrs: {
|
|
61
|
-
class: 't-relative'
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
function formAnchor(updates) {
|
|
66
|
-
return merge(
|
|
67
|
-
formAnchorDefaults,
|
|
68
|
-
updates
|
|
69
|
-
)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function headlineDefaults(updates = {}) {
|
|
73
|
-
return {
|
|
74
|
-
$el: 'h1',
|
|
75
|
-
attrs: {
|
|
76
|
-
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' + ' ' + (updates.headlineClass || '')
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function headline(updates = {}) {
|
|
82
|
-
return merge(
|
|
83
|
-
headlineDefaults(updates),
|
|
84
|
-
updates
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function subHeadlineDefaults(updates = {}) {
|
|
89
|
-
return {
|
|
90
|
-
$el: 'h3',
|
|
91
|
-
attrs: {
|
|
92
|
-
class: 't-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10' + ' ' + (updates.subheadlineClass || '')
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function subHeadline(updates = {}) {
|
|
98
|
-
return merge(
|
|
99
|
-
subHeadlineDefaults(updates),
|
|
100
|
-
updates
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const hiddenInputsBase = [
|
|
105
|
-
{
|
|
106
|
-
$formkit: 'hidden',
|
|
107
|
-
name: "gclid",
|
|
108
|
-
value: null
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
$formkit: 'hidden',
|
|
112
|
-
name: "campaignid",
|
|
113
|
-
value: null
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
$formkit: 'hidden',
|
|
117
|
-
name: "s",
|
|
118
|
-
value: null
|
|
119
|
-
}
|
|
120
|
-
];
|
|
121
|
-
|
|
122
|
-
const hiddenInputsMechanics = [
|
|
123
|
-
{
|
|
124
|
-
$formkit: 'hidden',
|
|
125
|
-
name: "vertical",
|
|
126
|
-
value: "AutoRepair"
|
|
127
|
-
},
|
|
128
|
-
...hiddenInputsBase
|
|
129
|
-
];
|
|
130
|
-
|
|
131
16
|
const radio = (updates) => {
|
|
132
17
|
if (updates.name && !updates.id) {
|
|
133
18
|
updates.id = updates.name;
|
|
@@ -335,6 +220,121 @@ const formDetails = () => ({
|
|
|
335
220
|
]
|
|
336
221
|
});
|
|
337
222
|
|
|
223
|
+
const formPropDefaults = {
|
|
224
|
+
type: 'form',
|
|
225
|
+
id: 'form',
|
|
226
|
+
config: { validationVisibility: 'submit' },
|
|
227
|
+
onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
|
|
228
|
+
plugins: '$plugins',
|
|
229
|
+
actions: false,
|
|
230
|
+
anchorElement: 'form-anchor',
|
|
231
|
+
useLocalStorage: true,
|
|
232
|
+
prepop: {
|
|
233
|
+
fromURL: true
|
|
234
|
+
},
|
|
235
|
+
errorCodes: {
|
|
236
|
+
403: { message: "An Error Occurred", abort: false },
|
|
237
|
+
409: { abort: false },
|
|
238
|
+
429: "An Error Occurred",
|
|
239
|
+
504: { message: "An Error Occurred", abort: false },
|
|
240
|
+
},
|
|
241
|
+
formClass: '!t-max-w-[40rem]'
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
function formProps(updates) {
|
|
245
|
+
const props = merge(
|
|
246
|
+
formPropDefaults,
|
|
247
|
+
updates
|
|
248
|
+
);
|
|
249
|
+
if (props.formId && !props.name) {
|
|
250
|
+
props.name = props.formId;
|
|
251
|
+
}
|
|
252
|
+
return props
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const formAnchorDefaults = {
|
|
256
|
+
$el: 'div',
|
|
257
|
+
children: [
|
|
258
|
+
{
|
|
259
|
+
$el: 'div',
|
|
260
|
+
attrs: {
|
|
261
|
+
id: 'form-anchor',
|
|
262
|
+
class: 't-absolute',
|
|
263
|
+
style: { top: '-30px', left: 0 }
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
attrs: {
|
|
268
|
+
class: 't-relative'
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
function formAnchor(updates) {
|
|
273
|
+
return merge(
|
|
274
|
+
formAnchorDefaults,
|
|
275
|
+
updates
|
|
276
|
+
)
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function headlineDefaults(updates = {}) {
|
|
280
|
+
return {
|
|
281
|
+
$el: 'h1',
|
|
282
|
+
attrs: {
|
|
283
|
+
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' + ' ' + (updates.headlineClass || '')
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function headline(updates = {}) {
|
|
289
|
+
return merge(
|
|
290
|
+
headlineDefaults(updates),
|
|
291
|
+
updates
|
|
292
|
+
)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function subHeadlineDefaults(updates = {}) {
|
|
296
|
+
return {
|
|
297
|
+
$el: 'h3',
|
|
298
|
+
attrs: {
|
|
299
|
+
class: 't-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10' + ' ' + (updates.subheadlineClass || '')
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
function subHeadline(updates = {}) {
|
|
305
|
+
return merge(
|
|
306
|
+
subHeadlineDefaults(updates),
|
|
307
|
+
updates
|
|
308
|
+
)
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
const hiddenInputsBase = [
|
|
312
|
+
{
|
|
313
|
+
$formkit: 'hidden',
|
|
314
|
+
name: "gclid",
|
|
315
|
+
value: null
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
$formkit: 'hidden',
|
|
319
|
+
name: "campaignid",
|
|
320
|
+
value: null
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
$formkit: 'hidden',
|
|
324
|
+
name: "s",
|
|
325
|
+
value: null
|
|
326
|
+
}
|
|
327
|
+
];
|
|
328
|
+
|
|
329
|
+
const hiddenInputsMechanics = [
|
|
330
|
+
{
|
|
331
|
+
$formkit: 'hidden',
|
|
332
|
+
name: "vertical",
|
|
333
|
+
value: "AutoRepair"
|
|
334
|
+
},
|
|
335
|
+
...hiddenInputsBase
|
|
336
|
+
];
|
|
337
|
+
|
|
338
338
|
const schema = [
|
|
339
339
|
formAnchor(),
|
|
340
340
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var mechanics=function(){"use strict";function e(){return Object.assign({},...arguments)}function t(e,t,r){return"https://listings."+e+"/api/v1/redirect?zone_id=4&sub_id=${properties.vid}&vertical="+encodeURIComponent(t)+"&category="+encodeURIComponent(r)}const r=
|
|
1
|
+
var mechanics=function(){"use strict";function e(){return Object.assign({},...arguments)}function t(e,t,r){return"https://listings."+e+"/api/v1/redirect?zone_id=4&sub_id=${properties.vid}&vertical="+encodeURIComponent(t)+"&category="+encodeURIComponent(r)}const r=(t,r)=>(t=>(t.name&&!t.id&&(t.id=t.name),e({$formkit:"textarea",rows:5,maxlength:500,validation:"required",validationMessages:{required:"Field is required"},innerClass:"t-max-w-xl",labelClass:"required"},t)))(e({name:r?r+":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"'},t)),n=()=>{return(t={id:"Mechanics_CrossSells",name:"Mechanics_CrossSells",label:"Click all that apply (optional):",fieldsetClass:"$reset",wrapperClass:"t-mb-2",optionsClass:"t-pt-3",legendClass:"",validation:null,options:{"Auto Insurance":"I'd like to save on my car insurance"}}).name&&!t.id&&(t.id=t.name),e({$formkit:"radio",validation:"required",validationMessages:{required:"Field is required"},optionsClass:"t-pt-3 t-pl-1",legendClass:"required"},t);var t},s="$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))",i="$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))",l=e=>"group"!==e.type&&"section"!==e.type&&"form"!==e.type&&"hidden"!==e.$formkit&&!e.children,a=e=>{if(l(e))return e;for(var t=e.children.length-1;t>=0;t--){if("string"==typeof e.children)continue;const r=e.children[t];if(l(r))return r;const n=a(r);if(n)return n}return null},o=(e,t)=>({$el:"section",if:'$stepEnabled("'+e+'")',attrs:{hidden:'$activeStep !== "'+e+'"',key:t||e}});const c={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]"};const d=[{$formkit:"hidden",name:"vertical",value:"AutoRepair"},{$formkit:"hidden",name:"gclid",value:null},{$formkit:"hidden",name:"campaignid",value:null},{$formkit:"hidden",name:"s",value:null}],u=[e({$el:"div",children:[{$el:"div",attrs:{id:"form-anchor",class:"t-absolute",style:{top:"-30px",left:0}}}],attrs:{class:"t-relative"}},h),{$cmp:"FormKit",props:function(t){const r=e(c,t);return r.formId&&!r.name&&(r.name=r.formId),r}({formId:"mechanics",popUnderMap:{"properties.Mechanics_CrossSells":{"Auto Insurance":t("answers-now.com","Insurance","Auto Insurance")}},redirectMap:{"*":(p="answers-now.com",m="AutoRepair",f="Mechanics",t(p,m,f)+"&Comments=${properties.Comments}")},formClass:"!t-max-w-[36rem]"}),children:[function(t={}){return e(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||"")}}}(t),t)}({children:'$urlParam("hl", "Book Top-rated Mechanics")',if:"$activeStep === $firstStep()"}),function(t={}){return e(function(e={}){return{$el:"h3",attrs:{class:"t-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10 "+(e.subheadlineClass||"")}}}(t),t)}({children:'$urlParam("shl", "Certified Shops, Instant Quotes Online!")',if:"$activeStep === $firstStep()"}),...d,{$el:"div",attrs:{class:"form-body"},children:[function(t={}){return function(t,r,n=!0,l=!1,c,d,u){if(void 0===n&&(n=!0),r&&r.length&&(n||l)){const e=a(r[r.length-1]);e&&!0===n&&(e.onKeypress=s),e&&!0===l&&(e.onInput=i)}return e(o(t,c),{children:[{$formkit:"group",id:t,name:t,nextStepMap:d,autoFocus:u,children:r}]})}("commentsMechanics",[r({label:t.label||"Please briefly describe your legal issue in a few words:",placeholder:t.placeholder||'$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)',inputClass:"!t-h-20"}),n()],t.nextOnEnter)}({label:"Please briefly describe your issue:",placeholder:'Example: "I\'m having transmission trouble", or "My brakes need to be replaced"',nextOnEnter:!1}),function(e={}){return{$el:"div",attrs:{class:"step-nav"},children:[{$formkit:"button",name:"hidden_button",children:"Hidden",style:{if:"$activeStep === $firstStep()",then:"visibility: hidden;"}},{$formkit:"submit",name:"submit_button",label:e.submitLabel||"Chat Now"}]}}({submitLabel:"Start"}),{$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 p,m,f,h;return u}();
|