@mjhls/mjh-framework 1.0.908-ris-export-v1 → 1.0.908-summary-fix-v1
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.
|
@@ -111,12 +111,12 @@ var TaxonomyDescription = function TaxonomyDescription(_ref) {
|
|
|
111
111
|
client = _ref.client;
|
|
112
112
|
|
|
113
113
|
var router = Router.useRouter();
|
|
114
|
-
return data && data.length > 0
|
|
114
|
+
return data && data.length > 0 ? React__default['default'].createElement(
|
|
115
115
|
'section',
|
|
116
116
|
{ className: 'taxonomy-description' },
|
|
117
117
|
setMetaDescription(data, router),
|
|
118
118
|
React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({ serializers: getSerializers.getSerializers(client), blocks: data, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
119
|
-
);
|
|
119
|
+
) : null;
|
|
120
120
|
};
|
|
121
121
|
|
|
122
122
|
TaxonomyDescription.getDescription = function () {
|
package/dist/cjs/View.js
CHANGED
|
@@ -29,13 +29,13 @@ var styleInject_es = require('./style-inject.es-dcee06b6.js');
|
|
|
29
29
|
require('./index-eadd5035.js');
|
|
30
30
|
var disqusReact = require('disqus-react');
|
|
31
31
|
var Schema = require('./Schema.js');
|
|
32
|
-
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
33
32
|
var keys = require('./keys-e982b3fa.js');
|
|
34
33
|
var index_es = require('./index.es-f3e47207.js');
|
|
35
34
|
var index = require('./index-fc2f1ca2.js');
|
|
36
35
|
var getRelatedArticle = require('./getRelatedArticle.js');
|
|
37
36
|
var getQuery = require('./getQuery.js');
|
|
38
37
|
var getSeriesDetail = require('./getSeriesDetail.js');
|
|
38
|
+
require('./_commonjsHelpers-06173234.js');
|
|
39
39
|
require('./core.get-iterator-method-5643aa10.js');
|
|
40
40
|
require('./web.dom.iterable-d98303e0.js');
|
|
41
41
|
require('./_library-dd23b178.js');
|
|
@@ -446,12 +446,6 @@ var getSocialShareDisableFlag = function getSocialShareDisableFlag(article) {
|
|
|
446
446
|
return showSocialShare;
|
|
447
447
|
};
|
|
448
448
|
|
|
449
|
-
var FileSaver_min = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
450
|
-
(function(a,b){b();})(_commonjsHelpers.commonjsGlobal,function(){function b(a,b){return "undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c);},d.onerror=function(){console.error("could not download file");},d.send();}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send();}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"));}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b);}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof _commonjsHelpers.commonjsGlobal&&_commonjsHelpers.commonjsGlobal.global===_commonjsHelpers.commonjsGlobal?_commonjsHelpers.commonjsGlobal:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href);},4E4),setTimeout(function(){e(j);},0));}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else {var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i);});}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null;},k.readAsDataURL(b);}else {var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m);},4E4);}});f.saveAs=g.saveAs=g,(module.exports=g);});
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
});
|
|
454
|
-
|
|
455
449
|
var Article = React.forwardRef(function (props, ref) {
|
|
456
450
|
var onVote = function () {
|
|
457
451
|
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(nodeKey, selectedChoice) {
|
|
@@ -563,9 +557,7 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
563
557
|
_props$refreshFlag = props.refreshFlag,
|
|
564
558
|
refreshFlag = _props$refreshFlag === undefined ? false : _props$refreshFlag,
|
|
565
559
|
disqusConfig = props.disqusConfig,
|
|
566
|
-
showDisqus = props.showDisqus
|
|
567
|
-
_props$downloadCitati = props.downloadCitation,
|
|
568
|
-
downloadCitation = _props$downloadCitati === undefined ? false : _props$downloadCitati;
|
|
560
|
+
showDisqus = props.showDisqus;
|
|
569
561
|
|
|
570
562
|
|
|
571
563
|
var targeting = getTargeting.getTargeting(props);
|
|
@@ -674,53 +666,6 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
674
666
|
}
|
|
675
667
|
return null;
|
|
676
668
|
};
|
|
677
|
-
var generateRIS = function generateRIS() {
|
|
678
|
-
var fileContent = 'TY - JOUR\n';
|
|
679
|
-
if (issue) {
|
|
680
|
-
if (article.title) {
|
|
681
|
-
fileContent += 'TI - ' + article.title + '\n'; //Title - TI
|
|
682
|
-
fileContent += 'T1 - ' + article.title + '\n'; //Title - T1
|
|
683
|
-
}
|
|
684
|
-
if (issue.publication && issue.publication.name) {
|
|
685
|
-
fileContent += 'T2 - ' + issue.publication.name + '\n'; //Secondary Title - T2
|
|
686
|
-
fileContent += 'JF - ' + issue.publication.name + '\n'; //Journal Name - JF
|
|
687
|
-
}
|
|
688
|
-
if (issue.abbreviatedJournal) {
|
|
689
|
-
fileContent += 'JO - ' + issue.abbreviatedJournal + '\n'; //Journal Name - JO
|
|
690
|
-
}
|
|
691
|
-
if (article.fieldAbstract) fileContent += 'N2 - ' + article.fieldAbstract + '\n'; //Abstract - N2
|
|
692
|
-
if (issue.issueNumber) fileContent += 'IS - ' + issue.issueNumber + '\n'; //Issue Number - IS
|
|
693
|
-
fileContent += 'PB - MJH Life Sciences\n'; //Publisher - PB
|
|
694
|
-
if (issue.year) fileContent += 'PY - ' + issue.year + '\n'; //Published Year - PY
|
|
695
|
-
if (issue.volume) fileContent += 'VL - ' + issue.volume + '\n'; //Volume - VL
|
|
696
|
-
if (issue.url) fileContent += 'L1 - ' + issue.url + '\n'; //Link to PDF - L1
|
|
697
|
-
if (shareOptions && shareOptions.shareBaseUrl) {
|
|
698
|
-
fileContent += 'L2 - ' + (shareOptions.shareBaseUrl + url) + '\n'; //Link to Full-text - L2
|
|
699
|
-
fileContent += 'UR - ' + (shareOptions.shareBaseUrl + url) + '\n'; //Doc URL - UR
|
|
700
|
-
}
|
|
701
|
-
if (props.Website) fileContent += 'LK - https://' + props.Website.liveDomain + '\n'; //Website Link - LK
|
|
702
|
-
if (issue.isbn_issn) {
|
|
703
|
-
fileContent += 'SN - ' + issue.isbn_issn + '\n'; //ISSN/ISBN - TI
|
|
704
|
-
}
|
|
705
|
-
if (pageNumber) {
|
|
706
|
-
if (pageNumber.includes('-')) {
|
|
707
|
-
fileContent += 'SP - ' + pageNumber.split('-')[0] + '\n'; //Start Page - SP
|
|
708
|
-
fileContent += 'EP - ' + pageNumber.split('-')[1] + '\n'; //End Page - EP
|
|
709
|
-
} else {
|
|
710
|
-
fileContent += 'SP - ' + pageNumber + '\n';
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
if (article.published) fileContent += 'Y1 - ' + moment.moment(published).format('DD-MMMM-YYYY') + '\n'; //Primary Date - Y1
|
|
714
|
-
fileContent += 'Y2 - ' + moment.moment().format('DD-MMMM-YYYY') + '\n'; //Access Date - Y2
|
|
715
|
-
}
|
|
716
|
-
fileContent += 'ER -\n'; //End of Record
|
|
717
|
-
return fileContent;
|
|
718
|
-
};
|
|
719
|
-
var downloadRIS = function downloadRIS() {
|
|
720
|
-
var fileContent = generateRIS();
|
|
721
|
-
var file = new File([fileContent], 'citation-' + url + '.ris', { type: 'application/x-research-info-systems;charset=utf-8' });
|
|
722
|
-
FileSaver_min.saveAs(file, 'citation-' + url + '.ris');
|
|
723
|
-
};
|
|
724
669
|
|
|
725
670
|
var RelevantTopics = function RelevantTopics() {
|
|
726
671
|
if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
|
|
@@ -1064,7 +1009,7 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
1064
1009
|
var shareTitle = article.title;
|
|
1065
1010
|
var shareSummary = article.summary;
|
|
1066
1011
|
var shareImage = thumbnail && thumbnail.asset ? urlFor({ client: props.client, source: thumbnail.asset }) : shareImageDefault;
|
|
1067
|
-
var siteName = props.
|
|
1012
|
+
var siteName = props.website && props.website.title ? props.website.title : '';
|
|
1068
1013
|
var shareKeywords = getKeywords(props.article).join(',');
|
|
1069
1014
|
|
|
1070
1015
|
var meta = {
|
|
@@ -1311,23 +1256,12 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
1311
1256
|
)
|
|
1312
1257
|
)
|
|
1313
1258
|
),
|
|
1314
|
-
React__default['default'].createElement(
|
|
1315
|
-
'
|
|
1316
|
-
{
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
return downloadRIS();
|
|
1321
|
-
} },
|
|
1322
|
-
'Download RIS'
|
|
1323
|
-
),
|
|
1324
|
-
issue && issue.url && React__default['default'].createElement(
|
|
1325
|
-
'a',
|
|
1326
|
-
{ rel: 'noopener', href: issue.url, target: '_blank', title: 'Download issue' },
|
|
1327
|
-
React__default['default'].createElement('img', { style: { margin: '1rem', maxHeight: '40px', maxWidth: '40px' }, src: '/download.png', alt: 'download issue' }),
|
|
1328
|
-
'Download Issue : ',
|
|
1329
|
-
issue.name
|
|
1330
|
-
)
|
|
1259
|
+
issue && issue.url && React__default['default'].createElement(
|
|
1260
|
+
'a',
|
|
1261
|
+
{ rel: 'noopener', href: issue.url, target: '_blank', title: 'Download issue' },
|
|
1262
|
+
React__default['default'].createElement('img', { style: { margin: '1rem', maxHeight: '40px', maxWidth: '40px' }, src: '/download.png', alt: 'download issue' }),
|
|
1263
|
+
'Download Issue : ',
|
|
1264
|
+
issue.name
|
|
1331
1265
|
)
|
|
1332
1266
|
),
|
|
1333
1267
|
React__default['default'].createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
package/dist/cjs/getQuery.js
CHANGED
|
@@ -10,9 +10,9 @@ var getQuery = function getQuery(type) {
|
|
|
10
10
|
|
|
11
11
|
switch (type) {
|
|
12
12
|
case 'related':
|
|
13
|
-
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n
|
|
13
|
+
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
|
|
14
14
|
case 'article':
|
|
15
|
-
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n
|
|
15
|
+
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\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 showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\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 \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
|
|
16
16
|
case 'publication':
|
|
17
17
|
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n thumbnail{ ..., asset-> },\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
|
|
18
18
|
case 'issue':
|
|
@@ -104,12 +104,12 @@ var TaxonomyDescription = function TaxonomyDescription(_ref) {
|
|
|
104
104
|
client = _ref.client;
|
|
105
105
|
|
|
106
106
|
var router = useRouter();
|
|
107
|
-
return data && data.length > 0
|
|
107
|
+
return data && data.length > 0 ? React__default.createElement(
|
|
108
108
|
'section',
|
|
109
109
|
{ className: 'taxonomy-description' },
|
|
110
110
|
setMetaDescription(data, router),
|
|
111
111
|
React__default.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: data, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
112
|
-
);
|
|
112
|
+
) : null;
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
TaxonomyDescription.getDescription = function () {
|
package/dist/esm/View.js
CHANGED
|
@@ -27,13 +27,13 @@ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
|
27
27
|
import './index-755f2cc2.js';
|
|
28
28
|
import { DiscussionEmbed } from 'disqus-react';
|
|
29
29
|
import Schema from './Schema.js';
|
|
30
|
-
import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
|
|
31
30
|
import { _ as _Object$keys } from './keys-31dcdb31.js';
|
|
32
31
|
import { I as InfiniteScroll } from './index.es-a6137319.js';
|
|
33
32
|
import { l as lib_3 } from './index-f0fc23eb.js';
|
|
34
33
|
import getRelatedArticle from './getRelatedArticle.js';
|
|
35
34
|
import getQuery from './getQuery.js';
|
|
36
35
|
import getSeriesDetail from './getSeriesDetail.js';
|
|
36
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
37
37
|
import './core.get-iterator-method-ea258bb1.js';
|
|
38
38
|
import './web.dom.iterable-ab4dea5c.js';
|
|
39
39
|
import './_library-528f1934.js';
|
|
@@ -436,12 +436,6 @@ var getSocialShareDisableFlag = function getSocialShareDisableFlag(article) {
|
|
|
436
436
|
return showSocialShare;
|
|
437
437
|
};
|
|
438
438
|
|
|
439
|
-
var FileSaver_min = createCommonjsModule(function (module, exports) {
|
|
440
|
-
(function(a,b){b();})(commonjsGlobal,function(){function b(a,b){return "undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c);},d.onerror=function(){console.error("could not download file");},d.send();}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send();}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"));}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b);}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href);},4E4),setTimeout(function(){e(j);},0));}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else {var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i);});}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null;},k.readAsDataURL(b);}else {var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m);},4E4);}});f.saveAs=g.saveAs=g,(module.exports=g);});
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
});
|
|
444
|
-
|
|
445
439
|
var Article = forwardRef(function (props, ref) {
|
|
446
440
|
var onVote = function () {
|
|
447
441
|
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(nodeKey, selectedChoice) {
|
|
@@ -553,9 +547,7 @@ var Article = forwardRef(function (props, ref) {
|
|
|
553
547
|
_props$refreshFlag = props.refreshFlag,
|
|
554
548
|
refreshFlag = _props$refreshFlag === undefined ? false : _props$refreshFlag,
|
|
555
549
|
disqusConfig = props.disqusConfig,
|
|
556
|
-
showDisqus = props.showDisqus
|
|
557
|
-
_props$downloadCitati = props.downloadCitation,
|
|
558
|
-
downloadCitation = _props$downloadCitati === undefined ? false : _props$downloadCitati;
|
|
550
|
+
showDisqus = props.showDisqus;
|
|
559
551
|
|
|
560
552
|
|
|
561
553
|
var targeting = getTargeting(props);
|
|
@@ -664,53 +656,6 @@ var Article = forwardRef(function (props, ref) {
|
|
|
664
656
|
}
|
|
665
657
|
return null;
|
|
666
658
|
};
|
|
667
|
-
var generateRIS = function generateRIS() {
|
|
668
|
-
var fileContent = 'TY - JOUR\n';
|
|
669
|
-
if (issue) {
|
|
670
|
-
if (article.title) {
|
|
671
|
-
fileContent += 'TI - ' + article.title + '\n'; //Title - TI
|
|
672
|
-
fileContent += 'T1 - ' + article.title + '\n'; //Title - T1
|
|
673
|
-
}
|
|
674
|
-
if (issue.publication && issue.publication.name) {
|
|
675
|
-
fileContent += 'T2 - ' + issue.publication.name + '\n'; //Secondary Title - T2
|
|
676
|
-
fileContent += 'JF - ' + issue.publication.name + '\n'; //Journal Name - JF
|
|
677
|
-
}
|
|
678
|
-
if (issue.abbreviatedJournal) {
|
|
679
|
-
fileContent += 'JO - ' + issue.abbreviatedJournal + '\n'; //Journal Name - JO
|
|
680
|
-
}
|
|
681
|
-
if (article.fieldAbstract) fileContent += 'N2 - ' + article.fieldAbstract + '\n'; //Abstract - N2
|
|
682
|
-
if (issue.issueNumber) fileContent += 'IS - ' + issue.issueNumber + '\n'; //Issue Number - IS
|
|
683
|
-
fileContent += 'PB - MJH Life Sciences\n'; //Publisher - PB
|
|
684
|
-
if (issue.year) fileContent += 'PY - ' + issue.year + '\n'; //Published Year - PY
|
|
685
|
-
if (issue.volume) fileContent += 'VL - ' + issue.volume + '\n'; //Volume - VL
|
|
686
|
-
if (issue.url) fileContent += 'L1 - ' + issue.url + '\n'; //Link to PDF - L1
|
|
687
|
-
if (shareOptions && shareOptions.shareBaseUrl) {
|
|
688
|
-
fileContent += 'L2 - ' + (shareOptions.shareBaseUrl + url) + '\n'; //Link to Full-text - L2
|
|
689
|
-
fileContent += 'UR - ' + (shareOptions.shareBaseUrl + url) + '\n'; //Doc URL - UR
|
|
690
|
-
}
|
|
691
|
-
if (props.Website) fileContent += 'LK - https://' + props.Website.liveDomain + '\n'; //Website Link - LK
|
|
692
|
-
if (issue.isbn_issn) {
|
|
693
|
-
fileContent += 'SN - ' + issue.isbn_issn + '\n'; //ISSN/ISBN - TI
|
|
694
|
-
}
|
|
695
|
-
if (pageNumber) {
|
|
696
|
-
if (pageNumber.includes('-')) {
|
|
697
|
-
fileContent += 'SP - ' + pageNumber.split('-')[0] + '\n'; //Start Page - SP
|
|
698
|
-
fileContent += 'EP - ' + pageNumber.split('-')[1] + '\n'; //End Page - EP
|
|
699
|
-
} else {
|
|
700
|
-
fileContent += 'SP - ' + pageNumber + '\n';
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
if (article.published) fileContent += 'Y1 - ' + moment(published).format('DD-MMMM-YYYY') + '\n'; //Primary Date - Y1
|
|
704
|
-
fileContent += 'Y2 - ' + moment().format('DD-MMMM-YYYY') + '\n'; //Access Date - Y2
|
|
705
|
-
}
|
|
706
|
-
fileContent += 'ER -\n'; //End of Record
|
|
707
|
-
return fileContent;
|
|
708
|
-
};
|
|
709
|
-
var downloadRIS = function downloadRIS() {
|
|
710
|
-
var fileContent = generateRIS();
|
|
711
|
-
var file = new File([fileContent], 'citation-' + url + '.ris', { type: 'application/x-research-info-systems;charset=utf-8' });
|
|
712
|
-
FileSaver_min.saveAs(file, 'citation-' + url + '.ris');
|
|
713
|
-
};
|
|
714
659
|
|
|
715
660
|
var RelevantTopics = function RelevantTopics() {
|
|
716
661
|
if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
|
|
@@ -1054,7 +999,7 @@ var Article = forwardRef(function (props, ref) {
|
|
|
1054
999
|
var shareTitle = article.title;
|
|
1055
1000
|
var shareSummary = article.summary;
|
|
1056
1001
|
var shareImage = thumbnail && thumbnail.asset ? urlFor({ client: props.client, source: thumbnail.asset }) : shareImageDefault;
|
|
1057
|
-
var siteName = props.
|
|
1002
|
+
var siteName = props.website && props.website.title ? props.website.title : '';
|
|
1058
1003
|
var shareKeywords = getKeywords(props.article).join(',');
|
|
1059
1004
|
|
|
1060
1005
|
var meta = {
|
|
@@ -1301,23 +1246,12 @@ var Article = forwardRef(function (props, ref) {
|
|
|
1301
1246
|
)
|
|
1302
1247
|
)
|
|
1303
1248
|
),
|
|
1304
|
-
React__default.createElement(
|
|
1305
|
-
'
|
|
1306
|
-
{
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
return downloadRIS();
|
|
1311
|
-
} },
|
|
1312
|
-
'Download RIS'
|
|
1313
|
-
),
|
|
1314
|
-
issue && issue.url && React__default.createElement(
|
|
1315
|
-
'a',
|
|
1316
|
-
{ rel: 'noopener', href: issue.url, target: '_blank', title: 'Download issue' },
|
|
1317
|
-
React__default.createElement('img', { style: { margin: '1rem', maxHeight: '40px', maxWidth: '40px' }, src: '/download.png', alt: 'download issue' }),
|
|
1318
|
-
'Download Issue : ',
|
|
1319
|
-
issue.name
|
|
1320
|
-
)
|
|
1249
|
+
issue && issue.url && React__default.createElement(
|
|
1250
|
+
'a',
|
|
1251
|
+
{ rel: 'noopener', href: issue.url, target: '_blank', title: 'Download issue' },
|
|
1252
|
+
React__default.createElement('img', { style: { margin: '1rem', maxHeight: '40px', maxWidth: '40px' }, src: '/download.png', alt: 'download issue' }),
|
|
1253
|
+
'Download Issue : ',
|
|
1254
|
+
issue.name
|
|
1321
1255
|
)
|
|
1322
1256
|
),
|
|
1323
1257
|
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
package/dist/esm/getQuery.js
CHANGED
|
@@ -8,9 +8,9 @@ var getQuery = function getQuery(type) {
|
|
|
8
8
|
|
|
9
9
|
switch (type) {
|
|
10
10
|
case 'related':
|
|
11
|
-
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n
|
|
11
|
+
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
|
|
12
12
|
case 'article':
|
|
13
|
-
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n
|
|
13
|
+
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\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 showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\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 \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
|
|
14
14
|
case 'publication':
|
|
15
15
|
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n thumbnail{ ..., asset-> },\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
|
|
16
16
|
case 'issue':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mjhls/mjh-framework",
|
|
3
|
-
"version": "1.0.908-
|
|
3
|
+
"version": "1.0.908-summary-fix-v1",
|
|
4
4
|
"description": "Foundation Framework",
|
|
5
5
|
"author": "mjh-framework",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"eslint-plugin-react": "^7.10.0",
|
|
57
57
|
"eslint-plugin-react-hooks": "^2.3.0",
|
|
58
58
|
"eslint-plugin-standard": "^3.1.0",
|
|
59
|
-
"file-saver": "^2.0.5",
|
|
60
59
|
"get-youtube-id": "^1.0.1",
|
|
61
60
|
"gh-pages": "^1.2.0",
|
|
62
61
|
"lodash": "^4.17.15",
|