@mjhls/mjh-framework 1.0.957-test → 1.0.958
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/GridContent.js +5 -1
- package/dist/cjs/View.js +9 -26
- package/dist/esm/GridContent.js +5 -1
- package/dist/esm/View.js +9 -26
- 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.958
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
4
4
|
|
package/dist/cjs/GridContent.js
CHANGED
|
@@ -386,7 +386,11 @@ var GridContent = function (_React$Component) {
|
|
|
386
386
|
var insert = function insert(arr, index, newElement) {
|
|
387
387
|
return [].concat(toConsumableArray._toConsumableArray(arr.slice(0, index)), [newElement], toConsumableArray._toConsumableArray(arr.slice(index)));
|
|
388
388
|
};
|
|
389
|
-
|
|
389
|
+
//Simi this is causing issues with the card URLS
|
|
390
|
+
//let posts = this.state.data.slice(3)
|
|
391
|
+
|
|
392
|
+
var posts = [];
|
|
393
|
+
|
|
390
394
|
if (brandInsight && (lgInfeedAd || showBI)) {
|
|
391
395
|
var firstThree = this.state.data.slice(0, 3);
|
|
392
396
|
var data = this.state.data.slice(3);
|
package/dist/cjs/View.js
CHANGED
|
@@ -950,7 +950,8 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
950
950
|
_props$authorImgHeigh = props.authorImgHeight,
|
|
951
951
|
authorImgHeight = _props$authorImgHeigh === undefined ? 270 : _props$authorImgHeigh;
|
|
952
952
|
props.active;
|
|
953
|
-
var
|
|
953
|
+
var containerHeight = props.containerHeight,
|
|
954
|
+
_props$refreshFlag = props.refreshFlag,
|
|
954
955
|
refreshFlag = _props$refreshFlag === undefined ? false : _props$refreshFlag,
|
|
955
956
|
disqusConfig = props.disqusConfig,
|
|
956
957
|
showDisqus = props.showDisqus,
|
|
@@ -1036,20 +1037,10 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1036
1037
|
articleBody = _useState10[0],
|
|
1037
1038
|
setArticleBody = _useState10[1];
|
|
1038
1039
|
|
|
1039
|
-
var _useState11 = React.useState(
|
|
1040
|
-
_useState12 = slicedToArray._slicedToArray(_useState11, 2)
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
var _useState13 = React.useState(true),
|
|
1045
|
-
_useState14 = slicedToArray._slicedToArray(_useState13, 2);
|
|
1046
|
-
_useState14[0];
|
|
1047
|
-
var setPreviewAd = _useState14[1];
|
|
1048
|
-
|
|
1049
|
-
var _useState15 = React.useState(props.index === 0),
|
|
1050
|
-
_useState16 = slicedToArray._slicedToArray(_useState15, 2),
|
|
1051
|
-
isFirstArticle = _useState16[0],
|
|
1052
|
-
setIsFirstArticle = _useState16[1];
|
|
1040
|
+
var _useState11 = React.useState(true),
|
|
1041
|
+
_useState12 = slicedToArray._slicedToArray(_useState11, 2);
|
|
1042
|
+
_useState12[0];
|
|
1043
|
+
var setPreviewAd = _useState12[1];
|
|
1053
1044
|
|
|
1054
1045
|
React.useEffect(function () {
|
|
1055
1046
|
var path = window && window.location && window.location.search;
|
|
@@ -1057,7 +1048,6 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1057
1048
|
setPreviewAd(path.split('&').some(function (param) {
|
|
1058
1049
|
return param.includes('creativeId');
|
|
1059
1050
|
}));
|
|
1060
|
-
setContainerHeight(window.innerHeight);
|
|
1061
1051
|
}, []);
|
|
1062
1052
|
|
|
1063
1053
|
var isCutomPage = function isCutomPage(article) {
|
|
@@ -1559,10 +1549,9 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1559
1549
|
visibilitySensor.VisibilitySensor,
|
|
1560
1550
|
{
|
|
1561
1551
|
partialVisibility: true,
|
|
1562
|
-
offset: { bottom: triggerOffset, top: containerHeight
|
|
1552
|
+
offset: { bottom: triggerOffset, top: containerHeight },
|
|
1563
1553
|
onChange: function onChange(isVisible) {
|
|
1564
|
-
|
|
1565
|
-
if (isVisible && !isFirstArticle) {
|
|
1554
|
+
if (isVisible && queueData && queueData.length > 1) {
|
|
1566
1555
|
var pageviewProperties = _extends._extends({}, targeting, {
|
|
1567
1556
|
category: article && article.category ? article.category.name : ''
|
|
1568
1557
|
});
|
|
@@ -1571,10 +1560,6 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1571
1560
|
return true;
|
|
1572
1561
|
});
|
|
1573
1562
|
}
|
|
1574
|
-
if (isFirstArticle) {
|
|
1575
|
-
|
|
1576
|
-
setIsFirstArticle(false);
|
|
1577
|
-
}
|
|
1578
1563
|
} },
|
|
1579
1564
|
React__default['default'].createElement(
|
|
1580
1565
|
'div',
|
|
@@ -1857,8 +1842,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1857
1842
|
return detail();
|
|
1858
1843
|
}
|
|
1859
1844
|
}), function (prevProps, nextProps) {
|
|
1860
|
-
|
|
1861
|
-
return false;
|
|
1845
|
+
return prevProps.article === nextProps.article;
|
|
1862
1846
|
});
|
|
1863
1847
|
|
|
1864
1848
|
var _this$1 = undefined;
|
|
@@ -2105,7 +2089,6 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
2105
2089
|
};
|
|
2106
2090
|
|
|
2107
2091
|
var onChangeArticle = function onChangeArticle(path, meta, pageviewProperties) {
|
|
2108
|
-
|
|
2109
2092
|
var newPath = '/view/' + path;
|
|
2110
2093
|
var activeArticle = queueData.find(function (item) {
|
|
2111
2094
|
return item.url.current === path;
|
package/dist/esm/GridContent.js
CHANGED
|
@@ -376,7 +376,11 @@ var GridContent = function (_React$Component) {
|
|
|
376
376
|
var insert = function insert(arr, index, newElement) {
|
|
377
377
|
return [].concat(_toConsumableArray(arr.slice(0, index)), [newElement], _toConsumableArray(arr.slice(index)));
|
|
378
378
|
};
|
|
379
|
-
|
|
379
|
+
//Simi this is causing issues with the card URLS
|
|
380
|
+
//let posts = this.state.data.slice(3)
|
|
381
|
+
|
|
382
|
+
var posts = [];
|
|
383
|
+
|
|
380
384
|
if (brandInsight && (lgInfeedAd || showBI)) {
|
|
381
385
|
var firstThree = this.state.data.slice(0, 3);
|
|
382
386
|
var data = this.state.data.slice(3);
|
package/dist/esm/View.js
CHANGED
|
@@ -939,7 +939,8 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
939
939
|
_props$authorImgHeigh = props.authorImgHeight,
|
|
940
940
|
authorImgHeight = _props$authorImgHeigh === undefined ? 270 : _props$authorImgHeigh;
|
|
941
941
|
props.active;
|
|
942
|
-
var
|
|
942
|
+
var containerHeight = props.containerHeight,
|
|
943
|
+
_props$refreshFlag = props.refreshFlag,
|
|
943
944
|
refreshFlag = _props$refreshFlag === undefined ? false : _props$refreshFlag,
|
|
944
945
|
disqusConfig = props.disqusConfig,
|
|
945
946
|
showDisqus = props.showDisqus,
|
|
@@ -1025,20 +1026,10 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1025
1026
|
articleBody = _useState10[0],
|
|
1026
1027
|
setArticleBody = _useState10[1];
|
|
1027
1028
|
|
|
1028
|
-
var _useState11 = useState(
|
|
1029
|
-
_useState12 = _slicedToArray(_useState11, 2)
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
var _useState13 = useState(true),
|
|
1034
|
-
_useState14 = _slicedToArray(_useState13, 2);
|
|
1035
|
-
_useState14[0];
|
|
1036
|
-
var setPreviewAd = _useState14[1];
|
|
1037
|
-
|
|
1038
|
-
var _useState15 = useState(props.index === 0),
|
|
1039
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
1040
|
-
isFirstArticle = _useState16[0],
|
|
1041
|
-
setIsFirstArticle = _useState16[1];
|
|
1029
|
+
var _useState11 = useState(true),
|
|
1030
|
+
_useState12 = _slicedToArray(_useState11, 2);
|
|
1031
|
+
_useState12[0];
|
|
1032
|
+
var setPreviewAd = _useState12[1];
|
|
1042
1033
|
|
|
1043
1034
|
useEffect(function () {
|
|
1044
1035
|
var path = window && window.location && window.location.search;
|
|
@@ -1046,7 +1037,6 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1046
1037
|
setPreviewAd(path.split('&').some(function (param) {
|
|
1047
1038
|
return param.includes('creativeId');
|
|
1048
1039
|
}));
|
|
1049
|
-
setContainerHeight(window.innerHeight);
|
|
1050
1040
|
}, []);
|
|
1051
1041
|
|
|
1052
1042
|
var isCutomPage = function isCutomPage(article) {
|
|
@@ -1548,10 +1538,9 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1548
1538
|
VisibilitySensor,
|
|
1549
1539
|
{
|
|
1550
1540
|
partialVisibility: true,
|
|
1551
|
-
offset: { bottom: triggerOffset, top: containerHeight
|
|
1541
|
+
offset: { bottom: triggerOffset, top: containerHeight },
|
|
1552
1542
|
onChange: function onChange(isVisible) {
|
|
1553
|
-
|
|
1554
|
-
if (isVisible && !isFirstArticle) {
|
|
1543
|
+
if (isVisible && queueData && queueData.length > 1) {
|
|
1555
1544
|
var pageviewProperties = _extends({}, targeting, {
|
|
1556
1545
|
category: article && article.category ? article.category.name : ''
|
|
1557
1546
|
});
|
|
@@ -1560,10 +1549,6 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1560
1549
|
return true;
|
|
1561
1550
|
});
|
|
1562
1551
|
}
|
|
1563
|
-
if (isFirstArticle) {
|
|
1564
|
-
|
|
1565
|
-
setIsFirstArticle(false);
|
|
1566
|
-
}
|
|
1567
1552
|
} },
|
|
1568
1553
|
React__default.createElement(
|
|
1569
1554
|
'div',
|
|
@@ -1846,8 +1831,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1846
1831
|
return detail();
|
|
1847
1832
|
}
|
|
1848
1833
|
}), function (prevProps, nextProps) {
|
|
1849
|
-
|
|
1850
|
-
return false;
|
|
1834
|
+
return prevProps.article === nextProps.article;
|
|
1851
1835
|
});
|
|
1852
1836
|
|
|
1853
1837
|
var _this$1 = undefined;
|
|
@@ -2094,7 +2078,6 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
2094
2078
|
};
|
|
2095
2079
|
|
|
2096
2080
|
var onChangeArticle = function onChangeArticle(path, meta, pageviewProperties) {
|
|
2097
|
-
|
|
2098
2081
|
var newPath = '/view/' + path;
|
|
2099
2082
|
var activeArticle = queueData.find(function (item) {
|
|
2100
2083
|
return item.url.current === path;
|