@mjhls/mjh-framework 1.0.932-slider-disable → 1.0.932
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/dist/cjs/View.js +11 -16
- package/dist/cjs/getQuery.js +2 -2
- package/dist/esm/View.js +11 -16
- package/dist/esm/getQuery.js +2 -2
- package/package.json +1 -1
package/dist/cjs/View.js
CHANGED
|
@@ -564,25 +564,20 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
564
564
|
showDisqus = props.showDisqus,
|
|
565
565
|
_props$downloadCitati = props.downloadCitation,
|
|
566
566
|
downloadCitation = _props$downloadCitati === undefined ? false : _props$downloadCitati;
|
|
567
|
-
var sliderData = props.sliderData;
|
|
568
567
|
|
|
569
568
|
|
|
570
569
|
var targeting = getTargeting.getTargeting(props);
|
|
571
|
-
//remove slider data if toggled
|
|
572
|
-
if (article && article.documentGroup && article.documentGroup.hideSeriesSlider === true) {
|
|
573
|
-
sliderData = null;
|
|
574
|
-
}
|
|
575
570
|
//next video url
|
|
576
|
-
if (sliderData) {
|
|
571
|
+
if (props.sliderData) {
|
|
577
572
|
var nextArticle = void 0;
|
|
578
|
-
sliderData.forEach(function (data, index) {
|
|
573
|
+
props.sliderData.forEach(function (data, index) {
|
|
579
574
|
if (data.url.current === props.article.url.current) {
|
|
580
575
|
nextArticle = index + 1;
|
|
581
576
|
}
|
|
582
577
|
});
|
|
583
578
|
|
|
584
|
-
if (nextArticle && sliderData[nextArticle]) {
|
|
585
|
-
article.nextVideo = sliderData[nextArticle].url.current;
|
|
579
|
+
if (nextArticle && props.sliderData[nextArticle]) {
|
|
580
|
+
article.nextVideo = props.sliderData[nextArticle].url.current;
|
|
586
581
|
}
|
|
587
582
|
}
|
|
588
583
|
|
|
@@ -902,7 +897,7 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
902
897
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
903
898
|
}, client.config())),
|
|
904
899
|
React__default['default'].createElement('span', { className: 'clearfix' }),
|
|
905
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
900
|
+
article.documentGroup && article.documentGroup.isSeries && props.sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: props.sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
906
901
|
React__default['default'].createElement(
|
|
907
902
|
'div',
|
|
908
903
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -951,7 +946,7 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
951
946
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
952
947
|
}, client.config())),
|
|
953
948
|
contextualADFlag && React__default['default'].createElement('span', { className: 'clearfix' }),
|
|
954
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
949
|
+
article.documentGroup && article.documentGroup.isSeries && props.sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: props.sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
955
950
|
(visibleFlag || queueData && queueData.length === 1 || !props.infiniteScroll) && React__default['default'].createElement(
|
|
956
951
|
'div',
|
|
957
952
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -1000,7 +995,7 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
1000
995
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1001
996
|
}, client.config())),
|
|
1002
997
|
React__default['default'].createElement('span', { className: 'clearfix' }),
|
|
1003
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
998
|
+
article.documentGroup && article.documentGroup.isSeries && props.sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: props.sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1004
999
|
React__default['default'].createElement(
|
|
1005
1000
|
'div',
|
|
1006
1001
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
@@ -1026,7 +1021,7 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
1026
1021
|
blocks: article.documentGroup && article.documentGroup.isSeries ? [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, _selectedIndex3))) : articleBody,
|
|
1027
1022
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1028
1023
|
}, client.config())),
|
|
1029
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1024
|
+
article.documentGroup && article.documentGroup.isSeries && props.sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: props.sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1030
1025
|
article.documentGroup && article.documentGroup.isSeries && React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({
|
|
1031
1026
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, null, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1032
1027
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex3))),
|
|
@@ -1122,7 +1117,7 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
1122
1117
|
// pixels from bottom of window to change trigger visibility change
|
|
1123
1118
|
var triggerOffset = 20;
|
|
1124
1119
|
var isVideoSeries = checkIfVideoSeries(article);
|
|
1125
|
-
var episodeNumber = fetchCurrentEpisode(sliderData, props.article);
|
|
1120
|
+
var episodeNumber = fetchCurrentEpisode(props.sliderData, props.article);
|
|
1126
1121
|
var isMediaSeries = article.documentGroup && article.documentGroup.isSeries ? true : false;
|
|
1127
1122
|
var seriesInfo = checkIfMediaSeriesHasVideo(article);
|
|
1128
1123
|
var isFormAssembly = checkIfFormAssembly(article);
|
|
@@ -1359,11 +1354,11 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
1359
1354
|
)
|
|
1360
1355
|
),
|
|
1361
1356
|
React__default['default'].createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
|
1362
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && !seriesInfo.hasVideo && React__default['default'].createElement(
|
|
1357
|
+
article.documentGroup && article.documentGroup.isSeries && props.sliderData && !seriesInfo.hasVideo && React__default['default'].createElement(
|
|
1363
1358
|
'div',
|
|
1364
1359
|
null,
|
|
1365
1360
|
false ,
|
|
1366
|
-
React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true })
|
|
1361
|
+
React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: props.sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true })
|
|
1367
1362
|
),
|
|
1368
1363
|
showRelatedArticles && !showIsi && React__default['default'].createElement(RelatedContent, null),
|
|
1369
1364
|
disqusConfig && showDisqus && React__default['default'].createElement(
|
package/dist/cjs/getQuery.js
CHANGED
|
@@ -10,9 +10,9 @@ var getQuery = function getQuery(type) {
|
|
|
10
10
|
|
|
11
11
|
switch (type) {
|
|
12
12
|
case 'related':
|
|
13
|
-
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL
|
|
13
|
+
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n },\n \'url\' : pdf.asset-> url,\n \'pdf\': pdf.asset->,\n isbn_issn,\n abbreviatedJournal,\n }\n }';
|
|
14
14
|
case 'article':
|
|
15
|
-
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n },\n poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \n },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n excludeRelatedContents,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL
|
|
15
|
+
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n },\n poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \n },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n excludeRelatedContents,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n year,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n show_download_ris_button,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n },\n \'url\' : pdf.asset-> url,\n \'pdf\': pdf.asset->,\n isbn_issn,\n abbreviatedJournal,\n }\n\n }';
|
|
16
16
|
case 'publication':
|
|
17
17
|
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n thumbnail{ ..., asset-> },\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
|
|
18
18
|
case 'issue':
|
package/dist/esm/View.js
CHANGED
|
@@ -553,25 +553,20 @@ var Article = forwardRef(function (props, ref) {
|
|
|
553
553
|
showDisqus = props.showDisqus,
|
|
554
554
|
_props$downloadCitati = props.downloadCitation,
|
|
555
555
|
downloadCitation = _props$downloadCitati === undefined ? false : _props$downloadCitati;
|
|
556
|
-
var sliderData = props.sliderData;
|
|
557
556
|
|
|
558
557
|
|
|
559
558
|
var targeting = getTargeting(props);
|
|
560
|
-
//remove slider data if toggled
|
|
561
|
-
if (article && article.documentGroup && article.documentGroup.hideSeriesSlider === true) {
|
|
562
|
-
sliderData = null;
|
|
563
|
-
}
|
|
564
559
|
//next video url
|
|
565
|
-
if (sliderData) {
|
|
560
|
+
if (props.sliderData) {
|
|
566
561
|
var nextArticle = void 0;
|
|
567
|
-
sliderData.forEach(function (data, index) {
|
|
562
|
+
props.sliderData.forEach(function (data, index) {
|
|
568
563
|
if (data.url.current === props.article.url.current) {
|
|
569
564
|
nextArticle = index + 1;
|
|
570
565
|
}
|
|
571
566
|
});
|
|
572
567
|
|
|
573
|
-
if (nextArticle && sliderData[nextArticle]) {
|
|
574
|
-
article.nextVideo = sliderData[nextArticle].url.current;
|
|
568
|
+
if (nextArticle && props.sliderData[nextArticle]) {
|
|
569
|
+
article.nextVideo = props.sliderData[nextArticle].url.current;
|
|
575
570
|
}
|
|
576
571
|
}
|
|
577
572
|
|
|
@@ -891,7 +886,7 @@ var Article = forwardRef(function (props, ref) {
|
|
|
891
886
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
892
887
|
}, client.config())),
|
|
893
888
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
894
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
889
|
+
article.documentGroup && article.documentGroup.isSeries && props.sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: props.sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
895
890
|
React__default.createElement(
|
|
896
891
|
'div',
|
|
897
892
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -940,7 +935,7 @@ var Article = forwardRef(function (props, ref) {
|
|
|
940
935
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
941
936
|
}, client.config())),
|
|
942
937
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
943
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
938
|
+
article.documentGroup && article.documentGroup.isSeries && props.sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: props.sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
944
939
|
(visibleFlag || queueData && queueData.length === 1 || !props.infiniteScroll) && React__default.createElement(
|
|
945
940
|
'div',
|
|
946
941
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -989,7 +984,7 @@ var Article = forwardRef(function (props, ref) {
|
|
|
989
984
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
990
985
|
}, client.config())),
|
|
991
986
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
992
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
987
|
+
article.documentGroup && article.documentGroup.isSeries && props.sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: props.sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
993
988
|
React__default.createElement(
|
|
994
989
|
'div',
|
|
995
990
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
@@ -1015,7 +1010,7 @@ var Article = forwardRef(function (props, ref) {
|
|
|
1015
1010
|
blocks: article.documentGroup && article.documentGroup.isSeries ? [].concat(_toConsumableArray(articleBody.slice(0, _selectedIndex3))) : articleBody,
|
|
1016
1011
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1017
1012
|
}, client.config())),
|
|
1018
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1013
|
+
article.documentGroup && article.documentGroup.isSeries && props.sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: props.sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1019
1014
|
article.documentGroup && article.documentGroup.isSeries && React__default.createElement(BlockContent, _extends({
|
|
1020
1015
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, null, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1021
1016
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex3))),
|
|
@@ -1111,7 +1106,7 @@ var Article = forwardRef(function (props, ref) {
|
|
|
1111
1106
|
// pixels from bottom of window to change trigger visibility change
|
|
1112
1107
|
var triggerOffset = 20;
|
|
1113
1108
|
var isVideoSeries = checkIfVideoSeries(article);
|
|
1114
|
-
var episodeNumber = fetchCurrentEpisode(sliderData, props.article);
|
|
1109
|
+
var episodeNumber = fetchCurrentEpisode(props.sliderData, props.article);
|
|
1115
1110
|
var isMediaSeries = article.documentGroup && article.documentGroup.isSeries ? true : false;
|
|
1116
1111
|
var seriesInfo = checkIfMediaSeriesHasVideo(article);
|
|
1117
1112
|
var isFormAssembly = checkIfFormAssembly(article);
|
|
@@ -1348,11 +1343,11 @@ var Article = forwardRef(function (props, ref) {
|
|
|
1348
1343
|
)
|
|
1349
1344
|
),
|
|
1350
1345
|
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
|
1351
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && !seriesInfo.hasVideo && React__default.createElement(
|
|
1346
|
+
article.documentGroup && article.documentGroup.isSeries && props.sliderData && !seriesInfo.hasVideo && React__default.createElement(
|
|
1352
1347
|
'div',
|
|
1353
1348
|
null,
|
|
1354
1349
|
false ,
|
|
1355
|
-
React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true })
|
|
1350
|
+
React__default.createElement(SeriesSlider, { dataset: props.sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true })
|
|
1356
1351
|
),
|
|
1357
1352
|
showRelatedArticles && !showIsi && React__default.createElement(RelatedContent, null),
|
|
1358
1353
|
disqusConfig && showDisqus && React__default.createElement(
|
package/dist/esm/getQuery.js
CHANGED
|
@@ -8,9 +8,9 @@ var getQuery = function getQuery(type) {
|
|
|
8
8
|
|
|
9
9
|
switch (type) {
|
|
10
10
|
case 'related':
|
|
11
|
-
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL
|
|
11
|
+
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n },\n \'url\' : pdf.asset-> url,\n \'pdf\': pdf.asset->,\n isbn_issn,\n abbreviatedJournal,\n }\n }';
|
|
12
12
|
case 'article':
|
|
13
|
-
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n },\n poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \n },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n excludeRelatedContents,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL
|
|
13
|
+
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n },\n poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \n },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n excludeRelatedContents,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n year,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n show_download_ris_button,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n },\n \'url\' : pdf.asset-> url,\n \'pdf\': pdf.asset->,\n isbn_issn,\n abbreviatedJournal,\n }\n\n }';
|
|
14
14
|
case 'publication':
|
|
15
15
|
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n thumbnail{ ..., asset-> },\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
|
|
16
16
|
case 'issue':
|