@mjhls/mjh-framework 1.0.981 → 1.0.982
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 +64 -27
- package/dist/cjs/getQuery.js +3 -3
- package/dist/esm/View.js +64 -27
- package/dist/esm/getQuery.js +3 -3
- package/package.json +1 -1
package/dist/cjs/View.js
CHANGED
|
@@ -1104,6 +1104,15 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1104
1104
|
}, client.config()));
|
|
1105
1105
|
}
|
|
1106
1106
|
};
|
|
1107
|
+
|
|
1108
|
+
var getAbstract = function getAbstract() {
|
|
1109
|
+
return article.abstract && article.abstract.map(function (block) {
|
|
1110
|
+
if (block.children) return block.children.map(function (child) {
|
|
1111
|
+
if (child._type === 'span') return child.text;
|
|
1112
|
+
});
|
|
1113
|
+
}).join(' ');
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1107
1116
|
var renderIsiContent = function renderIsiContent(article) {
|
|
1108
1117
|
var url = article.url.current;
|
|
1109
1118
|
|
|
@@ -1123,7 +1132,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1123
1132
|
}
|
|
1124
1133
|
if (authorDetails && authorDetails.length) {
|
|
1125
1134
|
authorDetails.map(function (authorDetail, index) {
|
|
1126
|
-
return fileContent += 'AU - ' + authorDetail.displayName + '\n';
|
|
1135
|
+
return fileContent += 'AU - ' + (authorDetail.firstName && authorDetail.lastName ? authorDetail.lastName + ', ' + authorDetail.firstName : '' + authorDetail.displayName) + '\n';
|
|
1127
1136
|
} //Author
|
|
1128
1137
|
);
|
|
1129
1138
|
}
|
|
@@ -1131,10 +1140,14 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1131
1140
|
fileContent += 'T2 - ' + issue.publication.name + '\n'; //Secondary Title - T2
|
|
1132
1141
|
fileContent += 'JF - ' + issue.publication.name + '\n'; //Journal Name - JF
|
|
1133
1142
|
}
|
|
1143
|
+
if (issue.name) {
|
|
1144
|
+
fileContent += 'T3 - ' + issue.name + '\n'; //Issue Name - T3
|
|
1145
|
+
}
|
|
1134
1146
|
if (issue.abbreviatedJournal) {
|
|
1135
1147
|
fileContent += 'JO - ' + issue.abbreviatedJournal + '\n'; //Journal Name - JO
|
|
1136
1148
|
}
|
|
1137
|
-
if (article.
|
|
1149
|
+
if (article.abstract) fileContent += 'AB - ' + getAbstract() + '\n'; //Abstract - AB
|
|
1150
|
+
if (article.abstract) fileContent += 'N2 - ' + getAbstract() + '\n'; //Abstract - N2
|
|
1138
1151
|
if (issue.issueNumber) fileContent += 'IS - ' + issue.issueNumber + '\n'; //Issue Number - IS
|
|
1139
1152
|
fileContent += 'PB - MJH Life Sciences\n'; //Publisher - PB
|
|
1140
1153
|
if (issue.year) fileContent += 'PY - ' + issue.year + '\n'; //Published Year - PY
|
|
@@ -1162,6 +1175,15 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1162
1175
|
fileContent += 'ER -\n'; //End of Record
|
|
1163
1176
|
return fileContent;
|
|
1164
1177
|
};
|
|
1178
|
+
var getAuthorList = function getAuthorList() {
|
|
1179
|
+
var authorList = '';
|
|
1180
|
+
if (authorDetails && authorDetails.length > 0) {
|
|
1181
|
+
authorDetails.map(function (author) {
|
|
1182
|
+
if (author.lastName && author.firstName) authorList += author.lastName + ',' + author.firstName + ';';else if (author.displayName) authorList += author.displayName + ';';
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
return authorList;
|
|
1186
|
+
};
|
|
1165
1187
|
var downloadRIS = function downloadRIS() {
|
|
1166
1188
|
var fileContent = generateRIS();
|
|
1167
1189
|
var file = new File([fileContent], 'citation-' + url + '.ris', { type: 'application/x-research-info-systems;charset=utf-8' });
|
|
@@ -1628,6 +1650,17 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1628
1650
|
React__default['default'].createElement(
|
|
1629
1651
|
'div',
|
|
1630
1652
|
{ className: 'video-detail', style: { marginBottom: isCutomPage(props.article) || showIsi && Array.isArray(isi) && isi.length > 0 ? '15rem' : 0 } },
|
|
1653
|
+
issue && React__default['default'].createElement(
|
|
1654
|
+
Head__default['default'],
|
|
1655
|
+
null,
|
|
1656
|
+
article.title && React__default['default'].createElement('meta', { name: 'citation_title', content: article.title }),
|
|
1657
|
+
published && React__default['default'].createElement('meta', { name: 'citation_date', content: moment.moment(published).format('LL') }),
|
|
1658
|
+
issue.year && React__default['default'].createElement('meta', { name: 'citation_year', content: issue.year }),
|
|
1659
|
+
issue.isbn_issn && React__default['default'].createElement('meta', { name: 'citation_isbn', content: issue.isbn_issn }),
|
|
1660
|
+
article.abstract && React__default['default'].createElement('meta', { name: 'citation_abstract', content: getAbstract() }),
|
|
1661
|
+
React__default['default'].createElement('meta', { name: 'citation_author', content: getAuthorList() }),
|
|
1662
|
+
issue.pdf && React__default['default'].createElement('meta', { name: 'citation_pdf_url', content: urlForFile.urlForFile({ asset: issue.pdf }) })
|
|
1663
|
+
),
|
|
1631
1664
|
isVideoSeries && renderBlockContent(article, meta, authorImgHeight),
|
|
1632
1665
|
!isVideoSeries && React__default['default'].createElement(
|
|
1633
1666
|
'div',
|
|
@@ -1649,7 +1682,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1649
1682
|
React__default['default'].createElement(
|
|
1650
1683
|
'style',
|
|
1651
1684
|
{ jsx: 'true' },
|
|
1652
|
-
'\n @media screen and (max-width: 468px) {\n .video-detail .doc-group-container {\n flex-direction: column;\n align-items: flex-start !important;\n }\n .video-detail .doc-group {\n margin-top: 2rem;\n width: calc(100vw - 45px);\n align-items: center;\n }\n .video-detail .doc-group img,\n .doc-group p {\n max-width: calc(100vw - 45px) !important;\n }\n }\n .author-details-img {\n margin-right: 10px;\n max-height: 250px;\n min-height: 150px;\n max-width: 250px;\n min-width: 150px;\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n .author-details-img-container {\n text-align: center;\n }\n .author-details-col {\n padding-left: 25px;\n }\n '
|
|
1685
|
+
'\n .social-ris-container {\n display: flex;\n justify-content: space-between;\n }\n @media screen and (max-width: 468px) {\n .video-detail .doc-group-container {\n flex-direction: column;\n align-items: flex-start !important;\n }\n .video-detail .doc-group {\n margin-top: 2rem;\n width: calc(100vw - 45px);\n align-items: center;\n }\n .video-detail .doc-group img,\n .doc-group p {\n max-width: calc(100vw - 45px) !important;\n }\n .social-ris-container {\n flex-direction: column;\n }\n }\n .author-details-img {\n margin-right: 10px;\n max-height: 250px;\n min-height: 150px;\n max-width: 250px;\n min-width: 150px;\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n .author-details-img-container {\n text-align: center;\n }\n .author-details-col {\n padding-left: 25px;\n }\n .left-wrap {\n width: 100%;\n }\n '
|
|
1653
1686
|
),
|
|
1654
1687
|
React__default['default'].createElement(
|
|
1655
1688
|
'div',
|
|
@@ -1733,23 +1766,34 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1733
1766
|
'Pages: ' + pageNumber
|
|
1734
1767
|
)
|
|
1735
1768
|
),
|
|
1736
|
-
|
|
1737
|
-
'
|
|
1738
|
-
|
|
1739
|
-
React__default['default'].createElement(
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1769
|
+
React__default['default'].createElement(
|
|
1770
|
+
'div',
|
|
1771
|
+
{ className: 'social-ris-container' },
|
|
1772
|
+
!isVideoSeries && showSocialShare && React__default['default'].createElement(
|
|
1773
|
+
'p',
|
|
1774
|
+
null,
|
|
1775
|
+
React__default['default'].createElement(SocialShare, {
|
|
1776
|
+
shareUrl: shareUrl,
|
|
1777
|
+
shareTitle: shareTitle,
|
|
1778
|
+
shareVia: shareVia,
|
|
1779
|
+
shareSummary: shareSummary,
|
|
1780
|
+
shareSubject: shareSubject,
|
|
1781
|
+
shareImage: shareImage,
|
|
1782
|
+
size: 32,
|
|
1783
|
+
siteName: siteName,
|
|
1784
|
+
twitterSiteName: twitterSiteName,
|
|
1785
|
+
disableMeta: true,
|
|
1786
|
+
hidePinterest: hidePinterestShare,
|
|
1787
|
+
hideFacebook: hideFBShare
|
|
1788
|
+
})
|
|
1789
|
+
),
|
|
1790
|
+
issue && downloadCitation && (!issue.hasOwnProperty('show_download_ris_button') || issue.show_download_ris_button !== false) && (!issue.publication || !issue.publication.hasOwnProperty('show_download_ris_button') || issue.publication.show_download_ris_button !== false) && React__default['default'].createElement(
|
|
1791
|
+
Button__default['default'],
|
|
1792
|
+
{ className: 'ris-download-button', onClick: function onClick() {
|
|
1793
|
+
return downloadRIS();
|
|
1794
|
+
} },
|
|
1795
|
+
'Download RIS'
|
|
1796
|
+
)
|
|
1753
1797
|
)
|
|
1754
1798
|
),
|
|
1755
1799
|
React__default['default'].createElement(
|
|
@@ -1817,13 +1861,6 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
|
|
|
1817
1861
|
React__default['default'].createElement(
|
|
1818
1862
|
'div',
|
|
1819
1863
|
{ className: 'downloads-container' },
|
|
1820
|
-
issue && downloadCitation && (!issue.hasOwnProperty('show_download_ris_button') || issue.show_download_ris_button !== false) && (!issue.publication || !issue.publication.hasOwnProperty('show_download_ris_button') || issue.publication.show_download_ris_button !== false) && React__default['default'].createElement(
|
|
1821
|
-
Button__default['default'],
|
|
1822
|
-
{ className: 'ris-download-button', onClick: function onClick() {
|
|
1823
|
-
return downloadRIS();
|
|
1824
|
-
} },
|
|
1825
|
-
'Download RIS'
|
|
1826
|
-
),
|
|
1827
1864
|
issue && issue.pdf && React__default['default'].createElement(
|
|
1828
1865
|
'a',
|
|
1829
1866
|
{ rel: 'noopener', href: urlForFile.urlForFile({ asset: issue.pdf }), target: '_blank', title: 'Download issue' },
|
package/dist/cjs/getQuery.js
CHANGED
|
@@ -9,11 +9,11 @@ var getQuery = function getQuery(type) {
|
|
|
9
9
|
//Site level conditions should start with && (logical AND), and site level params should end with , (comma) in order to execute query
|
|
10
10
|
|
|
11
11
|
switch (type) {
|
|
12
|
-
// quiz video series and slideshow
|
|
12
|
+
// quiz video series and slideshow
|
|
13
13
|
case 'related':
|
|
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
|
|
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
|
|
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 }';
|
|
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
|
@@ -1093,6 +1093,15 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1093
1093
|
}, client.config()));
|
|
1094
1094
|
}
|
|
1095
1095
|
};
|
|
1096
|
+
|
|
1097
|
+
var getAbstract = function getAbstract() {
|
|
1098
|
+
return article.abstract && article.abstract.map(function (block) {
|
|
1099
|
+
if (block.children) return block.children.map(function (child) {
|
|
1100
|
+
if (child._type === 'span') return child.text;
|
|
1101
|
+
});
|
|
1102
|
+
}).join(' ');
|
|
1103
|
+
};
|
|
1104
|
+
|
|
1096
1105
|
var renderIsiContent = function renderIsiContent(article) {
|
|
1097
1106
|
var url = article.url.current;
|
|
1098
1107
|
|
|
@@ -1112,7 +1121,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1112
1121
|
}
|
|
1113
1122
|
if (authorDetails && authorDetails.length) {
|
|
1114
1123
|
authorDetails.map(function (authorDetail, index) {
|
|
1115
|
-
return fileContent += 'AU - ' + authorDetail.displayName + '\n';
|
|
1124
|
+
return fileContent += 'AU - ' + (authorDetail.firstName && authorDetail.lastName ? authorDetail.lastName + ', ' + authorDetail.firstName : '' + authorDetail.displayName) + '\n';
|
|
1116
1125
|
} //Author
|
|
1117
1126
|
);
|
|
1118
1127
|
}
|
|
@@ -1120,10 +1129,14 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1120
1129
|
fileContent += 'T2 - ' + issue.publication.name + '\n'; //Secondary Title - T2
|
|
1121
1130
|
fileContent += 'JF - ' + issue.publication.name + '\n'; //Journal Name - JF
|
|
1122
1131
|
}
|
|
1132
|
+
if (issue.name) {
|
|
1133
|
+
fileContent += 'T3 - ' + issue.name + '\n'; //Issue Name - T3
|
|
1134
|
+
}
|
|
1123
1135
|
if (issue.abbreviatedJournal) {
|
|
1124
1136
|
fileContent += 'JO - ' + issue.abbreviatedJournal + '\n'; //Journal Name - JO
|
|
1125
1137
|
}
|
|
1126
|
-
if (article.
|
|
1138
|
+
if (article.abstract) fileContent += 'AB - ' + getAbstract() + '\n'; //Abstract - AB
|
|
1139
|
+
if (article.abstract) fileContent += 'N2 - ' + getAbstract() + '\n'; //Abstract - N2
|
|
1127
1140
|
if (issue.issueNumber) fileContent += 'IS - ' + issue.issueNumber + '\n'; //Issue Number - IS
|
|
1128
1141
|
fileContent += 'PB - MJH Life Sciences\n'; //Publisher - PB
|
|
1129
1142
|
if (issue.year) fileContent += 'PY - ' + issue.year + '\n'; //Published Year - PY
|
|
@@ -1151,6 +1164,15 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1151
1164
|
fileContent += 'ER -\n'; //End of Record
|
|
1152
1165
|
return fileContent;
|
|
1153
1166
|
};
|
|
1167
|
+
var getAuthorList = function getAuthorList() {
|
|
1168
|
+
var authorList = '';
|
|
1169
|
+
if (authorDetails && authorDetails.length > 0) {
|
|
1170
|
+
authorDetails.map(function (author) {
|
|
1171
|
+
if (author.lastName && author.firstName) authorList += author.lastName + ',' + author.firstName + ';';else if (author.displayName) authorList += author.displayName + ';';
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
return authorList;
|
|
1175
|
+
};
|
|
1154
1176
|
var downloadRIS = function downloadRIS() {
|
|
1155
1177
|
var fileContent = generateRIS();
|
|
1156
1178
|
var file = new File([fileContent], 'citation-' + url + '.ris', { type: 'application/x-research-info-systems;charset=utf-8' });
|
|
@@ -1617,6 +1639,17 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1617
1639
|
React__default.createElement(
|
|
1618
1640
|
'div',
|
|
1619
1641
|
{ className: 'video-detail', style: { marginBottom: isCutomPage(props.article) || showIsi && Array.isArray(isi) && isi.length > 0 ? '15rem' : 0 } },
|
|
1642
|
+
issue && React__default.createElement(
|
|
1643
|
+
Head,
|
|
1644
|
+
null,
|
|
1645
|
+
article.title && React__default.createElement('meta', { name: 'citation_title', content: article.title }),
|
|
1646
|
+
published && React__default.createElement('meta', { name: 'citation_date', content: moment(published).format('LL') }),
|
|
1647
|
+
issue.year && React__default.createElement('meta', { name: 'citation_year', content: issue.year }),
|
|
1648
|
+
issue.isbn_issn && React__default.createElement('meta', { name: 'citation_isbn', content: issue.isbn_issn }),
|
|
1649
|
+
article.abstract && React__default.createElement('meta', { name: 'citation_abstract', content: getAbstract() }),
|
|
1650
|
+
React__default.createElement('meta', { name: 'citation_author', content: getAuthorList() }),
|
|
1651
|
+
issue.pdf && React__default.createElement('meta', { name: 'citation_pdf_url', content: urlForFile({ asset: issue.pdf }) })
|
|
1652
|
+
),
|
|
1620
1653
|
isVideoSeries && renderBlockContent(article, meta, authorImgHeight),
|
|
1621
1654
|
!isVideoSeries && React__default.createElement(
|
|
1622
1655
|
'div',
|
|
@@ -1638,7 +1671,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1638
1671
|
React__default.createElement(
|
|
1639
1672
|
'style',
|
|
1640
1673
|
{ jsx: 'true' },
|
|
1641
|
-
'\n @media screen and (max-width: 468px) {\n .video-detail .doc-group-container {\n flex-direction: column;\n align-items: flex-start !important;\n }\n .video-detail .doc-group {\n margin-top: 2rem;\n width: calc(100vw - 45px);\n align-items: center;\n }\n .video-detail .doc-group img,\n .doc-group p {\n max-width: calc(100vw - 45px) !important;\n }\n }\n .author-details-img {\n margin-right: 10px;\n max-height: 250px;\n min-height: 150px;\n max-width: 250px;\n min-width: 150px;\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n .author-details-img-container {\n text-align: center;\n }\n .author-details-col {\n padding-left: 25px;\n }\n '
|
|
1674
|
+
'\n .social-ris-container {\n display: flex;\n justify-content: space-between;\n }\n @media screen and (max-width: 468px) {\n .video-detail .doc-group-container {\n flex-direction: column;\n align-items: flex-start !important;\n }\n .video-detail .doc-group {\n margin-top: 2rem;\n width: calc(100vw - 45px);\n align-items: center;\n }\n .video-detail .doc-group img,\n .doc-group p {\n max-width: calc(100vw - 45px) !important;\n }\n .social-ris-container {\n flex-direction: column;\n }\n }\n .author-details-img {\n margin-right: 10px;\n max-height: 250px;\n min-height: 150px;\n max-width: 250px;\n min-width: 150px;\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n .author-details-img-container {\n text-align: center;\n }\n .author-details-col {\n padding-left: 25px;\n }\n .left-wrap {\n width: 100%;\n }\n '
|
|
1642
1675
|
),
|
|
1643
1676
|
React__default.createElement(
|
|
1644
1677
|
'div',
|
|
@@ -1722,23 +1755,34 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1722
1755
|
'Pages: ' + pageNumber
|
|
1723
1756
|
)
|
|
1724
1757
|
),
|
|
1725
|
-
|
|
1726
|
-
'
|
|
1727
|
-
|
|
1728
|
-
React__default.createElement(
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1758
|
+
React__default.createElement(
|
|
1759
|
+
'div',
|
|
1760
|
+
{ className: 'social-ris-container' },
|
|
1761
|
+
!isVideoSeries && showSocialShare && React__default.createElement(
|
|
1762
|
+
'p',
|
|
1763
|
+
null,
|
|
1764
|
+
React__default.createElement(SocialShare, {
|
|
1765
|
+
shareUrl: shareUrl,
|
|
1766
|
+
shareTitle: shareTitle,
|
|
1767
|
+
shareVia: shareVia,
|
|
1768
|
+
shareSummary: shareSummary,
|
|
1769
|
+
shareSubject: shareSubject,
|
|
1770
|
+
shareImage: shareImage,
|
|
1771
|
+
size: 32,
|
|
1772
|
+
siteName: siteName,
|
|
1773
|
+
twitterSiteName: twitterSiteName,
|
|
1774
|
+
disableMeta: true,
|
|
1775
|
+
hidePinterest: hidePinterestShare,
|
|
1776
|
+
hideFacebook: hideFBShare
|
|
1777
|
+
})
|
|
1778
|
+
),
|
|
1779
|
+
issue && downloadCitation && (!issue.hasOwnProperty('show_download_ris_button') || issue.show_download_ris_button !== false) && (!issue.publication || !issue.publication.hasOwnProperty('show_download_ris_button') || issue.publication.show_download_ris_button !== false) && React__default.createElement(
|
|
1780
|
+
Button,
|
|
1781
|
+
{ className: 'ris-download-button', onClick: function onClick() {
|
|
1782
|
+
return downloadRIS();
|
|
1783
|
+
} },
|
|
1784
|
+
'Download RIS'
|
|
1785
|
+
)
|
|
1742
1786
|
)
|
|
1743
1787
|
),
|
|
1744
1788
|
React__default.createElement(
|
|
@@ -1806,13 +1850,6 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1806
1850
|
React__default.createElement(
|
|
1807
1851
|
'div',
|
|
1808
1852
|
{ className: 'downloads-container' },
|
|
1809
|
-
issue && downloadCitation && (!issue.hasOwnProperty('show_download_ris_button') || issue.show_download_ris_button !== false) && (!issue.publication || !issue.publication.hasOwnProperty('show_download_ris_button') || issue.publication.show_download_ris_button !== false) && React__default.createElement(
|
|
1810
|
-
Button,
|
|
1811
|
-
{ className: 'ris-download-button', onClick: function onClick() {
|
|
1812
|
-
return downloadRIS();
|
|
1813
|
-
} },
|
|
1814
|
-
'Download RIS'
|
|
1815
|
-
),
|
|
1816
1853
|
issue && issue.pdf && React__default.createElement(
|
|
1817
1854
|
'a',
|
|
1818
1855
|
{ rel: 'noopener', href: urlForFile({ asset: issue.pdf }), target: '_blank', title: 'Download issue' },
|
package/dist/esm/getQuery.js
CHANGED
|
@@ -7,11 +7,11 @@ var getQuery = function getQuery(type) {
|
|
|
7
7
|
//Site level conditions should start with && (logical AND), and site level params should end with , (comma) in order to execute query
|
|
8
8
|
|
|
9
9
|
switch (type) {
|
|
10
|
-
// quiz video series and slideshow
|
|
10
|
+
// quiz video series and slideshow
|
|
11
11
|
case 'related':
|
|
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
|
|
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
|
|
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 }';
|
|
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':
|