mod-build 3.6.61-beta.6 → 3.6.61-beta.8
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 -1
- package/gulp-tasks/templates.js +11 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## 3.6.61
|
|
4
4
|
|
|
5
|
-
- Adding the accessible components to the `grab-shared-components` task; As well as pulling the accessible `defaultFormFieldConfig` for the new template.js configuration
|
|
5
|
+
- Adding the accessible components to the `grab-shared-components` task; As well as pulling the accessible `defaultFormFieldConfig` for the new template.js configuration (& merging to the new template stucture appropriately);
|
|
6
6
|
|
|
7
7
|
## 3.6.60
|
|
8
8
|
|
package/gulp-tasks/templates.js
CHANGED
|
@@ -167,7 +167,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
167
167
|
}
|
|
168
168
|
];
|
|
169
169
|
|
|
170
|
-
var mergeDefaultFormFieldConfig = function(steps, defaultConfig) {
|
|
170
|
+
var mergeDefaultFormFieldConfig = function(steps, defaultConfig, folder) {
|
|
171
171
|
if (!steps.items) {
|
|
172
172
|
console.error('No items[ ] found in steps{}!');
|
|
173
173
|
return steps;
|
|
@@ -175,9 +175,12 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
175
175
|
steps.items.forEach(item => {
|
|
176
176
|
if (item.fields) {
|
|
177
177
|
item.fields = item.fields.map(field => {
|
|
178
|
-
if (field.name && defaultConfig[field.name]) {
|
|
178
|
+
if (folder === 'shared-components' && field.name && defaultConfig[field.name]) {
|
|
179
179
|
field = Object.assign(defaultConfig[field.name], field);
|
|
180
180
|
}
|
|
181
|
+
if (folder === 'accessible-components' && field.attributes && field.attributes.name && defaultConfig[field.attributes.name]) {
|
|
182
|
+
field = merge(defaultConfig[field.attributes.name], field);
|
|
183
|
+
}
|
|
181
184
|
return field;
|
|
182
185
|
});
|
|
183
186
|
}
|
|
@@ -198,13 +201,13 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
198
201
|
const defaultConfig = await JSON.parse(response);
|
|
199
202
|
|
|
200
203
|
if (templatesData.steps) {
|
|
201
|
-
templatesData.steps = await mergeDefaultFormFieldConfig(templatesData.steps, defaultConfig);
|
|
204
|
+
templatesData.steps = await mergeDefaultFormFieldConfig(templatesData.steps, defaultConfig, folder);
|
|
202
205
|
}
|
|
203
206
|
if (templatesData.qsSteps) {
|
|
204
|
-
templatesData.qsSteps = await mergeDefaultFormFieldConfig(templatesData.qsSteps, defaultConfig);
|
|
207
|
+
templatesData.qsSteps = await mergeDefaultFormFieldConfig(templatesData.qsSteps, defaultConfig, folder);
|
|
205
208
|
}
|
|
206
209
|
if (templatesData.modSteps) {
|
|
207
|
-
templatesData.modSteps = await mergeDefaultFormFieldConfig(templatesData.modSteps, defaultConfig);
|
|
210
|
+
templatesData.modSteps = await mergeDefaultFormFieldConfig(templatesData.modSteps, defaultConfig, folder);
|
|
208
211
|
}
|
|
209
212
|
|
|
210
213
|
templatesData.defaultConfigCompleted = true;
|
|
@@ -231,8 +234,9 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
231
234
|
throw new Error(`${xhr.statusCode}: Error while fetching TCPA`);
|
|
232
235
|
}
|
|
233
236
|
const responseJson = await JSON.parse(response);
|
|
234
|
-
|
|
235
|
-
|
|
237
|
+
let finalTCPA = await (company === 'Modernize' || templatesData.useModernizeInTCPA) ? responseJson.tcpa.replace(/QuinStreet/g, 'Modernize') : responseJson.tcpa;
|
|
238
|
+
const removeInlineStyleRegex = / style="[^"]*"/g;
|
|
239
|
+
finalTCPA = finalTCPA.replace(removeInlineStyleRegex, '');
|
|
236
240
|
templatesData.tcpaText = await finalTCPA;
|
|
237
241
|
|
|
238
242
|
resolve();
|