mod-build 4.0.42-beta.2 → 4.0.42

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.42-beta.2",
3
+ "version": "4.0.42",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -3,7 +3,7 @@ export const bathroom_refacing = {
3
3
  fields: [
4
4
  {
5
5
  legend: {
6
- text: 'Which of these best describe your needs?'
6
+ text: 'Which of these best describe your needs?'
7
7
  },
8
8
  options: [
9
9
  {
@@ -64,7 +64,7 @@ export const bathroom_refacing = {
64
64
  fields: [
65
65
  {
66
66
  legend: {
67
- text: 'Will you need to add  or remove walls?'
67
+ text: 'Will you need to add or remove walls?'
68
68
  },
69
69
  options: [
70
70
  {
@@ -4,7 +4,7 @@ export const cabinet_refacing = {
4
4
  fields: [
5
5
  {
6
6
  legend: {
7
- text: 'Which of these best describes your needs?'
7
+ text: 'Which of these best describes your needs?'
8
8
  },
9
9
  options: [
10
10
  {
@@ -56,7 +56,7 @@ export const cabinet_refacing = {
56
56
  fields: [
57
57
  {
58
58
  legend: {
59
- text: 'Will you need to add or remove walls?'
59
+ text: 'Will you need to add or remove walls?'
60
60
  },
61
61
  options: [
62
62
  {
@@ -97,7 +97,7 @@ export const cabinet_refacing = {
97
97
  fields: [
98
98
  {
99
99
  legend: {
100
- text: 'What type of countertop are you looking for?'
100
+ text: 'What type of countertop are you looking for?'
101
101
  },
102
102
  options: [
103
103
  {
@@ -188,7 +188,7 @@ export const cabinet_refacing = {
188
188
  fields: [
189
189
  {
190
190
  legend: {
191
- text: 'What do you need to do with your countertop?'
191
+ text: 'What do you need to do with your countertop?'
192
192
  },
193
193
  options: [
194
194
  {
@@ -219,7 +219,7 @@ export const cabinet_refacing = {
219
219
  fields: [
220
220
  {
221
221
  legend: {
222
- text: 'What kind of location is this?'
222
+ text: 'What kind of location is this?'
223
223
  },
224
224
  options: [
225
225
  {
@@ -3,7 +3,7 @@ export const cabinets = {
3
3
  fields: [
4
4
  {
5
5
  legend: {
6
- text: 'Which are you interested in?'
6
+ text: 'Which are you interested in?'
7
7
  },
8
8
  options: [
9
9
  {
@@ -4,7 +4,7 @@ export const concrete_foundation = {
4
4
  fields: [
5
5
  {
6
6
  legend: {
7
- text: 'What is the nature of your project?'
7
+ text: 'What is the nature of your project?'
8
8
  },
9
9
  options: [
10
10
  {
@@ -3,7 +3,7 @@ export const door = {
3
3
  fields: [
4
4
  {
5
5
  legend: {
6
- text: 'What type of door are you interested in?'
6
+ text: 'What type of door are you interested in?'
7
7
  },
8
8
  options: [
9
9
  {
@@ -55,7 +55,7 @@ export const door = {
55
55
  fields: [
56
56
  {
57
57
  legend: {
58
- text: 'What is the nature of your door project?'
58
+ text: 'What is the nature of your door project?'
59
59
  },
60
60
  options: [
61
61
  {
@@ -87,7 +87,7 @@ export const door = {
87
87
  fields: [
88
88
  {
89
89
  legend: {
90
- text: 'Are you interested in receiving manufacturer catalogs?'
90
+ text: 'Are you interested in receiving manufacturer catalogs?'
91
91
  },
92
92
  options: [
93
93
  {
@@ -3,7 +3,7 @@ export const flooring = {
3
3
  fields: [
4
4
  {
5
5
  legend: {
6
- text: 'What type of flooring are you looking for?'
6
+ text: 'What type of flooring are you looking for?'
7
7
  },
8
8
  options: [
9
9
  {
@@ -80,7 +80,7 @@ export const flooring = {
80
80
  fields: [
81
81
  {
82
82
  legend: {
83
- text: 'Which of these best describes your needs?'
83
+ text: 'Which of these best describes your needs?'
84
84
  },
85
85
  options: [
86
86
  {
@@ -122,7 +122,7 @@ export const flooring = {
122
122
  fields: [
123
123
  {
124
124
  legend: {
125
- text: 'Have you already purchased the material you need?'
125
+ text: 'Have you already purchased the material you need?'
126
126
  },
127
127
  options: [
128
128
  {
@@ -154,7 +154,7 @@ export const flooring = {
154
154
  fields: [
155
155
  {
156
156
  legend: {
157
- text: 'What kind of location is this?'
157
+ text: 'What kind of location is this?'
158
158
  },
159
159
  options: [
160
160
  {
@@ -4,7 +4,7 @@ export const garage_door = {
4
4
  fields: [
5
5
  {
6
6
  legend: {
7
- text: 'What is the nature of your project?'
7
+ text: 'What is the nature of your project?'
8
8
  },
9
9
  options: [
10
10
  {
@@ -36,7 +36,7 @@ export const garage_door = {
36
36
  fields: [
37
37
  {
38
38
  legend: {
39
- text: 'What size do you need?'
39
+ text: 'What size do you need?'
40
40
  },
41
41
  options: [
42
42
  {
@@ -3,7 +3,7 @@ export const gutters = {
3
3
  fields: [
4
4
  {
5
5
  legend: {
6
- text: 'What kind of service are you looking for?'
6
+ text: 'What kind of service are you looking for?'
7
7
  },
8
8
  options: [
9
9
  {
@@ -4,7 +4,7 @@ export const home_security = {
4
4
  fields: [
5
5
  {
6
6
  legend: {
7
- text: 'What kind of service do you need?'
7
+ text: 'What kind of service do you need?'
8
8
  },
9
9
  options: [
10
10
  {
@@ -46,7 +46,7 @@ export const home_security = {
46
46
  fields: [
47
47
  {
48
48
  legend: {
49
- text: 'What is your installation preference?'
49
+ text: 'What is your installation preference?'
50
50
  },
51
51
  options: [
52
52
  {
@@ -88,7 +88,7 @@ export const home_security = {
88
88
  fields: [
89
89
  {
90
90
  legend: {
91
- text: 'What type of property is this system for?'
91
+ text: 'What type of property is this system for?'
92
92
  },
93
93
  options: [
94
94
  {
@@ -4,7 +4,7 @@ export const home_warranty = {
4
4
  fields: [
5
5
  {
6
6
  legend: {
7
- text: 'Why are you interested in a home warranty?'
7
+ text: 'Why are you interested in a home warranty?'
8
8
  },
9
9
  options: [
10
10
  {
@@ -4,7 +4,7 @@ export const hot_tubs = {
4
4
  fields: [
5
5
  {
6
6
  legend: {
7
- text: 'What do you want to use your hot tub for?'
7
+ text: 'What do you want to use your hot tub for?'
8
8
  },
9
9
  options: [
10
10
  {
@@ -46,7 +46,7 @@ export const hot_tubs = {
46
46
  fields: [
47
47
  {
48
48
  legend: {
49
- text: 'What size tub do you need?'
49
+ text: 'What size tub do you need?'
50
50
  },
51
51
  options: [
52
52
  {
@@ -3,7 +3,7 @@ export const hvac = {
3
3
  fields: [
4
4
  {
5
5
  legend: {
6
- text: 'What is the nature of your request?'
6
+ text: 'What is the nature of your request?'
7
7
  },
8
8
  options: [
9
9
  {
@@ -34,7 +34,7 @@ export const hvac = {
34
34
  fields: [
35
35
  {
36
36
  legend: {
37
- text: 'If your unit needs to be replaced, would you?'
37
+ text: 'If your unit needs to be replaced, would you?'
38
38
  },
39
39
  options: [
40
40
  {
@@ -66,7 +66,7 @@ export const hvac = {
66
66
  fields: [
67
67
  {
68
68
  legend: {
69
- text: 'What type of system do you have?'
69
+ text: 'What type of system do you have?'
70
70
  },
71
71
  options: [
72
72
  {
@@ -116,6 +116,9 @@ export const hvac = {
116
116
  BoilerHeatingInstallRepairType: {
117
117
  fields: [
118
118
  {
119
+ legend: {
120
+ text: 'Which kind of Central Heating system do you want?'
121
+ },
119
122
  options: [
120
123
  {
121
124
  text: 'Natural gas',
@@ -3,7 +3,7 @@ export const insulation = {
3
3
  fields: [
4
4
  {
5
5
  legend: {
6
- text: 'What area of your home needs to be insulated?'
6
+ text: 'What area of your home needs to be insulated?'
7
7
  },
8
8
  options: [
9
9
  {
@@ -65,7 +65,7 @@ export const insulation = {
65
65
  fields: [
66
66
  {
67
67
  legend: {
68
- text: 'What type of insulation do you need?'
68
+ text: 'What type of insulation do you need?'
69
69
  },
70
70
  options: [
71
71
  {
@@ -3,7 +3,7 @@ export const plumbing = {
3
3
  fields: [
4
4
  {
5
5
  legend: {
6
- text: 'What is the nature of your project?'
6
+ text: 'What is the nature of your project?'
7
7
  },
8
8
  options: [
9
9
  {
@@ -85,7 +85,7 @@ export const plumbing = {
85
85
  fields: [
86
86
  {
87
87
  legend: {
88
- text: 'What is nature of your plumbing project?'
88
+ text: 'What is nature of your plumbing project?'
89
89
  },
90
90
  options: [
91
91
  {
@@ -126,7 +126,7 @@ export const plumbing = {
126
126
  fields: [
127
127
  {
128
128
  legend: {
129
- text: 'What drain issues are you having?'
129
+ text: 'What drain issues are you having?'
130
130
  },
131
131
  options: [
132
132
  {
@@ -187,7 +187,7 @@ export const plumbing = {
187
187
  fields: [
188
188
  {
189
189
  legend: {
190
- text: 'What type of work do you need completed?'
190
+ text: 'What type of work do you need completed?'
191
191
  },
192
192
  options: [
193
193
  {
@@ -218,7 +218,7 @@ export const plumbing = {
218
218
  fields: [
219
219
  {
220
220
  legend: {
221
- text: 'What type of water do you have?'
221
+ text: 'What type of water do you have?'
222
222
  },
223
223
  options: [
224
224
  {
@@ -3,7 +3,7 @@ export const roofing = {
3
3
  fields: [
4
4
  {
5
5
  legend: {
6
- text: 'What type of roofing work do you need?'
6
+ text: 'What type of roofing work do you need?'
7
7
  },
8
8
  options: [
9
9
  {
@@ -45,7 +45,7 @@ export const roofing = {
45
45
  fields: [
46
46
  {
47
47
  legend: {
48
- text: 'What type of roofing material are you looking for?'
48
+ text: 'What type of roofing material are you looking for?'
49
49
  },
50
50
  options: [
51
51
  {
@@ -4,7 +4,7 @@ export const stair_lifts = {
4
4
  fields: [
5
5
  {
6
6
  legend: {
7
- text: 'Why are you considering a stair lift?'
7
+ text: 'Why are you considering a stair lift?'
8
8
  },
9
9
  options: [
10
10
  {
@@ -4,7 +4,7 @@ export const tree_services = {
4
4
  fields: [
5
5
  {
6
6
  legend: {
7
- text: 'Which tree service do you need?'
7
+ text: 'Which tree service do you need?'
8
8
  },
9
9
  options: [
10
10
  {
@@ -47,7 +47,7 @@ export const tree_services = {
47
47
  fields: [
48
48
  {
49
49
  legend: {
50
- text: 'How many trees/stumps are involved?'
50
+ text: 'How many trees/stumps are involved?'
51
51
  },
52
52
  options: [
53
53
  {
@@ -99,7 +99,7 @@ export const tree_services = {
99
99
  fields: [
100
100
  {
101
101
  legend: {
102
- text: 'What are the tree sizes?'
102
+ text: 'What are the tree sizes?'
103
103
  },
104
104
  options: [
105
105
  {
@@ -4,7 +4,7 @@ export const walk_in_tubs = {
4
4
  fields: [
5
5
  {
6
6
  legend: {
7
- text: 'What\'s the biggest reason you are considering a walk-in tub?'
7
+ text: 'What\'s the biggest reason you are considering a walk-in tub?'
8
8
  },
9
9
  options: [
10
10
  {
@@ -4,7 +4,7 @@ export const water_treatment = {
4
4
  fields: [
5
5
  {
6
6
  legend: {
7
- text: 'What type of water do you have?'
7
+ text: 'What type of water do you have?'
8
8
  },
9
9
  options: [
10
10
  {
@@ -3,7 +3,7 @@ export const windows = {
3
3
  fields: [
4
4
  {
5
5
  legend: {
6
- text: 'What is the nature of your windows project?'
6
+ text: 'What is the nature of your windows project?'
7
7
  },
8
8
  options: [
9
9
  {
@@ -99,7 +99,7 @@ export const windows = {
99
99
  id: 'MultipleWindows'
100
100
  },
101
101
  legend: {
102
- text: 'Would you be open to a quote for&nbsp;Multiple windows? <span class="step__subtitle">(Most contractors in your area only service projects for multiple windows)</span>'
102
+ text: 'Would you be open to a quote for Multiple&nbsp;windows? <span class="step__subtitle">(Most contractors in your area only service projects for multiple windows)</span>'
103
103
  },
104
104
  options: [
105
105
  {
@@ -55,7 +55,7 @@ export const tradeQuestionsConfig = {
55
55
  fields: [
56
56
  {
57
57
  legend: {
58
- text: 'Do you own your home?'
58
+ text: 'Do you own your&nbsp;home?'
59
59
  },
60
60
  options: [
61
61
  {
@@ -97,7 +97,7 @@ export const tradeQuestionsConfig = {
97
97
  fields: [
98
98
  {
99
99
  legend: {
100
- text: 'When do you need to start this project?'
100
+ text: 'When do you need to start this&nbsp;project?'
101
101
  },
102
102
  options: [
103
103
  {
@@ -30,7 +30,7 @@ export default async function(config) {
30
30
  defaultQuestionLegend = defaultField.legend;
31
31
  });
32
32
 
33
- item.stepContent.fields.forEach((field, fieldIndex) => {
33
+ item.stepContent.fields.forEach((field) => {
34
34
  if (field.legend) {
35
35
  field.legend = merge(defaultQuestionLegend, field.legend);
36
36
  } else {
@@ -51,21 +51,29 @@ export default async function(config) {
51
51
  }
52
52
 
53
53
  if (field.options && Array.isArray(field.options) && field.options.length) {
54
- field.options.forEach((option, optionIndex) => {
55
- if (option.update && typeof option.update === 'number') {
54
+ field.options.forEach((option) => {
55
+ if (typeof option.update === 'number') {
56
56
  merge(defaultStepOptions[option.update], option);
57
57
  } else {
58
- merge(defaultStepOptions[optionIndex], option);
58
+ if (typeof option.insertAt === 'number') {
59
+ defaultStepOptions.splice(option.insertAt, 0, option);
60
+ } else {
61
+ defaultStepOptions.push(option);
62
+ }
59
63
  }
60
64
  });
61
65
  }
62
66
  field.options = defaultStepOptions;
63
67
  } else {
64
68
  if (field && Array.isArray(field) && field.length) {
65
- if (field.update && typeof field.update === 'number') {
69
+ if (typeof field.update === 'number') {
66
70
  merge(defaultStepFields[field.update], field);
67
71
  } else {
68
- merge(defaultStepFields[fieldIndex], field);
72
+ if (typeof field.insertAt === 'number') {
73
+ defaultStepFields.splice(field.insertAt, 0, field);
74
+ } else {
75
+ defaultStepFields.push(field);
76
+ }
69
77
  }
70
78
  }
71
79
 
@@ -86,7 +94,7 @@ export default async function(config) {
86
94
  defaultExtraQuestionOptions = defaultExtraQuestionField.options;
87
95
  defaultExtraQuestionLegend = defaultExtraQuestionField.legend;
88
96
  });
89
- item.stepContent.extraQuestionBlock.fields.forEach((field, fieldIndex) => {
97
+ item.stepContent.extraQuestionBlock.fields.forEach((field) => {
90
98
 
91
99
  if (field.legend) {
92
100
  field.legend = merge(defaultExtraQuestionLegend, field.legend);
@@ -109,20 +117,28 @@ export default async function(config) {
109
117
 
110
118
  if (field.options && Array.isArray(field.options) && field.options.length) {
111
119
  field.options.forEach((option, optionIndex) => {
112
- if (option.update && typeof option.update === 'number') {
113
- merge(defaultStepOptions[option.update], option);
120
+ if (typeof option.update === 'number') {
121
+ merge(defaultExtraQuestionOptions[option.update], option);
114
122
  } else {
115
- merge(defaultStepOptions[optionIndex], option);
123
+ if (typeof option.insertAt === 'number') {
124
+ defaultExtraQuestionOptions.splice(option.insertAt, 0, option);
125
+ } else {
126
+ defaultExtraQuestionOptions.push(option);
127
+ }
116
128
  }
117
129
  });
118
130
  }
119
131
  field.options = defaultExtraQuestionOptions;
120
132
  } else {
121
133
  if (field && Array.isArray(field) && field.length) {
122
- if (field.update && typeof field.update === 'number') {
134
+ if (typeof field.update === 'number') {
123
135
  merge(defaultExtraQuestionFields[field.update], field);
124
136
  } else {
125
- merge(defaultExtraQuestionFields[fieldIndex], field);
137
+ if (typeof field.insertAt === 'number') {
138
+ defaultExtraQuestionFields.splice(field.insertAt, 0, field);
139
+ } else {
140
+ defaultExtraQuestionFields.push(field);
141
+ }
126
142
  }
127
143
  }
128
144
  field = defaultExtraQuestionFields;