mod-build 4.0.45-beta.2 → 4.0.45
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 +1 -2
- package/package.json +1 -1
- package/src/scripts/utils.js +8 -1
- package/tasks/get-default-trade-questions.js +2 -2
- package/tasks/grab-cdn.js +1 -2
- package/tasks/templates.js +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## 4.0.45
|
|
4
4
|
|
|
5
|
-
- Added the
|
|
6
|
-
- Replacing all the instances of data-branded-consent and data-service in the consent capture object
|
|
5
|
+
- Added the new `getDataAttributeValue` helper function; Also updated the generic error language in `get-default-trade-questions`.
|
|
7
6
|
|
|
8
7
|
## 4.0.44
|
|
9
8
|
|
package/package.json
CHANGED
package/src/scripts/utils.js
CHANGED
|
@@ -170,10 +170,17 @@ export const handlebarsHelpers = [
|
|
|
170
170
|
return output.trim();
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
|
+
// If we need to grab a data attribute value that is set in attributes: { data: {} }
|
|
174
|
+
{
|
|
175
|
+
name: 'getDataAttributeValue',
|
|
176
|
+
fn: function(obj, key) {
|
|
177
|
+
return obj && obj[key] ? obj[key] : '';
|
|
178
|
+
}
|
|
179
|
+
},
|
|
173
180
|
{
|
|
174
181
|
name: 'fileInclude',
|
|
175
182
|
fn: function(input) {
|
|
176
183
|
return gulpHandlebarsFileInclude(input);
|
|
177
184
|
}
|
|
178
|
-
}
|
|
185
|
+
}
|
|
179
186
|
]
|
|
@@ -47,7 +47,7 @@ export default async function(config) {
|
|
|
47
47
|
|
|
48
48
|
if (field.fieldType === 'radio') {
|
|
49
49
|
if (!field.errorMessage) {
|
|
50
|
-
field.errorMessage = '
|
|
50
|
+
field.errorMessage = 'Professionals need this info to generate a quote.';
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
if (field.options && Array.isArray(field.options) && field.options.length) {
|
|
@@ -112,7 +112,7 @@ export default async function(config) {
|
|
|
112
112
|
|
|
113
113
|
if (field.fieldType === 'radio') {
|
|
114
114
|
if (!field.errorMessage) {
|
|
115
|
-
field.errorMessage = '
|
|
115
|
+
field.errorMessage = 'Professionals need this info to generate a quote.';
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
if (field.options && Array.isArray(field.options) && field.options.length) {
|
package/tasks/grab-cdn.js
CHANGED
|
@@ -92,8 +92,7 @@ export default async function(config) {
|
|
|
92
92
|
'/quote/resources/shared-resources/templates/modals/terms/': [`${srcFolder}/resources/templates/modals/terms/`, 'index.html'],
|
|
93
93
|
'/quote/resources/shared-resources/templates/modals/contact-us/': [`${srcFolder}/resources/templates/modals/contact-us/`, 'index.html'],
|
|
94
94
|
'/quote/resources/shared-resources/templates/modals/faq/': [`${srcFolder}/resources/templates/modals/faq/`, 'index.html'],
|
|
95
|
-
'/quote/resources/shared-resources/templates/modals/e-sign-consent/': [`${srcFolder}/resources/templates/modals/e-sign-consent/`, 'index.html']
|
|
96
|
-
'/quote/resources/shared-resources/templates/modals/clients/': [`${srcFolder}/resources/templates/modals/clients/`, 'index.html']
|
|
95
|
+
'/quote/resources/shared-resources/templates/modals/e-sign-consent/': [`${srcFolder}/resources/templates/modals/e-sign-consent/`, 'index.html']
|
|
97
96
|
})
|
|
98
97
|
|
|
99
98
|
if (isModWhiteLabel || domainHasModernize) {
|
package/tasks/templates.js
CHANGED
|
@@ -179,10 +179,9 @@ async function embedBrandedDisplayName(apiUrl, consentCaptureObject, key, servic
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
const brandedDisplayName = getBrandedDisplayName.data.data[key];
|
|
182
|
-
|
|
183
|
-
consentCaptureObject =
|
|
184
|
-
|
|
185
|
-
);
|
|
182
|
+
consentCaptureObject.brandedConsentCapture.tcpaStart = consentCaptureObject.brandedConsentCapture.tcpaStart.replace(/<span data-branded-consent><\/span>/g, `<span data-branded-consent>${brandedDisplayName}</span>`);
|
|
183
|
+
consentCaptureObject.brandedIncludeExclusivelyConsentCapture.tcpaStart = consentCaptureObject.brandedIncludeExclusivelyConsentCapture.tcpaStart.replace(/<span data-branded-consent><\/span>/g, `<span data-branded-consent>${brandedDisplayName}</span>`);
|
|
184
|
+
consentCaptureObject.brandedIncludeServiceConsentCapture.tcpaStart = consentCaptureObject.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>`);
|
|
186
185
|
}
|
|
187
186
|
|
|
188
187
|
const getConsentCaptureLanguage = async function(config, tempConfig) {
|