@mjhls/mjh-framework 1.0.943 → 1.0.944
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 -8
- package/dist/cjs/getQuery.js +1 -1
- package/dist/esm/View.js +11 -8
- package/dist/esm/getQuery.js +1 -1
- package/package.json +1 -1
package/dist/cjs/View.js
CHANGED
|
@@ -953,6 +953,11 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
953
953
|
var sliderData = props.sliderData;
|
|
954
954
|
|
|
955
955
|
|
|
956
|
+
var disableEpisodeNumber = false;
|
|
957
|
+
if (article && article.documentGroup && article.documentGroup.disableEpisodeNumber === true) {
|
|
958
|
+
disableEpisodeNumber = true;
|
|
959
|
+
}
|
|
960
|
+
var logicforDisplayingEpisodeNumber = disableEpisodeNumber ? false : true;
|
|
956
961
|
var targeting = getTargeting.getTargeting(props);
|
|
957
962
|
//remove slider data if toggled
|
|
958
963
|
if (article && article.documentGroup && article.documentGroup.hideSeriesSlider === true) {
|
|
@@ -1292,7 +1297,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1292
1297
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1293
1298
|
}, client.config())),
|
|
1294
1299
|
React__default['default'].createElement('span', { className: 'clearfix' }),
|
|
1295
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1300
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: logicforDisplayingEpisodeNumber }),
|
|
1296
1301
|
React__default['default'].createElement(
|
|
1297
1302
|
'div',
|
|
1298
1303
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -1341,7 +1346,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1341
1346
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1342
1347
|
}, client.config())),
|
|
1343
1348
|
contextualADFlag && React__default['default'].createElement('span', { className: 'clearfix' }),
|
|
1344
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1349
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: logicforDisplayingEpisodeNumber }),
|
|
1345
1350
|
(visibleFlag || queueData && queueData.length === 1 || !props.infiniteScroll) && React__default['default'].createElement(
|
|
1346
1351
|
'div',
|
|
1347
1352
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -1390,7 +1395,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1390
1395
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1391
1396
|
}, client.config())),
|
|
1392
1397
|
React__default['default'].createElement('span', { className: 'clearfix' }),
|
|
1393
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1398
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: logicforDisplayingEpisodeNumber }),
|
|
1394
1399
|
React__default['default'].createElement(
|
|
1395
1400
|
'div',
|
|
1396
1401
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
@@ -1416,7 +1421,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1416
1421
|
blocks: article.documentGroup && article.documentGroup.isSeries ? [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, _selectedIndex3))) : articleBody,
|
|
1417
1422
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1418
1423
|
}, client.config())),
|
|
1419
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1424
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: logicforDisplayingEpisodeNumber }),
|
|
1420
1425
|
article.documentGroup && article.documentGroup.isSeries && React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({
|
|
1421
1426
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1422
1427
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex3))),
|
|
@@ -1548,9 +1553,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1548
1553
|
isMediaSeries && article.documentGroup && article.documentGroup.name && React__default['default'].createElement(
|
|
1549
1554
|
'p',
|
|
1550
1555
|
{ style: { fontSize: '14px' } },
|
|
1551
|
-
article.documentGroup.name
|
|
1552
|
-
' - Episode ',
|
|
1553
|
-
episodeNumber
|
|
1556
|
+
disableEpisodeNumber ? '' + article.documentGroup.name : article.documentGroup.name + ' - Episode ' + episodeNumber
|
|
1554
1557
|
),
|
|
1555
1558
|
React__default['default'].createElement(
|
|
1556
1559
|
'h1',
|
|
@@ -1753,7 +1756,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1753
1756
|
'div',
|
|
1754
1757
|
null,
|
|
1755
1758
|
false ,
|
|
1756
|
-
React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1759
|
+
React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: logicforDisplayingEpisodeNumber })
|
|
1757
1760
|
),
|
|
1758
1761
|
showRelatedArticles && !showIsi && React__default['default'].createElement(RelatedContent, null),
|
|
1759
1762
|
disqusConfig && showDisqus && React__default['default'].createElement(
|
package/dist/cjs/getQuery.js
CHANGED
|
@@ -13,7 +13,7 @@ var getQuery = function getQuery(type) {
|
|
|
13
13
|
case 'related':
|
|
14
14
|
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 && !defined(body[].quizzes)\n && !defined(body[].slides)\n && !defined(body[].articles)\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 hideSeriesSlider\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider\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 }';
|
|
15
15
|
case 'article':
|
|
16
|
-
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 hideSeriesSlider\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current,\n hideSeriesSlider\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
|
+
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 disableEpisodeNumber,\n excludeRelatedContents,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current,\n hideSeriesSlider\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 }';
|
|
17
17
|
case 'publication':
|
|
18
18
|
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 }';
|
|
19
19
|
case 'issue':
|
package/dist/esm/View.js
CHANGED
|
@@ -942,6 +942,11 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
942
942
|
var sliderData = props.sliderData;
|
|
943
943
|
|
|
944
944
|
|
|
945
|
+
var disableEpisodeNumber = false;
|
|
946
|
+
if (article && article.documentGroup && article.documentGroup.disableEpisodeNumber === true) {
|
|
947
|
+
disableEpisodeNumber = true;
|
|
948
|
+
}
|
|
949
|
+
var logicforDisplayingEpisodeNumber = disableEpisodeNumber ? false : true;
|
|
945
950
|
var targeting = getTargeting(props);
|
|
946
951
|
//remove slider data if toggled
|
|
947
952
|
if (article && article.documentGroup && article.documentGroup.hideSeriesSlider === true) {
|
|
@@ -1281,7 +1286,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1281
1286
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1282
1287
|
}, client.config())),
|
|
1283
1288
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
1284
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1289
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: logicforDisplayingEpisodeNumber }),
|
|
1285
1290
|
React__default.createElement(
|
|
1286
1291
|
'div',
|
|
1287
1292
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -1330,7 +1335,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1330
1335
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1331
1336
|
}, client.config())),
|
|
1332
1337
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
1333
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1338
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: logicforDisplayingEpisodeNumber }),
|
|
1334
1339
|
(visibleFlag || queueData && queueData.length === 1 || !props.infiniteScroll) && React__default.createElement(
|
|
1335
1340
|
'div',
|
|
1336
1341
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -1379,7 +1384,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1379
1384
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1380
1385
|
}, client.config())),
|
|
1381
1386
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
1382
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1387
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: logicforDisplayingEpisodeNumber }),
|
|
1383
1388
|
React__default.createElement(
|
|
1384
1389
|
'div',
|
|
1385
1390
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
@@ -1405,7 +1410,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1405
1410
|
blocks: article.documentGroup && article.documentGroup.isSeries ? [].concat(_toConsumableArray(articleBody.slice(0, _selectedIndex3))) : articleBody,
|
|
1406
1411
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1407
1412
|
}, client.config())),
|
|
1408
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1413
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: logicforDisplayingEpisodeNumber }),
|
|
1409
1414
|
article.documentGroup && article.documentGroup.isSeries && React__default.createElement(BlockContent, _extends({
|
|
1410
1415
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1411
1416
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex3))),
|
|
@@ -1537,9 +1542,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1537
1542
|
isMediaSeries && article.documentGroup && article.documentGroup.name && React__default.createElement(
|
|
1538
1543
|
'p',
|
|
1539
1544
|
{ style: { fontSize: '14px' } },
|
|
1540
|
-
article.documentGroup.name
|
|
1541
|
-
' - Episode ',
|
|
1542
|
-
episodeNumber
|
|
1545
|
+
disableEpisodeNumber ? '' + article.documentGroup.name : article.documentGroup.name + ' - Episode ' + episodeNumber
|
|
1543
1546
|
),
|
|
1544
1547
|
React__default.createElement(
|
|
1545
1548
|
'h1',
|
|
@@ -1742,7 +1745,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1742
1745
|
'div',
|
|
1743
1746
|
null,
|
|
1744
1747
|
false ,
|
|
1745
|
-
React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1748
|
+
React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: logicforDisplayingEpisodeNumber })
|
|
1746
1749
|
),
|
|
1747
1750
|
showRelatedArticles && !showIsi && React__default.createElement(RelatedContent, null),
|
|
1748
1751
|
disqusConfig && showDisqus && React__default.createElement(
|
package/dist/esm/getQuery.js
CHANGED
|
@@ -11,7 +11,7 @@ var getQuery = function getQuery(type) {
|
|
|
11
11
|
case 'related':
|
|
12
12
|
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 && !defined(body[].quizzes)\n && !defined(body[].slides)\n && !defined(body[].articles)\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 hideSeriesSlider\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider\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 }';
|
|
13
13
|
case 'article':
|
|
14
|
-
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 hideSeriesSlider\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current,\n hideSeriesSlider\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
|
+
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 disableEpisodeNumber,\n excludeRelatedContents,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current,\n hideSeriesSlider\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 }';
|
|
15
15
|
case 'publication':
|
|
16
16
|
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 }';
|
|
17
17
|
case 'issue':
|