mod-build 3.7.16 → 3.7.18-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.7.19
4
+
5
+ - Added missed attributes in global questions config of siding and tree services.
6
+
7
+ ## 3.7.18
8
+
9
+ - Fixing console log
10
+
11
+ ## 3.7.17
12
+
13
+ - Added in the outer `ServiceType` missing object for Water Treatment trade questions config.
14
+
3
15
  ## 3.7.16
4
16
 
5
17
  - Added the new `getDataAttributeValue` helper function; Also updated the generic error language in `get-default-trade-questions`.
@@ -3,8 +3,8 @@ var merge = require('lodash.merge');
3
3
  var tradeQuestionsConfig = require('../src/trade-questions-config.js');
4
4
 
5
5
  module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
6
- console.log(siteData);
7
6
  if (siteData.useStepsConfig) {
7
+ console.log('Running trade question config...');
8
8
  return async function() {
9
9
  return await new Promise((resolve) => {
10
10
  const trade = siteData.primary_trade.toLowerCase();
@@ -225,6 +225,20 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
225
225
  fn: function(obj, key) {
226
226
  return obj && obj[key] ? obj[key] : '';
227
227
  }
228
+ },
229
+ {
230
+ name: 'needTcpaAboveCta',
231
+ fn: function(page) {
232
+ const trade = page.primary_trade.toUpperCase();
233
+ return trade === 'SOLAR' || trade === 'HOME_SECURITY' || page.isBranded;
234
+ }
235
+ },
236
+ {
237
+ name: 'needTcpaBelowCta',
238
+ fn: function(page) {
239
+ const trade = page.primary_trade.toUpperCase();
240
+ return trade !== 'SOLAR' || trade !== 'HOME_SECURITY' || !page.isBranded;
241
+ }
228
242
  }
229
243
  ];
230
244
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.7.16",
3
+ "version": "3.7.18-beta.1",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -112,6 +112,7 @@ const siding = {
112
112
  options: [
113
113
  {
114
114
  attributes: {
115
+ name: 'stories',
115
116
  value: 'One story',
116
117
  checked: '',
117
118
  data: {
@@ -122,6 +123,7 @@ const siding = {
122
123
  },
123
124
  {
124
125
  attributes: {
126
+ name: 'stories',
125
127
  value: 'Two story',
126
128
  data: {
127
129
  required: 'nonempty'
@@ -131,6 +133,7 @@ const siding = {
131
133
  },
132
134
  {
133
135
  attributes: {
136
+ name: 'stories',
134
137
  value: 'Three stories or more',
135
138
  data: {
136
139
  required: 'nonempty'
@@ -12,7 +12,9 @@ const tree_services = {
12
12
  attributes: {
13
13
  name: 'JobType',
14
14
  value: 'Tree Removal',
15
-
15
+ data: {
16
+ required: 'nonempty'
17
+ }
16
18
  }
17
19
  },
18
20
  {
@@ -20,7 +22,9 @@ const tree_services = {
20
22
  attributes: {
21
23
  name: 'JobType',
22
24
  value: 'Tree Trimming',
23
-
25
+ data: {
26
+ required: 'nonempty'
27
+ }
24
28
  }
25
29
  },
26
30
  {
@@ -28,7 +32,9 @@ const tree_services = {
28
32
  attributes: {
29
33
  name: 'JobType',
30
34
  value: 'Stump Removal',
31
-
35
+ data: {
36
+ required: 'nonempty'
37
+ }
32
38
  }
33
39
  },
34
40
  {
@@ -36,7 +42,9 @@ const tree_services = {
36
42
  attributes: {
37
43
  name: 'JobType',
38
44
  value: 'Other',
39
-
45
+ data: {
46
+ required: 'nonempty'
47
+ }
40
48
  }
41
49
  }
42
50
  ]
@@ -1,46 +1,48 @@
1
1
 
2
2
  /* eslint-disable */
3
3
  const water_treatment = {
4
- fields: [
5
- {
6
- legend: {
7
- text: 'What type of water do you have?'
8
- },
9
- options: [
10
- {
11
- attributes: {
12
- name: 'ServiceType',
13
- value: 'CITY_WATER',
14
- checked: '',
15
- data: {
16
- required: 'nonempty'
17
- }
18
- },
19
- text: 'City Water'
4
+ ServiceType: {
5
+ fields: [
6
+ {
7
+ legend: {
8
+ text: 'What type of water do you have?'
20
9
  },
21
- {
22
- attributes: {
23
- name: 'ServiceType',
24
- value: 'WELL_WATER',
25
- data: {
26
- required: 'nonempty'
27
- }
10
+ options: [
11
+ {
12
+ attributes: {
13
+ name: 'ServiceType',
14
+ value: 'CITY_WATER',
15
+ checked: '',
16
+ data: {
17
+ required: 'nonempty'
18
+ }
19
+ },
20
+ text: 'City Water'
28
21
  },
29
- text: 'Well Water'
30
- },
31
- {
32
- attributes: {
33
- name: 'ServiceType',
34
- value: 'UNSURE',
35
- data: {
36
- required: 'nonempty'
37
- }
22
+ {
23
+ attributes: {
24
+ name: 'ServiceType',
25
+ value: 'WELL_WATER',
26
+ data: {
27
+ required: 'nonempty'
28
+ }
29
+ },
30
+ text: 'Well Water'
38
31
  },
39
- text: 'Unsure'
40
- }
41
- ]
42
- }
43
- ]
32
+ {
33
+ attributes: {
34
+ name: 'ServiceType',
35
+ value: 'UNSURE',
36
+ data: {
37
+ required: 'nonempty'
38
+ }
39
+ },
40
+ text: 'Unsure'
41
+ }
42
+ ]
43
+ }
44
+ ]
45
+ }
44
46
  };
45
47
 
46
48
  module.exports = water_treatment;