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 CHANGED
@@ -2,8 +2,7 @@
2
2
 
3
3
  ## 4.0.45
4
4
 
5
- - Added the Clients List modal to be grabbed as part of the `grab-cdn` task.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.45-beta.2",
3
+ "version": "4.0.45",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -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 = 'Please select one option';
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 = 'Please select one option';
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) {
@@ -179,10 +179,9 @@ async function embedBrandedDisplayName(apiUrl, consentCaptureObject, key, servic
179
179
  }
180
180
 
181
181
  const brandedDisplayName = getBrandedDisplayName.data.data[key];
182
- // replacing data-branded-consent and data-service
183
- consentCaptureObject = JSON.parse(
184
- JSON.stringify(consentCaptureObject).replace(/<span data-branded-consent><\/span>/g, `<span data-branded-consent>${brandedDisplayName}</span>`).replace(/<span data-service><\/span>/g, `<span data-service>${service}</span>`)
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) {