@mjhls/mjh-framework 1.0.381 → 1.0.383
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 -7
- package/dist/esm/index.js +14 -7
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -16940,6 +16940,7 @@ var InscreenSensor = function (_React$Component) {
|
|
|
16940
16940
|
|
|
16941
16941
|
_this.checkInside = function () {
|
|
16942
16942
|
var rect = _this.wraperRef.current.getBoundingClientRect();
|
|
16943
|
+
|
|
16943
16944
|
var _this$props$offSetTop = _this.props.offSetTop,
|
|
16944
16945
|
offSetTop = _this$props$offSetTop === undefined ? 0 : _this$props$offSetTop;
|
|
16945
16946
|
var top = rect.top,
|
|
@@ -16947,13 +16948,14 @@ var InscreenSensor = function (_React$Component) {
|
|
|
16947
16948
|
|
|
16948
16949
|
var bottom = top + height;
|
|
16949
16950
|
var viewHeight = window.innerHeight;
|
|
16951
|
+
|
|
16950
16952
|
if (bottom < offSetTop) {
|
|
16951
16953
|
return false;
|
|
16952
16954
|
} else if (top > offSetTop && bottom <= viewHeight) {
|
|
16953
16955
|
return true;
|
|
16954
|
-
} else if (top
|
|
16956
|
+
} else if (top < offSetTop && top <= viewHeight && bottom > viewHeight) {
|
|
16955
16957
|
return 'top';
|
|
16956
|
-
} else if (bottom
|
|
16958
|
+
} else if (top < offSetTop && bottom + offSetTop >= viewHeight) {
|
|
16957
16959
|
return 'bottom';
|
|
16958
16960
|
} else {
|
|
16959
16961
|
return false;
|
|
@@ -16998,10 +17000,12 @@ var InscreenSensor = function (_React$Component) {
|
|
|
16998
17000
|
}(React__default.Component);
|
|
16999
17001
|
|
|
17000
17002
|
var renderAuthor$1 = function renderAuthor(authorName, authorURL, index, length) {
|
|
17003
|
+
var defaultUrl = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'authors';
|
|
17004
|
+
|
|
17001
17005
|
if (authorName && authorURL) {
|
|
17002
17006
|
return React__default.createElement(
|
|
17003
17007
|
'a',
|
|
17004
|
-
{ href: '/
|
|
17008
|
+
{ href: '/' + defaultUrl + '/' + authorURL.current, key: index },
|
|
17005
17009
|
authorName,
|
|
17006
17010
|
length !== index + 1 && React__default.createElement(
|
|
17007
17011
|
'span',
|
|
@@ -17087,7 +17091,8 @@ var Article = function Article(props) {
|
|
|
17087
17091
|
ISIContent = props.ISIContent,
|
|
17088
17092
|
changeUrl = props.changeUrl,
|
|
17089
17093
|
shareOptions = props.shareOptions,
|
|
17090
|
-
cpModificationRequired = props.cpModificationRequired
|
|
17094
|
+
cpModificationRequired = props.cpModificationRequired,
|
|
17095
|
+
authorPrefix = props.authorPrefix;
|
|
17091
17096
|
|
|
17092
17097
|
var _useState = React.useState(null),
|
|
17093
17098
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
@@ -17316,7 +17321,7 @@ var Article = function Article(props) {
|
|
|
17316
17321
|
return React__default.createElement(
|
|
17317
17322
|
'span',
|
|
17318
17323
|
{ key: index },
|
|
17319
|
-
renderAuthor$1(authorDetail.displayName, authorDetail.url, index, authorDetails.length)
|
|
17324
|
+
renderAuthor$1(authorDetail.displayName, authorDetail.url, index, authorDetails.length, authorPrefix)
|
|
17320
17325
|
);
|
|
17321
17326
|
}),
|
|
17322
17327
|
React__default.createElement(
|
|
@@ -17433,7 +17438,9 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
17433
17438
|
_props$sponsoredTaxon = props.sponsoredTaxonomies,
|
|
17434
17439
|
sponsoredTaxonomies = _props$sponsoredTaxon === undefined ? [] : _props$sponsoredTaxon,
|
|
17435
17440
|
_props$cpModification = props.cpModificationRequired,
|
|
17436
|
-
cpModificationRequired = _props$cpModification === undefined ? false : _props$cpModification
|
|
17441
|
+
cpModificationRequired = _props$cpModification === undefined ? false : _props$cpModification,
|
|
17442
|
+
_props$authorPrefix = props.authorPrefix,
|
|
17443
|
+
authorPrefix = _props$authorPrefix === undefined ? 'authors' : _props$authorPrefix;
|
|
17437
17444
|
|
|
17438
17445
|
|
|
17439
17446
|
var getTargeting = function getTargeting(article, position) {
|
|
@@ -17644,7 +17651,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
17644
17651
|
if (!checkSponseredArticle(article) && Ads.getNativeContextualAD) {
|
|
17645
17652
|
article.contextualAD = Ads.getNativeContextualAD(getTargeting(article, 'native-ad'));
|
|
17646
17653
|
}
|
|
17647
|
-
return React__default.createElement(Article, _extends$2._extends({ key: index }, props, { changeUrl: changeUrl, article: article, cpModificationRequired: cpModificationRequired }));
|
|
17654
|
+
return React__default.createElement(Article, _extends$2._extends({ key: index }, props, { changeUrl: changeUrl, authorPrfix: authorPrefix, article: article, cpModificationRequired: cpModificationRequired }));
|
|
17648
17655
|
})
|
|
17649
17656
|
);
|
|
17650
17657
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -16937,6 +16937,7 @@ var InscreenSensor = function (_React$Component) {
|
|
|
16937
16937
|
|
|
16938
16938
|
_this.checkInside = function () {
|
|
16939
16939
|
var rect = _this.wraperRef.current.getBoundingClientRect();
|
|
16940
|
+
|
|
16940
16941
|
var _this$props$offSetTop = _this.props.offSetTop,
|
|
16941
16942
|
offSetTop = _this$props$offSetTop === undefined ? 0 : _this$props$offSetTop;
|
|
16942
16943
|
var top = rect.top,
|
|
@@ -16944,13 +16945,14 @@ var InscreenSensor = function (_React$Component) {
|
|
|
16944
16945
|
|
|
16945
16946
|
var bottom = top + height;
|
|
16946
16947
|
var viewHeight = window.innerHeight;
|
|
16948
|
+
|
|
16947
16949
|
if (bottom < offSetTop) {
|
|
16948
16950
|
return false;
|
|
16949
16951
|
} else if (top > offSetTop && bottom <= viewHeight) {
|
|
16950
16952
|
return true;
|
|
16951
|
-
} else if (top
|
|
16953
|
+
} else if (top < offSetTop && top <= viewHeight && bottom > viewHeight) {
|
|
16952
16954
|
return 'top';
|
|
16953
|
-
} else if (bottom
|
|
16955
|
+
} else if (top < offSetTop && bottom + offSetTop >= viewHeight) {
|
|
16954
16956
|
return 'bottom';
|
|
16955
16957
|
} else {
|
|
16956
16958
|
return false;
|
|
@@ -16995,10 +16997,12 @@ var InscreenSensor = function (_React$Component) {
|
|
|
16995
16997
|
}(React__default.Component);
|
|
16996
16998
|
|
|
16997
16999
|
var renderAuthor$1 = function renderAuthor(authorName, authorURL, index, length) {
|
|
17000
|
+
var defaultUrl = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'authors';
|
|
17001
|
+
|
|
16998
17002
|
if (authorName && authorURL) {
|
|
16999
17003
|
return React__default.createElement(
|
|
17000
17004
|
'a',
|
|
17001
|
-
{ href: '/
|
|
17005
|
+
{ href: '/' + defaultUrl + '/' + authorURL.current, key: index },
|
|
17002
17006
|
authorName,
|
|
17003
17007
|
length !== index + 1 && React__default.createElement(
|
|
17004
17008
|
'span',
|
|
@@ -17084,7 +17088,8 @@ var Article = function Article(props) {
|
|
|
17084
17088
|
ISIContent = props.ISIContent,
|
|
17085
17089
|
changeUrl = props.changeUrl,
|
|
17086
17090
|
shareOptions = props.shareOptions,
|
|
17087
|
-
cpModificationRequired = props.cpModificationRequired
|
|
17091
|
+
cpModificationRequired = props.cpModificationRequired,
|
|
17092
|
+
authorPrefix = props.authorPrefix;
|
|
17088
17093
|
|
|
17089
17094
|
var _useState = useState(null),
|
|
17090
17095
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -17313,7 +17318,7 @@ var Article = function Article(props) {
|
|
|
17313
17318
|
return React__default.createElement(
|
|
17314
17319
|
'span',
|
|
17315
17320
|
{ key: index },
|
|
17316
|
-
renderAuthor$1(authorDetail.displayName, authorDetail.url, index, authorDetails.length)
|
|
17321
|
+
renderAuthor$1(authorDetail.displayName, authorDetail.url, index, authorDetails.length, authorPrefix)
|
|
17317
17322
|
);
|
|
17318
17323
|
}),
|
|
17319
17324
|
React__default.createElement(
|
|
@@ -17430,7 +17435,9 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
17430
17435
|
_props$sponsoredTaxon = props.sponsoredTaxonomies,
|
|
17431
17436
|
sponsoredTaxonomies = _props$sponsoredTaxon === undefined ? [] : _props$sponsoredTaxon,
|
|
17432
17437
|
_props$cpModification = props.cpModificationRequired,
|
|
17433
|
-
cpModificationRequired = _props$cpModification === undefined ? false : _props$cpModification
|
|
17438
|
+
cpModificationRequired = _props$cpModification === undefined ? false : _props$cpModification,
|
|
17439
|
+
_props$authorPrefix = props.authorPrefix,
|
|
17440
|
+
authorPrefix = _props$authorPrefix === undefined ? 'authors' : _props$authorPrefix;
|
|
17434
17441
|
|
|
17435
17442
|
|
|
17436
17443
|
var getTargeting = function getTargeting(article, position) {
|
|
@@ -17641,7 +17648,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
17641
17648
|
if (!checkSponseredArticle(article) && Ads.getNativeContextualAD) {
|
|
17642
17649
|
article.contextualAD = Ads.getNativeContextualAD(getTargeting(article, 'native-ad'));
|
|
17643
17650
|
}
|
|
17644
|
-
return React__default.createElement(Article, _extends$2({ key: index }, props, { changeUrl: changeUrl, article: article, cpModificationRequired: cpModificationRequired }));
|
|
17651
|
+
return React__default.createElement(Article, _extends$2({ key: index }, props, { changeUrl: changeUrl, authorPrfix: authorPrefix, article: article, cpModificationRequired: cpModificationRequired }));
|
|
17645
17652
|
})
|
|
17646
17653
|
);
|
|
17647
17654
|
};
|