mod-build 4.0.53 → 4.0.54
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 +4 -0
- package/package.json +1 -1
- package/src/scripts/utils.js +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.54
|
|
4
|
+
|
|
5
|
+
- Added `GUTTERS` & `GUTTER_COVERS` to the `addTcpaAboveCta` and `addTcpaBelowCta` configurations.
|
|
6
|
+
|
|
3
7
|
## 4.0.53
|
|
4
8
|
|
|
5
9
|
- Added `addTcpaAboveCta` and `addTcpaBelowCta` helper functions to determine where tcpa should be placed based on trade/branded conditions.
|
package/package.json
CHANGED
package/src/scripts/utils.js
CHANGED
|
@@ -44,6 +44,8 @@ function handlebarsX(expression, context) {
|
|
|
44
44
|
return result;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
const tradesWithTcpaAboveCta = ['SOLAR', 'HOME_SECURITY', 'GUTTERS', 'GUTTER_COVERS'];
|
|
48
|
+
|
|
47
49
|
export const handlebarsHelpers = [
|
|
48
50
|
// Run any js line
|
|
49
51
|
{
|
|
@@ -186,15 +188,16 @@ export const handlebarsHelpers = [
|
|
|
186
188
|
{
|
|
187
189
|
name: 'addTcpaAboveCta',
|
|
188
190
|
fn: function(page) {
|
|
189
|
-
const trade = page.primary_trade.toUpperCase();
|
|
190
|
-
return trade
|
|
191
|
+
const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
|
|
192
|
+
return tradesWithTcpaAboveCta.includes(trade) || page.isBranded;
|
|
191
193
|
}
|
|
192
194
|
},
|
|
193
195
|
{
|
|
194
196
|
name: 'addTcpaBelowCta',
|
|
195
197
|
fn: function(page) {
|
|
196
|
-
const trade = page.primary_trade.toUpperCase();
|
|
197
|
-
|
|
198
|
+
const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
|
|
199
|
+
|
|
200
|
+
return !tradesWithTcpaAboveCta.includes(trade) && !page.isBranded;
|
|
198
201
|
}
|
|
199
202
|
}
|
|
200
203
|
]
|