mod-build 3.6.52 → 3.6.54

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.6.54
4
+
5
+ - swapping out `modUtils.getHeapCookieData()` in the old (but still used) mod-form-contractor.js
6
+
7
+ ## 3.6.53
8
+
9
+ - Since we moved our footer modal templates to live in /quote/resources/shared-resources/, we needed to update `grab-cdn` gulp task to copy them from the updated path
10
+
3
11
  ## 3.6.52
4
12
 
5
13
  - Added `templatesData.primary_trade` conditional to the `fetchTcpaFromSitegenie()` function so it won't try to run on quote/home-remodel
@@ -3,7 +3,7 @@ var source = require('vinyl-source-stream');
3
3
 
4
4
  // helper to allow us to define an "end" event to multiple streams
5
5
  function streamToDestination(gulp, siteSettings, inputPath, destPath, fileName) {
6
- var url = `https://${siteSettings.nodeEnv}/quote/resources/mod-site${inputPath}`;
6
+ var url = `https://${siteSettings.nodeEnv}${inputPath}`;
7
7
 
8
8
  return new Promise(resolve => { // eslint-disable-line no-undef
9
9
  request(url)
@@ -30,30 +30,27 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
30
30
  // key: inputPath, value: destPath
31
31
 
32
32
  externalResources = {
33
- '/templates/scripts/trusted-form.html': ['/templates/scripts/', 'trusted-form.html']
33
+ '/quote/resources/mod-site/templates/scripts/trusted-form.html': ['/templates/scripts/', 'trusted-form.html']
34
34
  };
35
35
 
36
36
  // grab footer modals and place under the resources
37
37
  Object.assign(externalResources, {
38
- '/templates/modals/about/': ['/resources/templates/modals/about/', 'index.html'],
39
- '/templates/modals/privacy/': ['/resources/templates/modals/privacy/', 'index.html'],
40
- '/templates/modals/terms/': ['/resources/templates/modals/terms/', 'index.html'],
41
- '/templates/modals/contact-us/': ['/resources/templates/modals/contact-us/', 'index.html'],
42
- '/templates/modals/faq/': ['/resources/templates/modals/faq/', 'index.html']
38
+ '/quote/resources/shared-resources/templates/modals/about/': ['/resources/templates/modals/about/', 'index.html'],
39
+ '/quote/resources/shared-resources/templates/modals/privacy/': ['/resources/templates/modals/privacy/', 'index.html'],
40
+ '/quote/resources/shared-resources/templates/modals/terms/': ['/resources/templates/modals/terms/', 'index.html'],
41
+ '/quote/resources/shared-resources/templates/modals/contact-us/': ['/resources/templates/modals/contact-us/', 'index.html'],
42
+ '/quote/resources/shared-resources/templates/modals/faq/': ['/resources/templates/modals/faq/', 'index.html']
43
43
  })
44
44
 
45
- Object.assign(externalResources, {'/templates/scripts/jornaya.html': ['/templates/scripts/', 'jornaya.html']});
45
+ Object.assign(externalResources, {'/quote/resources/mod-site/templates/scripts/jornaya.html': ['/templates/scripts/', 'jornaya.html']});
46
46
 
47
47
  if (isModWhiteLabel || domainHasModernize) {
48
- Object.assign(externalResources, {'/templates/scripts/recaptcha.html': ['/templates/scripts/', 'recaptcha.html']});
48
+ Object.assign(externalResources, {'/quote/resources/mod-site/templates/scripts/recaptcha.html': ['/templates/scripts/', 'recaptcha.html']});
49
49
  }
50
50
 
51
51
  // local dev files
52
52
  const remoteFilesForLocalDev = {
53
- '/scripts/mod-form.js': ['/temp/scripts/', 'mod-form.js'],
54
- '/scripts/mod-utils.js': ['/temp/scripts/', 'mod-utils.js'],
55
- '/scripts/qs-form.js': ['/temp/scripts/', 'qs-form.js'],
56
- '/scripts/vendor/maxmind-geoip2.js': ['/temp/scripts/', 'maxmind-geoip2.js']
53
+ '/quote/resources/mod-site/scripts/vendor/maxmind-geoip2.js': ['/temp/scripts/', 'maxmind-geoip2.js']
57
54
  };
58
55
 
59
56
  if (!nodeEnv) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.52",
3
+ "version": "3.6.54",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -137,17 +137,21 @@ modForm.mapProjectValue = function(trade) {
137
137
  */
138
138
  modForm.preprocessContractorFormData = function(formData, currentStep) {
139
139
  if (currentStep === 0) {
140
- var heapCookieData = modUtils.getHeapCookieData(),
140
+ var heapCookie = window.heap && window.heap.appid ? window.modUtils.getCookie('_hp2_id.' + window.heap.appid) : null,
141
141
  attributionKeys = modUtils.getSupportedTrackingParams();
142
142
 
143
143
  formData.primaryProjectClass = this.mapProjectValue(formData.primaryProjectClass);
144
144
 
145
- // Check heap cookie for tracking params and append to form
146
- $.each(heapCookieData, function(name, value) {
147
- if (attributionKeys.indexOf(name) > -1) {
148
- formData[name] = value;
149
- }
150
- });
145
+ if (heapCookie) {
146
+ var heapCookieData = JSON.parse(decodeURIComponent(heapCookie));
147
+
148
+ // Check heap cookie for tracking params and append to form
149
+ $.each(heapCookieData, function(name, value) {
150
+ if (attributionKeys.indexOf(name) > -1) {
151
+ formData[name] = value;
152
+ }
153
+ });
154
+ }
151
155
 
152
156
  // Check Eloqua GUID cookie value and add it to formData
153
157
  var elqGUID = this.elqGetGuidCookieValue();