@mjhls/mjh-framework 1.0.1068 → 1.0.1069-poll-update
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/ArticleProgramLandingPage.js +1 -1
- package/dist/cjs/ExternalResources.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +1 -1
- package/dist/cjs/IssueLanding.js +3 -1
- package/dist/cjs/{MediaSeriesCard-2e65fe95.js → MediaSeriesCard-2cf60324.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +2 -2
- package/dist/cjs/MediaSeriesLandingPaginated.js +2 -2
- package/dist/cjs/PartnerDetailListing.js +1 -1
- package/dist/cjs/PartnerDetailListingPaginated.js +1 -1
- package/dist/cjs/PixelTracking.js +11 -1
- package/dist/cjs/PodcastsLanding.js +2 -2
- package/dist/cjs/TaxonomyDescription.js +1 -1
- package/dist/cjs/VideoProgramLandingPage.js +1 -1
- package/dist/cjs/View.js +1 -1
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/{index-4e9a219e.js → index-4e6f6a0c.js} +118 -77
- package/dist/cjs/index.js +1 -1
- package/dist/esm/ArticleProgramLandingPage.js +1 -1
- package/dist/esm/ExternalResources.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +1 -1
- package/dist/esm/IssueLanding.js +3 -1
- package/dist/esm/{MediaSeriesCard-27cce8ea.js → MediaSeriesCard-b4c63f1c.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +2 -2
- package/dist/esm/MediaSeriesLandingPaginated.js +2 -2
- package/dist/esm/PartnerDetailListing.js +1 -1
- package/dist/esm/PartnerDetailListingPaginated.js +1 -1
- package/dist/esm/PixelTracking.js +11 -1
- package/dist/esm/PodcastsLanding.js +2 -2
- package/dist/esm/TaxonomyDescription.js +1 -1
- package/dist/esm/VideoProgramLandingPage.js +1 -1
- package/dist/esm/View.js +1 -1
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/{index-1fd45cc5.js → index-4bf993d8.js} +119 -78
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# mjh-framework v. 1.0.
|
|
1
|
+
# mjh-framework v. 1.0.1069
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
4
4
|
|
|
@@ -5,7 +5,7 @@ var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
|
5
5
|
var _extends = require('./extends-be0d85bc.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
8
|
-
var getSerializers = require('./index-
|
|
8
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
9
9
|
var ArticleSeriesListing = require('./ArticleSeriesListing.js');
|
|
10
10
|
require('./_commonjsHelpers-06173234.js');
|
|
11
11
|
require('./core.get-iterator-method-5643aa10.js');
|
|
@@ -4,7 +4,7 @@ var _extends = require('./extends-be0d85bc.js');
|
|
|
4
4
|
var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
7
|
-
var getSerializers = require('./index-
|
|
7
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
8
8
|
var index = require('./index-96c331fd.js');
|
|
9
9
|
var Router = require('next/router');
|
|
10
10
|
var Button = require('react-bootstrap/Button');
|
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var ArticleCarousel = require('./ArticleCarousel.js');
|
|
6
6
|
var index_esm = require('./index.esm-d81454e7.js');
|
|
7
7
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
8
|
-
var getSerializers = require('./index-
|
|
8
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
9
9
|
require('./_commonjsHelpers-06173234.js');
|
|
10
10
|
require('./core.get-iterator-method-5643aa10.js');
|
|
11
11
|
require('./YoutubeGroup.js');
|
package/dist/cjs/IssueLanding.js
CHANGED
|
@@ -5,7 +5,8 @@ var React = require('react');
|
|
|
5
5
|
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
6
6
|
var Breadcrumbs = require('./Breadcrumbs.js');
|
|
7
7
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
8
|
-
var getSerializers = require('./index-
|
|
8
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
9
|
+
var PixelTracking = require('./PixelTracking.js');
|
|
9
10
|
require('./_commonjsHelpers-06173234.js');
|
|
10
11
|
require('./core.get-iterator-method-5643aa10.js');
|
|
11
12
|
require('./slicedToArray-067dd3bc.js');
|
|
@@ -148,6 +149,7 @@ var IssueLanding = function IssueLanding(props) {
|
|
|
148
149
|
React__default["default"].createElement(BlockContent.BlockContent, _extends._extends({ serializers: getSerializers.getSerializers(client), blocks: pubIssue.issue.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config())),
|
|
149
150
|
React__default["default"].createElement('div', { style: { clear: 'both' } })
|
|
150
151
|
),
|
|
152
|
+
pubIssue.issue.pixelTrackingCode && React__default["default"].createElement(PixelTracking.PixelTrackingLandingPages, { pixelTracking: pubIssue.issue.pixelTrackingCode }),
|
|
151
153
|
React__default["default"].createElement(QueueDeckExpanded, {
|
|
152
154
|
client: client,
|
|
153
155
|
mapping: settings.mapping,
|
|
@@ -7,7 +7,7 @@ var urlFor = require('./urlFor.js');
|
|
|
7
7
|
var moment = require('./moment-aca40de1.js');
|
|
8
8
|
var styleInject_es = require('./style-inject.es-dcee06b6.js');
|
|
9
9
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
10
|
-
var getSerializers = require('./index-
|
|
10
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
11
11
|
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
13
|
|
|
@@ -10,9 +10,9 @@ require('./index-50be6759.js');
|
|
|
10
10
|
require('react-dom');
|
|
11
11
|
var Link = require('next/link');
|
|
12
12
|
var MasterDeck = require('./MasterDeck.js');
|
|
13
|
-
var MediaSeriesCard = require('./MediaSeriesCard-
|
|
13
|
+
var MediaSeriesCard = require('./MediaSeriesCard-2cf60324.js');
|
|
14
14
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
15
|
-
var getSerializers = require('./index-
|
|
15
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
16
16
|
require('./_commonjsHelpers-06173234.js');
|
|
17
17
|
require('./core.get-iterator-method-5643aa10.js');
|
|
18
18
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -11,8 +11,8 @@ require('react-dom');
|
|
|
11
11
|
var Link = require('next/link');
|
|
12
12
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
13
13
|
var MasterDeckPaginated = require('./MasterDeckPaginated.js');
|
|
14
|
-
var MediaSeriesCard = require('./MediaSeriesCard-
|
|
15
|
-
var getSerializers = require('./index-
|
|
14
|
+
var MediaSeriesCard = require('./MediaSeriesCard-2cf60324.js');
|
|
15
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
16
16
|
require('./_commonjsHelpers-06173234.js');
|
|
17
17
|
require('./core.get-iterator-method-5643aa10.js');
|
|
18
18
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -13,7 +13,7 @@ var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
|
13
13
|
var Breadcrumbs = require('./Breadcrumbs.js');
|
|
14
14
|
var Feature = require('./Feature.js');
|
|
15
15
|
var urlFor = require('./urlFor.js');
|
|
16
|
-
var getSerializers = require('./index-
|
|
16
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
17
17
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
18
18
|
var checkSisterSite = require('./checkSisterSite-c3a4ac98.js');
|
|
19
19
|
require('./_commonjsHelpers-06173234.js');
|
|
@@ -13,7 +13,7 @@ var QueueDeckExpandedPaginated = require('./QueueDeckExpandedPaginated.js');
|
|
|
13
13
|
var Breadcrumbs = require('./Breadcrumbs.js');
|
|
14
14
|
var Feature = require('./Feature.js');
|
|
15
15
|
var urlFor = require('./urlFor.js');
|
|
16
|
-
var getSerializers = require('./index-
|
|
16
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
17
17
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
18
18
|
var checkSisterSite = require('./checkSisterSite-c3a4ac98.js');
|
|
19
19
|
require('./_commonjsHelpers-06173234.js');
|
|
@@ -60,7 +60,7 @@ var PixelTrackingLandingPages = React__default["default"].memo(function (_ref) {
|
|
|
60
60
|
|
|
61
61
|
var renderCode = function renderCode(code) {
|
|
62
62
|
if (window.LassoImpressionID && code && checkIfLasso(code)) {
|
|
63
|
-
var delimiter = code.lastIndexOf('?' === -1
|
|
63
|
+
var delimiter = code.lastIndexOf('?') === -1 ? '?' : '&';
|
|
64
64
|
code += delimiter + 'LassoImpressionID=' + window.LassoImpressionID;
|
|
65
65
|
}
|
|
66
66
|
return React__default["default"].createElement('div', { style: { height: '0', opacity: 0 }, key: code, dangerouslySetInnerHTML: { __html: code } });
|
|
@@ -138,6 +138,16 @@ var PixelTrackingArticle = React__default["default"].memo(function (_ref2) {
|
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
+
|
|
142
|
+
//publication issue
|
|
143
|
+
if (article.issue && article.issue.pixelTrackingCode && article.issue.pixelTrackingArticleDetail) {
|
|
144
|
+
if (article.issue.pixelTrackingCode.trackingCode && article.issue.pixelTrackingCode.is_active) {
|
|
145
|
+
if (!trackingArray.includes(article.issue.pixelTrackingCode.trackingCode)) {
|
|
146
|
+
trackingArray.push(article.issue.pixelTrackingCode.trackingCode);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
141
151
|
if (trackingArray.length > 0) {
|
|
142
152
|
setTrackingCode(trackingArray);
|
|
143
153
|
}
|
|
@@ -6,9 +6,9 @@ var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var Link = require('next/link');
|
|
8
8
|
var MasterDeck = require('./MasterDeck.js');
|
|
9
|
-
var MediaSeriesCard = require('./MediaSeriesCard-
|
|
9
|
+
var MediaSeriesCard = require('./MediaSeriesCard-2cf60324.js');
|
|
10
10
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
11
|
-
var getSerializers = require('./index-
|
|
11
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
12
12
|
require('./_commonjsHelpers-06173234.js');
|
|
13
13
|
require('./core.get-iterator-method-5643aa10.js');
|
|
14
14
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -7,7 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var Router = require('next/router');
|
|
8
8
|
var Head = require('next/head');
|
|
9
9
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
10
|
-
var getSerializers = require('./index-
|
|
10
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
11
11
|
require('./_commonjsHelpers-06173234.js');
|
|
12
12
|
require('./core.get-iterator-method-5643aa10.js');
|
|
13
13
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -7,7 +7,7 @@ var BlockContent = require('./BlockContent-96b44364.js');
|
|
|
7
7
|
var Col = require('react-bootstrap/Col');
|
|
8
8
|
var Form = require('react-bootstrap/Form');
|
|
9
9
|
var Button = require('react-bootstrap/Button');
|
|
10
|
-
var getSerializers = require('./index-
|
|
10
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
11
11
|
var VideoSeriesListing = require('./VideoSeriesListing.js');
|
|
12
12
|
require('./_commonjsHelpers-06173234.js');
|
|
13
13
|
require('./core.get-iterator-method-5643aa10.js');
|
package/dist/cjs/View.js
CHANGED
|
@@ -17,7 +17,7 @@ var FormControl = require('react-bootstrap/FormControl');
|
|
|
17
17
|
var Button = require('react-bootstrap/Button');
|
|
18
18
|
var visibilitySensor = require('./visibility-sensor-56020df6.js');
|
|
19
19
|
var SocialShare = require('./SocialShare.js');
|
|
20
|
-
var getSerializers = require('./index-
|
|
20
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
21
21
|
var AdSlot = require('./AdSlot.js');
|
|
22
22
|
var SeriesSlider = require('./SeriesSlider-086a8319.js');
|
|
23
23
|
var getTargeting = require('./getTargeting-5b954783.js');
|
package/dist/cjs/getQuery.js
CHANGED
|
@@ -13,11 +13,11 @@ var getQuery = function getQuery(type) {
|
|
|
13
13
|
case 'related':
|
|
14
14
|
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && isHealthcareProfessional != true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n && !defined(body[].quizzes)\n && !defined(body[].slides)\n && !defined(body[].articles)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n abstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, firstName, lastName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare,\n pixelTrackingCode->\n },\n documentGroup-> {\n name,\n thumbnail,\n hideThumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider,\n pixelTrackingCode->\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider,\n pixelTrackingCode->\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n },\n \'url\' : pdf.asset-> url,\n \'pdf\': pdf.asset->,\n isbn_issn,\n abbreviatedJournal,\n }\n }';
|
|
15
15
|
case 'article':
|
|
16
|
-
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n abstract,\n ...,\n passwordLock,\n password,\n disableNativeAds,\n issueGroup-> { _id, name, identifier, showIssueNameOnly, showPageNumber, risMapping, 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 hideThumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n disableEpisodeNumber,\n excludeRelatedContents,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider,\n pixelTrackingCode->\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n isSeries,\n disableEpisodeNumber,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current,\n hideSeriesSlider,\n pixelTrackingCode->\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n year,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n show_download_ris_button,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n },\n \'url\' : pdf.asset-> url,\n \'pdf\': pdf.asset->,\n isbn_issn,\n abbreviatedJournal,\n }\n\n }';
|
|
16
|
+
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n abstract,\n ...,\n passwordLock,\n password,\n disableNativeAds,\n issueGroup-> { _id, name, identifier, showIssueNameOnly, showPageNumber, risMapping, 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 hideThumbnail,\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 pixelTrackingCode->,\n pixelTrackingArticleDetail,\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':
|
|
20
|
-
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issue\': *[_type == \'publication\'\n && references(^._id)\n && is_visible != false\n && identifier.current == $issue][0] {\n ...,\n \'articles\': *[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && is_visible\n && defined(url)\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock != true\n && references(^._id)] | order(published desc) {\n ...,\n thumbnail{ ..., asset-> },\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n },\n \'pageNumber\': 1\n }\n }\n }';
|
|
20
|
+
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issue\': *[_type == \'publication\'\n && references(^._id)\n && is_visible != false\n && identifier.current == $issue][0] {\n ...,\n pixelTrackingCode->,\n pixelTrackingArticleDetail,\n \'articles\': *[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && is_visible\n && defined(url)\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock != true\n && references(^._id)] | order(published desc) {\n ...,\n thumbnail{ ..., asset-> },\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n },\n \'pageNumber\': 1\n }\n }\n }';
|
|
21
21
|
case 'externalResources':
|
|
22
22
|
return '{\n \'archived\': *[_type == "external" && archived && isVisible ' + conditions + '] | order(displayDate desc){ ..., thumbnail{ ..., asset-> }},\n \'recent\': *[_type == "external" && archived != true && isVisible ' + conditions + '] | order(displayDate asc){ ..., thumbnail{ ..., asset-> }}\n }';
|
|
23
23
|
case 'mediaseries':
|
|
@@ -8715,6 +8715,7 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8715
8715
|
_node$showResults = node.showResults,
|
|
8716
8716
|
showResults = _node$showResults === undefined ? false : _node$showResults;
|
|
8717
8717
|
|
|
8718
|
+
var inputRef = React.useRef([]);
|
|
8718
8719
|
|
|
8719
8720
|
var onSubmitPoll = function onSubmitPoll(e, setShowAnswer) {
|
|
8720
8721
|
e.preventDefault();
|
|
@@ -8735,6 +8736,16 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8735
8736
|
return acc;
|
|
8736
8737
|
}
|
|
8737
8738
|
}, 0);
|
|
8739
|
+
|
|
8740
|
+
var userChoiceSelection = function userChoiceSelection(e) {
|
|
8741
|
+
if (inputRef.current[e.currentTarget.dataset['index']].checked) {
|
|
8742
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = false;
|
|
8743
|
+
} else {
|
|
8744
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = true;
|
|
8745
|
+
setSelectedChoice(inputRef.current[e.currentTarget.dataset['index']].value);
|
|
8746
|
+
}
|
|
8747
|
+
};
|
|
8748
|
+
|
|
8738
8749
|
return React__default["default"].createElement(
|
|
8739
8750
|
React__default["default"].Fragment,
|
|
8740
8751
|
null,
|
|
@@ -8745,78 +8756,84 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8745
8756
|
),
|
|
8746
8757
|
!showAnswer && choices && choices.length > 0 && React__default["default"].createElement(
|
|
8747
8758
|
'form',
|
|
8748
|
-
{ onSubmit: function onSubmit(e) {
|
|
8759
|
+
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
8749
8760
|
return onSubmitPoll(e);
|
|
8750
8761
|
} },
|
|
8751
|
-
choices && choices.map(function (choice) {
|
|
8762
|
+
choices && choices.map(function (choice, index) {
|
|
8752
8763
|
return React__default["default"].createElement(
|
|
8753
8764
|
'div',
|
|
8754
|
-
{ key: choice._key
|
|
8765
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8766
|
+
return userChoiceSelection(e);
|
|
8767
|
+
} },
|
|
8755
8768
|
React__default["default"].createElement(
|
|
8756
8769
|
'label',
|
|
8757
8770
|
{ className: 'pl-2' },
|
|
8758
|
-
React__default["default"].createElement('input', {
|
|
8759
|
-
return
|
|
8760
|
-
} }),
|
|
8771
|
+
React__default["default"].createElement('input', { ref: function ref(el) {
|
|
8772
|
+
return inputRef.current[index] = el;
|
|
8773
|
+
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
8761
8774
|
' ' + choice.choiceText
|
|
8762
8775
|
)
|
|
8763
8776
|
);
|
|
8764
8777
|
}),
|
|
8765
8778
|
React__default["default"].createElement(
|
|
8766
8779
|
reactBootstrap.Button,
|
|
8767
|
-
{ disabled: !selectedChoice, type: 'submit' },
|
|
8780
|
+
{ disabled: !selectedChoice, className: 'mt-3', type: 'submit' },
|
|
8768
8781
|
'Vote'
|
|
8769
8782
|
)
|
|
8770
8783
|
),
|
|
8771
|
-
React__default["default"].createElement(
|
|
8784
|
+
showAnswer && React__default["default"].createElement(
|
|
8772
8785
|
'div',
|
|
8773
|
-
{ className: 'progress-container' },
|
|
8786
|
+
{ className: 'progress-container mb-3' },
|
|
8774
8787
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
8775
8788
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
8776
8789
|
return React__default["default"].createElement(
|
|
8777
|
-
|
|
8778
|
-
|
|
8790
|
+
React__default["default"].Fragment,
|
|
8791
|
+
null,
|
|
8792
|
+
choice.choiceAnswer === true && React__default["default"].createElement(
|
|
8793
|
+
'div',
|
|
8794
|
+
null,
|
|
8795
|
+
React__default["default"].createElement(
|
|
8796
|
+
'span',
|
|
8797
|
+
{ style: { color: 'limegreen' } },
|
|
8798
|
+
'Correct!'
|
|
8799
|
+
)
|
|
8800
|
+
),
|
|
8779
8801
|
React__default["default"].createElement(
|
|
8780
8802
|
'div',
|
|
8781
|
-
{ className: '
|
|
8803
|
+
{ key: choice._key, className: 'mb-3' },
|
|
8782
8804
|
React__default["default"].createElement(
|
|
8783
8805
|
'div',
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8806
|
+
{ className: 'correct-answer' },
|
|
8807
|
+
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
8808
|
+
React__default["default"].createElement(
|
|
8809
|
+
'div',
|
|
8810
|
+
null,
|
|
8811
|
+
choice.choiceText
|
|
8812
|
+
),
|
|
8790
8813
|
React__default["default"].createElement(
|
|
8791
|
-
'
|
|
8792
|
-
{
|
|
8793
|
-
|
|
8814
|
+
'div',
|
|
8815
|
+
{ className: 'float-right' },
|
|
8816
|
+
percentage,
|
|
8817
|
+
'% (',
|
|
8818
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
8819
|
+
' Votes)'
|
|
8794
8820
|
)
|
|
8795
8821
|
)
|
|
8796
|
-
),
|
|
8797
|
-
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
8798
|
-
React__default["default"].createElement(
|
|
8799
|
-
'span',
|
|
8800
|
-
{ className: 'float-right' },
|
|
8801
|
-
percentage,
|
|
8802
|
-
'% (',
|
|
8803
|
-
choice.choiceCount ? choice.choiceCount : 0,
|
|
8804
|
-
' Votes)'
|
|
8805
8822
|
)
|
|
8806
8823
|
);
|
|
8807
|
-
})
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8824
|
+
}),
|
|
8825
|
+
showAnswer && React__default["default"].createElement(
|
|
8826
|
+
'h4',
|
|
8827
|
+
{ className: 'text-center small p-3' },
|
|
8828
|
+
'Total Votes: ',
|
|
8829
|
+
choicesTotalCount
|
|
8830
|
+
)
|
|
8814
8831
|
),
|
|
8815
8832
|
showAnswer && response && React__default["default"].createElement(BlockContent.BlockContent, { blocks: response, serializers: getSerializers }),
|
|
8816
8833
|
React__default["default"].createElement(
|
|
8817
8834
|
'style',
|
|
8818
8835
|
{ jsx: 'true' },
|
|
8819
|
-
'\n .correct-answer {\n display: flex;\n justify-content: space-between;\n }\n .
|
|
8836
|
+
'\n .formPoll > div {\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n border-radius: 5px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0.5rem 0;\n text-align: center;\n margin: 0.5rem 0;\n cursor: pointer;\n }\n .formPoll > div:hover {\n background-color: #cbcbcb;\n }\n .formPoll > div > label {\n pointer-events: none;\n margin-bottom: 0;\n }\n .progress-container,\n .formPoll {\n background-color: #eaeaea;\n padding: 1rem;\n border-radius: 5px;\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n }\n .progress-container > div {\n position: relative;\n font-weight: bold;\n border-radius: 5px;\n }\n .progress-container > div:not(:nth-child(1)) {\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n }\n .correct-answer {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n height: 2rem;\n background-color: darkgrey;\n border-radius: 5px;\n }\n .float-right {\n z-index: 2;\n padding-right: 1rem;\n color: #fff;\n }\n .progress {\n align-self: flex-start;\n display: contents;\n border-radius: 5px;\n }\n .progress-bar {\n width: 33%;\n height: 100%;\n position: absolute;\n border-radius: 5px 0 0 5px;\n background-color: var(--primary);\n }\n .correct-answer > div:nth-child(2) {\n z-index: 1;\n color: white;\n padding-left: 0.5rem;\n }\n '
|
|
8820
8837
|
)
|
|
8821
8838
|
);
|
|
8822
8839
|
};
|
|
@@ -8830,7 +8847,7 @@ var Poll = function Poll(_ref) {
|
|
|
8830
8847
|
_ref.showVotes;
|
|
8831
8848
|
var getSerializers = _ref.getSerializers;
|
|
8832
8849
|
|
|
8833
|
-
var _useState = React.useState(
|
|
8850
|
+
var _useState = React.useState([]),
|
|
8834
8851
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
8835
8852
|
selectedChoice = _useState2[0],
|
|
8836
8853
|
setSelectedChoice = _useState2[1];
|
|
@@ -8846,6 +8863,7 @@ var Poll = function Poll(_ref) {
|
|
|
8846
8863
|
_node$showResults = node.showResults,
|
|
8847
8864
|
showResults = _node$showResults === undefined ? false : _node$showResults;
|
|
8848
8865
|
|
|
8866
|
+
var inputRef = React.useRef([]);
|
|
8849
8867
|
|
|
8850
8868
|
var onSubmitPoll = function onSubmitPoll(e, setShowAnswer) {
|
|
8851
8869
|
e.preventDefault();
|
|
@@ -8894,6 +8912,23 @@ var Poll = function Poll(_ref) {
|
|
|
8894
8912
|
return acc;
|
|
8895
8913
|
}
|
|
8896
8914
|
}, 0);
|
|
8915
|
+
|
|
8916
|
+
var userChoiceSelection = function userChoiceSelection(e) {
|
|
8917
|
+
if (inputRef.current[e.currentTarget.dataset['index']].checked) {
|
|
8918
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = false;
|
|
8919
|
+
var updateChoices = selectedChoice.filter(function (choice) {
|
|
8920
|
+
if (inputRef.current[e.currentTarget.dataset['index']].value !== choice) {
|
|
8921
|
+
return choice;
|
|
8922
|
+
}
|
|
8923
|
+
});
|
|
8924
|
+
setSelectedChoice(updateChoices);
|
|
8925
|
+
} else {
|
|
8926
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = true;
|
|
8927
|
+
|
|
8928
|
+
setSelectedChoice.apply(undefined, [inputRef.current[e.currentTarget.dataset['index']].value].concat(toConsumableArray._toConsumableArray(selectedChoice)));
|
|
8929
|
+
}
|
|
8930
|
+
};
|
|
8931
|
+
|
|
8897
8932
|
return React__default["default"].createElement(
|
|
8898
8933
|
React__default["default"].Fragment,
|
|
8899
8934
|
null,
|
|
@@ -8904,78 +8939,84 @@ var Poll = function Poll(_ref) {
|
|
|
8904
8939
|
),
|
|
8905
8940
|
!showAnswer && choices && choices.length > 0 && React__default["default"].createElement(
|
|
8906
8941
|
'form',
|
|
8907
|
-
{ onSubmit: function onSubmit(e) {
|
|
8942
|
+
{ className: 'multiChoicePoll', onSubmit: function onSubmit(e) {
|
|
8908
8943
|
return onSubmitPoll(e);
|
|
8909
8944
|
} },
|
|
8910
|
-
choices && choices.map(function (choice) {
|
|
8945
|
+
choices && choices.map(function (choice, index) {
|
|
8911
8946
|
return React__default["default"].createElement(
|
|
8912
8947
|
'div',
|
|
8913
|
-
{ key: choice._key
|
|
8948
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8949
|
+
return userChoiceSelection(e);
|
|
8950
|
+
} },
|
|
8914
8951
|
React__default["default"].createElement(
|
|
8915
8952
|
'label',
|
|
8916
8953
|
{ className: 'pl-2' },
|
|
8917
|
-
React__default["default"].createElement('input', {
|
|
8918
|
-
return
|
|
8919
|
-
} }),
|
|
8954
|
+
React__default["default"].createElement('input', { ref: function ref(el) {
|
|
8955
|
+
return inputRef.current[index] = el;
|
|
8956
|
+
}, type: 'checkbox', id: 'male', name: choice._type, value: choice._key }),
|
|
8920
8957
|
' ' + choice.choiceText
|
|
8921
8958
|
)
|
|
8922
8959
|
);
|
|
8923
8960
|
}),
|
|
8924
8961
|
React__default["default"].createElement(
|
|
8925
8962
|
reactBootstrap.Button,
|
|
8926
|
-
{ disabled: !selectedChoice, type: 'submit' },
|
|
8963
|
+
{ disabled: !selectedChoice, className: 'mt-3', type: 'submit' },
|
|
8927
8964
|
'Vote'
|
|
8928
8965
|
)
|
|
8929
8966
|
),
|
|
8930
|
-
React__default["default"].createElement(
|
|
8967
|
+
showAnswer && React__default["default"].createElement(
|
|
8931
8968
|
'div',
|
|
8932
|
-
{ className: 'progress-container' },
|
|
8969
|
+
{ className: 'progress-container mb-3' },
|
|
8933
8970
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
8934
8971
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
8935
8972
|
return React__default["default"].createElement(
|
|
8936
|
-
|
|
8937
|
-
|
|
8973
|
+
React__default["default"].Fragment,
|
|
8974
|
+
null,
|
|
8975
|
+
choice.choiceAnswer === true && React__default["default"].createElement(
|
|
8976
|
+
'div',
|
|
8977
|
+
null,
|
|
8978
|
+
React__default["default"].createElement(
|
|
8979
|
+
'span',
|
|
8980
|
+
{ style: { color: 'limegreen' } },
|
|
8981
|
+
'Correct!'
|
|
8982
|
+
)
|
|
8983
|
+
),
|
|
8938
8984
|
React__default["default"].createElement(
|
|
8939
8985
|
'div',
|
|
8940
|
-
{ className: '
|
|
8986
|
+
{ key: choice._key, className: 'mb-3' },
|
|
8941
8987
|
React__default["default"].createElement(
|
|
8942
8988
|
'div',
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
),
|
|
8946
|
-
choice.choiceAnswer === true && React__default["default"].createElement(
|
|
8947
|
-
'div',
|
|
8948
|
-
null,
|
|
8989
|
+
{ className: 'correct-answer' },
|
|
8990
|
+
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
8949
8991
|
React__default["default"].createElement(
|
|
8950
|
-
'
|
|
8951
|
-
|
|
8952
|
-
|
|
8992
|
+
'div',
|
|
8993
|
+
null,
|
|
8994
|
+
choice.choiceText
|
|
8995
|
+
),
|
|
8996
|
+
React__default["default"].createElement(
|
|
8997
|
+
'div',
|
|
8998
|
+
{ className: 'float-right' },
|
|
8999
|
+
percentage,
|
|
9000
|
+
'% (',
|
|
9001
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
9002
|
+
' Votes)'
|
|
8953
9003
|
)
|
|
8954
9004
|
)
|
|
8955
|
-
),
|
|
8956
|
-
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
8957
|
-
React__default["default"].createElement(
|
|
8958
|
-
'span',
|
|
8959
|
-
{ className: 'float-right' },
|
|
8960
|
-
percentage,
|
|
8961
|
-
'% (',
|
|
8962
|
-
choice.choiceCount ? choice.choiceCount : 0,
|
|
8963
|
-
' Votes)'
|
|
8964
9005
|
)
|
|
8965
9006
|
);
|
|
8966
|
-
})
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
9007
|
+
}),
|
|
9008
|
+
showAnswer && React__default["default"].createElement(
|
|
9009
|
+
'h4',
|
|
9010
|
+
{ className: 'text-center small p-3' },
|
|
9011
|
+
'Total Votes: ',
|
|
9012
|
+
choicesTotalCount
|
|
9013
|
+
)
|
|
8973
9014
|
),
|
|
8974
9015
|
showAnswer && response && React__default["default"].createElement(BlockContent.BlockContent, { blocks: response, serializers: getSerializers }),
|
|
8975
9016
|
React__default["default"].createElement(
|
|
8976
9017
|
'style',
|
|
8977
9018
|
{ jsx: 'true' },
|
|
8978
|
-
'\n .
|
|
9019
|
+
'\n .multiChoicePoll > div {\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n border-radius: 5px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0.5rem 0;\n text-align: center;\n margin: 0.5rem 0;\n cursor: pointer;\n }\n .multiChoicePoll > div:hover {\n background-color: #cbcbcb;\n }\n .multiChoicePoll > div > label {\n pointer-events: none;\n margin-bottom: 0;\n }\n .progress-container,\n .multiChoicePoll {\n background-color: #eaeaea;\n padding: 1rem;\n border-radius: 5px;\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n }\n .progress-container > div {\n position: relative;\n font-weight: bold;\n border-radius: 5px;\n }\n .progress-container > div:not(:nth-child(1)) {\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n }\n .correct-answer {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n height: 2rem;\n background-color: darkgrey;\n border-radius: 5px;\n }\n .float-right {\n z-index: 2;\n padding-right: 1rem;\n color: #fff;\n }\n .progress {\n align-self: flex-start;\n display: contents;\n border-radius: 5px;\n }\n .progress-bar {\n width: 33%;\n height: 100%;\n position: absolute;\n border-radius: 5px 0 0 5px;\n background-color: var(--primary);\n }\n .correct-answer > div:nth-child(2) {\n z-index: 1;\n color: white;\n padding-left: 0.5rem;\n }\n '
|
|
8979
9020
|
)
|
|
8980
9021
|
);
|
|
8981
9022
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -90,7 +90,7 @@ var VerticalHero = require('./VerticalHero.js');
|
|
|
90
90
|
var YahooHero = require('./YahooHero.js');
|
|
91
91
|
var GridHero = require('./GridHero.js');
|
|
92
92
|
var ConferenceArticleCard = require('./ConferenceArticleCard.js');
|
|
93
|
-
var getSerializers = require('./index-
|
|
93
|
+
var getSerializers = require('./index-4e6f6a0c.js');
|
|
94
94
|
var Beam = require('./Beam.js');
|
|
95
95
|
var Segment = require('./Segment.js');
|
|
96
96
|
var KMTracker = require('./KMTracker.js');
|
|
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
|
3
3
|
import { _ as _extends } from './extends-1559c147.js';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
6
|
-
import { g as getSerializers } from './index-
|
|
6
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
7
7
|
import ArticleSeriesListing from './ArticleSeriesListing.js';
|
|
8
8
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
9
9
|
import './core.get-iterator-method-ea258bb1.js';
|
|
@@ -2,7 +2,7 @@ import { _ as _extends } from './extends-1559c147.js';
|
|
|
2
2
|
import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
3
3
|
import React__default, { useState, useEffect } from 'react';
|
|
4
4
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
5
|
-
import { g as getSerializers } from './index-
|
|
5
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
6
6
|
import { m as momentTimezone } from './index-30a6257d.js';
|
|
7
7
|
import { useRouter } from 'next/router';
|
|
8
8
|
import Button from 'react-bootstrap/Button';
|
|
@@ -3,7 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import ArticleCarousel from './ArticleCarousel.js';
|
|
4
4
|
import { I as IoIosArrowForward } from './index.esm-eb1e8e80.js';
|
|
5
5
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
6
|
-
import { g as getSerializers } from './index-
|
|
6
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
7
7
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
8
8
|
import './core.get-iterator-method-ea258bb1.js';
|
|
9
9
|
import './YoutubeGroup.js';
|
package/dist/esm/IssueLanding.js
CHANGED
|
@@ -3,7 +3,8 @@ import React__default from 'react';
|
|
|
3
3
|
import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
4
4
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
5
5
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
6
|
-
import { g as getSerializers } from './index-
|
|
6
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
7
|
+
import { PixelTrackingLandingPages } from './PixelTracking.js';
|
|
7
8
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
8
9
|
import './core.get-iterator-method-ea258bb1.js';
|
|
9
10
|
import './slicedToArray-6ebcbfea.js';
|
|
@@ -142,6 +143,7 @@ var IssueLanding = function IssueLanding(props) {
|
|
|
142
143
|
React__default.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: pubIssue.issue.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config())),
|
|
143
144
|
React__default.createElement('div', { style: { clear: 'both' } })
|
|
144
145
|
),
|
|
146
|
+
pubIssue.issue.pixelTrackingCode && React__default.createElement(PixelTrackingLandingPages, { pixelTracking: pubIssue.issue.pixelTrackingCode }),
|
|
145
147
|
React__default.createElement(QueueDeckExpanded, {
|
|
146
148
|
client: client,
|
|
147
149
|
mapping: settings.mapping,
|
|
@@ -5,7 +5,7 @@ import urlFor from './urlFor.js';
|
|
|
5
5
|
import { m as moment } from './moment-bc12cb97.js';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
7
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
9
9
|
|
|
10
10
|
var css = ".MediaSeriesCard-module_article__SAFYK {\n width: 100%;\n margin: 0 0 1rem 0;\n}\n.MediaSeriesCard-module_article__SAFYK a {\n display: flex;\n width: 100%;\n color: #000000;\n}\n.MediaSeriesCard-module_thumb__3jRAU {\n width: 25%;\n}\n.MediaSeriesCard-module_thumb__3jRAU img {\n width: 100%;\n height: auto;\n}\n.MediaSeriesCard-module_info__3L7_o {\n width: 75%;\n font-size: 1rem;\n}\n.MediaSeriesCard-module_info__3L7_o h2 {\n font-weight: bold;\n font-size: 1.25rem;\n margin: 0;\n}\n.MediaSeriesCard-module_published__E4oiz {\n color: #6d6d6d;\n margin: 0;\n}\n.MediaSeriesCard-module_summary__1xanh {\n margin: 0.5rem 0 0 0;\n}\n.MediaSeriesCard-module_author__e5fuR {\n margin: 0;\n}\n.MediaSeriesCard-module_author__e5fuR span {\n color: #6d6d6d;\n}\n.MediaSeriesCard-module_name__2m5KY {\n font-size: 1.3rem;\n font-weight: bold;\n}\n@media only screen and (max-width: 568px) {\n .MediaSeriesCard-module_article__SAFYK {\n margin: 1rem 0;\n box-shadow: 2px 4px 8px rgba(0,0,0,.2);\n }\n .MediaSeriesCard-module_article__SAFYK a {\n flex-direction: column;\n align-items: center;\n }\n .MediaSeriesCard-module_thumb__3jRAU {\n overflow: hidden;\n width: 100%;\n margin-bottom: 1rem;\n }\n .MediaSeriesCard-module_thumb__3jRAU img{\n border-radius: 10px 10px 0 0; \n }\n .MediaSeriesCard-module_thumb__3jRAU figure {\n margin: 0;\n }\n .MediaSeriesCard-module_info__3L7_o {\n width: 90%;\n padding: 0rem !important;\n }\n .MediaSeriesCard-module_info__3L7_o h2 {\n font-size: 1rem;\n }\n .MediaSeriesCard-module_name__2m5KY {\n font-size: 1rem;\n \n }\n}\n";
|
|
11
11
|
var styles = { "article": "MediaSeriesCard-module_article__SAFYK", "thumb": "MediaSeriesCard-module_thumb__3jRAU", "info": "MediaSeriesCard-module_info__3L7_o", "published": "MediaSeriesCard-module_published__E4oiz", "summary": "MediaSeriesCard-module_summary__1xanh", "author": "MediaSeriesCard-module_author__e5fuR", "name": "MediaSeriesCard-module_name__2m5KY" };
|
|
@@ -8,9 +8,9 @@ import './index-98ca9cec.js';
|
|
|
8
8
|
import 'react-dom';
|
|
9
9
|
import Link from 'next/link';
|
|
10
10
|
import MasterDeck from './MasterDeck.js';
|
|
11
|
-
import { M as MediaSeriesCard } from './MediaSeriesCard-
|
|
11
|
+
import { M as MediaSeriesCard } from './MediaSeriesCard-b4c63f1c.js';
|
|
12
12
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
13
|
-
import { g as getSerializers } from './index-
|
|
13
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
14
14
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
15
15
|
import './core.get-iterator-method-ea258bb1.js';
|
|
16
16
|
import './web.dom.iterable-ab4dea5c.js';
|
|
@@ -9,8 +9,8 @@ import 'react-dom';
|
|
|
9
9
|
import Link from 'next/link';
|
|
10
10
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
11
11
|
import MasterDeck from './MasterDeckPaginated.js';
|
|
12
|
-
import { M as MediaSeriesCard } from './MediaSeriesCard-
|
|
13
|
-
import { g as getSerializers } from './index-
|
|
12
|
+
import { M as MediaSeriesCard } from './MediaSeriesCard-b4c63f1c.js';
|
|
13
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
14
14
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
15
15
|
import './core.get-iterator-method-ea258bb1.js';
|
|
16
16
|
import './web.dom.iterable-ab4dea5c.js';
|
|
@@ -11,7 +11,7 @@ import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
|
11
11
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
12
12
|
import Feature from './Feature.js';
|
|
13
13
|
import urlFor from './urlFor.js';
|
|
14
|
-
import { g as getSerializers } from './index-
|
|
14
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
15
15
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
16
16
|
import { c as checkSisterSite } from './checkSisterSite-a7218fda.js';
|
|
17
17
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
@@ -11,7 +11,7 @@ import QueueDeckExpanded from './QueueDeckExpandedPaginated.js';
|
|
|
11
11
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
12
12
|
import Feature from './Feature.js';
|
|
13
13
|
import urlFor from './urlFor.js';
|
|
14
|
-
import { g as getSerializers } from './index-
|
|
14
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
15
15
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
16
16
|
import { c as checkSisterSite } from './checkSisterSite-a7218fda.js';
|
|
17
17
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
@@ -52,7 +52,7 @@ var PixelTrackingLandingPages = React__default.memo(function (_ref) {
|
|
|
52
52
|
|
|
53
53
|
var renderCode = function renderCode(code) {
|
|
54
54
|
if (window.LassoImpressionID && code && checkIfLasso(code)) {
|
|
55
|
-
var delimiter = code.lastIndexOf('?' === -1
|
|
55
|
+
var delimiter = code.lastIndexOf('?') === -1 ? '?' : '&';
|
|
56
56
|
code += delimiter + 'LassoImpressionID=' + window.LassoImpressionID;
|
|
57
57
|
}
|
|
58
58
|
return React__default.createElement('div', { style: { height: '0', opacity: 0 }, key: code, dangerouslySetInnerHTML: { __html: code } });
|
|
@@ -130,6 +130,16 @@ var PixelTrackingArticle = React__default.memo(function (_ref2) {
|
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
+
|
|
134
|
+
//publication issue
|
|
135
|
+
if (article.issue && article.issue.pixelTrackingCode && article.issue.pixelTrackingArticleDetail) {
|
|
136
|
+
if (article.issue.pixelTrackingCode.trackingCode && article.issue.pixelTrackingCode.is_active) {
|
|
137
|
+
if (!trackingArray.includes(article.issue.pixelTrackingCode.trackingCode)) {
|
|
138
|
+
trackingArray.push(article.issue.pixelTrackingCode.trackingCode);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
133
143
|
if (trackingArray.length > 0) {
|
|
134
144
|
setTrackingCode(trackingArray);
|
|
135
145
|
}
|
|
@@ -4,9 +4,9 @@ import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
|
4
4
|
import React__default, { useState } from 'react';
|
|
5
5
|
import Link from 'next/link';
|
|
6
6
|
import MasterDeck from './MasterDeck.js';
|
|
7
|
-
import { M as MediaSeriesCard } from './MediaSeriesCard-
|
|
7
|
+
import { M as MediaSeriesCard } from './MediaSeriesCard-b4c63f1c.js';
|
|
8
8
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
9
|
-
import { g as getSerializers } from './index-
|
|
9
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
10
10
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
11
11
|
import './core.get-iterator-method-ea258bb1.js';
|
|
12
12
|
import './web.dom.iterable-ab4dea5c.js';
|
|
@@ -5,7 +5,7 @@ import React__default, { useState, useEffect } from 'react';
|
|
|
5
5
|
import { useRouter } from 'next/router';
|
|
6
6
|
import Head from 'next/head';
|
|
7
7
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
9
9
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
10
10
|
import './core.get-iterator-method-ea258bb1.js';
|
|
11
11
|
import './web.dom.iterable-ab4dea5c.js';
|
|
@@ -5,7 +5,7 @@ import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
|
5
5
|
import Col from 'react-bootstrap/Col';
|
|
6
6
|
import Form from 'react-bootstrap/Form';
|
|
7
7
|
import Button from 'react-bootstrap/Button';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-4bf993d8.js';
|
|
9
9
|
import VideoSeriesListing from './VideoSeriesListing.js';
|
|
10
10
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
11
11
|
import './core.get-iterator-method-ea258bb1.js';
|
package/dist/esm/View.js
CHANGED
|
@@ -15,7 +15,7 @@ import FormControl from 'react-bootstrap/FormControl';
|
|
|
15
15
|
import Button from 'react-bootstrap/Button';
|
|
16
16
|
import { V as VisibilitySensor } from './visibility-sensor-72fd8f8b.js';
|
|
17
17
|
import SocialShare from './SocialShare.js';
|
|
18
|
-
import { r as renderAuthor, g as getSerializers } from './index-
|
|
18
|
+
import { r as renderAuthor, g as getSerializers } from './index-4bf993d8.js';
|
|
19
19
|
import DFPAdSlot from './AdSlot.js';
|
|
20
20
|
import { S as SeriesSlider } from './SeriesSlider-a6b1d617.js';
|
|
21
21
|
import { a as getContentPlacementUrl, g as getTargeting } from './getTargeting-5a281334.js';
|
package/dist/esm/getQuery.js
CHANGED
|
@@ -11,11 +11,11 @@ var getQuery = function getQuery(type) {
|
|
|
11
11
|
case 'related':
|
|
12
12
|
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && isHealthcareProfessional != true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n && !defined(body[].quizzes)\n && !defined(body[].slides)\n && !defined(body[].articles)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n abstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, firstName, lastName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare,\n pixelTrackingCode->\n },\n documentGroup-> {\n name,\n thumbnail,\n hideThumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider,\n pixelTrackingCode->\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider,\n pixelTrackingCode->\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n },\n \'url\' : pdf.asset-> url,\n \'pdf\': pdf.asset->,\n isbn_issn,\n abbreviatedJournal,\n }\n }';
|
|
13
13
|
case 'article':
|
|
14
|
-
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n abstract,\n ...,\n passwordLock,\n password,\n disableNativeAds,\n issueGroup-> { _id, name, identifier, showIssueNameOnly, showPageNumber, risMapping, 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 hideThumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n disableEpisodeNumber,\n excludeRelatedContents,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider,\n pixelTrackingCode->\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n isSeries,\n disableEpisodeNumber,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current,\n hideSeriesSlider,\n pixelTrackingCode->\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n year,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n show_download_ris_button,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n },\n \'url\' : pdf.asset-> url,\n \'pdf\': pdf.asset->,\n isbn_issn,\n abbreviatedJournal,\n }\n\n }';
|
|
14
|
+
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n abstract,\n ...,\n passwordLock,\n password,\n disableNativeAds,\n issueGroup-> { _id, name, identifier, showIssueNameOnly, showPageNumber, risMapping, 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 hideThumbnail,\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 pixelTrackingCode->,\n pixelTrackingArticleDetail,\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':
|
|
18
|
-
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issue\': *[_type == \'publication\'\n && references(^._id)\n && is_visible != false\n && identifier.current == $issue][0] {\n ...,\n \'articles\': *[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && is_visible\n && defined(url)\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock != true\n && references(^._id)] | order(published desc) {\n ...,\n thumbnail{ ..., asset-> },\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n },\n \'pageNumber\': 1\n }\n }\n }';
|
|
18
|
+
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issue\': *[_type == \'publication\'\n && references(^._id)\n && is_visible != false\n && identifier.current == $issue][0] {\n ...,\n pixelTrackingCode->,\n pixelTrackingArticleDetail,\n \'articles\': *[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && is_visible\n && defined(url)\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock != true\n && references(^._id)] | order(published desc) {\n ...,\n thumbnail{ ..., asset-> },\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n },\n \'pageNumber\': 1\n }\n }\n }';
|
|
19
19
|
case 'externalResources':
|
|
20
20
|
return '{\n \'archived\': *[_type == "external" && archived && isVisible ' + conditions + '] | order(displayDate desc){ ..., thumbnail{ ..., asset-> }},\n \'recent\': *[_type == "external" && archived != true && isVisible ' + conditions + '] | order(displayDate asc){ ..., thumbnail{ ..., asset-> }}\n }';
|
|
21
21
|
case 'mediaseries':
|
|
@@ -28,7 +28,7 @@ import ReactGA from 'react-ga';
|
|
|
28
28
|
import GroupDeck from './GroupDeck.js';
|
|
29
29
|
import { m as moment } from './moment-bc12cb97.js';
|
|
30
30
|
import SocialShare from './SocialShare.js';
|
|
31
|
-
import {
|
|
31
|
+
import { _ as _toConsumableArray, a as _Array$from } from './toConsumableArray-f7074d7c.js';
|
|
32
32
|
import Pagination from 'react-bootstrap/Pagination';
|
|
33
33
|
import { h as html_decode_1 } from './entities-6d9154b4.js';
|
|
34
34
|
import DFPAdSlot from './AdSlot.js';
|
|
@@ -8695,6 +8695,7 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8695
8695
|
_node$showResults = node.showResults,
|
|
8696
8696
|
showResults = _node$showResults === undefined ? false : _node$showResults;
|
|
8697
8697
|
|
|
8698
|
+
var inputRef = useRef([]);
|
|
8698
8699
|
|
|
8699
8700
|
var onSubmitPoll = function onSubmitPoll(e, setShowAnswer) {
|
|
8700
8701
|
e.preventDefault();
|
|
@@ -8715,6 +8716,16 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8715
8716
|
return acc;
|
|
8716
8717
|
}
|
|
8717
8718
|
}, 0);
|
|
8719
|
+
|
|
8720
|
+
var userChoiceSelection = function userChoiceSelection(e) {
|
|
8721
|
+
if (inputRef.current[e.currentTarget.dataset['index']].checked) {
|
|
8722
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = false;
|
|
8723
|
+
} else {
|
|
8724
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = true;
|
|
8725
|
+
setSelectedChoice(inputRef.current[e.currentTarget.dataset['index']].value);
|
|
8726
|
+
}
|
|
8727
|
+
};
|
|
8728
|
+
|
|
8718
8729
|
return React__default.createElement(
|
|
8719
8730
|
React__default.Fragment,
|
|
8720
8731
|
null,
|
|
@@ -8725,78 +8736,84 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8725
8736
|
),
|
|
8726
8737
|
!showAnswer && choices && choices.length > 0 && React__default.createElement(
|
|
8727
8738
|
'form',
|
|
8728
|
-
{ onSubmit: function onSubmit(e) {
|
|
8739
|
+
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
8729
8740
|
return onSubmitPoll(e);
|
|
8730
8741
|
} },
|
|
8731
|
-
choices && choices.map(function (choice) {
|
|
8742
|
+
choices && choices.map(function (choice, index) {
|
|
8732
8743
|
return React__default.createElement(
|
|
8733
8744
|
'div',
|
|
8734
|
-
{ key: choice._key
|
|
8745
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8746
|
+
return userChoiceSelection(e);
|
|
8747
|
+
} },
|
|
8735
8748
|
React__default.createElement(
|
|
8736
8749
|
'label',
|
|
8737
8750
|
{ className: 'pl-2' },
|
|
8738
|
-
React__default.createElement('input', {
|
|
8739
|
-
return
|
|
8740
|
-
} }),
|
|
8751
|
+
React__default.createElement('input', { ref: function ref(el) {
|
|
8752
|
+
return inputRef.current[index] = el;
|
|
8753
|
+
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
8741
8754
|
' ' + choice.choiceText
|
|
8742
8755
|
)
|
|
8743
8756
|
);
|
|
8744
8757
|
}),
|
|
8745
8758
|
React__default.createElement(
|
|
8746
8759
|
Button$1,
|
|
8747
|
-
{ disabled: !selectedChoice, type: 'submit' },
|
|
8760
|
+
{ disabled: !selectedChoice, className: 'mt-3', type: 'submit' },
|
|
8748
8761
|
'Vote'
|
|
8749
8762
|
)
|
|
8750
8763
|
),
|
|
8751
|
-
React__default.createElement(
|
|
8764
|
+
showAnswer && React__default.createElement(
|
|
8752
8765
|
'div',
|
|
8753
|
-
{ className: 'progress-container' },
|
|
8766
|
+
{ className: 'progress-container mb-3' },
|
|
8754
8767
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
8755
8768
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
8756
8769
|
return React__default.createElement(
|
|
8757
|
-
|
|
8758
|
-
|
|
8770
|
+
React__default.Fragment,
|
|
8771
|
+
null,
|
|
8772
|
+
choice.choiceAnswer === true && React__default.createElement(
|
|
8773
|
+
'div',
|
|
8774
|
+
null,
|
|
8775
|
+
React__default.createElement(
|
|
8776
|
+
'span',
|
|
8777
|
+
{ style: { color: 'limegreen' } },
|
|
8778
|
+
'Correct!'
|
|
8779
|
+
)
|
|
8780
|
+
),
|
|
8759
8781
|
React__default.createElement(
|
|
8760
8782
|
'div',
|
|
8761
|
-
{ className: '
|
|
8783
|
+
{ key: choice._key, className: 'mb-3' },
|
|
8762
8784
|
React__default.createElement(
|
|
8763
8785
|
'div',
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8786
|
+
{ className: 'correct-answer' },
|
|
8787
|
+
React__default.createElement(ProgressBar, { now: percentage }),
|
|
8788
|
+
React__default.createElement(
|
|
8789
|
+
'div',
|
|
8790
|
+
null,
|
|
8791
|
+
choice.choiceText
|
|
8792
|
+
),
|
|
8770
8793
|
React__default.createElement(
|
|
8771
|
-
'
|
|
8772
|
-
{
|
|
8773
|
-
|
|
8794
|
+
'div',
|
|
8795
|
+
{ className: 'float-right' },
|
|
8796
|
+
percentage,
|
|
8797
|
+
'% (',
|
|
8798
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
8799
|
+
' Votes)'
|
|
8774
8800
|
)
|
|
8775
8801
|
)
|
|
8776
|
-
),
|
|
8777
|
-
React__default.createElement(ProgressBar, { now: percentage }),
|
|
8778
|
-
React__default.createElement(
|
|
8779
|
-
'span',
|
|
8780
|
-
{ className: 'float-right' },
|
|
8781
|
-
percentage,
|
|
8782
|
-
'% (',
|
|
8783
|
-
choice.choiceCount ? choice.choiceCount : 0,
|
|
8784
|
-
' Votes)'
|
|
8785
8802
|
)
|
|
8786
8803
|
);
|
|
8787
|
-
})
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8804
|
+
}),
|
|
8805
|
+
showAnswer && React__default.createElement(
|
|
8806
|
+
'h4',
|
|
8807
|
+
{ className: 'text-center small p-3' },
|
|
8808
|
+
'Total Votes: ',
|
|
8809
|
+
choicesTotalCount
|
|
8810
|
+
)
|
|
8794
8811
|
),
|
|
8795
8812
|
showAnswer && response && React__default.createElement(BlockContent, { blocks: response, serializers: getSerializers }),
|
|
8796
8813
|
React__default.createElement(
|
|
8797
8814
|
'style',
|
|
8798
8815
|
{ jsx: 'true' },
|
|
8799
|
-
'\n .correct-answer {\n display: flex;\n justify-content: space-between;\n }\n .
|
|
8816
|
+
'\n .formPoll > div {\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n border-radius: 5px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0.5rem 0;\n text-align: center;\n margin: 0.5rem 0;\n cursor: pointer;\n }\n .formPoll > div:hover {\n background-color: #cbcbcb;\n }\n .formPoll > div > label {\n pointer-events: none;\n margin-bottom: 0;\n }\n .progress-container,\n .formPoll {\n background-color: #eaeaea;\n padding: 1rem;\n border-radius: 5px;\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n }\n .progress-container > div {\n position: relative;\n font-weight: bold;\n border-radius: 5px;\n }\n .progress-container > div:not(:nth-child(1)) {\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n }\n .correct-answer {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n height: 2rem;\n background-color: darkgrey;\n border-radius: 5px;\n }\n .float-right {\n z-index: 2;\n padding-right: 1rem;\n color: #fff;\n }\n .progress {\n align-self: flex-start;\n display: contents;\n border-radius: 5px;\n }\n .progress-bar {\n width: 33%;\n height: 100%;\n position: absolute;\n border-radius: 5px 0 0 5px;\n background-color: var(--primary);\n }\n .correct-answer > div:nth-child(2) {\n z-index: 1;\n color: white;\n padding-left: 0.5rem;\n }\n '
|
|
8800
8817
|
)
|
|
8801
8818
|
);
|
|
8802
8819
|
};
|
|
@@ -8810,7 +8827,7 @@ var Poll = function Poll(_ref) {
|
|
|
8810
8827
|
_ref.showVotes;
|
|
8811
8828
|
var getSerializers = _ref.getSerializers;
|
|
8812
8829
|
|
|
8813
|
-
var _useState = useState(
|
|
8830
|
+
var _useState = useState([]),
|
|
8814
8831
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8815
8832
|
selectedChoice = _useState2[0],
|
|
8816
8833
|
setSelectedChoice = _useState2[1];
|
|
@@ -8826,6 +8843,7 @@ var Poll = function Poll(_ref) {
|
|
|
8826
8843
|
_node$showResults = node.showResults,
|
|
8827
8844
|
showResults = _node$showResults === undefined ? false : _node$showResults;
|
|
8828
8845
|
|
|
8846
|
+
var inputRef = useRef([]);
|
|
8829
8847
|
|
|
8830
8848
|
var onSubmitPoll = function onSubmitPoll(e, setShowAnswer) {
|
|
8831
8849
|
e.preventDefault();
|
|
@@ -8874,6 +8892,23 @@ var Poll = function Poll(_ref) {
|
|
|
8874
8892
|
return acc;
|
|
8875
8893
|
}
|
|
8876
8894
|
}, 0);
|
|
8895
|
+
|
|
8896
|
+
var userChoiceSelection = function userChoiceSelection(e) {
|
|
8897
|
+
if (inputRef.current[e.currentTarget.dataset['index']].checked) {
|
|
8898
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = false;
|
|
8899
|
+
var updateChoices = selectedChoice.filter(function (choice) {
|
|
8900
|
+
if (inputRef.current[e.currentTarget.dataset['index']].value !== choice) {
|
|
8901
|
+
return choice;
|
|
8902
|
+
}
|
|
8903
|
+
});
|
|
8904
|
+
setSelectedChoice(updateChoices);
|
|
8905
|
+
} else {
|
|
8906
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = true;
|
|
8907
|
+
|
|
8908
|
+
setSelectedChoice.apply(undefined, [inputRef.current[e.currentTarget.dataset['index']].value].concat(_toConsumableArray(selectedChoice)));
|
|
8909
|
+
}
|
|
8910
|
+
};
|
|
8911
|
+
|
|
8877
8912
|
return React__default.createElement(
|
|
8878
8913
|
React__default.Fragment,
|
|
8879
8914
|
null,
|
|
@@ -8884,78 +8919,84 @@ var Poll = function Poll(_ref) {
|
|
|
8884
8919
|
),
|
|
8885
8920
|
!showAnswer && choices && choices.length > 0 && React__default.createElement(
|
|
8886
8921
|
'form',
|
|
8887
|
-
{ onSubmit: function onSubmit(e) {
|
|
8922
|
+
{ className: 'multiChoicePoll', onSubmit: function onSubmit(e) {
|
|
8888
8923
|
return onSubmitPoll(e);
|
|
8889
8924
|
} },
|
|
8890
|
-
choices && choices.map(function (choice) {
|
|
8925
|
+
choices && choices.map(function (choice, index) {
|
|
8891
8926
|
return React__default.createElement(
|
|
8892
8927
|
'div',
|
|
8893
|
-
{ key: choice._key
|
|
8928
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8929
|
+
return userChoiceSelection(e);
|
|
8930
|
+
} },
|
|
8894
8931
|
React__default.createElement(
|
|
8895
8932
|
'label',
|
|
8896
8933
|
{ className: 'pl-2' },
|
|
8897
|
-
React__default.createElement('input', {
|
|
8898
|
-
return
|
|
8899
|
-
} }),
|
|
8934
|
+
React__default.createElement('input', { ref: function ref(el) {
|
|
8935
|
+
return inputRef.current[index] = el;
|
|
8936
|
+
}, type: 'checkbox', id: 'male', name: choice._type, value: choice._key }),
|
|
8900
8937
|
' ' + choice.choiceText
|
|
8901
8938
|
)
|
|
8902
8939
|
);
|
|
8903
8940
|
}),
|
|
8904
8941
|
React__default.createElement(
|
|
8905
8942
|
Button$1,
|
|
8906
|
-
{ disabled: !selectedChoice, type: 'submit' },
|
|
8943
|
+
{ disabled: !selectedChoice, className: 'mt-3', type: 'submit' },
|
|
8907
8944
|
'Vote'
|
|
8908
8945
|
)
|
|
8909
8946
|
),
|
|
8910
|
-
React__default.createElement(
|
|
8947
|
+
showAnswer && React__default.createElement(
|
|
8911
8948
|
'div',
|
|
8912
|
-
{ className: 'progress-container' },
|
|
8949
|
+
{ className: 'progress-container mb-3' },
|
|
8913
8950
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
8914
8951
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
8915
8952
|
return React__default.createElement(
|
|
8916
|
-
|
|
8917
|
-
|
|
8953
|
+
React__default.Fragment,
|
|
8954
|
+
null,
|
|
8955
|
+
choice.choiceAnswer === true && React__default.createElement(
|
|
8956
|
+
'div',
|
|
8957
|
+
null,
|
|
8958
|
+
React__default.createElement(
|
|
8959
|
+
'span',
|
|
8960
|
+
{ style: { color: 'limegreen' } },
|
|
8961
|
+
'Correct!'
|
|
8962
|
+
)
|
|
8963
|
+
),
|
|
8918
8964
|
React__default.createElement(
|
|
8919
8965
|
'div',
|
|
8920
|
-
{ className: '
|
|
8966
|
+
{ key: choice._key, className: 'mb-3' },
|
|
8921
8967
|
React__default.createElement(
|
|
8922
8968
|
'div',
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
),
|
|
8926
|
-
choice.choiceAnswer === true && React__default.createElement(
|
|
8927
|
-
'div',
|
|
8928
|
-
null,
|
|
8969
|
+
{ className: 'correct-answer' },
|
|
8970
|
+
React__default.createElement(ProgressBar, { now: percentage }),
|
|
8929
8971
|
React__default.createElement(
|
|
8930
|
-
'
|
|
8931
|
-
|
|
8932
|
-
|
|
8972
|
+
'div',
|
|
8973
|
+
null,
|
|
8974
|
+
choice.choiceText
|
|
8975
|
+
),
|
|
8976
|
+
React__default.createElement(
|
|
8977
|
+
'div',
|
|
8978
|
+
{ className: 'float-right' },
|
|
8979
|
+
percentage,
|
|
8980
|
+
'% (',
|
|
8981
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
8982
|
+
' Votes)'
|
|
8933
8983
|
)
|
|
8934
8984
|
)
|
|
8935
|
-
),
|
|
8936
|
-
React__default.createElement(ProgressBar, { now: percentage }),
|
|
8937
|
-
React__default.createElement(
|
|
8938
|
-
'span',
|
|
8939
|
-
{ className: 'float-right' },
|
|
8940
|
-
percentage,
|
|
8941
|
-
'% (',
|
|
8942
|
-
choice.choiceCount ? choice.choiceCount : 0,
|
|
8943
|
-
' Votes)'
|
|
8944
8985
|
)
|
|
8945
8986
|
);
|
|
8946
|
-
})
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8987
|
+
}),
|
|
8988
|
+
showAnswer && React__default.createElement(
|
|
8989
|
+
'h4',
|
|
8990
|
+
{ className: 'text-center small p-3' },
|
|
8991
|
+
'Total Votes: ',
|
|
8992
|
+
choicesTotalCount
|
|
8993
|
+
)
|
|
8953
8994
|
),
|
|
8954
8995
|
showAnswer && response && React__default.createElement(BlockContent, { blocks: response, serializers: getSerializers }),
|
|
8955
8996
|
React__default.createElement(
|
|
8956
8997
|
'style',
|
|
8957
8998
|
{ jsx: 'true' },
|
|
8958
|
-
'\n .
|
|
8999
|
+
'\n .multiChoicePoll > div {\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n border-radius: 5px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0.5rem 0;\n text-align: center;\n margin: 0.5rem 0;\n cursor: pointer;\n }\n .multiChoicePoll > div:hover {\n background-color: #cbcbcb;\n }\n .multiChoicePoll > div > label {\n pointer-events: none;\n margin-bottom: 0;\n }\n .progress-container,\n .multiChoicePoll {\n background-color: #eaeaea;\n padding: 1rem;\n border-radius: 5px;\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n }\n .progress-container > div {\n position: relative;\n font-weight: bold;\n border-radius: 5px;\n }\n .progress-container > div:not(:nth-child(1)) {\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n }\n .correct-answer {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n height: 2rem;\n background-color: darkgrey;\n border-radius: 5px;\n }\n .float-right {\n z-index: 2;\n padding-right: 1rem;\n color: #fff;\n }\n .progress {\n align-self: flex-start;\n display: contents;\n border-radius: 5px;\n }\n .progress-bar {\n width: 33%;\n height: 100%;\n position: absolute;\n border-radius: 5px 0 0 5px;\n background-color: var(--primary);\n }\n .correct-answer > div:nth-child(2) {\n z-index: 1;\n color: white;\n padding-left: 0.5rem;\n }\n '
|
|
8959
9000
|
)
|
|
8960
9001
|
);
|
|
8961
9002
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -87,7 +87,7 @@ export { default as VerticalHero } from './VerticalHero.js';
|
|
|
87
87
|
export { default as YahooHero } from './YahooHero.js';
|
|
88
88
|
export { default as GridHero } from './GridHero.js';
|
|
89
89
|
export { default as ConferenceArticleCard } from './ConferenceArticleCard.js';
|
|
90
|
-
export { g as getSerializers } from './index-
|
|
90
|
+
export { g as getSerializers } from './index-4bf993d8.js';
|
|
91
91
|
export { default as Beam } from './Beam.js';
|
|
92
92
|
export { default as Segment } from './Segment.js';
|
|
93
93
|
export { default as KMTracker } from './KMTracker.js';
|