mod-build 3.7.0 → 3.7.2-7.beta-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +100 -0
- package/gulp-tasks/build.js +4 -4
- package/gulp-tasks/clean.js +8 -1
- package/gulp-tasks/get-default-trade-questions.js +155 -0
- package/gulp-tasks/grab-cdn.js +26 -21
- package/gulp-tasks/grab-mhsadmin-data.js +418 -0
- package/gulp-tasks/grab-section-deals-components.js +47 -0
- package/gulp-tasks/grab-shared-scripts.js +21 -5
- package/gulp-tasks/serve.js +5 -5
- package/gulp-tasks/tasks.js +36 -3
- package/gulp-tasks/templates.js +95 -12
- package/package.json +1 -1
- package/src/scripts/vendor/heap-addeventproperties-identify.js +1 -1
- package/src/scripts/vendor/heap-tracking.js +1 -1
- package/src/scripts/vendor/heap-vwo.js +1 -1
- package/src/scripts/vendor/visual-website-optimizer.js +7 -8
- package/src/templates/_partials/scripts/vwo-redirect-callback.html +20 -0
- package/src/trade-questions/alerts_medical.js +111 -0
- package/src/trade-questions/bathroom_refacing.js +96 -0
- package/src/trade-questions/cabinet_refacing.js +251 -0
- package/src/trade-questions/cabinets.js +35 -0
- package/src/trade-questions/concrete_foundation.js +57 -0
- package/src/trade-questions/door.js +143 -0
- package/src/trade-questions/flooring.js +185 -0
- package/src/trade-questions/garage_door.js +89 -0
- package/src/trade-questions/gutters.js +45 -0
- package/src/trade-questions/home_security.js +130 -0
- package/src/trade-questions/home_warranty.js +57 -0
- package/src/trade-questions/hot_tubs.js +92 -0
- package/src/trade-questions/hvac.js +179 -0
- package/src/trade-questions/index.js +26 -0
- package/src/trade-questions/insulation.js +118 -0
- package/src/trade-questions/plumbing.js +260 -0
- package/src/trade-questions/roofing.js +118 -0
- package/src/trade-questions/siding.js +150 -0
- package/src/trade-questions/solar.js +69 -0
- package/src/trade-questions/stair_lifts.js +47 -0
- package/src/trade-questions/tree_services.js +169 -0
- package/src/trade-questions/walk_in_tubs.js +47 -0
- package/src/trade-questions/water_treatment.js +48 -0
- package/src/trade-questions/windows.js +132 -0
- package/src/trade-questions-config.js +139 -0
package/gulp-tasks/templates.js
CHANGED
|
@@ -8,7 +8,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
8
8
|
const { isLocal, nodeEnv, buildPath } = siteSettings;
|
|
9
9
|
const { isWhiteLabel } = siteData;
|
|
10
10
|
const isPathSubdirectory = siteData.siteData && siteData.siteData.pathSubdirectory || siteData && siteData.pathSubdirectory;
|
|
11
|
-
|
|
11
|
+
const pathSubdirectory = !isLocal && isPathSubdirectory ? isPathSubdirectory : '';
|
|
12
12
|
|
|
13
13
|
var commonData = require('../src/data/common.js');
|
|
14
14
|
|
|
@@ -85,7 +85,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
85
85
|
console.warn(
|
|
86
86
|
'• Expression: {{x \'' + expression + '\'}}\n'
|
|
87
87
|
+ '• JS-Error: ', e, '\n'
|
|
88
|
-
|
|
88
|
+
+ '• Context: ',
|
|
89
89
|
context
|
|
90
90
|
);
|
|
91
91
|
}
|
|
@@ -94,6 +94,9 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
94
94
|
return result;
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
+
var tradesWithTcpaAboveCta = ['HOME_SECURITY'];
|
|
98
|
+
var sitesWithTcpaBelowCta = ['go.jacuzzi.com'];
|
|
99
|
+
|
|
97
100
|
// Support helper functions
|
|
98
101
|
var handlebarsHelpers = [
|
|
99
102
|
// Run any js line
|
|
@@ -218,6 +221,35 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
218
221
|
}
|
|
219
222
|
return output.trim();
|
|
220
223
|
}
|
|
224
|
+
},
|
|
225
|
+
// If we need to grab a data attribute value that is set in attributes: { data: {} }
|
|
226
|
+
{
|
|
227
|
+
name: 'getDataAttributeValue',
|
|
228
|
+
fn: function(obj, key) {
|
|
229
|
+
return obj && obj[key] ? obj[key] : '';
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: 'addTcpaAboveCta',
|
|
234
|
+
fn: function(page) {
|
|
235
|
+
if (!page || !page.primary_trade) {
|
|
236
|
+
return false;
|
|
237
|
+
}
|
|
238
|
+
const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
|
|
239
|
+
const site = page.website_name?.toLowerCase();
|
|
240
|
+
return (tradesWithTcpaAboveCta.includes(trade) || page.isBranded) && !sitesWithTcpaBelowCta.includes(site);
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: 'addTcpaBelowCta',
|
|
245
|
+
fn: function(page) {
|
|
246
|
+
if (!page || !page.primary_trade) {
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
|
|
250
|
+
const site = page.website_name?.toLowerCase();
|
|
251
|
+
return (!tradesWithTcpaAboveCta.includes(trade) && !page.isBranded) || sitesWithTcpaBelowCta.includes(site);
|
|
252
|
+
}
|
|
221
253
|
}
|
|
222
254
|
];
|
|
223
255
|
|
|
@@ -294,7 +326,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
294
326
|
encoding: 'latin1'
|
|
295
327
|
};
|
|
296
328
|
console.time('Finished fetch-tcpa-from-sitegenie after');
|
|
297
|
-
console.log('Starting fetch-tcpa-from-sitegenie: ',url);
|
|
329
|
+
console.log('Starting fetch-tcpa-from-sitegenie: ', url);
|
|
298
330
|
await new Promise(function(resolve) {
|
|
299
331
|
request(reqConfig, async function(_err, xhr, response) {
|
|
300
332
|
if (xhr.statusCode !== 200) {
|
|
@@ -320,16 +352,67 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
320
352
|
};
|
|
321
353
|
|
|
322
354
|
var getConsentCaptureLanguage = async function() {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
355
|
+
const requestPromise = (url) => {
|
|
356
|
+
return new Promise((resolve, reject) => {
|
|
357
|
+
request(url, (error, xhr, response) => {
|
|
358
|
+
if (error) {
|
|
359
|
+
reject(error);
|
|
360
|
+
} else {
|
|
361
|
+
resolve({ xhr, response });
|
|
362
|
+
}
|
|
363
|
+
});
|
|
331
364
|
});
|
|
332
|
-
}
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
try {
|
|
368
|
+
const tcpaContent = `https://${siteSettings.nodeEnv}/quote/resources/mod-site/consent-capture/tcpa.json`;
|
|
369
|
+
const { xhr: tcpaXhr, response: tcpaResponse } = await requestPromise(tcpaContent);
|
|
370
|
+
|
|
371
|
+
if (tcpaXhr.statusCode !== 200) {
|
|
372
|
+
throw new Error(`${tcpaXhr.statusCode}: Error while fetching tcpa.json`);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
let brandedDisplayName = '';
|
|
376
|
+
const responseJson = JSON.parse(tcpaResponse),
|
|
377
|
+
service = templatesData.service ? templatesData.service.toLowerCase().replace('_', ' ') : templatesData.primary_trade.toLowerCase().replace('_', ' ');
|
|
378
|
+
let consentCaptureObject = responseJson;
|
|
379
|
+
|
|
380
|
+
consentCaptureObject = JSON.parse(JSON.stringify(consentCaptureObject).replace(/\/resources/g, `${pathSubdirectory ? pathSubdirectory : '/'}resources`));
|
|
381
|
+
|
|
382
|
+
const brandedSiteIdentifiers = `https://${siteSettings.nodeEnv}/quote/resources/mod-site/data/branded-site-identifiers.json`;
|
|
383
|
+
const { xhr: brandedXhr, response: brandedResponse } = await requestPromise(brandedSiteIdentifiers);
|
|
384
|
+
|
|
385
|
+
if (brandedXhr.statusCode !== 200) {
|
|
386
|
+
throw new Error(`${brandedXhr.statusCode}: Error while fetching branded-site-identifiers.json`);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
const brandedResponseJson = JSON.parse(brandedResponse);
|
|
390
|
+
|
|
391
|
+
if (templatesData.isBranded) {
|
|
392
|
+
const websiteName = templatesData.website_name;
|
|
393
|
+
if (brandedResponseJson[websiteName] && brandedResponseJson[websiteName].vendorPublicIdentifier) {
|
|
394
|
+
const vendorPublicIdentifier = brandedResponseJson[websiteName].vendorPublicIdentifier,
|
|
395
|
+
apiDomain = 'https://form-service-hs.qnst.com/',
|
|
396
|
+
apiUrl = `${apiDomain}utils/vendor-display-name?vendorKeys=${vendorPublicIdentifier}`;
|
|
397
|
+
|
|
398
|
+
const { xhr: displayNameXhr, response: displayNameResponse } = await requestPromise(apiUrl);
|
|
399
|
+
|
|
400
|
+
if (displayNameXhr.statusCode !== 200) {
|
|
401
|
+
throw new Error(`${displayNameXhr.statusCode}: Error while getting branded display name from HS Form Service`);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
const displayNameResponseJson = JSON.parse(displayNameResponse);
|
|
405
|
+
brandedDisplayName = displayNameResponseJson.data[vendorPublicIdentifier];
|
|
406
|
+
consentCaptureObject.brandedConsentCapture.tcpaStart = responseJson.brandedConsentCapture.tcpaStart.replace(/<span data-branded-consent><\/span>/g, `<span data-branded-consent>${brandedDisplayName}</span>`);
|
|
407
|
+
consentCaptureObject.brandedIncludeExclusivelyConsentCapture.tcpaStart = responseJson.brandedIncludeExclusivelyConsentCapture.tcpaStart.replace(/<span data-branded-consent><\/span>/g, `<span data-branded-consent>${brandedDisplayName}</span>`);
|
|
408
|
+
consentCaptureObject.brandedIncludeServiceConsentCapture.tcpaStart = responseJson.brandedIncludeServiceConsentCapture.tcpaStart.replace(/<span data-branded-consent><\/span>/g, `<span data-branded-consent>${brandedDisplayName}</span>`).replace(/<span data-service><\/span>/g, `<span data-service>${service}</span>`);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
Object.assign(templatesData, consentCaptureObject);
|
|
413
|
+
} catch (error) {
|
|
414
|
+
console.error('Error fetching data:', error);
|
|
415
|
+
}
|
|
333
416
|
};
|
|
334
417
|
|
|
335
418
|
return async function() {
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
if (window.Modalytics
|
|
1
|
+
if (window.Modalytics) {
|
|
2
2
|
var heapIsDevEnv = window.location.host.match(new RegExp('(' + ['qa.', 'staging.', 'localhost', '.local', '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}'].join('|') + ')', 'i'));
|
|
3
3
|
// dev env id "3986615799"
|
|
4
4
|
if (!heapIsDevEnv) {
|
|
@@ -20,7 +20,7 @@ _vis_opt_queue.push(function() {
|
|
|
20
20
|
// Use the _vis_data object created above to fetch the data,
|
|
21
21
|
// key of the object is the Test ID and the value is Variation Name
|
|
22
22
|
if (_vis_counter) {
|
|
23
|
-
if (window.Modalytics &&
|
|
23
|
+
if (window.Modalytics && window.heap && window.heap.appid) {
|
|
24
24
|
heap.addUserProperties(window._vis_data);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
var _vis_opt_cookieDays=1;
|
|
3
|
-
var _vwo_code=(function(){
|
|
1
|
+
window._vwo_code || (function() {
|
|
4
2
|
var account_id=37264,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
version=2.1,
|
|
4
|
+
settings_tolerance=2000,
|
|
5
|
+
hide_element='body',
|
|
6
|
+
hide_element_style = 'opacity:0 !important;filter:alpha(opacity=0) !important;background:none !important;transition:none !important;',
|
|
7
|
+
/* DO NOT EDIT BELOW THIS LINE */
|
|
8
|
+
f=false,w=window,d=document,v=d.querySelector('#vwoCode'),cK='_vwo_'+account_id+'_settings',cc={};try{var c=JSON.parse(localStorage.getItem('_vwo_'+account_id+'_config'));cc=c&&typeof c==='object'?c:{}}catch(e){}var stT=cc.stT==='session'?w.sessionStorage:w.localStorage;code={nonce:v&&v.nonce,use_existing_jquery:function(){return typeof use_existing_jquery!=='undefined'?use_existing_jquery:undefined},library_tolerance:function(){return typeof library_tolerance!=='undefined'?library_tolerance:undefined},settings_tolerance:function(){return cc.sT||settings_tolerance},hide_element_style:function(){return'{'+(cc.hES||hide_element_style)+'}'},hide_element:function(){if(performance.getEntriesByName('first-contentful-paint')[0]){return''}return typeof cc.hE==='string'?cc.hE:hide_element},getVersion:function(){return version},finish:function(e){if(!f){f=true;var t=d.getElementById('_vis_opt_path_hides');if(t)t.parentNode.removeChild(t);if(e)(new Image).src='https://dev.visualwebsiteoptimizer.com/ee.gif?a='+account_id+e}},finished:function(){return f},addScript:function(e){var t=d.createElement('script');t.type='text/javascript';if(e.src){t.src=e.src}else{t.text=e.text}v&&t.setAttribute('nonce',v.nonce);d.getElementsByTagName('head')[0].appendChild(t)},load:function(e,t){var n=this.getSettings(),i=d.createElement('script'),r=this;t=t||{};if(n){i.textContent=n;d.getElementsByTagName('head')[0].appendChild(i);if(!w.VWO||VWO.caE){stT.removeItem(cK);r.load(e)}}else{var o=new XMLHttpRequest;o.open('GET',e,true);o.withCredentials=!t.dSC;o.responseType=t.responseType||'text';o.onload=function(){if(t.onloadCb){return t.onloadCb(o,e)}if(o.status===200||o.status===304){_vwo_code.addScript({text:o.responseText})}else{_vwo_code.finish('&e=loading_failure:'+e)}};o.onerror=function(){if(t.onerrorCb){return t.onerrorCb(e)}_vwo_code.finish('&e=loading_failure:'+e)};o.send()}},getSettings:function(){try{var e=stT.getItem(cK);if(!e){return}e=JSON.parse(e);if(Date.now()>e.e){stT.removeItem(cK);return}return e.s}catch(e){return}},init:function(){if(d.URL.indexOf('__vwo_disable__')>-1)return;var e=this.settings_tolerance();w._vwo_settings_timer=setTimeout(function(){_vwo_code.finish();stT.removeItem(cK)},e);var t;if(this.hide_element()!=='body'){t=d.createElement('style');var n=this.hide_element(),i=n?n+this.hide_element_style():'',r=d.getElementsByTagName('head')[0];t.setAttribute('id','_vis_opt_path_hides');v&&t.setAttribute('nonce',v.nonce);t.setAttribute('type','text/css');if(t.styleSheet)t.styleSheet.cssText=i;else t.appendChild(d.createTextNode(i));r.appendChild(t)}else{t=d.getElementsByTagName('head')[0];var i=d.createElement('div');i.style.cssText='z-index: 2147483647 !important;position: fixed !important;left: 0 !important;top: 0 !important;width: 100% !important;height: 100% !important;background: white !important;display: block !important;';i.setAttribute('id','_vis_opt_path_hides');i.classList.add('_vis_hide_layer');t.parentNode.insertBefore(i,t.nextSibling)}var o=window._vis_opt_url||d.URL,s='https://dev.visualwebsiteoptimizer.com/j.php?a='+account_id+'&u='+encodeURIComponent(o)+'&vn='+version;if(w.location.search.indexOf('_vwo_xhr')!==-1){this.addScript({src:s})}else{this.load(s+'&x=true')}}};w._vwo_code=code;code.init();})();
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
window.VWO = window.VWO || [];
|
|
3
|
+
window.VWO.push(['onEventReceive', 'vA', function (data) {
|
|
4
|
+
var experimentId = data[1];
|
|
5
|
+
var variationId = data[2];
|
|
6
|
+
var variationName = _vwo_exp[experimentId].comb_n[variationId];
|
|
7
|
+
if (typeof(_vwo_exp[experimentId].comb_n[variationId]) !== 'undefined' && ['VISUAL_AB', 'VISUAL', 'SPLIT_URL','SURVEY'].indexOf(_vwo_exp[experimentId].type) > -1) {
|
|
8
|
+
window._vwo_campaignData = {
|
|
9
|
+
[experimentId]: {
|
|
10
|
+
n: variationName
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
if (variationId != 1 && window.addVwoTestAttribute) {
|
|
14
|
+
// Control is assigned variation ID 1 - variations receive incremented IDs starting from 2
|
|
15
|
+
const adjustedVariationId = variationId - 1;
|
|
16
|
+
const vwoTestAttrValue = `${experimentId}-${adjustedVariationId}`;
|
|
17
|
+
document.body.setAttribute('data-vwo-test', vwoTestAttrValue);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}]);
|
|
21
|
+
|
|
2
22
|
{{ fileInclude 'node_modules/mod-build/src/scripts/has-qs-params.js' }}
|
|
3
23
|
{{ fileInclude 'node_modules/mod-build/src/scripts/url-cleaner.js' }}
|
|
4
24
|
{{ fileInclude 'node_modules/mod-build/src/scripts/vendor/visual-website-optimizer.js' }}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
const alerts_medical = {
|
|
3
|
+
WhoseMedicalAlert: {
|
|
4
|
+
fields: [
|
|
5
|
+
{
|
|
6
|
+
legend: {
|
|
7
|
+
text: 'Who is the medical alert for?'
|
|
8
|
+
},
|
|
9
|
+
options: [
|
|
10
|
+
{
|
|
11
|
+
text: 'Myself',
|
|
12
|
+
attributes: {
|
|
13
|
+
name: 'WhoseMedicalAlert',
|
|
14
|
+
value: 'Myself',
|
|
15
|
+
checked: '',
|
|
16
|
+
data: {
|
|
17
|
+
required: 'nonempty'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
text: 'Somebody Else',
|
|
23
|
+
attributes: {
|
|
24
|
+
name: 'WhoseMedicalAlert',
|
|
25
|
+
value: 'SomebodyElse',
|
|
26
|
+
data: {
|
|
27
|
+
required: 'nonempty'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
MedicalAlertProtectionAt: {
|
|
36
|
+
fields: [
|
|
37
|
+
{
|
|
38
|
+
legend: {
|
|
39
|
+
text: 'Are you looking for protection at home or on the go?'
|
|
40
|
+
},
|
|
41
|
+
options: [
|
|
42
|
+
{
|
|
43
|
+
text: 'At Home',
|
|
44
|
+
attributes: {
|
|
45
|
+
name: 'MedicalAlertProtectionAt',
|
|
46
|
+
value: 'Home',
|
|
47
|
+
checked: '',
|
|
48
|
+
data: {
|
|
49
|
+
required: 'nonempty'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
text: 'On the Go',
|
|
55
|
+
attributes: {
|
|
56
|
+
name: 'MedicalAlertProtectionAt',
|
|
57
|
+
value: 'OnTheGo',
|
|
58
|
+
data: {
|
|
59
|
+
required: 'nonempty'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
text: 'Both',
|
|
65
|
+
attributes: {
|
|
66
|
+
name: 'MedicalAlertProtectionAt',
|
|
67
|
+
value: 'Both',
|
|
68
|
+
data: {
|
|
69
|
+
required: 'nonempty'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
HasLandlineAtHome: {
|
|
78
|
+
fields: [
|
|
79
|
+
{
|
|
80
|
+
legend: {
|
|
81
|
+
text: 'Do you have a landline telephone at home?',
|
|
82
|
+
},
|
|
83
|
+
options: [
|
|
84
|
+
{
|
|
85
|
+
text: 'Yes',
|
|
86
|
+
attributes: {
|
|
87
|
+
name: 'HasLandlineAtHome',
|
|
88
|
+
value: 'Yes',
|
|
89
|
+
checked: '',
|
|
90
|
+
data: {
|
|
91
|
+
required: 'nonempty'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
text: 'No',
|
|
97
|
+
attributes: {
|
|
98
|
+
name: 'HasLandlineAtHome',
|
|
99
|
+
value: 'No',
|
|
100
|
+
data: {
|
|
101
|
+
required: 'nonempty'
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
module.exports = alerts_medical;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
const bathroom_refacing = {
|
|
3
|
+
BathProjectScope: {
|
|
4
|
+
fields: [
|
|
5
|
+
{
|
|
6
|
+
legend: {
|
|
7
|
+
text: 'Which of these best describe your needs?'
|
|
8
|
+
},
|
|
9
|
+
options: [
|
|
10
|
+
{
|
|
11
|
+
attributes: {
|
|
12
|
+
name: 'BathProjectScope',
|
|
13
|
+
value: 'Shower Conversion',
|
|
14
|
+
data: {
|
|
15
|
+
required: 'nonempty'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
text: 'Bathtub to Shower Conversion'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
attributes: {
|
|
22
|
+
name: 'BathProjectScope',
|
|
23
|
+
value: 'Bathtub / Shower Updates',
|
|
24
|
+
data: {
|
|
25
|
+
required: 'nonempty'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
text: 'Bathtub/Shower Updates'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
attributes: {
|
|
32
|
+
name: 'BathProjectScope',
|
|
33
|
+
value: 'Bathtub Liner / Shower Enclosure',
|
|
34
|
+
data: {
|
|
35
|
+
required: 'nonempty'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
text: 'Bathtub Liner/Shower Enclosure'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
attributes: {
|
|
42
|
+
name: 'BathProjectScope',
|
|
43
|
+
value: 'Walk-in Shower',
|
|
44
|
+
data: {
|
|
45
|
+
required: 'nonempty'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
text: 'Walk-in Shower'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
attributes: {
|
|
52
|
+
name: 'BathProjectScope',
|
|
53
|
+
value: 'Bathroom Remodel',
|
|
54
|
+
data: {
|
|
55
|
+
required: 'nonempty'
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
text: 'Complete Bathroom Remodel'
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
OptIn1: {
|
|
65
|
+
fields: [
|
|
66
|
+
{
|
|
67
|
+
legend: {
|
|
68
|
+
text: 'Will you need to add or remove walls?'
|
|
69
|
+
},
|
|
70
|
+
options: [
|
|
71
|
+
{
|
|
72
|
+
attributes: {
|
|
73
|
+
name: 'OptIn1',
|
|
74
|
+
value: 'Yes',
|
|
75
|
+
data: {
|
|
76
|
+
required: 'nonempty'
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
text: 'Yes'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
attributes: {
|
|
83
|
+
name: 'OptIn1',
|
|
84
|
+
value: 'No',
|
|
85
|
+
data: {
|
|
86
|
+
required: 'nonempty'
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
text: 'No'
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
module.exports = bathroom_refacing;
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
const cabinet_refacing = {
|
|
3
|
+
service: {
|
|
4
|
+
fields: [
|
|
5
|
+
{
|
|
6
|
+
legend: {
|
|
7
|
+
text: 'Which of these best describes your needs?'
|
|
8
|
+
},
|
|
9
|
+
options: [
|
|
10
|
+
{
|
|
11
|
+
text: 'I want a full kitchen remodel',
|
|
12
|
+
attributes: {
|
|
13
|
+
name: 'service',
|
|
14
|
+
value: 'KITCHEN_REMODEL',
|
|
15
|
+
checked: '',
|
|
16
|
+
data: {
|
|
17
|
+
required: 'nonempty'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
text: 'I want new cabinets',
|
|
23
|
+
attributes: {
|
|
24
|
+
name: 'service',
|
|
25
|
+
value: 'CABINET_INSTALL',
|
|
26
|
+
data: {
|
|
27
|
+
required: 'nonempty'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
text: 'I want to reface my cabinets',
|
|
33
|
+
attributes: {
|
|
34
|
+
name: 'service',
|
|
35
|
+
value: 'CABINET_REFACING',
|
|
36
|
+
data: {
|
|
37
|
+
required: 'nonempty'
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
text: 'I want new countertops',
|
|
43
|
+
attributes: {
|
|
44
|
+
name: 'service',
|
|
45
|
+
value: 'COUNTERTOP',
|
|
46
|
+
data: {
|
|
47
|
+
required: 'nonempty'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
OptIn: {
|
|
56
|
+
fields: [
|
|
57
|
+
{
|
|
58
|
+
legend: {
|
|
59
|
+
text: 'Will you need to add or remove walls?'
|
|
60
|
+
},
|
|
61
|
+
options: [
|
|
62
|
+
{
|
|
63
|
+
text: 'Yes',
|
|
64
|
+
attributes: {
|
|
65
|
+
name: 'OptIn',
|
|
66
|
+
value: 'Yes',
|
|
67
|
+
data: {
|
|
68
|
+
required: 'nonempty'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
text: 'No',
|
|
74
|
+
attributes: {
|
|
75
|
+
name: 'OptIn',
|
|
76
|
+
value: 'No',
|
|
77
|
+
data: {
|
|
78
|
+
required: 'nonempty'
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
text: 'Not Sure',
|
|
84
|
+
attributes: {
|
|
85
|
+
name: 'OptIn',
|
|
86
|
+
value: 'No',
|
|
87
|
+
data: {
|
|
88
|
+
required: 'nonempty'
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
CountertopType: {
|
|
97
|
+
fields: [
|
|
98
|
+
{
|
|
99
|
+
legend: {
|
|
100
|
+
text: 'What type of countertop are you looking for?'
|
|
101
|
+
},
|
|
102
|
+
options: [
|
|
103
|
+
{
|
|
104
|
+
text: 'Concrete',
|
|
105
|
+
attributes: {
|
|
106
|
+
name: 'CountertopType',
|
|
107
|
+
value: 'Concrete',
|
|
108
|
+
data: {
|
|
109
|
+
required: 'nonempty'
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
text: 'Laminate',
|
|
115
|
+
attributes: {
|
|
116
|
+
name: 'CountertopType',
|
|
117
|
+
value: 'Laminate',
|
|
118
|
+
data: {
|
|
119
|
+
required: 'nonempty'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
text: 'Other Solid Stone',
|
|
125
|
+
attributes: {
|
|
126
|
+
name: 'CountertopType',
|
|
127
|
+
value: 'OtherSolidStone',
|
|
128
|
+
data: {
|
|
129
|
+
required: 'nonempty'
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
text: 'Stainless Steel',
|
|
135
|
+
attributes: {
|
|
136
|
+
name: 'CountertopType',
|
|
137
|
+
value: 'StainlessSteel',
|
|
138
|
+
data: {
|
|
139
|
+
required: 'nonempty'
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
text: 'Granite',
|
|
145
|
+
attributes: {
|
|
146
|
+
name: 'CountertopType',
|
|
147
|
+
value: 'Granite',
|
|
148
|
+
data: {
|
|
149
|
+
required: 'nonempty'
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
text: 'Marble',
|
|
155
|
+
attributes: {
|
|
156
|
+
name: 'CountertopType',
|
|
157
|
+
value: 'Marble',
|
|
158
|
+
data: {
|
|
159
|
+
required: 'nonempty'
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
text: 'Solid Surface',
|
|
165
|
+
attributes: {
|
|
166
|
+
name: 'CountertopType',
|
|
167
|
+
value: 'Solid Surface',
|
|
168
|
+
data: {
|
|
169
|
+
required: 'nonempty'
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
text: 'Wood',
|
|
175
|
+
attributes: {
|
|
176
|
+
name: 'CountertopType',
|
|
177
|
+
value: 'Wood',
|
|
178
|
+
data: {
|
|
179
|
+
required: 'nonempty'
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
CountertopProjectScope: {
|
|
188
|
+
fields: [
|
|
189
|
+
{
|
|
190
|
+
legend: {
|
|
191
|
+
text: 'What do you need to do with your countertop?'
|
|
192
|
+
},
|
|
193
|
+
options: [
|
|
194
|
+
{
|
|
195
|
+
text: 'Install a new countertop',
|
|
196
|
+
attributes: {
|
|
197
|
+
name: 'CountertopProjectScope',
|
|
198
|
+
value: 'Install',
|
|
199
|
+
data: {
|
|
200
|
+
required: 'nonempty'
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
text: 'Repair existing countertop',
|
|
206
|
+
attributes: {
|
|
207
|
+
name: 'CountertopProjectScope',
|
|
208
|
+
value: 'Repair',
|
|
209
|
+
data: {
|
|
210
|
+
required: 'nonempty'
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
CommercialLocation: {
|
|
219
|
+
fields: [
|
|
220
|
+
{
|
|
221
|
+
legend: {
|
|
222
|
+
text: 'What kind of location is this?'
|
|
223
|
+
},
|
|
224
|
+
options: [
|
|
225
|
+
{
|
|
226
|
+
text: 'Home',
|
|
227
|
+
attributes: {
|
|
228
|
+
name: 'CommercialLocation',
|
|
229
|
+
value: 'Home',
|
|
230
|
+
data: {
|
|
231
|
+
required: 'nonempty'
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
text: 'Business',
|
|
237
|
+
attributes: {
|
|
238
|
+
name: 'CommercialLocation',
|
|
239
|
+
value: 'Business',
|
|
240
|
+
data: {
|
|
241
|
+
required: 'nonempty'
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
module.exports = cabinet_refacing;
|