@mjhls/mjh-framework 1.0.684-beta.1 → 1.0.685
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 +1 -1
- package/dist/cjs/ArticleSeriesListing.js +4 -4
- package/dist/cjs/Auth.js +507 -256
- package/dist/cjs/{BlockContent-091a991f.js → BlockContent-88f69acd.js} +1 -1
- package/dist/cjs/BrowseVideosListing.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-f6a18ed2.js → Dfp-b2bc3b97.js} +1 -1
- package/dist/cjs/EventsDeck.js +4 -4
- 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 +7 -7
- 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 +15 -1212
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +21 -21
- package/dist/cjs/RecentNews.js +2 -2
- package/dist/cjs/RelatedContent.js +2 -2
- package/dist/cjs/{SocialSearchComponent-9cd24578.js → SocialSearchComponent-6b5e5b47.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 +137 -532
- 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 +5 -354
- package/dist/cjs/getSerializers.js +6 -6
- package/dist/cjs/{getTargeting-9af0ef69.js → getTargeting-fee8c429.js} +2 -2
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/{index-fa8ed292.js → index-2d0a4911.js} +34 -27
- package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
- package/dist/cjs/{index-c49c3b5e.js → index-8c9e8ca7.js} +462 -450
- package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
- package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
- package/dist/cjs/index.js +16 -15
- package/dist/cjs/{main-a4cb15bb.js → main-b6c96c8d.js} +67 -36
- package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
- package/dist/cjs/timeDifferenceCalc.js +3 -5
- 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 +499 -248
- package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-a614acdf.js} +1 -1
- package/dist/esm/BrowseVideosListing.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-96b49def.js → Dfp-8a8fca18.js} +1 -1
- package/dist/esm/EventsDeck.js +4 -4
- 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 +7 -7
- 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 +13 -1209
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +21 -21
- package/dist/esm/RecentNews.js +2 -2
- package/dist/esm/RelatedContent.js +2 -2
- package/dist/esm/{SocialSearchComponent-93233334.js → SocialSearchComponent-7f14e0f3.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 +117 -512
- 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 +5 -354
- package/dist/esm/getSerializers.js +6 -6
- package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
- package/dist/esm/{index-85783f24.js → index-5505d4f9.js} +462 -450
- package/dist/esm/{index-0e45a0b2.js → index-93ec3c59.js} +34 -27
- package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
- package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
- package/dist/esm/index.js +14 -13
- package/dist/esm/{main-5d1e4bd3.js → main-0465b2a0.js} +65 -34
- package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
- package/dist/esm/timeDifferenceCalc.js +3 -5
- package/dist/esm/urlFor.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-bd6c9f56.js +0 -211
- package/dist/esm/index-db3bb315.js +0 -207
- /package/dist/cjs/{ADInfeed-f27bc4b5.js → ADInfeed-c676389b.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-8decfd9e.js → ADlgInfeed-57d63c87.js} +0 -0
- /package/dist/esm/{ADInfeed-1e0ca5e0.js → ADInfeed-97b8cea7.js} +0 -0
- /package/dist/esm/{ADlgInfeed-979cf0d5.js → ADlgInfeed-3ab91c75.js} +0 -0
package/dist/esm/View.js
CHANGED
|
@@ -6,7 +6,7 @@ import './_iter-detect-59409a32.js';
|
|
|
6
6
|
import { _ as _toConsumableArray } from './toConsumableArray-725434a0.js';
|
|
7
7
|
import './core.get-iterator-method-54d2e411.js';
|
|
8
8
|
import './_object-pie-71ac75a4.js';
|
|
9
|
-
import {
|
|
9
|
+
import { _ as _extends, a as _Object$assign } from './extends-cc5da797.js';
|
|
10
10
|
import './_object-sap-4d59d5bd.js';
|
|
11
11
|
import './inherits-7ee3e0c1.js';
|
|
12
12
|
import './define-property-de3fc946.js';
|
|
@@ -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, useRef, useEffect } from 'react';
|
|
17
|
-
import { l as lib_3 } from './index-
|
|
17
|
+
import { l as lib_3 } from './index-93ec3c59.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-12415288.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-938a3a58.js';
|
|
26
26
|
import 'react-dom';
|
|
27
|
-
import './index-
|
|
27
|
+
import './index-51a80699.js';
|
|
28
28
|
import './index-5f9f807a.js';
|
|
29
|
-
import { m as
|
|
29
|
+
import { m as main_39 } from './main-0465b2a0.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-a614acdf.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-5505d4f9.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 getRelatedArticle from './getRelatedArticle.js';
|
|
57
|
+
import 'nookies';
|
|
59
58
|
import getQuery from './getQuery.js';
|
|
59
|
+
import getRelatedArticle from './getRelatedArticle.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_39 ? 'left' : 'right', marginTop: '.25rem' },
|
|
141
141
|
dangerouslySetInnerHTML: { __html: name } }),
|
|
142
|
-
|
|
142
|
+
main_39 && !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 '
|
|
@@ -246,7 +246,7 @@ var ISI = function ISI(props) {
|
|
|
246
246
|
);
|
|
247
247
|
};
|
|
248
248
|
|
|
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
|
|
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 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";
|
|
250
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" };
|
|
251
251
|
styleInject(css);
|
|
252
252
|
|
|
@@ -291,22 +291,6 @@ var RelatedArticle = function RelatedArticle(_ref) {
|
|
|
291
291
|
);
|
|
292
292
|
};
|
|
293
293
|
|
|
294
|
-
var defaults = { nonTextBehavior: 'remove' };
|
|
295
|
-
|
|
296
|
-
var blocksToText = function blocksToText(blocks) {
|
|
297
|
-
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
298
|
-
|
|
299
|
-
var options = _Object$assign({}, defaults, opts);
|
|
300
|
-
return blocks.map(function (block) {
|
|
301
|
-
if (block._type !== 'block' || !block.children) {
|
|
302
|
-
return options.nonTextBehavior === 'remove' ? '' : '[' + block._type + ' block]';
|
|
303
|
-
}
|
|
304
|
-
return block.children.map(function (child) {
|
|
305
|
-
return child.text;
|
|
306
|
-
}).join('');
|
|
307
|
-
}).join('\n\n');
|
|
308
|
-
};
|
|
309
|
-
|
|
310
294
|
var Article = function Article(props) {
|
|
311
295
|
var onVote = function () {
|
|
312
296
|
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(nodeKey, selectedChoice) {
|
|
@@ -498,56 +482,10 @@ var Article = function Article(props) {
|
|
|
498
482
|
};
|
|
499
483
|
|
|
500
484
|
var RelevantTopics = function RelevantTopics() {
|
|
501
|
-
if (content_placement && content_placement.length > 0 || documentGroupMapping
|
|
502
|
-
var relatedLinks = [];
|
|
503
|
-
if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
504
|
-
documentGroupMapping.forEach(function (documentGroup) {
|
|
505
|
-
if (documentGroup.parent) {
|
|
506
|
-
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path }]);
|
|
507
|
-
}
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
if (content_placement && content_placement.length > 0) {
|
|
511
|
-
content_placement.filter(function (item) {
|
|
512
|
-
return item.path !== 'news';
|
|
513
|
-
}).forEach(function (cp) {
|
|
514
|
-
var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path;
|
|
515
|
-
var href = '/' + cp_url;
|
|
516
|
-
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
if (relatedLinks && relatedLinks.length > 0) {
|
|
520
|
-
return React__default.createElement(
|
|
521
|
-
'div',
|
|
522
|
-
null,
|
|
523
|
-
relatedLinks.map(function (relatedLink, index) {
|
|
524
|
-
return React__default.createElement(
|
|
525
|
-
'span',
|
|
526
|
-
{ key: index, className: 'related-link' },
|
|
527
|
-
React__default.createElement(
|
|
528
|
-
'a',
|
|
529
|
-
{ className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
|
|
530
|
-
relatedLink.label
|
|
531
|
-
),
|
|
532
|
-
React__default.createElement(
|
|
533
|
-
'style',
|
|
534
|
-
{ jsx: 'true' },
|
|
535
|
-
'\n .related-link:not(:first-child):before {\n content: \' | \';\n }\n '
|
|
536
|
-
)
|
|
537
|
-
);
|
|
538
|
-
})
|
|
539
|
-
);
|
|
540
|
-
}
|
|
541
|
-
return null;
|
|
542
|
-
}
|
|
543
|
-
return null;
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
var RelatedContent = function RelatedContent() {
|
|
547
|
-
if (showRelatedArticles) {
|
|
485
|
+
if (content_placement && content_placement.length > 0 || documentGroupMapping) {
|
|
548
486
|
return React__default.createElement(
|
|
549
|
-
'
|
|
550
|
-
{
|
|
487
|
+
'div',
|
|
488
|
+
{ style: { color: '#262626' } },
|
|
551
489
|
React__default.createElement(
|
|
552
490
|
'p',
|
|
553
491
|
{ className: 'mb-0' },
|
|
@@ -557,17 +495,47 @@ var Article = function Article(props) {
|
|
|
557
495
|
'Related Content:'
|
|
558
496
|
)
|
|
559
497
|
),
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
498
|
+
documentGroupMapping && documentGroupMapping.map(function (documentGroup) {
|
|
499
|
+
if (!documentGroup.parent) {
|
|
500
|
+
return null;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return React__default.createElement(
|
|
504
|
+
React__default.Fragment,
|
|
505
|
+
null,
|
|
506
|
+
React__default.createElement(
|
|
507
|
+
'span',
|
|
508
|
+
{ className: '' },
|
|
509
|
+
React__default.createElement(
|
|
510
|
+
'a',
|
|
511
|
+
{
|
|
512
|
+
className: 'related-links',
|
|
513
|
+
style: { color: 'blue' },
|
|
514
|
+
href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path },
|
|
515
|
+
documentGroup.name
|
|
516
|
+
)
|
|
517
|
+
),
|
|
518
|
+
content_placement && content_placement.length ? ' | ' : null
|
|
519
|
+
);
|
|
520
|
+
}),
|
|
521
|
+
content_placement && content_placement.length > 0 ? content_placement.map(function (cp, index) {
|
|
522
|
+
var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path;
|
|
523
|
+
var href = '/' + cp_url;
|
|
524
|
+
return React__default.createElement(
|
|
525
|
+
React__default.Fragment,
|
|
526
|
+
{ key: index },
|
|
527
|
+
React__default.createElement(
|
|
528
|
+
'span',
|
|
529
|
+
null,
|
|
530
|
+
React__default.createElement(
|
|
531
|
+
'a',
|
|
532
|
+
{ className: 'related-links', key: index, href: href, style: { color: 'blue' } },
|
|
533
|
+
cp.name
|
|
534
|
+
)
|
|
535
|
+
),
|
|
536
|
+
content_placement.length > index + 1 ? ' | ' : null
|
|
537
|
+
);
|
|
538
|
+
}) : null
|
|
571
539
|
);
|
|
572
540
|
}
|
|
573
541
|
return null;
|
|
@@ -656,42 +624,14 @@ var Article = function Article(props) {
|
|
|
656
624
|
setContextualADFlag(true);
|
|
657
625
|
}
|
|
658
626
|
};
|
|
659
|
-
|
|
660
|
-
//Start: Generating intemediate Section if available
|
|
661
|
-
var blockContentSection1 = articleBody.slice(0, selectedIndex);
|
|
662
|
-
var blockContentSection2 = articleBody.slice(selectedIndex);
|
|
663
|
-
var blockContentIntermediateSection = [];
|
|
664
|
-
var rearrangeSections = function rearrangeSections(arr, index) {
|
|
665
|
-
var item = arr[index];
|
|
666
|
-
if (item && item._type) {
|
|
667
|
-
if (item._type === 'block' && blocksToText([item]) === '') {
|
|
668
|
-
rearrangeSections(arr, index + 1);
|
|
669
|
-
}
|
|
670
|
-
if (item._type !== 'block') {
|
|
671
|
-
var _selectedIndex = arr.findIndex(function (item1) {
|
|
672
|
-
return item1._key === item._key;
|
|
673
|
-
});
|
|
674
|
-
blockContentIntermediateSection = [].concat(_toConsumableArray(blockContentIntermediateSection), _toConsumableArray(arr.slice(0, _selectedIndex + 1)));
|
|
675
|
-
blockContentSection2 = blockContentSection2.slice(_selectedIndex + 1);
|
|
676
|
-
rearrangeSections(blockContentSection2, 0);
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
};
|
|
680
|
-
rearrangeSections(blockContentSection2, 0);
|
|
681
|
-
//End: Generating intemediate Section if available
|
|
682
|
-
|
|
683
627
|
return React__default.createElement(
|
|
684
628
|
React__default.Fragment,
|
|
685
629
|
null,
|
|
686
|
-
React__default.createElement(
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
blocks: blockContentSection1,
|
|
692
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
693
|
-
}, client.config()))
|
|
694
|
-
),
|
|
630
|
+
React__default.createElement(BlockContent, _extends({
|
|
631
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
632
|
+
blocks: [].concat(_toConsumableArray(articleBody.slice(0, selectedIndex))),
|
|
633
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
634
|
+
}, client.config())),
|
|
695
635
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
696
636
|
React__default.createElement(
|
|
697
637
|
'div',
|
|
@@ -704,25 +644,11 @@ var Article = function Article(props) {
|
|
|
704
644
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
705
645
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
|
|
706
646
|
),
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
blocks: blockContentIntermediateSection,
|
|
713
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
714
|
-
}, client.config()))
|
|
715
|
-
),
|
|
716
|
-
React__default.createElement(RelatedContent, null),
|
|
717
|
-
React__default.createElement(
|
|
718
|
-
'div',
|
|
719
|
-
{ 'class': 'clearfix' },
|
|
720
|
-
React__default.createElement(BlockContent, _extends({
|
|
721
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
722
|
-
blocks: blockContentSection2,
|
|
723
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
724
|
-
}, client.config()))
|
|
725
|
-
)
|
|
647
|
+
React__default.createElement(BlockContent, _extends({
|
|
648
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
649
|
+
blocks: [].concat(_toConsumableArray(articleBody.slice(selectedIndex))),
|
|
650
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
651
|
+
}, client.config()))
|
|
726
652
|
);
|
|
727
653
|
} else if (indexes.length >= 2 && body.length >= 3 && payload.contextualAD && !payload.contextualVideoAD) {
|
|
728
654
|
payload = _extends({}, payload, {
|
|
@@ -739,7 +665,7 @@ var Article = function Article(props) {
|
|
|
739
665
|
}, { viewport: [0, 0], sizes: ['fluid', [300, 100]] }] : { viewport: [0, 0], sizes: ['fluid', [300, 100]] }
|
|
740
666
|
})
|
|
741
667
|
});
|
|
742
|
-
var
|
|
668
|
+
var _selectedIndex = indexes[1] + 1;
|
|
743
669
|
|
|
744
670
|
var _checkIsAdFound = function _checkIsAdFound(isFound, adData) {
|
|
745
671
|
if (!isFound) {
|
|
@@ -770,41 +696,14 @@ var Article = function Article(props) {
|
|
|
770
696
|
}
|
|
771
697
|
};
|
|
772
698
|
|
|
773
|
-
//Start: Generating intemediate Section if available
|
|
774
|
-
var _blockContentSection = articleBody.slice(0, _selectedIndex2);
|
|
775
|
-
var _blockContentSection2 = articleBody.slice(_selectedIndex2);
|
|
776
|
-
var _blockContentIntermediateSection = [];
|
|
777
|
-
var _rearrangeSections = function _rearrangeSections(arr, index) {
|
|
778
|
-
var item = arr[index];
|
|
779
|
-
if (item && item._type) {
|
|
780
|
-
if (item._type === 'block' && blocksToText([item]) === '') {
|
|
781
|
-
_rearrangeSections(arr, index + 1);
|
|
782
|
-
}
|
|
783
|
-
if (item._type !== 'block') {
|
|
784
|
-
var _selectedIndex3 = arr.findIndex(function (item1) {
|
|
785
|
-
return item1._key === item._key;
|
|
786
|
-
});
|
|
787
|
-
_blockContentIntermediateSection = [].concat(_toConsumableArray(_blockContentIntermediateSection), _toConsumableArray(arr.slice(0, _selectedIndex3 + 1)));
|
|
788
|
-
_blockContentSection2 = _blockContentSection2.slice(_selectedIndex3 + 1);
|
|
789
|
-
_rearrangeSections(_blockContentSection2, 0);
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
};
|
|
793
|
-
_rearrangeSections(_blockContentSection2, 0);
|
|
794
|
-
//End: Generating intemediate Section if available
|
|
795
|
-
|
|
796
699
|
return React__default.createElement(
|
|
797
700
|
React__default.Fragment,
|
|
798
701
|
null,
|
|
799
|
-
React__default.createElement(
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
blocks: _blockContentSection,
|
|
805
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
806
|
-
}, client.config()))
|
|
807
|
-
),
|
|
702
|
+
React__default.createElement(BlockContent, _extends({
|
|
703
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
704
|
+
blocks: [].concat(_toConsumableArray(articleBody.slice(0, _selectedIndex))),
|
|
705
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
706
|
+
}, client.config())),
|
|
808
707
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
809
708
|
(visibleFlag || queueData && queueData.length === 1 || !props.infiniteScroll) && React__default.createElement(
|
|
810
709
|
'div',
|
|
@@ -812,25 +711,11 @@ var Article = function Article(props) {
|
|
|
812
711
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: previewAd ? null : _checkIsAdFound }))
|
|
813
712
|
),
|
|
814
713
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
blocks: _blockContentIntermediateSection,
|
|
821
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
822
|
-
}, client.config()))
|
|
823
|
-
),
|
|
824
|
-
React__default.createElement(RelatedContent, null),
|
|
825
|
-
React__default.createElement(
|
|
826
|
-
'div',
|
|
827
|
-
{ 'class': 'clearfix' },
|
|
828
|
-
React__default.createElement(BlockContent, _extends({
|
|
829
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
830
|
-
blocks: _blockContentSection2,
|
|
831
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
832
|
-
}, client.config()))
|
|
833
|
-
)
|
|
714
|
+
React__default.createElement(BlockContent, _extends({
|
|
715
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
716
|
+
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex))),
|
|
717
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
718
|
+
}, client.config()))
|
|
834
719
|
);
|
|
835
720
|
} else if (indexes.length >= 2 && body.length > 3 && payload.contextualVideoAD && !payload.contextualAD) {
|
|
836
721
|
payload = _extends({}, payload, {
|
|
@@ -838,7 +723,7 @@ var Article = function Article(props) {
|
|
|
838
723
|
slotId: (payload.contextualVideoAD.slotId || 'in-context_video') + '-' + payload._id
|
|
839
724
|
})
|
|
840
725
|
});
|
|
841
|
-
var
|
|
726
|
+
var _selectedIndex2 = indexes[1] + 1;
|
|
842
727
|
|
|
843
728
|
var _checkIsAdFound2 = function _checkIsAdFound2(isFound) {
|
|
844
729
|
if (!isFound) {
|
|
@@ -854,114 +739,25 @@ var Article = function Article(props) {
|
|
|
854
739
|
}
|
|
855
740
|
};
|
|
856
741
|
|
|
857
|
-
//Start: Generating intemediate Section if available
|
|
858
|
-
var _blockContentSection3 = articleBody.slice(0, _selectedIndex4);
|
|
859
|
-
var _blockContentSection4 = articleBody.slice(_selectedIndex4);
|
|
860
|
-
var _blockContentIntermediateSection2 = [];
|
|
861
|
-
var _rearrangeSections2 = function _rearrangeSections2(arr, index) {
|
|
862
|
-
var item = arr[index];
|
|
863
|
-
if (item && item._type) {
|
|
864
|
-
if (item._type === 'block' && blocksToText([item]) === '') {
|
|
865
|
-
_rearrangeSections2(arr, index + 1);
|
|
866
|
-
}
|
|
867
|
-
if (item._type !== 'block') {
|
|
868
|
-
var _selectedIndex5 = arr.findIndex(function (item1) {
|
|
869
|
-
return item1._key === item._key;
|
|
870
|
-
});
|
|
871
|
-
_blockContentIntermediateSection2 = [].concat(_toConsumableArray(_blockContentIntermediateSection2), _toConsumableArray(arr.slice(0, _selectedIndex5 + 1)));
|
|
872
|
-
_blockContentSection4 = _blockContentSection4.slice(_selectedIndex5 + 1);
|
|
873
|
-
_rearrangeSections2(_blockContentSection4, 0);
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
};
|
|
877
|
-
_rearrangeSections2(_blockContentSection4, 0);
|
|
878
|
-
//End: Generating intemediate Section if available
|
|
879
|
-
|
|
880
742
|
return React__default.createElement(
|
|
881
743
|
React__default.Fragment,
|
|
882
744
|
null,
|
|
883
|
-
React__default.createElement(
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
blocks: _blockContentSection3,
|
|
889
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
890
|
-
}, client.config()))
|
|
891
|
-
),
|
|
745
|
+
React__default.createElement(BlockContent, _extends({
|
|
746
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
747
|
+
blocks: [].concat(_toConsumableArray(articleBody.slice(0, _selectedIndex2))),
|
|
748
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
749
|
+
}, client.config())),
|
|
892
750
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
893
751
|
React__default.createElement(
|
|
894
752
|
'div',
|
|
895
753
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
896
754
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
|
|
897
755
|
),
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
blocks: _blockContentIntermediateSection2,
|
|
904
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
905
|
-
}, client.config()))
|
|
906
|
-
),
|
|
907
|
-
React__default.createElement(RelatedContent, null),
|
|
908
|
-
React__default.createElement(
|
|
909
|
-
'div',
|
|
910
|
-
{ 'class': 'clearfix' },
|
|
911
|
-
React__default.createElement(BlockContent, _extends({
|
|
912
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
913
|
-
blocks: _blockContentSection4,
|
|
914
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
915
|
-
}, client.config()))
|
|
916
|
-
)
|
|
917
|
-
);
|
|
918
|
-
} else if (indexes.length >= 2 && body.length > 3 && showRelatedArticles) {
|
|
919
|
-
var _selectedIndex6 = indexes[1] + 1;
|
|
920
|
-
|
|
921
|
-
//Start: Rearranging sections
|
|
922
|
-
var _blockContentSection5 = articleBody.slice(0, _selectedIndex6);
|
|
923
|
-
var _blockContentSection6 = articleBody.slice(_selectedIndex6);
|
|
924
|
-
var _rearrangeSections3 = function _rearrangeSections3(arr, index) {
|
|
925
|
-
var item = arr[index];
|
|
926
|
-
if (item && item._type) {
|
|
927
|
-
if (item._type === 'block' && blocksToText([item]) === '') {
|
|
928
|
-
_rearrangeSections3(arr, index + 1);
|
|
929
|
-
}
|
|
930
|
-
if (item._type !== 'block') {
|
|
931
|
-
var _selectedIndex7 = arr.findIndex(function (item1) {
|
|
932
|
-
return item1._key === item._key;
|
|
933
|
-
});
|
|
934
|
-
_blockContentSection5 = [].concat(_toConsumableArray(_blockContentSection5), _toConsumableArray(arr.slice(0, _selectedIndex7 + 1)));
|
|
935
|
-
_blockContentSection6 = _blockContentSection6.slice(_selectedIndex7 + 1);
|
|
936
|
-
_rearrangeSections3(_blockContentSection6, 0);
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
};
|
|
940
|
-
_rearrangeSections3(_blockContentSection6, 0);
|
|
941
|
-
//End: Rearranging sections
|
|
942
|
-
|
|
943
|
-
return React__default.createElement(
|
|
944
|
-
React__default.Fragment,
|
|
945
|
-
null,
|
|
946
|
-
React__default.createElement(
|
|
947
|
-
'div',
|
|
948
|
-
{ 'class': 'clearfix' },
|
|
949
|
-
React__default.createElement(BlockContent, _extends({
|
|
950
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
951
|
-
blocks: _blockContentSection5,
|
|
952
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
953
|
-
}, client.config()))
|
|
954
|
-
),
|
|
955
|
-
React__default.createElement(RelatedContent, null),
|
|
956
|
-
React__default.createElement(
|
|
957
|
-
'div',
|
|
958
|
-
{ 'class': 'clearfix' },
|
|
959
|
-
React__default.createElement(BlockContent, _extends({
|
|
960
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
961
|
-
blocks: _blockContentSection6,
|
|
962
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
963
|
-
}, client.config()))
|
|
964
|
-
)
|
|
756
|
+
React__default.createElement(BlockContent, _extends({
|
|
757
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
758
|
+
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex2))),
|
|
759
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
760
|
+
}, client.config()))
|
|
965
761
|
);
|
|
966
762
|
} else {
|
|
967
763
|
return React__default.createElement(BlockContent, _extends({
|
|
@@ -1150,7 +946,7 @@ var Article = function Article(props) {
|
|
|
1150
946
|
React__default.createElement(
|
|
1151
947
|
'div',
|
|
1152
948
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
1153
|
-
|
|
949
|
+
main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
|
|
1154
950
|
if (index === 0) {
|
|
1155
951
|
return React__default.createElement(
|
|
1156
952
|
'div',
|
|
@@ -1202,7 +998,21 @@ var Article = function Article(props) {
|
|
|
1202
998
|
issue.name
|
|
1203
999
|
)
|
|
1204
1000
|
),
|
|
1205
|
-
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } })
|
|
1001
|
+
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
|
1002
|
+
showRelatedArticles && !showIsi && React__default.createElement(
|
|
1003
|
+
React__default.Fragment,
|
|
1004
|
+
null,
|
|
1005
|
+
React__default.createElement(
|
|
1006
|
+
'div',
|
|
1007
|
+
null,
|
|
1008
|
+
React__default.createElement(RelevantTopics, null)
|
|
1009
|
+
),
|
|
1010
|
+
React__default.createElement(
|
|
1011
|
+
'div',
|
|
1012
|
+
{ className: 'pt-2' },
|
|
1013
|
+
React__default.createElement(RelatedArticle, { articles: article.relatedArticle, client: client })
|
|
1014
|
+
)
|
|
1015
|
+
)
|
|
1206
1016
|
),
|
|
1207
1017
|
renderIsiContent(props.article)
|
|
1208
1018
|
),
|
|
@@ -1215,7 +1025,7 @@ var Article = function Article(props) {
|
|
|
1215
1025
|
})
|
|
1216
1026
|
)
|
|
1217
1027
|
),
|
|
1218
|
-
|
|
1028
|
+
main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
|
|
1219
1029
|
if (index > 0) {
|
|
1220
1030
|
return React__default.createElement(
|
|
1221
1031
|
'div',
|
|
@@ -1255,201 +1065,6 @@ var Article = function Article(props) {
|
|
|
1255
1065
|
|
|
1256
1066
|
var _this = undefined;
|
|
1257
1067
|
|
|
1258
|
-
var getRelatedContentArticles = function () {
|
|
1259
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
|
|
1260
|
-
var client = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1261
|
-
var article = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1262
|
-
var prevUrl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '/';
|
|
1263
|
-
var articleCount = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
1264
|
-
|
|
1265
|
-
var _article$url, url, content_placement, documentGroupMapping, issueGroup, references, params, articles, relatedContentQuery;
|
|
1266
|
-
|
|
1267
|
-
return regenerator.wrap(function _callee$(_context) {
|
|
1268
|
-
while (1) {
|
|
1269
|
-
switch (_context.prev = _context.next) {
|
|
1270
|
-
case 0:
|
|
1271
|
-
_article$url = article.url;
|
|
1272
|
-
_article$url = _article$url === undefined ? {
|
|
1273
|
-
current: null
|
|
1274
|
-
} : _article$url;
|
|
1275
|
-
url = _article$url.current, content_placement = article.content_placement, documentGroupMapping = article.documentGroupMapping, issueGroup = article.issueGroup;
|
|
1276
|
-
references = [];
|
|
1277
|
-
|
|
1278
|
-
if (content_placement && content_placement.length > 0) {
|
|
1279
|
-
content_placement.forEach(function (_ref2) {
|
|
1280
|
-
var path = _ref2.path,
|
|
1281
|
-
_id = _ref2._id;
|
|
1282
|
-
|
|
1283
|
-
if (!_id || typeof _id == 'undefined') {
|
|
1284
|
-
return null;
|
|
1285
|
-
}
|
|
1286
|
-
var prev_url_to_check = prevUrl;
|
|
1287
|
-
if (prev_url_to_check.includes('?')) {
|
|
1288
|
-
prev_url_to_check = prev_url_to_check.split('?')[0];
|
|
1289
|
-
}
|
|
1290
|
-
if (prev_url_to_check.endsWith(path) && _id) references.push(_id);
|
|
1291
|
-
});
|
|
1292
|
-
if (references.length === 0) {
|
|
1293
|
-
content_placement.filter(function (_ref3) {
|
|
1294
|
-
var identifier = _ref3.identifier;
|
|
1295
|
-
return identifier !== 'news';
|
|
1296
|
-
}).forEach(function (_ref4) {
|
|
1297
|
-
var _id = _ref4._id;
|
|
1298
|
-
|
|
1299
|
-
if (_id) references.push(_id);
|
|
1300
|
-
});
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
|
-
if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
1305
|
-
documentGroupMapping.forEach(function (_ref5) {
|
|
1306
|
-
var _id = _ref5._id;
|
|
1307
|
-
|
|
1308
|
-
if (_id) references.push(_id);
|
|
1309
|
-
});
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
if (issueGroup && issueGroup._ref) {
|
|
1313
|
-
references.push(issueGroup._ref);
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
params = { url: url, references: references };
|
|
1317
|
-
articles = [];
|
|
1318
|
-
|
|
1319
|
-
if (!(params.references && params.references.length > 0)) {
|
|
1320
|
-
_context.next = 20;
|
|
1321
|
-
break;
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
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 && dateTime(published) <= dateTime(now())\n && references($references)\n ]| order(published desc)[' + articleCount + ']\n {\n title,\n url,\n thumbnail\n }';
|
|
1325
|
-
_context.prev = 11;
|
|
1326
|
-
_context.next = 14;
|
|
1327
|
-
return client.fetch(relatedContentQuery, params);
|
|
1328
|
-
|
|
1329
|
-
case 14:
|
|
1330
|
-
articles = _context.sent;
|
|
1331
|
-
_context.next = 20;
|
|
1332
|
-
break;
|
|
1333
|
-
|
|
1334
|
-
case 17:
|
|
1335
|
-
_context.prev = 17;
|
|
1336
|
-
_context.t0 = _context['catch'](11);
|
|
1337
|
-
|
|
1338
|
-
console.error(_context.t0);
|
|
1339
|
-
|
|
1340
|
-
case 20:
|
|
1341
|
-
return _context.abrupt('return', articles);
|
|
1342
|
-
|
|
1343
|
-
case 21:
|
|
1344
|
-
case 'end':
|
|
1345
|
-
return _context.stop();
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
}, _callee, _this, [[11, 17]]);
|
|
1349
|
-
}));
|
|
1350
|
-
|
|
1351
|
-
return function getRelatedContentArticles() {
|
|
1352
|
-
return _ref.apply(this, arguments);
|
|
1353
|
-
};
|
|
1354
|
-
}();
|
|
1355
|
-
|
|
1356
|
-
// const getRelatedContents = async (ctx = null, client = null, article = {}, prevUrl = '/', articleCount = 0) => {
|
|
1357
|
-
// const {
|
|
1358
|
-
// url: { current: url } = {
|
|
1359
|
-
// current: null
|
|
1360
|
-
// },
|
|
1361
|
-
// content_placement,
|
|
1362
|
-
// documentGroupMapping,
|
|
1363
|
-
// issueGroup
|
|
1364
|
-
// } = article
|
|
1365
|
-
// let params = { url }
|
|
1366
|
-
// let conditions = ''
|
|
1367
|
-
|
|
1368
|
-
// if (content_placement && content_placement.length > 0) {
|
|
1369
|
-
// let taxonomy = []
|
|
1370
|
-
// content_placement.forEach(({ path, _id }) => {
|
|
1371
|
-
// if (!_id || typeof _id == 'undefined') {
|
|
1372
|
-
// return null
|
|
1373
|
-
// }
|
|
1374
|
-
// let prev_url_to_check = prevUrl
|
|
1375
|
-
// if (prev_url_to_check.includes('?')) {
|
|
1376
|
-
// prev_url_to_check = prev_url_to_check.split('?')[0]
|
|
1377
|
-
// }
|
|
1378
|
-
// if (prev_url_to_check.endsWith(path) && _id) taxonomy.push(_id)
|
|
1379
|
-
// })
|
|
1380
|
-
// if (taxonomy.length === 0) {
|
|
1381
|
-
// content_placement
|
|
1382
|
-
// .filter(({ identifier }) => identifier !== 'news')
|
|
1383
|
-
// .forEach(({ _id }) => {
|
|
1384
|
-
// if (_id) taxonomy.push(_id)
|
|
1385
|
-
// })
|
|
1386
|
-
// }
|
|
1387
|
-
// if (taxonomy.length > 0) {
|
|
1388
|
-
// params = { ...params, taxonomy }
|
|
1389
|
-
// conditions = `&& taxonomyMapping[]._ref in $taxonomy`
|
|
1390
|
-
// }
|
|
1391
|
-
// }
|
|
1392
|
-
|
|
1393
|
-
// if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
1394
|
-
// let documentGroup = []
|
|
1395
|
-
// documentGroupMapping.forEach(({ _id }) => {
|
|
1396
|
-
// if (_id) documentGroup.push(_id)
|
|
1397
|
-
// })
|
|
1398
|
-
// if (params.taxonomy && documentGroup.length > 0) {
|
|
1399
|
-
// params = { ...params, documentGroup }
|
|
1400
|
-
// conditions = `&& (taxonomyMapping[]._ref in $taxonomy || documentGroupMapping[]._ref in $documentGroup)`
|
|
1401
|
-
// }
|
|
1402
|
-
// }
|
|
1403
|
-
|
|
1404
|
-
// if (issueGroup && issueGroup._ref) {
|
|
1405
|
-
// if (params.taxonomy && params.documentGroup) {
|
|
1406
|
-
// params = { ...params, issueAssociation: issueGroup._ref }
|
|
1407
|
-
// conditions = `&& (taxonomyMapping[]._ref in $taxonomy || documentGroupMapping[]._ref in $documentGroup || issueGroup._ref == $issueAssociation )`
|
|
1408
|
-
// } else if (params.taxonomy) {
|
|
1409
|
-
// params = { ...params, issueAssociation: issueGroup._ref }
|
|
1410
|
-
// conditions = `&& (taxonomyMapping[]._ref in $taxonomy || issueGroup._ref == $issueAssociation )`
|
|
1411
|
-
// }
|
|
1412
|
-
// }
|
|
1413
|
-
|
|
1414
|
-
// let articles = []
|
|
1415
|
-
// if (params.taxonomy && params.taxonomy.length > 0) {
|
|
1416
|
-
// const relatedContentQuery = `*[
|
|
1417
|
-
// _type == "article"
|
|
1418
|
-
// && defined(title)
|
|
1419
|
-
// && defined(url)
|
|
1420
|
-
// && !(_id in path("drafts.**"))
|
|
1421
|
-
// && is_visible == true
|
|
1422
|
-
// && passwordLock != true
|
|
1423
|
-
// && taxonomyMapping[].disableAds != 'true'
|
|
1424
|
-
// && contentCategory.name != 'Poll'
|
|
1425
|
-
// && contentCategory.name != 'Slideshows'
|
|
1426
|
-
// && contentCategory.disableAds != 'true'
|
|
1427
|
-
// && ExcludeFromInfiniteScroll != true
|
|
1428
|
-
// && url.current != $url
|
|
1429
|
-
// && !defined(body[].videos)
|
|
1430
|
-
// && published <= '${new Date().toISOString()}'
|
|
1431
|
-
// ${conditions}
|
|
1432
|
-
// ]| order(published desc)[${articleCount}]
|
|
1433
|
-
// {
|
|
1434
|
-
// title,
|
|
1435
|
-
// url,
|
|
1436
|
-
// thumbnail
|
|
1437
|
-
// }`
|
|
1438
|
-
|
|
1439
|
-
// try {
|
|
1440
|
-
// articles = await client.fetch(relatedContentQuery, params)
|
|
1441
|
-
// } catch (error) {
|
|
1442
|
-
// console.error(error)
|
|
1443
|
-
// }
|
|
1444
|
-
// }
|
|
1445
|
-
|
|
1446
|
-
// return articles
|
|
1447
|
-
// }
|
|
1448
|
-
|
|
1449
|
-
// export default getRelatedContents
|
|
1450
|
-
|
|
1451
|
-
var _this$1 = undefined;
|
|
1452
|
-
|
|
1453
1068
|
var ArticleQueue = function ArticleQueue(props) {
|
|
1454
1069
|
var _props$prevUrl = props.prevUrl,
|
|
1455
1070
|
prevUrl = _props$prevUrl === undefined ? '/' : _props$prevUrl,
|
|
@@ -1483,7 +1098,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1483
1098
|
});
|
|
1484
1099
|
var targeting = getTargeting({ article: activeArticle, cpModificationRequired: cpModificationRequired, position: props.position, prevUrl: prevUrl });
|
|
1485
1100
|
|
|
1486
|
-
if (!
|
|
1101
|
+
if (!main_39) {
|
|
1487
1102
|
lib_3.getGoogletag().then(function (googletag) {
|
|
1488
1103
|
if (window.googletag && googletag.pubadsReady) {
|
|
1489
1104
|
var slots = googletag.pubads().getSlots();
|
|
@@ -1501,7 +1116,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1501
1116
|
});
|
|
1502
1117
|
}
|
|
1503
1118
|
//Refresh leaderboard ad on mobile
|
|
1504
|
-
if (
|
|
1119
|
+
if (main_39) {
|
|
1505
1120
|
var leaderboardSlotId = '';
|
|
1506
1121
|
lib_3.getGoogletag().then(function (googletag) {
|
|
1507
1122
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -1575,7 +1190,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1575
1190
|
switch (_context.prev = _context.next) {
|
|
1576
1191
|
case 0:
|
|
1577
1192
|
if (!(article && article._id)) {
|
|
1578
|
-
_context.next =
|
|
1193
|
+
_context.next = 9;
|
|
1579
1194
|
break;
|
|
1580
1195
|
}
|
|
1581
1196
|
|
|
@@ -1587,22 +1202,17 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1587
1202
|
|
|
1588
1203
|
case 5:
|
|
1589
1204
|
article.relatedArticle = _context.sent;
|
|
1590
|
-
_context.next = 8;
|
|
1591
|
-
return getRelatedContentArticles(null, props.client, article, prevUrl, startingIndex + '..' + endingIndex);
|
|
1592
|
-
|
|
1593
|
-
case 8:
|
|
1594
|
-
article.relatedContentArticles = _context.sent;
|
|
1595
1205
|
targeting = getTargeting({ article: article, cpModificationRequired: cpModificationRequired, prevUrl: prevUrl });
|
|
1596
1206
|
|
|
1597
1207
|
article.Ads = Ads.getRightItems(targeting);
|
|
1598
1208
|
setQueueData([].concat(_toConsumableArray(queueData), [article]));
|
|
1599
1209
|
|
|
1600
|
-
case
|
|
1210
|
+
case 9:
|
|
1601
1211
|
case 'end':
|
|
1602
1212
|
return _context.stop();
|
|
1603
1213
|
}
|
|
1604
1214
|
}
|
|
1605
|
-
}, _callee, _this
|
|
1215
|
+
}, _callee, _this);
|
|
1606
1216
|
}));
|
|
1607
1217
|
|
|
1608
1218
|
return function (_x) {
|
|
@@ -1750,7 +1360,7 @@ var Articles = function Articles(props) {
|
|
|
1750
1360
|
}, _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));
|
|
1751
1361
|
};
|
|
1752
1362
|
|
|
1753
|
-
var _this$
|
|
1363
|
+
var _this$1 = undefined;
|
|
1754
1364
|
|
|
1755
1365
|
var View = function View(props) {
|
|
1756
1366
|
var router = useRouter();
|
|
@@ -2009,12 +1619,12 @@ View.returnGetInitialProps = function () {
|
|
|
2009
1619
|
}
|
|
2010
1620
|
|
|
2011
1621
|
article.relatedArticle = null;
|
|
2012
|
-
_context.next =
|
|
1622
|
+
_context.next = 20;
|
|
2013
1623
|
break;
|
|
2014
1624
|
|
|
2015
1625
|
case 16:
|
|
2016
1626
|
if (!article) {
|
|
2017
|
-
_context.next =
|
|
1627
|
+
_context.next = 20;
|
|
2018
1628
|
break;
|
|
2019
1629
|
}
|
|
2020
1630
|
|
|
@@ -2023,13 +1633,8 @@ View.returnGetInitialProps = function () {
|
|
|
2023
1633
|
|
|
2024
1634
|
case 19:
|
|
2025
1635
|
article.relatedArticle = _context.sent;
|
|
2026
|
-
_context.next = 22;
|
|
2027
|
-
return getRelatedContentArticles(context, client, article, prevUrl, '0..2');
|
|
2028
|
-
|
|
2029
|
-
case 22:
|
|
2030
|
-
article.relatedContentArticles = _context.sent;
|
|
2031
1636
|
|
|
2032
|
-
case
|
|
1637
|
+
case 20:
|
|
2033
1638
|
return _context.abrupt('return', {
|
|
2034
1639
|
url: url,
|
|
2035
1640
|
sao: sao,
|
|
@@ -2040,12 +1645,12 @@ View.returnGetInitialProps = function () {
|
|
|
2040
1645
|
sponsoredFlag: sponsoredFlag
|
|
2041
1646
|
});
|
|
2042
1647
|
|
|
2043
|
-
case
|
|
1648
|
+
case 21:
|
|
2044
1649
|
case 'end':
|
|
2045
1650
|
return _context.stop();
|
|
2046
1651
|
}
|
|
2047
1652
|
}
|
|
2048
|
-
}, _callee, _this$
|
|
1653
|
+
}, _callee, _this$1);
|
|
2049
1654
|
}));
|
|
2050
1655
|
|
|
2051
1656
|
return function (_x, _x2, _x3, _x4, _x5) {
|