@mjhls/mjh-framework 1.0.670 → 1.0.671-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 +3 -3
- 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 +2 -2
- 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 +286 -113
- 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.js +354 -5
- 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-94d2f1de.js → index-2dddb8be.js} +450 -462
- package/dist/cjs/{index-5be2866f.js → index-3294d3bc.js} +1 -1
- 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 +3 -3
- 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 +2 -2
- 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 +260 -87
- 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.js +354 -5
- package/dist/esm/getSerializers.js +6 -6
- package/dist/esm/{index-93ec3c59.js → index-0e45a0b2.js} +27 -34
- package/dist/esm/{index-1fa94c3a.js → index-2141b8ab.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-9735aff2.js → ADInfeed-388ec28a.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-6bd11848.js → ADlgInfeed-5548ff47.js} +0 -0
- /package/dist/esm/{ADInfeed-9140aa7d.js → ADInfeed-eae0af19.js} +0 -0
- /package/dist/esm/{ADlgInfeed-7656ecd1.js → ADlgInfeed-2f4c7a7c.js} +0 -0
package/dist/esm/View.js
CHANGED
|
@@ -13,20 +13,20 @@ import './define-property-de3fc946.js';
|
|
|
13
13
|
import './web.dom.iterable-8956f9a5.js';
|
|
14
14
|
import { _ as _typeof } from './typeof-08f2c380.js';
|
|
15
15
|
import './_is-array-49698029.js';
|
|
16
|
-
import React__default, { useState, useEffect } from 'react';
|
|
17
|
-
import { l as lib_3 } from './index-
|
|
16
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
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,7 +34,7 @@ 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';
|
|
@@ -42,7 +42,7 @@ import './iconBase-602d52fe.js';
|
|
|
42
42
|
import Button from 'react-bootstrap/Button';
|
|
43
43
|
import { _ as _defineProperty } from './defineProperty-b798470d.js';
|
|
44
44
|
import Form from 'react-bootstrap/Form';
|
|
45
|
-
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-
|
|
45
|
+
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-2141b8ab.js';
|
|
46
46
|
import './util-7700fc59.js';
|
|
47
47
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
48
48
|
import 'react-bootstrap/Pagination';
|
|
@@ -54,9 +54,9 @@ import { _ as _Object$keys } from './keys-fc2d4c34.js';
|
|
|
54
54
|
import 'react-bootstrap/Dropdown';
|
|
55
55
|
import { b as FaMinus, c as FaPlus } from './index.esm-cf08bf18.js';
|
|
56
56
|
import getSeriesDetail from './getSeriesDetail.js';
|
|
57
|
-
import '
|
|
58
|
-
import getQuery from './getQuery.js';
|
|
57
|
+
import './index-db3bb315.js';
|
|
59
58
|
import getRelatedArticle from './getRelatedArticle.js';
|
|
59
|
+
import getQuery from './getQuery.js';
|
|
60
60
|
import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-2acdec91.js';
|
|
61
61
|
import getKeywords from './getKeywords.js';
|
|
62
62
|
import urlFor from './urlFor.js';
|
|
@@ -137,9 +137,9 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
137
137
|
style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
|
|
138
138
|
thumbnailUrl && React__default.createElement('img', { style: { maxWidth: '220px', maxHeight: '100px', marginTop: '1rem' }, src: thumbnailUrl, alt: name }),
|
|
139
139
|
!thumbnailUrl && React__default.createElement('p', {
|
|
140
|
-
style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' :
|
|
140
|
+
style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main_36 ? 'left' : 'right', marginTop: '.25rem' },
|
|
141
141
|
dangerouslySetInnerHTML: { __html: name } }),
|
|
142
|
-
|
|
142
|
+
main_36 && !thumbnailUrl && React__default.createElement(
|
|
143
143
|
'style',
|
|
144
144
|
{ jsx: 'true' },
|
|
145
145
|
'\n a.doc-group {\n display: block !important;\n padding: 0!important;\n }\n '
|
|
@@ -192,12 +192,27 @@ var ISI = function ISI(props) {
|
|
|
192
192
|
active = _useState2[0],
|
|
193
193
|
setActive = _useState2[1];
|
|
194
194
|
|
|
195
|
+
var isi = useRef();
|
|
196
|
+
useEffect(function () {
|
|
197
|
+
if (active) {
|
|
198
|
+
var offset = '5rem';
|
|
199
|
+
var nav = document.getElementsByTagName('header');
|
|
200
|
+
if (nav && nav.length > 0) {
|
|
201
|
+
offset = nav[0].offsetHeight + 'px';
|
|
202
|
+
}
|
|
203
|
+
isi.current.style.maxHeight = 'calc(100% - ' + offset + ')';
|
|
204
|
+
isi.current.style.overflowY = 'scroll';
|
|
205
|
+
} else {
|
|
206
|
+
isi.current.style.maxHeight = '';
|
|
207
|
+
isi.current.style.overflowY = '';
|
|
208
|
+
}
|
|
209
|
+
}, [active]);
|
|
195
210
|
return React__default.createElement(
|
|
196
211
|
React__default.Fragment,
|
|
197
212
|
null,
|
|
198
213
|
React__default.createElement(
|
|
199
214
|
'div',
|
|
200
|
-
{ id: 'isi',
|
|
215
|
+
{ id: 'isi', ref: isi },
|
|
201
216
|
React__default.createElement(
|
|
202
217
|
'div',
|
|
203
218
|
{ id: 'isiContent' },
|
|
@@ -226,12 +241,12 @@ var ISI = function ISI(props) {
|
|
|
226
241
|
React__default.createElement(
|
|
227
242
|
'style',
|
|
228
243
|
{ jsx: true },
|
|
229
|
-
'\n #isi {\n position: fixed;\n z-index:
|
|
244
|
+
'\n #isi {\n position: fixed;\n z-index: 99999;\n bottom: 0;\n left: 0;\n max-height: 10rem;\n background-color: #ffffff;\n overflow-x: hidden;\n overflow-y: hidden;\n transition: max-height 0.2s;\n width: 100%;\n box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.5);\n }\n #isiContent {\n width: 100%;\n max-width: 1000px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n padding: 1rem;\n font-size: 1rem;\n }\n #isi::-webkit-scrollbar {\n display: none;\n }\n #isiToggle {\n position: absolute;\n top: 0;\n right: 0;\n padding: 1rem;\n font-weight: bold;\n cursor: pointer;\n font-size: 1rem;\n }\n #isiToggle p {\n margin: 0;\n }\n '
|
|
230
245
|
)
|
|
231
246
|
);
|
|
232
247
|
};
|
|
233
248
|
|
|
234
|
-
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
|
|
249
|
+
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 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 background-color: #cccccc;\r\n margin-bottom: 0.5rem;\r\n padding: 0.5rem;\r\n border-radius: 0.25rem;\r\n }\r\n .RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: none;\r\n }\r\n}\r\n";
|
|
235
250
|
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" };
|
|
236
251
|
styleInject(css);
|
|
237
252
|
|
|
@@ -454,10 +469,56 @@ var Article = function Article(props) {
|
|
|
454
469
|
};
|
|
455
470
|
|
|
456
471
|
var RelevantTopics = function RelevantTopics() {
|
|
457
|
-
if (content_placement && content_placement.length > 0 || documentGroupMapping) {
|
|
472
|
+
if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
|
|
473
|
+
var relatedLinks = [];
|
|
474
|
+
if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
475
|
+
documentGroupMapping.forEach(function (documentGroup) {
|
|
476
|
+
if (documentGroup.parent) {
|
|
477
|
+
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path }]);
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
if (content_placement && content_placement.length > 0) {
|
|
482
|
+
content_placement.filter(function (item) {
|
|
483
|
+
return item.path !== 'news';
|
|
484
|
+
}).forEach(function (cp) {
|
|
485
|
+
var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path;
|
|
486
|
+
var href = '/' + cp_url;
|
|
487
|
+
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
if (relatedLinks && relatedLinks.length > 0) {
|
|
491
|
+
return React__default.createElement(
|
|
492
|
+
'div',
|
|
493
|
+
null,
|
|
494
|
+
relatedLinks.map(function (relatedLink, index) {
|
|
495
|
+
return React__default.createElement(
|
|
496
|
+
'span',
|
|
497
|
+
{ key: index, className: 'related-link' },
|
|
498
|
+
React__default.createElement(
|
|
499
|
+
'a',
|
|
500
|
+
{ className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
|
|
501
|
+
relatedLink.label
|
|
502
|
+
),
|
|
503
|
+
React__default.createElement(
|
|
504
|
+
'style',
|
|
505
|
+
{ jsx: 'true' },
|
|
506
|
+
'\n .related-link:not(:first-child):before {\n content: \' | \';\n }\n '
|
|
507
|
+
)
|
|
508
|
+
);
|
|
509
|
+
})
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
return null;
|
|
513
|
+
}
|
|
514
|
+
return null;
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
var renderRelatedSection = function renderRelatedSection() {
|
|
518
|
+
if (showRelatedArticles) {
|
|
458
519
|
return React__default.createElement(
|
|
459
|
-
'
|
|
460
|
-
{
|
|
520
|
+
'section',
|
|
521
|
+
{ className: 'related-contents-section' },
|
|
461
522
|
React__default.createElement(
|
|
462
523
|
'p',
|
|
463
524
|
{ className: 'mb-0' },
|
|
@@ -467,47 +528,21 @@ var Article = function Article(props) {
|
|
|
467
528
|
'Related Content:'
|
|
468
529
|
)
|
|
469
530
|
),
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
style: { color: 'blue' },
|
|
486
|
-
href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path },
|
|
487
|
-
documentGroup.name
|
|
488
|
-
)
|
|
489
|
-
),
|
|
490
|
-
content_placement && content_placement.length ? ' | ' : null
|
|
491
|
-
);
|
|
492
|
-
}),
|
|
493
|
-
content_placement && content_placement.length > 0 ? content_placement.map(function (cp, index) {
|
|
494
|
-
var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path;
|
|
495
|
-
var href = '/' + cp_url;
|
|
496
|
-
return React__default.createElement(
|
|
497
|
-
React__default.Fragment,
|
|
498
|
-
{ key: index },
|
|
499
|
-
React__default.createElement(
|
|
500
|
-
'span',
|
|
501
|
-
null,
|
|
502
|
-
React__default.createElement(
|
|
503
|
-
'a',
|
|
504
|
-
{ className: 'related-links', key: index, href: href, style: { color: 'blue' } },
|
|
505
|
-
cp.name
|
|
506
|
-
)
|
|
507
|
-
),
|
|
508
|
-
content_placement.length > index + 1 ? ' | ' : null
|
|
509
|
-
);
|
|
510
|
-
}) : null
|
|
531
|
+
React__default.createElement(
|
|
532
|
+
'div',
|
|
533
|
+
null,
|
|
534
|
+
React__default.createElement(RelevantTopics, null)
|
|
535
|
+
),
|
|
536
|
+
React__default.createElement(
|
|
537
|
+
'div',
|
|
538
|
+
{ className: 'pt-2' },
|
|
539
|
+
React__default.createElement(RelatedArticle, { articles: article.relatedContents, client: client })
|
|
540
|
+
),
|
|
541
|
+
React__default.createElement(
|
|
542
|
+
'style',
|
|
543
|
+
{ jsx: 'true' },
|
|
544
|
+
'\n .related-contents-section {\n padding: 0.5rem;\n background-color: #e6e6e6;\n border-radius: 0.25rem;\n }\n '
|
|
545
|
+
)
|
|
511
546
|
);
|
|
512
547
|
}
|
|
513
548
|
return null;
|
|
@@ -616,6 +651,7 @@ var Article = function Article(props) {
|
|
|
616
651
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
617
652
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
|
|
618
653
|
),
|
|
654
|
+
renderRelatedSection(),
|
|
619
655
|
React__default.createElement(BlockContent, _extends({
|
|
620
656
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
621
657
|
blocks: [].concat(_toConsumableArray(articleBody.slice(selectedIndex))),
|
|
@@ -683,6 +719,7 @@ var Article = function Article(props) {
|
|
|
683
719
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound }))
|
|
684
720
|
),
|
|
685
721
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
722
|
+
renderRelatedSection(),
|
|
686
723
|
React__default.createElement(BlockContent, _extends({
|
|
687
724
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
688
725
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex))),
|
|
@@ -725,12 +762,31 @@ var Article = function Article(props) {
|
|
|
725
762
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
726
763
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
|
|
727
764
|
),
|
|
765
|
+
renderRelatedSection(),
|
|
728
766
|
React__default.createElement(BlockContent, _extends({
|
|
729
767
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
730
768
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex2))),
|
|
731
769
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
732
770
|
}, client.config()))
|
|
733
771
|
);
|
|
772
|
+
} else if (indexes.length >= 2 && body.length > 3 && showRelatedArticles) {
|
|
773
|
+
var _selectedIndex3 = indexes[1] + 1;
|
|
774
|
+
return React__default.createElement(
|
|
775
|
+
React__default.Fragment,
|
|
776
|
+
null,
|
|
777
|
+
React__default.createElement(BlockContent, _extends({
|
|
778
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
779
|
+
blocks: [].concat(_toConsumableArray(articleBody.slice(0, _selectedIndex3))),
|
|
780
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
781
|
+
}, client.config())),
|
|
782
|
+
React__default.createElement('span', { className: 'clearfix' }),
|
|
783
|
+
renderRelatedSection(),
|
|
784
|
+
React__default.createElement(BlockContent, _extends({
|
|
785
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
786
|
+
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex3))),
|
|
787
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
788
|
+
}, client.config()))
|
|
789
|
+
);
|
|
734
790
|
} else {
|
|
735
791
|
return React__default.createElement(BlockContent, _extends({
|
|
736
792
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, false, null, props.article.Ads, targeting),
|
|
@@ -918,7 +974,7 @@ var Article = function Article(props) {
|
|
|
918
974
|
React__default.createElement(
|
|
919
975
|
'div',
|
|
920
976
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
921
|
-
|
|
977
|
+
main_36 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
|
|
922
978
|
if (index === 0) {
|
|
923
979
|
return React__default.createElement(
|
|
924
980
|
'div',
|
|
@@ -970,21 +1026,7 @@ var Article = function Article(props) {
|
|
|
970
1026
|
issue.name
|
|
971
1027
|
)
|
|
972
1028
|
),
|
|
973
|
-
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } })
|
|
974
|
-
showRelatedArticles && !showIsi && React__default.createElement(
|
|
975
|
-
React__default.Fragment,
|
|
976
|
-
null,
|
|
977
|
-
React__default.createElement(
|
|
978
|
-
'div',
|
|
979
|
-
null,
|
|
980
|
-
React__default.createElement(RelevantTopics, null)
|
|
981
|
-
),
|
|
982
|
-
React__default.createElement(
|
|
983
|
-
'div',
|
|
984
|
-
{ className: 'pt-2' },
|
|
985
|
-
React__default.createElement(RelatedArticle, { articles: article.relatedArticle, client: client })
|
|
986
|
-
)
|
|
987
|
-
)
|
|
1029
|
+
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } })
|
|
988
1030
|
),
|
|
989
1031
|
renderIsiContent(props.article)
|
|
990
1032
|
),
|
|
@@ -997,7 +1039,7 @@ var Article = function Article(props) {
|
|
|
997
1039
|
})
|
|
998
1040
|
)
|
|
999
1041
|
),
|
|
1000
|
-
|
|
1042
|
+
main_36 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
|
|
1001
1043
|
if (index > 0) {
|
|
1002
1044
|
return React__default.createElement(
|
|
1003
1045
|
'div',
|
|
@@ -1037,6 +1079,127 @@ var Article = function Article(props) {
|
|
|
1037
1079
|
|
|
1038
1080
|
var _this = undefined;
|
|
1039
1081
|
|
|
1082
|
+
var getRelatedContents = function () {
|
|
1083
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
|
|
1084
|
+
var client = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1085
|
+
var article = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1086
|
+
var prevUrl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '/';
|
|
1087
|
+
var articleCount = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
1088
|
+
|
|
1089
|
+
var _article$url, url, content_placement, documentGroupMapping, issueGroup, params, conditions, taxonomy, documentGroup, relatedContents, relatedContentQuery;
|
|
1090
|
+
|
|
1091
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
1092
|
+
while (1) {
|
|
1093
|
+
switch (_context.prev = _context.next) {
|
|
1094
|
+
case 0:
|
|
1095
|
+
_article$url = article.url;
|
|
1096
|
+
_article$url = _article$url === undefined ? {
|
|
1097
|
+
current: null
|
|
1098
|
+
} : _article$url;
|
|
1099
|
+
url = _article$url.current, content_placement = article.content_placement, documentGroupMapping = article.documentGroupMapping, issueGroup = article.issueGroup;
|
|
1100
|
+
params = { url: url };
|
|
1101
|
+
conditions = '';
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
if (content_placement && content_placement.length > 0) {
|
|
1105
|
+
taxonomy = [];
|
|
1106
|
+
|
|
1107
|
+
content_placement.forEach(function (_ref2) {
|
|
1108
|
+
var path = _ref2.path,
|
|
1109
|
+
_id = _ref2._id;
|
|
1110
|
+
|
|
1111
|
+
if (!_id || typeof _id == 'undefined') {
|
|
1112
|
+
return null;
|
|
1113
|
+
}
|
|
1114
|
+
var prev_url_to_check = prevUrl;
|
|
1115
|
+
if (prev_url_to_check.includes('?')) {
|
|
1116
|
+
prev_url_to_check = prev_url_to_check.split('?')[0];
|
|
1117
|
+
}
|
|
1118
|
+
if (prev_url_to_check.endsWith(path) && _id) taxonomy.push(_id);
|
|
1119
|
+
});
|
|
1120
|
+
if (taxonomy.length === 0) {
|
|
1121
|
+
content_placement.filter(function (_ref3) {
|
|
1122
|
+
var identifier = _ref3.identifier;
|
|
1123
|
+
return identifier !== 'news';
|
|
1124
|
+
}).forEach(function (_ref4) {
|
|
1125
|
+
var _id = _ref4._id;
|
|
1126
|
+
|
|
1127
|
+
if (_id) taxonomy.push(_id);
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
if (taxonomy.length > 0) {
|
|
1131
|
+
params = _extends({}, params, { taxonomy: taxonomy });
|
|
1132
|
+
conditions = '&& taxonomyMapping[]._ref in $taxonomy';
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
1137
|
+
documentGroup = [];
|
|
1138
|
+
|
|
1139
|
+
documentGroupMapping.forEach(function (_ref5) {
|
|
1140
|
+
var _id = _ref5._id;
|
|
1141
|
+
|
|
1142
|
+
if (_id) documentGroup.push(_id);
|
|
1143
|
+
});
|
|
1144
|
+
if (params.taxonomy && documentGroup.length > 0) {
|
|
1145
|
+
params = _extends({}, params, { documentGroup: documentGroup });
|
|
1146
|
+
conditions = '&& (taxonomyMapping[]._ref in $taxonomy || documentGroupMapping[]._ref in $documentGroup)';
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
if (issueGroup && issueGroup._ref) {
|
|
1151
|
+
if (params.taxonomy && params.documentGroup) {
|
|
1152
|
+
params = _extends({}, params, { issueAssociation: issueGroup._ref });
|
|
1153
|
+
conditions = '&& (taxonomyMapping[]._ref in $taxonomy || documentGroupMapping[]._ref in $documentGroup || issueGroup._ref == $issueAssociation )';
|
|
1154
|
+
} else if (params.taxonomy) {
|
|
1155
|
+
params = _extends({}, params, { issueAssociation: issueGroup._ref });
|
|
1156
|
+
conditions = '&& (taxonomyMapping[]._ref in $taxonomy || issueGroup._ref == $issueAssociation )';
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
relatedContents = [];
|
|
1161
|
+
|
|
1162
|
+
if (!(params.taxonomy && params.taxonomy.length > 0)) {
|
|
1163
|
+
_context.next = 21;
|
|
1164
|
+
break;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
relatedContentQuery = '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && passwordLock != true\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory.name != \'Poll\'\n && contentCategory.name != \'Slideshows\'\n \t&& contentCategory.disableAds != \'true\'\n && ExcludeFromInfiniteScroll != true\n && url.current != $url\n && !defined(body[].videos)\n && published <= \'' + new Date().toISOString() + '\'\n ' + conditions + '\n ]| order(published desc)[' + articleCount + ']\n {\n title,\n url,\n thumbnail\n }';
|
|
1168
|
+
_context.prev = 11;
|
|
1169
|
+
_context.next = 14;
|
|
1170
|
+
return client.fetch(relatedContentQuery, params);
|
|
1171
|
+
|
|
1172
|
+
case 14:
|
|
1173
|
+
relatedContents = _context.sent;
|
|
1174
|
+
|
|
1175
|
+
debugger;
|
|
1176
|
+
_context.next = 21;
|
|
1177
|
+
break;
|
|
1178
|
+
|
|
1179
|
+
case 18:
|
|
1180
|
+
_context.prev = 18;
|
|
1181
|
+
_context.t0 = _context['catch'](11);
|
|
1182
|
+
|
|
1183
|
+
console.error(_context.t0);
|
|
1184
|
+
|
|
1185
|
+
case 21:
|
|
1186
|
+
return _context.abrupt('return', relatedContents);
|
|
1187
|
+
|
|
1188
|
+
case 22:
|
|
1189
|
+
case 'end':
|
|
1190
|
+
return _context.stop();
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}, _callee, _this, [[11, 18]]);
|
|
1194
|
+
}));
|
|
1195
|
+
|
|
1196
|
+
return function getRelatedContents() {
|
|
1197
|
+
return _ref.apply(this, arguments);
|
|
1198
|
+
};
|
|
1199
|
+
}();
|
|
1200
|
+
|
|
1201
|
+
var _this$1 = undefined;
|
|
1202
|
+
|
|
1040
1203
|
var ArticleQueue = function ArticleQueue(props) {
|
|
1041
1204
|
var _props$prevUrl = props.prevUrl,
|
|
1042
1205
|
prevUrl = _props$prevUrl === undefined ? '/' : _props$prevUrl,
|
|
@@ -1070,7 +1233,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1070
1233
|
});
|
|
1071
1234
|
var targeting = getTargeting({ article: activeArticle, cpModificationRequired: cpModificationRequired, position: props.position, prevUrl: prevUrl });
|
|
1072
1235
|
|
|
1073
|
-
if (!
|
|
1236
|
+
if (!main_36) {
|
|
1074
1237
|
lib_3.getGoogletag().then(function (googletag) {
|
|
1075
1238
|
if (window.googletag && googletag.pubadsReady) {
|
|
1076
1239
|
var slots = googletag.pubads().getSlots();
|
|
@@ -1088,7 +1251,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1088
1251
|
});
|
|
1089
1252
|
}
|
|
1090
1253
|
//Refresh leaderboard ad on mobile
|
|
1091
|
-
if (
|
|
1254
|
+
if (main_36) {
|
|
1092
1255
|
var leaderboardSlotId = '';
|
|
1093
1256
|
lib_3.getGoogletag().then(function (googletag) {
|
|
1094
1257
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -1162,7 +1325,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1162
1325
|
switch (_context.prev = _context.next) {
|
|
1163
1326
|
case 0:
|
|
1164
1327
|
if (!(article && article._id)) {
|
|
1165
|
-
_context.next =
|
|
1328
|
+
_context.next = 12;
|
|
1166
1329
|
break;
|
|
1167
1330
|
}
|
|
1168
1331
|
|
|
@@ -1174,17 +1337,22 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1174
1337
|
|
|
1175
1338
|
case 5:
|
|
1176
1339
|
article.relatedArticle = _context.sent;
|
|
1340
|
+
_context.next = 8;
|
|
1341
|
+
return getRelatedContents(null, props.client, article, prevUrl, startingIndex + '..' + endingIndex);
|
|
1342
|
+
|
|
1343
|
+
case 8:
|
|
1344
|
+
article.relatedContents = _context.sent;
|
|
1177
1345
|
targeting = getTargeting({ article: article, cpModificationRequired: cpModificationRequired, prevUrl: prevUrl });
|
|
1178
1346
|
|
|
1179
1347
|
article.Ads = Ads.getRightItems(targeting);
|
|
1180
1348
|
setQueueData([].concat(_toConsumableArray(queueData), [article]));
|
|
1181
1349
|
|
|
1182
|
-
case
|
|
1350
|
+
case 12:
|
|
1183
1351
|
case 'end':
|
|
1184
1352
|
return _context.stop();
|
|
1185
1353
|
}
|
|
1186
1354
|
}
|
|
1187
|
-
}, _callee, _this);
|
|
1355
|
+
}, _callee, _this$1);
|
|
1188
1356
|
}));
|
|
1189
1357
|
|
|
1190
1358
|
return function (_x) {
|
|
@@ -1332,7 +1500,7 @@ var Articles = function Articles(props) {
|
|
|
1332
1500
|
}, _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));
|
|
1333
1501
|
};
|
|
1334
1502
|
|
|
1335
|
-
var _this$
|
|
1503
|
+
var _this$2 = undefined;
|
|
1336
1504
|
|
|
1337
1505
|
var View = function View(props) {
|
|
1338
1506
|
var router = useRouter();
|
|
@@ -1540,12 +1708,12 @@ View.returnGetInitialProps = function () {
|
|
|
1540
1708
|
}
|
|
1541
1709
|
|
|
1542
1710
|
article.relatedArticle = null;
|
|
1543
|
-
_context.next =
|
|
1711
|
+
_context.next = 21;
|
|
1544
1712
|
break;
|
|
1545
1713
|
|
|
1546
1714
|
case 14:
|
|
1547
1715
|
if (!article) {
|
|
1548
|
-
_context.next =
|
|
1716
|
+
_context.next = 21;
|
|
1549
1717
|
break;
|
|
1550
1718
|
}
|
|
1551
1719
|
|
|
@@ -1554,8 +1722,13 @@ View.returnGetInitialProps = function () {
|
|
|
1554
1722
|
|
|
1555
1723
|
case 17:
|
|
1556
1724
|
article.relatedArticle = _context.sent;
|
|
1725
|
+
_context.next = 20;
|
|
1726
|
+
return getRelatedContents(context, client, article, prevUrl, '0..2');
|
|
1557
1727
|
|
|
1558
|
-
case
|
|
1728
|
+
case 20:
|
|
1729
|
+
article.relatedContents = _context.sent;
|
|
1730
|
+
|
|
1731
|
+
case 21:
|
|
1559
1732
|
return _context.abrupt('return', {
|
|
1560
1733
|
url: url,
|
|
1561
1734
|
sao: sao,
|
|
@@ -1566,12 +1739,12 @@ View.returnGetInitialProps = function () {
|
|
|
1566
1739
|
sponsoredFlag: sponsoredFlag
|
|
1567
1740
|
});
|
|
1568
1741
|
|
|
1569
|
-
case
|
|
1742
|
+
case 22:
|
|
1570
1743
|
case 'end':
|
|
1571
1744
|
return _context.stop();
|
|
1572
1745
|
}
|
|
1573
1746
|
}
|
|
1574
|
-
}, _callee, _this$
|
|
1747
|
+
}, _callee, _this$2);
|
|
1575
1748
|
}));
|
|
1576
1749
|
|
|
1577
1750
|
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 _id,\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':
|