@mjhls/mjh-framework 1.0.908-mediaseries-file-v1 → 1.0.908-ris-export-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.
- package/dist/cjs/AlgoliaSearch.js +5 -11
- package/dist/cjs/MediaSeriesLanding.js +6 -14
- package/dist/cjs/View.js +75 -9
- package/dist/cjs/getQuery.js +2 -2
- package/dist/esm/AlgoliaSearch.js +5 -11
- package/dist/esm/MediaSeriesLanding.js +6 -14
- package/dist/esm/View.js +75 -9
- package/dist/esm/getQuery.js +2 -2
- package/package.json +2 -1
|
@@ -829,7 +829,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
829
829
|
});
|
|
830
830
|
}
|
|
831
831
|
|
|
832
|
-
var version$1 = '6.12.
|
|
832
|
+
var version$1 = '6.12.0';
|
|
833
833
|
|
|
834
834
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
835
835
|
return function (props, propName, componentName) {
|
|
@@ -4779,7 +4779,7 @@ var requestBuilder = {
|
|
|
4779
4779
|
|
|
4780
4780
|
var requestBuilder_1 = requestBuilder;
|
|
4781
4781
|
|
|
4782
|
-
var version = '3.5.
|
|
4782
|
+
var version = '3.5.4';
|
|
4783
4783
|
|
|
4784
4784
|
/**
|
|
4785
4785
|
* Event triggered when a parameter is set or updated
|
|
@@ -7353,21 +7353,15 @@ function hydrateMetadata(resultsState) {
|
|
|
7353
7353
|
|
|
7354
7354
|
return resultsState.metadata.map(function (datum) {
|
|
7355
7355
|
return _objectSpread({
|
|
7356
|
-
value: function value() {
|
|
7357
|
-
return {};
|
|
7358
|
-
}
|
|
7356
|
+
value: function value() {}
|
|
7359
7357
|
}, datum, {
|
|
7360
7358
|
items: datum.items && datum.items.map(function (item) {
|
|
7361
7359
|
return _objectSpread({
|
|
7362
|
-
value: function value() {
|
|
7363
|
-
return {};
|
|
7364
|
-
}
|
|
7360
|
+
value: function value() {}
|
|
7365
7361
|
}, item, {
|
|
7366
7362
|
items: item.items && item.items.map(function (nestedItem) {
|
|
7367
7363
|
return _objectSpread({
|
|
7368
|
-
value: function value() {
|
|
7369
|
-
return {};
|
|
7370
|
-
}
|
|
7364
|
+
value: function value() {}
|
|
7371
7365
|
}, nestedItem);
|
|
7372
7366
|
})
|
|
7373
7367
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var defineProperty = require('./defineProperty-9673846a.js');
|
|
3
4
|
var asyncToGenerator = require('./asyncToGenerator-77821af0.js');
|
|
4
5
|
var _typeof = require('./typeof-567e31ff.js');
|
|
5
6
|
var _extends = require('./extends-7c86182f.js');
|
|
@@ -13,6 +14,7 @@ var MasterDeck = require('./MasterDeck.js');
|
|
|
13
14
|
var BlockContent = require('./BlockContent-9ebd251f.js');
|
|
14
15
|
var getSerializers = require('./index-5ce5e821.js');
|
|
15
16
|
require('./_commonjsHelpers-06173234.js');
|
|
17
|
+
require('./define-property-e8404b64.js');
|
|
16
18
|
require('./core.get-iterator-method-5643aa10.js');
|
|
17
19
|
require('./web.dom.iterable-d98303e0.js');
|
|
18
20
|
require('./_library-dd23b178.js');
|
|
@@ -28,7 +30,6 @@ require('./style-inject.es-dcee06b6.js');
|
|
|
28
30
|
require('./toConsumableArray-d7797c2b.js');
|
|
29
31
|
require('./inherits-de66ea16.js');
|
|
30
32
|
require('./_object-sap-d1978572.js');
|
|
31
|
-
require('./define-property-e8404b64.js');
|
|
32
33
|
require('./index-fc2f1ca2.js');
|
|
33
34
|
require('./events-1b438fe7.js');
|
|
34
35
|
require('react-bootstrap/Container');
|
|
@@ -295,7 +296,7 @@ var MediaSeriesLanding = function MediaSeriesLanding(props) {
|
|
|
295
296
|
filterQuery = filterTopicID !== 'all' ? ' && references(\'' + filterTopicID + '\')' : '';
|
|
296
297
|
}
|
|
297
298
|
|
|
298
|
-
seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID + '\') ' + filterQuery + ' && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now())] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail
|
|
299
|
+
seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID + '\') ' + filterQuery + ' && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now())] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail,\n description,\n topicMapping[]->,\n \'pageNumber\': ' + currentPage + ',\n \'parentUrl\': \'' + parentUrl + '\'\n }';
|
|
299
300
|
_context.next = 6;
|
|
300
301
|
return client.fetch(seriesQuery, newParams);
|
|
301
302
|
|
|
@@ -378,6 +379,8 @@ var MediaSeriesLanding = function MediaSeriesLanding(props) {
|
|
|
378
379
|
|
|
379
380
|
MediaSeriesLanding.getInitialData = function () {
|
|
380
381
|
var _ref3 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee2(ctx, client, cache) {
|
|
382
|
+
var _ref4;
|
|
383
|
+
|
|
381
384
|
var urlQuery, pathname, identifier, itemsPerPage, currentPage, start, statusCode, params, docGroupID, seriesQuery, seriesData, allSeries, buildUsedTopicsArray, usedTopics, taxonomyFilter;
|
|
382
385
|
return asyncToGenerator.regenerator.wrap(function _callee2$(_context2) {
|
|
383
386
|
while (1) {
|
|
@@ -462,18 +465,7 @@ MediaSeriesLanding.getInitialData = function () {
|
|
|
462
465
|
statusCode = 404;
|
|
463
466
|
}
|
|
464
467
|
|
|
465
|
-
return _context2.abrupt('return', {
|
|
466
|
-
seriesData: seriesData,
|
|
467
|
-
query: seriesQuery,
|
|
468
|
-
params: params,
|
|
469
|
-
currentPage: currentPage,
|
|
470
|
-
taxonomyFilter: taxonomyFilter,
|
|
471
|
-
identifier: identifier,
|
|
472
|
-
docGroupID: docGroupID._id,
|
|
473
|
-
parentUrl: identifier,
|
|
474
|
-
statusCode: statusCode,
|
|
475
|
-
docGroup: docGroupID
|
|
476
|
-
});
|
|
468
|
+
return _context2.abrupt('return', (_ref4 = { seriesData: seriesData, query: seriesQuery, params: params, currentPage: currentPage, taxonomyFilter: taxonomyFilter, identifier: identifier, docGroupID: docGroupID._id, parentUrl: identifier, statusCode: statusCode }, defineProperty._defineProperty(_ref4, 'taxonomyFilter', taxonomyFilter), defineProperty._defineProperty(_ref4, 'docGroup', docGroupID), _ref4));
|
|
477
469
|
|
|
478
470
|
case 25:
|
|
479
471
|
case 'end':
|
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');
|
|
32
33
|
var keys = require('./keys-e982b3fa.js');
|
|
33
34
|
var index_es = require('./index.es-f3e47207.js');
|
|
34
35
|
var index = require('./index-fc2f1ca2.js');
|
|
35
36
|
var getRelatedArticle = require('./getRelatedArticle.js');
|
|
36
37
|
var getQuery = require('./getQuery.js');
|
|
37
38
|
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,6 +446,12 @@ 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
|
+
|
|
449
455
|
var Article = React.forwardRef(function (props, ref) {
|
|
450
456
|
var onVote = function () {
|
|
451
457
|
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(nodeKey, selectedChoice) {
|
|
@@ -557,7 +563,9 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
557
563
|
_props$refreshFlag = props.refreshFlag,
|
|
558
564
|
refreshFlag = _props$refreshFlag === undefined ? false : _props$refreshFlag,
|
|
559
565
|
disqusConfig = props.disqusConfig,
|
|
560
|
-
showDisqus = props.showDisqus
|
|
566
|
+
showDisqus = props.showDisqus,
|
|
567
|
+
_props$downloadCitati = props.downloadCitation,
|
|
568
|
+
downloadCitation = _props$downloadCitati === undefined ? false : _props$downloadCitati;
|
|
561
569
|
|
|
562
570
|
|
|
563
571
|
var targeting = getTargeting.getTargeting(props);
|
|
@@ -666,6 +674,53 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
666
674
|
}
|
|
667
675
|
return null;
|
|
668
676
|
};
|
|
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
|
+
};
|
|
669
724
|
|
|
670
725
|
var RelevantTopics = function RelevantTopics() {
|
|
671
726
|
if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
|
|
@@ -1009,7 +1064,7 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
1009
1064
|
var shareTitle = article.title;
|
|
1010
1065
|
var shareSummary = article.summary;
|
|
1011
1066
|
var shareImage = thumbnail && thumbnail.asset ? urlFor({ client: props.client, source: thumbnail.asset }) : shareImageDefault;
|
|
1012
|
-
var siteName = props.
|
|
1067
|
+
var siteName = props.Website && props.Website.title ? props.Website.title : '';
|
|
1013
1068
|
var shareKeywords = getKeywords(props.article).join(',');
|
|
1014
1069
|
|
|
1015
1070
|
var meta = {
|
|
@@ -1256,12 +1311,23 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
1256
1311
|
)
|
|
1257
1312
|
)
|
|
1258
1313
|
),
|
|
1259
|
-
|
|
1260
|
-
'
|
|
1261
|
-
{
|
|
1262
|
-
React__default['default'].createElement(
|
|
1263
|
-
|
|
1264
|
-
|
|
1314
|
+
React__default['default'].createElement(
|
|
1315
|
+
'div',
|
|
1316
|
+
{ className: 'downloads-container' },
|
|
1317
|
+
issue && downloadCitation && React__default['default'].createElement(
|
|
1318
|
+
Button__default['default'],
|
|
1319
|
+
{ className: 'ris-download-button', onClick: function onClick() {
|
|
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
|
+
)
|
|
1265
1331
|
)
|
|
1266
1332
|
),
|
|
1267
1333
|
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 ...,\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
|
|
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 fieldAbstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\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 isbn_issn,\n abbreviatedJournal,\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 ...,\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
|
|
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 fieldAbstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n },\n poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \n },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n 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 year,\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 isbn_issn,\n abbreviatedJournal,\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':
|
|
@@ -822,7 +822,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
822
822
|
});
|
|
823
823
|
}
|
|
824
824
|
|
|
825
|
-
var version$1 = '6.12.
|
|
825
|
+
var version$1 = '6.12.0';
|
|
826
826
|
|
|
827
827
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
828
828
|
return function (props, propName, componentName) {
|
|
@@ -4772,7 +4772,7 @@ var requestBuilder = {
|
|
|
4772
4772
|
|
|
4773
4773
|
var requestBuilder_1 = requestBuilder;
|
|
4774
4774
|
|
|
4775
|
-
var version = '3.5.
|
|
4775
|
+
var version = '3.5.4';
|
|
4776
4776
|
|
|
4777
4777
|
/**
|
|
4778
4778
|
* Event triggered when a parameter is set or updated
|
|
@@ -7346,21 +7346,15 @@ function hydrateMetadata(resultsState) {
|
|
|
7346
7346
|
|
|
7347
7347
|
return resultsState.metadata.map(function (datum) {
|
|
7348
7348
|
return _objectSpread({
|
|
7349
|
-
value: function value() {
|
|
7350
|
-
return {};
|
|
7351
|
-
}
|
|
7349
|
+
value: function value() {}
|
|
7352
7350
|
}, datum, {
|
|
7353
7351
|
items: datum.items && datum.items.map(function (item) {
|
|
7354
7352
|
return _objectSpread({
|
|
7355
|
-
value: function value() {
|
|
7356
|
-
return {};
|
|
7357
|
-
}
|
|
7353
|
+
value: function value() {}
|
|
7358
7354
|
}, item, {
|
|
7359
7355
|
items: item.items && item.items.map(function (nestedItem) {
|
|
7360
7356
|
return _objectSpread({
|
|
7361
|
-
value: function value() {
|
|
7362
|
-
return {};
|
|
7363
|
-
}
|
|
7357
|
+
value: function value() {}
|
|
7364
7358
|
}, nestedItem);
|
|
7365
7359
|
})
|
|
7366
7360
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { _ as _defineProperty } from './defineProperty-8c30428f.js';
|
|
1
2
|
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-5ef104a7.js';
|
|
2
3
|
import { _ as _typeof } from './typeof-e9fc0c5d.js';
|
|
3
4
|
import { _ as _extends } from './extends-6d8e3924.js';
|
|
@@ -11,6 +12,7 @@ import MasterDeck from './MasterDeck.js';
|
|
|
11
12
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
12
13
|
import { g as getSerializers } from './index-490f4f21.js';
|
|
13
14
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
15
|
+
import './define-property-5f1bda73.js';
|
|
14
16
|
import './core.get-iterator-method-ea258bb1.js';
|
|
15
17
|
import './web.dom.iterable-ab4dea5c.js';
|
|
16
18
|
import './_library-528f1934.js';
|
|
@@ -26,7 +28,6 @@ import './style-inject.es-1f59c1d0.js';
|
|
|
26
28
|
import './toConsumableArray-f7074d7c.js';
|
|
27
29
|
import './inherits-a6ba2ec4.js';
|
|
28
30
|
import './_object-sap-7cee6f84.js';
|
|
29
|
-
import './define-property-5f1bda73.js';
|
|
30
31
|
import './index-f0fc23eb.js';
|
|
31
32
|
import './events-6c3a7a63.js';
|
|
32
33
|
import 'react-bootstrap/Container';
|
|
@@ -288,7 +289,7 @@ var MediaSeriesLanding = function MediaSeriesLanding(props) {
|
|
|
288
289
|
filterQuery = filterTopicID !== 'all' ? ' && references(\'' + filterTopicID + '\')' : '';
|
|
289
290
|
}
|
|
290
291
|
|
|
291
|
-
seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID + '\') ' + filterQuery + ' && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now())] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail
|
|
292
|
+
seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID + '\') ' + filterQuery + ' && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now())] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail,\n description,\n topicMapping[]->,\n \'pageNumber\': ' + currentPage + ',\n \'parentUrl\': \'' + parentUrl + '\'\n }';
|
|
292
293
|
_context.next = 6;
|
|
293
294
|
return client.fetch(seriesQuery, newParams);
|
|
294
295
|
|
|
@@ -371,6 +372,8 @@ var MediaSeriesLanding = function MediaSeriesLanding(props) {
|
|
|
371
372
|
|
|
372
373
|
MediaSeriesLanding.getInitialData = function () {
|
|
373
374
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(ctx, client, cache) {
|
|
375
|
+
var _ref4;
|
|
376
|
+
|
|
374
377
|
var urlQuery, pathname, identifier, itemsPerPage, currentPage, start, statusCode, params, docGroupID, seriesQuery, seriesData, allSeries, buildUsedTopicsArray, usedTopics, taxonomyFilter;
|
|
375
378
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
376
379
|
while (1) {
|
|
@@ -455,18 +458,7 @@ MediaSeriesLanding.getInitialData = function () {
|
|
|
455
458
|
statusCode = 404;
|
|
456
459
|
}
|
|
457
460
|
|
|
458
|
-
return _context2.abrupt('return', {
|
|
459
|
-
seriesData: seriesData,
|
|
460
|
-
query: seriesQuery,
|
|
461
|
-
params: params,
|
|
462
|
-
currentPage: currentPage,
|
|
463
|
-
taxonomyFilter: taxonomyFilter,
|
|
464
|
-
identifier: identifier,
|
|
465
|
-
docGroupID: docGroupID._id,
|
|
466
|
-
parentUrl: identifier,
|
|
467
|
-
statusCode: statusCode,
|
|
468
|
-
docGroup: docGroupID
|
|
469
|
-
});
|
|
461
|
+
return _context2.abrupt('return', (_ref4 = { seriesData: seriesData, query: seriesQuery, params: params, currentPage: currentPage, taxonomyFilter: taxonomyFilter, identifier: identifier, docGroupID: docGroupID._id, parentUrl: identifier, statusCode: statusCode }, _defineProperty(_ref4, 'taxonomyFilter', taxonomyFilter), _defineProperty(_ref4, 'docGroup', docGroupID), _ref4));
|
|
470
462
|
|
|
471
463
|
case 25:
|
|
472
464
|
case 'end':
|
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';
|
|
30
31
|
import { _ as _Object$keys } from './keys-31dcdb31.js';
|
|
31
32
|
import { I as InfiniteScroll } from './index.es-a6137319.js';
|
|
32
33
|
import { l as lib_3 } from './index-f0fc23eb.js';
|
|
33
34
|
import getRelatedArticle from './getRelatedArticle.js';
|
|
34
35
|
import getQuery from './getQuery.js';
|
|
35
36
|
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,6 +436,12 @@ 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
|
+
|
|
439
445
|
var Article = forwardRef(function (props, ref) {
|
|
440
446
|
var onVote = function () {
|
|
441
447
|
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(nodeKey, selectedChoice) {
|
|
@@ -547,7 +553,9 @@ var Article = forwardRef(function (props, ref) {
|
|
|
547
553
|
_props$refreshFlag = props.refreshFlag,
|
|
548
554
|
refreshFlag = _props$refreshFlag === undefined ? false : _props$refreshFlag,
|
|
549
555
|
disqusConfig = props.disqusConfig,
|
|
550
|
-
showDisqus = props.showDisqus
|
|
556
|
+
showDisqus = props.showDisqus,
|
|
557
|
+
_props$downloadCitati = props.downloadCitation,
|
|
558
|
+
downloadCitation = _props$downloadCitati === undefined ? false : _props$downloadCitati;
|
|
551
559
|
|
|
552
560
|
|
|
553
561
|
var targeting = getTargeting(props);
|
|
@@ -656,6 +664,53 @@ var Article = forwardRef(function (props, ref) {
|
|
|
656
664
|
}
|
|
657
665
|
return null;
|
|
658
666
|
};
|
|
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
|
+
};
|
|
659
714
|
|
|
660
715
|
var RelevantTopics = function RelevantTopics() {
|
|
661
716
|
if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
|
|
@@ -999,7 +1054,7 @@ var Article = forwardRef(function (props, ref) {
|
|
|
999
1054
|
var shareTitle = article.title;
|
|
1000
1055
|
var shareSummary = article.summary;
|
|
1001
1056
|
var shareImage = thumbnail && thumbnail.asset ? urlFor({ client: props.client, source: thumbnail.asset }) : shareImageDefault;
|
|
1002
|
-
var siteName = props.
|
|
1057
|
+
var siteName = props.Website && props.Website.title ? props.Website.title : '';
|
|
1003
1058
|
var shareKeywords = getKeywords(props.article).join(',');
|
|
1004
1059
|
|
|
1005
1060
|
var meta = {
|
|
@@ -1246,12 +1301,23 @@ var Article = forwardRef(function (props, ref) {
|
|
|
1246
1301
|
)
|
|
1247
1302
|
)
|
|
1248
1303
|
),
|
|
1249
|
-
|
|
1250
|
-
'
|
|
1251
|
-
{
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1304
|
+
React__default.createElement(
|
|
1305
|
+
'div',
|
|
1306
|
+
{ className: 'downloads-container' },
|
|
1307
|
+
issue && downloadCitation && React__default.createElement(
|
|
1308
|
+
Button,
|
|
1309
|
+
{ className: 'ris-download-button', onClick: function onClick() {
|
|
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
|
+
)
|
|
1255
1321
|
)
|
|
1256
1322
|
),
|
|
1257
1323
|
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 ...,\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
|
|
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 fieldAbstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\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 isbn_issn,\n abbreviatedJournal,\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 ...,\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
|
|
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 fieldAbstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n },\n poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \n },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n 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 year,\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 isbn_issn,\n abbreviatedJournal,\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-ris-export-v1",
|
|
4
4
|
"description": "Foundation Framework",
|
|
5
5
|
"author": "mjh-framework",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,6 +56,7 @@
|
|
|
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",
|
|
59
60
|
"get-youtube-id": "^1.0.1",
|
|
60
61
|
"gh-pages": "^1.2.0",
|
|
61
62
|
"lodash": "^4.17.15",
|