@mjhls/mjh-framework 1.0.998 → 1.0.1000
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/ExternalResources.js +4 -3
- package/dist/cjs/View.js +50 -37
- package/dist/cjs/getQuery.js +1 -1
- package/dist/esm/ExternalResources.js +4 -3
- package/dist/esm/View.js +50 -37
- package/dist/esm/getQuery.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# mjh-framework v. 1.0.
|
|
1
|
+
# mjh-framework v. 1.0.1000
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
4
4
|
|
|
@@ -121,6 +121,7 @@ var ExternalResources = function ExternalResources(props) {
|
|
|
121
121
|
)
|
|
122
122
|
),
|
|
123
123
|
resources[active].length > 0 ? resources[active].map(function (r) {
|
|
124
|
+
var destination = r.destination ? r.destination : '';
|
|
124
125
|
return React__default["default"].createElement(
|
|
125
126
|
'div',
|
|
126
127
|
{ key: r._id, className: 'resource' },
|
|
@@ -129,7 +130,7 @@ var ExternalResources = function ExternalResources(props) {
|
|
|
129
130
|
{ id: 'thumb' },
|
|
130
131
|
React__default["default"].createElement(
|
|
131
132
|
'a',
|
|
132
|
-
{ href:
|
|
133
|
+
{ href: destination, target: '_blank', rel: checkSisterSite.checkSisterSite(destination) ? '' : 'noopener noreferrer' },
|
|
133
134
|
React__default["default"].createElement('img', { src: r.thumbnail })
|
|
134
135
|
)
|
|
135
136
|
),
|
|
@@ -138,7 +139,7 @@ var ExternalResources = function ExternalResources(props) {
|
|
|
138
139
|
{ id: 'details' },
|
|
139
140
|
React__default["default"].createElement(
|
|
140
141
|
'a',
|
|
141
|
-
{ href:
|
|
142
|
+
{ href: destination, target: '_blank', rel: checkSisterSite.checkSisterSite(destination) ? '' : 'noopener noreferrer' },
|
|
142
143
|
React__default["default"].createElement(
|
|
143
144
|
'p',
|
|
144
145
|
{ id: 'title' },
|
|
@@ -198,7 +199,7 @@ var ExternalResources = function ExternalResources(props) {
|
|
|
198
199
|
),
|
|
199
200
|
React__default["default"].createElement(
|
|
200
201
|
Button__default["default"],
|
|
201
|
-
{ id: 'cta', variant: 'secondary', href:
|
|
202
|
+
{ id: 'cta', variant: 'secondary', href: destination, target: '_blank', rel: checkSisterSite.checkSisterSite(destination) ? '' : 'noopener noreferrer' },
|
|
202
203
|
cta
|
|
203
204
|
)
|
|
204
205
|
)
|
package/dist/cjs/View.js
CHANGED
|
@@ -1027,6 +1027,8 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1027
1027
|
downloadCitation = _props$downloadCitati === undefined ? false : _props$downloadCitati,
|
|
1028
1028
|
_props$useSegmentReco = props.useSegmentRecommendedArticles,
|
|
1029
1029
|
useSegmentRecommendedArticles = _props$useSegmentReco === undefined ? false : _props$useSegmentReco,
|
|
1030
|
+
showIssueNameOnly = props.showIssueNameOnly,
|
|
1031
|
+
showPageNumber = props.showPageNumber,
|
|
1030
1032
|
emailList = props.emailList,
|
|
1031
1033
|
articleRecs = props.articleRecs;
|
|
1032
1034
|
var sliderData = props.sliderData;
|
|
@@ -1037,9 +1039,9 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1037
1039
|
if (article && article.documentGroup && article.documentGroup.disableEpisodeNumber === true) {
|
|
1038
1040
|
disableEpisodeNumber = true;
|
|
1039
1041
|
}
|
|
1040
|
-
var logicforDisplayingEpisodeNumber = disableEpisodeNumber
|
|
1042
|
+
var logicforDisplayingEpisodeNumber = !disableEpisodeNumber;
|
|
1041
1043
|
var targeting = getTargeting.getTargeting(props);
|
|
1042
|
-
//remove slider data if toggled
|
|
1044
|
+
// remove slider data if toggled
|
|
1043
1045
|
if (article && article.documentGroup && article.documentGroup.hideSeriesSlider === true) {
|
|
1044
1046
|
sliderData = null;
|
|
1045
1047
|
}
|
|
@@ -1063,12 +1065,12 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1063
1065
|
}
|
|
1064
1066
|
}
|
|
1065
1067
|
|
|
1066
|
-
//if showSocialShare is not disabled for entire site, check article taxonomy, docgroup, authors for showSocialShare === false
|
|
1068
|
+
// if showSocialShare is not disabled for entire site, check article taxonomy, docgroup, authors for showSocialShare === false
|
|
1067
1069
|
if (showSocialShare) {
|
|
1068
1070
|
showSocialShare = getSocialShareDisableFlag(props.article);
|
|
1069
1071
|
}
|
|
1070
1072
|
|
|
1071
|
-
//If sponsored flag, disable contextual ads
|
|
1073
|
+
// If sponsored flag, disable contextual ads
|
|
1072
1074
|
if (sponsoredFlag) {
|
|
1073
1075
|
article.contextualVideoAD = false;
|
|
1074
1076
|
article.contextualAD = false;
|
|
@@ -1077,7 +1079,7 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1077
1079
|
if (article.disableRelatedContent) {
|
|
1078
1080
|
showRelatedArticles = false;
|
|
1079
1081
|
}
|
|
1080
|
-
//This was being done in ArticleQueue2 which wasnt effecting articles excluded from infinite scroll, moved inside article component
|
|
1082
|
+
// This was being done in ArticleQueue2 which wasnt effecting articles excluded from infinite scroll, moved inside article component
|
|
1081
1083
|
if (!sponsoredFlag && Ads.getVideoContextualAD) {
|
|
1082
1084
|
article.contextualVideoAD = Ads.getVideoContextualAD(getTargeting.getTargeting(props, 'in-context_video'));
|
|
1083
1085
|
}
|
|
@@ -1158,9 +1160,11 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1158
1160
|
|
|
1159
1161
|
var getAbstract = function getAbstract() {
|
|
1160
1162
|
return article.abstract && article.abstract.map(function (block) {
|
|
1161
|
-
if (block.children)
|
|
1162
|
-
|
|
1163
|
-
|
|
1163
|
+
if (block.children) {
|
|
1164
|
+
return block.children.map(function (child) {
|
|
1165
|
+
if (child._type === 'span') return child.text;
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1164
1168
|
}).join(' ');
|
|
1165
1169
|
};
|
|
1166
1170
|
|
|
@@ -1178,52 +1182,52 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1178
1182
|
var fileContent = 'TY - JOUR\n';
|
|
1179
1183
|
if (issue) {
|
|
1180
1184
|
if (article.title) {
|
|
1181
|
-
fileContent += 'TI - ' + article.title + '\n'; //Title - TI
|
|
1182
|
-
fileContent += 'T1 - ' + article.title + '\n'; //Title - T1
|
|
1185
|
+
fileContent += 'TI - ' + article.title + '\n'; // Title - TI
|
|
1186
|
+
fileContent += 'T1 - ' + article.title + '\n'; // Title - T1
|
|
1183
1187
|
}
|
|
1184
1188
|
if (authorDetails && authorDetails.length) {
|
|
1185
1189
|
authorDetails.map(function (authorDetail, index) {
|
|
1186
1190
|
return fileContent += 'AU - ' + (authorDetail.firstName && authorDetail.lastName ? authorDetail.lastName + ', ' + authorDetail.firstName : '' + authorDetail.displayName) + '\n';
|
|
1187
|
-
} //Author
|
|
1191
|
+
} // Author
|
|
1188
1192
|
);
|
|
1189
1193
|
}
|
|
1190
1194
|
if (issue.publication && issue.publication.name) {
|
|
1191
|
-
fileContent += 'T2 - ' + issue.publication.name + '\n'; //Secondary Title - T2
|
|
1192
|
-
fileContent += 'JF - ' + issue.publication.name + '\n'; //Journal Name - JF
|
|
1195
|
+
fileContent += 'T2 - ' + issue.publication.name + '\n'; // Secondary Title - T2
|
|
1196
|
+
fileContent += 'JF - ' + issue.publication.name + '\n'; // Journal Name - JF
|
|
1193
1197
|
}
|
|
1194
1198
|
if (issue.name) {
|
|
1195
|
-
fileContent += 'T3 - ' + issue.name + '\n'; //Issue Name - T3
|
|
1199
|
+
fileContent += 'T3 - ' + issue.name + '\n'; // Issue Name - T3
|
|
1196
1200
|
}
|
|
1197
1201
|
if (issue.abbreviatedJournal) {
|
|
1198
|
-
fileContent += 'JO - ' + issue.abbreviatedJournal + '\n'; //Journal Name - JO
|
|
1202
|
+
fileContent += 'JO - ' + issue.abbreviatedJournal + '\n'; // Journal Name - JO
|
|
1199
1203
|
}
|
|
1200
|
-
if (article.abstract) fileContent += 'AB - ' + getAbstract() + '\n'; //Abstract - AB
|
|
1201
|
-
if (article.abstract) fileContent += 'N2 - ' + getAbstract() + '\n'; //Abstract - N2
|
|
1202
|
-
if (issue.issueNumber) fileContent += 'IS - ' + issue.issueNumber + '\n'; //Issue Number - IS
|
|
1203
|
-
fileContent += 'PB - MJH Life Sciences\n'; //Publisher - PB
|
|
1204
|
-
if (issue.year) fileContent += 'PY - ' + issue.year + '\n'; //Published Year - PY
|
|
1205
|
-
if (issue.volume) fileContent += 'VL - ' + issue.volume + '\n'; //Volume - VL
|
|
1206
|
-
if (issue.url) fileContent += 'L1 - ' + issue.url + '\n'; //Link to PDF - L1
|
|
1204
|
+
if (article.abstract) fileContent += 'AB - ' + getAbstract() + '\n'; // Abstract - AB
|
|
1205
|
+
if (article.abstract) fileContent += 'N2 - ' + getAbstract() + '\n'; // Abstract - N2
|
|
1206
|
+
if (issue.issueNumber) fileContent += 'IS - ' + issue.issueNumber + '\n'; // Issue Number - IS
|
|
1207
|
+
fileContent += 'PB - MJH Life Sciences\n'; // Publisher - PB
|
|
1208
|
+
if (issue.year) fileContent += 'PY - ' + issue.year + '\n'; // Published Year - PY
|
|
1209
|
+
if (issue.volume) fileContent += 'VL - ' + issue.volume + '\n'; // Volume - VL
|
|
1210
|
+
if (issue.url) fileContent += 'L1 - ' + issue.url + '\n'; // Link to PDF - L1
|
|
1207
1211
|
if (shareOptions && shareOptions.shareBaseUrl) {
|
|
1208
|
-
fileContent += 'L2 - ' + (shareOptions.shareBaseUrl + url) + '\n'; //Link to Full-text - L2
|
|
1209
|
-
fileContent += 'UR - ' + (shareOptions.shareBaseUrl + url) + '\n'; //Doc URL - UR
|
|
1212
|
+
fileContent += 'L2 - ' + (shareOptions.shareBaseUrl + url) + '\n'; // Link to Full-text - L2
|
|
1213
|
+
fileContent += 'UR - ' + (shareOptions.shareBaseUrl + url) + '\n'; // Doc URL - UR
|
|
1210
1214
|
}
|
|
1211
|
-
if (props.Website) fileContent += 'LK - https://' + props.Website.liveDomain + '\n'; //Website Link - LK
|
|
1215
|
+
if (props.Website) fileContent += 'LK - https://' + props.Website.liveDomain + '\n'; // Website Link - LK
|
|
1212
1216
|
if (issue.isbn_issn) {
|
|
1213
|
-
fileContent += 'SN - ' + issue.isbn_issn + '\n'; //ISSN/ISBN - TI
|
|
1217
|
+
fileContent += 'SN - ' + issue.isbn_issn + '\n'; // ISSN/ISBN - TI
|
|
1214
1218
|
}
|
|
1215
1219
|
if (pageNumber) {
|
|
1216
1220
|
if (pageNumber.includes('-')) {
|
|
1217
|
-
fileContent += 'SP - ' + pageNumber.split('-')[0] + '\n'; //Start Page - SP
|
|
1218
|
-
fileContent += 'EP - ' + pageNumber.split('-')[1] + '\n'; //End Page - EP
|
|
1221
|
+
fileContent += 'SP - ' + pageNumber.split('-')[0] + '\n'; // Start Page - SP
|
|
1222
|
+
fileContent += 'EP - ' + pageNumber.split('-')[1] + '\n'; // End Page - EP
|
|
1219
1223
|
} else {
|
|
1220
1224
|
fileContent += 'SP - ' + pageNumber + '\n';
|
|
1221
1225
|
}
|
|
1222
1226
|
}
|
|
1223
|
-
if (article.published) fileContent += 'Y1 - ' + moment.moment(published).format('DD-MMMM-YYYY') + '\n'; //Primary Date - Y1
|
|
1224
|
-
fileContent += 'Y2 - ' + moment.moment().format('DD-MMMM-YYYY') + '\n'; //Access Date - Y2
|
|
1227
|
+
if (article.published) fileContent += 'Y1 - ' + moment.moment(published).format('DD-MMMM-YYYY') + '\n'; // Primary Date - Y1
|
|
1228
|
+
fileContent += 'Y2 - ' + moment.moment().format('DD-MMMM-YYYY') + '\n'; // Access Date - Y2
|
|
1225
1229
|
}
|
|
1226
|
-
fileContent += 'ER -\n'; //End of Record
|
|
1230
|
+
fileContent += 'ER -\n'; // End of Record
|
|
1227
1231
|
return fileContent;
|
|
1228
1232
|
};
|
|
1229
1233
|
var getAuthorList = function getAuthorList() {
|
|
@@ -1786,7 +1790,7 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1786
1790
|
{ className: 'volume-issue' },
|
|
1787
1791
|
issue.publication && issue.publication.name && React__default["default"].createElement(
|
|
1788
1792
|
'span',
|
|
1789
|
-
{ className: 'mb-0' },
|
|
1793
|
+
{ className: 'mb-0-pub' },
|
|
1790
1794
|
React__default["default"].createElement(
|
|
1791
1795
|
'b',
|
|
1792
1796
|
null,
|
|
@@ -1795,17 +1799,22 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1795
1799
|
',',
|
|
1796
1800
|
' '
|
|
1797
1801
|
),
|
|
1798
|
-
issue.name && React__default["default"].createElement(
|
|
1802
|
+
issue.name && showIssueNameOnly === undefined ? React__default["default"].createElement(
|
|
1799
1803
|
'span',
|
|
1800
1804
|
{ className: 'mb-0' },
|
|
1801
1805
|
issue.name,
|
|
1802
1806
|
', '
|
|
1803
|
-
)
|
|
1807
|
+
) : issue.name && showIssueNameOnly === false ? React__default["default"].createElement(
|
|
1808
|
+
'span',
|
|
1809
|
+
{ className: 'mb-0' },
|
|
1810
|
+
issue.name,
|
|
1811
|
+
', '
|
|
1812
|
+
) : null,
|
|
1804
1813
|
issue.volume && React__default["default"].createElement(
|
|
1805
1814
|
'span',
|
|
1806
1815
|
null,
|
|
1807
1816
|
'Volume ' + issue.volume,
|
|
1808
|
-
','
|
|
1817
|
+
', '
|
|
1809
1818
|
),
|
|
1810
1819
|
issue.issueNumber && React__default["default"].createElement(
|
|
1811
1820
|
'span',
|
|
@@ -1813,11 +1822,15 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1813
1822
|
' Issue ' + issue.issueNumber
|
|
1814
1823
|
)
|
|
1815
1824
|
),
|
|
1816
|
-
pageNumber && React__default["default"].createElement(
|
|
1825
|
+
pageNumber && showPageNumber ? React__default["default"].createElement(
|
|
1817
1826
|
'div',
|
|
1818
1827
|
{ className: 'article-pageNumber' },
|
|
1819
1828
|
'Pages: ' + pageNumber
|
|
1820
|
-
)
|
|
1829
|
+
) : pageNumber && showPageNumber === undefined ? React__default["default"].createElement(
|
|
1830
|
+
'div',
|
|
1831
|
+
{ className: 'article-pageNumber' },
|
|
1832
|
+
'Pages: ' + pageNumber
|
|
1833
|
+
) : null
|
|
1821
1834
|
),
|
|
1822
1835
|
React__default["default"].createElement(
|
|
1823
1836
|
'div',
|
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 && isHealthcareProfessional != 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 abstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, firstName, lastName, 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 pixelTrackingCode->\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider,\n pixelTrackingCode->\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 pixelTrackingCode->\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 abstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, firstName, lastName, 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, firstName, lastName, 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 pixelTrackingCode->\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 pixelTrackingCode->\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n isSeries,\n disableEpisodeNumber,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current,\n hideSeriesSlider,\n pixelTrackingCode->\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 abstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, showIssueNameOnly, showPageNumber, parent-> },\n "authorDetails": authorMapping[]->{ displayName, firstName, lastName, 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, firstName, lastName, 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 pixelTrackingCode->\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 pixelTrackingCode->\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n isSeries,\n disableEpisodeNumber,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current,\n hideSeriesSlider,\n pixelTrackingCode->\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':
|
|
@@ -114,6 +114,7 @@ var ExternalResources = function ExternalResources(props) {
|
|
|
114
114
|
)
|
|
115
115
|
),
|
|
116
116
|
resources[active].length > 0 ? resources[active].map(function (r) {
|
|
117
|
+
var destination = r.destination ? r.destination : '';
|
|
117
118
|
return React__default.createElement(
|
|
118
119
|
'div',
|
|
119
120
|
{ key: r._id, className: 'resource' },
|
|
@@ -122,7 +123,7 @@ var ExternalResources = function ExternalResources(props) {
|
|
|
122
123
|
{ id: 'thumb' },
|
|
123
124
|
React__default.createElement(
|
|
124
125
|
'a',
|
|
125
|
-
{ href:
|
|
126
|
+
{ href: destination, target: '_blank', rel: checkSisterSite(destination) ? '' : 'noopener noreferrer' },
|
|
126
127
|
React__default.createElement('img', { src: r.thumbnail })
|
|
127
128
|
)
|
|
128
129
|
),
|
|
@@ -131,7 +132,7 @@ var ExternalResources = function ExternalResources(props) {
|
|
|
131
132
|
{ id: 'details' },
|
|
132
133
|
React__default.createElement(
|
|
133
134
|
'a',
|
|
134
|
-
{ href:
|
|
135
|
+
{ href: destination, target: '_blank', rel: checkSisterSite(destination) ? '' : 'noopener noreferrer' },
|
|
135
136
|
React__default.createElement(
|
|
136
137
|
'p',
|
|
137
138
|
{ id: 'title' },
|
|
@@ -191,7 +192,7 @@ var ExternalResources = function ExternalResources(props) {
|
|
|
191
192
|
),
|
|
192
193
|
React__default.createElement(
|
|
193
194
|
Button,
|
|
194
|
-
{ id: 'cta', variant: 'secondary', href:
|
|
195
|
+
{ id: 'cta', variant: 'secondary', href: destination, target: '_blank', rel: checkSisterSite(destination) ? '' : 'noopener noreferrer' },
|
|
195
196
|
cta
|
|
196
197
|
)
|
|
197
198
|
)
|
package/dist/esm/View.js
CHANGED
|
@@ -1017,6 +1017,8 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1017
1017
|
downloadCitation = _props$downloadCitati === undefined ? false : _props$downloadCitati,
|
|
1018
1018
|
_props$useSegmentReco = props.useSegmentRecommendedArticles,
|
|
1019
1019
|
useSegmentRecommendedArticles = _props$useSegmentReco === undefined ? false : _props$useSegmentReco,
|
|
1020
|
+
showIssueNameOnly = props.showIssueNameOnly,
|
|
1021
|
+
showPageNumber = props.showPageNumber,
|
|
1020
1022
|
emailList = props.emailList,
|
|
1021
1023
|
articleRecs = props.articleRecs;
|
|
1022
1024
|
var sliderData = props.sliderData;
|
|
@@ -1027,9 +1029,9 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1027
1029
|
if (article && article.documentGroup && article.documentGroup.disableEpisodeNumber === true) {
|
|
1028
1030
|
disableEpisodeNumber = true;
|
|
1029
1031
|
}
|
|
1030
|
-
var logicforDisplayingEpisodeNumber = disableEpisodeNumber
|
|
1032
|
+
var logicforDisplayingEpisodeNumber = !disableEpisodeNumber;
|
|
1031
1033
|
var targeting = getTargeting(props);
|
|
1032
|
-
//remove slider data if toggled
|
|
1034
|
+
// remove slider data if toggled
|
|
1033
1035
|
if (article && article.documentGroup && article.documentGroup.hideSeriesSlider === true) {
|
|
1034
1036
|
sliderData = null;
|
|
1035
1037
|
}
|
|
@@ -1053,12 +1055,12 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1053
1055
|
}
|
|
1054
1056
|
}
|
|
1055
1057
|
|
|
1056
|
-
//if showSocialShare is not disabled for entire site, check article taxonomy, docgroup, authors for showSocialShare === false
|
|
1058
|
+
// if showSocialShare is not disabled for entire site, check article taxonomy, docgroup, authors for showSocialShare === false
|
|
1057
1059
|
if (showSocialShare) {
|
|
1058
1060
|
showSocialShare = getSocialShareDisableFlag(props.article);
|
|
1059
1061
|
}
|
|
1060
1062
|
|
|
1061
|
-
//If sponsored flag, disable contextual ads
|
|
1063
|
+
// If sponsored flag, disable contextual ads
|
|
1062
1064
|
if (sponsoredFlag) {
|
|
1063
1065
|
article.contextualVideoAD = false;
|
|
1064
1066
|
article.contextualAD = false;
|
|
@@ -1067,7 +1069,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1067
1069
|
if (article.disableRelatedContent) {
|
|
1068
1070
|
showRelatedArticles = false;
|
|
1069
1071
|
}
|
|
1070
|
-
//This was being done in ArticleQueue2 which wasnt effecting articles excluded from infinite scroll, moved inside article component
|
|
1072
|
+
// This was being done in ArticleQueue2 which wasnt effecting articles excluded from infinite scroll, moved inside article component
|
|
1071
1073
|
if (!sponsoredFlag && Ads.getVideoContextualAD) {
|
|
1072
1074
|
article.contextualVideoAD = Ads.getVideoContextualAD(getTargeting(props, 'in-context_video'));
|
|
1073
1075
|
}
|
|
@@ -1148,9 +1150,11 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1148
1150
|
|
|
1149
1151
|
var getAbstract = function getAbstract() {
|
|
1150
1152
|
return article.abstract && article.abstract.map(function (block) {
|
|
1151
|
-
if (block.children)
|
|
1152
|
-
|
|
1153
|
-
|
|
1153
|
+
if (block.children) {
|
|
1154
|
+
return block.children.map(function (child) {
|
|
1155
|
+
if (child._type === 'span') return child.text;
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1154
1158
|
}).join(' ');
|
|
1155
1159
|
};
|
|
1156
1160
|
|
|
@@ -1168,52 +1172,52 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1168
1172
|
var fileContent = 'TY - JOUR\n';
|
|
1169
1173
|
if (issue) {
|
|
1170
1174
|
if (article.title) {
|
|
1171
|
-
fileContent += 'TI - ' + article.title + '\n'; //Title - TI
|
|
1172
|
-
fileContent += 'T1 - ' + article.title + '\n'; //Title - T1
|
|
1175
|
+
fileContent += 'TI - ' + article.title + '\n'; // Title - TI
|
|
1176
|
+
fileContent += 'T1 - ' + article.title + '\n'; // Title - T1
|
|
1173
1177
|
}
|
|
1174
1178
|
if (authorDetails && authorDetails.length) {
|
|
1175
1179
|
authorDetails.map(function (authorDetail, index) {
|
|
1176
1180
|
return fileContent += 'AU - ' + (authorDetail.firstName && authorDetail.lastName ? authorDetail.lastName + ', ' + authorDetail.firstName : '' + authorDetail.displayName) + '\n';
|
|
1177
|
-
} //Author
|
|
1181
|
+
} // Author
|
|
1178
1182
|
);
|
|
1179
1183
|
}
|
|
1180
1184
|
if (issue.publication && issue.publication.name) {
|
|
1181
|
-
fileContent += 'T2 - ' + issue.publication.name + '\n'; //Secondary Title - T2
|
|
1182
|
-
fileContent += 'JF - ' + issue.publication.name + '\n'; //Journal Name - JF
|
|
1185
|
+
fileContent += 'T2 - ' + issue.publication.name + '\n'; // Secondary Title - T2
|
|
1186
|
+
fileContent += 'JF - ' + issue.publication.name + '\n'; // Journal Name - JF
|
|
1183
1187
|
}
|
|
1184
1188
|
if (issue.name) {
|
|
1185
|
-
fileContent += 'T3 - ' + issue.name + '\n'; //Issue Name - T3
|
|
1189
|
+
fileContent += 'T3 - ' + issue.name + '\n'; // Issue Name - T3
|
|
1186
1190
|
}
|
|
1187
1191
|
if (issue.abbreviatedJournal) {
|
|
1188
|
-
fileContent += 'JO - ' + issue.abbreviatedJournal + '\n'; //Journal Name - JO
|
|
1192
|
+
fileContent += 'JO - ' + issue.abbreviatedJournal + '\n'; // Journal Name - JO
|
|
1189
1193
|
}
|
|
1190
|
-
if (article.abstract) fileContent += 'AB - ' + getAbstract() + '\n'; //Abstract - AB
|
|
1191
|
-
if (article.abstract) fileContent += 'N2 - ' + getAbstract() + '\n'; //Abstract - N2
|
|
1192
|
-
if (issue.issueNumber) fileContent += 'IS - ' + issue.issueNumber + '\n'; //Issue Number - IS
|
|
1193
|
-
fileContent += 'PB - MJH Life Sciences\n'; //Publisher - PB
|
|
1194
|
-
if (issue.year) fileContent += 'PY - ' + issue.year + '\n'; //Published Year - PY
|
|
1195
|
-
if (issue.volume) fileContent += 'VL - ' + issue.volume + '\n'; //Volume - VL
|
|
1196
|
-
if (issue.url) fileContent += 'L1 - ' + issue.url + '\n'; //Link to PDF - L1
|
|
1194
|
+
if (article.abstract) fileContent += 'AB - ' + getAbstract() + '\n'; // Abstract - AB
|
|
1195
|
+
if (article.abstract) fileContent += 'N2 - ' + getAbstract() + '\n'; // Abstract - N2
|
|
1196
|
+
if (issue.issueNumber) fileContent += 'IS - ' + issue.issueNumber + '\n'; // Issue Number - IS
|
|
1197
|
+
fileContent += 'PB - MJH Life Sciences\n'; // Publisher - PB
|
|
1198
|
+
if (issue.year) fileContent += 'PY - ' + issue.year + '\n'; // Published Year - PY
|
|
1199
|
+
if (issue.volume) fileContent += 'VL - ' + issue.volume + '\n'; // Volume - VL
|
|
1200
|
+
if (issue.url) fileContent += 'L1 - ' + issue.url + '\n'; // Link to PDF - L1
|
|
1197
1201
|
if (shareOptions && shareOptions.shareBaseUrl) {
|
|
1198
|
-
fileContent += 'L2 - ' + (shareOptions.shareBaseUrl + url) + '\n'; //Link to Full-text - L2
|
|
1199
|
-
fileContent += 'UR - ' + (shareOptions.shareBaseUrl + url) + '\n'; //Doc URL - UR
|
|
1202
|
+
fileContent += 'L2 - ' + (shareOptions.shareBaseUrl + url) + '\n'; // Link to Full-text - L2
|
|
1203
|
+
fileContent += 'UR - ' + (shareOptions.shareBaseUrl + url) + '\n'; // Doc URL - UR
|
|
1200
1204
|
}
|
|
1201
|
-
if (props.Website) fileContent += 'LK - https://' + props.Website.liveDomain + '\n'; //Website Link - LK
|
|
1205
|
+
if (props.Website) fileContent += 'LK - https://' + props.Website.liveDomain + '\n'; // Website Link - LK
|
|
1202
1206
|
if (issue.isbn_issn) {
|
|
1203
|
-
fileContent += 'SN - ' + issue.isbn_issn + '\n'; //ISSN/ISBN - TI
|
|
1207
|
+
fileContent += 'SN - ' + issue.isbn_issn + '\n'; // ISSN/ISBN - TI
|
|
1204
1208
|
}
|
|
1205
1209
|
if (pageNumber) {
|
|
1206
1210
|
if (pageNumber.includes('-')) {
|
|
1207
|
-
fileContent += 'SP - ' + pageNumber.split('-')[0] + '\n'; //Start Page - SP
|
|
1208
|
-
fileContent += 'EP - ' + pageNumber.split('-')[1] + '\n'; //End Page - EP
|
|
1211
|
+
fileContent += 'SP - ' + pageNumber.split('-')[0] + '\n'; // Start Page - SP
|
|
1212
|
+
fileContent += 'EP - ' + pageNumber.split('-')[1] + '\n'; // End Page - EP
|
|
1209
1213
|
} else {
|
|
1210
1214
|
fileContent += 'SP - ' + pageNumber + '\n';
|
|
1211
1215
|
}
|
|
1212
1216
|
}
|
|
1213
|
-
if (article.published) fileContent += 'Y1 - ' + moment(published).format('DD-MMMM-YYYY') + '\n'; //Primary Date - Y1
|
|
1214
|
-
fileContent += 'Y2 - ' + moment().format('DD-MMMM-YYYY') + '\n'; //Access Date - Y2
|
|
1217
|
+
if (article.published) fileContent += 'Y1 - ' + moment(published).format('DD-MMMM-YYYY') + '\n'; // Primary Date - Y1
|
|
1218
|
+
fileContent += 'Y2 - ' + moment().format('DD-MMMM-YYYY') + '\n'; // Access Date - Y2
|
|
1215
1219
|
}
|
|
1216
|
-
fileContent += 'ER -\n'; //End of Record
|
|
1220
|
+
fileContent += 'ER -\n'; // End of Record
|
|
1217
1221
|
return fileContent;
|
|
1218
1222
|
};
|
|
1219
1223
|
var getAuthorList = function getAuthorList() {
|
|
@@ -1776,7 +1780,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1776
1780
|
{ className: 'volume-issue' },
|
|
1777
1781
|
issue.publication && issue.publication.name && React__default.createElement(
|
|
1778
1782
|
'span',
|
|
1779
|
-
{ className: 'mb-0' },
|
|
1783
|
+
{ className: 'mb-0-pub' },
|
|
1780
1784
|
React__default.createElement(
|
|
1781
1785
|
'b',
|
|
1782
1786
|
null,
|
|
@@ -1785,17 +1789,22 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1785
1789
|
',',
|
|
1786
1790
|
' '
|
|
1787
1791
|
),
|
|
1788
|
-
issue.name && React__default.createElement(
|
|
1792
|
+
issue.name && showIssueNameOnly === undefined ? React__default.createElement(
|
|
1789
1793
|
'span',
|
|
1790
1794
|
{ className: 'mb-0' },
|
|
1791
1795
|
issue.name,
|
|
1792
1796
|
', '
|
|
1793
|
-
)
|
|
1797
|
+
) : issue.name && showIssueNameOnly === false ? React__default.createElement(
|
|
1798
|
+
'span',
|
|
1799
|
+
{ className: 'mb-0' },
|
|
1800
|
+
issue.name,
|
|
1801
|
+
', '
|
|
1802
|
+
) : null,
|
|
1794
1803
|
issue.volume && React__default.createElement(
|
|
1795
1804
|
'span',
|
|
1796
1805
|
null,
|
|
1797
1806
|
'Volume ' + issue.volume,
|
|
1798
|
-
','
|
|
1807
|
+
', '
|
|
1799
1808
|
),
|
|
1800
1809
|
issue.issueNumber && React__default.createElement(
|
|
1801
1810
|
'span',
|
|
@@ -1803,11 +1812,15 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1803
1812
|
' Issue ' + issue.issueNumber
|
|
1804
1813
|
)
|
|
1805
1814
|
),
|
|
1806
|
-
pageNumber && React__default.createElement(
|
|
1815
|
+
pageNumber && showPageNumber ? React__default.createElement(
|
|
1807
1816
|
'div',
|
|
1808
1817
|
{ className: 'article-pageNumber' },
|
|
1809
1818
|
'Pages: ' + pageNumber
|
|
1810
|
-
)
|
|
1819
|
+
) : pageNumber && showPageNumber === undefined ? React__default.createElement(
|
|
1820
|
+
'div',
|
|
1821
|
+
{ className: 'article-pageNumber' },
|
|
1822
|
+
'Pages: ' + pageNumber
|
|
1823
|
+
) : null
|
|
1811
1824
|
),
|
|
1812
1825
|
React__default.createElement(
|
|
1813
1826
|
'div',
|
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 && isHealthcareProfessional != 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 abstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, firstName, lastName, 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 pixelTrackingCode->\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider,\n pixelTrackingCode->\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 pixelTrackingCode->\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 abstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, firstName, lastName, 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, firstName, lastName, 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 pixelTrackingCode->\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 pixelTrackingCode->\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n isSeries,\n disableEpisodeNumber,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current,\n hideSeriesSlider,\n pixelTrackingCode->\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 abstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, showIssueNameOnly, showPageNumber, parent-> },\n "authorDetails": authorMapping[]->{ displayName, firstName, lastName, 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, firstName, lastName, 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 pixelTrackingCode->\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 pixelTrackingCode->\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n isSeries,\n disableEpisodeNumber,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current,\n hideSeriesSlider,\n pixelTrackingCode->\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':
|