mod-build 4.0.68-beta.3 → 4.0.68

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,9 +1,13 @@
1
1
  # Changelog
2
2
 
3
- ## 4.0.67
3
+ ## 4.0.68
4
4
 
5
5
  - Avoided overriding the control's step configuration during the merge with the variation's steps and the default form config.
6
6
 
7
+ ## 4.0.67
8
+
9
+ - Pull `theme.json` into public folder instead of src.
10
+
7
11
  ## 4.0.66
8
12
 
9
13
  - Removed the `addVwoTestAttribute` flag. The `data-vwo-test` attribute will now always be added to the `body` tag if the current session is a variation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.68-beta.3",
3
+ "version": "4.0.68",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
package/tasks/grab-cdn.js CHANGED
@@ -72,7 +72,7 @@ export default async function(config) {
72
72
  const { isQSPage, isWhiteLabel, page } = config;
73
73
  const themeFile = page?.themeFile;
74
74
  const cssThemes = page?.cssThemes;
75
- const isModWhiteLabel = isWhiteLabel && !isQSPage
75
+ const isModWhiteLabel = isWhiteLabel && !isQSPage;
76
76
  const domainHasModernize = config?.domain?.indexOf('modernize') > -1 && !(config?.domain?.includes('bestcompany'));
77
77
 
78
78
  let externalResources;
@@ -92,24 +92,24 @@ export default async function(config) {
92
92
  '/quote/resources/shared-resources/templates/modals/contact-us/': [`${srcFolder}/resources/templates/modals/contact-us/`, 'index.html'],
93
93
  '/quote/resources/shared-resources/templates/modals/faq/': [`${srcFolder}/resources/templates/modals/faq/`, 'index.html'],
94
94
  '/quote/resources/shared-resources/templates/modals/e-sign-consent/': [`${srcFolder}/resources/templates/modals/e-sign-consent/`, 'index.html']
95
- })
95
+ });
96
96
 
97
97
  if (isModWhiteLabel || domainHasModernize) {
98
- Object.assign(externalResources, {'/quote/resources/mod-site/templates/scripts/recaptcha.html': [`${publicFolder}/resources/scripts/`, 'recaptcha.html']});
98
+ Object.assign(externalResources, { '/quote/resources/mod-site/templates/scripts/recaptcha.html': [`${publicFolder}/resources/scripts/`, 'recaptcha.html'] });
99
99
  }
100
100
 
101
101
  if (cssThemes && cssThemes.length > 0) {
102
102
  cssThemes.forEach(theme => {
103
103
  const themeFileName = `_${theme}.scss`;
104
104
  const themePath = `/quote/resources/shared-resources/styles/themes/${themeFileName}`;
105
- Object.assign(externalResources, {[themePath]: [`${srcFolder}/resources/styles/themes/`, themeFileName]});
105
+ Object.assign(externalResources, { [themePath]: [`${srcFolder}/resources/styles/themes/`, themeFileName] });
106
106
  });
107
107
  }
108
108
 
109
109
  // theme JSON
110
110
  if (isQSPage && themeFile) {
111
111
  Object.assign(externalResources, {
112
- [`/quote/resources/data/themes/${themeFile}.json`]: [`${srcFolder}/data/`, 'theme.json']
112
+ [`/quote/resources/data/themes/${themeFile}.json`]: [`${publicFolder}/data/`, 'theme.json']
113
113
  });
114
114
  }
115
115
 
@@ -58,7 +58,7 @@ function mergeDefaultFormFieldConfig(defaultConfig, config, parentConfig) {
58
58
  if (item.fields) {
59
59
  item.fields = item.fields.map(field => {
60
60
  if (field.name && defaultConfig[field.name]) {
61
- field = Object.assign(defaultConfig[field.name], field);
61
+ field = Object.assign(cloneDeep(defaultConfig[field.name]), field);
62
62
  }
63
63
  return field;
64
64
  });