@mjhls/mjh-framework 1.0.663 → 1.0.664-beta.0
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/AD.js +1 -1
- package/dist/cjs/AD300x250.js +19 -6
- package/dist/cjs/AD300x250x600.js +3 -3
- package/dist/cjs/AD728x90.js +4 -4
- package/dist/cjs/ADFloatingFooter.js +2 -2
- package/dist/cjs/ADGutter.js +2 -2
- package/dist/cjs/ADSkyscraper.js +2 -2
- package/dist/cjs/ADSponsoredResources.js +2 -2
- package/dist/cjs/ADWebcast.js +2 -2
- package/dist/cjs/ADWelcome.js +2 -2
- package/dist/cjs/AdSlot.js +3 -3
- package/dist/cjs/AdSlotsProvider.js +1 -1
- package/dist/cjs/ArticleCarousel.js +3 -3
- package/dist/cjs/ArticleSeriesListing.js +4 -4
- package/dist/cjs/Auth.js +256 -507
- package/dist/cjs/{BlockContent-88f69acd.js → BlockContent-091a991f.js} +1 -1
- package/dist/cjs/CMEDeck.js +5 -5
- package/dist/cjs/Column3.js +4 -4
- package/dist/cjs/ConferenceArticleCard.js +2 -2
- package/dist/cjs/DeckContent.js +7 -7
- package/dist/cjs/DeckQueue.js +6 -6
- package/dist/cjs/{Dfp-b2bc3b97.js → Dfp-f6a18ed2.js} +1 -1
- package/dist/cjs/EventsDeck.js +5 -5
- package/dist/cjs/ExternalResources.js +7 -7
- package/dist/cjs/Feature.js +3 -3
- package/dist/cjs/ForbesHero.js +2 -2
- package/dist/cjs/GridContent.js +10 -10
- package/dist/cjs/GridHero.js +2 -2
- package/dist/cjs/GroupDeck.js +1 -1
- package/dist/cjs/HamMagazine.js +4 -4
- package/dist/cjs/Hero.js +1 -1
- package/dist/cjs/HorizontalHero.js +2 -2
- package/dist/cjs/IssueContentDeck.js +2 -2
- package/dist/cjs/IssueDeck.js +2 -2
- package/dist/cjs/IssueLanding.js +7 -7
- package/dist/cjs/LeftNav.js +2 -2
- package/dist/cjs/MasterDeck.js +8 -8
- package/dist/cjs/NavMagazine.js +4 -4
- package/dist/cjs/NavNative.js +3 -3
- package/dist/cjs/OncliveHero.js +2 -2
- package/dist/cjs/OncliveLargeHero.js +2 -2
- package/dist/cjs/PartnerDetailListing.js +1212 -15
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +9 -9
- package/dist/cjs/RecentNews.js +2 -2
- package/dist/cjs/RelatedContent.js +2 -2
- package/dist/cjs/{SocialSearchComponent-962b1344.js → SocialSearchComponent-81a50f81.js} +5 -5
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +3 -3
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/Ustream.js +2 -2
- package/dist/cjs/VerticalHero.js +2 -2
- package/dist/cjs/VideoSeriesCard.js +2 -2
- package/dist/cjs/VideoSeriesListing.js +3 -3
- package/dist/cjs/View.js +227 -70
- package/dist/cjs/YahooHero.js +2 -2
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getRelatedArticle-606b1d0b.js +447 -0
- package/dist/cjs/getRelatedArticle.js +5 -90
- package/dist/cjs/getSerializers.js +6 -6
- package/dist/cjs/{getTargeting-fee8c429.js → getTargeting-9af0ef69.js} +2 -2
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/{index-5be2866f.js → index-3294d3bc.js} +1 -1
- package/dist/cjs/{index-2831c002.js → index-bc3e2d5c.js} +450 -462
- package/dist/cjs/index-bd6c9f56.js +211 -0
- package/dist/cjs/{index-b5eb3ff8.js → index-be0c82be.js} +19 -20
- package/dist/cjs/{index-2d0a4911.js → index-fa8ed292.js} +27 -34
- package/dist/cjs/{index.es-ab3f2690.js → index.es-9110add6.js} +1 -3
- package/dist/cjs/index.js +15 -16
- package/dist/cjs/{main-b6c96c8d.js → main-a4cb15bb.js} +36 -67
- package/dist/cjs/{moment-66a6a284.js → moment-575fe24c.js} +1 -1
- package/dist/cjs/urlFor.js +1 -1
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +20 -7
- package/dist/esm/AD300x250x600.js +3 -3
- package/dist/esm/AD728x90.js +4 -4
- package/dist/esm/ADFloatingFooter.js +2 -2
- package/dist/esm/ADGutter.js +2 -2
- package/dist/esm/ADSkyscraper.js +2 -2
- package/dist/esm/ADSponsoredResources.js +2 -2
- package/dist/esm/ADWebcast.js +2 -2
- package/dist/esm/ADWelcome.js +2 -2
- package/dist/esm/AdSlot.js +3 -3
- package/dist/esm/AdSlotsProvider.js +1 -1
- package/dist/esm/ArticleCarousel.js +1 -1
- package/dist/esm/ArticleSeriesListing.js +4 -4
- package/dist/esm/Auth.js +248 -499
- package/dist/esm/{BlockContent-a614acdf.js → BlockContent-e9b4ddcf.js} +1 -1
- package/dist/esm/CMEDeck.js +5 -5
- package/dist/esm/Column3.js +4 -4
- package/dist/esm/ConferenceArticleCard.js +2 -2
- package/dist/esm/DeckContent.js +7 -7
- package/dist/esm/DeckQueue.js +6 -6
- package/dist/esm/{Dfp-8a8fca18.js → Dfp-96b49def.js} +1 -1
- package/dist/esm/EventsDeck.js +5 -5
- package/dist/esm/ExternalResources.js +7 -7
- package/dist/esm/Feature.js +3 -3
- package/dist/esm/ForbesHero.js +2 -2
- package/dist/esm/GridContent.js +10 -10
- package/dist/esm/GridHero.js +2 -2
- package/dist/esm/GroupDeck.js +1 -1
- package/dist/esm/HamMagazine.js +4 -4
- package/dist/esm/Hero.js +1 -1
- package/dist/esm/HorizontalHero.js +2 -2
- package/dist/esm/IssueContentDeck.js +2 -2
- package/dist/esm/IssueDeck.js +2 -2
- package/dist/esm/IssueLanding.js +7 -7
- package/dist/esm/LeftNav.js +2 -2
- package/dist/esm/MasterDeck.js +8 -8
- package/dist/esm/NavMagazine.js +4 -4
- package/dist/esm/NavNative.js +3 -3
- package/dist/esm/OncliveHero.js +2 -2
- package/dist/esm/OncliveLargeHero.js +2 -2
- package/dist/esm/PartnerDetailListing.js +1209 -13
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +9 -9
- package/dist/esm/RecentNews.js +2 -2
- package/dist/esm/RelatedContent.js +2 -2
- package/dist/esm/{SocialSearchComponent-75527dfe.js → SocialSearchComponent-55960ec4.js} +5 -5
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +3 -3
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/Ustream.js +2 -2
- package/dist/esm/VerticalHero.js +2 -2
- package/dist/esm/VideoSeriesCard.js +2 -2
- package/dist/esm/VideoSeriesListing.js +3 -3
- package/dist/esm/View.js +198 -41
- package/dist/esm/YahooHero.js +2 -2
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getRelatedArticle-80e67416.js +443 -0
- package/dist/esm/getRelatedArticle.js +4 -93
- package/dist/esm/getSerializers.js +6 -6
- package/dist/esm/{index-93ec3c59.js → index-0e45a0b2.js} +27 -34
- package/dist/esm/{index-e2a6c2d0.js → index-6d49c905.js} +450 -462
- package/dist/esm/{index-51a80699.js → index-73819142.js} +19 -20
- package/dist/esm/index-db3bb315.js +207 -0
- package/dist/esm/{index-d2f90501.js → index-ef6d5dcf.js} +1 -1
- package/dist/esm/{index.es-938a3a58.js → index.es-29c1cef5.js} +1 -3
- package/dist/esm/index.js +13 -14
- package/dist/esm/{main-0465b2a0.js → main-5d1e4bd3.js} +34 -65
- package/dist/esm/{moment-12415288.js → moment-e2f9b20c.js} +1 -1
- package/dist/esm/urlFor.js +1 -1
- package/package.json +1 -1
- /package/dist/cjs/{ADInfeed-eaa6c661.js → ADInfeed-388ec28a.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-f25eb4f7.js → ADlgInfeed-5548ff47.js} +0 -0
- /package/dist/esm/{ADInfeed-c27997a3.js → ADInfeed-eae0af19.js} +0 -0
- /package/dist/esm/{ADlgInfeed-41c3909c.js → ADlgInfeed-2f4c7a7c.js} +0 -0
package/dist/esm/View.js
CHANGED
|
@@ -14,19 +14,19 @@ import './web.dom.iterable-8956f9a5.js';
|
|
|
14
14
|
import { _ as _typeof } from './typeof-08f2c380.js';
|
|
15
15
|
import './_is-array-49698029.js';
|
|
16
16
|
import React__default, { useState, useEffect } from 'react';
|
|
17
|
-
import { l as lib_3 } from './index-
|
|
17
|
+
import { l as lib_3 } from './index-0e45a0b2.js';
|
|
18
18
|
import 'prop-types';
|
|
19
19
|
import 'react-bootstrap/Row';
|
|
20
20
|
import 'react-bootstrap/Col';
|
|
21
|
-
import { m as moment } from './moment-
|
|
21
|
+
import { m as moment } from './moment-e2f9b20c.js';
|
|
22
22
|
import { useRouter } from 'next/router';
|
|
23
23
|
import './isSymbol-807e927e.js';
|
|
24
24
|
import './debounce-1a993acf.js';
|
|
25
|
-
import { I as InfiniteScroll } from './index.es-
|
|
25
|
+
import { I as InfiniteScroll } from './index.es-29c1cef5.js';
|
|
26
26
|
import 'react-dom';
|
|
27
|
-
import './index-
|
|
27
|
+
import './index-73819142.js';
|
|
28
28
|
import './index-5f9f807a.js';
|
|
29
|
-
import { m as
|
|
29
|
+
import { m as main_36 } from './main-5d1e4bd3.js';
|
|
30
30
|
import './entities-7cc3bf45.js';
|
|
31
31
|
import { _ as _JSON$stringify } from './stringify-008c8802.js';
|
|
32
32
|
import { a as _getIterator, _ as _slicedToArray } from './slicedToArray-7021e5df.js';
|
|
@@ -34,14 +34,14 @@ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7c6
|
|
|
34
34
|
import './_set-species-cede29f8.js';
|
|
35
35
|
import './beam-681a9749.js';
|
|
36
36
|
import DFPAdSlot from './AdSlot.js';
|
|
37
|
-
import { B as BlockContent } from './BlockContent-
|
|
37
|
+
import { B as BlockContent } from './BlockContent-e9b4ddcf.js';
|
|
38
38
|
import './smoothscroll-4b699764.js';
|
|
39
39
|
import './GroupDeck.js';
|
|
40
40
|
import 'react-bootstrap';
|
|
41
41
|
import Button from 'react-bootstrap/Button';
|
|
42
42
|
import { _ as _defineProperty } from './defineProperty-b798470d.js';
|
|
43
43
|
import Form from 'react-bootstrap/Form';
|
|
44
|
-
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-
|
|
44
|
+
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-6d49c905.js';
|
|
45
45
|
import './util-7700fc59.js';
|
|
46
46
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
47
47
|
import 'react-bootstrap/Pagination';
|
|
@@ -52,9 +52,9 @@ import FormControl from 'react-bootstrap/FormControl';
|
|
|
52
52
|
import { _ as _Object$keys } from './keys-fc2d4c34.js';
|
|
53
53
|
import 'react-bootstrap/Dropdown';
|
|
54
54
|
import getSeriesDetail from './getSeriesDetail.js';
|
|
55
|
-
import '
|
|
55
|
+
import './index-db3bb315.js';
|
|
56
|
+
import { d as dist_3, a as dist_2, g as getRelatedArticle } from './getRelatedArticle-80e67416.js';
|
|
56
57
|
import getQuery from './getQuery.js';
|
|
57
|
-
import getRelatedArticle from './getRelatedArticle.js';
|
|
58
58
|
import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-2acdec91.js';
|
|
59
59
|
import getKeywords from './getKeywords.js';
|
|
60
60
|
import urlFor from './urlFor.js';
|
|
@@ -135,9 +135,9 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
135
135
|
style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
|
|
136
136
|
thumbnailUrl && React__default.createElement('img', { style: { maxWidth: '220px', maxHeight: '100px', marginTop: '1rem' }, src: thumbnailUrl, alt: name }),
|
|
137
137
|
!thumbnailUrl && React__default.createElement('p', {
|
|
138
|
-
style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' :
|
|
138
|
+
style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main_36 ? 'left' : 'right', marginTop: '.25rem' },
|
|
139
139
|
dangerouslySetInnerHTML: { __html: name } }),
|
|
140
|
-
|
|
140
|
+
main_36 && !thumbnailUrl && React__default.createElement(
|
|
141
141
|
'style',
|
|
142
142
|
{ jsx: 'true' },
|
|
143
143
|
'\n a.doc-group {\n display: block !important;\n padding: 0!important;\n }\n '
|
|
@@ -182,7 +182,7 @@ var findIndex = function findIndex(arr) {
|
|
|
182
182
|
return indexes;
|
|
183
183
|
};
|
|
184
184
|
|
|
185
|
-
var css = ".RelatedArticles-module_mediaContainer__10h9k {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n margin: 0 -1rem;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn {\r\n margin: 0 1rem 1rem;\r\n width: calc(33% - 1rem);\r\n display: column;\r\n flex-direction: row;\r\n margin-bottom: 0.75rem;\r\n padding-bottom: 0.75rem;\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_cardTitle__3P-Ib {\r\n font-weight: bold;\r\n color: #252525;\r\n margin-bottom: 0.25rem;\r\n font-size: 15px;\r\n}\r\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\r\n color: #000;\r\n font-weight: bold;\r\n}\r\n.RelatedArticles-module_cardDate__1wOR5 {\r\n color: var(--dark);\r\n display: block;\r\n background: #fff !important;\r\n margin-bottom: 0;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: block;\r\n text-align: center;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n height: 135px;\r\n width: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n}\r\n@media screen and (max-width: 1064px) {\r\n}\r\n@media screen and (max-width: 968px) {\r\n .RelatedArticles-module_mediaContainer__10h9k {\r\n flex-wrap: wrap;\r\n }\r\n .RelatedArticles-module_mediaCard__3wQbn {\r\n width: 100%;\r\n }\r\n .RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n width: 100%;\r\n height: auto;\r\n\r\n max-height: 175px;\r\n object-fit: contain;\r\n margin-bottom: 1rem;\r\n }\r\n}\r\n";
|
|
185
|
+
var css = ".RelatedArticles-module_mediaContainer__10h9k {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n margin: 0 -1rem;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn {\r\n margin: 0 1rem 1rem;\r\n width: calc(33% - 1rem);\r\n display: column;\r\n flex-direction: row;\r\n margin-bottom: 0.75rem;\r\n padding-bottom: 0.75rem;\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_cardTitle__3P-Ib {\r\n font-weight: bold;\r\n color: #252525;\r\n margin-bottom: 0.25rem;\r\n font-size: 15px;\r\n}\r\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\r\n color: #000;\r\n font-weight: bold;\r\n}\r\n.RelatedArticles-module_cardDate__1wOR5 {\r\n color: var(--dark);\r\n display: block;\r\n background: #fff !important;\r\n margin-bottom: 0;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: block;\r\n text-align: center;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n height: 135px;\r\n width: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n}\r\n@media screen and (max-width: 1064px) {\r\n}\r\n@media screen and (max-width: 968px) {\r\n .RelatedArticles-module_mediaContainer__10h9k {\r\n flex-wrap: wrap;\r\n }\r\n .RelatedArticles-module_mediaCard__3wQbn {\r\n width: 100%;\r\n }\r\n .RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n width: 100%;\r\n height: auto;\r\n\r\n max-height: 175px;\r\n object-fit: contain;\r\n margin-bottom: 1rem;\r\n }\r\n}\r\n\r\n@media screen and (max-width: 576px) {\r\n .RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: none;\r\n }\r\n .RelatedArticles-module_mediaCard__3wQbn {\r\n background-color: #c0c0c0;\r\n margin-bottom: 0.5rem;\r\n padding: 0.5rem;\r\n }\r\n}\r\n";
|
|
186
186
|
var styles = { "mediaContainer": "RelatedArticles-module_mediaContainer__10h9k", "mediaCard": "RelatedArticles-module_mediaCard__3wQbn", "cardTitle": "RelatedArticles-module_cardTitle__3P-Ib", "authorListing": "RelatedArticles-module_authorListing__1EFg4", "text-muted": "RelatedArticles-module_text-muted__3b0zX", "cardDate": "RelatedArticles-module_cardDate__1wOR5", "imgWrapper": "RelatedArticles-module_imgWrapper__5Jx_4" };
|
|
187
187
|
styleInject(css);
|
|
188
188
|
|
|
@@ -439,7 +439,9 @@ var Article = function Article(props) {
|
|
|
439
439
|
content_placement && content_placement.length ? ' | ' : null
|
|
440
440
|
);
|
|
441
441
|
}),
|
|
442
|
-
content_placement && content_placement.length > 0 ? content_placement.
|
|
442
|
+
content_placement && content_placement.length > 0 ? content_placement.filter(function (item) {
|
|
443
|
+
return item.identifier !== 'news';
|
|
444
|
+
}).map(function (cp, index) {
|
|
443
445
|
var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path;
|
|
444
446
|
var href = '/' + cp_url;
|
|
445
447
|
return React__default.createElement(
|
|
@@ -462,6 +464,31 @@ var Article = function Article(props) {
|
|
|
462
464
|
return null;
|
|
463
465
|
};
|
|
464
466
|
|
|
467
|
+
var renderRelatedContent = function renderRelatedContent() {
|
|
468
|
+
if (showRelatedArticles) {
|
|
469
|
+
return React__default.createElement(
|
|
470
|
+
'div',
|
|
471
|
+
{ className: 'related-contents-container' },
|
|
472
|
+
React__default.createElement(
|
|
473
|
+
'div',
|
|
474
|
+
null,
|
|
475
|
+
React__default.createElement(RelevantTopics, null)
|
|
476
|
+
),
|
|
477
|
+
React__default.createElement(
|
|
478
|
+
'div',
|
|
479
|
+
{ className: 'pt-2' },
|
|
480
|
+
React__default.createElement(RelatedArticle, { articles: article.relatedContents, client: client })
|
|
481
|
+
),
|
|
482
|
+
React__default.createElement(
|
|
483
|
+
'style',
|
|
484
|
+
{ jsx: 'true' },
|
|
485
|
+
'\n @media only screen and (max-width: 576px) {\n .related-contents-container {\n padding: 0.5rem;\n background-color: #dcdcdc;\n }\n }\n '
|
|
486
|
+
)
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
return null;
|
|
490
|
+
};
|
|
491
|
+
|
|
465
492
|
var form = function form() {
|
|
466
493
|
return React__default.createElement(
|
|
467
494
|
React__default.Fragment,
|
|
@@ -565,6 +592,7 @@ var Article = function Article(props) {
|
|
|
565
592
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
566
593
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
|
|
567
594
|
),
|
|
595
|
+
renderRelatedContent(),
|
|
568
596
|
React__default.createElement(BlockContent, _extends({
|
|
569
597
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
570
598
|
blocks: [].concat(_toConsumableArray(articleBody.slice(selectedIndex))),
|
|
@@ -632,6 +660,7 @@ var Article = function Article(props) {
|
|
|
632
660
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound }))
|
|
633
661
|
),
|
|
634
662
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
663
|
+
renderRelatedContent(),
|
|
635
664
|
React__default.createElement(BlockContent, _extends({
|
|
636
665
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
637
666
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex))),
|
|
@@ -674,12 +703,31 @@ var Article = function Article(props) {
|
|
|
674
703
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
675
704
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
|
|
676
705
|
),
|
|
706
|
+
renderRelatedContent(),
|
|
677
707
|
React__default.createElement(BlockContent, _extends({
|
|
678
708
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
679
709
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex2))),
|
|
680
710
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
681
711
|
}, client.config()))
|
|
682
712
|
);
|
|
713
|
+
} else if (indexes.length >= 2 && body.length > 3 && showRelatedArticles) {
|
|
714
|
+
var _selectedIndex3 = indexes[1] + 1;
|
|
715
|
+
return React__default.createElement(
|
|
716
|
+
React__default.Fragment,
|
|
717
|
+
null,
|
|
718
|
+
React__default.createElement(BlockContent, _extends({
|
|
719
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
720
|
+
blocks: [].concat(_toConsumableArray(articleBody.slice(0, _selectedIndex3))),
|
|
721
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
722
|
+
}, client.config())),
|
|
723
|
+
React__default.createElement('span', { className: 'clearfix' }),
|
|
724
|
+
renderRelatedContent(),
|
|
725
|
+
React__default.createElement(BlockContent, _extends({
|
|
726
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
727
|
+
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex3))),
|
|
728
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
729
|
+
}, client.config()))
|
|
730
|
+
);
|
|
683
731
|
} else {
|
|
684
732
|
return React__default.createElement(BlockContent, _extends({
|
|
685
733
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, false, null, props.article.Ads, targeting),
|
|
@@ -867,7 +915,7 @@ var Article = function Article(props) {
|
|
|
867
915
|
React__default.createElement(
|
|
868
916
|
'div',
|
|
869
917
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
870
|
-
|
|
918
|
+
main_36 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
|
|
871
919
|
if (index === 0) {
|
|
872
920
|
return React__default.createElement(
|
|
873
921
|
'div',
|
|
@@ -919,26 +967,12 @@ var Article = function Article(props) {
|
|
|
919
967
|
issue.name
|
|
920
968
|
)
|
|
921
969
|
),
|
|
922
|
-
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } })
|
|
923
|
-
showRelatedArticles && React__default.createElement(
|
|
924
|
-
React__default.Fragment,
|
|
925
|
-
null,
|
|
926
|
-
React__default.createElement(
|
|
927
|
-
'div',
|
|
928
|
-
null,
|
|
929
|
-
React__default.createElement(RelevantTopics, null)
|
|
930
|
-
),
|
|
931
|
-
React__default.createElement(
|
|
932
|
-
'div',
|
|
933
|
-
{ className: 'pt-2' },
|
|
934
|
-
React__default.createElement(RelatedArticle, { articles: article.relatedArticle, client: client })
|
|
935
|
-
)
|
|
936
|
-
)
|
|
970
|
+
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } })
|
|
937
971
|
),
|
|
938
972
|
renderIsiContent(props.article)
|
|
939
973
|
)
|
|
940
974
|
),
|
|
941
|
-
|
|
975
|
+
main_36 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
|
|
942
976
|
if (index > 0) {
|
|
943
977
|
return React__default.createElement(
|
|
944
978
|
'div',
|
|
@@ -978,6 +1012,119 @@ var Article = function Article(props) {
|
|
|
978
1012
|
|
|
979
1013
|
var _this = undefined;
|
|
980
1014
|
|
|
1015
|
+
var getRelatedContents = function () {
|
|
1016
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
|
|
1017
|
+
var ctx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1018
|
+
var client = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1019
|
+
var article = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1020
|
+
var prevUrl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '/';
|
|
1021
|
+
var articleCount = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
1022
|
+
|
|
1023
|
+
var _article$url, url, content_placement, documentGroupMapping, issueGroup, params, conditions, taxonomy, documentGroup, cookies, prevSlugs, relatedContents, relatedContentQuery;
|
|
1024
|
+
|
|
1025
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
1026
|
+
while (1) {
|
|
1027
|
+
switch (_context.prev = _context.next) {
|
|
1028
|
+
case 0:
|
|
1029
|
+
_article$url = article.url;
|
|
1030
|
+
_article$url = _article$url === undefined ? {
|
|
1031
|
+
current: null
|
|
1032
|
+
} : _article$url;
|
|
1033
|
+
url = _article$url.current, content_placement = article.content_placement, documentGroupMapping = article.documentGroupMapping, issueGroup = article.issueGroup;
|
|
1034
|
+
params = {
|
|
1035
|
+
url: url,
|
|
1036
|
+
index: articleCount
|
|
1037
|
+
};
|
|
1038
|
+
conditions = '';
|
|
1039
|
+
|
|
1040
|
+
//404 articles were throwing server error
|
|
1041
|
+
|
|
1042
|
+
if (content_placement && content_placement.length > 0) {
|
|
1043
|
+
taxonomy = [];
|
|
1044
|
+
|
|
1045
|
+
content_placement.forEach(function (_ref2) {
|
|
1046
|
+
var path = _ref2.path,
|
|
1047
|
+
_id = _ref2._id;
|
|
1048
|
+
|
|
1049
|
+
if (!_id || typeof _id == 'undefined') {
|
|
1050
|
+
return null;
|
|
1051
|
+
}
|
|
1052
|
+
var prev_url_to_check = prevUrl;
|
|
1053
|
+
if (prev_url_to_check.includes('?')) {
|
|
1054
|
+
prev_url_to_check = prev_url_to_check.split('?')[0];
|
|
1055
|
+
}
|
|
1056
|
+
if (prev_url_to_check.endsWith(path) && _id) taxonomy.push(_id);
|
|
1057
|
+
});
|
|
1058
|
+
if (taxonomy.length === 0) content_placement.filter(function (_ref3) {
|
|
1059
|
+
var identifier = _ref3.identifier;
|
|
1060
|
+
return identifier !== 'news';
|
|
1061
|
+
}).forEach(function (_ref4) {
|
|
1062
|
+
var _id = _ref4._id;
|
|
1063
|
+
|
|
1064
|
+
if (_id) taxonomy.push(_id);
|
|
1065
|
+
});
|
|
1066
|
+
params = _extends({}, params, { taxonomy: taxonomy });
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
1070
|
+
documentGroup = [];
|
|
1071
|
+
|
|
1072
|
+
documentGroupMapping.forEach(function (_ref5) {
|
|
1073
|
+
var _id = _ref5._id;
|
|
1074
|
+
|
|
1075
|
+
if (_id) documentGroup.push(_id);
|
|
1076
|
+
});
|
|
1077
|
+
params = _extends({}, params, { documentGroup: documentGroup });
|
|
1078
|
+
conditions = conditions.concat('&& documentGroupMapping[]._ref in $documentGroup ');
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
if (issueGroup) {
|
|
1082
|
+
params = _extends({}, params, { issueAssociation: issueGroup._ref });
|
|
1083
|
+
conditions = conditions.concat('&& issueGroup._ref == $issueAssociation ');
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
if (ctx && url) {
|
|
1087
|
+
cookies = dist_3(ctx);
|
|
1088
|
+
prevSlugs = cookies['prevSlugs'];
|
|
1089
|
+
|
|
1090
|
+
if (!!prevSlugs) {
|
|
1091
|
+
dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
|
|
1092
|
+
conditions = '&& !(url.current in [' + prevSlugs + '])';
|
|
1093
|
+
} else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
relatedContents = [];
|
|
1097
|
+
|
|
1098
|
+
if (!(params.taxonomy && params.taxonomy.length > 0)) {
|
|
1099
|
+
_context.next = 15;
|
|
1100
|
+
break;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
relatedContentQuery = getQuery('related', conditions, '', articleCount);
|
|
1104
|
+
_context.next = 14;
|
|
1105
|
+
return client.fetch(relatedContentQuery, params);
|
|
1106
|
+
|
|
1107
|
+
case 14:
|
|
1108
|
+
relatedContents = _context.sent;
|
|
1109
|
+
|
|
1110
|
+
case 15:
|
|
1111
|
+
return _context.abrupt('return', relatedContents);
|
|
1112
|
+
|
|
1113
|
+
case 16:
|
|
1114
|
+
case 'end':
|
|
1115
|
+
return _context.stop();
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
}, _callee, _this);
|
|
1119
|
+
}));
|
|
1120
|
+
|
|
1121
|
+
return function getRelatedContents() {
|
|
1122
|
+
return _ref.apply(this, arguments);
|
|
1123
|
+
};
|
|
1124
|
+
}();
|
|
1125
|
+
|
|
1126
|
+
var _this$1 = undefined;
|
|
1127
|
+
|
|
981
1128
|
var ArticleQueue = function ArticleQueue(props) {
|
|
982
1129
|
var _props$prevUrl = props.prevUrl,
|
|
983
1130
|
prevUrl = _props$prevUrl === undefined ? '/' : _props$prevUrl,
|
|
@@ -1011,7 +1158,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1011
1158
|
});
|
|
1012
1159
|
var targeting = getTargeting({ article: activeArticle, cpModificationRequired: cpModificationRequired, position: props.position, prevUrl: prevUrl });
|
|
1013
1160
|
|
|
1014
|
-
if (!
|
|
1161
|
+
if (!main_36) {
|
|
1015
1162
|
lib_3.getGoogletag().then(function (googletag) {
|
|
1016
1163
|
if (window.googletag && googletag.pubadsReady) {
|
|
1017
1164
|
var slots = googletag.pubads().getSlots();
|
|
@@ -1029,7 +1176,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1029
1176
|
});
|
|
1030
1177
|
}
|
|
1031
1178
|
//Refresh leaderboard ad on mobile
|
|
1032
|
-
if (
|
|
1179
|
+
if (main_36) {
|
|
1033
1180
|
var leaderboardSlotId = '';
|
|
1034
1181
|
lib_3.getGoogletag().then(function (googletag) {
|
|
1035
1182
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -1103,7 +1250,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1103
1250
|
switch (_context.prev = _context.next) {
|
|
1104
1251
|
case 0:
|
|
1105
1252
|
if (!(article && article._id)) {
|
|
1106
|
-
_context.next =
|
|
1253
|
+
_context.next = 12;
|
|
1107
1254
|
break;
|
|
1108
1255
|
}
|
|
1109
1256
|
|
|
@@ -1115,17 +1262,22 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1115
1262
|
|
|
1116
1263
|
case 5:
|
|
1117
1264
|
article.relatedArticle = _context.sent;
|
|
1265
|
+
_context.next = 8;
|
|
1266
|
+
return getRelatedContents(null, props.client, article, prevUrl, startingIndex + '..' + endingIndex);
|
|
1267
|
+
|
|
1268
|
+
case 8:
|
|
1269
|
+
article.relatedContents = _context.sent;
|
|
1118
1270
|
targeting = getTargeting({ article: article, cpModificationRequired: cpModificationRequired, prevUrl: prevUrl });
|
|
1119
1271
|
|
|
1120
1272
|
article.Ads = Ads.getRightItems(targeting);
|
|
1121
1273
|
setQueueData([].concat(_toConsumableArray(queueData), [article]));
|
|
1122
1274
|
|
|
1123
|
-
case
|
|
1275
|
+
case 12:
|
|
1124
1276
|
case 'end':
|
|
1125
1277
|
return _context.stop();
|
|
1126
1278
|
}
|
|
1127
1279
|
}
|
|
1128
|
-
}, _callee, _this);
|
|
1280
|
+
}, _callee, _this$1);
|
|
1129
1281
|
}));
|
|
1130
1282
|
|
|
1131
1283
|
return function (_x) {
|
|
@@ -1273,7 +1425,7 @@ var Articles = function Articles(props) {
|
|
|
1273
1425
|
}, _defineProperty(_extends2, 'pageview', pageview), _defineProperty(_extends2, 'onVote', function onVote() {}), _defineProperty(_extends2, 'ISIContent', ISIContent), _defineProperty(_extends2, 'videoAccountIDs', videoAccountIDs), _defineProperty(_extends2, 'sponsoredTaxonomies', []), _defineProperty(_extends2, 'cpModificationRequired', cpModificationRequired), _defineProperty(_extends2, 'Settings', Settings), _defineProperty(_extends2, 'canonicalTag', canonicalTag), _extends2), props));
|
|
1274
1426
|
};
|
|
1275
1427
|
|
|
1276
|
-
var _this$
|
|
1428
|
+
var _this$2 = undefined;
|
|
1277
1429
|
|
|
1278
1430
|
var View = function View(props) {
|
|
1279
1431
|
var router = useRouter();
|
|
@@ -1481,12 +1633,12 @@ View.returnGetInitialProps = function () {
|
|
|
1481
1633
|
}
|
|
1482
1634
|
|
|
1483
1635
|
article.relatedArticle = null;
|
|
1484
|
-
_context.next =
|
|
1636
|
+
_context.next = 21;
|
|
1485
1637
|
break;
|
|
1486
1638
|
|
|
1487
1639
|
case 14:
|
|
1488
1640
|
if (!article) {
|
|
1489
|
-
_context.next =
|
|
1641
|
+
_context.next = 21;
|
|
1490
1642
|
break;
|
|
1491
1643
|
}
|
|
1492
1644
|
|
|
@@ -1495,8 +1647,13 @@ View.returnGetInitialProps = function () {
|
|
|
1495
1647
|
|
|
1496
1648
|
case 17:
|
|
1497
1649
|
article.relatedArticle = _context.sent;
|
|
1650
|
+
_context.next = 20;
|
|
1651
|
+
return getRelatedContents(context, client, article, prevUrl, '0..2');
|
|
1652
|
+
|
|
1653
|
+
case 20:
|
|
1654
|
+
article.relatedContents = _context.sent;
|
|
1498
1655
|
|
|
1499
|
-
case
|
|
1656
|
+
case 21:
|
|
1500
1657
|
return _context.abrupt('return', {
|
|
1501
1658
|
url: url,
|
|
1502
1659
|
sao: sao,
|
|
@@ -1507,12 +1664,12 @@ View.returnGetInitialProps = function () {
|
|
|
1507
1664
|
sponsoredFlag: sponsoredFlag
|
|
1508
1665
|
});
|
|
1509
1666
|
|
|
1510
|
-
case
|
|
1667
|
+
case 22:
|
|
1511
1668
|
case 'end':
|
|
1512
1669
|
return _context.stop();
|
|
1513
1670
|
}
|
|
1514
1671
|
}
|
|
1515
|
-
}, _callee, _this$
|
|
1672
|
+
}, _callee, _this$2);
|
|
1516
1673
|
}));
|
|
1517
1674
|
|
|
1518
1675
|
return function (_x, _x2, _x3, _x4, _x5) {
|
package/dist/esm/YahooHero.js
CHANGED
|
@@ -5,9 +5,9 @@ import './core.get-iterator-method-54d2e411.js';
|
|
|
5
5
|
import './web.dom.iterable-8956f9a5.js';
|
|
6
6
|
import React__default from 'react';
|
|
7
7
|
import 'prop-types';
|
|
8
|
-
import { m as moment } from './moment-
|
|
8
|
+
import { m as moment } from './moment-e2f9b20c.js';
|
|
9
9
|
import 'react-dom';
|
|
10
|
-
import { i as imageUrlBuilder } from './index-
|
|
10
|
+
import { i as imageUrlBuilder } from './index-73819142.js';
|
|
11
11
|
import { L as LazyLoad } from './index-5f9f807a.js';
|
|
12
12
|
import { c as clean_html_1 } from './entities-7cc3bf45.js';
|
|
13
13
|
import './slicedToArray-7021e5df.js';
|
package/dist/esm/YoutubeGroup.js
CHANGED
|
@@ -10,7 +10,7 @@ import './_is-array-49698029.js';
|
|
|
10
10
|
import React__default, { useRef, useState, useEffect } from 'react';
|
|
11
11
|
import 'prop-types';
|
|
12
12
|
import 'react-dom';
|
|
13
|
-
import { i as imageUrlBuilder } from './index-
|
|
13
|
+
import { i as imageUrlBuilder } from './index-73819142.js';
|
|
14
14
|
import { L as LazyLoad } from './index-5f9f807a.js';
|
|
15
15
|
import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
|
|
16
16
|
import { s as smoothscroll, g as getYoutubeId } from './smoothscroll-4b699764.js';
|
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 && published <= 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 },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
|
|
11
|
+
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && published <= 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 },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\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 },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
|
|
12
12
|
case 'article':
|
|
13
|
-
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\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 },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n name,\n thumbnail,\n parent->{...,parent->},\n
|
|
13
|
+
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\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 },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
|
|
14
14
|
case 'publication':
|
|
15
15
|
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n pdf{asset->}\n } | order(year desc, month desc)\n }';
|
|
16
16
|
case 'issue':
|