@mjhls/mjh-framework 1.0.684-beta.0 → 1.0.684
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/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 +9 -9
- 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 +119 -486
- 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 +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 +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 +9 -9
- 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 +93 -460
- 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 +1 -1
- 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/cjs/View.js
CHANGED
|
@@ -10,29 +10,29 @@ require('./_iter-detect-60b2f026.js');
|
|
|
10
10
|
var toConsumableArray = require('./toConsumableArray-9a3476fe.js');
|
|
11
11
|
require('./core.get-iterator-method-f62321d4.js');
|
|
12
12
|
require('./_object-pie-68c5bcbc.js');
|
|
13
|
-
var _extends
|
|
13
|
+
var _extends = require('./extends-60837c34.js');
|
|
14
14
|
require('./_object-sap-5e74ba08.js');
|
|
15
15
|
require('./inherits-513d81cd.js');
|
|
16
16
|
require('./define-property-f4d12f4e.js');
|
|
17
17
|
require('./web.dom.iterable-a0e279c1.js');
|
|
18
|
-
var _typeof = require('./typeof-725500bc.js');
|
|
18
|
+
var _typeof$1 = require('./typeof-725500bc.js');
|
|
19
19
|
require('./_is-array-754e012d.js');
|
|
20
20
|
var React = require('react');
|
|
21
21
|
var React__default = _interopDefault(React);
|
|
22
|
-
var index = require('./index-
|
|
22
|
+
var index = require('./index-2d0a4911.js');
|
|
23
23
|
require('prop-types');
|
|
24
24
|
require('react-bootstrap/Row');
|
|
25
25
|
require('react-bootstrap/Col');
|
|
26
|
-
var moment = require('./moment-
|
|
26
|
+
var moment = require('./moment-66a6a284.js');
|
|
27
27
|
var Router = require('next/router');
|
|
28
28
|
var Router__default = _interopDefault(Router);
|
|
29
29
|
require('./isSymbol-04666465.js');
|
|
30
30
|
require('./debounce-eb287781.js');
|
|
31
|
-
var index_es = require('./index.es-
|
|
31
|
+
var index_es = require('./index.es-ab3f2690.js');
|
|
32
32
|
require('react-dom');
|
|
33
|
-
require('./index-
|
|
33
|
+
require('./index-b5eb3ff8.js');
|
|
34
34
|
require('./index-da796b8c.js');
|
|
35
|
-
var main = require('./main-
|
|
35
|
+
var main = require('./main-b6c96c8d.js');
|
|
36
36
|
require('./entities-310b46ee.js');
|
|
37
37
|
var stringify = require('./stringify-7c5aff47.js');
|
|
38
38
|
var slicedToArray = require('./slicedToArray-8f385299.js');
|
|
@@ -40,7 +40,7 @@ var asyncToGenerator = require('./asyncToGenerator-533d476a.js');
|
|
|
40
40
|
require('./_set-species-f92c67c5.js');
|
|
41
41
|
require('./beam-7217b7e7.js');
|
|
42
42
|
var AdSlot = require('./AdSlot.js');
|
|
43
|
-
var BlockContent = require('./BlockContent-
|
|
43
|
+
var BlockContent = require('./BlockContent-88f69acd.js');
|
|
44
44
|
require('./smoothscroll-95231a70.js');
|
|
45
45
|
require('./GroupDeck.js');
|
|
46
46
|
require('react-bootstrap');
|
|
@@ -48,7 +48,7 @@ require('./iconBase-68959171.js');
|
|
|
48
48
|
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
49
49
|
var defineProperty$1 = require('./defineProperty-55548b25.js');
|
|
50
50
|
var Form = _interopDefault(require('react-bootstrap/Form'));
|
|
51
|
-
var getSerializers = require('./index-
|
|
51
|
+
var getSerializers = require('./index-8c9e8ca7.js');
|
|
52
52
|
require('./util-f2c1b65b.js');
|
|
53
53
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
54
54
|
require('react-bootstrap/Pagination');
|
|
@@ -60,10 +60,10 @@ var keys = require('./keys-a586b7a0.js');
|
|
|
60
60
|
require('react-bootstrap/Dropdown');
|
|
61
61
|
var index_esm$3 = require('./index.esm-ff47db6f.js');
|
|
62
62
|
var getSeriesDetail = require('./getSeriesDetail.js');
|
|
63
|
-
require('
|
|
64
|
-
var getRelatedArticle = require('./getRelatedArticle.js');
|
|
63
|
+
require('nookies');
|
|
65
64
|
var getQuery = require('./getQuery.js');
|
|
66
|
-
var
|
|
65
|
+
var getRelatedArticle = require('./getRelatedArticle.js');
|
|
66
|
+
var getTargeting = require('./getTargeting-fee8c429.js');
|
|
67
67
|
var getKeywords = require('./getKeywords.js');
|
|
68
68
|
var urlFor = require('./urlFor.js');
|
|
69
69
|
var styleInject_es = require('./style-inject.es-dcee06b6.js');
|
|
@@ -143,9 +143,9 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
143
143
|
style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
|
|
144
144
|
thumbnailUrl && React__default.createElement('img', { style: { maxWidth: '220px', maxHeight: '100px', marginTop: '1rem' }, src: thumbnailUrl, alt: name }),
|
|
145
145
|
!thumbnailUrl && React__default.createElement('p', {
|
|
146
|
-
style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main.
|
|
146
|
+
style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main.main_39 ? 'left' : 'right', marginTop: '.25rem' },
|
|
147
147
|
dangerouslySetInnerHTML: { __html: name } }),
|
|
148
|
-
main.
|
|
148
|
+
main.main_39 && !thumbnailUrl && React__default.createElement(
|
|
149
149
|
'style',
|
|
150
150
|
{ jsx: 'true' },
|
|
151
151
|
'\n a.doc-group {\n display: block !important;\n padding: 0!important;\n }\n '
|
|
@@ -155,7 +155,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
155
155
|
|
|
156
156
|
var findIndex = function findIndex(arr) {
|
|
157
157
|
var indexes = [];
|
|
158
|
-
if ((typeof arr === 'undefined' ? 'undefined' : _typeof._typeof(arr)) === 'object') {
|
|
158
|
+
if ((typeof arr === 'undefined' ? 'undefined' : _typeof$1._typeof(arr)) === 'object') {
|
|
159
159
|
var _iteratorNormalCompletion = true;
|
|
160
160
|
var _didIteratorError = false;
|
|
161
161
|
var _iteratorError = undefined;
|
|
@@ -252,7 +252,7 @@ var ISI = function ISI(props) {
|
|
|
252
252
|
);
|
|
253
253
|
};
|
|
254
254
|
|
|
255
|
-
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
|
|
255
|
+
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";
|
|
256
256
|
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" };
|
|
257
257
|
styleInject_es.styleInject(css);
|
|
258
258
|
|
|
@@ -297,22 +297,6 @@ var RelatedArticle = function RelatedArticle(_ref) {
|
|
|
297
297
|
);
|
|
298
298
|
};
|
|
299
299
|
|
|
300
|
-
var defaults = { nonTextBehavior: 'remove' };
|
|
301
|
-
|
|
302
|
-
var blocksToText = function blocksToText(blocks) {
|
|
303
|
-
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
304
|
-
|
|
305
|
-
var options = _extends$1._Object$assign({}, defaults, opts);
|
|
306
|
-
return blocks.map(function (block) {
|
|
307
|
-
if (block._type !== 'block' || !block.children) {
|
|
308
|
-
return options.nonTextBehavior === 'remove' ? '' : '[' + block._type + ' block]';
|
|
309
|
-
}
|
|
310
|
-
return block.children.map(function (child) {
|
|
311
|
-
return child.text;
|
|
312
|
-
}).join('');
|
|
313
|
-
}).join('\n\n');
|
|
314
|
-
};
|
|
315
|
-
|
|
316
300
|
var Article = function Article(props) {
|
|
317
301
|
var onVote = function () {
|
|
318
302
|
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(nodeKey, selectedChoice) {
|
|
@@ -486,7 +470,7 @@ var Article = function Article(props) {
|
|
|
486
470
|
};
|
|
487
471
|
var renderAuthorBiography = function renderAuthorBiography(biography) {
|
|
488
472
|
if (biography) {
|
|
489
|
-
return React__default.createElement(BlockContent.BlockContent, _extends
|
|
473
|
+
return React__default.createElement(BlockContent.BlockContent, _extends._extends({
|
|
490
474
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag),
|
|
491
475
|
blocks: [biography]
|
|
492
476
|
}, client.config()));
|
|
@@ -504,56 +488,10 @@ var Article = function Article(props) {
|
|
|
504
488
|
};
|
|
505
489
|
|
|
506
490
|
var RelevantTopics = function RelevantTopics() {
|
|
507
|
-
if (content_placement && content_placement.length > 0 || documentGroupMapping
|
|
508
|
-
var relatedLinks = [];
|
|
509
|
-
if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
510
|
-
documentGroupMapping.forEach(function (documentGroup) {
|
|
511
|
-
if (documentGroup.parent) {
|
|
512
|
-
relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path }]);
|
|
513
|
-
}
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
if (content_placement && content_placement.length > 0) {
|
|
517
|
-
content_placement.filter(function (item) {
|
|
518
|
-
return item.path !== 'news';
|
|
519
|
-
}).forEach(function (cp) {
|
|
520
|
-
var cp_url = cpModificationRequired ? getTargeting.getContentPlacementUrl(cp) : cp.path;
|
|
521
|
-
var href = '/' + cp_url;
|
|
522
|
-
relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
if (relatedLinks && relatedLinks.length > 0) {
|
|
526
|
-
return React__default.createElement(
|
|
527
|
-
'div',
|
|
528
|
-
null,
|
|
529
|
-
relatedLinks.map(function (relatedLink, index) {
|
|
530
|
-
return React__default.createElement(
|
|
531
|
-
'span',
|
|
532
|
-
{ key: index, className: 'related-link' },
|
|
533
|
-
React__default.createElement(
|
|
534
|
-
'a',
|
|
535
|
-
{ className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
|
|
536
|
-
relatedLink.label
|
|
537
|
-
),
|
|
538
|
-
React__default.createElement(
|
|
539
|
-
'style',
|
|
540
|
-
{ jsx: 'true' },
|
|
541
|
-
'\n .related-link:not(:first-child):before {\n content: \' | \';\n }\n '
|
|
542
|
-
)
|
|
543
|
-
);
|
|
544
|
-
})
|
|
545
|
-
);
|
|
546
|
-
}
|
|
547
|
-
return null;
|
|
548
|
-
}
|
|
549
|
-
return null;
|
|
550
|
-
};
|
|
551
|
-
|
|
552
|
-
var RelatedContent = function RelatedContent() {
|
|
553
|
-
if (showRelatedArticles) {
|
|
491
|
+
if (content_placement && content_placement.length > 0 || documentGroupMapping) {
|
|
554
492
|
return React__default.createElement(
|
|
555
|
-
'
|
|
556
|
-
{
|
|
493
|
+
'div',
|
|
494
|
+
{ style: { color: '#262626' } },
|
|
557
495
|
React__default.createElement(
|
|
558
496
|
'p',
|
|
559
497
|
{ className: 'mb-0' },
|
|
@@ -563,17 +501,47 @@ var Article = function Article(props) {
|
|
|
563
501
|
'Related Content:'
|
|
564
502
|
)
|
|
565
503
|
),
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
504
|
+
documentGroupMapping && documentGroupMapping.map(function (documentGroup) {
|
|
505
|
+
if (!documentGroup.parent) {
|
|
506
|
+
return null;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
return React__default.createElement(
|
|
510
|
+
React__default.Fragment,
|
|
511
|
+
null,
|
|
512
|
+
React__default.createElement(
|
|
513
|
+
'span',
|
|
514
|
+
{ className: '' },
|
|
515
|
+
React__default.createElement(
|
|
516
|
+
'a',
|
|
517
|
+
{
|
|
518
|
+
className: 'related-links',
|
|
519
|
+
style: { color: 'blue' },
|
|
520
|
+
href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path },
|
|
521
|
+
documentGroup.name
|
|
522
|
+
)
|
|
523
|
+
),
|
|
524
|
+
content_placement && content_placement.length ? ' | ' : null
|
|
525
|
+
);
|
|
526
|
+
}),
|
|
527
|
+
content_placement && content_placement.length > 0 ? content_placement.map(function (cp, index) {
|
|
528
|
+
var cp_url = cpModificationRequired ? getTargeting.getContentPlacementUrl(cp) : cp.path;
|
|
529
|
+
var href = '/' + cp_url;
|
|
530
|
+
return React__default.createElement(
|
|
531
|
+
React__default.Fragment,
|
|
532
|
+
{ key: index },
|
|
533
|
+
React__default.createElement(
|
|
534
|
+
'span',
|
|
535
|
+
null,
|
|
536
|
+
React__default.createElement(
|
|
537
|
+
'a',
|
|
538
|
+
{ className: 'related-links', key: index, href: href, style: { color: 'blue' } },
|
|
539
|
+
cp.name
|
|
540
|
+
)
|
|
541
|
+
),
|
|
542
|
+
content_placement.length > index + 1 ? ' | ' : null
|
|
543
|
+
);
|
|
544
|
+
}) : null
|
|
577
545
|
);
|
|
578
546
|
}
|
|
579
547
|
return null;
|
|
@@ -627,11 +595,11 @@ var Article = function Article(props) {
|
|
|
627
595
|
var indexes = findIndex(body);
|
|
628
596
|
|
|
629
597
|
if (indexes.length >= 2 && body.length > 3 && payload.contextualAD && payload.contextualVideoAD) {
|
|
630
|
-
payload = _extends
|
|
631
|
-
contextualAD: _extends
|
|
598
|
+
payload = _extends._extends({}, payload, {
|
|
599
|
+
contextualAD: _extends._extends({}, payload.contextualAD, {
|
|
632
600
|
slotId: (payload.contextualAD.slotId || 'contextual_ad') + '-' + payload._id
|
|
633
601
|
}),
|
|
634
|
-
contextualVideoAD: _extends
|
|
602
|
+
contextualVideoAD: _extends._extends({}, payload.contextualVideoAD, {
|
|
635
603
|
slotId: (payload.contextualVideoAD.slotId || 'in-context_video') + '-' + payload._id
|
|
636
604
|
})
|
|
637
605
|
});
|
|
@@ -662,70 +630,35 @@ var Article = function Article(props) {
|
|
|
662
630
|
setContextualADFlag(true);
|
|
663
631
|
}
|
|
664
632
|
};
|
|
665
|
-
|
|
666
|
-
//Start: Generating intemediate Section if available
|
|
667
|
-
var blockContentSection1 = articleBody.slice(0, selectedIndex);
|
|
668
|
-
var blockContentSection2 = articleBody.slice(selectedIndex);
|
|
669
|
-
var blockContentIntermediateSection = [];
|
|
670
|
-
var rearrangeSections = function rearrangeSections(arr, index) {
|
|
671
|
-
var item = arr[index];
|
|
672
|
-
if (item && item._type) {
|
|
673
|
-
if (item._type === 'block' && blocksToText([item]) === '') {
|
|
674
|
-
rearrangeSections(arr, index + 1);
|
|
675
|
-
}
|
|
676
|
-
if (item._type !== 'block') {
|
|
677
|
-
var _selectedIndex = arr.findIndex(function (item1) {
|
|
678
|
-
return item1._key === item._key;
|
|
679
|
-
});
|
|
680
|
-
blockContentIntermediateSection = [].concat(toConsumableArray._toConsumableArray(blockContentIntermediateSection), toConsumableArray._toConsumableArray(arr.slice(0, _selectedIndex + 1)));
|
|
681
|
-
blockContentSection2 = blockContentSection2.slice(_selectedIndex + 1);
|
|
682
|
-
rearrangeSections(blockContentSection2, 0);
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
};
|
|
686
|
-
rearrangeSections(blockContentSection2, 0);
|
|
687
|
-
//End: Generating intemediate Section if available
|
|
688
|
-
|
|
689
633
|
return React__default.createElement(
|
|
690
634
|
React__default.Fragment,
|
|
691
635
|
null,
|
|
692
|
-
React__default.createElement(BlockContent.BlockContent, _extends
|
|
636
|
+
React__default.createElement(BlockContent.BlockContent, _extends._extends({
|
|
693
637
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
694
|
-
blocks:
|
|
638
|
+
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, selectedIndex))),
|
|
695
639
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
696
640
|
}, client.config())),
|
|
697
641
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
698
642
|
React__default.createElement(
|
|
699
643
|
'div',
|
|
700
644
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
701
|
-
React__default.createElement(AdSlot, _extends
|
|
645
|
+
React__default.createElement(AdSlot, _extends._extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: previewAd ? null : checkIsAdFound }))
|
|
702
646
|
),
|
|
703
647
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
704
648
|
React__default.createElement(
|
|
705
649
|
'div',
|
|
706
650
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
707
|
-
React__default.createElement(AdSlot, _extends
|
|
708
|
-
),
|
|
709
|
-
blockContentIntermediateSection.length > 0 && React__default.createElement(
|
|
710
|
-
React__default.Fragment,
|
|
711
|
-
null,
|
|
712
|
-
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
713
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
714
|
-
blocks: blockContentIntermediateSection,
|
|
715
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
716
|
-
}, client.config())),
|
|
717
|
-
React__default.createElement('span', { className: 'clearfix' })
|
|
651
|
+
React__default.createElement(AdSlot, _extends._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
|
|
718
652
|
),
|
|
719
|
-
React__default.createElement(
|
|
720
|
-
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
653
|
+
React__default.createElement(BlockContent.BlockContent, _extends._extends({
|
|
721
654
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
722
|
-
blocks:
|
|
655
|
+
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(selectedIndex))),
|
|
723
656
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
724
657
|
}, client.config()))
|
|
725
658
|
);
|
|
726
659
|
} else if (indexes.length >= 2 && body.length >= 3 && payload.contextualAD && !payload.contextualVideoAD) {
|
|
727
|
-
payload = _extends
|
|
728
|
-
contextualAD: _extends
|
|
660
|
+
payload = _extends._extends({}, payload, {
|
|
661
|
+
contextualAD: _extends._extends({}, payload.contextualAD, {
|
|
729
662
|
slotId: (payload.contextualAD.slotId || 'contextual_ad') + '-' + payload._id,
|
|
730
663
|
className: 'ADFluid',
|
|
731
664
|
// Fetching new contextual targeting based on the current active article.
|
|
@@ -738,7 +671,7 @@ var Article = function Article(props) {
|
|
|
738
671
|
}, { viewport: [0, 0], sizes: ['fluid', [300, 100]] }] : { viewport: [0, 0], sizes: ['fluid', [300, 100]] }
|
|
739
672
|
})
|
|
740
673
|
});
|
|
741
|
-
var
|
|
674
|
+
var _selectedIndex = indexes[1] + 1;
|
|
742
675
|
|
|
743
676
|
var _checkIsAdFound = function _checkIsAdFound(isFound, adData) {
|
|
744
677
|
if (!isFound) {
|
|
@@ -769,68 +702,34 @@ var Article = function Article(props) {
|
|
|
769
702
|
}
|
|
770
703
|
};
|
|
771
704
|
|
|
772
|
-
//Start: Generating intemediate Section if available
|
|
773
|
-
var _blockContentSection = articleBody.slice(0, _selectedIndex2);
|
|
774
|
-
var _blockContentSection2 = articleBody.slice(_selectedIndex2);
|
|
775
|
-
var _blockContentIntermediateSection = [];
|
|
776
|
-
var _rearrangeSections = function _rearrangeSections(arr, index) {
|
|
777
|
-
var item = arr[index];
|
|
778
|
-
if (item && item._type) {
|
|
779
|
-
if (item._type === 'block' && blocksToText([item]) === '') {
|
|
780
|
-
_rearrangeSections(arr, index + 1);
|
|
781
|
-
}
|
|
782
|
-
if (item._type !== 'block') {
|
|
783
|
-
var _selectedIndex3 = arr.findIndex(function (item1) {
|
|
784
|
-
return item1._key === item._key;
|
|
785
|
-
});
|
|
786
|
-
_blockContentIntermediateSection = [].concat(toConsumableArray._toConsumableArray(_blockContentIntermediateSection), toConsumableArray._toConsumableArray(arr.slice(0, _selectedIndex3 + 1)));
|
|
787
|
-
_blockContentSection2 = _blockContentSection2.slice(_selectedIndex3 + 1);
|
|
788
|
-
_rearrangeSections(_blockContentSection2, 0);
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
};
|
|
792
|
-
_rearrangeSections(_blockContentSection2, 0);
|
|
793
|
-
//End: Generating intemediate Section if available
|
|
794
|
-
|
|
795
705
|
return React__default.createElement(
|
|
796
706
|
React__default.Fragment,
|
|
797
707
|
null,
|
|
798
|
-
React__default.createElement(BlockContent.BlockContent, _extends
|
|
708
|
+
React__default.createElement(BlockContent.BlockContent, _extends._extends({
|
|
799
709
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
800
|
-
blocks:
|
|
710
|
+
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, _selectedIndex))),
|
|
801
711
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
802
712
|
}, client.config())),
|
|
803
713
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
804
714
|
(visibleFlag || queueData && queueData.length === 1 || !props.infiniteScroll) && React__default.createElement(
|
|
805
715
|
'div',
|
|
806
716
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
807
|
-
React__default.createElement(AdSlot, _extends
|
|
717
|
+
React__default.createElement(AdSlot, _extends._extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: previewAd ? null : _checkIsAdFound }))
|
|
808
718
|
),
|
|
809
719
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
810
|
-
|
|
811
|
-
React__default.Fragment,
|
|
812
|
-
null,
|
|
813
|
-
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
814
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
815
|
-
blocks: _blockContentIntermediateSection,
|
|
816
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
817
|
-
}, client.config())),
|
|
818
|
-
React__default.createElement('span', { className: 'clearfix' })
|
|
819
|
-
),
|
|
820
|
-
React__default.createElement(RelatedContent, null),
|
|
821
|
-
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
720
|
+
React__default.createElement(BlockContent.BlockContent, _extends._extends({
|
|
822
721
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
823
|
-
blocks:
|
|
722
|
+
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex))),
|
|
824
723
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
825
724
|
}, client.config()))
|
|
826
725
|
);
|
|
827
726
|
} else if (indexes.length >= 2 && body.length > 3 && payload.contextualVideoAD && !payload.contextualAD) {
|
|
828
|
-
payload = _extends
|
|
829
|
-
contextualVideoAD: _extends
|
|
727
|
+
payload = _extends._extends({}, payload, {
|
|
728
|
+
contextualVideoAD: _extends._extends({}, payload.contextualVideoAD, {
|
|
830
729
|
slotId: (payload.contextualVideoAD.slotId || 'in-context_video') + '-' + payload._id
|
|
831
730
|
})
|
|
832
731
|
});
|
|
833
|
-
var
|
|
732
|
+
var _selectedIndex2 = indexes[1] + 1;
|
|
834
733
|
|
|
835
734
|
var _checkIsAdFound2 = function _checkIsAdFound2(isFound) {
|
|
836
735
|
if (!isFound) {
|
|
@@ -846,103 +745,28 @@ var Article = function Article(props) {
|
|
|
846
745
|
}
|
|
847
746
|
};
|
|
848
747
|
|
|
849
|
-
//Start: Generating intemediate Section if available
|
|
850
|
-
var _blockContentSection3 = articleBody.slice(0, _selectedIndex4);
|
|
851
|
-
var _blockContentSection4 = articleBody.slice(_selectedIndex4);
|
|
852
|
-
var _blockContentIntermediateSection2 = [];
|
|
853
|
-
var _rearrangeSections2 = function _rearrangeSections2(arr, index) {
|
|
854
|
-
var item = arr[index];
|
|
855
|
-
if (item && item._type) {
|
|
856
|
-
if (item._type === 'block' && blocksToText([item]) === '') {
|
|
857
|
-
_rearrangeSections2(arr, index + 1);
|
|
858
|
-
}
|
|
859
|
-
if (item._type !== 'block') {
|
|
860
|
-
var _selectedIndex5 = arr.findIndex(function (item1) {
|
|
861
|
-
return item1._key === item._key;
|
|
862
|
-
});
|
|
863
|
-
_blockContentIntermediateSection2 = [].concat(toConsumableArray._toConsumableArray(_blockContentIntermediateSection2), toConsumableArray._toConsumableArray(arr.slice(0, _selectedIndex5 + 1)));
|
|
864
|
-
_blockContentSection4 = _blockContentSection4.slice(_selectedIndex5 + 1);
|
|
865
|
-
_rearrangeSections2(_blockContentSection4, 0);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
};
|
|
869
|
-
_rearrangeSections2(_blockContentSection4, 0);
|
|
870
|
-
//End: Generating intemediate Section if available
|
|
871
|
-
|
|
872
748
|
return React__default.createElement(
|
|
873
749
|
React__default.Fragment,
|
|
874
750
|
null,
|
|
875
|
-
React__default.createElement(BlockContent.BlockContent, _extends
|
|
751
|
+
React__default.createElement(BlockContent.BlockContent, _extends._extends({
|
|
876
752
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
877
|
-
blocks:
|
|
753
|
+
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(0, _selectedIndex2))),
|
|
878
754
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
879
755
|
}, client.config())),
|
|
880
756
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
881
757
|
React__default.createElement(
|
|
882
758
|
'div',
|
|
883
759
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
884
|
-
React__default.createElement(AdSlot, _extends
|
|
885
|
-
),
|
|
886
|
-
_blockContentIntermediateSection2.length > 0 && React__default.createElement(
|
|
887
|
-
React__default.Fragment,
|
|
888
|
-
null,
|
|
889
|
-
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
890
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
891
|
-
blocks: _blockContentIntermediateSection2,
|
|
892
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
893
|
-
}, client.config())),
|
|
894
|
-
React__default.createElement('span', { className: 'clearfix' })
|
|
760
|
+
React__default.createElement(AdSlot, _extends._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
|
|
895
761
|
),
|
|
896
|
-
React__default.createElement(
|
|
897
|
-
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
898
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
899
|
-
blocks: _blockContentSection4,
|
|
900
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
901
|
-
}, client.config()))
|
|
902
|
-
);
|
|
903
|
-
} else if (indexes.length >= 2 && body.length > 3 && showRelatedArticles) {
|
|
904
|
-
var _selectedIndex6 = indexes[1] + 1;
|
|
905
|
-
|
|
906
|
-
//Start: Rearranging sections
|
|
907
|
-
var _blockContentSection5 = articleBody.slice(0, _selectedIndex6);
|
|
908
|
-
var _blockContentSection6 = articleBody.slice(_selectedIndex6);
|
|
909
|
-
var _rearrangeSections3 = function _rearrangeSections3(arr, index) {
|
|
910
|
-
var item = arr[index];
|
|
911
|
-
if (item && item._type) {
|
|
912
|
-
if (item._type === 'block' && blocksToText([item]) === '') {
|
|
913
|
-
_rearrangeSections3(arr, index + 1);
|
|
914
|
-
}
|
|
915
|
-
if (item._type !== 'block') {
|
|
916
|
-
var _selectedIndex7 = arr.findIndex(function (item1) {
|
|
917
|
-
return item1._key === item._key;
|
|
918
|
-
});
|
|
919
|
-
_blockContentSection5 = [].concat(toConsumableArray._toConsumableArray(_blockContentSection5), toConsumableArray._toConsumableArray(arr.slice(0, _selectedIndex7 + 1)));
|
|
920
|
-
_blockContentSection6 = _blockContentSection6.slice(_selectedIndex7 + 1);
|
|
921
|
-
_rearrangeSections3(_blockContentSection6, 0);
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
};
|
|
925
|
-
_rearrangeSections3(_blockContentSection6, 0);
|
|
926
|
-
//End: Rearranging sections
|
|
927
|
-
|
|
928
|
-
return React__default.createElement(
|
|
929
|
-
React__default.Fragment,
|
|
930
|
-
null,
|
|
931
|
-
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
932
|
-
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, contextualADFlag, null, null, targeting),
|
|
933
|
-
blocks: _blockContentSection5,
|
|
934
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
935
|
-
}, client.config())),
|
|
936
|
-
React__default.createElement('span', { className: 'clearfix' }),
|
|
937
|
-
React__default.createElement(RelatedContent, null),
|
|
938
|
-
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
762
|
+
React__default.createElement(BlockContent.BlockContent, _extends._extends({
|
|
939
763
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
940
|
-
blocks:
|
|
764
|
+
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex2))),
|
|
941
765
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
942
766
|
}, client.config()))
|
|
943
767
|
);
|
|
944
768
|
} else {
|
|
945
|
-
return React__default.createElement(BlockContent.BlockContent, _extends
|
|
769
|
+
return React__default.createElement(BlockContent.BlockContent, _extends._extends({
|
|
946
770
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, false, null, props.article.Ads, targeting),
|
|
947
771
|
blocks: articleBody,
|
|
948
772
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
@@ -1128,7 +952,7 @@ var Article = function Article(props) {
|
|
|
1128
952
|
React__default.createElement(
|
|
1129
953
|
'div',
|
|
1130
954
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
1131
|
-
main.
|
|
955
|
+
main.main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
|
|
1132
956
|
if (index === 0) {
|
|
1133
957
|
return React__default.createElement(
|
|
1134
958
|
'div',
|
|
@@ -1180,7 +1004,21 @@ var Article = function Article(props) {
|
|
|
1180
1004
|
issue.name
|
|
1181
1005
|
)
|
|
1182
1006
|
),
|
|
1183
|
-
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } })
|
|
1007
|
+
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
|
1008
|
+
showRelatedArticles && !showIsi && React__default.createElement(
|
|
1009
|
+
React__default.Fragment,
|
|
1010
|
+
null,
|
|
1011
|
+
React__default.createElement(
|
|
1012
|
+
'div',
|
|
1013
|
+
null,
|
|
1014
|
+
React__default.createElement(RelevantTopics, null)
|
|
1015
|
+
),
|
|
1016
|
+
React__default.createElement(
|
|
1017
|
+
'div',
|
|
1018
|
+
{ className: 'pt-2' },
|
|
1019
|
+
React__default.createElement(RelatedArticle, { articles: article.relatedArticle, client: client })
|
|
1020
|
+
)
|
|
1021
|
+
)
|
|
1184
1022
|
),
|
|
1185
1023
|
renderIsiContent(props.article)
|
|
1186
1024
|
),
|
|
@@ -1193,7 +1031,7 @@ var Article = function Article(props) {
|
|
|
1193
1031
|
})
|
|
1194
1032
|
)
|
|
1195
1033
|
),
|
|
1196
|
-
main.
|
|
1034
|
+
main.main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
|
|
1197
1035
|
if (index > 0) {
|
|
1198
1036
|
return React__default.createElement(
|
|
1199
1037
|
'div',
|
|
@@ -1233,201 +1071,6 @@ var Article = function Article(props) {
|
|
|
1233
1071
|
|
|
1234
1072
|
var _this = undefined;
|
|
1235
1073
|
|
|
1236
|
-
var getRelatedContentArticles = function () {
|
|
1237
|
-
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee() {
|
|
1238
|
-
var client = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1239
|
-
var article = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1240
|
-
var prevUrl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '/';
|
|
1241
|
-
var articleCount = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
1242
|
-
|
|
1243
|
-
var _article$url, url, content_placement, documentGroupMapping, issueGroup, references, params, articles, relatedContentQuery;
|
|
1244
|
-
|
|
1245
|
-
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
1246
|
-
while (1) {
|
|
1247
|
-
switch (_context.prev = _context.next) {
|
|
1248
|
-
case 0:
|
|
1249
|
-
_article$url = article.url;
|
|
1250
|
-
_article$url = _article$url === undefined ? {
|
|
1251
|
-
current: null
|
|
1252
|
-
} : _article$url;
|
|
1253
|
-
url = _article$url.current, content_placement = article.content_placement, documentGroupMapping = article.documentGroupMapping, issueGroup = article.issueGroup;
|
|
1254
|
-
references = [];
|
|
1255
|
-
|
|
1256
|
-
if (content_placement && content_placement.length > 0) {
|
|
1257
|
-
content_placement.forEach(function (_ref2) {
|
|
1258
|
-
var path = _ref2.path,
|
|
1259
|
-
_id = _ref2._id;
|
|
1260
|
-
|
|
1261
|
-
if (!_id || typeof _id == 'undefined') {
|
|
1262
|
-
return null;
|
|
1263
|
-
}
|
|
1264
|
-
var prev_url_to_check = prevUrl;
|
|
1265
|
-
if (prev_url_to_check.includes('?')) {
|
|
1266
|
-
prev_url_to_check = prev_url_to_check.split('?')[0];
|
|
1267
|
-
}
|
|
1268
|
-
if (prev_url_to_check.endsWith(path) && _id) references.push(_id);
|
|
1269
|
-
});
|
|
1270
|
-
if (references.length === 0) {
|
|
1271
|
-
content_placement.filter(function (_ref3) {
|
|
1272
|
-
var identifier = _ref3.identifier;
|
|
1273
|
-
return identifier !== 'news';
|
|
1274
|
-
}).forEach(function (_ref4) {
|
|
1275
|
-
var _id = _ref4._id;
|
|
1276
|
-
|
|
1277
|
-
if (_id) references.push(_id);
|
|
1278
|
-
});
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
1283
|
-
documentGroupMapping.forEach(function (_ref5) {
|
|
1284
|
-
var _id = _ref5._id;
|
|
1285
|
-
|
|
1286
|
-
if (_id) references.push(_id);
|
|
1287
|
-
});
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
if (issueGroup && issueGroup._ref) {
|
|
1291
|
-
references.push(issueGroup._ref);
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
params = { url: url, references: references };
|
|
1295
|
-
articles = [];
|
|
1296
|
-
|
|
1297
|
-
if (!(params.references && params.references.length > 0)) {
|
|
1298
|
-
_context.next = 20;
|
|
1299
|
-
break;
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
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 }';
|
|
1303
|
-
_context.prev = 11;
|
|
1304
|
-
_context.next = 14;
|
|
1305
|
-
return client.fetch(relatedContentQuery, params);
|
|
1306
|
-
|
|
1307
|
-
case 14:
|
|
1308
|
-
articles = _context.sent;
|
|
1309
|
-
_context.next = 20;
|
|
1310
|
-
break;
|
|
1311
|
-
|
|
1312
|
-
case 17:
|
|
1313
|
-
_context.prev = 17;
|
|
1314
|
-
_context.t0 = _context['catch'](11);
|
|
1315
|
-
|
|
1316
|
-
console.error(_context.t0);
|
|
1317
|
-
|
|
1318
|
-
case 20:
|
|
1319
|
-
return _context.abrupt('return', articles);
|
|
1320
|
-
|
|
1321
|
-
case 21:
|
|
1322
|
-
case 'end':
|
|
1323
|
-
return _context.stop();
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
}, _callee, _this, [[11, 17]]);
|
|
1327
|
-
}));
|
|
1328
|
-
|
|
1329
|
-
return function getRelatedContentArticles() {
|
|
1330
|
-
return _ref.apply(this, arguments);
|
|
1331
|
-
};
|
|
1332
|
-
}();
|
|
1333
|
-
|
|
1334
|
-
// const getRelatedContents = async (ctx = null, client = null, article = {}, prevUrl = '/', articleCount = 0) => {
|
|
1335
|
-
// const {
|
|
1336
|
-
// url: { current: url } = {
|
|
1337
|
-
// current: null
|
|
1338
|
-
// },
|
|
1339
|
-
// content_placement,
|
|
1340
|
-
// documentGroupMapping,
|
|
1341
|
-
// issueGroup
|
|
1342
|
-
// } = article
|
|
1343
|
-
// let params = { url }
|
|
1344
|
-
// let conditions = ''
|
|
1345
|
-
|
|
1346
|
-
// if (content_placement && content_placement.length > 0) {
|
|
1347
|
-
// let taxonomy = []
|
|
1348
|
-
// content_placement.forEach(({ path, _id }) => {
|
|
1349
|
-
// if (!_id || typeof _id == 'undefined') {
|
|
1350
|
-
// return null
|
|
1351
|
-
// }
|
|
1352
|
-
// let prev_url_to_check = prevUrl
|
|
1353
|
-
// if (prev_url_to_check.includes('?')) {
|
|
1354
|
-
// prev_url_to_check = prev_url_to_check.split('?')[0]
|
|
1355
|
-
// }
|
|
1356
|
-
// if (prev_url_to_check.endsWith(path) && _id) taxonomy.push(_id)
|
|
1357
|
-
// })
|
|
1358
|
-
// if (taxonomy.length === 0) {
|
|
1359
|
-
// content_placement
|
|
1360
|
-
// .filter(({ identifier }) => identifier !== 'news')
|
|
1361
|
-
// .forEach(({ _id }) => {
|
|
1362
|
-
// if (_id) taxonomy.push(_id)
|
|
1363
|
-
// })
|
|
1364
|
-
// }
|
|
1365
|
-
// if (taxonomy.length > 0) {
|
|
1366
|
-
// params = { ...params, taxonomy }
|
|
1367
|
-
// conditions = `&& taxonomyMapping[]._ref in $taxonomy`
|
|
1368
|
-
// }
|
|
1369
|
-
// }
|
|
1370
|
-
|
|
1371
|
-
// if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
1372
|
-
// let documentGroup = []
|
|
1373
|
-
// documentGroupMapping.forEach(({ _id }) => {
|
|
1374
|
-
// if (_id) documentGroup.push(_id)
|
|
1375
|
-
// })
|
|
1376
|
-
// if (params.taxonomy && documentGroup.length > 0) {
|
|
1377
|
-
// params = { ...params, documentGroup }
|
|
1378
|
-
// conditions = `&& (taxonomyMapping[]._ref in $taxonomy || documentGroupMapping[]._ref in $documentGroup)`
|
|
1379
|
-
// }
|
|
1380
|
-
// }
|
|
1381
|
-
|
|
1382
|
-
// if (issueGroup && issueGroup._ref) {
|
|
1383
|
-
// if (params.taxonomy && params.documentGroup) {
|
|
1384
|
-
// params = { ...params, issueAssociation: issueGroup._ref }
|
|
1385
|
-
// conditions = `&& (taxonomyMapping[]._ref in $taxonomy || documentGroupMapping[]._ref in $documentGroup || issueGroup._ref == $issueAssociation )`
|
|
1386
|
-
// } else if (params.taxonomy) {
|
|
1387
|
-
// params = { ...params, issueAssociation: issueGroup._ref }
|
|
1388
|
-
// conditions = `&& (taxonomyMapping[]._ref in $taxonomy || issueGroup._ref == $issueAssociation )`
|
|
1389
|
-
// }
|
|
1390
|
-
// }
|
|
1391
|
-
|
|
1392
|
-
// let articles = []
|
|
1393
|
-
// if (params.taxonomy && params.taxonomy.length > 0) {
|
|
1394
|
-
// const relatedContentQuery = `*[
|
|
1395
|
-
// _type == "article"
|
|
1396
|
-
// && defined(title)
|
|
1397
|
-
// && defined(url)
|
|
1398
|
-
// && !(_id in path("drafts.**"))
|
|
1399
|
-
// && is_visible == true
|
|
1400
|
-
// && passwordLock != true
|
|
1401
|
-
// && taxonomyMapping[].disableAds != 'true'
|
|
1402
|
-
// && contentCategory.name != 'Poll'
|
|
1403
|
-
// && contentCategory.name != 'Slideshows'
|
|
1404
|
-
// && contentCategory.disableAds != 'true'
|
|
1405
|
-
// && ExcludeFromInfiniteScroll != true
|
|
1406
|
-
// && url.current != $url
|
|
1407
|
-
// && !defined(body[].videos)
|
|
1408
|
-
// && published <= '${new Date().toISOString()}'
|
|
1409
|
-
// ${conditions}
|
|
1410
|
-
// ]| order(published desc)[${articleCount}]
|
|
1411
|
-
// {
|
|
1412
|
-
// title,
|
|
1413
|
-
// url,
|
|
1414
|
-
// thumbnail
|
|
1415
|
-
// }`
|
|
1416
|
-
|
|
1417
|
-
// try {
|
|
1418
|
-
// articles = await client.fetch(relatedContentQuery, params)
|
|
1419
|
-
// } catch (error) {
|
|
1420
|
-
// console.error(error)
|
|
1421
|
-
// }
|
|
1422
|
-
// }
|
|
1423
|
-
|
|
1424
|
-
// return articles
|
|
1425
|
-
// }
|
|
1426
|
-
|
|
1427
|
-
// export default getRelatedContents
|
|
1428
|
-
|
|
1429
|
-
var _this$1 = undefined;
|
|
1430
|
-
|
|
1431
1074
|
var ArticleQueue = function ArticleQueue(props) {
|
|
1432
1075
|
var _props$prevUrl = props.prevUrl,
|
|
1433
1076
|
prevUrl = _props$prevUrl === undefined ? '/' : _props$prevUrl,
|
|
@@ -1444,7 +1087,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1444
1087
|
|
|
1445
1088
|
|
|
1446
1089
|
var firstArticle = function firstArticle() {
|
|
1447
|
-
var article = _extends
|
|
1090
|
+
var article = _extends._Object$assign({}, props.article);
|
|
1448
1091
|
var targeting = getTargeting.getTargeting(props);
|
|
1449
1092
|
article.Ads = Ads.getRightItems(targeting);
|
|
1450
1093
|
return article;
|
|
@@ -1461,7 +1104,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1461
1104
|
});
|
|
1462
1105
|
var targeting = getTargeting.getTargeting({ article: activeArticle, cpModificationRequired: cpModificationRequired, position: props.position, prevUrl: prevUrl });
|
|
1463
1106
|
|
|
1464
|
-
if (!main.
|
|
1107
|
+
if (!main.main_39) {
|
|
1465
1108
|
index.lib_3.getGoogletag().then(function (googletag) {
|
|
1466
1109
|
if (window.googletag && googletag.pubadsReady) {
|
|
1467
1110
|
var slots = googletag.pubads().getSlots();
|
|
@@ -1479,7 +1122,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1479
1122
|
});
|
|
1480
1123
|
}
|
|
1481
1124
|
//Refresh leaderboard ad on mobile
|
|
1482
|
-
if (main.
|
|
1125
|
+
if (main.main_39) {
|
|
1483
1126
|
var leaderboardSlotId = '';
|
|
1484
1127
|
index.lib_3.getGoogletag().then(function (googletag) {
|
|
1485
1128
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -1553,7 +1196,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1553
1196
|
switch (_context.prev = _context.next) {
|
|
1554
1197
|
case 0:
|
|
1555
1198
|
if (!(article && article._id)) {
|
|
1556
|
-
_context.next =
|
|
1199
|
+
_context.next = 9;
|
|
1557
1200
|
break;
|
|
1558
1201
|
}
|
|
1559
1202
|
|
|
@@ -1565,22 +1208,17 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1565
1208
|
|
|
1566
1209
|
case 5:
|
|
1567
1210
|
article.relatedArticle = _context.sent;
|
|
1568
|
-
_context.next = 8;
|
|
1569
|
-
return getRelatedContentArticles(null, props.client, article, prevUrl, startingIndex + '..' + endingIndex);
|
|
1570
|
-
|
|
1571
|
-
case 8:
|
|
1572
|
-
article.relatedContentArticles = _context.sent;
|
|
1573
1211
|
targeting = getTargeting.getTargeting({ article: article, cpModificationRequired: cpModificationRequired, prevUrl: prevUrl });
|
|
1574
1212
|
|
|
1575
1213
|
article.Ads = Ads.getRightItems(targeting);
|
|
1576
1214
|
setQueueData([].concat(toConsumableArray._toConsumableArray(queueData), [article]));
|
|
1577
1215
|
|
|
1578
|
-
case
|
|
1216
|
+
case 9:
|
|
1579
1217
|
case 'end':
|
|
1580
1218
|
return _context.stop();
|
|
1581
1219
|
}
|
|
1582
1220
|
}
|
|
1583
|
-
}, _callee, _this
|
|
1221
|
+
}, _callee, _this);
|
|
1584
1222
|
}));
|
|
1585
1223
|
|
|
1586
1224
|
return function (_x) {
|
|
@@ -1645,7 +1283,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
1645
1283
|
index_es.InfiniteScroll,
|
|
1646
1284
|
{ dataLength: queueData.length, next: loadmore, scrollThreshold: '60%', hasMore: true, style: { overflow: 'hidden' } },
|
|
1647
1285
|
queueData.map(function (article, index) {
|
|
1648
|
-
return React__default.createElement(Article, _extends
|
|
1286
|
+
return React__default.createElement(Article, _extends._extends({
|
|
1649
1287
|
key: index
|
|
1650
1288
|
}, props, {
|
|
1651
1289
|
onChangeArticle: onChangeArticle,
|
|
@@ -1714,7 +1352,7 @@ var Articles = function Articles(props) {
|
|
|
1714
1352
|
index: 0
|
|
1715
1353
|
};
|
|
1716
1354
|
|
|
1717
|
-
return React__default.createElement(ArticleQueue, _extends
|
|
1355
|
+
return React__default.createElement(ArticleQueue, _extends._extends((_extends2 = {
|
|
1718
1356
|
client: client,
|
|
1719
1357
|
params: params,
|
|
1720
1358
|
relatedArticleQuery: relatedArticleQuery,
|
|
@@ -1728,7 +1366,7 @@ var Articles = function Articles(props) {
|
|
|
1728
1366
|
}, defineProperty$1._defineProperty(_extends2, 'pageview', pageview), defineProperty$1._defineProperty(_extends2, 'onVote', function onVote() {}), defineProperty$1._defineProperty(_extends2, 'ISIContent', ISIContent), defineProperty$1._defineProperty(_extends2, 'videoAccountIDs', videoAccountIDs), defineProperty$1._defineProperty(_extends2, 'sponsoredTaxonomies', []), defineProperty$1._defineProperty(_extends2, 'cpModificationRequired', cpModificationRequired), defineProperty$1._defineProperty(_extends2, 'Settings', Settings), defineProperty$1._defineProperty(_extends2, 'canonicalTag', canonicalTag), _extends2), props));
|
|
1729
1367
|
};
|
|
1730
1368
|
|
|
1731
|
-
var _this$
|
|
1369
|
+
var _this$1 = undefined;
|
|
1732
1370
|
|
|
1733
1371
|
var View = function View(props) {
|
|
1734
1372
|
var router = Router.useRouter();
|
|
@@ -1906,7 +1544,7 @@ var View = function View(props) {
|
|
|
1906
1544
|
props.article.seriesDetail && props.article.seriesDetail.nextUrl && React__default.createElement('link', { rel: 'next', href: props.article.seriesDetail.nextUrl })
|
|
1907
1545
|
)
|
|
1908
1546
|
),
|
|
1909
|
-
!needInfiniteScroll ? React__default.createElement(Article, _extends
|
|
1547
|
+
!needInfiniteScroll ? React__default.createElement(Article, _extends._extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles }, props)) : React__default.createElement(Articles, _extends._extends({ infiniteScroll: true, showRelatedArticles: showRelatedArticles, canonicalTag: canonicalTag }, props))
|
|
1910
1548
|
);
|
|
1911
1549
|
};
|
|
1912
1550
|
|
|
@@ -1987,12 +1625,12 @@ View.returnGetInitialProps = function () {
|
|
|
1987
1625
|
}
|
|
1988
1626
|
|
|
1989
1627
|
article.relatedArticle = null;
|
|
1990
|
-
_context.next =
|
|
1628
|
+
_context.next = 20;
|
|
1991
1629
|
break;
|
|
1992
1630
|
|
|
1993
1631
|
case 16:
|
|
1994
1632
|
if (!article) {
|
|
1995
|
-
_context.next =
|
|
1633
|
+
_context.next = 20;
|
|
1996
1634
|
break;
|
|
1997
1635
|
}
|
|
1998
1636
|
|
|
@@ -2001,13 +1639,8 @@ View.returnGetInitialProps = function () {
|
|
|
2001
1639
|
|
|
2002
1640
|
case 19:
|
|
2003
1641
|
article.relatedArticle = _context.sent;
|
|
2004
|
-
_context.next = 22;
|
|
2005
|
-
return getRelatedContentArticles(context, client, article, prevUrl, '0..2');
|
|
2006
|
-
|
|
2007
|
-
case 22:
|
|
2008
|
-
article.relatedContentArticles = _context.sent;
|
|
2009
1642
|
|
|
2010
|
-
case
|
|
1643
|
+
case 20:
|
|
2011
1644
|
return _context.abrupt('return', {
|
|
2012
1645
|
url: url,
|
|
2013
1646
|
sao: sao,
|
|
@@ -2018,12 +1651,12 @@ View.returnGetInitialProps = function () {
|
|
|
2018
1651
|
sponsoredFlag: sponsoredFlag
|
|
2019
1652
|
});
|
|
2020
1653
|
|
|
2021
|
-
case
|
|
1654
|
+
case 21:
|
|
2022
1655
|
case 'end':
|
|
2023
1656
|
return _context.stop();
|
|
2024
1657
|
}
|
|
2025
1658
|
}
|
|
2026
|
-
}, _callee, _this$
|
|
1659
|
+
}, _callee, _this$1);
|
|
2027
1660
|
}));
|
|
2028
1661
|
|
|
2029
1662
|
return function (_x, _x2, _x3, _x4, _x5) {
|