bhl-forms 0.6.15 → 0.7.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.
- package/dist/bhl-forms.es.js +1757 -1759
- package/dist/bhl-forms.iife.js +4 -4
- package/dist/bhl-forms.modern.es.js +2804 -2811
- package/dist/bhl-forms.modern.iife.js +6 -6
- package/dist/bhl-forms.modern.umd.js +6 -6
- package/dist/bhl-forms.umd.js +4 -4
- package/dist/forms/accidentsAndInjuries.es.js +314 -228
- package/dist/forms/accidentsAndInjuries.iife.js +1 -1
- package/dist/forms/accidentsAndInjuries.json +1 -1
- package/dist/forms/appraisals.es.js +16 -7
- package/dist/forms/appraisals.iife.js +1 -1
- package/dist/forms/business.es.js +317 -236
- package/dist/forms/business.iife.js +1 -1
- package/dist/forms/business.json +1 -1
- package/dist/forms/childAndFamily.es.js +303 -224
- package/dist/forms/childAndFamily.iife.js +1 -1
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/childAndFamilySingle.es.js +643 -555
- package/dist/forms/childAndFamilySingle.iife.js +1 -1
- package/dist/forms/childAndFamilySingle.json +1 -1
- package/dist/forms/civilLawsuit.es.js +637 -551
- package/dist/forms/civilLawsuit.iife.js +1 -1
- package/dist/forms/civilLawsuit.json +1 -1
- package/dist/forms/coins.es.js +16 -7
- package/dist/forms/coins.iife.js +1 -1
- package/dist/forms/contracts.es.js +307 -227
- package/dist/forms/contracts.iife.js +1 -1
- package/dist/forms/contracts.json +1 -1
- package/dist/forms/criminal.es.js +660 -572
- package/dist/forms/criminal.iife.js +1 -1
- package/dist/forms/criminal.json +1 -1
- package/dist/forms/divorce.es.js +643 -555
- package/dist/forms/divorce.iife.js +1 -1
- package/dist/forms/divorce.json +1 -1
- package/dist/forms/employmentAndWorkplace.es.js +584 -506
- package/dist/forms/employmentAndWorkplace.iife.js +1 -1
- package/dist/forms/employmentAndWorkplace.json +1 -1
- package/dist/forms/generalHomeImprovement.es.js +3015 -0
- package/dist/forms/generalHomeImprovement.iife.js +1 -0
- package/dist/forms/generalHomeImprovement.json +1 -0
- package/dist/forms/generalLegal.es.js +341 -244
- package/dist/forms/generalLegal.iife.js +1 -1
- package/dist/forms/generalLegal.json +1 -1
- package/dist/forms/generalLegalJustAnswer.es.js +4542 -0
- package/dist/forms/generalLegalJustAnswer.iife.js +1 -0
- package/dist/forms/generalLegalJustAnswer.json +1 -0
- package/dist/forms/generalLegalPopUnder.es.js +342 -245
- package/dist/forms/generalLegalPopUnder.iife.js +1 -1
- package/dist/forms/generalLegalPopUnder.json +1 -1
- package/dist/forms/generalLegalPopUnderSingle.es.js +692 -612
- package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
- package/dist/forms/generalLegalPopUnderSingle.json +1 -1
- package/dist/forms/generalLegalSingle.es.js +692 -612
- package/dist/forms/generalLegalSingle.iife.js +1 -1
- package/dist/forms/generalLegalSingle.json +1 -1
- package/dist/forms/generalLegalThankYou.es.js +204 -158
- package/dist/forms/generalLegalThankYou.iife.js +1 -1
- package/dist/forms/generalLegalThankYou.json +1 -1
- package/dist/forms/generalLegalThankYouConsultation.es.js +692 -612
- package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
- package/dist/forms/generalLegalThankYouConsultation.json +1 -1
- package/dist/forms/harassmentAndDiscrimination.es.js +303 -224
- package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
- package/dist/forms/harassmentAndDiscrimination.json +1 -1
- package/dist/forms/landlordTenant.es.js +316 -240
- package/dist/forms/landlordTenant.iife.js +1 -1
- package/dist/forms/landlordTenant.json +1 -1
- package/dist/forms/malpractice.es.js +308 -227
- package/dist/forms/malpractice.iife.js +1 -1
- package/dist/forms/malpractice.json +1 -1
- package/dist/forms/mechanics.es.js +184 -166
- package/dist/forms/mechanics.iife.js +1 -1
- package/dist/forms/mechanics.json +1 -1
- package/dist/forms/patentsAndIP.es.js +646 -558
- package/dist/forms/patentsAndIP.iife.js +1 -1
- package/dist/forms/patentsAndIP.json +1 -1
- package/dist/forms/realEstate.es.js +339 -243
- package/dist/forms/realEstate.iife.js +1 -1
- package/dist/forms/realEstate.json +1 -1
- package/dist/forms/repossession.es.js +307 -227
- package/dist/forms/repossession.iife.js +1 -1
- package/dist/forms/repossession.json +1 -1
- package/dist/forms/ssdi.es.js +156 -140
- package/dist/forms/ssdi.iife.js +1 -1
- package/dist/forms/ssdi.json +1 -1
- package/dist/forms/testForm.es.js +69 -51
- package/dist/forms/testForm.iife.js +1 -1
- package/dist/forms/testForm.json +1 -1
- package/dist/forms/testRedirects.es.js +43 -22
- package/dist/forms/testRedirects.iife.js +1 -1
- package/dist/forms/testRedirects.json +1 -1
- package/dist/forms/vets.es.js +16 -7
- package/dist/forms/vets.iife.js +1 -1
- package/dist/forms/willsAndTrusts.es.js +304 -223
- package/dist/forms/willsAndTrusts.iife.js +1 -1
- package/dist/forms/willsAndTrusts.json +1 -1
- package/package.json +3 -3
|
@@ -11,14 +11,15 @@ function RedirectUrlComments(domain, vertical, category) {
|
|
|
11
11
|
return RedirectUrl(domain, vertical, category) + '&Comments=${properties.Comments}'
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const DEFAULT_COMMENTS_LABEL = 'Please briefly describe your issue in a few words:';
|
|
15
|
+
const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC = '$getKey($meta, "commentsPlaceholders." + $get(Category).value, $meta.defaultCommentsPlaceholder)';
|
|
15
16
|
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
17
|
+
const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
|
|
18
|
+
const DEFAULT_FINAL_HEADLINE_LEGAL = 'Submit Your Case';
|
|
19
|
+
const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
|
|
20
|
+
const DEFAULT_FINAL_SUBHEADLINE_LEGAL = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
|
|
21
|
+
const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
|
|
22
|
+
const TCPA_LANGUAGE_LEGAL = "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, 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. To submit this request without this consent, call 878-213-4937.";
|
|
22
23
|
|
|
23
24
|
const radio = (updates) => {
|
|
24
25
|
if (updates.name && !updates.id) {
|
|
@@ -89,6 +90,14 @@ const sbsText = (updates) => {
|
|
|
89
90
|
return text(updates)
|
|
90
91
|
};
|
|
91
92
|
|
|
93
|
+
const verticalText = (updates) => {
|
|
94
|
+
updates.wrapperClass = 't-flex t-justify-center';
|
|
95
|
+
updates.messagesClass = 't-flex t-justify-center';
|
|
96
|
+
updates.inputClass = 't-text-center';
|
|
97
|
+
updates.helpClass = 't-mt-2.5 !t-text-sm t-text-center';
|
|
98
|
+
return text(updates)
|
|
99
|
+
};
|
|
100
|
+
|
|
92
101
|
const textArea = (updates) => {
|
|
93
102
|
if (updates.name && !updates.id) {
|
|
94
103
|
updates.id = updates.name;
|
|
@@ -128,32 +137,6 @@ const verticalDate = (updates) => {
|
|
|
128
137
|
return date(updates)
|
|
129
138
|
};
|
|
130
139
|
|
|
131
|
-
|
|
132
|
-
const autoDamageFromAccident$1 = (scope) => verticalYesNoRadio({
|
|
133
|
-
name: scope ? scope + ':' + 'Auto_Damage_From_Accident' : 'Auto_Damage_From_Accident',
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
const wouldLikeMVAConsultation$1 = (scope) => verticalYesNoRadio({
|
|
137
|
-
name: scope ? scope + ':' + 'Would_Like_MVA_Consultation' : 'Would_Like_MVA_Consultation',
|
|
138
|
-
help: "Note: we'll still connect you for a mechanic.",
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
const atFaultCenter = (scope) => verticalYesNoRadio({
|
|
142
|
-
name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
const comments = (updates, scope) => textArea(
|
|
146
|
-
merge({
|
|
147
|
-
name: scope ? scope + ':' + 'Comments' : 'Comments',
|
|
148
|
-
label: 'Please briefly describe your situation in a few words:',
|
|
149
|
-
placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
|
|
150
|
-
}, updates)
|
|
151
|
-
);
|
|
152
|
-
|
|
153
|
-
const doctorTreatmentCenter = (scope) => verticalYesNoRadio({
|
|
154
|
-
name: scope ? scope + ':' + 'Doctor_Treatment' : 'Doctor_Treatment',
|
|
155
|
-
});
|
|
156
|
-
|
|
157
140
|
const email = (scope) => sbsText({
|
|
158
141
|
$formkit: 'email',
|
|
159
142
|
name: scope ? scope + ':' + 'Email' : 'Email',
|
|
@@ -169,7 +152,6 @@ const email = (scope) => sbsText({
|
|
|
169
152
|
});
|
|
170
153
|
|
|
171
154
|
const firstName = (scope) => sbsText({
|
|
172
|
-
$formkit: 'text',
|
|
173
155
|
label: 'First Name:',
|
|
174
156
|
placeholder: 'First',
|
|
175
157
|
name: scope ? scope + ':' + 'First_Name' : 'First_Name',
|
|
@@ -179,16 +161,7 @@ const firstName = (scope) => sbsText({
|
|
|
179
161
|
}
|
|
180
162
|
});
|
|
181
163
|
|
|
182
|
-
const haveAttorneyCenter = (scope) => verticalYesNoRadio({
|
|
183
|
-
name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
const incidentDateCenter = (scope) => verticalDate({
|
|
187
|
-
name: scope ? scope + ':' + 'Incident_Date' : 'Incident_Date',
|
|
188
|
-
});
|
|
189
|
-
|
|
190
164
|
const lastName = (scope) => sbsText({
|
|
191
|
-
$formkit: 'text',
|
|
192
165
|
label: 'Last Name:',
|
|
193
166
|
placeholder: 'Last',
|
|
194
167
|
name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
|
|
@@ -198,21 +171,6 @@ const lastName = (scope) => sbsText({
|
|
|
198
171
|
}
|
|
199
172
|
});
|
|
200
173
|
|
|
201
|
-
const mechanicsCrossSells = () => radio({
|
|
202
|
-
id: 'Mechanics_CrossSells',
|
|
203
|
-
name: 'Mechanics_CrossSells',
|
|
204
|
-
// label: 'Click all that apply (optional):',
|
|
205
|
-
fieldsetClass: '$reset',
|
|
206
|
-
wrapperClass: 't-mb-2',
|
|
207
|
-
optionsClass: 't-pt-3',
|
|
208
|
-
legendClass: '',
|
|
209
|
-
validation: null,
|
|
210
|
-
options: {
|
|
211
|
-
// 'Auto and Car Accidents': "I was involved in a car accident",
|
|
212
|
-
'Auto Insurance': "I'd like to save on my auto insurance (optional)"
|
|
213
|
-
},
|
|
214
|
-
});
|
|
215
|
-
|
|
216
174
|
const phone = (scope) => sbsText({
|
|
217
175
|
$formkit: 'tel',
|
|
218
176
|
name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
|
|
@@ -231,6 +189,77 @@ const phone = (scope) => sbsText({
|
|
|
231
189
|
helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
|
|
232
190
|
});
|
|
233
191
|
|
|
192
|
+
|
|
193
|
+
const zipcode$1 = (scope, vertical, updates = {}) => {
|
|
194
|
+
const func = vertical ? verticalText : sbsText;
|
|
195
|
+
const label = vertical ? (updates.label) : 'Zip Code:';
|
|
196
|
+
const help = vertical ? (updates.help ?? "We try to match you with local help") : null;
|
|
197
|
+
return func({
|
|
198
|
+
label,
|
|
199
|
+
help,
|
|
200
|
+
placeholder: '#####',
|
|
201
|
+
name: scope ? scope + ':' + 'Zip' : 'Zip',
|
|
202
|
+
maxlength: 5,
|
|
203
|
+
inputmode: "numeric",
|
|
204
|
+
autocomplete: 'postal-code',
|
|
205
|
+
validation: 'required|matches:/^[0-9]{5}$/',
|
|
206
|
+
validationMessages: {
|
|
207
|
+
required: 'Zip Code is required',
|
|
208
|
+
matches: 'Invalid Zip Code'
|
|
209
|
+
},
|
|
210
|
+
...updates
|
|
211
|
+
})
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
const autoDamageFromAccident$1 = (scope) => verticalYesNoRadio({
|
|
216
|
+
name: scope ? scope + ':' + 'Auto_Damage_From_Accident' : 'Auto_Damage_From_Accident',
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
const wouldLikeMVAConsultation$1 = (scope) => verticalYesNoRadio({
|
|
220
|
+
name: scope ? scope + ':' + 'Would_Like_MVA_Consultation' : 'Would_Like_MVA_Consultation',
|
|
221
|
+
help: "Note: we'll still connect you for a mechanic.",
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
const atFaultCenter = (scope) => verticalYesNoRadio({
|
|
225
|
+
name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
const comments = (updates, scope) => textArea(
|
|
229
|
+
merge({
|
|
230
|
+
name: scope ? scope + ':' + 'Comments' : 'Comments',
|
|
231
|
+
label: 'Please briefly describe your situation in a few words:',
|
|
232
|
+
placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
|
|
233
|
+
}, updates)
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
const doctorTreatmentCenter = (scope) => verticalYesNoRadio({
|
|
237
|
+
name: scope ? scope + ':' + 'Doctor_Treatment' : 'Doctor_Treatment',
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
const haveAttorneyCenter = (scope) => verticalYesNoRadio({
|
|
241
|
+
name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
const incidentDateCenter = (scope) => verticalDate({
|
|
245
|
+
name: scope ? scope + ':' + 'Incident_Date' : 'Incident_Date',
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
const mechanicsCrossSells = () => radio({
|
|
249
|
+
id: 'Mechanics_CrossSells',
|
|
250
|
+
name: 'Mechanics_CrossSells',
|
|
251
|
+
// label: 'Click all that apply (optional):',
|
|
252
|
+
fieldsetClass: '$reset',
|
|
253
|
+
wrapperClass: 't-mb-2',
|
|
254
|
+
optionsClass: 't-pt-3',
|
|
255
|
+
legendClass: '',
|
|
256
|
+
validation: null,
|
|
257
|
+
options: {
|
|
258
|
+
// 'Auto and Car Accidents': "I was involved in a car accident",
|
|
259
|
+
'Auto Insurance': "I'd like to save on my auto insurance (optional)"
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
|
|
234
263
|
const primaryInjuryCenter = (scope) => col2RadioCenter({
|
|
235
264
|
name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
|
|
236
265
|
options: [
|
|
@@ -264,24 +293,6 @@ const TCPAConsent = (scope) => ({
|
|
|
264
293
|
}
|
|
265
294
|
});
|
|
266
295
|
|
|
267
|
-
const zipcodeCenter = (updates = {}, scope) => text({
|
|
268
|
-
placeholder: '#####',
|
|
269
|
-
help: updates.help ?? "We try to match you with local legal help",
|
|
270
|
-
name: scope ? scope + ':' + 'Zip' : 'Zip',
|
|
271
|
-
maxlength: 5,
|
|
272
|
-
inputmode: "numeric",
|
|
273
|
-
autocomplete: 'postal-code',
|
|
274
|
-
validation: 'required|matches:/^[0-9]{5}$/',
|
|
275
|
-
validationMessages: {
|
|
276
|
-
required: 'Zip Code is required',
|
|
277
|
-
matches: 'Invalid Zip Code'
|
|
278
|
-
},
|
|
279
|
-
wrapperClass: 't-flex t-justify-center',
|
|
280
|
-
messagesClass: 't-flex t-justify-center',
|
|
281
|
-
inputClass: 't-text-center',
|
|
282
|
-
helpClass: 't-mt-2.5 !t-text-sm t-text-center'
|
|
283
|
-
});
|
|
284
|
-
|
|
285
296
|
const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
|
|
286
297
|
const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
|
|
287
298
|
|
|
@@ -367,7 +378,7 @@ function verticalStepSubHeadline(updates) {
|
|
|
367
378
|
function commentsStepHeadline(updates) {
|
|
368
379
|
return {
|
|
369
380
|
$el: 'h3',
|
|
370
|
-
children: updates.headline || 'Additional
|
|
381
|
+
children: updates.headline || 'Additional Details',
|
|
371
382
|
attrs: {
|
|
372
383
|
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 || '')
|
|
373
384
|
}
|
|
@@ -387,7 +398,7 @@ function firstAndLastStepHeadline(updates) {
|
|
|
387
398
|
function contactStepHeadline(updates) {
|
|
388
399
|
return {
|
|
389
400
|
$el: 'h3',
|
|
390
|
-
children: updates.headline ||
|
|
401
|
+
children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
|
|
391
402
|
attrs: {
|
|
392
403
|
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' + ' ' + (updates.headlineClass || '')
|
|
393
404
|
}
|
|
@@ -397,7 +408,7 @@ function contactStepHeadline(updates) {
|
|
|
397
408
|
function contactStepSubHeadline(updates) {
|
|
398
409
|
return {
|
|
399
410
|
$el: 'h5',
|
|
400
|
-
children: updates.subheadline ||
|
|
411
|
+
children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
|
|
401
412
|
attrs: {
|
|
402
413
|
class: 't-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3' + ' ' + (updates.subheadlineClass || '')
|
|
403
414
|
}
|
|
@@ -437,10 +448,16 @@ const stepDefaults = (step, stepKey) => ({
|
|
|
437
448
|
}
|
|
438
449
|
});
|
|
439
450
|
|
|
440
|
-
function step(name, inputs,
|
|
441
|
-
|
|
442
|
-
nextOnEnter = true
|
|
443
|
-
|
|
451
|
+
function step(name, inputs, updates = {}) {
|
|
452
|
+
const {
|
|
453
|
+
nextOnEnter = true,
|
|
454
|
+
nextOnInput = false,
|
|
455
|
+
stepKey = undefined,
|
|
456
|
+
nextStepMap = undefined,
|
|
457
|
+
triggerRedirectMap = undefined,
|
|
458
|
+
autoFocus = undefined,
|
|
459
|
+
} = updates;
|
|
460
|
+
|
|
444
461
|
if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
|
|
445
462
|
const lastInput = findLastInput(inputs[inputs.length - 1]);
|
|
446
463
|
if (lastInput && nextOnEnter === true) {
|
|
@@ -460,6 +477,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
|
|
|
460
477
|
id: name,
|
|
461
478
|
name: name,
|
|
462
479
|
nextStepMap: nextStepMap,
|
|
480
|
+
triggerRedirectMap: triggerRedirectMap,
|
|
463
481
|
autoFocus: autoFocus,
|
|
464
482
|
children: inputs
|
|
465
483
|
}
|
|
@@ -470,64 +488,23 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
|
|
|
470
488
|
|
|
471
489
|
// Single question step
|
|
472
490
|
function sqstep(name, input, defaultHeadline, updates = {}) {
|
|
491
|
+
if (typeof updates.nextOnInput === 'undefined') {
|
|
492
|
+
updates.nextOnInput = true;
|
|
493
|
+
}
|
|
494
|
+
|
|
473
495
|
return step(
|
|
474
496
|
name,
|
|
475
497
|
[
|
|
476
498
|
verticalStepHeadline({ headline: updates.headline ?? defaultHeadline, headlineClass: updates.headlineClass }),
|
|
477
499
|
...Array.isArray(input) ? input : [input],
|
|
478
500
|
],
|
|
479
|
-
updates
|
|
480
|
-
typeof updates.nextOnInput === 'undefined' ? true : updates.nextOnInput,
|
|
481
|
-
updates.stepKey,
|
|
482
|
-
updates.nextStepMap
|
|
483
|
-
)
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
function autoDamageFromAccident(updates = {}) {
|
|
487
|
-
return step(
|
|
488
|
-
'autoDamageFromAccident',
|
|
489
|
-
[
|
|
490
|
-
autoDamageFromAccident$1(updates.scope),
|
|
491
|
-
],
|
|
492
|
-
updates.nextOnEnter,
|
|
493
|
-
updates.nextOnInput,
|
|
494
|
-
updates.stepKey,
|
|
495
|
-
updates.nextStepMap
|
|
496
|
-
)
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
function wouldLikeMVAConsultation(updates = {}) {
|
|
500
|
-
return step(
|
|
501
|
-
'wouldLikeMVAConsultation',
|
|
502
|
-
[
|
|
503
|
-
verticalStepHeadline({
|
|
504
|
-
headline: updates.headline ?? 'Do you want a free legal evaluation?',
|
|
505
|
-
}),
|
|
506
|
-
verticalStepSubHeadline({
|
|
507
|
-
subheadline: updates.subheadline ?? 'You may be entitled to compensation for your accident.',
|
|
508
|
-
subheadlineClass: '!t-text-blue-900 !t-font-semibold'
|
|
509
|
-
}),
|
|
510
|
-
{
|
|
511
|
-
$formkit: 'hidden',
|
|
512
|
-
name: "CrossSell:Auto_and_Car_Accidents:Type_Of_Legal_Problem",
|
|
513
|
-
id: "CrossSell:Auto_and_Car_Accidents:Type_Of_Legal_Problem",
|
|
514
|
-
value: "Auto and Car Accidents"
|
|
515
|
-
},
|
|
516
|
-
{
|
|
517
|
-
$formkit: 'hidden',
|
|
518
|
-
name: "CrossSell:Auto_and_Car_Accidents:vertical",
|
|
519
|
-
value: "Legal"
|
|
520
|
-
},
|
|
521
|
-
wouldLikeMVAConsultation$1(),
|
|
522
|
-
],
|
|
523
|
-
updates.nextOnEnter,
|
|
524
|
-
updates.nextOnInput,
|
|
525
|
-
updates.stepKey,
|
|
526
|
-
updates.nextStepMap
|
|
501
|
+
updates
|
|
527
502
|
)
|
|
528
503
|
}
|
|
529
504
|
|
|
530
505
|
function commentsHeadline(updates = {}) {
|
|
506
|
+
const mergedUpdates = { ...updates, nextOnEnter: false };
|
|
507
|
+
|
|
531
508
|
return step(
|
|
532
509
|
'comments',
|
|
533
510
|
[
|
|
@@ -538,7 +515,7 @@ function commentsHeadline(updates = {}) {
|
|
|
538
515
|
inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
|
|
539
516
|
}, updates.scope),
|
|
540
517
|
],
|
|
541
|
-
|
|
518
|
+
mergedUpdates
|
|
542
519
|
)
|
|
543
520
|
}
|
|
544
521
|
|
|
@@ -554,7 +531,7 @@ function commentsMechanics(updates = {}) {
|
|
|
554
531
|
}),
|
|
555
532
|
mechanicsCrossSells()
|
|
556
533
|
],
|
|
557
|
-
updates
|
|
534
|
+
updates
|
|
558
535
|
)
|
|
559
536
|
}
|
|
560
537
|
|
|
@@ -570,7 +547,7 @@ function contactInfo(updates = {}) {
|
|
|
570
547
|
TCPAConsent(updates.scope),
|
|
571
548
|
secureIcon()
|
|
572
549
|
],
|
|
573
|
-
false
|
|
550
|
+
{ nextOnEnter: false }
|
|
574
551
|
)
|
|
575
552
|
}
|
|
576
553
|
|
|
@@ -589,19 +566,57 @@ function firstAndLastV3(updates = {}, scope) {
|
|
|
589
566
|
firstName(scope),
|
|
590
567
|
lastName(scope)
|
|
591
568
|
],
|
|
592
|
-
updates
|
|
569
|
+
updates
|
|
593
570
|
)
|
|
594
571
|
}
|
|
595
572
|
|
|
596
573
|
function zipcode(updates = {}) {
|
|
597
574
|
return sqstep(
|
|
598
575
|
'zipcode',
|
|
599
|
-
|
|
576
|
+
zipcode$1(updates.scope, true, updates),
|
|
600
577
|
'Please verify your Zip Code',
|
|
601
578
|
updates
|
|
602
579
|
)
|
|
603
580
|
}
|
|
604
581
|
|
|
582
|
+
function autoDamageFromAccident(updates = {}) {
|
|
583
|
+
return step(
|
|
584
|
+
'autoDamageFromAccident',
|
|
585
|
+
[
|
|
586
|
+
autoDamageFromAccident$1(updates.scope),
|
|
587
|
+
],
|
|
588
|
+
updates
|
|
589
|
+
)
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
function wouldLikeMVAConsultation(updates = {}) {
|
|
593
|
+
return step(
|
|
594
|
+
'wouldLikeMVAConsultation',
|
|
595
|
+
[
|
|
596
|
+
verticalStepHeadline({
|
|
597
|
+
headline: updates.headline ?? 'Do you want a free legal evaluation?',
|
|
598
|
+
}),
|
|
599
|
+
verticalStepSubHeadline({
|
|
600
|
+
subheadline: updates.subheadline ?? 'You may be entitled to compensation for your accident.',
|
|
601
|
+
subheadlineClass: '!t-text-blue-900 !t-font-semibold'
|
|
602
|
+
}),
|
|
603
|
+
{
|
|
604
|
+
$formkit: 'hidden',
|
|
605
|
+
name: "CrossSell:Auto_and_Car_Accidents:Type_Of_Legal_Problem",
|
|
606
|
+
id: "CrossSell:Auto_and_Car_Accidents:Type_Of_Legal_Problem",
|
|
607
|
+
value: "Auto and Car Accidents"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
$formkit: 'hidden',
|
|
611
|
+
name: "CrossSell:Auto_and_Car_Accidents:vertical",
|
|
612
|
+
value: "Legal"
|
|
613
|
+
},
|
|
614
|
+
wouldLikeMVAConsultation$1(),
|
|
615
|
+
],
|
|
616
|
+
updates
|
|
617
|
+
)
|
|
618
|
+
}
|
|
619
|
+
|
|
605
620
|
function haveAttorney(updates = {}) {
|
|
606
621
|
return sqstep(
|
|
607
622
|
'haveAttorney',
|
|
@@ -795,9 +810,7 @@ function formProps(updates) {
|
|
|
795
810
|
return props
|
|
796
811
|
}
|
|
797
812
|
|
|
798
|
-
const metaDefaults = {
|
|
799
|
-
tcpaLanguage: TCPA_LANGUAGE
|
|
800
|
-
};
|
|
813
|
+
const metaDefaults = {};
|
|
801
814
|
|
|
802
815
|
function metaProps(updates) {
|
|
803
816
|
const data = merge(
|
|
@@ -810,7 +823,7 @@ function metaProps(updates) {
|
|
|
810
823
|
}
|
|
811
824
|
}
|
|
812
825
|
|
|
813
|
-
function
|
|
826
|
+
function defaultMetaPropsLegal(tolps = null) {
|
|
814
827
|
let commentsPlaceholders = TOLPCommentsPlaceholders;
|
|
815
828
|
let finalHeadlines = TOLPFinalHeadlines;
|
|
816
829
|
let finalSubHeadlines = TOLPFinalSubHeadlines;
|
|
@@ -820,12 +833,13 @@ function defaultMetaProps(tolps = null) {
|
|
|
820
833
|
finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
|
|
821
834
|
}
|
|
822
835
|
return metaProps({
|
|
823
|
-
|
|
836
|
+
tcpaLanguage: TCPA_LANGUAGE_LEGAL,
|
|
837
|
+
defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
|
|
824
838
|
commentsPlaceholders: commentsPlaceholders,
|
|
825
|
-
defaultFinalHeadline:
|
|
839
|
+
defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
|
|
826
840
|
finalHeadlines: finalHeadlines,
|
|
827
|
-
defaultFinalSubHeadline:
|
|
828
|
-
finalSubHeadlines: finalSubHeadlines
|
|
841
|
+
defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
|
|
842
|
+
finalSubHeadlines: finalSubHeadlines
|
|
829
843
|
})
|
|
830
844
|
}
|
|
831
845
|
|
|
@@ -1049,7 +1063,7 @@ const tolps = [
|
|
|
1049
1063
|
'Auto and Car Accidents',
|
|
1050
1064
|
];
|
|
1051
1065
|
|
|
1052
|
-
const meta =
|
|
1066
|
+
const meta = defaultMetaPropsLegal(tolps);
|
|
1053
1067
|
|
|
1054
1068
|
// All of the dynamic MVA questions get scoped
|
|
1055
1069
|
const scope = 'CrossSell:Auto_and_Car_Accidents';
|
|
@@ -1138,32 +1152,36 @@ const schema = [
|
|
|
1138
1152
|
autoDamageFromAccident({
|
|
1139
1153
|
nextOnInput: false,
|
|
1140
1154
|
nextStepMap: {
|
|
1141
|
-
|
|
1142
|
-
'
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1155
|
+
values: {
|
|
1156
|
+
'Auto_Damage_From_Accident': {
|
|
1157
|
+
'Yes': ['wouldLikeMVAConsultation', 'commentsMechanics'],
|
|
1158
|
+
'No': ['commentsMechanics'],
|
|
1159
|
+
},
|
|
1160
|
+
'*': ["commentsMechanics"]
|
|
1161
|
+
}
|
|
1146
1162
|
}
|
|
1147
1163
|
}),
|
|
1148
1164
|
wouldLikeMVAConsultation({
|
|
1149
1165
|
nextOnInput: true,
|
|
1150
1166
|
nextStepMap: {
|
|
1151
|
-
|
|
1152
|
-
'
|
|
1153
|
-
'
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
+
values: {
|
|
1168
|
+
'Would_Like_MVA_Consultation': {
|
|
1169
|
+
'Yes': [
|
|
1170
|
+
'incidentDate',
|
|
1171
|
+
'atFault',
|
|
1172
|
+
'primaryInjury',
|
|
1173
|
+
'doctorTreatment',
|
|
1174
|
+
'policeReportFiled',
|
|
1175
|
+
'haveAttorney',
|
|
1176
|
+
'comments',
|
|
1177
|
+
'zipcode',
|
|
1178
|
+
'firstAndLast',
|
|
1179
|
+
'contactInfo',
|
|
1180
|
+
],
|
|
1181
|
+
'No': ['commentsMechanics'],
|
|
1182
|
+
},
|
|
1183
|
+
'*': ["commentsMechanics"]
|
|
1184
|
+
}
|
|
1167
1185
|
}
|
|
1168
1186
|
}),
|
|
1169
1187
|
dynamicSchemaNode('Auto_Damage_From_Accident'),
|