@mjhls/mjh-framework 1.0.414 → 1.0.415
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/README.md +1 -1
- package/dist/cjs/index.js +14 -4
- package/dist/esm/index.js +14 -4
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -22438,7 +22438,12 @@ var getTargeting = function getTargeting(props) {
|
|
|
22438
22438
|
path = getContentPlacementUrl(item);
|
|
22439
22439
|
}
|
|
22440
22440
|
|
|
22441
|
-
|
|
22441
|
+
var previous_url_to_check = prevUrl;
|
|
22442
|
+
if (prevUrl.includes('?')) {
|
|
22443
|
+
previous_url_to_check = prevUrl.split('?')[0];
|
|
22444
|
+
}
|
|
22445
|
+
|
|
22446
|
+
if (previous_url_to_check.endsWith(path)) {
|
|
22442
22447
|
content_placement_urls.push(path);
|
|
22443
22448
|
}
|
|
22444
22449
|
});
|
|
@@ -22480,6 +22485,7 @@ var getTargeting = function getTargeting(props) {
|
|
|
22480
22485
|
|
|
22481
22486
|
var ArticleQueue$1 = function ArticleQueue(props) {
|
|
22482
22487
|
var _props$prevUrl = props.prevUrl,
|
|
22488
|
+
prevUrl = _props$prevUrl === undefined ? '/' : _props$prevUrl,
|
|
22483
22489
|
Ads = props.Ads,
|
|
22484
22490
|
_props$maxListLength = props.maxListLength,
|
|
22485
22491
|
maxListLength = _props$maxListLength === undefined ? 10 : _props$maxListLength,
|
|
@@ -22510,7 +22516,7 @@ var ArticleQueue$1 = function ArticleQueue(props) {
|
|
|
22510
22516
|
return item.url.current === path;
|
|
22511
22517
|
});
|
|
22512
22518
|
|
|
22513
|
-
var targeting = getTargeting({ article: activeArticle, position: props.position, prevUrl:
|
|
22519
|
+
var targeting = getTargeting({ article: activeArticle, position: props.position, prevUrl: prevUrl });
|
|
22514
22520
|
|
|
22515
22521
|
debounce.lib_3.getGoogletag().then(function (googletag) {
|
|
22516
22522
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -22574,7 +22580,7 @@ var ArticleQueue$1 = function ArticleQueue(props) {
|
|
|
22574
22580
|
params.index = queueData.length - 1;
|
|
22575
22581
|
props.client.fetch(query, params).then(function (article) {
|
|
22576
22582
|
if (article && article._id) {
|
|
22577
|
-
var targeting = getTargeting({ article: article });
|
|
22583
|
+
var targeting = getTargeting({ article: article, prevUrl: prevUrl });
|
|
22578
22584
|
article.Ads = Ads.getRightItems(targeting);
|
|
22579
22585
|
setQueueData([].concat(toConsumableArray._toConsumableArray(queueData), [article]));
|
|
22580
22586
|
}
|
|
@@ -22667,7 +22673,11 @@ var Articles = function Articles(props) {
|
|
|
22667
22673
|
var path = _ref2.path,
|
|
22668
22674
|
_id = _ref2._id;
|
|
22669
22675
|
|
|
22670
|
-
|
|
22676
|
+
var prev_url_to_check = prevUrl;
|
|
22677
|
+
if (prev_url_to_check.includes('?')) {
|
|
22678
|
+
prev_url_to_check = prev_url_to_check.split('?')[0];
|
|
22679
|
+
}
|
|
22680
|
+
if (prev_url_to_check.endsWith(path)) taxonomy.push(_id);
|
|
22671
22681
|
});
|
|
22672
22682
|
|
|
22673
22683
|
if (taxonomy.length === 0) {
|
package/dist/esm/index.js
CHANGED
|
@@ -22435,7 +22435,12 @@ var getTargeting = function getTargeting(props) {
|
|
|
22435
22435
|
path = getContentPlacementUrl(item);
|
|
22436
22436
|
}
|
|
22437
22437
|
|
|
22438
|
-
|
|
22438
|
+
var previous_url_to_check = prevUrl;
|
|
22439
|
+
if (prevUrl.includes('?')) {
|
|
22440
|
+
previous_url_to_check = prevUrl.split('?')[0];
|
|
22441
|
+
}
|
|
22442
|
+
|
|
22443
|
+
if (previous_url_to_check.endsWith(path)) {
|
|
22439
22444
|
content_placement_urls.push(path);
|
|
22440
22445
|
}
|
|
22441
22446
|
});
|
|
@@ -22477,6 +22482,7 @@ var getTargeting = function getTargeting(props) {
|
|
|
22477
22482
|
|
|
22478
22483
|
var ArticleQueue$1 = function ArticleQueue(props) {
|
|
22479
22484
|
var _props$prevUrl = props.prevUrl,
|
|
22485
|
+
prevUrl = _props$prevUrl === undefined ? '/' : _props$prevUrl,
|
|
22480
22486
|
Ads = props.Ads,
|
|
22481
22487
|
_props$maxListLength = props.maxListLength,
|
|
22482
22488
|
maxListLength = _props$maxListLength === undefined ? 10 : _props$maxListLength,
|
|
@@ -22507,7 +22513,7 @@ var ArticleQueue$1 = function ArticleQueue(props) {
|
|
|
22507
22513
|
return item.url.current === path;
|
|
22508
22514
|
});
|
|
22509
22515
|
|
|
22510
|
-
var targeting = getTargeting({ article: activeArticle, position: props.position, prevUrl:
|
|
22516
|
+
var targeting = getTargeting({ article: activeArticle, position: props.position, prevUrl: prevUrl });
|
|
22511
22517
|
|
|
22512
22518
|
lib_3.getGoogletag().then(function (googletag) {
|
|
22513
22519
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -22571,7 +22577,7 @@ var ArticleQueue$1 = function ArticleQueue(props) {
|
|
|
22571
22577
|
params.index = queueData.length - 1;
|
|
22572
22578
|
props.client.fetch(query, params).then(function (article) {
|
|
22573
22579
|
if (article && article._id) {
|
|
22574
|
-
var targeting = getTargeting({ article: article });
|
|
22580
|
+
var targeting = getTargeting({ article: article, prevUrl: prevUrl });
|
|
22575
22581
|
article.Ads = Ads.getRightItems(targeting);
|
|
22576
22582
|
setQueueData([].concat(_toConsumableArray(queueData), [article]));
|
|
22577
22583
|
}
|
|
@@ -22664,7 +22670,11 @@ var Articles = function Articles(props) {
|
|
|
22664
22670
|
var path = _ref2.path,
|
|
22665
22671
|
_id = _ref2._id;
|
|
22666
22672
|
|
|
22667
|
-
|
|
22673
|
+
var prev_url_to_check = prevUrl;
|
|
22674
|
+
if (prev_url_to_check.includes('?')) {
|
|
22675
|
+
prev_url_to_check = prev_url_to_check.split('?')[0];
|
|
22676
|
+
}
|
|
22677
|
+
if (prev_url_to_check.endsWith(path)) taxonomy.push(_id);
|
|
22668
22678
|
});
|
|
22669
22679
|
|
|
22670
22680
|
if (taxonomy.length === 0) {
|