@mjhls/mjh-framework 1.0.939-disable-episode-number-v1 → 1.0.939-disable-episode-number-v3
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 +30 -16
- package/dist/cjs/getQuery.js +1 -1
- package/dist/esm/View.js +30 -16
- package/dist/esm/getQuery.js +1 -1
- package/package.json +1 -1
package/dist/cjs/View.js
CHANGED
|
@@ -915,6 +915,11 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
915
915
|
var sliderData = props.sliderData;
|
|
916
916
|
|
|
917
917
|
|
|
918
|
+
var disableEpisodeNumber = false;
|
|
919
|
+
if (article && article.documentGroup && article.documentGroup.disableEpisodeNumber === true) {
|
|
920
|
+
disableEpisodeNumber = true;
|
|
921
|
+
}
|
|
922
|
+
|
|
918
923
|
var targeting = getTargeting.getTargeting(props);
|
|
919
924
|
//remove slider data if toggled
|
|
920
925
|
if (article && article.documentGroup && article.documentGroup.hideSeriesSlider === true) {
|
|
@@ -1249,12 +1254,13 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1249
1254
|
React__default['default'].Fragment,
|
|
1250
1255
|
null,
|
|
1251
1256
|
React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({
|
|
1252
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null,
|
|
1257
|
+
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1253
1258
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, selectedIndex))),
|
|
1254
1259
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1255
1260
|
}, client.config())),
|
|
1256
1261
|
React__default['default'].createElement('span', { className: 'clearfix' }),
|
|
1257
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1262
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && disableEpisodeNumber && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: false }),
|
|
1263
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && !disableEpisodeNumber && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1258
1264
|
React__default['default'].createElement(
|
|
1259
1265
|
'div',
|
|
1260
1266
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -1270,7 +1276,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1270
1276
|
React__default['default'].createElement(AdSlot, _extends._extends({}, payload.contextualVideoAD, { refreshFlag: refreshFlag, checkIsAdFound: checkIsVideoAdFound }))
|
|
1271
1277
|
),
|
|
1272
1278
|
React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({
|
|
1273
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null,
|
|
1279
|
+
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1274
1280
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(selectedIndex))),
|
|
1275
1281
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1276
1282
|
}, client.config()))
|
|
@@ -1298,12 +1304,13 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1298
1304
|
React__default['default'].Fragment,
|
|
1299
1305
|
null,
|
|
1300
1306
|
React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({
|
|
1301
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null,
|
|
1307
|
+
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1302
1308
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, _selectedIndex))),
|
|
1303
1309
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1304
1310
|
}, client.config())),
|
|
1305
1311
|
contextualADFlag && React__default['default'].createElement('span', { className: 'clearfix' }),
|
|
1306
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1312
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && disableEpisodeNumber && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: false }),
|
|
1313
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && !disableEpisodeNumber && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1307
1314
|
(visibleFlag || queueData && queueData.length === 1 || !props.infiniteScroll) && React__default['default'].createElement(
|
|
1308
1315
|
'div',
|
|
1309
1316
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -1314,7 +1321,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1314
1321
|
),
|
|
1315
1322
|
contextualADFlag && React__default['default'].createElement('span', { className: 'clearfix' }),
|
|
1316
1323
|
React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({
|
|
1317
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null,
|
|
1324
|
+
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1318
1325
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex))),
|
|
1319
1326
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1320
1327
|
}, client.config()))
|
|
@@ -1347,19 +1354,20 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1347
1354
|
React__default['default'].Fragment,
|
|
1348
1355
|
null,
|
|
1349
1356
|
React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({
|
|
1350
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null,
|
|
1357
|
+
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1351
1358
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, _selectedIndex2))),
|
|
1352
1359
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1353
1360
|
}, client.config())),
|
|
1354
1361
|
React__default['default'].createElement('span', { className: 'clearfix' }),
|
|
1355
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1362
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && disableEpisodeNumber && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: false }),
|
|
1363
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && !disableEpisodeNumber && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1356
1364
|
React__default['default'].createElement(
|
|
1357
1365
|
'div',
|
|
1358
1366
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
1359
1367
|
React__default['default'].createElement(AdSlot, _extends._extends({}, payload.contextualVideoAD, { refreshFlag: refreshFlag, checkIsAdFound: _checkIsAdFound2 }))
|
|
1360
1368
|
),
|
|
1361
1369
|
React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({
|
|
1362
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null,
|
|
1370
|
+
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1363
1371
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex2))),
|
|
1364
1372
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1365
1373
|
}, client.config()))
|
|
@@ -1374,13 +1382,14 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1374
1382
|
'div',
|
|
1375
1383
|
null,
|
|
1376
1384
|
React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({
|
|
1377
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, false, null,
|
|
1385
|
+
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, false, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1378
1386
|
blocks: article.documentGroup && article.documentGroup.isSeries ? [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, _selectedIndex3))) : articleBody,
|
|
1379
1387
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1380
1388
|
}, client.config())),
|
|
1381
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1389
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && disableEpisodeNumber && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1390
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && !disableEpisodeNumber && React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1382
1391
|
article.documentGroup && article.documentGroup.isSeries && React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({
|
|
1383
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null,
|
|
1392
|
+
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1384
1393
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex3))),
|
|
1385
1394
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1386
1395
|
}, client.config()))
|
|
@@ -1510,7 +1519,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1510
1519
|
isMediaSeries && article.documentGroup && article.documentGroup.name && React__default['default'].createElement(
|
|
1511
1520
|
'p',
|
|
1512
1521
|
{ style: { fontSize: '14px' } },
|
|
1513
|
-
|
|
1522
|
+
disableEpisodeNumber ? '' + article.documentGroup.name : article.documentGroup.name + ' - Episode ' + episodeNumber
|
|
1514
1523
|
),
|
|
1515
1524
|
React__default['default'].createElement(
|
|
1516
1525
|
'h1',
|
|
@@ -1709,7 +1718,13 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1709
1718
|
)
|
|
1710
1719
|
),
|
|
1711
1720
|
React__default['default'].createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
|
1712
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && !seriesInfo.hasVideo && React__default['default'].createElement(
|
|
1721
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && !seriesInfo.hasVideo && disableEpisodeNumber && React__default['default'].createElement(
|
|
1722
|
+
'div',
|
|
1723
|
+
null,
|
|
1724
|
+
false ,
|
|
1725
|
+
React__default['default'].createElement(SeriesSlider.SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: false })
|
|
1726
|
+
),
|
|
1727
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && !seriesInfo.hasVideo && !disableEpisodeNumber && React__default['default'].createElement(
|
|
1713
1728
|
'div',
|
|
1714
1729
|
null,
|
|
1715
1730
|
false ,
|
|
@@ -1736,7 +1751,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1736
1751
|
ISI,
|
|
1737
1752
|
null,
|
|
1738
1753
|
React__default['default'].createElement(BlockContent.BlockContent, {
|
|
1739
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, false, null,
|
|
1754
|
+
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, false, null, article.Ads, targeting),
|
|
1740
1755
|
blocks: isi
|
|
1741
1756
|
})
|
|
1742
1757
|
),
|
|
@@ -2094,7 +2109,6 @@ var View = function View(props) {
|
|
|
2094
2109
|
canonicalTag = _props$canonicalTag === undefined ? true : _props$canonicalTag,
|
|
2095
2110
|
_props$infiniteScroll = props.infiniteScrollFlag,
|
|
2096
2111
|
infiniteScrollFlag = _props$infiniteScroll === undefined ? true : _props$infiniteScroll;
|
|
2097
|
-
props.disableEpisodeNumber;
|
|
2098
2112
|
var _props$article2 = props.article,
|
|
2099
2113
|
_props$article2$passw = _props$article2.passwordLock,
|
|
2100
2114
|
passwordLock = _props$article2$passw === undefined ? false : _props$article2$passw;
|
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
|
@@ -905,6 +905,11 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
905
905
|
var sliderData = props.sliderData;
|
|
906
906
|
|
|
907
907
|
|
|
908
|
+
var disableEpisodeNumber = false;
|
|
909
|
+
if (article && article.documentGroup && article.documentGroup.disableEpisodeNumber === true) {
|
|
910
|
+
disableEpisodeNumber = true;
|
|
911
|
+
}
|
|
912
|
+
|
|
908
913
|
var targeting = getTargeting(props);
|
|
909
914
|
//remove slider data if toggled
|
|
910
915
|
if (article && article.documentGroup && article.documentGroup.hideSeriesSlider === true) {
|
|
@@ -1239,12 +1244,13 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1239
1244
|
React__default.Fragment,
|
|
1240
1245
|
null,
|
|
1241
1246
|
React__default.createElement(BlockContent, _extends({
|
|
1242
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null,
|
|
1247
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1243
1248
|
blocks: [].concat(_toConsumableArray(articleBody.slice(0, selectedIndex))),
|
|
1244
1249
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1245
1250
|
}, client.config())),
|
|
1246
1251
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
1247
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1252
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && disableEpisodeNumber && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: false }),
|
|
1253
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && !disableEpisodeNumber && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1248
1254
|
React__default.createElement(
|
|
1249
1255
|
'div',
|
|
1250
1256
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -1260,7 +1266,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1260
1266
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: refreshFlag, checkIsAdFound: checkIsVideoAdFound }))
|
|
1261
1267
|
),
|
|
1262
1268
|
React__default.createElement(BlockContent, _extends({
|
|
1263
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null,
|
|
1269
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1264
1270
|
blocks: [].concat(_toConsumableArray(articleBody.slice(selectedIndex))),
|
|
1265
1271
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1266
1272
|
}, client.config()))
|
|
@@ -1288,12 +1294,13 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1288
1294
|
React__default.Fragment,
|
|
1289
1295
|
null,
|
|
1290
1296
|
React__default.createElement(BlockContent, _extends({
|
|
1291
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null,
|
|
1297
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1292
1298
|
blocks: [].concat(_toConsumableArray(articleBody.slice(0, _selectedIndex))),
|
|
1293
1299
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1294
1300
|
}, client.config())),
|
|
1295
1301
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
1296
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1302
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && disableEpisodeNumber && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: false }),
|
|
1303
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && !disableEpisodeNumber && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1297
1304
|
(visibleFlag || queueData && queueData.length === 1 || !props.infiniteScroll) && React__default.createElement(
|
|
1298
1305
|
'div',
|
|
1299
1306
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
@@ -1304,7 +1311,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1304
1311
|
),
|
|
1305
1312
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
1306
1313
|
React__default.createElement(BlockContent, _extends({
|
|
1307
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null,
|
|
1314
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1308
1315
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex))),
|
|
1309
1316
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1310
1317
|
}, client.config()))
|
|
@@ -1337,19 +1344,20 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1337
1344
|
React__default.Fragment,
|
|
1338
1345
|
null,
|
|
1339
1346
|
React__default.createElement(BlockContent, _extends({
|
|
1340
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null,
|
|
1347
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, contextualADFlag, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1341
1348
|
blocks: [].concat(_toConsumableArray(articleBody.slice(0, _selectedIndex2))),
|
|
1342
1349
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1343
1350
|
}, client.config())),
|
|
1344
1351
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
1345
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber:
|
|
1352
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && disableEpisodeNumber && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: false }),
|
|
1353
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && !disableEpisodeNumber && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1346
1354
|
React__default.createElement(
|
|
1347
1355
|
'div',
|
|
1348
1356
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
1349
1357
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: refreshFlag, checkIsAdFound: _checkIsAdFound2 }))
|
|
1350
1358
|
),
|
|
1351
1359
|
React__default.createElement(BlockContent, _extends({
|
|
1352
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null,
|
|
1360
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1353
1361
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex2))),
|
|
1354
1362
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1355
1363
|
}, client.config()))
|
|
@@ -1364,13 +1372,14 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1364
1372
|
'div',
|
|
1365
1373
|
null,
|
|
1366
1374
|
React__default.createElement(BlockContent, _extends({
|
|
1367
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, false, null,
|
|
1375
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, false, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1368
1376
|
blocks: article.documentGroup && article.documentGroup.isSeries ? [].concat(_toConsumableArray(articleBody.slice(0, _selectedIndex3))) : articleBody,
|
|
1369
1377
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1370
1378
|
}, client.config())),
|
|
1371
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1379
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && disableEpisodeNumber && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1380
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && seriesInfo.hasVideo && !disableEpisodeNumber && React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: true }),
|
|
1372
1381
|
article.documentGroup && article.documentGroup.isSeries && React__default.createElement(BlockContent, _extends({
|
|
1373
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null,
|
|
1382
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, isMediaSeries, null, null, article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
1374
1383
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex3))),
|
|
1375
1384
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1376
1385
|
}, client.config()))
|
|
@@ -1500,7 +1509,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1500
1509
|
isMediaSeries && article.documentGroup && article.documentGroup.name && React__default.createElement(
|
|
1501
1510
|
'p',
|
|
1502
1511
|
{ style: { fontSize: '14px' } },
|
|
1503
|
-
|
|
1512
|
+
disableEpisodeNumber ? '' + article.documentGroup.name : article.documentGroup.name + ' - Episode ' + episodeNumber
|
|
1504
1513
|
),
|
|
1505
1514
|
React__default.createElement(
|
|
1506
1515
|
'h1',
|
|
@@ -1699,7 +1708,13 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1699
1708
|
)
|
|
1700
1709
|
),
|
|
1701
1710
|
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
|
1702
|
-
article.documentGroup && article.documentGroup.isSeries && sliderData && !seriesInfo.hasVideo && React__default.createElement(
|
|
1711
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && !seriesInfo.hasVideo && disableEpisodeNumber && React__default.createElement(
|
|
1712
|
+
'div',
|
|
1713
|
+
null,
|
|
1714
|
+
false ,
|
|
1715
|
+
React__default.createElement(SeriesSlider, { dataset: sliderData, client: client, nowPlaying: article.title, displayEpisodeNumber: false })
|
|
1716
|
+
),
|
|
1717
|
+
article.documentGroup && article.documentGroup.isSeries && sliderData && !seriesInfo.hasVideo && !disableEpisodeNumber && React__default.createElement(
|
|
1703
1718
|
'div',
|
|
1704
1719
|
null,
|
|
1705
1720
|
false ,
|
|
@@ -1726,7 +1741,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1726
1741
|
ISI,
|
|
1727
1742
|
null,
|
|
1728
1743
|
React__default.createElement(BlockContent, {
|
|
1729
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, false, null,
|
|
1744
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, false, null, article.Ads, targeting),
|
|
1730
1745
|
blocks: isi
|
|
1731
1746
|
})
|
|
1732
1747
|
),
|
|
@@ -2084,7 +2099,6 @@ var View = function View(props) {
|
|
|
2084
2099
|
canonicalTag = _props$canonicalTag === undefined ? true : _props$canonicalTag,
|
|
2085
2100
|
_props$infiniteScroll = props.infiniteScrollFlag,
|
|
2086
2101
|
infiniteScrollFlag = _props$infiniteScroll === undefined ? true : _props$infiniteScroll;
|
|
2087
|
-
props.disableEpisodeNumber;
|
|
2088
2102
|
var _props$article2 = props.article,
|
|
2089
2103
|
_props$article2$passw = _props$article2.passwordLock,
|
|
2090
2104
|
passwordLock = _props$article2$passw === undefined ? false : _props$article2$passw;
|
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':
|