@mjhls/mjh-framework 1.0.414 → 1.0.416
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 +18 -5
- package/dist/esm/index.js +18 -5
- 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, cpModificationRequired: cpModificationRequired, position: props.position, prevUrl: prevUrl });
|
|
22514
22520
|
|
|
22515
22521
|
debounce.lib_3.getGoogletag().then(function (googletag) {
|
|
22516
22522
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -22572,9 +22578,11 @@ var ArticleQueue$1 = function ArticleQueue(props) {
|
|
|
22572
22578
|
var params = props.params;
|
|
22573
22579
|
if (queueData && queueData.length < maxListLength) {
|
|
22574
22580
|
params.index = queueData.length - 1;
|
|
22581
|
+
console.log('params:', params);
|
|
22582
|
+
console.log('query:', query);
|
|
22575
22583
|
props.client.fetch(query, params).then(function (article) {
|
|
22576
22584
|
if (article && article._id) {
|
|
22577
|
-
var targeting = getTargeting({ article: article });
|
|
22585
|
+
var targeting = getTargeting({ article: article, cpModificationRequired: cpModificationRequired, prevUrl: prevUrl });
|
|
22578
22586
|
article.Ads = Ads.getRightItems(targeting);
|
|
22579
22587
|
setQueueData([].concat(toConsumableArray._toConsumableArray(queueData), [article]));
|
|
22580
22588
|
}
|
|
@@ -22640,6 +22648,7 @@ var Articles = function Articles(props) {
|
|
|
22640
22648
|
|
|
22641
22649
|
var videoAccountIDs = props.videoAccountIDs,
|
|
22642
22650
|
Ads = props.Ads,
|
|
22651
|
+
cpModificationRequired = props.cpModificationRequired,
|
|
22643
22652
|
Settings = props.Settings,
|
|
22644
22653
|
ISIContent = props.ISIContent,
|
|
22645
22654
|
prevUrl = props.prevUrl,
|
|
@@ -22667,7 +22676,11 @@ var Articles = function Articles(props) {
|
|
|
22667
22676
|
var path = _ref2.path,
|
|
22668
22677
|
_id = _ref2._id;
|
|
22669
22678
|
|
|
22670
|
-
|
|
22679
|
+
var prev_url_to_check = prevUrl;
|
|
22680
|
+
if (prev_url_to_check.includes('?')) {
|
|
22681
|
+
prev_url_to_check = prev_url_to_check.split('?')[0];
|
|
22682
|
+
}
|
|
22683
|
+
if (prev_url_to_check.endsWith(path)) taxonomy.push(_id);
|
|
22671
22684
|
});
|
|
22672
22685
|
|
|
22673
22686
|
if (taxonomy.length === 0) {
|
|
@@ -22694,7 +22707,7 @@ var Articles = function Articles(props) {
|
|
|
22694
22707
|
Ads: WAds,
|
|
22695
22708
|
regionalPages: regionalPages,
|
|
22696
22709
|
nationalPage: nationalPage
|
|
22697
|
-
}, _defineProperty$1(_extends2, 'pageview', pageview), _defineProperty$1(_extends2, 'onVote', function onVote() {}), _defineProperty$1(_extends2, 'ISIContent', ISIContent), _defineProperty$1(_extends2, 'videoAccountIDs', videoAccountIDs), _defineProperty$1(_extends2, 'sponsoredTaxonomies', []), _defineProperty$1(_extends2, 'cpModificationRequired',
|
|
22710
|
+
}, _defineProperty$1(_extends2, 'pageview', pageview), _defineProperty$1(_extends2, 'onVote', function onVote() {}), _defineProperty$1(_extends2, 'ISIContent', ISIContent), _defineProperty$1(_extends2, 'videoAccountIDs', videoAccountIDs), _defineProperty$1(_extends2, 'sponsoredTaxonomies', []), _defineProperty$1(_extends2, 'cpModificationRequired', cpModificationRequired), _defineProperty$1(_extends2, 'Settings', Settings), _extends2), props));
|
|
22698
22711
|
};
|
|
22699
22712
|
|
|
22700
22713
|
var View = function View(props) {
|
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, cpModificationRequired: cpModificationRequired, position: props.position, prevUrl: prevUrl });
|
|
22511
22517
|
|
|
22512
22518
|
lib_3.getGoogletag().then(function (googletag) {
|
|
22513
22519
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -22569,9 +22575,11 @@ var ArticleQueue$1 = function ArticleQueue(props) {
|
|
|
22569
22575
|
var params = props.params;
|
|
22570
22576
|
if (queueData && queueData.length < maxListLength) {
|
|
22571
22577
|
params.index = queueData.length - 1;
|
|
22578
|
+
console.log('params:', params);
|
|
22579
|
+
console.log('query:', query);
|
|
22572
22580
|
props.client.fetch(query, params).then(function (article) {
|
|
22573
22581
|
if (article && article._id) {
|
|
22574
|
-
var targeting = getTargeting({ article: article });
|
|
22582
|
+
var targeting = getTargeting({ article: article, cpModificationRequired: cpModificationRequired, prevUrl: prevUrl });
|
|
22575
22583
|
article.Ads = Ads.getRightItems(targeting);
|
|
22576
22584
|
setQueueData([].concat(_toConsumableArray(queueData), [article]));
|
|
22577
22585
|
}
|
|
@@ -22637,6 +22645,7 @@ var Articles = function Articles(props) {
|
|
|
22637
22645
|
|
|
22638
22646
|
var videoAccountIDs = props.videoAccountIDs,
|
|
22639
22647
|
Ads = props.Ads,
|
|
22648
|
+
cpModificationRequired = props.cpModificationRequired,
|
|
22640
22649
|
Settings = props.Settings,
|
|
22641
22650
|
ISIContent = props.ISIContent,
|
|
22642
22651
|
prevUrl = props.prevUrl,
|
|
@@ -22664,7 +22673,11 @@ var Articles = function Articles(props) {
|
|
|
22664
22673
|
var path = _ref2.path,
|
|
22665
22674
|
_id = _ref2._id;
|
|
22666
22675
|
|
|
22667
|
-
|
|
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);
|
|
22668
22681
|
});
|
|
22669
22682
|
|
|
22670
22683
|
if (taxonomy.length === 0) {
|
|
@@ -22691,7 +22704,7 @@ var Articles = function Articles(props) {
|
|
|
22691
22704
|
Ads: WAds,
|
|
22692
22705
|
regionalPages: regionalPages,
|
|
22693
22706
|
nationalPage: nationalPage
|
|
22694
|
-
}, _defineProperty$1(_extends2, 'pageview', pageview), _defineProperty$1(_extends2, 'onVote', function onVote() {}), _defineProperty$1(_extends2, 'ISIContent', ISIContent), _defineProperty$1(_extends2, 'videoAccountIDs', videoAccountIDs), _defineProperty$1(_extends2, 'sponsoredTaxonomies', []), _defineProperty$1(_extends2, 'cpModificationRequired',
|
|
22707
|
+
}, _defineProperty$1(_extends2, 'pageview', pageview), _defineProperty$1(_extends2, 'onVote', function onVote() {}), _defineProperty$1(_extends2, 'ISIContent', ISIContent), _defineProperty$1(_extends2, 'videoAccountIDs', videoAccountIDs), _defineProperty$1(_extends2, 'sponsoredTaxonomies', []), _defineProperty$1(_extends2, 'cpModificationRequired', cpModificationRequired), _defineProperty$1(_extends2, 'Settings', Settings), _extends2), props));
|
|
22695
22708
|
};
|
|
22696
22709
|
|
|
22697
22710
|
var View = function View(props) {
|