@mjhls/mjh-framework 1.0.665-beta.3 → 1.0.665-beta.4
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/View.js +53 -63
- package/dist/esm/View.js +53 -63
- package/package.json +1 -1
package/dist/cjs/View.js
CHANGED
|
@@ -188,7 +188,7 @@ var findIndex = function findIndex(arr) {
|
|
|
188
188
|
return indexes;
|
|
189
189
|
};
|
|
190
190
|
|
|
191
|
-
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
|
|
191
|
+
var css = ".RelatedArticles-module_mediaContainer__10h9k {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n margin: 0 -1rem;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn {\r\n margin: 0 1rem 1rem;\r\n width: calc(33% - 1rem);\r\n display: column;\r\n flex-direction: row;\r\n margin-bottom: 0.75rem;\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_cardTitle__3P-Ib {\r\n font-weight: bold;\r\n color: #252525;\r\n margin-bottom: 0.25rem;\r\n font-size: 15px;\r\n}\r\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\r\n color: #000;\r\n font-weight: bold;\r\n}\r\n.RelatedArticles-module_cardDate__1wOR5 {\r\n color: var(--dark);\r\n display: block;\r\n background: #fff !important;\r\n margin-bottom: 0;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: block;\r\n text-align: center;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n height: 135px;\r\n width: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n}\r\n@media screen and (max-width: 1064px) {\r\n}\r\n@media screen and (max-width: 968px) {\r\n .RelatedArticles-module_mediaContainer__10h9k {\r\n flex-wrap: wrap;\r\n }\r\n .RelatedArticles-module_mediaCard__3wQbn {\r\n width: 100%;\r\n background-color: #cccccc;\r\n margin-bottom: 0.5rem;\r\n padding: 0.5rem;\r\n border-radius: 0.25rem;\r\n }\r\n .RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: none;\r\n }\r\n}\r\n";
|
|
192
192
|
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" };
|
|
193
193
|
styleInject_es.styleInject(css);
|
|
194
194
|
|
|
@@ -409,72 +409,65 @@ var Article = function Article(props) {
|
|
|
409
409
|
};
|
|
410
410
|
|
|
411
411
|
var RelevantTopics = function RelevantTopics() {
|
|
412
|
-
if (content_placement && content_placement.length > 0 || documentGroupMapping) {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
{ className: 'mb-0' },
|
|
419
|
-
React__default.createElement(
|
|
420
|
-
'b',
|
|
421
|
-
null,
|
|
422
|
-
'Related Content:'
|
|
423
|
-
)
|
|
424
|
-
),
|
|
425
|
-
documentGroupMapping && documentGroupMapping.map(function (documentGroup) {
|
|
426
|
-
if (!documentGroup.parent) {
|
|
427
|
-
return null;
|
|
412
|
+
if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
|
|
413
|
+
var relatedLinks = [];
|
|
414
|
+
if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
415
|
+
documentGroupMapping.forEach(function (documentGroup) {
|
|
416
|
+
if (documentGroup.parent) {
|
|
417
|
+
relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path }]);
|
|
428
418
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
React__default.createElement(
|
|
434
|
-
'span',
|
|
435
|
-
{ className: '' },
|
|
436
|
-
React__default.createElement(
|
|
437
|
-
'a',
|
|
438
|
-
{
|
|
439
|
-
className: 'related-links',
|
|
440
|
-
style: { color: 'blue' },
|
|
441
|
-
href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path },
|
|
442
|
-
documentGroup.name
|
|
443
|
-
)
|
|
444
|
-
),
|
|
445
|
-
content_placement && content_placement.length ? ' | ' : null
|
|
446
|
-
);
|
|
447
|
-
}),
|
|
448
|
-
content_placement && content_placement.length > 0 ? content_placement.filter(function (item) {
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
if (content_placement && content_placement.length > 0) {
|
|
422
|
+
content_placement.filter(function (item) {
|
|
449
423
|
return item.path !== 'news';
|
|
450
|
-
}).
|
|
424
|
+
}).forEach(function (cp) {
|
|
451
425
|
var cp_url = cpModificationRequired ? getTargeting.getContentPlacementUrl(cp) : cp.path;
|
|
452
426
|
var href = '/' + cp_url;
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
427
|
+
relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
if (relatedLinks && relatedLinks.length > 0) {
|
|
431
|
+
return React__default.createElement(
|
|
432
|
+
'div',
|
|
433
|
+
null,
|
|
434
|
+
relatedLinks.map(function (relatedLink, index) {
|
|
435
|
+
return React__default.createElement(
|
|
457
436
|
'span',
|
|
458
|
-
|
|
437
|
+
{ key: index, className: 'related-link' },
|
|
459
438
|
React__default.createElement(
|
|
460
439
|
'a',
|
|
461
|
-
{ className: 'related-links',
|
|
462
|
-
|
|
440
|
+
{ className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
|
|
441
|
+
relatedLink.label
|
|
442
|
+
),
|
|
443
|
+
React__default.createElement(
|
|
444
|
+
'style',
|
|
445
|
+
{ jsx: 'true' },
|
|
446
|
+
'\n .related-link:not(:first-child):before {\n content: \' | \';\n }\n '
|
|
463
447
|
)
|
|
464
|
-
)
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
448
|
+
);
|
|
449
|
+
})
|
|
450
|
+
);
|
|
451
|
+
}
|
|
452
|
+
return null;
|
|
469
453
|
}
|
|
470
454
|
return null;
|
|
471
455
|
};
|
|
472
456
|
|
|
473
|
-
var
|
|
457
|
+
var renderRelatedSection = function renderRelatedSection() {
|
|
474
458
|
if (showRelatedArticles) {
|
|
475
459
|
return React__default.createElement(
|
|
476
|
-
'
|
|
477
|
-
{ className: 'related-contents-
|
|
460
|
+
'section',
|
|
461
|
+
{ className: 'related-contents-section' },
|
|
462
|
+
React__default.createElement(
|
|
463
|
+
'p',
|
|
464
|
+
{ className: 'mb-0' },
|
|
465
|
+
React__default.createElement(
|
|
466
|
+
'b',
|
|
467
|
+
null,
|
|
468
|
+
'Related Content:'
|
|
469
|
+
)
|
|
470
|
+
),
|
|
478
471
|
React__default.createElement(
|
|
479
472
|
'div',
|
|
480
473
|
null,
|
|
@@ -488,7 +481,7 @@ var Article = function Article(props) {
|
|
|
488
481
|
React__default.createElement(
|
|
489
482
|
'style',
|
|
490
483
|
{ jsx: 'true' },
|
|
491
|
-
'\n
|
|
484
|
+
'\n .related-contents-section {\n padding: 0.5rem;\n background-color: #e6e6e6;\n border-radius: 0.25rem;\n }\n '
|
|
492
485
|
)
|
|
493
486
|
);
|
|
494
487
|
}
|
|
@@ -598,7 +591,7 @@ var Article = function Article(props) {
|
|
|
598
591
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
599
592
|
React__default.createElement(AdSlot, _extends$1._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
|
|
600
593
|
),
|
|
601
|
-
|
|
594
|
+
renderRelatedSection(),
|
|
602
595
|
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
603
596
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
604
597
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(selectedIndex))),
|
|
@@ -666,7 +659,7 @@ var Article = function Article(props) {
|
|
|
666
659
|
React__default.createElement(AdSlot, _extends$1._extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound }))
|
|
667
660
|
),
|
|
668
661
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
669
|
-
|
|
662
|
+
renderRelatedSection(),
|
|
670
663
|
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
671
664
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
672
665
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex))),
|
|
@@ -709,7 +702,7 @@ var Article = function Article(props) {
|
|
|
709
702
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
710
703
|
React__default.createElement(AdSlot, _extends$1._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
|
|
711
704
|
),
|
|
712
|
-
|
|
705
|
+
renderRelatedSection(),
|
|
713
706
|
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
714
707
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
715
708
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex2))),
|
|
@@ -727,7 +720,7 @@ var Article = function Article(props) {
|
|
|
727
720
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
728
721
|
}, client.config())),
|
|
729
722
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
730
|
-
|
|
723
|
+
renderRelatedSection(),
|
|
731
724
|
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
732
725
|
serializers: getSerializers.getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
733
726
|
blocks: [].concat(toConsumableArray._toConsumableArray(articleBody.slice(_selectedIndex3))),
|
|
@@ -1036,12 +1029,9 @@ var getRelatedContents = function () {
|
|
|
1036
1029
|
current: null
|
|
1037
1030
|
} : _article$url;
|
|
1038
1031
|
url = _article$url.current, content_placement = article.content_placement, documentGroupMapping = article.documentGroupMapping, issueGroup = article.issueGroup;
|
|
1039
|
-
params = {
|
|
1040
|
-
url: url
|
|
1041
|
-
};
|
|
1032
|
+
params = { url: url };
|
|
1042
1033
|
conditions = '';
|
|
1043
1034
|
|
|
1044
|
-
//404 articles were throwing server error
|
|
1045
1035
|
|
|
1046
1036
|
if (content_placement && content_placement.length > 0) {
|
|
1047
1037
|
taxonomy = [];
|
|
@@ -1106,7 +1096,7 @@ var getRelatedContents = function () {
|
|
|
1106
1096
|
break;
|
|
1107
1097
|
}
|
|
1108
1098
|
|
|
1109
|
-
relatedContentQuery = '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory.name != \'Poll\'\n && contentCategory.name != \'Slideshows\'\n \t&& contentCategory.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n && published <= \'' + new Date().toISOString() + '\'\n ' + conditions + '\n
|
|
1099
|
+
relatedContentQuery = '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && passwordLock != true\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory.name != \'Poll\'\n && contentCategory.name != \'Slideshows\'\n \t&& contentCategory.disableAds != \'true\'\n && ExcludeFromInfiniteScroll != true\n && url.current != $url\n && !defined(body[].videos)\n && published <= \'' + new Date().toISOString() + '\'\n ' + conditions + '\n ]| order(published desc)[' + articleCount + ']\n {\n title,\n url,\n thumbnail\n }';
|
|
1110
1100
|
_context.prev = 11;
|
|
1111
1101
|
_context.next = 14;
|
|
1112
1102
|
return client.fetch(relatedContentQuery, params);
|
package/dist/esm/View.js
CHANGED
|
@@ -182,7 +182,7 @@ var findIndex = function findIndex(arr) {
|
|
|
182
182
|
return indexes;
|
|
183
183
|
};
|
|
184
184
|
|
|
185
|
-
var css = ".RelatedArticles-module_mediaContainer__10h9k {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n margin: 0 -1rem;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn {\r\n margin: 0 1rem 1rem;\r\n width: calc(33% - 1rem);\r\n display: column;\r\n flex-direction: row;\r\n margin-bottom: 0.75rem;\r\n
|
|
185
|
+
var css = ".RelatedArticles-module_mediaContainer__10h9k {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n margin: 0 -1rem;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn {\r\n margin: 0 1rem 1rem;\r\n width: calc(33% - 1rem);\r\n display: column;\r\n flex-direction: row;\r\n margin-bottom: 0.75rem;\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_cardTitle__3P-Ib {\r\n font-weight: bold;\r\n color: #252525;\r\n margin-bottom: 0.25rem;\r\n font-size: 15px;\r\n}\r\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\r\n color: #000;\r\n font-weight: bold;\r\n}\r\n.RelatedArticles-module_cardDate__1wOR5 {\r\n color: var(--dark);\r\n display: block;\r\n background: #fff !important;\r\n margin-bottom: 0;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: block;\r\n text-align: center;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n height: 135px;\r\n width: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n}\r\n@media screen and (max-width: 1064px) {\r\n}\r\n@media screen and (max-width: 968px) {\r\n .RelatedArticles-module_mediaContainer__10h9k {\r\n flex-wrap: wrap;\r\n }\r\n .RelatedArticles-module_mediaCard__3wQbn {\r\n width: 100%;\r\n background-color: #cccccc;\r\n margin-bottom: 0.5rem;\r\n padding: 0.5rem;\r\n border-radius: 0.25rem;\r\n }\r\n .RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: none;\r\n }\r\n}\r\n";
|
|
186
186
|
var styles = { "mediaContainer": "RelatedArticles-module_mediaContainer__10h9k", "mediaCard": "RelatedArticles-module_mediaCard__3wQbn", "cardTitle": "RelatedArticles-module_cardTitle__3P-Ib", "authorListing": "RelatedArticles-module_authorListing__1EFg4", "text-muted": "RelatedArticles-module_text-muted__3b0zX", "cardDate": "RelatedArticles-module_cardDate__1wOR5", "imgWrapper": "RelatedArticles-module_imgWrapper__5Jx_4" };
|
|
187
187
|
styleInject(css);
|
|
188
188
|
|
|
@@ -403,72 +403,65 @@ var Article = function Article(props) {
|
|
|
403
403
|
};
|
|
404
404
|
|
|
405
405
|
var RelevantTopics = function RelevantTopics() {
|
|
406
|
-
if (content_placement && content_placement.length > 0 || documentGroupMapping) {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
{ className: 'mb-0' },
|
|
413
|
-
React__default.createElement(
|
|
414
|
-
'b',
|
|
415
|
-
null,
|
|
416
|
-
'Related Content:'
|
|
417
|
-
)
|
|
418
|
-
),
|
|
419
|
-
documentGroupMapping && documentGroupMapping.map(function (documentGroup) {
|
|
420
|
-
if (!documentGroup.parent) {
|
|
421
|
-
return null;
|
|
406
|
+
if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
|
|
407
|
+
var relatedLinks = [];
|
|
408
|
+
if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
409
|
+
documentGroupMapping.forEach(function (documentGroup) {
|
|
410
|
+
if (documentGroup.parent) {
|
|
411
|
+
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path }]);
|
|
422
412
|
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
React__default.createElement(
|
|
428
|
-
'span',
|
|
429
|
-
{ className: '' },
|
|
430
|
-
React__default.createElement(
|
|
431
|
-
'a',
|
|
432
|
-
{
|
|
433
|
-
className: 'related-links',
|
|
434
|
-
style: { color: 'blue' },
|
|
435
|
-
href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path },
|
|
436
|
-
documentGroup.name
|
|
437
|
-
)
|
|
438
|
-
),
|
|
439
|
-
content_placement && content_placement.length ? ' | ' : null
|
|
440
|
-
);
|
|
441
|
-
}),
|
|
442
|
-
content_placement && content_placement.length > 0 ? content_placement.filter(function (item) {
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
if (content_placement && content_placement.length > 0) {
|
|
416
|
+
content_placement.filter(function (item) {
|
|
443
417
|
return item.path !== 'news';
|
|
444
|
-
}).
|
|
418
|
+
}).forEach(function (cp) {
|
|
445
419
|
var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path;
|
|
446
420
|
var href = '/' + cp_url;
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
421
|
+
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
if (relatedLinks && relatedLinks.length > 0) {
|
|
425
|
+
return React__default.createElement(
|
|
426
|
+
'div',
|
|
427
|
+
null,
|
|
428
|
+
relatedLinks.map(function (relatedLink, index) {
|
|
429
|
+
return React__default.createElement(
|
|
451
430
|
'span',
|
|
452
|
-
|
|
431
|
+
{ key: index, className: 'related-link' },
|
|
453
432
|
React__default.createElement(
|
|
454
433
|
'a',
|
|
455
|
-
{ className: 'related-links',
|
|
456
|
-
|
|
434
|
+
{ className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
|
|
435
|
+
relatedLink.label
|
|
436
|
+
),
|
|
437
|
+
React__default.createElement(
|
|
438
|
+
'style',
|
|
439
|
+
{ jsx: 'true' },
|
|
440
|
+
'\n .related-link:not(:first-child):before {\n content: \' | \';\n }\n '
|
|
457
441
|
)
|
|
458
|
-
)
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
442
|
+
);
|
|
443
|
+
})
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
return null;
|
|
463
447
|
}
|
|
464
448
|
return null;
|
|
465
449
|
};
|
|
466
450
|
|
|
467
|
-
var
|
|
451
|
+
var renderRelatedSection = function renderRelatedSection() {
|
|
468
452
|
if (showRelatedArticles) {
|
|
469
453
|
return React__default.createElement(
|
|
470
|
-
'
|
|
471
|
-
{ className: 'related-contents-
|
|
454
|
+
'section',
|
|
455
|
+
{ className: 'related-contents-section' },
|
|
456
|
+
React__default.createElement(
|
|
457
|
+
'p',
|
|
458
|
+
{ className: 'mb-0' },
|
|
459
|
+
React__default.createElement(
|
|
460
|
+
'b',
|
|
461
|
+
null,
|
|
462
|
+
'Related Content:'
|
|
463
|
+
)
|
|
464
|
+
),
|
|
472
465
|
React__default.createElement(
|
|
473
466
|
'div',
|
|
474
467
|
null,
|
|
@@ -482,7 +475,7 @@ var Article = function Article(props) {
|
|
|
482
475
|
React__default.createElement(
|
|
483
476
|
'style',
|
|
484
477
|
{ jsx: 'true' },
|
|
485
|
-
'\n
|
|
478
|
+
'\n .related-contents-section {\n padding: 0.5rem;\n background-color: #e6e6e6;\n border-radius: 0.25rem;\n }\n '
|
|
486
479
|
)
|
|
487
480
|
);
|
|
488
481
|
}
|
|
@@ -592,7 +585,7 @@ var Article = function Article(props) {
|
|
|
592
585
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
593
586
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
|
|
594
587
|
),
|
|
595
|
-
|
|
588
|
+
renderRelatedSection(),
|
|
596
589
|
React__default.createElement(BlockContent, _extends({
|
|
597
590
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
598
591
|
blocks: [].concat(_toConsumableArray(articleBody.slice(selectedIndex))),
|
|
@@ -660,7 +653,7 @@ var Article = function Article(props) {
|
|
|
660
653
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound }))
|
|
661
654
|
),
|
|
662
655
|
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
663
|
-
|
|
656
|
+
renderRelatedSection(),
|
|
664
657
|
React__default.createElement(BlockContent, _extends({
|
|
665
658
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
666
659
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex))),
|
|
@@ -703,7 +696,7 @@ var Article = function Article(props) {
|
|
|
703
696
|
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
704
697
|
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
|
|
705
698
|
),
|
|
706
|
-
|
|
699
|
+
renderRelatedSection(),
|
|
707
700
|
React__default.createElement(BlockContent, _extends({
|
|
708
701
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
709
702
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex2))),
|
|
@@ -721,7 +714,7 @@ var Article = function Article(props) {
|
|
|
721
714
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
722
715
|
}, client.config())),
|
|
723
716
|
React__default.createElement('span', { className: 'clearfix' }),
|
|
724
|
-
|
|
717
|
+
renderRelatedSection(),
|
|
725
718
|
React__default.createElement(BlockContent, _extends({
|
|
726
719
|
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
|
|
727
720
|
blocks: [].concat(_toConsumableArray(articleBody.slice(_selectedIndex3))),
|
|
@@ -1030,12 +1023,9 @@ var getRelatedContents = function () {
|
|
|
1030
1023
|
current: null
|
|
1031
1024
|
} : _article$url;
|
|
1032
1025
|
url = _article$url.current, content_placement = article.content_placement, documentGroupMapping = article.documentGroupMapping, issueGroup = article.issueGroup;
|
|
1033
|
-
params = {
|
|
1034
|
-
url: url
|
|
1035
|
-
};
|
|
1026
|
+
params = { url: url };
|
|
1036
1027
|
conditions = '';
|
|
1037
1028
|
|
|
1038
|
-
//404 articles were throwing server error
|
|
1039
1029
|
|
|
1040
1030
|
if (content_placement && content_placement.length > 0) {
|
|
1041
1031
|
taxonomy = [];
|
|
@@ -1100,7 +1090,7 @@ var getRelatedContents = function () {
|
|
|
1100
1090
|
break;
|
|
1101
1091
|
}
|
|
1102
1092
|
|
|
1103
|
-
relatedContentQuery = '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory.name != \'Poll\'\n && contentCategory.name != \'Slideshows\'\n \t&& contentCategory.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n && published <= \'' + new Date().toISOString() + '\'\n ' + conditions + '\n
|
|
1093
|
+
relatedContentQuery = '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && passwordLock != true\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory.name != \'Poll\'\n && contentCategory.name != \'Slideshows\'\n \t&& contentCategory.disableAds != \'true\'\n && ExcludeFromInfiniteScroll != true\n && url.current != $url\n && !defined(body[].videos)\n && published <= \'' + new Date().toISOString() + '\'\n ' + conditions + '\n ]| order(published desc)[' + articleCount + ']\n {\n title,\n url,\n thumbnail\n }';
|
|
1104
1094
|
_context.prev = 11;
|
|
1105
1095
|
_context.next = 14;
|
|
1106
1096
|
return client.fetch(relatedContentQuery, params);
|