@mjhls/mjh-framework 1.0.405 → 1.0.406
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 +13 -4
- package/dist/esm/index.js +13 -4
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -21910,7 +21910,9 @@ var Article$1 = function Article(props) {
|
|
|
21910
21910
|
parent.style.display = 'none';
|
|
21911
21911
|
setContextualADFlag(false);
|
|
21912
21912
|
} else {
|
|
21913
|
-
|
|
21913
|
+
if (body[0]._type === 'figure' || body[1]._type === 'figure' || body[2]._type === 'figure' || body[3]._type === 'figure') {
|
|
21914
|
+
setContextualADFlag(true);
|
|
21915
|
+
}
|
|
21914
21916
|
}
|
|
21915
21917
|
};
|
|
21916
21918
|
|
|
@@ -21968,7 +21970,9 @@ var Article$1 = function Article(props) {
|
|
|
21968
21970
|
parent.style.display = 'none';
|
|
21969
21971
|
setContextualADFlag(false);
|
|
21970
21972
|
} else {
|
|
21971
|
-
|
|
21973
|
+
if (body && body[1] && body[1]._type === 'figure') {
|
|
21974
|
+
setContextualADFlag(true);
|
|
21975
|
+
}
|
|
21972
21976
|
}
|
|
21973
21977
|
};
|
|
21974
21978
|
|
|
@@ -21980,12 +21984,13 @@ var Article$1 = function Article(props) {
|
|
|
21980
21984
|
blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(0, _selectedIndex))),
|
|
21981
21985
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
21982
21986
|
}, client.config())),
|
|
21983
|
-
React__default.createElement('span', { className: 'clearfix' }),
|
|
21987
|
+
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
21984
21988
|
React__default.createElement(
|
|
21985
21989
|
'div',
|
|
21986
21990
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
21987
21991
|
React__default.createElement(AdSlot.DFPAdSlot, _extends$2._extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound }))
|
|
21988
21992
|
),
|
|
21993
|
+
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
21989
21994
|
React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
21990
21995
|
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false),
|
|
21991
21996
|
blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(_selectedIndex))),
|
|
@@ -22439,16 +22444,20 @@ var ArticleQueue$1 = function ArticleQueue(props) {
|
|
|
22439
22444
|
setQueueData = _useState2[1];
|
|
22440
22445
|
|
|
22441
22446
|
var refreshAD = function refreshAD(path) {
|
|
22447
|
+
|
|
22442
22448
|
if (!main.main_39) {
|
|
22443
22449
|
var activeArticle = queueData.find(function (item) {
|
|
22444
22450
|
return item.url.current === path;
|
|
22445
22451
|
});
|
|
22446
|
-
|
|
22452
|
+
|
|
22453
|
+
var targeting = getTargeting({ article: activeArticle, position: props.position, prevUrl: props.prevUrl });
|
|
22454
|
+
|
|
22447
22455
|
debounce.lib_3.getGoogletag().then(function (googletag) {
|
|
22448
22456
|
if (window.googletag && googletag.pubadsReady) {
|
|
22449
22457
|
var slots = googletag.pubads().getSlots();
|
|
22450
22458
|
slots.forEach(function (slot) {
|
|
22451
22459
|
var pos = slot.getTargeting('pos');
|
|
22460
|
+
|
|
22452
22461
|
slot.clearTargeting();
|
|
22453
22462
|
_Object$keys(targeting).forEach(function (key) {
|
|
22454
22463
|
slot.setTargeting(key, targeting[key]);
|
package/dist/esm/index.js
CHANGED
|
@@ -21907,7 +21907,9 @@ var Article$1 = function Article(props) {
|
|
|
21907
21907
|
parent.style.display = 'none';
|
|
21908
21908
|
setContextualADFlag(false);
|
|
21909
21909
|
} else {
|
|
21910
|
-
|
|
21910
|
+
if (body[0]._type === 'figure' || body[1]._type === 'figure' || body[2]._type === 'figure' || body[3]._type === 'figure') {
|
|
21911
|
+
setContextualADFlag(true);
|
|
21912
|
+
}
|
|
21911
21913
|
}
|
|
21912
21914
|
};
|
|
21913
21915
|
|
|
@@ -21965,7 +21967,9 @@ var Article$1 = function Article(props) {
|
|
|
21965
21967
|
parent.style.display = 'none';
|
|
21966
21968
|
setContextualADFlag(false);
|
|
21967
21969
|
} else {
|
|
21968
|
-
|
|
21970
|
+
if (body && body[1] && body[1]._type === 'figure') {
|
|
21971
|
+
setContextualADFlag(true);
|
|
21972
|
+
}
|
|
21969
21973
|
}
|
|
21970
21974
|
};
|
|
21971
21975
|
|
|
@@ -21977,12 +21981,13 @@ var Article$1 = function Article(props) {
|
|
|
21977
21981
|
blocks: [].concat(_toConsumableArray(body.slice(0, _selectedIndex))),
|
|
21978
21982
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
21979
21983
|
}, client.config())),
|
|
21980
|
-
React__default.createElement('span', { className: 'clearfix' }),
|
|
21984
|
+
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
21981
21985
|
React__default.createElement(
|
|
21982
21986
|
'div',
|
|
21983
21987
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
21984
21988
|
React__default.createElement(DFPAdSlot, _extends$2({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound }))
|
|
21985
21989
|
),
|
|
21990
|
+
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
21986
21991
|
React__default.createElement(BlockContent, _extends$2({
|
|
21987
21992
|
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false),
|
|
21988
21993
|
blocks: [].concat(_toConsumableArray(body.slice(_selectedIndex))),
|
|
@@ -22436,16 +22441,20 @@ var ArticleQueue$1 = function ArticleQueue(props) {
|
|
|
22436
22441
|
setQueueData = _useState2[1];
|
|
22437
22442
|
|
|
22438
22443
|
var refreshAD = function refreshAD(path) {
|
|
22444
|
+
|
|
22439
22445
|
if (!main_39) {
|
|
22440
22446
|
var activeArticle = queueData.find(function (item) {
|
|
22441
22447
|
return item.url.current === path;
|
|
22442
22448
|
});
|
|
22443
|
-
|
|
22449
|
+
|
|
22450
|
+
var targeting = getTargeting({ article: activeArticle, position: props.position, prevUrl: props.prevUrl });
|
|
22451
|
+
|
|
22444
22452
|
lib_3.getGoogletag().then(function (googletag) {
|
|
22445
22453
|
if (window.googletag && googletag.pubadsReady) {
|
|
22446
22454
|
var slots = googletag.pubads().getSlots();
|
|
22447
22455
|
slots.forEach(function (slot) {
|
|
22448
22456
|
var pos = slot.getTargeting('pos');
|
|
22457
|
+
|
|
22449
22458
|
slot.clearTargeting();
|
|
22450
22459
|
_Object$keys(targeting).forEach(function (key) {
|
|
22451
22460
|
slot.setTargeting(key, targeting[key]);
|