bhl-forms 0.8.3 → 0.8.4
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/forms/accidentsAndInjuries.json +14 -1
- package/dist/forms/appraisals.json +14 -1
- package/dist/forms/business.json +14 -1
- package/dist/forms/childAndFamily.json +14 -1
- package/dist/forms/childAndFamilySingle.json +14 -1
- package/dist/forms/civilLawsuit.json +14 -1
- package/dist/forms/coins.json +14 -1
- package/dist/forms/contracts.json +14 -1
- package/dist/forms/criminal.json +14 -1
- package/dist/forms/divorce.json +14 -1
- package/dist/forms/employmentAndWorkplace.json +14 -1
- package/dist/forms/generalContractors.es.js +1865 -0
- package/dist/forms/generalContractors.iife.js +1 -0
- package/dist/forms/generalContractors.json +14 -0
- package/dist/forms/generalHomeImprovement.json +14 -1
- package/dist/forms/generalHomeImprovementThankYou.json +14 -1
- package/dist/forms/generalLegal.json +14 -1
- package/dist/forms/generalLegalJustAnswer.json +14 -1
- package/dist/forms/generalLegalPopUnder.json +14 -1
- package/dist/forms/generalLegalPopUnderSingle.json +14 -1
- package/dist/forms/generalLegalSingle.json +14 -1
- package/dist/forms/generalLegalThankYou.json +14 -1
- package/dist/forms/generalLegalThankYouConsultation.json +14 -1
- package/dist/forms/harassmentAndDiscrimination.json +14 -1
- package/dist/forms/landlordTenant.json +14 -1
- package/dist/forms/malpractice.json +14 -1
- package/dist/forms/mechanics.json +14 -1
- package/dist/forms/patentsAndIP.json +14 -1
- package/dist/forms/realEstate.json +14 -1
- package/dist/forms/repossession.json +14 -1
- package/dist/forms/ssdi.json +14 -1
- package/dist/forms/testForm.json +14 -1
- package/dist/forms/testRedirects.json +14 -1
- package/dist/forms/vets.json +14 -1
- package/dist/forms/willsAndTrusts.json +14 -1
- package/dist/forms/windows.es.js +1898 -0
- package/dist/forms/windows.iife.js +1 -0
- package/dist/forms/windows.json +14 -0
- package/package.json +1 -1
|
@@ -0,0 +1,1865 @@
|
|
|
1
|
+
function merge() {
|
|
2
|
+
return Object.assign({}, ...arguments)
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
function HomeImprovementRedirectUrl() {
|
|
6
|
+
return 'https://listings.zipcontractor.com/api/v1/redirect?zone_id=4&vertical=HomeImprovement&category=${properties.Category}&zip_code=${properties.Zip}&sub_id=${properties.vid}'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const DEFAULT_COMMENTS_LABEL = "Please briefly describe your issue in a few words:";
|
|
10
|
+
const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC =
|
|
11
|
+
'$getKey($meta, "commentsPlaceholders." + $get(Category).value, $meta.defaultCommentsPlaceholder)';
|
|
12
|
+
const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL =
|
|
13
|
+
'$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
|
|
14
|
+
const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL =
|
|
15
|
+
'$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
|
|
16
|
+
|
|
17
|
+
const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_HOME_IMPROVEMENT = DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC;
|
|
18
|
+
const DEFAULT_FINAL_HEADLINE_HOME_IMPROVEMENT = "We Found Contractors!";
|
|
19
|
+
const DEFAULT_FINAL_SUBHEADLINE_HOME_IMPROVEMENT = "Compare quotes and save. Verify contact info:";
|
|
20
|
+
const TCPA_LANGUAGE_HOME_IMPROVEMENT =
|
|
21
|
+
'By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by up to four <a href="/providers" target="_blank" class="t-text-blue-600 t-underline">contractors and partners</a> 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.';
|
|
22
|
+
const defaultHomeImprovementCrossSells = ["Painting", "Plumbing", "Electrical", "Siding", "Remodeling", "Roofing"];
|
|
23
|
+
const CROSS_SELL_OPTION_MAP_HOME_IMPROVEMENT = {
|
|
24
|
+
// Values can be a list or a map of value -> display value
|
|
25
|
+
Additions: ["Painting", "Landscaping", "Plumbing", "Appliances", "Heating and Cooling", "Driveways"],
|
|
26
|
+
// 'Appliances': [],
|
|
27
|
+
// 'Appraisals': [],
|
|
28
|
+
// 'Cabinets': [],
|
|
29
|
+
// 'Carpentry': [],
|
|
30
|
+
// 'Carpets': [],
|
|
31
|
+
// 'Cleaning': [],
|
|
32
|
+
// 'Countertops': [],
|
|
33
|
+
// 'Decks and Porches': [],
|
|
34
|
+
// 'Demolition': [],
|
|
35
|
+
// 'Doors': [],
|
|
36
|
+
// 'Driveways': [],
|
|
37
|
+
// 'Drywall and Plaster': [],
|
|
38
|
+
Electrical: ["Painting", "Plumbing", "Drywall and Plaster", "Flooring", "Remodeling", "Roofing"],
|
|
39
|
+
// 'Fencing': [],
|
|
40
|
+
Flooring: ["Painting", "Plumbing", "Electrical", "Carpentry", "Remodeling", "Roofing"],
|
|
41
|
+
// 'Foundations': [],
|
|
42
|
+
// 'Garage Doors': [],
|
|
43
|
+
"General Contractors": ["Painting", "Plumbing", "Electrical", "Flooring", "Landscaping", "Roofing"],
|
|
44
|
+
// 'Gutters': [],
|
|
45
|
+
// 'Handyman': [],
|
|
46
|
+
// 'Holiday Decorators': [],
|
|
47
|
+
// 'Smart Home': [],
|
|
48
|
+
"Home Builders": ["Painting", "Driveways", "Masonry and Concrete", "Pest Control", "Landscaping", "Windows"],
|
|
49
|
+
// 'Home Inspection': [],
|
|
50
|
+
// 'Home Organization': [],
|
|
51
|
+
// 'Home Security': [],
|
|
52
|
+
// 'Home Staging': [],
|
|
53
|
+
// 'Home Theater': [],
|
|
54
|
+
// 'Home Warranties': [],
|
|
55
|
+
// 'Hot Tubs': [],
|
|
56
|
+
// 'Heating and Cooling': [],
|
|
57
|
+
// 'Insulation': [],
|
|
58
|
+
// 'Junk Removal': [],
|
|
59
|
+
// 'Landscaping': [],
|
|
60
|
+
// 'Locksmiths': [],
|
|
61
|
+
// 'Masonry and Concrete': [],
|
|
62
|
+
// 'Restoration': [],
|
|
63
|
+
// // 'Moving': [],
|
|
64
|
+
Painting: ["Plumbing", "Electrical", "Flooring", "Remodeling", "Roofing", "Windows"],
|
|
65
|
+
// 'Pest Control': [],
|
|
66
|
+
// 'Pools': [],
|
|
67
|
+
Plumbing: ["Painting", "Appliances", "Electrical", "Flooring", "Remodeling", "Roofing"],
|
|
68
|
+
// 'Pressure Washing': [],
|
|
69
|
+
Remodeling: ["Painting", "Landscaping", "Electrical", "Flooring", "Masonry and Concrete", "Roofing"],
|
|
70
|
+
Roofing: ["Painting", "Plumbing", "Electrical", "Flooring", "Remodeling", "Windows"],
|
|
71
|
+
// 'Sheds': [],
|
|
72
|
+
// 'Siding': [],
|
|
73
|
+
// 'Solar': [],
|
|
74
|
+
// 'Tiling': [],
|
|
75
|
+
// 'Walk-in Tubs': [],
|
|
76
|
+
// 'Waterproofing': [],
|
|
77
|
+
// 'Window Cleaning': [],
|
|
78
|
+
// 'Windows': []
|
|
79
|
+
"*": defaultHomeImprovementCrossSells,
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// ------ Common Base Settings
|
|
83
|
+
|
|
84
|
+
const checkbox = (updates) => {
|
|
85
|
+
if (updates.name && !updates.id) {
|
|
86
|
+
updates.id = updates.name;
|
|
87
|
+
}
|
|
88
|
+
return merge(
|
|
89
|
+
{
|
|
90
|
+
$formkit: "checkbox",
|
|
91
|
+
validation: "required",
|
|
92
|
+
validationMessages: {
|
|
93
|
+
required: "Field is required",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
updates
|
|
97
|
+
)
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const verticalCol2Checkbox = (updates) => {
|
|
101
|
+
if (!updates || !updates.legendClass) {
|
|
102
|
+
updates.legendClass = "required t-w-[100%] t-text-center";
|
|
103
|
+
}
|
|
104
|
+
updates.fieldsetClass = "$reset t-flex t-justify-center t-flex-col";
|
|
105
|
+
updates.innerClass = "t-items-start";
|
|
106
|
+
updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
|
|
107
|
+
updates.optionClass = "t-pl-4 md:t-pl-16 md:t-min-w-[200px]";
|
|
108
|
+
updates.optionsClass = "t-pl-4 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
|
|
109
|
+
updates.messagesClass = "t-flex t-justify-center";
|
|
110
|
+
updates.helpClass = "t-mt-0 t-mb-4 !t-text-sm t-text-center";
|
|
111
|
+
return checkbox(updates)
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const radio = (updates) => {
|
|
115
|
+
if (updates.name && !updates.id) {
|
|
116
|
+
updates.id = updates.name;
|
|
117
|
+
}
|
|
118
|
+
return merge(
|
|
119
|
+
{
|
|
120
|
+
$formkit: "radio",
|
|
121
|
+
validation: "required",
|
|
122
|
+
validationMessages: {
|
|
123
|
+
required: "Field is required",
|
|
124
|
+
},
|
|
125
|
+
optionsClass: "t-pt-3 t-pl-1",
|
|
126
|
+
legendClass: "required",
|
|
127
|
+
},
|
|
128
|
+
updates
|
|
129
|
+
)
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// TODO: rename
|
|
133
|
+
const col2RadioCenter = (updates) => {
|
|
134
|
+
updates.legendClass = "required t-w-[100%] t-text-center";
|
|
135
|
+
if (typeof updates.fieldsetClass === "undefined") {
|
|
136
|
+
updates.fieldsetClass = "$reset t-flex t-justify-center";
|
|
137
|
+
}
|
|
138
|
+
updates.innerClass = "t-items-start";
|
|
139
|
+
updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
|
|
140
|
+
updates.optionClass = "t-pl-4 md:t-pl-8 md:t-min-w-[200px]";
|
|
141
|
+
updates.optionsClass = "t-pl-4 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
|
|
142
|
+
updates.messagesClass = "t-flex t-justify-center";
|
|
143
|
+
updates.helpClass = "t-mt-0 t-mb-4 !t-text-sm t-text-center";
|
|
144
|
+
return radio(updates)
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const sbsRadio = (updates) => {
|
|
148
|
+
updates.legendClass = "legend-left required";
|
|
149
|
+
updates.fieldsetClass = "$reset side-by-side";
|
|
150
|
+
updates.optionsClass = "t-pl-1";
|
|
151
|
+
updates.innerClass = "t-flex t-items-center";
|
|
152
|
+
updates.wrapperClass = "t-mb-3";
|
|
153
|
+
return radio(updates)
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const verticalRadio = (updates) => {
|
|
157
|
+
updates.legendClass = "required";
|
|
158
|
+
updates.fieldsetClass = "$reset t-flex t-justify-center";
|
|
159
|
+
updates.optionsClass = "t-pl-2 t-pt-3";
|
|
160
|
+
updates.innerClass = "t-items-center";
|
|
161
|
+
updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
|
|
162
|
+
updates.optionClass = "t-pl-4 md:t-pl-12";
|
|
163
|
+
updates.messagesClass = "t-flex t-justify-center";
|
|
164
|
+
return radio(updates)
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const select = (updates) => {
|
|
168
|
+
if (updates.name && !updates.id) {
|
|
169
|
+
updates.id = updates.name;
|
|
170
|
+
}
|
|
171
|
+
return merge(
|
|
172
|
+
{
|
|
173
|
+
$formkit: "select",
|
|
174
|
+
placeholder: "Please Select",
|
|
175
|
+
validation: "required",
|
|
176
|
+
validationMessages: {
|
|
177
|
+
required: "Field is required",
|
|
178
|
+
},
|
|
179
|
+
inputClass: "t-bg-white",
|
|
180
|
+
labelClass: "required",
|
|
181
|
+
},
|
|
182
|
+
updates
|
|
183
|
+
)
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
const sbsSelect = (updates) => {
|
|
187
|
+
updates.labelClass = "required";
|
|
188
|
+
updates.wrapperClass = "side-by-side t-items-center";
|
|
189
|
+
updates.innerClass = "select-height-content";
|
|
190
|
+
updates.helpClass = "t-mt-2.5 md:t-text-right md:t-mt-[-5px]";
|
|
191
|
+
return select(updates)
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const verticalSelect = (updates) => {
|
|
195
|
+
updates.labelClass = "required";
|
|
196
|
+
updates.wrapperClass = "t-flex t-justify-center";
|
|
197
|
+
updates.messagesClass = "t-flex t-justify-center";
|
|
198
|
+
updates.inputClass = "t-min-w-[150px] t-bg-white";
|
|
199
|
+
updates.helpClass = "t-mt-2.5 t-text-center";
|
|
200
|
+
return select(updates)
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const text = (updates) => {
|
|
204
|
+
if (updates.name && !updates.id) {
|
|
205
|
+
updates.id = updates.name;
|
|
206
|
+
}
|
|
207
|
+
return merge(
|
|
208
|
+
{
|
|
209
|
+
$formkit: "text",
|
|
210
|
+
validation: "required",
|
|
211
|
+
validationMessages: {
|
|
212
|
+
required: "Field is required",
|
|
213
|
+
},
|
|
214
|
+
labelClass: "required",
|
|
215
|
+
},
|
|
216
|
+
updates
|
|
217
|
+
)
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
const sbsText = (updates) => {
|
|
221
|
+
updates.wrapperClass = "side-by-side t-items-center";
|
|
222
|
+
return text(updates)
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
const verticalText = (updates) => {
|
|
226
|
+
updates.wrapperClass = "t-flex t-justify-center";
|
|
227
|
+
updates.messagesClass = "t-flex t-justify-center";
|
|
228
|
+
updates.inputClass = "t-text-center";
|
|
229
|
+
updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
|
|
230
|
+
return text(updates)
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const textArea = (updates) => {
|
|
234
|
+
if (updates.name && !updates.id) {
|
|
235
|
+
updates.id = updates.name;
|
|
236
|
+
}
|
|
237
|
+
return merge(
|
|
238
|
+
{
|
|
239
|
+
$formkit: "textarea",
|
|
240
|
+
rows: 5,
|
|
241
|
+
maxlength: 500,
|
|
242
|
+
validation: "required",
|
|
243
|
+
validationMessages: {
|
|
244
|
+
required: "Field is required",
|
|
245
|
+
},
|
|
246
|
+
innerClass: "t-max-w-xl",
|
|
247
|
+
labelClass: "required",
|
|
248
|
+
},
|
|
249
|
+
updates
|
|
250
|
+
)
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
// ------ Common Inputs
|
|
254
|
+
|
|
255
|
+
const address$1 = (scope, vertical, updates = {}) => {
|
|
256
|
+
const func = vertical ? verticalText : sbsText;
|
|
257
|
+
const label = vertical ? updates.label : "Street Address:";
|
|
258
|
+
return func({
|
|
259
|
+
label,
|
|
260
|
+
placeholder: "10 Example St",
|
|
261
|
+
name: scope ? scope + ":" + "Address" : "Address",
|
|
262
|
+
autocomplete: "street-address",
|
|
263
|
+
"data-tf-sensitive": "false",
|
|
264
|
+
minlength: 5,
|
|
265
|
+
maxlength: 100,
|
|
266
|
+
validationMessages: {
|
|
267
|
+
minlength: "Invalid Address",
|
|
268
|
+
required: "Address is required",
|
|
269
|
+
},
|
|
270
|
+
...updates,
|
|
271
|
+
})
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
const email = (scope, vertical, updates = {}) => {
|
|
275
|
+
const func = vertical ? verticalText : sbsText;
|
|
276
|
+
const label = vertical ? updates.label : "Email Address:";
|
|
277
|
+
return func({
|
|
278
|
+
$formkit: "email",
|
|
279
|
+
name: scope ? scope + ":" + "Email" : "Email",
|
|
280
|
+
label,
|
|
281
|
+
placeholder: "email@domain.com",
|
|
282
|
+
autocomplete: "email",
|
|
283
|
+
"data-tf-sensitive": "false",
|
|
284
|
+
validation: "required|email",
|
|
285
|
+
validationMessages: {
|
|
286
|
+
required: "Email is required",
|
|
287
|
+
email: "Invalid Email",
|
|
288
|
+
},
|
|
289
|
+
...updates,
|
|
290
|
+
})
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
const firstName = (scope, vertical, updates = {}) => {
|
|
294
|
+
const func = vertical ? verticalText : sbsText;
|
|
295
|
+
const label = vertical ? updates.label : "First Name:";
|
|
296
|
+
return func({
|
|
297
|
+
label,
|
|
298
|
+
placeholder: "First",
|
|
299
|
+
name: scope ? scope + ":" + "First_Name" : "First_Name",
|
|
300
|
+
autocomplete: "given-name",
|
|
301
|
+
validationMessages: {
|
|
302
|
+
required: "First Name is required",
|
|
303
|
+
},
|
|
304
|
+
...updates,
|
|
305
|
+
})
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
const lastName = (scope, vertical, updates = {}) => {
|
|
309
|
+
const func = vertical ? verticalText : sbsText;
|
|
310
|
+
const label = vertical ? updates.label : "Last Name:";
|
|
311
|
+
return func({
|
|
312
|
+
label,
|
|
313
|
+
placeholder: "Last",
|
|
314
|
+
name: scope ? scope + ":" + "Last_Name" : "Last_Name",
|
|
315
|
+
autocomplete: "family-name",
|
|
316
|
+
validationMessages: {
|
|
317
|
+
required: "Last Name is required",
|
|
318
|
+
},
|
|
319
|
+
...updates,
|
|
320
|
+
})
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
const phone = (scope, vertical, updates = {}) => {
|
|
324
|
+
const func = vertical ? verticalText : sbsText;
|
|
325
|
+
const label = vertical ? updates.label : "Phone Number:";
|
|
326
|
+
return func({
|
|
327
|
+
$formkit: "tel",
|
|
328
|
+
name: scope ? scope + ":" + "Primary_Phone" : "Primary_Phone",
|
|
329
|
+
label,
|
|
330
|
+
placeholder: "###-###-####",
|
|
331
|
+
maxlength: 12,
|
|
332
|
+
help: "10-digit phone number, hyphens optional",
|
|
333
|
+
autocomplete: "tel-national",
|
|
334
|
+
"data-tf-sensitive": "false",
|
|
335
|
+
validation: "required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone",
|
|
336
|
+
validationMessages: {
|
|
337
|
+
required: "Phone Number is required",
|
|
338
|
+
matches: "Invalid Phone Format, use ###-###-####",
|
|
339
|
+
valid_phone: "Invalid Phone Number",
|
|
340
|
+
},
|
|
341
|
+
helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]",
|
|
342
|
+
...updates,
|
|
343
|
+
})
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
const zipcode$1 = (scope, vertical, updates = {}) => {
|
|
347
|
+
const func = vertical ? verticalText : sbsText;
|
|
348
|
+
const label = vertical ? updates.label : "Zip Code:";
|
|
349
|
+
const help = vertical ? updates.help ?? "We try to match you with local help" : null;
|
|
350
|
+
return func({
|
|
351
|
+
label,
|
|
352
|
+
help,
|
|
353
|
+
placeholder: "#####",
|
|
354
|
+
name: scope ? scope + ":" + "Zip" : "Zip",
|
|
355
|
+
maxlength: 5,
|
|
356
|
+
inputmode: "numeric",
|
|
357
|
+
autocomplete: "postal-code",
|
|
358
|
+
validation: "required|matches:/^[0-9]{5}$/",
|
|
359
|
+
validationMessages: {
|
|
360
|
+
required: "Zip Code is required",
|
|
361
|
+
matches: "Invalid Zip Code",
|
|
362
|
+
},
|
|
363
|
+
...updates,
|
|
364
|
+
})
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
// TODO: vertical not supported yet
|
|
368
|
+
const comments = (scope, vertical, updates) =>
|
|
369
|
+
textArea(
|
|
370
|
+
merge(
|
|
371
|
+
{
|
|
372
|
+
name: scope ? scope + ":" + "Comments" : "Comments",
|
|
373
|
+
label: "Please briefly describe your situation in a few words:",
|
|
374
|
+
placeholder:
|
|
375
|
+
'For Example: "I would like help with child support payments" or "I need help with visitation rights"',
|
|
376
|
+
},
|
|
377
|
+
updates
|
|
378
|
+
)
|
|
379
|
+
);
|
|
380
|
+
|
|
381
|
+
const TCPAConsent = (scope) => ({
|
|
382
|
+
$formkit: "checkbox",
|
|
383
|
+
label: "$meta.tcpaLanguage",
|
|
384
|
+
// Necessary to get links to work in the tcpa language
|
|
385
|
+
__raw__sectionsSchema: {
|
|
386
|
+
label: { attrs: { innerHTML: "$label" } },
|
|
387
|
+
},
|
|
388
|
+
name: scope ? scope + ":" + "TCPA_Opt_In" : "TCPA_Opt_In",
|
|
389
|
+
"data-tf-sensitive": "false",
|
|
390
|
+
validation: "required|accepted",
|
|
391
|
+
validationMessages: {
|
|
392
|
+
required: "Consent is required",
|
|
393
|
+
accepted: "Consent is required",
|
|
394
|
+
},
|
|
395
|
+
classes: {
|
|
396
|
+
label: "t-text-xs t-text-slate-500 t-font-normal !t-leading-[0.9rem]",
|
|
397
|
+
},
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
// ------ Question Groups - TODO: move these go separate file groups.js
|
|
401
|
+
|
|
402
|
+
// NOTE: name must be unique within a form!
|
|
403
|
+
const group = (name, updates) => {
|
|
404
|
+
return merge(
|
|
405
|
+
{
|
|
406
|
+
$cmp: "FormKit",
|
|
407
|
+
props: {
|
|
408
|
+
type: "group",
|
|
409
|
+
key: name,
|
|
410
|
+
id: name,
|
|
411
|
+
name: name,
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
updates
|
|
415
|
+
)
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
// ------ Home Improvement
|
|
419
|
+
|
|
420
|
+
const homeImprovementCrossSells$1 = () =>
|
|
421
|
+
verticalCol2Checkbox({
|
|
422
|
+
id: "HomeImprovement_CrossSells",
|
|
423
|
+
name: "HomeImprovement_CrossSells",
|
|
424
|
+
help: 'Just hit "Next" if none apply',
|
|
425
|
+
helpClass: "t-text-center !t-text-sm",
|
|
426
|
+
validation: null,
|
|
427
|
+
options: '$getCrossSellOptions($get(form), $getVal($get(form), "Category"))',
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
const ElectricalQuestions = (condition, scope) =>
|
|
431
|
+
group("ElectricalQuestions", {
|
|
432
|
+
if: condition || '$get(Category).value == "Electrical"',
|
|
433
|
+
children: [electricalSubtype(scope), homeImprovementWorkType(scope)],
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
const FlooringQuestions = (condition, scope) =>
|
|
437
|
+
group("FlooringQuestions", {
|
|
438
|
+
if: condition || '$get(Category).value == "Flooring"',
|
|
439
|
+
children: [flooringMaterial(scope), homeImprovementWorkType(scope)],
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
const LandscapingQuestions = (condition, scope) =>
|
|
443
|
+
group("LandscapingQuestions", {
|
|
444
|
+
if: condition || '$get(Category).value == "Landscaping"',
|
|
445
|
+
children: [landscapingSubtype(scope), homeImprovementWorkType(scope)],
|
|
446
|
+
});
|
|
447
|
+
|
|
448
|
+
const PaintingQuestions = (condition, scope) =>
|
|
449
|
+
group("PaintingQuestions", {
|
|
450
|
+
if: condition || '$get(Category).value == "Painting"',
|
|
451
|
+
children: [paintingSubtype(scope), numberOfRooms(scope)],
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
const PlumbingQuestions = (condition, scope) =>
|
|
455
|
+
group("PlumbingQuestions", {
|
|
456
|
+
if: condition || '$get(Category).value == "Plumbing"',
|
|
457
|
+
children: [plumbingSubtype(scope), homeImprovementWorkType(scope)],
|
|
458
|
+
});
|
|
459
|
+
|
|
460
|
+
const RoofingQuestions = (condition, scope) =>
|
|
461
|
+
group("RoofingQuestions", {
|
|
462
|
+
if: condition || '$get(Category).value == "Roofing"',
|
|
463
|
+
children: [roofingMaterial(scope), roofingWorkType(scope)],
|
|
464
|
+
});
|
|
465
|
+
|
|
466
|
+
const timeframe$1 = (scope, vertical, updates = {}) => {
|
|
467
|
+
const func = vertical ? verticalRadio : sbsRadio;
|
|
468
|
+
const label = vertical ? updates.label : "What is the project timeframe?";
|
|
469
|
+
return func(
|
|
470
|
+
merge(
|
|
471
|
+
{
|
|
472
|
+
label,
|
|
473
|
+
name: scope ? scope + ":" + "Timeframe" : "Timeframe",
|
|
474
|
+
options: ["Immediate", "1-6 Months", "More than 6 Months"],
|
|
475
|
+
},
|
|
476
|
+
updates
|
|
477
|
+
)
|
|
478
|
+
)
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
const ownHome$1 = (scope, vertical, updates = {}) => {
|
|
482
|
+
const func = vertical ? verticalRadio : sbsRadio;
|
|
483
|
+
const label = vertical ? updates.label : "Do you own the home?";
|
|
484
|
+
return func(
|
|
485
|
+
merge(
|
|
486
|
+
{
|
|
487
|
+
label,
|
|
488
|
+
name: scope ? scope + ":" + "Own_Home" : "Own_Home",
|
|
489
|
+
options: ["Yes", "No", "No but authorized"],
|
|
490
|
+
},
|
|
491
|
+
updates
|
|
492
|
+
)
|
|
493
|
+
)
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
const homeImprovementWorkType = (scope, vertical, updates = {}) => {
|
|
497
|
+
const func = vertical ? verticalRadio : sbsRadio;
|
|
498
|
+
const label = vertical ? updates.label : "What type of work?";
|
|
499
|
+
return func(
|
|
500
|
+
merge(
|
|
501
|
+
{
|
|
502
|
+
label,
|
|
503
|
+
name: scope ? scope + ":" + "Work_Type" : "Work_Type",
|
|
504
|
+
options: ["Install or Replace", "Repair", "Not Sure or Other"],
|
|
505
|
+
},
|
|
506
|
+
updates
|
|
507
|
+
)
|
|
508
|
+
)
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
const electricalSubtype = (scope, vertical, updates = {}) => {
|
|
512
|
+
const func = vertical ? verticalSelect : sbsSelect;
|
|
513
|
+
const label = vertical ? updates.label : "What electrical job type?";
|
|
514
|
+
return func(
|
|
515
|
+
merge(
|
|
516
|
+
{
|
|
517
|
+
label,
|
|
518
|
+
name: scope ? scope + ":" + "Electrical_Subtype" : "Electrical_Subtype",
|
|
519
|
+
options: [
|
|
520
|
+
"Electrical Panel",
|
|
521
|
+
"Outlets and Fixtures",
|
|
522
|
+
"Home Theater",
|
|
523
|
+
"Exhaust Fans",
|
|
524
|
+
"Ceiling Fans",
|
|
525
|
+
"EV Charging Station",
|
|
526
|
+
"Addition or Remodel",
|
|
527
|
+
"Generator",
|
|
528
|
+
"Outdoor Lighting",
|
|
529
|
+
"Pet Fence",
|
|
530
|
+
"Thermostat",
|
|
531
|
+
"Wall or Baseboard Heater",
|
|
532
|
+
"Holiday Lighting",
|
|
533
|
+
"Not Sure or Other",
|
|
534
|
+
],
|
|
535
|
+
},
|
|
536
|
+
updates
|
|
537
|
+
)
|
|
538
|
+
)
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
const flooringMaterial = (scope, vertical, updates = {}) => {
|
|
542
|
+
const func = vertical ? verticalRadio : sbsSelect;
|
|
543
|
+
const label = vertical ? updates.label : "What flooring material?";
|
|
544
|
+
return func(
|
|
545
|
+
merge(
|
|
546
|
+
{
|
|
547
|
+
label,
|
|
548
|
+
name: scope ? scope + ":" + "Flooring_Material" : "Flooring_Material",
|
|
549
|
+
options: [
|
|
550
|
+
"Carpet",
|
|
551
|
+
"Concrete",
|
|
552
|
+
"Hardwood",
|
|
553
|
+
"Laminate",
|
|
554
|
+
"Linoleum",
|
|
555
|
+
"Slate",
|
|
556
|
+
"Tile",
|
|
557
|
+
"Vinyl",
|
|
558
|
+
"Not Sure or Other",
|
|
559
|
+
],
|
|
560
|
+
},
|
|
561
|
+
updates
|
|
562
|
+
)
|
|
563
|
+
)
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
const generalContractorSubtype = (scope, vertical, updates = {}) => {
|
|
567
|
+
const func = vertical ? col2RadioCenter : sbsRadio;
|
|
568
|
+
const label = vertical ? updates.label : "What contractor job type?";
|
|
569
|
+
return func(
|
|
570
|
+
merge(
|
|
571
|
+
{
|
|
572
|
+
label,
|
|
573
|
+
name: scope ? scope + ":" + "General_Contractor_Subtype" : "General_Contractor_Subtype",
|
|
574
|
+
options: [
|
|
575
|
+
"Remodeling",
|
|
576
|
+
"Additions",
|
|
577
|
+
"Major Home Repairs",
|
|
578
|
+
"Excavation",
|
|
579
|
+
"Demolition",
|
|
580
|
+
"Dumpster Rental",
|
|
581
|
+
"Not Sure or Other",
|
|
582
|
+
],
|
|
583
|
+
},
|
|
584
|
+
updates
|
|
585
|
+
)
|
|
586
|
+
)
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
const numberOfRooms = (scope, vertical, updates = {}) => {
|
|
590
|
+
const func = vertical ? verticalRadio : sbsRadio;
|
|
591
|
+
const label = vertical ? updates.label : "How many rooms?";
|
|
592
|
+
return func(
|
|
593
|
+
merge(
|
|
594
|
+
{
|
|
595
|
+
label,
|
|
596
|
+
name: scope ? scope + ":" + "Number_Of_Rooms" : "Number_Of_Rooms",
|
|
597
|
+
options: ["1-2", "3-4", "4-5", "5-6", "6+"],
|
|
598
|
+
},
|
|
599
|
+
updates
|
|
600
|
+
)
|
|
601
|
+
)
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
const landscapingSubtype = (scope, vertical, updates = {}) => {
|
|
605
|
+
const func = vertical ? verticalSelect : sbsSelect;
|
|
606
|
+
const label = vertical ? updates.label : "What landscaping job?";
|
|
607
|
+
return func(
|
|
608
|
+
merge(
|
|
609
|
+
{
|
|
610
|
+
label,
|
|
611
|
+
name: scope ? scope + ":" + "Landscaping_Subtype" : "Landscaping_Subtype",
|
|
612
|
+
options: [
|
|
613
|
+
"Lawn Mowing",
|
|
614
|
+
"Lawn Care or Fertilization",
|
|
615
|
+
"Yard or Leaf Cleanup",
|
|
616
|
+
"Patios or Walkways",
|
|
617
|
+
"Stonework",
|
|
618
|
+
"Architects",
|
|
619
|
+
"Landscape Construction",
|
|
620
|
+
"Outdoor Lighting",
|
|
621
|
+
"Grading",
|
|
622
|
+
"Materials Delivery",
|
|
623
|
+
"Spinklers",
|
|
624
|
+
],
|
|
625
|
+
},
|
|
626
|
+
updates
|
|
627
|
+
)
|
|
628
|
+
)
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
// TODO: need to finalize support for moving
|
|
632
|
+
|
|
633
|
+
// export const movingFromAddress = (scope) => sbsText({
|
|
634
|
+
// name: scope ? scope + ':' + 'Moving_From_Address' : 'Moving_From_Address',
|
|
635
|
+
// label: 'Moving from address',
|
|
636
|
+
// placeholder: '10 Example St',
|
|
637
|
+
// autocomplete: "street-address",
|
|
638
|
+
// 'data-tf-sensitive': 'false',
|
|
639
|
+
// maxlength: 100,
|
|
640
|
+
// validationMessages: {
|
|
641
|
+
// required: 'From address is required'
|
|
642
|
+
// }
|
|
643
|
+
// })
|
|
644
|
+
|
|
645
|
+
// export const movingToAddress = (scope) => sbsText({
|
|
646
|
+
// name: scope ? scope + ':' + 'Moving_To_Address' : 'Moving_To_Address',
|
|
647
|
+
// label: 'Moving to address',
|
|
648
|
+
// placeholder: '11 Other St',
|
|
649
|
+
// 'data-tf-sensitive': 'false',
|
|
650
|
+
// maxlength: 100,
|
|
651
|
+
// validationMessages: {
|
|
652
|
+
// required: 'To address is required'
|
|
653
|
+
// }
|
|
654
|
+
// })
|
|
655
|
+
|
|
656
|
+
// export const movingHouseholdSize = (scope) => verticalRadio({
|
|
657
|
+
// name: scope ? scope + ':' + 'Moving_Household_Size' : 'Moving_Household_Size',
|
|
658
|
+
// label: 'What is the household size?',
|
|
659
|
+
// options: [
|
|
660
|
+
// 'Less than 1000 square feet',
|
|
661
|
+
// '1000 to 2000 square feet',
|
|
662
|
+
// '2000 to 3000 square feet',
|
|
663
|
+
// 'More than 3000 square feet'
|
|
664
|
+
// ]
|
|
665
|
+
// })
|
|
666
|
+
|
|
667
|
+
const paintingSubtype = (scope, vertical, updates = {}) => {
|
|
668
|
+
const func = vertical ? verticalSelect : sbsSelect;
|
|
669
|
+
const label = vertical ? updates.label : "What painting job type?";
|
|
670
|
+
return func(
|
|
671
|
+
merge(
|
|
672
|
+
{
|
|
673
|
+
label,
|
|
674
|
+
name: scope ? scope + ":" + "Painting_Subtype" : "Painting_Subtype",
|
|
675
|
+
options: [
|
|
676
|
+
"Whole Exterior",
|
|
677
|
+
"Exterior Touch-up",
|
|
678
|
+
"Interior Rooms",
|
|
679
|
+
"Interior Touch-up",
|
|
680
|
+
"Ceilings",
|
|
681
|
+
"Deck",
|
|
682
|
+
"Shed",
|
|
683
|
+
"Cabinets",
|
|
684
|
+
"Not Sure or Other",
|
|
685
|
+
],
|
|
686
|
+
},
|
|
687
|
+
updates
|
|
688
|
+
)
|
|
689
|
+
)
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
const plumbingSubtype = (scope, vertical, updates = {}) => {
|
|
693
|
+
const func = vertical ? verticalSelect : sbsSelect;
|
|
694
|
+
const label = vertical ? updates.label : "What plumbing job type?";
|
|
695
|
+
return func(
|
|
696
|
+
merge(
|
|
697
|
+
{
|
|
698
|
+
label,
|
|
699
|
+
name: scope ? scope + ":" + "Plumbing_Subtype" : "Plumbing_Subtype",
|
|
700
|
+
options: [
|
|
701
|
+
"Tub or Shower",
|
|
702
|
+
"Drain",
|
|
703
|
+
"Sink",
|
|
704
|
+
"Toilet",
|
|
705
|
+
"Boiler",
|
|
706
|
+
"Water Heater",
|
|
707
|
+
"Sump Pump",
|
|
708
|
+
"Piping",
|
|
709
|
+
"Septic",
|
|
710
|
+
"Water Main",
|
|
711
|
+
"Hot Tub",
|
|
712
|
+
"Additions and Remodels",
|
|
713
|
+
"Not Sure or Other",
|
|
714
|
+
],
|
|
715
|
+
},
|
|
716
|
+
updates
|
|
717
|
+
)
|
|
718
|
+
)
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
const roofingWorkType = (scope, vertical, updates = {}) => {
|
|
722
|
+
const func = vertical ? verticalRadio : sbsRadio;
|
|
723
|
+
const label = vertical ? updates.label : "What type of work?";
|
|
724
|
+
return func(
|
|
725
|
+
merge(
|
|
726
|
+
{
|
|
727
|
+
label,
|
|
728
|
+
name: scope ? scope + ":" + "Roofing_Work_Type" : "Roofing_Work_Type",
|
|
729
|
+
options: ["Install or Replace Roof", "Repair Roof", "Ice Dams", "Gutters", "Not Sure or Other"],
|
|
730
|
+
},
|
|
731
|
+
updates
|
|
732
|
+
)
|
|
733
|
+
)
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
const roofingMaterial = (scope, vertical, updates = {}) => {
|
|
737
|
+
const func = vertical ? verticalSelect : sbsSelect;
|
|
738
|
+
const label = vertical ? updates.label : "What roofing material?";
|
|
739
|
+
return func(
|
|
740
|
+
merge(
|
|
741
|
+
{
|
|
742
|
+
label,
|
|
743
|
+
name: scope ? scope + ":" + "Roofing_Material" : "Roofing_Material",
|
|
744
|
+
options: [
|
|
745
|
+
"Asphalt Shingle",
|
|
746
|
+
"Metal",
|
|
747
|
+
"Composite",
|
|
748
|
+
"Flat",
|
|
749
|
+
"Foam",
|
|
750
|
+
"Tile",
|
|
751
|
+
"Wood",
|
|
752
|
+
"Slate",
|
|
753
|
+
"Not Sure or Other",
|
|
754
|
+
],
|
|
755
|
+
},
|
|
756
|
+
updates
|
|
757
|
+
)
|
|
758
|
+
)
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
const NEXT_ON_ENTER = "$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
|
|
762
|
+
const NEXT_ON_INPUT = "$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
|
|
763
|
+
|
|
764
|
+
const isInput = (n) => {
|
|
765
|
+
return n.type !== "group" && n.type !== "section" && n.type !== "form" && n.$formkit !== "hidden" && !n.children
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
const findLastInput = (n) => {
|
|
769
|
+
if (isInput(n)) {
|
|
770
|
+
return n
|
|
771
|
+
}
|
|
772
|
+
for (var i = n.children.length - 1; i >= 0; i--) {
|
|
773
|
+
if (typeof n.children === "string") {
|
|
774
|
+
continue
|
|
775
|
+
}
|
|
776
|
+
const child = n.children[i];
|
|
777
|
+
if (isInput(child)) {
|
|
778
|
+
return child
|
|
779
|
+
}
|
|
780
|
+
const res = findLastInput(child);
|
|
781
|
+
if (res) {
|
|
782
|
+
return res
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
return null
|
|
786
|
+
};
|
|
787
|
+
|
|
788
|
+
const secureIconDefault = {
|
|
789
|
+
$el: "div",
|
|
790
|
+
if: "$activeStep === $lastStep()",
|
|
791
|
+
attrs: {
|
|
792
|
+
class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500",
|
|
793
|
+
},
|
|
794
|
+
children: [
|
|
795
|
+
{
|
|
796
|
+
$el: "img",
|
|
797
|
+
attrs: {
|
|
798
|
+
loading: "lazy",
|
|
799
|
+
alt: "",
|
|
800
|
+
style: {
|
|
801
|
+
border: 0,
|
|
802
|
+
},
|
|
803
|
+
width: "25",
|
|
804
|
+
height: "25",
|
|
805
|
+
src: "https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg",
|
|
806
|
+
},
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
$el: "span",
|
|
810
|
+
children: "Secure & Encrypted",
|
|
811
|
+
attrs: {
|
|
812
|
+
class: "t-pl-2 t-pt-1 t-font-medium",
|
|
813
|
+
},
|
|
814
|
+
},
|
|
815
|
+
],
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
function secureIcon(updates) {
|
|
819
|
+
return merge(secureIconDefault, updates)
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
function crossSellQuestionsStepHeadline(updates) {
|
|
823
|
+
return {
|
|
824
|
+
$el: "h3",
|
|
825
|
+
children: updates.headline || "Tell Us About Your Situation",
|
|
826
|
+
attrs: {
|
|
827
|
+
class: "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-4 t-pt-0 t-px-1",
|
|
828
|
+
},
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
function verticalStepHeadline(updates) {
|
|
833
|
+
return {
|
|
834
|
+
$el: "h3",
|
|
835
|
+
children: updates.headline || "Tell Us About Your Situation",
|
|
836
|
+
attrs: {
|
|
837
|
+
class:
|
|
838
|
+
"t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-dark t-pb-5 t-pt-0 t-px-1" +
|
|
839
|
+
" " +
|
|
840
|
+
(updates.headlineClass || ""),
|
|
841
|
+
},
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
function verticalStepSubHeadline(updates) {
|
|
846
|
+
return {
|
|
847
|
+
$el: "h5",
|
|
848
|
+
children: updates.subheadline || "",
|
|
849
|
+
attrs: {
|
|
850
|
+
class:
|
|
851
|
+
"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" +
|
|
852
|
+
" " +
|
|
853
|
+
(updates.subheadlineClass || ""),
|
|
854
|
+
},
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
function commentsStepHeadline(updates) {
|
|
859
|
+
return {
|
|
860
|
+
$el: "h3",
|
|
861
|
+
children: updates.headline || "Additional Details",
|
|
862
|
+
attrs: {
|
|
863
|
+
class:
|
|
864
|
+
"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" +
|
|
865
|
+
" " +
|
|
866
|
+
(updates.headlineClass || ""),
|
|
867
|
+
},
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
function firstAndLastStepHeadline(updates) {
|
|
872
|
+
return {
|
|
873
|
+
$el: "h3",
|
|
874
|
+
children: updates.headline || "Please Provide a Contact Name",
|
|
875
|
+
attrs: {
|
|
876
|
+
class:
|
|
877
|
+
"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" +
|
|
878
|
+
" " +
|
|
879
|
+
(updates.headlineClass || ""),
|
|
880
|
+
},
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
function contactStepHeadline(updates) {
|
|
885
|
+
return {
|
|
886
|
+
$el: "h3",
|
|
887
|
+
children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
|
|
888
|
+
attrs: {
|
|
889
|
+
class:
|
|
890
|
+
"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" +
|
|
891
|
+
" " +
|
|
892
|
+
(updates.headlineClass || ""),
|
|
893
|
+
},
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
function contactStepSubHeadline(updates) {
|
|
898
|
+
return {
|
|
899
|
+
$el: "h5",
|
|
900
|
+
children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
|
|
901
|
+
attrs: {
|
|
902
|
+
class:
|
|
903
|
+
"t-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3" +
|
|
904
|
+
" " +
|
|
905
|
+
(updates.subheadlineClass || ""),
|
|
906
|
+
},
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
const TRUSTED_FORM_JS = `(function() {
|
|
911
|
+
if (window.xxTrustedFormLoaded) {
|
|
912
|
+
return
|
|
913
|
+
}
|
|
914
|
+
var vid = '';
|
|
915
|
+
if (typeof window.zar !== 'undefined') {
|
|
916
|
+
vid = window.zar.getVID();
|
|
917
|
+
}
|
|
918
|
+
window.xxTrustedFormLoaded = true;
|
|
919
|
+
var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'
|
|
920
|
+
var tf = document.createElement('script');
|
|
921
|
+
tf.type = 'text/javascript'; tf.async = true;
|
|
922
|
+
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();
|
|
923
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);
|
|
924
|
+
})();`;
|
|
925
|
+
|
|
926
|
+
function trustedFormScript() {
|
|
927
|
+
return {
|
|
928
|
+
$el: "script",
|
|
929
|
+
if: "$activeStep === $lastStep()",
|
|
930
|
+
children: TRUSTED_FORM_JS,
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
const stepDefaults = (step, stepKey) => ({
|
|
935
|
+
$el: "section",
|
|
936
|
+
if: '$stepEnabled("' + step + '")',
|
|
937
|
+
attrs: {
|
|
938
|
+
hidden: '$activeStep !== "' + step + '"',
|
|
939
|
+
key: stepKey ? stepKey : step,
|
|
940
|
+
},
|
|
941
|
+
});
|
|
942
|
+
|
|
943
|
+
function step(name, inputs, updates = {}) {
|
|
944
|
+
const {
|
|
945
|
+
nextOnEnter = true,
|
|
946
|
+
nextOnInput = false,
|
|
947
|
+
stepKey = undefined,
|
|
948
|
+
nextStepMap = undefined,
|
|
949
|
+
triggerRedirectMap = undefined,
|
|
950
|
+
autoFocus = undefined,
|
|
951
|
+
} = updates;
|
|
952
|
+
|
|
953
|
+
if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
|
|
954
|
+
const lastInput = findLastInput(inputs[inputs.length - 1]);
|
|
955
|
+
if (lastInput && nextOnEnter === true) {
|
|
956
|
+
lastInput.onKeypress = NEXT_ON_ENTER;
|
|
957
|
+
}
|
|
958
|
+
if (lastInput && nextOnInput === true) {
|
|
959
|
+
lastInput.onInput = NEXT_ON_INPUT;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
return merge(stepDefaults(name, stepKey), {
|
|
964
|
+
children: [
|
|
965
|
+
{
|
|
966
|
+
$formkit: "group",
|
|
967
|
+
id: name,
|
|
968
|
+
name: name,
|
|
969
|
+
nextStepMap: nextStepMap,
|
|
970
|
+
triggerRedirectMap: triggerRedirectMap,
|
|
971
|
+
autoFocus: autoFocus,
|
|
972
|
+
children: inputs,
|
|
973
|
+
},
|
|
974
|
+
],
|
|
975
|
+
})
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
// Single question step
|
|
979
|
+
function sqstep(name, input, defaultHeadline, updates = {}) {
|
|
980
|
+
if (typeof updates.nextOnInput === "undefined") {
|
|
981
|
+
updates.nextOnInput = true;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
return step(
|
|
985
|
+
name,
|
|
986
|
+
[
|
|
987
|
+
verticalStepHeadline({
|
|
988
|
+
headline: updates.headline ?? defaultHeadline,
|
|
989
|
+
headlineClass: updates.headlineClass,
|
|
990
|
+
}),
|
|
991
|
+
...(Array.isArray(input) ? input : [input]),
|
|
992
|
+
],
|
|
993
|
+
updates
|
|
994
|
+
)
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
// ------ Common Steps
|
|
998
|
+
|
|
999
|
+
function address(updates = {}) {
|
|
1000
|
+
updates.nextOnInput = typeof updates.nextOnInput === "undefined" ? false : updates.nextOnInput;
|
|
1001
|
+
return sqstep(
|
|
1002
|
+
"address",
|
|
1003
|
+
address$1(updates.scope, true, updates.input),
|
|
1004
|
+
"What is the street address of the home?",
|
|
1005
|
+
updates
|
|
1006
|
+
)
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
function commentsHeadline(updates = {}) {
|
|
1010
|
+
const mergedUpdates = { ...updates, nextOnEnter: false };
|
|
1011
|
+
|
|
1012
|
+
return step(
|
|
1013
|
+
"comments",
|
|
1014
|
+
[
|
|
1015
|
+
commentsStepHeadline(updates),
|
|
1016
|
+
comments(updates.scope, false, {
|
|
1017
|
+
label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL : updates.label,
|
|
1018
|
+
placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
|
|
1019
|
+
inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
|
|
1020
|
+
}),
|
|
1021
|
+
],
|
|
1022
|
+
mergedUpdates
|
|
1023
|
+
)
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
function contactInfo(updates = {}) {
|
|
1027
|
+
return step(
|
|
1028
|
+
"contactInfo",
|
|
1029
|
+
[
|
|
1030
|
+
contactStepHeadline(updates),
|
|
1031
|
+
contactStepSubHeadline(updates),
|
|
1032
|
+
trustedFormScript(),
|
|
1033
|
+
email(updates.scope),
|
|
1034
|
+
phone(updates.scope),
|
|
1035
|
+
TCPAConsent(updates.scope),
|
|
1036
|
+
secureIcon(),
|
|
1037
|
+
],
|
|
1038
|
+
{ nextOnEnter: false }
|
|
1039
|
+
)
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
function firstAndLastV3(updates = {}) {
|
|
1043
|
+
return step(
|
|
1044
|
+
"firstAndLast",
|
|
1045
|
+
[
|
|
1046
|
+
firstAndLastStepHeadline({
|
|
1047
|
+
headline: updates.headline ?? "Who is looking for help?",
|
|
1048
|
+
headlineClass: updates.headlineClass,
|
|
1049
|
+
}),
|
|
1050
|
+
verticalStepSubHeadline({
|
|
1051
|
+
subheadline: updates.subheadline ?? "Note: we never share info without consent",
|
|
1052
|
+
subheadlineClass: "!t-text-sm !t-text-gray-500",
|
|
1053
|
+
}),
|
|
1054
|
+
firstName(updates.scope),
|
|
1055
|
+
lastName(updates.scope),
|
|
1056
|
+
],
|
|
1057
|
+
updates
|
|
1058
|
+
)
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
function zipcode(updates = {}) {
|
|
1062
|
+
return sqstep("zipcode", zipcode$1(updates.scope, true, updates.input), "Please verify your Zip Code", updates)
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
// ------ Home Improvement
|
|
1066
|
+
|
|
1067
|
+
function homeImprovementCrossSellsStepHeadline(updates) {
|
|
1068
|
+
return {
|
|
1069
|
+
$el: "h3",
|
|
1070
|
+
children: updates.headline || "Interested in free quotes for other projects?",
|
|
1071
|
+
attrs: {
|
|
1072
|
+
class:
|
|
1073
|
+
"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" +
|
|
1074
|
+
" " +
|
|
1075
|
+
(updates.headlineClass || ""),
|
|
1076
|
+
},
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
function homeImprovementCrossSells(updates = {}) {
|
|
1081
|
+
updates.nextOnInput = false;
|
|
1082
|
+
updates.stepKey = "$get(Category).value";
|
|
1083
|
+
return step(
|
|
1084
|
+
"homeImprovementCrossSells",
|
|
1085
|
+
[homeImprovementCrossSellsStepHeadline(updates), homeImprovementCrossSells$1(updates.scope)],
|
|
1086
|
+
updates
|
|
1087
|
+
)
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
function electricalCrossSellQuestions(updates = {}) {
|
|
1091
|
+
return step(
|
|
1092
|
+
"electricalCrossSellQuestions",
|
|
1093
|
+
[
|
|
1094
|
+
crossSellQuestionsStepHeadline({ headline: "Connect With Electrical Pros" }),
|
|
1095
|
+
ElectricalQuestions("true", "CrossSell:Electrical"),
|
|
1096
|
+
comments("CrossSell:Electrical", false, {
|
|
1097
|
+
label: "Project Description:",
|
|
1098
|
+
placeholder: "Please describe your project in a few words...",
|
|
1099
|
+
inputClass: "!t-h-16",
|
|
1100
|
+
}),
|
|
1101
|
+
],
|
|
1102
|
+
updates
|
|
1103
|
+
)
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
function flooringCrossSellQuestions(updates = {}) {
|
|
1107
|
+
return step(
|
|
1108
|
+
"flooringCrossSellQuestions",
|
|
1109
|
+
[
|
|
1110
|
+
crossSellQuestionsStepHeadline({ headline: "Connect With Flooring Pros" }),
|
|
1111
|
+
FlooringQuestions("true", "CrossSell:Flooring"),
|
|
1112
|
+
comments("CrossSell:Flooring", false, {
|
|
1113
|
+
label: "Project Description:",
|
|
1114
|
+
placeholder: "Please describe your project in a few words...",
|
|
1115
|
+
inputClass: "!t-h-16",
|
|
1116
|
+
}),
|
|
1117
|
+
],
|
|
1118
|
+
updates
|
|
1119
|
+
)
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
function landscapingCrossSellQuestions(updates = {}) {
|
|
1123
|
+
return step(
|
|
1124
|
+
"landscapingCrossSellQuestions",
|
|
1125
|
+
[
|
|
1126
|
+
crossSellQuestionsStepHeadline({ headline: "Connect With a Landscaper" }),
|
|
1127
|
+
LandscapingQuestions("true", "CrossSell:Landscaping"),
|
|
1128
|
+
comments("CrossSell:Landscaping", false, {
|
|
1129
|
+
label: "Project Description:",
|
|
1130
|
+
placeholder: "Please describe your project in a few words...",
|
|
1131
|
+
inputClass: "!t-h-16",
|
|
1132
|
+
}),
|
|
1133
|
+
],
|
|
1134
|
+
updates
|
|
1135
|
+
)
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
function paintingCrossSellQuestions(updates = {}) {
|
|
1139
|
+
return step(
|
|
1140
|
+
"paintingCrossSellQuestions",
|
|
1141
|
+
[
|
|
1142
|
+
crossSellQuestionsStepHeadline({ headline: "Connect With a Painter" }),
|
|
1143
|
+
PaintingQuestions("true", "CrossSell:Painting"),
|
|
1144
|
+
comments("CrossSell:Painting", false, {
|
|
1145
|
+
label: "Project Description:",
|
|
1146
|
+
placeholder: "Please describe your project in a few words...",
|
|
1147
|
+
inputClass: "!t-h-16",
|
|
1148
|
+
}),
|
|
1149
|
+
],
|
|
1150
|
+
updates
|
|
1151
|
+
)
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
function plumbingCrossSellQuestions(updates = {}) {
|
|
1155
|
+
return step(
|
|
1156
|
+
"plumbingCrossSellQuestions",
|
|
1157
|
+
[
|
|
1158
|
+
crossSellQuestionsStepHeadline({ headline: "Connect With a Plumber" }),
|
|
1159
|
+
PlumbingQuestions("true", "CrossSell:Plumbing"),
|
|
1160
|
+
comments("CrossSell:Plumbing", false, {
|
|
1161
|
+
label: "Project Description:",
|
|
1162
|
+
placeholder: "Please describe your project in a few words...",
|
|
1163
|
+
inputClass: "!t-h-16",
|
|
1164
|
+
}),
|
|
1165
|
+
],
|
|
1166
|
+
updates
|
|
1167
|
+
)
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
function roofingCrossSellQuestions(updates = {}) {
|
|
1171
|
+
return step(
|
|
1172
|
+
"roofingCrossSellQuestions",
|
|
1173
|
+
[
|
|
1174
|
+
crossSellQuestionsStepHeadline({ headline: "Connect With a Roofer" }),
|
|
1175
|
+
RoofingQuestions("true", "CrossSell:Roofing"),
|
|
1176
|
+
comments("CrossSell:Roofing", false, {
|
|
1177
|
+
label: "Project Description:",
|
|
1178
|
+
placeholder: "Please describe your project in a few words...",
|
|
1179
|
+
inputClass: "!t-h-16",
|
|
1180
|
+
}),
|
|
1181
|
+
],
|
|
1182
|
+
updates
|
|
1183
|
+
)
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
function timeframe(updates = {}) {
|
|
1187
|
+
return sqstep(
|
|
1188
|
+
"timeframe",
|
|
1189
|
+
timeframe$1(updates.scope, true, updates.input),
|
|
1190
|
+
"What is the project timeframe?",
|
|
1191
|
+
updates
|
|
1192
|
+
)
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
function ownHome(updates = {}) {
|
|
1196
|
+
return sqstep("ownHome", ownHome$1(updates.scope, true, updates.input), "Do you own the home?", updates)
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
function generalContractorFirstStep(updates = {}) {
|
|
1200
|
+
return step(
|
|
1201
|
+
"generalContractorSubtype",
|
|
1202
|
+
[
|
|
1203
|
+
{
|
|
1204
|
+
$formkit: "hidden",
|
|
1205
|
+
name: "Category",
|
|
1206
|
+
id: "Category",
|
|
1207
|
+
value: "General Contractors",
|
|
1208
|
+
},
|
|
1209
|
+
generalContractorSubtype(updates.scope, true, updates.input),
|
|
1210
|
+
],
|
|
1211
|
+
updates
|
|
1212
|
+
)
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
const formNavigation = (updates = {}) => ({
|
|
1216
|
+
$el: "div",
|
|
1217
|
+
attrs: {
|
|
1218
|
+
class: {
|
|
1219
|
+
if: "$activeStep === $firstStep()",
|
|
1220
|
+
then: "step-nav !t-justify-center sm:!t-justify-between",
|
|
1221
|
+
else: "step-nav !t-justify-between",
|
|
1222
|
+
},
|
|
1223
|
+
},
|
|
1224
|
+
children: [
|
|
1225
|
+
{
|
|
1226
|
+
$formkit: "button",
|
|
1227
|
+
name: "back_button",
|
|
1228
|
+
onClick: "$setPreviousStep($prevStepFunc($get(form)))",
|
|
1229
|
+
children: "Back",
|
|
1230
|
+
outerClass: {
|
|
1231
|
+
if: "$activeStep === $firstStep()",
|
|
1232
|
+
then: "t-hidden sm:t-block",
|
|
1233
|
+
else: "",
|
|
1234
|
+
},
|
|
1235
|
+
style: {
|
|
1236
|
+
if: "$activeStep === $firstStep()",
|
|
1237
|
+
then: "display: none;",
|
|
1238
|
+
},
|
|
1239
|
+
classes: {
|
|
1240
|
+
input: updates.inputClass || "",
|
|
1241
|
+
},
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
$formkit: "button",
|
|
1245
|
+
name: "next_button",
|
|
1246
|
+
onClick: "$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))",
|
|
1247
|
+
children: {
|
|
1248
|
+
if: "$activeStep === $firstStep()",
|
|
1249
|
+
then: updates.startText || "Start",
|
|
1250
|
+
else: "Next",
|
|
1251
|
+
},
|
|
1252
|
+
outerClass: {
|
|
1253
|
+
if: "$activeStep === $lastStep()",
|
|
1254
|
+
then: "t-hidden",
|
|
1255
|
+
else: "",
|
|
1256
|
+
},
|
|
1257
|
+
style: {
|
|
1258
|
+
if: "$activeStep === $lastStep()",
|
|
1259
|
+
then: "display: none;",
|
|
1260
|
+
},
|
|
1261
|
+
classes: {
|
|
1262
|
+
input: updates.inputClass || "",
|
|
1263
|
+
},
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
$formkit: "submit",
|
|
1267
|
+
name: "submit_button",
|
|
1268
|
+
label: updates.submitLabel || "Submit",
|
|
1269
|
+
if: "$activeStep === $lastStep()",
|
|
1270
|
+
style: {
|
|
1271
|
+
if: "$activeStep !== $lastStep()",
|
|
1272
|
+
then: "display: none;",
|
|
1273
|
+
},
|
|
1274
|
+
classes: {
|
|
1275
|
+
input: (updates.inputClass || "") + " !t-ml-2 sm:!t-ml-auto",
|
|
1276
|
+
},
|
|
1277
|
+
},
|
|
1278
|
+
],
|
|
1279
|
+
});
|
|
1280
|
+
|
|
1281
|
+
const formDetails = () => ({
|
|
1282
|
+
$el: "pre",
|
|
1283
|
+
if: '$urlParam("fdbg", "") == 1',
|
|
1284
|
+
children: [
|
|
1285
|
+
{
|
|
1286
|
+
$el: "pre",
|
|
1287
|
+
children: "$stringify( $get(form).value )",
|
|
1288
|
+
attrs: {
|
|
1289
|
+
class: "t-text-xs",
|
|
1290
|
+
style: "overflow: scroll",
|
|
1291
|
+
},
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
$el: "pre",
|
|
1295
|
+
children: ["activeStep: ", "$activeStep"],
|
|
1296
|
+
attrs: {
|
|
1297
|
+
class: "t-text-xs",
|
|
1298
|
+
style: "overflow: scroll",
|
|
1299
|
+
},
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
$el: "pre",
|
|
1303
|
+
children: ["stepHistory: ", "$stepHistory"],
|
|
1304
|
+
attrs: {
|
|
1305
|
+
class: "t-text-xs",
|
|
1306
|
+
style: "overflow: scroll",
|
|
1307
|
+
},
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
$el: "pre",
|
|
1311
|
+
children: ["stepQueue: ", "$stepQueue"],
|
|
1312
|
+
attrs: {
|
|
1313
|
+
class: "t-text-xs",
|
|
1314
|
+
style: "overflow: scroll",
|
|
1315
|
+
},
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
$el: "pre",
|
|
1319
|
+
children: ["steps: ", "$stepKeys()"],
|
|
1320
|
+
attrs: {
|
|
1321
|
+
class: "t-text-xs",
|
|
1322
|
+
style: "overflow: scroll",
|
|
1323
|
+
},
|
|
1324
|
+
},
|
|
1325
|
+
],
|
|
1326
|
+
});
|
|
1327
|
+
|
|
1328
|
+
const formPropDefaults = {
|
|
1329
|
+
type: "form",
|
|
1330
|
+
id: "form",
|
|
1331
|
+
config: { validationVisibility: "submit" },
|
|
1332
|
+
onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
|
|
1333
|
+
plugins: "$plugins",
|
|
1334
|
+
actions: false,
|
|
1335
|
+
anchorElement: "form-anchor",
|
|
1336
|
+
useLocalStorage: true,
|
|
1337
|
+
prepop: {
|
|
1338
|
+
fromURL: true,
|
|
1339
|
+
},
|
|
1340
|
+
errorCodes: {
|
|
1341
|
+
403: { message: "An Error Occurred", abort: false },
|
|
1342
|
+
409: { abort: false },
|
|
1343
|
+
429: "An Error Occurred",
|
|
1344
|
+
504: { message: "An Error Occurred", abort: false },
|
|
1345
|
+
},
|
|
1346
|
+
formClass: "!t-max-w-[40rem]",
|
|
1347
|
+
};
|
|
1348
|
+
|
|
1349
|
+
function filterMapByKey(obj, keyList) {
|
|
1350
|
+
return Object.fromEntries(Object.entries(obj).filter(([key]) => keyList.includes(key)))
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
// export function filteredNextStepsMapLegal(keyList) {
|
|
1354
|
+
// const res = { Type_Of_Legal_Problem: filterMapByKey(nextStepsMapGeneralLegal["Type_Of_Legal_Problem"], keyList) }
|
|
1355
|
+
// res["*"] = nextStepsMapGeneralLegal["*"]
|
|
1356
|
+
// return res
|
|
1357
|
+
// }
|
|
1358
|
+
|
|
1359
|
+
function formProps(updates) {
|
|
1360
|
+
const props = merge(formPropDefaults, updates);
|
|
1361
|
+
if (props.formId && !props.name) {
|
|
1362
|
+
props.name = props.formId;
|
|
1363
|
+
}
|
|
1364
|
+
return props
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
const metaDefaults = {};
|
|
1368
|
+
|
|
1369
|
+
function metaProps(updates) {
|
|
1370
|
+
const data = merge(metaDefaults, updates);
|
|
1371
|
+
return {
|
|
1372
|
+
type: "meta",
|
|
1373
|
+
data,
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
function defaultMetaPropsHomeImprovement(category = null) {
|
|
1378
|
+
let commentsPlaceholders = HomeImprovementCommentsPlaceholders;
|
|
1379
|
+
let finalHeadlines = HomeImprovementFinalHeadlines;
|
|
1380
|
+
let finalSubHeadlines = HomeImprovementFinalSubHeadlines;
|
|
1381
|
+
if (category) {
|
|
1382
|
+
commentsPlaceholders = filterMapByKey(HomeImprovementCommentsPlaceholders, category);
|
|
1383
|
+
finalHeadlines = filterMapByKey(HomeImprovementFinalHeadlines, category);
|
|
1384
|
+
finalSubHeadlines = filterMapByKey(HomeImprovementFinalSubHeadlines, category);
|
|
1385
|
+
}
|
|
1386
|
+
return metaProps({
|
|
1387
|
+
tcpaLanguage: TCPA_LANGUAGE_HOME_IMPROVEMENT,
|
|
1388
|
+
defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_HOME_IMPROVEMENT,
|
|
1389
|
+
commentsPlaceholders: commentsPlaceholders,
|
|
1390
|
+
defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_HOME_IMPROVEMENT,
|
|
1391
|
+
finalHeadlines: finalHeadlines,
|
|
1392
|
+
defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_HOME_IMPROVEMENT,
|
|
1393
|
+
finalSubHeadlines: finalSubHeadlines,
|
|
1394
|
+
})
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
function dynamicSchemaNode(field = "Type_Of_Legal_Problem") {
|
|
1398
|
+
return {
|
|
1399
|
+
$cmp: "FormKitSchema",
|
|
1400
|
+
if: "$get(" + field + ").value",
|
|
1401
|
+
props: {
|
|
1402
|
+
schema: "$meta.dynamicSchema",
|
|
1403
|
+
data: "$buildData($meta)",
|
|
1404
|
+
},
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
const formAnchorDefaults = {
|
|
1409
|
+
$el: "div",
|
|
1410
|
+
children: [
|
|
1411
|
+
{
|
|
1412
|
+
$el: "div",
|
|
1413
|
+
attrs: {
|
|
1414
|
+
id: "form-anchor",
|
|
1415
|
+
class: "t-absolute",
|
|
1416
|
+
style: { top: "-30px", left: 0 },
|
|
1417
|
+
},
|
|
1418
|
+
},
|
|
1419
|
+
],
|
|
1420
|
+
attrs: {
|
|
1421
|
+
class: "t-relative",
|
|
1422
|
+
},
|
|
1423
|
+
};
|
|
1424
|
+
|
|
1425
|
+
function formAnchor(updates) {
|
|
1426
|
+
return merge(formAnchorDefaults, updates)
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
const progressBarDefaults = {
|
|
1430
|
+
$el: "div",
|
|
1431
|
+
attrs: {
|
|
1432
|
+
class: "t-mt-7 t-mb-5 t-w-full t-flex t-flex-col t-justify-center t-items-center",
|
|
1433
|
+
style: {
|
|
1434
|
+
if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
|
|
1435
|
+
then: "display: none",
|
|
1436
|
+
},
|
|
1437
|
+
},
|
|
1438
|
+
children: [
|
|
1439
|
+
{
|
|
1440
|
+
$el: "div",
|
|
1441
|
+
attrs: {
|
|
1442
|
+
class: "t-flex t-justify-center",
|
|
1443
|
+
},
|
|
1444
|
+
children: [
|
|
1445
|
+
{
|
|
1446
|
+
$el: "span",
|
|
1447
|
+
attrs: {
|
|
1448
|
+
id: "progress-bar-text",
|
|
1449
|
+
class: "t-text-sm t-mb-1",
|
|
1450
|
+
},
|
|
1451
|
+
children: ["0% Complete"],
|
|
1452
|
+
},
|
|
1453
|
+
],
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
$el: "div",
|
|
1457
|
+
attrs: {
|
|
1458
|
+
class: "t-bg-gray-100 t-w-9/12 t-rounded",
|
|
1459
|
+
},
|
|
1460
|
+
children: [
|
|
1461
|
+
{
|
|
1462
|
+
$el: "div",
|
|
1463
|
+
attrs: {
|
|
1464
|
+
id: "progress-bar",
|
|
1465
|
+
class:
|
|
1466
|
+
"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]",
|
|
1467
|
+
style: {
|
|
1468
|
+
transition: "width 0.5s ease",
|
|
1469
|
+
},
|
|
1470
|
+
},
|
|
1471
|
+
},
|
|
1472
|
+
],
|
|
1473
|
+
},
|
|
1474
|
+
],
|
|
1475
|
+
};
|
|
1476
|
+
|
|
1477
|
+
function progressBar(updates) {
|
|
1478
|
+
return merge(progressBarDefaults, updates)
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
function headlineDefaults(updates = {}) {
|
|
1482
|
+
return {
|
|
1483
|
+
$el: "h1",
|
|
1484
|
+
attrs: {
|
|
1485
|
+
class:
|
|
1486
|
+
"t-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3" +
|
|
1487
|
+
" " +
|
|
1488
|
+
(updates.headlineClass || ""),
|
|
1489
|
+
},
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
function headline(updates = {}) {
|
|
1494
|
+
return merge(headlineDefaults(updates), updates)
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
function subHeadlineDefaults(updates = {}) {
|
|
1498
|
+
return {
|
|
1499
|
+
$el: "h3",
|
|
1500
|
+
attrs: {
|
|
1501
|
+
class:
|
|
1502
|
+
"t-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10" +
|
|
1503
|
+
" " +
|
|
1504
|
+
(updates.subheadlineClass || ""),
|
|
1505
|
+
},
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
function subHeadline(updates = {}) {
|
|
1510
|
+
return merge(subHeadlineDefaults(updates), updates)
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
const hiddenInputsBase = [
|
|
1514
|
+
{
|
|
1515
|
+
$formkit: "hidden",
|
|
1516
|
+
name: "gclid",
|
|
1517
|
+
value: null,
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
$formkit: "hidden",
|
|
1521
|
+
name: "campaignid",
|
|
1522
|
+
value: null,
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
$formkit: "hidden",
|
|
1526
|
+
name: "s",
|
|
1527
|
+
value: null,
|
|
1528
|
+
},
|
|
1529
|
+
];
|
|
1530
|
+
|
|
1531
|
+
const hiddenInputsHomeImprovement = [
|
|
1532
|
+
{
|
|
1533
|
+
$formkit: "hidden",
|
|
1534
|
+
name: "vertical",
|
|
1535
|
+
value: "HomeImprovement",
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
$formkit: "hidden",
|
|
1539
|
+
name: "TCPA_Language",
|
|
1540
|
+
value: "$meta.tcpaLanguage",
|
|
1541
|
+
},
|
|
1542
|
+
...hiddenInputsBase,
|
|
1543
|
+
];
|
|
1544
|
+
|
|
1545
|
+
const homeImprovementRedirectMapDefaults = {
|
|
1546
|
+
"*": HomeImprovementRedirectUrl(),
|
|
1547
|
+
};
|
|
1548
|
+
|
|
1549
|
+
function homeImprovementRedirectMap(updates) {
|
|
1550
|
+
return merge(homeImprovementRedirectMapDefaults, updates)
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
// ------ Home Improvement
|
|
1554
|
+
|
|
1555
|
+
const HomeImprovementCommentsPlaceholders = {
|
|
1556
|
+
Additions: 'Example: "I would like to add a sunroom to my home"',
|
|
1557
|
+
Appliances: 'Example: "I need to repair a dishwasher"',
|
|
1558
|
+
Appraisals: 'Example: "I need to get my home appraised"',
|
|
1559
|
+
Cabinets: 'Example: "I want to install new kitchen cabinets"',
|
|
1560
|
+
Carpentry: 'Example: "I need someone to build custom shelves"',
|
|
1561
|
+
Carpets: 'Example: "I want to replace the carpets in my living room"',
|
|
1562
|
+
Cleaning: 'Example: "I need a professional cleaning service for my home"',
|
|
1563
|
+
Countertops: 'Example: "I want to install granite countertops in my kitchen"',
|
|
1564
|
+
"Decks and Porches": 'Example: "I want to build a new deck in my backyard"',
|
|
1565
|
+
Demolition: 'Example: "I need to demolish a wall in my home"',
|
|
1566
|
+
Doors: 'Example: "I want to replace the front door of my house"',
|
|
1567
|
+
Driveways: 'Example: "I need to repair my driveway"',
|
|
1568
|
+
"Drywall and Plaster": 'Example: "I need to repair a hole in my drywall"',
|
|
1569
|
+
Electrical: 'Example: "I need an electrician to install new light fixtures"',
|
|
1570
|
+
Fencing: 'Example: "I want to install a privacy fence in my backyard"',
|
|
1571
|
+
Flooring: 'Example: "I want to install hardwood flooring in my living room"',
|
|
1572
|
+
Foundations: 'Example: "I need to repair the foundation of my house"',
|
|
1573
|
+
"Garage Doors": 'Example: "I want to replace my garage door"',
|
|
1574
|
+
"General Contractors": 'Example: "I need a general contractor for a home renovation"',
|
|
1575
|
+
Gutters: 'Example: "I need to clean and repair my gutters"',
|
|
1576
|
+
Handyman: 'Example: "I need a handyman to fix various things around my house"',
|
|
1577
|
+
"Holiday Decorators": 'Example: "I want to hire someone to decorate my home for the holidays"',
|
|
1578
|
+
"Smart Home": 'Example: "I want to install a smart home automation system"',
|
|
1579
|
+
"Home Builders": 'Example: "I want to build a custom home"',
|
|
1580
|
+
"Home Inspection": 'Example: "I need a home inspection before buying a house"',
|
|
1581
|
+
"Home Organization": 'Example: "I need help organizing my closets and storage"',
|
|
1582
|
+
"Home Security": 'Example: "I want to install a home security system"',
|
|
1583
|
+
"Home Staging": 'Example: "I need a home staging service to prepare my house for sale"',
|
|
1584
|
+
"Home Theater": 'Example: "I want to set up a home theater system"',
|
|
1585
|
+
"Home Warranties": 'Example: "I want to purchase a home warranty"',
|
|
1586
|
+
"Hot Tubs": 'Example: "I want to install a hot tub in my backyard"',
|
|
1587
|
+
"Heating and Cooling": 'Example: "I need to repair my air conditioning unit"',
|
|
1588
|
+
Insulation: 'Example: "I want to improve the insulation in my home"',
|
|
1589
|
+
"Junk Removal": 'Example: "I need a service to remove junk and debris from my property"',
|
|
1590
|
+
Landscaping: 'Example: "I want to redesign my backyard landscaping"',
|
|
1591
|
+
Locksmiths: 'Example: "I need a locksmith to change the locks on my doors"',
|
|
1592
|
+
"Masonry and Concrete": 'Example: "I need to repair a cracked concrete driveway"',
|
|
1593
|
+
Restoration: 'Example: "I need water damage restoration services"',
|
|
1594
|
+
Moving: 'Example: "I need a moving company to help me relocate"',
|
|
1595
|
+
Painting: 'Example: "I want to paint the interior walls of my house"',
|
|
1596
|
+
"Pest Control": 'Example: "I need pest control services for my home"',
|
|
1597
|
+
Pools: 'Example: "I want to install a swimming pool in my backyard"',
|
|
1598
|
+
Plumbing: 'Example: "I need a plumber to fix a leaky faucet"',
|
|
1599
|
+
"Pressure Washing": 'Example: "I want to pressure wash the exterior of my house"',
|
|
1600
|
+
Remodeling: 'Example: "I want to remodel my kitchen"',
|
|
1601
|
+
Roofing: 'Example: "I need to repair a leaky roof"',
|
|
1602
|
+
Sheds: 'Example: "I want to build a storage shed in my backyard"',
|
|
1603
|
+
Siding: 'Example: "I want to replace the siding on my house"',
|
|
1604
|
+
Solar: 'Example: "I want to install solar panels on my roof"',
|
|
1605
|
+
Tiling: 'Example: "I want to install new tiles in my bathroom"',
|
|
1606
|
+
"Tree Services": 'Example: "I need a large tree removed"',
|
|
1607
|
+
"Walk-in Tubs": 'Example: "I want to install a walk-in tub in my bathroom"',
|
|
1608
|
+
Waterproofing: 'Example: "I need to waterproof my basement"',
|
|
1609
|
+
"Window Cleaning": 'Example: "I need a professional window cleaning service"',
|
|
1610
|
+
Windows: 'Example: "I want to replace 3 windows in my house"',
|
|
1611
|
+
"Not Sure or Other": 'Example: "I need general handyman services"',
|
|
1612
|
+
};
|
|
1613
|
+
|
|
1614
|
+
const HomeImprovementFinalHeadlines = {
|
|
1615
|
+
// 'Additions': '',
|
|
1616
|
+
// 'Appliances': '',
|
|
1617
|
+
// 'Appraisals': '',
|
|
1618
|
+
// 'Cabinets': '',
|
|
1619
|
+
// 'Carpentry': '',
|
|
1620
|
+
// 'Carpets': '',
|
|
1621
|
+
// 'Cleaning': '',
|
|
1622
|
+
// 'Countertops': '',
|
|
1623
|
+
// 'Decks and Porches': '',
|
|
1624
|
+
// 'Demolition': '',
|
|
1625
|
+
// 'Doors': '',
|
|
1626
|
+
// 'Driveways': '',
|
|
1627
|
+
// 'Drywall and Plaster': '',
|
|
1628
|
+
// 'Electrical': '',
|
|
1629
|
+
// 'Fencing': '',
|
|
1630
|
+
// 'Flooring': '',
|
|
1631
|
+
// 'Foundations': '',
|
|
1632
|
+
// 'Garage Doors': '',
|
|
1633
|
+
// 'General Contractors': '',
|
|
1634
|
+
// 'Gutters': '',
|
|
1635
|
+
// 'Handyman': '',
|
|
1636
|
+
// 'Holiday Decorators': '',
|
|
1637
|
+
// 'Smart Home': '',
|
|
1638
|
+
// 'Home Builders': '',
|
|
1639
|
+
// 'Home Inspection': '',
|
|
1640
|
+
// 'Home Organization': '',
|
|
1641
|
+
// 'Home Security': '',
|
|
1642
|
+
// 'Home Staging': '',
|
|
1643
|
+
// 'Home Theater': '',
|
|
1644
|
+
// 'Home Warranties': '',
|
|
1645
|
+
// 'Hot Tubs': '',
|
|
1646
|
+
// 'Heating and Cooling': '',
|
|
1647
|
+
// 'Insulation': '',
|
|
1648
|
+
// 'Junk Removal': '',
|
|
1649
|
+
// 'Landscaping': '',
|
|
1650
|
+
// 'Locksmiths': '',
|
|
1651
|
+
// 'Masonry and Concrete': '',
|
|
1652
|
+
// 'Restoration': '',
|
|
1653
|
+
// 'Moving': '',
|
|
1654
|
+
// 'Painting': '',
|
|
1655
|
+
// 'Pest Control': '',
|
|
1656
|
+
// 'Pools': '',
|
|
1657
|
+
// 'Plumbing': '',
|
|
1658
|
+
// 'Pressure Washing': '',
|
|
1659
|
+
// 'Remodeling': '',
|
|
1660
|
+
// 'Roofing': '',
|
|
1661
|
+
// 'Sheds': '',
|
|
1662
|
+
// 'Siding': '',
|
|
1663
|
+
// 'Solar': '',
|
|
1664
|
+
// 'Tiling': '',
|
|
1665
|
+
// 'Walk-in Tubs': '',
|
|
1666
|
+
// 'Waterproofing': '',
|
|
1667
|
+
// 'Window Cleaning': '',
|
|
1668
|
+
// 'Windows': '',
|
|
1669
|
+
};
|
|
1670
|
+
|
|
1671
|
+
const HomeImprovementFinalSubHeadlines = {
|
|
1672
|
+
// 'Additions': '',
|
|
1673
|
+
// 'Appliances': '',
|
|
1674
|
+
// 'Appraisals': '',
|
|
1675
|
+
// 'Cabinets': '',
|
|
1676
|
+
// 'Carpentry': '',
|
|
1677
|
+
// 'Carpets': '',
|
|
1678
|
+
// 'Cleaning': '',
|
|
1679
|
+
// 'Countertops': '',
|
|
1680
|
+
// 'Decks and Porches': '',
|
|
1681
|
+
// 'Demolition': '',
|
|
1682
|
+
// 'Doors': '',
|
|
1683
|
+
// 'Driveways': '',
|
|
1684
|
+
// 'Drywall and Plaster': '',
|
|
1685
|
+
// 'Electrical': '',
|
|
1686
|
+
// 'Fencing': '',
|
|
1687
|
+
// 'Flooring': '',
|
|
1688
|
+
// 'Foundations': '',
|
|
1689
|
+
// 'Garage Doors': '',
|
|
1690
|
+
// 'General Contractors': '',
|
|
1691
|
+
// 'Gutters': '',
|
|
1692
|
+
// 'Handyman': '',
|
|
1693
|
+
// 'Holiday Decorators': '',
|
|
1694
|
+
// 'Smart Home': '',
|
|
1695
|
+
// 'Home Builders': '',
|
|
1696
|
+
// 'Home Inspection': '',
|
|
1697
|
+
// 'Home Organization': '',
|
|
1698
|
+
// 'Home Security': '',
|
|
1699
|
+
// 'Home Staging': '',
|
|
1700
|
+
// 'Home Theater': '',
|
|
1701
|
+
// 'Home Warranties': '',
|
|
1702
|
+
// 'Hot Tubs': '',
|
|
1703
|
+
// 'Heating and Cooling': '',
|
|
1704
|
+
// 'Insulation': '',
|
|
1705
|
+
// 'Junk Removal': '',
|
|
1706
|
+
// 'Landscaping': '',
|
|
1707
|
+
// 'Locksmiths': '',
|
|
1708
|
+
// 'Masonry and Concrete': '',
|
|
1709
|
+
// 'Restoration': '',
|
|
1710
|
+
// 'Moving': '',
|
|
1711
|
+
// 'Painting': '',
|
|
1712
|
+
// 'Pest Control': '',
|
|
1713
|
+
// 'Pools': '',
|
|
1714
|
+
// 'Plumbing': '',
|
|
1715
|
+
// 'Pressure Washing': '',
|
|
1716
|
+
// 'Remodeling': '',
|
|
1717
|
+
// 'Roofing': '',
|
|
1718
|
+
// 'Sheds': '',
|
|
1719
|
+
// 'Siding': '',
|
|
1720
|
+
// 'Solar': '',
|
|
1721
|
+
// 'Tiling': '',
|
|
1722
|
+
// 'Walk-in Tubs': '',
|
|
1723
|
+
// 'Waterproofing': '',
|
|
1724
|
+
// 'Window Cleaning': '',
|
|
1725
|
+
// 'Windows': '',
|
|
1726
|
+
};
|
|
1727
|
+
|
|
1728
|
+
const nextStepsHomeImprovementDefault = [
|
|
1729
|
+
"comments",
|
|
1730
|
+
"timeframe",
|
|
1731
|
+
"ownHome",
|
|
1732
|
+
"zipcode",
|
|
1733
|
+
"address",
|
|
1734
|
+
"homeImprovementCrossSells",
|
|
1735
|
+
"firstAndLast",
|
|
1736
|
+
"contactInfo",
|
|
1737
|
+
];
|
|
1738
|
+
|
|
1739
|
+
const homeImprovementCrossSellOptionMap = CROSS_SELL_OPTION_MAP_HOME_IMPROVEMENT;
|
|
1740
|
+
|
|
1741
|
+
const nextStepsMapHomeImprovementCrossSells = {
|
|
1742
|
+
values: {
|
|
1743
|
+
HomeImprovement_CrossSells: {
|
|
1744
|
+
Appliances: ["appliancesCrossSellQuestions"],
|
|
1745
|
+
Carpentry: ["carpentryCrossSellQuestions"],
|
|
1746
|
+
Driveways: ["drivewaysCrossSellQuestions"],
|
|
1747
|
+
"Drywall and Plaster": ["drywallCrossSellQuestions"],
|
|
1748
|
+
Electrical: ["electricalCrossSellQuestions"],
|
|
1749
|
+
Flooring: ["flooringCrossSellQuestions"],
|
|
1750
|
+
"Heating and Cooling": ["heatingCoolingCrossSellQuestions"],
|
|
1751
|
+
Landscaping: ["landscapingCrossSellQuestions"],
|
|
1752
|
+
"Masonry and Concrete": ["masonryAndConcreteCrossSellQuestions"],
|
|
1753
|
+
Painting: ["paintingCrossSellQuestions"],
|
|
1754
|
+
"Pest Control": ["pestControlCrossSellQuestions"],
|
|
1755
|
+
Plumbing: ["plumbingCrossSellQuestions"],
|
|
1756
|
+
Remodeling: ["remodelingCrossSellQuestions"],
|
|
1757
|
+
Roofing: ["roofingCrossSellQuestions"],
|
|
1758
|
+
Siding: ["sidingCrossSellQuestions"],
|
|
1759
|
+
Windows: ["windowsCrossSellQuestions"],
|
|
1760
|
+
// TODO:
|
|
1761
|
+
// Insulation, Cabinets, Countertops, Decks and Porches, Doors,
|
|
1762
|
+
// Fencing, Gutters, Handyman, Pressure Washing
|
|
1763
|
+
},
|
|
1764
|
+
"*": ["firstAndLast", "contactInfo"],
|
|
1765
|
+
},
|
|
1766
|
+
// NOTE: this assumes a certain placement of the cross sell question
|
|
1767
|
+
// in the form flow.
|
|
1768
|
+
appendSteps: ["firstAndLast", "contactInfo"],
|
|
1769
|
+
// TODO: revisit what's allowed here
|
|
1770
|
+
matchesAllowed: 1,
|
|
1771
|
+
};
|
|
1772
|
+
|
|
1773
|
+
const meta = defaultMetaPropsHomeImprovement();
|
|
1774
|
+
|
|
1775
|
+
meta.data.dynamicSchema = [
|
|
1776
|
+
zipcode(),
|
|
1777
|
+
timeframe(),
|
|
1778
|
+
ownHome(),
|
|
1779
|
+
address(),
|
|
1780
|
+
commentsHeadline({
|
|
1781
|
+
label: null,
|
|
1782
|
+
headline: "Please briefly describe your project:",
|
|
1783
|
+
headlineClass: "!t-text-dark",
|
|
1784
|
+
}),
|
|
1785
|
+
firstAndLastV3({
|
|
1786
|
+
headlineClass: "!t-text-dark",
|
|
1787
|
+
}),
|
|
1788
|
+
// NOTE: commented out cross sells that currently aren't mapped
|
|
1789
|
+
// as options for GC.
|
|
1790
|
+
// steps.appliancesCrossSellQuestions(),
|
|
1791
|
+
// steps.carpentryCrossSellQuestions(),
|
|
1792
|
+
// steps.drivewaysCrossSellQuestions(),
|
|
1793
|
+
// steps.drywallAndPlasterCrossSellQuestions(),
|
|
1794
|
+
electricalCrossSellQuestions(),
|
|
1795
|
+
flooringCrossSellQuestions(),
|
|
1796
|
+
// steps.heatingCoolingCrossSellQuestions(),
|
|
1797
|
+
landscapingCrossSellQuestions(),
|
|
1798
|
+
// steps.masonryAndConcreteCrossSellQuestions(),
|
|
1799
|
+
paintingCrossSellQuestions(),
|
|
1800
|
+
// steps.pestControlCrossSellQuestions(),
|
|
1801
|
+
plumbingCrossSellQuestions(),
|
|
1802
|
+
// steps.remodelingCrossSellQuestions(),
|
|
1803
|
+
roofingCrossSellQuestions(),
|
|
1804
|
+
// steps.sidingCrossSellQuestions(),
|
|
1805
|
+
// steps.windowsCrossSellQuestions(),
|
|
1806
|
+
homeImprovementCrossSells({
|
|
1807
|
+
headlineClass: "!t-text-dark",
|
|
1808
|
+
nextStepMap: nextStepsMapHomeImprovementCrossSells,
|
|
1809
|
+
}),
|
|
1810
|
+
];
|
|
1811
|
+
|
|
1812
|
+
const schema = [
|
|
1813
|
+
meta,
|
|
1814
|
+
formAnchor(),
|
|
1815
|
+
{
|
|
1816
|
+
$cmp: "FormKit",
|
|
1817
|
+
props: formProps({
|
|
1818
|
+
formId: "generalContractors",
|
|
1819
|
+
redirectMap: homeImprovementRedirectMap(),
|
|
1820
|
+
crossSellOptionMap: homeImprovementCrossSellOptionMap,
|
|
1821
|
+
}),
|
|
1822
|
+
children: [
|
|
1823
|
+
progressBar(),
|
|
1824
|
+
headline({
|
|
1825
|
+
children: '$urlParam("hl", "Get Started Here!")',
|
|
1826
|
+
if: "$activeStep === $firstStep()",
|
|
1827
|
+
}),
|
|
1828
|
+
subHeadline({
|
|
1829
|
+
children: '$urlParam("shl", "Why do you need a contractor?")',
|
|
1830
|
+
if: "$activeStep === $firstStep()",
|
|
1831
|
+
subheadlineClass: "!t-font-bold !t-text-[#465f87]",
|
|
1832
|
+
}),
|
|
1833
|
+
...hiddenInputsHomeImprovement,
|
|
1834
|
+
{
|
|
1835
|
+
$el: "div",
|
|
1836
|
+
attrs: {
|
|
1837
|
+
class: "form-body",
|
|
1838
|
+
},
|
|
1839
|
+
children: [
|
|
1840
|
+
generalContractorFirstStep({
|
|
1841
|
+
nextOnInput: false,
|
|
1842
|
+
headlineClass: "t-text-lg",
|
|
1843
|
+
nextStepMap: {
|
|
1844
|
+
values: {
|
|
1845
|
+
"*": nextStepsHomeImprovementDefault,
|
|
1846
|
+
},
|
|
1847
|
+
},
|
|
1848
|
+
}),
|
|
1849
|
+
dynamicSchemaNode("Category"),
|
|
1850
|
+
contactInfo({
|
|
1851
|
+
headlineClass: "!t-text-[#465f87]",
|
|
1852
|
+
subheadlineClass: "!t-text-[#353739]",
|
|
1853
|
+
}),
|
|
1854
|
+
formNavigation({
|
|
1855
|
+
startText: "Get Quotes",
|
|
1856
|
+
inputClass: "!t-text-black !t-font-extrabold !t-bg-[#ffce51]",
|
|
1857
|
+
}),
|
|
1858
|
+
formDetails(),
|
|
1859
|
+
],
|
|
1860
|
+
},
|
|
1861
|
+
],
|
|
1862
|
+
},
|
|
1863
|
+
];
|
|
1864
|
+
|
|
1865
|
+
export { schema as default };
|