@mjhls/mjh-framework 1.0.1030 → 1.0.1031
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/View.js +34 -6
- package/dist/esm/View.js +34 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# mjh-framework v. 1.0.
|
|
1
|
+
# mjh-framework v. 1.0.1031
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
4
4
|
|
package/dist/cjs/View.js
CHANGED
|
@@ -1087,19 +1087,19 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
1089
|
// If sponsored flag, disable contextual ads
|
|
1090
|
-
if (sponsoredFlag) {
|
|
1090
|
+
if (sponsoredFlag || article.disableNativeAds) {
|
|
1091
1091
|
article.contextualVideoAD = false;
|
|
1092
1092
|
article.contextualAD = false;
|
|
1093
|
-
showRelatedArticles = false;
|
|
1094
1093
|
}
|
|
1095
|
-
|
|
1094
|
+
|
|
1095
|
+
if (article.disableRelatedContent || sponsoredFlag) {
|
|
1096
1096
|
showRelatedArticles = false;
|
|
1097
1097
|
}
|
|
1098
1098
|
// This was being done in ArticleQueue2 which wasnt effecting articles excluded from infinite scroll, moved inside article component
|
|
1099
1099
|
if (!sponsoredFlag && Ads.getVideoContextualAD) {
|
|
1100
1100
|
article.contextualVideoAD = Ads.getVideoContextualAD(getTargeting.getTargeting(props, 'in-context_video'));
|
|
1101
1101
|
}
|
|
1102
|
-
if (!sponsoredFlag && Ads.getNativeContextualAD) {
|
|
1102
|
+
if (!sponsoredFlag && Ads.getNativeContextualAD && !article.disableNativeAds) {
|
|
1103
1103
|
article.contextualAD = Ads.getNativeContextualAD(getTargeting.getTargeting(props, 'native-ad'));
|
|
1104
1104
|
}
|
|
1105
1105
|
|
|
@@ -1751,7 +1751,8 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1751
1751
|
),
|
|
1752
1752
|
React__default["default"].createElement(
|
|
1753
1753
|
'div',
|
|
1754
|
-
{
|
|
1754
|
+
{
|
|
1755
|
+
className: 'mb-3 doc-group-container',
|
|
1755
1756
|
style: {
|
|
1756
1757
|
display: 'flex',
|
|
1757
1758
|
justifyContent: 'space-between',
|
|
@@ -2692,6 +2693,33 @@ View.returnGetInitialProps = function () {
|
|
|
2692
2693
|
article.relatedArticle = _context.sent;
|
|
2693
2694
|
|
|
2694
2695
|
case 35:
|
|
2696
|
+
|
|
2697
|
+
//check documentGroup and documentGroupMapping for disableNativeAds:true
|
|
2698
|
+
if (article.documentGroup && article.documentGroup.length) {
|
|
2699
|
+
article.documentGroup.forEach(function (docGroup) {
|
|
2700
|
+
var node = docGroup.parent ? docGroup.parent : null;
|
|
2701
|
+
if (docGroup.disableNativeAds) {
|
|
2702
|
+
article.disableNativeAds = true;
|
|
2703
|
+
}
|
|
2704
|
+
while (node) {
|
|
2705
|
+
if (node.disableNativeAds) [article.disableNativeAds = true];
|
|
2706
|
+
node = node.parent || null;
|
|
2707
|
+
}
|
|
2708
|
+
});
|
|
2709
|
+
}
|
|
2710
|
+
if (article.documentGroupMapping && article.documentGroupMapping.length) {
|
|
2711
|
+
article.documentGroupMapping.forEach(function (docGroup) {
|
|
2712
|
+
var node = docGroup.parent ? docGroup.parent : null;
|
|
2713
|
+
if (docGroup.disableNativeAds) {
|
|
2714
|
+
article.disableNativeAds = true;
|
|
2715
|
+
}
|
|
2716
|
+
while (node) {
|
|
2717
|
+
if (node.disableNativeAds) [article.disableNativeAds = true];
|
|
2718
|
+
node = node.parent || null;
|
|
2719
|
+
}
|
|
2720
|
+
});
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2695
2723
|
return _context.abrupt('return', {
|
|
2696
2724
|
url: url,
|
|
2697
2725
|
sao: sao,
|
|
@@ -2703,7 +2731,7 @@ View.returnGetInitialProps = function () {
|
|
|
2703
2731
|
sponsoredFlag: sponsoredFlag
|
|
2704
2732
|
});
|
|
2705
2733
|
|
|
2706
|
-
case
|
|
2734
|
+
case 38:
|
|
2707
2735
|
case 'end':
|
|
2708
2736
|
return _context.stop();
|
|
2709
2737
|
}
|
package/dist/esm/View.js
CHANGED
|
@@ -1077,19 +1077,19 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
1079
|
// If sponsored flag, disable contextual ads
|
|
1080
|
-
if (sponsoredFlag) {
|
|
1080
|
+
if (sponsoredFlag || article.disableNativeAds) {
|
|
1081
1081
|
article.contextualVideoAD = false;
|
|
1082
1082
|
article.contextualAD = false;
|
|
1083
|
-
showRelatedArticles = false;
|
|
1084
1083
|
}
|
|
1085
|
-
|
|
1084
|
+
|
|
1085
|
+
if (article.disableRelatedContent || sponsoredFlag) {
|
|
1086
1086
|
showRelatedArticles = false;
|
|
1087
1087
|
}
|
|
1088
1088
|
// This was being done in ArticleQueue2 which wasnt effecting articles excluded from infinite scroll, moved inside article component
|
|
1089
1089
|
if (!sponsoredFlag && Ads.getVideoContextualAD) {
|
|
1090
1090
|
article.contextualVideoAD = Ads.getVideoContextualAD(getTargeting(props, 'in-context_video'));
|
|
1091
1091
|
}
|
|
1092
|
-
if (!sponsoredFlag && Ads.getNativeContextualAD) {
|
|
1092
|
+
if (!sponsoredFlag && Ads.getNativeContextualAD && !article.disableNativeAds) {
|
|
1093
1093
|
article.contextualAD = Ads.getNativeContextualAD(getTargeting(props, 'native-ad'));
|
|
1094
1094
|
}
|
|
1095
1095
|
|
|
@@ -1741,7 +1741,8 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1741
1741
|
),
|
|
1742
1742
|
React__default.createElement(
|
|
1743
1743
|
'div',
|
|
1744
|
-
{
|
|
1744
|
+
{
|
|
1745
|
+
className: 'mb-3 doc-group-container',
|
|
1745
1746
|
style: {
|
|
1746
1747
|
display: 'flex',
|
|
1747
1748
|
justifyContent: 'space-between',
|
|
@@ -2682,6 +2683,33 @@ View.returnGetInitialProps = function () {
|
|
|
2682
2683
|
article.relatedArticle = _context.sent;
|
|
2683
2684
|
|
|
2684
2685
|
case 35:
|
|
2686
|
+
|
|
2687
|
+
//check documentGroup and documentGroupMapping for disableNativeAds:true
|
|
2688
|
+
if (article.documentGroup && article.documentGroup.length) {
|
|
2689
|
+
article.documentGroup.forEach(function (docGroup) {
|
|
2690
|
+
var node = docGroup.parent ? docGroup.parent : null;
|
|
2691
|
+
if (docGroup.disableNativeAds) {
|
|
2692
|
+
article.disableNativeAds = true;
|
|
2693
|
+
}
|
|
2694
|
+
while (node) {
|
|
2695
|
+
if (node.disableNativeAds) [article.disableNativeAds = true];
|
|
2696
|
+
node = node.parent || null;
|
|
2697
|
+
}
|
|
2698
|
+
});
|
|
2699
|
+
}
|
|
2700
|
+
if (article.documentGroupMapping && article.documentGroupMapping.length) {
|
|
2701
|
+
article.documentGroupMapping.forEach(function (docGroup) {
|
|
2702
|
+
var node = docGroup.parent ? docGroup.parent : null;
|
|
2703
|
+
if (docGroup.disableNativeAds) {
|
|
2704
|
+
article.disableNativeAds = true;
|
|
2705
|
+
}
|
|
2706
|
+
while (node) {
|
|
2707
|
+
if (node.disableNativeAds) [article.disableNativeAds = true];
|
|
2708
|
+
node = node.parent || null;
|
|
2709
|
+
}
|
|
2710
|
+
});
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2685
2713
|
return _context.abrupt('return', {
|
|
2686
2714
|
url: url,
|
|
2687
2715
|
sao: sao,
|
|
@@ -2693,7 +2721,7 @@ View.returnGetInitialProps = function () {
|
|
|
2693
2721
|
sponsoredFlag: sponsoredFlag
|
|
2694
2722
|
});
|
|
2695
2723
|
|
|
2696
|
-
case
|
|
2724
|
+
case 38:
|
|
2697
2725
|
case 'end':
|
|
2698
2726
|
return _context.stop();
|
|
2699
2727
|
}
|