@mjhls/mjh-framework 1.0.389 → 1.0.391
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/index.js +285 -285
- package/dist/esm/index.js +285 -286
- package/package.json +1 -2
package/dist/cjs/index.js
CHANGED
|
@@ -6412,170 +6412,6 @@ var TableShow = function TableShow(_ref) {
|
|
|
6412
6412
|
);
|
|
6413
6413
|
};
|
|
6414
6414
|
|
|
6415
|
-
var download = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
6416
|
-
//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage
|
|
6417
|
-
// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime
|
|
6418
|
-
// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs
|
|
6419
|
-
// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.
|
|
6420
|
-
// v4 adds AMD/UMD, commonJS, and plain browser support
|
|
6421
|
-
// v4.1 adds url download capability via solo URL argument (same domain/CORS only)
|
|
6422
|
-
// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors
|
|
6423
|
-
// https://github.com/rndme/download
|
|
6424
|
-
|
|
6425
|
-
(function (root, factory) {
|
|
6426
|
-
{
|
|
6427
|
-
// Node. Does not work with strict CommonJS, but
|
|
6428
|
-
// only CommonJS-like environments that support module.exports,
|
|
6429
|
-
// like Node.
|
|
6430
|
-
module.exports = factory();
|
|
6431
|
-
}
|
|
6432
|
-
}(_commonjsHelpers.commonjsGlobal, function () {
|
|
6433
|
-
|
|
6434
|
-
return function download(data, strFileName, strMimeType) {
|
|
6435
|
-
|
|
6436
|
-
var self = window, // this script is only for browsers anyway...
|
|
6437
|
-
defaultMime = "application/octet-stream", // this default mime also triggers iframe downloads
|
|
6438
|
-
mimeType = strMimeType || defaultMime,
|
|
6439
|
-
payload = data,
|
|
6440
|
-
url = !strFileName && !strMimeType && payload,
|
|
6441
|
-
anchor = document.createElement("a"),
|
|
6442
|
-
toString = function(a){return String(a);},
|
|
6443
|
-
myBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),
|
|
6444
|
-
fileName = strFileName || "download",
|
|
6445
|
-
blob,
|
|
6446
|
-
reader;
|
|
6447
|
-
myBlob= myBlob.call ? myBlob.bind(self) : Blob ;
|
|
6448
|
-
|
|
6449
|
-
if(String(this)==="true"){ //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback
|
|
6450
|
-
payload=[payload, mimeType];
|
|
6451
|
-
mimeType=payload[0];
|
|
6452
|
-
payload=payload[1];
|
|
6453
|
-
}
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
if(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument
|
|
6457
|
-
fileName = url.split("/").pop().split("?")[0];
|
|
6458
|
-
anchor.href = url; // assign href prop to temp anchor
|
|
6459
|
-
if(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:
|
|
6460
|
-
var ajax=new XMLHttpRequest();
|
|
6461
|
-
ajax.open( "GET", url, true);
|
|
6462
|
-
ajax.responseType = 'blob';
|
|
6463
|
-
ajax.onload= function(e){
|
|
6464
|
-
download(e.target.response, fileName, defaultMime);
|
|
6465
|
-
};
|
|
6466
|
-
setTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:
|
|
6467
|
-
return ajax;
|
|
6468
|
-
} // end if valid url?
|
|
6469
|
-
} // end if url?
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
//go ahead and download dataURLs right away
|
|
6473
|
-
if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(payload)){
|
|
6474
|
-
|
|
6475
|
-
if(payload.length > (1024*1024*1.999) && myBlob !== toString ){
|
|
6476
|
-
payload=dataUrlToBlob(payload);
|
|
6477
|
-
mimeType=payload.type || defaultMime;
|
|
6478
|
-
}else {
|
|
6479
|
-
return navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:
|
|
6480
|
-
navigator.msSaveBlob(dataUrlToBlob(payload), fileName) :
|
|
6481
|
-
saver(payload) ; // everyone else can save dataURLs un-processed
|
|
6482
|
-
}
|
|
6483
|
-
|
|
6484
|
-
}else {//not data url, is it a string with special needs?
|
|
6485
|
-
if(/([\x80-\xff])/.test(payload)){
|
|
6486
|
-
var i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;
|
|
6487
|
-
for(i;i<mx;++i) tempUiArr[i]= payload.charCodeAt(i);
|
|
6488
|
-
payload=new myBlob([tempUiArr], {type: mimeType});
|
|
6489
|
-
}
|
|
6490
|
-
}
|
|
6491
|
-
blob = payload instanceof myBlob ?
|
|
6492
|
-
payload :
|
|
6493
|
-
new myBlob([payload], {type: mimeType}) ;
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
function dataUrlToBlob(strUrl) {
|
|
6497
|
-
var parts= strUrl.split(/[:;,]/),
|
|
6498
|
-
type= parts[1],
|
|
6499
|
-
decoder= parts[2] == "base64" ? atob : decodeURIComponent,
|
|
6500
|
-
binData= decoder( parts.pop() ),
|
|
6501
|
-
mx= binData.length,
|
|
6502
|
-
i= 0,
|
|
6503
|
-
uiArr= new Uint8Array(mx);
|
|
6504
|
-
|
|
6505
|
-
for(i;i<mx;++i) uiArr[i]= binData.charCodeAt(i);
|
|
6506
|
-
|
|
6507
|
-
return new myBlob([uiArr], {type: type});
|
|
6508
|
-
}
|
|
6509
|
-
|
|
6510
|
-
function saver(url, winMode){
|
|
6511
|
-
|
|
6512
|
-
if ('download' in anchor) { //html5 A[download]
|
|
6513
|
-
anchor.href = url;
|
|
6514
|
-
anchor.setAttribute("download", fileName);
|
|
6515
|
-
anchor.className = "download-js-link";
|
|
6516
|
-
anchor.innerHTML = "downloading...";
|
|
6517
|
-
anchor.style.display = "none";
|
|
6518
|
-
document.body.appendChild(anchor);
|
|
6519
|
-
setTimeout(function() {
|
|
6520
|
-
anchor.click();
|
|
6521
|
-
document.body.removeChild(anchor);
|
|
6522
|
-
if(winMode===true){setTimeout(function(){ self.URL.revokeObjectURL(anchor.href);}, 250 );}
|
|
6523
|
-
}, 66);
|
|
6524
|
-
return true;
|
|
6525
|
-
}
|
|
6526
|
-
|
|
6527
|
-
// handle non-a[download] safari as best we can:
|
|
6528
|
-
if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent)) {
|
|
6529
|
-
if(/^data:/.test(url)) url="data:"+url.replace(/^data:([\w\/\-\+]+)/, defaultMime);
|
|
6530
|
-
if(!window.open(url)){ // popup blocked, offer direct download:
|
|
6531
|
-
if(confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")){ location.href=url; }
|
|
6532
|
-
}
|
|
6533
|
-
return true;
|
|
6534
|
-
}
|
|
6535
|
-
|
|
6536
|
-
//do iframe dataURL download (old ch+FF):
|
|
6537
|
-
var f = document.createElement("iframe");
|
|
6538
|
-
document.body.appendChild(f);
|
|
6539
|
-
|
|
6540
|
-
if(!winMode && /^data:/.test(url)){ // force a mime that will download:
|
|
6541
|
-
url="data:"+url.replace(/^data:([\w\/\-\+]+)/, defaultMime);
|
|
6542
|
-
}
|
|
6543
|
-
f.src=url;
|
|
6544
|
-
setTimeout(function(){ document.body.removeChild(f); }, 333);
|
|
6545
|
-
|
|
6546
|
-
}//end saver
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
if (navigator.msSaveBlob) { // IE10+ : (has Blob, but not a[download] or URL)
|
|
6552
|
-
return navigator.msSaveBlob(blob, fileName);
|
|
6553
|
-
}
|
|
6554
|
-
|
|
6555
|
-
if(self.URL){ // simple fast and modern way using Blob and URL:
|
|
6556
|
-
saver(self.URL.createObjectURL(blob), true);
|
|
6557
|
-
}else {
|
|
6558
|
-
// handle non-Blob()+non-URL browsers:
|
|
6559
|
-
if(typeof blob === "string" || blob.constructor===toString ){
|
|
6560
|
-
try{
|
|
6561
|
-
return saver( "data:" + mimeType + ";base64," + self.btoa(blob) );
|
|
6562
|
-
}catch(y){
|
|
6563
|
-
return saver( "data:" + mimeType + "," + encodeURIComponent(blob) );
|
|
6564
|
-
}
|
|
6565
|
-
}
|
|
6566
|
-
|
|
6567
|
-
// Blob but not URL support:
|
|
6568
|
-
reader=new FileReader();
|
|
6569
|
-
reader.onload=function(e){
|
|
6570
|
-
saver(this.result);
|
|
6571
|
-
};
|
|
6572
|
-
reader.readAsDataURL(blob);
|
|
6573
|
-
}
|
|
6574
|
-
return true;
|
|
6575
|
-
}; /* end download() */
|
|
6576
|
-
}));
|
|
6577
|
-
});
|
|
6578
|
-
|
|
6579
6415
|
var Media = function Media(_ref) {
|
|
6580
6416
|
var node = _ref.node,
|
|
6581
6417
|
client = _ref.client;
|
|
@@ -6664,9 +6500,7 @@ var Media = function Media(_ref) {
|
|
|
6664
6500
|
return React__default.createElement(
|
|
6665
6501
|
'a',
|
|
6666
6502
|
_extends$2._extends({}, uploadDoc.downloadMedia ? {
|
|
6667
|
-
|
|
6668
|
-
download(uploadDoc.asset.url);
|
|
6669
|
-
}
|
|
6503
|
+
href: uploadDoc.asset.url + '?dl='
|
|
6670
6504
|
} : { href: uploadDoc.asset.url, target: blank ? '_blank' : '_self', rel: 'noopener noreferrer' }, {
|
|
6671
6505
|
style: { paddingLeft: '4px', paddingRight: '4px' },
|
|
6672
6506
|
id: 'media-link' }),
|
|
@@ -15717,38 +15551,41 @@ var fbsHero = function fbsHero(props) {
|
|
|
15717
15551
|
'div',
|
|
15718
15552
|
{ className: 'article-hero' },
|
|
15719
15553
|
React__default.createElement(
|
|
15720
|
-
'
|
|
15721
|
-
{
|
|
15554
|
+
'div',
|
|
15555
|
+
{ className: 'fbs-top-article' },
|
|
15722
15556
|
React__default.createElement(
|
|
15723
15557
|
'div',
|
|
15724
|
-
{ className: 'fbs-top-article' },
|
|
15558
|
+
{ className: 'fbs-top-article--img' },
|
|
15725
15559
|
React__default.createElement(
|
|
15726
|
-
'
|
|
15727
|
-
{
|
|
15560
|
+
'a',
|
|
15561
|
+
{ href: '/view/' + topArticle.url.current },
|
|
15728
15562
|
React__default.createElement('img', { src: topArticleThumbnail, alt: topArticleAltText })
|
|
15729
|
-
)
|
|
15563
|
+
)
|
|
15564
|
+
),
|
|
15565
|
+
React__default.createElement(
|
|
15566
|
+
'div',
|
|
15567
|
+
{ className: 'fbs-top-article--body' },
|
|
15730
15568
|
React__default.createElement(
|
|
15731
|
-
'
|
|
15732
|
-
{
|
|
15569
|
+
'a',
|
|
15570
|
+
{ href: '/view/' + topArticle.url.current },
|
|
15733
15571
|
React__default.createElement(
|
|
15734
15572
|
'h1',
|
|
15735
15573
|
null,
|
|
15736
15574
|
topArticle.title
|
|
15737
|
-
)
|
|
15575
|
+
)
|
|
15576
|
+
),
|
|
15577
|
+
React__default.createElement(
|
|
15578
|
+
'p',
|
|
15579
|
+
null,
|
|
15580
|
+
moment.moment(topArticle.published).format(removeTimeStamp ? 'MMMM DD, YYYY' : 'MMMM DD, YYYY hh:mma')
|
|
15581
|
+
),
|
|
15582
|
+
topArticle.authorMapping && topArticle.authorMapping.length > 0 && React__default.createElement(
|
|
15583
|
+
'div',
|
|
15584
|
+
{ className: 'author-wrapper' },
|
|
15738
15585
|
React__default.createElement(
|
|
15739
|
-
|
|
15740
|
-
|
|
15741
|
-
|
|
15742
|
-
),
|
|
15743
|
-
topArticle.authorMapping && topArticle.authorMapping[0] && React__default.createElement(
|
|
15744
|
-
'p',
|
|
15745
|
-
null,
|
|
15746
|
-
'By ',
|
|
15747
|
-
React__default.createElement(
|
|
15748
|
-
'b',
|
|
15749
|
-
null,
|
|
15750
|
-
topArticle.authorMapping[0].displayName
|
|
15751
|
-
)
|
|
15586
|
+
index$1.LazyLoad,
|
|
15587
|
+
{ height: 50 },
|
|
15588
|
+
React__default.createElement(AuthorComponent.AuthorComponent, { key: topArticle.url.current, index: topArticle.url.current, authors: topArticle.authorMapping })
|
|
15752
15589
|
)
|
|
15753
15590
|
)
|
|
15754
15591
|
)
|
|
@@ -15767,31 +15604,34 @@ var fbsHero = function fbsHero(props) {
|
|
|
15767
15604
|
}
|
|
15768
15605
|
|
|
15769
15606
|
return React__default.createElement(
|
|
15770
|
-
'
|
|
15771
|
-
{ key: index,
|
|
15772
|
-
React__default.createElement(
|
|
15607
|
+
'div',
|
|
15608
|
+
{ key: index, className: 'fbs-sub-article' },
|
|
15609
|
+
React__default.createElement(
|
|
15610
|
+
'a',
|
|
15611
|
+
{ href: '/view/' + article.url.current },
|
|
15612
|
+
React__default.createElement('img', { src: articleThumbnail, alt: articleAltText })
|
|
15613
|
+
),
|
|
15773
15614
|
React__default.createElement(
|
|
15774
15615
|
'div',
|
|
15775
15616
|
null,
|
|
15776
15617
|
React__default.createElement(
|
|
15777
|
-
'
|
|
15778
|
-
{
|
|
15779
|
-
|
|
15618
|
+
'a',
|
|
15619
|
+
{ href: '/view/' + article.url.current },
|
|
15620
|
+
React__default.createElement(
|
|
15621
|
+
'h2',
|
|
15622
|
+
{ className: 'fbs-sub-article--title' },
|
|
15623
|
+
article.title
|
|
15624
|
+
)
|
|
15780
15625
|
),
|
|
15781
15626
|
React__default.createElement(
|
|
15782
15627
|
'p',
|
|
15783
15628
|
null,
|
|
15784
15629
|
moment.moment(article.published).format(removeTimeStamp ? 'MMMM DD, YYYY' : 'MMMM DD, YYYY hh:mma')
|
|
15785
15630
|
),
|
|
15786
|
-
article.authorMapping && article.authorMapping
|
|
15787
|
-
|
|
15788
|
-
|
|
15789
|
-
|
|
15790
|
-
React__default.createElement(
|
|
15791
|
-
'b',
|
|
15792
|
-
null,
|
|
15793
|
-
article.authorMapping[0].displayName
|
|
15794
|
-
)
|
|
15631
|
+
article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
|
|
15632
|
+
index$1.LazyLoad,
|
|
15633
|
+
{ height: 50 },
|
|
15634
|
+
React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
15795
15635
|
)
|
|
15796
15636
|
)
|
|
15797
15637
|
);
|
|
@@ -15800,7 +15640,7 @@ var fbsHero = function fbsHero(props) {
|
|
|
15800
15640
|
React__default.createElement(
|
|
15801
15641
|
'style',
|
|
15802
15642
|
{ jsx: 'true' },
|
|
15803
|
-
'\n .article-hero {\n margin-bottom: 1rem;\n border-bottom: 1px solid #ddd;\n padding-bottom: 0.5rem;\n }\n .fbs-top-article {\n width: 100%;\n margin-bottom: 1rem;\n padding-bottom: 1rem;\n border-bottom: 1px solid #ddd;\n }\n .fbs-top-article img {\n width: 100%;\n\n max-height: 300px;\n min-height: 275px;\n object-fit: cover;\n
|
|
15643
|
+
'\n .author-wrapper {\n text-align: center;\n }\n .article-hero {\n margin-bottom: 1rem;\n border-bottom: 1px solid #ddd;\n padding-bottom: 0.5rem;\n }\n .fbs-top-article {\n width: 100%;\n margin-bottom: 1rem;\n padding-bottom: 1rem;\n border-bottom: 1px solid #ddd;\n }\n .fbs-top-article img {\n width: 100%;\n\n max-height: 300px;\n min-height: 275px;\n object-fit: cover;\n }\n\n .fbs-top-article--body {\n }\n .fbs-top-article--body h1 {\n color: #252525 !important;\n font-size: 1.6rem;\n font-weight: bold;\n text-align: center;\n margin-top: 1rem;\n }\n .fbs-top-article--body p {\n text-align: center;\n margin-bottom: 0;\n color: #252525;\n }\n .fbs-top-article--body p:first-of-type {\n font-size: 0.9rem;\n }\n .fbs-sub-article-container {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n padding-top: 1.75rem;\n margin-left: -1rem;\n margin-rigth: -1rem;\n }\n .fbs-sub-article {\n width: calc(50% - 2rem);\n min-width: 350px;\n display: flex;\n flex-direction: row;\n flex: 1 1 auto;\n margin: 0 1rem 1.75rem;\n }\n .fbs-sub-article img {\n margin-right: 1rem;\n width: 145px;\n min-width: 145px;\n max-height: 100px;\n object-fit: cover;\n }\n .fbs-sub-article p {\n margin-bottom: 0;\n font-size: 0.8rem;\n color: #252525;\n }\n .fbs-sub-article .fbs-sub-article--title {\n font-weight: bold;\n font-size: 1rem;\n color: #252525;\n }\n '
|
|
15804
15644
|
)
|
|
15805
15645
|
);
|
|
15806
15646
|
};
|
|
@@ -16032,31 +15872,38 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
|
|
|
16032
15872
|
articleThumbnail = props.thumbnail;
|
|
16033
15873
|
}
|
|
16034
15874
|
return React__default.createElement(
|
|
16035
|
-
'
|
|
16036
|
-
{ key: index,
|
|
15875
|
+
'div',
|
|
15876
|
+
{ key: index, className: 'sub-article' },
|
|
16037
15877
|
React__default.createElement(
|
|
16038
|
-
'
|
|
16039
|
-
|
|
16040
|
-
React__default.createElement(
|
|
15878
|
+
'a',
|
|
15879
|
+
{ href: '/view/' + article.url.current },
|
|
15880
|
+
React__default.createElement(
|
|
15881
|
+
'figure',
|
|
15882
|
+
null,
|
|
15883
|
+
React__default.createElement('img', { src: articleThumbnail, alt: articleAltText })
|
|
15884
|
+
)
|
|
16041
15885
|
),
|
|
16042
15886
|
React__default.createElement(
|
|
16043
15887
|
'div',
|
|
16044
15888
|
{ className: 'sub-article--body' },
|
|
16045
15889
|
React__default.createElement(
|
|
16046
|
-
'
|
|
16047
|
-
|
|
16048
|
-
|
|
15890
|
+
'a',
|
|
15891
|
+
{ href: '/view/' + article.url.current },
|
|
15892
|
+
React__default.createElement(
|
|
15893
|
+
'h2',
|
|
15894
|
+
null,
|
|
15895
|
+
article.title
|
|
15896
|
+
)
|
|
16049
15897
|
),
|
|
16050
15898
|
React__default.createElement('div', null),
|
|
16051
15899
|
moment.moment(article.published).format(removeTimeStamp ? 'MMMM DD, YYYY' : 'MMMM Do YYYY, h:mma'),
|
|
16052
|
-
article.authorMapping && article.authorMapping
|
|
16053
|
-
'
|
|
16054
|
-
{ className: '
|
|
16055
|
-
'By ',
|
|
15900
|
+
article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
|
|
15901
|
+
'div',
|
|
15902
|
+
{ className: 'author-wrapper' },
|
|
16056
15903
|
React__default.createElement(
|
|
16057
|
-
|
|
16058
|
-
|
|
16059
|
-
article.authorMapping
|
|
15904
|
+
index$1.LazyLoad,
|
|
15905
|
+
{ height: 50 },
|
|
15906
|
+
React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
16060
15907
|
)
|
|
16061
15908
|
)
|
|
16062
15909
|
)
|
|
@@ -16080,31 +15927,38 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
|
|
|
16080
15927
|
articleThumbnail = props.thumbnail;
|
|
16081
15928
|
}
|
|
16082
15929
|
return React__default.createElement(
|
|
16083
|
-
'
|
|
16084
|
-
{ key: index,
|
|
15930
|
+
'div',
|
|
15931
|
+
{ key: index, className: 'sub-article' },
|
|
16085
15932
|
React__default.createElement(
|
|
16086
|
-
'
|
|
16087
|
-
|
|
16088
|
-
React__default.createElement(
|
|
15933
|
+
'a',
|
|
15934
|
+
{ href: '/view/' + article.url.current },
|
|
15935
|
+
React__default.createElement(
|
|
15936
|
+
'figure',
|
|
15937
|
+
null,
|
|
15938
|
+
React__default.createElement('img', { src: articleThumbnail, alt: articleAltText })
|
|
15939
|
+
)
|
|
16089
15940
|
),
|
|
16090
15941
|
React__default.createElement(
|
|
16091
15942
|
'div',
|
|
16092
15943
|
{ className: 'sub-article--body' },
|
|
16093
15944
|
React__default.createElement(
|
|
16094
|
-
'
|
|
16095
|
-
|
|
16096
|
-
|
|
15945
|
+
'a',
|
|
15946
|
+
{ href: '/view/' + article.url.current },
|
|
15947
|
+
React__default.createElement(
|
|
15948
|
+
'h2',
|
|
15949
|
+
null,
|
|
15950
|
+
article.title
|
|
15951
|
+
)
|
|
16097
15952
|
),
|
|
16098
15953
|
React__default.createElement('div', null),
|
|
16099
15954
|
moment.moment(article.published).format(removeTimeStamp ? 'MMMM DD, YYYY' : 'MMMM Do YYYY, h:mma'),
|
|
16100
|
-
article.authorMapping && article.authorMapping
|
|
16101
|
-
'
|
|
16102
|
-
{ className: '
|
|
16103
|
-
'By ',
|
|
15955
|
+
article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
|
|
15956
|
+
'div',
|
|
15957
|
+
{ className: 'author-wrapper' },
|
|
16104
15958
|
React__default.createElement(
|
|
16105
|
-
|
|
16106
|
-
|
|
16107
|
-
article.authorMapping
|
|
15959
|
+
index$1.LazyLoad,
|
|
15960
|
+
{ height: 50 },
|
|
15961
|
+
React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
16108
15962
|
)
|
|
16109
15963
|
)
|
|
16110
15964
|
)
|
|
@@ -16124,31 +15978,38 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
|
|
|
16124
15978
|
articleThumbnail = props.thumbnail;
|
|
16125
15979
|
}
|
|
16126
15980
|
return React__default.createElement(
|
|
16127
|
-
'
|
|
16128
|
-
{ key: index,
|
|
15981
|
+
'div',
|
|
15982
|
+
{ key: index, className: 'sub-article' },
|
|
16129
15983
|
React__default.createElement(
|
|
16130
|
-
'
|
|
16131
|
-
|
|
16132
|
-
React__default.createElement(
|
|
15984
|
+
'a',
|
|
15985
|
+
{ href: '/view/' + article.url.current },
|
|
15986
|
+
React__default.createElement(
|
|
15987
|
+
'figure',
|
|
15988
|
+
null,
|
|
15989
|
+
React__default.createElement('img', { src: articleThumbnail, alt: articleAltText })
|
|
15990
|
+
)
|
|
16133
15991
|
),
|
|
16134
15992
|
React__default.createElement(
|
|
16135
15993
|
'div',
|
|
16136
15994
|
{ className: 'sub-article--body' },
|
|
16137
15995
|
React__default.createElement(
|
|
16138
|
-
'
|
|
16139
|
-
|
|
16140
|
-
|
|
15996
|
+
'a',
|
|
15997
|
+
{ href: '/view/' + article.url.current },
|
|
15998
|
+
React__default.createElement(
|
|
15999
|
+
'h2',
|
|
16000
|
+
null,
|
|
16001
|
+
article.title
|
|
16002
|
+
)
|
|
16141
16003
|
),
|
|
16142
16004
|
React__default.createElement('div', null),
|
|
16143
16005
|
moment.moment(article.published).format(removeTimeStamp ? 'MMMM DD, YYYY' : 'MMMM Do YYYY, h:mma'),
|
|
16144
|
-
article.authorMapping && article.authorMapping
|
|
16145
|
-
'
|
|
16146
|
-
{ className: '
|
|
16147
|
-
'By ',
|
|
16006
|
+
article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
|
|
16007
|
+
'div',
|
|
16008
|
+
{ className: 'author-wrapper' },
|
|
16148
16009
|
React__default.createElement(
|
|
16149
|
-
|
|
16150
|
-
|
|
16151
|
-
article.authorMapping
|
|
16010
|
+
index$1.LazyLoad,
|
|
16011
|
+
{ height: 50 },
|
|
16012
|
+
React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
16152
16013
|
)
|
|
16153
16014
|
)
|
|
16154
16015
|
)
|
|
@@ -16159,7 +16020,7 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
|
|
|
16159
16020
|
React__default.createElement(
|
|
16160
16021
|
'style',
|
|
16161
16022
|
{ jsx: 'true' },
|
|
16162
|
-
'\n .article-hero-container {\n margin: 0 -0.8rem;\n }\n @media screen and (min-width: 1400px) {\n .article-hero-container {\n display: flex;\n flex-direction: row;\n margin-bottom: 30px;\n }\n .top-outer {\n width: 50%;\n }\n .sub-outer-container {\n width: 50%;\n }\n }\n .top-article {\n // width: 50%;\n margin: 0 1rem;\n height: 100%;\n display: block;\n }\n .top-article figure {\n width: 100%;\n height: 60%;\n }\n .top-article figure img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n .top-article--body h1 {\n font-size: 1.4rem;\n color: black !important;\n font-weight: bold;\n }\n // .sub-articles-container {\n // width: 50%;\n // flex: 1 1 auto;\n // min-width: 350px;\n // }\n .sub-article {\n margin: 0 1rem 1rem;\n display: flex;\n flex-direction: row;\n }\n .sub-article figure {\n width: 125px;\n }\n .sub-article figure img {\n width: 125px;\n height: auto;\n object-fit: cover;\n }\n .sub-article--body {\n padding-left: 1rem;\n font-size: 0.9rem;\n }\n .sub-article--body h2 {\n font-size: 1rem;\n font-weight: bold;\n }\n @media screen and (max-width: 1368px) {\n .article-hero-container {\n flex-direction: column;\n }\n .top-article {\n // width: unset;\n flex: 1 1 auto;\n }\n .sub-articles-container {\n width: 100%;\n margin-top: 1rem;\n min-width: 280px;\n }\n }\n @media screen and (max-width: 1399px) and (min-width: 992px) {\n .top-article {\n // width: 50%;\n flex: 1 1 auto;\n margin-bottom: 1rem;\n }\n .middle-group {\n display: none;\n }\n .middle-single {\n display: block !important;\n margin-top: 0 !important;\n }\n .top-article figure img {\n max-height: 180px !important;\n }\n .top-article-summary {\n display: none;\n }\n }\n // @media only screen and (min-width) {\n // .sub-outer-container {\n // width: 50%;\n // flex: 1 1 auto;\n // min-width: 350px;\n // }\n // }\n .middle-single {\n display: none;\n }\n .top-outer {\n display: flex;\n }\n '
|
|
16023
|
+
'\n .article-hero-container {\n margin: 0 -0.8rem;\n }\n .author-wrapper {\n font-style: normal !important;\n }\n @media screen and (min-width: 1400px) {\n .article-hero-container {\n display: flex;\n flex-direction: row;\n margin-bottom: 30px;\n }\n .top-outer {\n width: 50%;\n }\n .sub-outer-container {\n width: 50%;\n }\n }\n .top-article {\n // width: 50%;\n margin: 0 1rem;\n height: 100%;\n display: block;\n }\n .top-article figure {\n width: 100%;\n height: 60%;\n }\n .top-article figure img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n .top-article--body h1 {\n font-size: 1.4rem;\n color: black !important;\n font-weight: bold;\n }\n // .sub-articles-container {\n // width: 50%;\n // flex: 1 1 auto;\n // min-width: 350px;\n // }\n .sub-article {\n margin: 0 1rem 1rem;\n display: flex;\n flex-direction: row;\n }\n .sub-article figure {\n width: 125px;\n }\n .sub-article figure img {\n width: 125px;\n height: auto;\n object-fit: cover;\n }\n .sub-article--body {\n padding-left: 1rem;\n font-size: 0.9rem;\n }\n .sub-article--body h2 {\n font-size: 1rem;\n font-weight: bold;\n }\n @media screen and (max-width: 1368px) {\n .article-hero-container {\n flex-direction: column;\n }\n .top-article {\n // width: unset;\n flex: 1 1 auto;\n }\n .sub-articles-container {\n width: 100%;\n margin-top: 1rem;\n min-width: 280px;\n }\n }\n @media screen and (max-width: 1399px) and (min-width: 992px) {\n .top-article {\n // width: 50%;\n flex: 1 1 auto;\n margin-bottom: 1rem;\n }\n .middle-group {\n display: none;\n }\n .middle-single {\n display: block !important;\n margin-top: 0 !important;\n }\n .top-article figure img {\n max-height: 180px !important;\n }\n .top-article-summary {\n display: none;\n }\n }\n // @media only screen and (min-width) {\n // .sub-outer-container {\n // width: 50%;\n // flex: 1 1 auto;\n // min-width: 350px;\n // }\n // }\n .middle-single {\n display: none;\n }\n .top-outer {\n display: flex;\n }\n '
|
|
16163
16024
|
)
|
|
16164
16025
|
);
|
|
16165
16026
|
};
|
|
@@ -16298,28 +16159,31 @@ var YahooHero = function YahooHero(props) {
|
|
|
16298
16159
|
}
|
|
16299
16160
|
|
|
16300
16161
|
return React__default.createElement(
|
|
16301
|
-
'
|
|
16302
|
-
{
|
|
16303
|
-
React__default.createElement('img', { src: articleThumbnail }),
|
|
16162
|
+
'div',
|
|
16163
|
+
{ key: index, className: 'yh-sub-article' },
|
|
16304
16164
|
React__default.createElement(
|
|
16305
|
-
'
|
|
16306
|
-
{
|
|
16307
|
-
|
|
16165
|
+
'a',
|
|
16166
|
+
{ href: '/view/' + article.url.current },
|
|
16167
|
+
React__default.createElement('img', { src: articleThumbnail })
|
|
16168
|
+
),
|
|
16169
|
+
React__default.createElement(
|
|
16170
|
+
'a',
|
|
16171
|
+
{ href: '/view/' + article.url.current },
|
|
16172
|
+
React__default.createElement(
|
|
16173
|
+
'h6',
|
|
16174
|
+
{ className: 'yh-sub-article--title' },
|
|
16175
|
+
article.title
|
|
16176
|
+
)
|
|
16308
16177
|
),
|
|
16309
16178
|
React__default.createElement(
|
|
16310
16179
|
'p',
|
|
16311
16180
|
{ className: 'yh-sub-article--info' },
|
|
16312
16181
|
moment.moment(article.published).format(removeTimeStamp ? 'MMMM DD, YYYY' : 'MMMM DD, YYYY hh:mma')
|
|
16313
16182
|
),
|
|
16314
|
-
article.authorMapping && article.authorMapping
|
|
16315
|
-
|
|
16316
|
-
|
|
16317
|
-
|
|
16318
|
-
React__default.createElement(
|
|
16319
|
-
'b',
|
|
16320
|
-
null,
|
|
16321
|
-
article.authorMapping[0].displayName
|
|
16322
|
-
)
|
|
16183
|
+
article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
|
|
16184
|
+
index$1.LazyLoad,
|
|
16185
|
+
{ height: 50 },
|
|
16186
|
+
React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
16323
16187
|
)
|
|
16324
16188
|
);
|
|
16325
16189
|
})
|
|
@@ -16327,7 +16191,7 @@ var YahooHero = function YahooHero(props) {
|
|
|
16327
16191
|
React__default.createElement(
|
|
16328
16192
|
'style',
|
|
16329
16193
|
{ jsx: 'true' },
|
|
16330
|
-
'\n .yh-top-article {\n display: flex;\n flex-direction: row;\n position: relative;\n font-family: Roboto, sans-serif;\n margin-bottom: 1rem;\n border-radius: 15px;\n overflow: hidden;\n min-height: 315px;\n }\n .yh-top-article--img {\n width: 100%;\n min-height: 240px;\n overflow: hidden;\n }\n .yh-top-article--img img {\n width: 100%;\n height: auto;\n min-height: 100%;\n max-height: 315px;\n object-fit: cover;\n }\n .yh-top-article--body {\n height: 100%;\n width: 40%;\n min-width: 320px;\n right: 0;\n position: absolute;\n color: white;\n padding: 1.75rem;\n height: 315px;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n flex-direction: column;\n }\n .yh-top-article--body h1 {\n color: white!important;\n font-size: 1.4rem;\n font-weight: 500;\n margin-bottom: 0.5rem;\n }\n .yh-top-article--body p {\n font-size: 0.9rem;\n margin-bottom: 0.5rem;\n }\n .yh-top-article--blur {\n height: 100%;\n width: 40%;\n right: 0;\n position: absolute;\n filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));\n background: rgba(0,0,0,.65);\n min-width: 320px;\n }\n .yh-sub-article-container {\n display: flex;\n justify-content: space-between;\n }\n .yh-sub-article {\n width: 23.25%;\n }\n .yh-sub-article p.yh-sub-article--title {\n font-weight: bold;\n }\n .yh-sub-article img {\n width: 100%;\n height: 150px;\n object-fit: cover;\n border-radius: 15px;\n }\n .yh-sub-article img[src=\'' + props.thumbnail + '\']{\n object-fit: contain;\n }\n .yh-sub-article--title {\n font-weight: bold;\n margin-top: .25rem;\n font-size: 1rem;\n margin-bottom: .25rem;\n }\n .yh-sub-article--info {\n font-size: .8rem;\n margin-bottom: 0;\n\n }\n @media screen and (max-width: 968px) {\n .yh-sub-article-container {\n flex-wrap: wrap;\n }\n .yh-sub-article {\n width: 48%;\n margin-bottom: 1rem;\n }\n }\n '
|
|
16194
|
+
'\n .article-hero{\n padding-bottom:15px\n }\n .yh-top-article {\n display: flex;\n flex-direction: row;\n position: relative;\n font-family: Roboto, sans-serif;\n margin-bottom: 1rem;\n border-radius: 15px;\n overflow: hidden;\n min-height: 315px;\n }\n .yh-top-article--img {\n width: 100%;\n min-height: 240px;\n overflow: hidden;\n }\n .yh-top-article--img img {\n width: 100%;\n height: auto;\n min-height: 100%;\n max-height: 315px;\n object-fit: cover;\n }\n .yh-top-article--body {\n height: 100%;\n width: 40%;\n min-width: 320px;\n right: 0;\n position: absolute;\n color: white;\n padding: 1.75rem;\n height: 315px;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n flex-direction: column;\n }\n .yh-top-article--body h1 {\n color: white!important;\n font-size: 1.4rem;\n font-weight: 500;\n margin-bottom: 0.5rem;\n }\n .yh-top-article--body p {\n font-size: 0.9rem;\n margin-bottom: 0.5rem;\n }\n .yh-top-article--blur {\n height: 100%;\n width: 40%;\n right: 0;\n position: absolute;\n filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));\n background: rgba(0,0,0,.65);\n min-width: 320px;\n }\n .yh-sub-article-container {\n display: flex;\n justify-content: space-between;\n }\n .yh-sub-article {\n width: 23.25%;\n }\n .yh-sub-article p.yh-sub-article--title {\n font-weight: bold;\n }\n .yh-sub-article img {\n width: 100%;\n height: 150px;\n object-fit: cover;\n border-radius: 15px;\n }\n .yh-sub-article img[src=\'' + props.thumbnail + '\']{\n object-fit: contain;\n }\n .yh-sub-article--title {\n font-weight: bold;\n margin-top: .25rem;\n font-size: 1rem;\n margin-bottom: .25rem;\n }\n .yh-sub-article--info {\n font-size: .8rem;\n margin-bottom: 0;\n\n }\n @media screen and (max-width: 968px) {\n .yh-sub-article-container {\n flex-wrap: wrap;\n }\n .yh-sub-article {\n width: 48%;\n margin-bottom: 1rem;\n }\n }\n '
|
|
16331
16195
|
)
|
|
16332
16196
|
);
|
|
16333
16197
|
};
|
|
@@ -17486,25 +17350,21 @@ var renderAuthor$1 = function renderAuthor(authorName, authorURL, index, length)
|
|
|
17486
17350
|
|
|
17487
17351
|
if (authorName && authorURL) {
|
|
17488
17352
|
return React__default.createElement(
|
|
17489
|
-
'
|
|
17490
|
-
|
|
17491
|
-
|
|
17492
|
-
|
|
17493
|
-
'
|
|
17494
|
-
|
|
17495
|
-
|
|
17496
|
-
|
|
17353
|
+
'span',
|
|
17354
|
+
null,
|
|
17355
|
+
React__default.createElement(
|
|
17356
|
+
'a',
|
|
17357
|
+
{ href: '/' + defaultUrl + '/' + authorURL.current, key: index },
|
|
17358
|
+
authorName
|
|
17359
|
+
),
|
|
17360
|
+
length !== index + 1 && ' , '
|
|
17497
17361
|
);
|
|
17498
17362
|
} else if (authorName) {
|
|
17499
17363
|
return React__default.createElement(
|
|
17500
17364
|
'span',
|
|
17501
17365
|
{ key: index },
|
|
17502
17366
|
authorName,
|
|
17503
|
-
length !== index + 1 &&
|
|
17504
|
-
'span',
|
|
17505
|
-
{ style: { paddingLeft: 7, paddingRight: 7 } },
|
|
17506
|
-
'|'
|
|
17507
|
-
)
|
|
17367
|
+
length !== index + 1 && ' , '
|
|
17508
17368
|
);
|
|
17509
17369
|
}
|
|
17510
17370
|
};
|
|
@@ -17652,7 +17512,7 @@ var Article = function Article(props) {
|
|
|
17652
17512
|
|
|
17653
17513
|
if (ele['_type'] === 'block' && ele.children.some(function (child) {
|
|
17654
17514
|
return child.text.trim().length > 0;
|
|
17655
|
-
}) && ele['listItem'] !== 'bullet' && ele['style'] === 'normal') {
|
|
17515
|
+
}) && ele['listItem'] !== 'bullet' && ele['style'] === 'normal' || ele['_type'] === 'figure') {
|
|
17656
17516
|
indexes.push(arr.indexOf(ele));
|
|
17657
17517
|
}
|
|
17658
17518
|
}
|
|
@@ -17674,10 +17534,13 @@ var Article = function Article(props) {
|
|
|
17674
17534
|
return indexes;
|
|
17675
17535
|
};
|
|
17676
17536
|
var indexes = findIndex(body);
|
|
17677
|
-
if (indexes.length >= 2 && body.length > 3 && payload.contextualAD) {
|
|
17537
|
+
if (indexes.length >= 2 && body.length > 3 && payload.contextualAD && payload.contextualVideoAD) {
|
|
17678
17538
|
payload = _extends$2._extends({}, payload, {
|
|
17679
17539
|
contextualAD: _extends$2._extends({}, payload.contextualAD, {
|
|
17680
17540
|
slotId: (payload.contextualAD.slotId || 'native-ad') + '-' + payload._id
|
|
17541
|
+
}),
|
|
17542
|
+
contextualVideoAD: _extends$2._extends({}, payload.contextualVideoAD, {
|
|
17543
|
+
slotId: (payload.contextualVideoAD.slotId || 'in-context_video') + '-' + payload._id
|
|
17681
17544
|
})
|
|
17682
17545
|
});
|
|
17683
17546
|
var selectedIndex = indexes[1] + 1;
|
|
@@ -17690,9 +17553,19 @@ var Article = function Article(props) {
|
|
|
17690
17553
|
parent.style.display = 'none';
|
|
17691
17554
|
setContextualADFlag(false);
|
|
17692
17555
|
} else {
|
|
17693
|
-
|
|
17694
|
-
|
|
17695
|
-
|
|
17556
|
+
setContextualADFlag(true);
|
|
17557
|
+
}
|
|
17558
|
+
};
|
|
17559
|
+
|
|
17560
|
+
var checkIsVideoAdFound = function checkIsVideoAdFound(isFound) {
|
|
17561
|
+
if (!isFound) {
|
|
17562
|
+
var parent = document.getElementById('contextual-video-ad-' + payload._id);
|
|
17563
|
+
parent.style.height = '0%';
|
|
17564
|
+
parent.style.width = '0%';
|
|
17565
|
+
parent.style.display = 'none';
|
|
17566
|
+
setContextualADFlag(false);
|
|
17567
|
+
} else {
|
|
17568
|
+
setContextualADFlag(true);
|
|
17696
17569
|
}
|
|
17697
17570
|
};
|
|
17698
17571
|
|
|
@@ -17710,12 +17583,100 @@ var Article = function Article(props) {
|
|
|
17710
17583
|
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
17711
17584
|
React__default.createElement(AdSlot.DFPAdSlot, _extends$2._extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: checkIsAdFound }))
|
|
17712
17585
|
),
|
|
17586
|
+
React__default.createElement('span', { className: 'clearfix' }),
|
|
17587
|
+
React__default.createElement(
|
|
17588
|
+
'div',
|
|
17589
|
+
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
17590
|
+
React__default.createElement(AdSlot.DFPAdSlot, _extends$2._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
|
|
17591
|
+
),
|
|
17713
17592
|
React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
17714
17593
|
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false),
|
|
17715
17594
|
blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(selectedIndex))),
|
|
17716
17595
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
17717
17596
|
}, client.config()))
|
|
17718
17597
|
);
|
|
17598
|
+
} else if (indexes.length >= 2 && body.length > 3 && payload.contextualAD && !payload.contextualVideoAD) {
|
|
17599
|
+
payload = _extends$2._extends({}, payload, {
|
|
17600
|
+
contextualAD: _extends$2._extends({}, payload.contextualAD, {
|
|
17601
|
+
slotId: (payload.contextualAD.slotId || 'native-ad') + '-' + payload._id
|
|
17602
|
+
})
|
|
17603
|
+
});
|
|
17604
|
+
var _selectedIndex = indexes[1] + 1;
|
|
17605
|
+
|
|
17606
|
+
var _checkIsAdFound = function _checkIsAdFound(isFound) {
|
|
17607
|
+
if (!isFound) {
|
|
17608
|
+
var parent = document.getElementById('contextual-native-ad-' + payload._id);
|
|
17609
|
+
parent.style.height = '0%';
|
|
17610
|
+
parent.style.width = '0%';
|
|
17611
|
+
parent.style.display = 'none';
|
|
17612
|
+
setContextualADFlag(false);
|
|
17613
|
+
} else {
|
|
17614
|
+
setContextualADFlag(true);
|
|
17615
|
+
}
|
|
17616
|
+
};
|
|
17617
|
+
|
|
17618
|
+
return React__default.createElement(
|
|
17619
|
+
React__default.Fragment,
|
|
17620
|
+
null,
|
|
17621
|
+
React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
17622
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false, contextualADFlag),
|
|
17623
|
+
blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(0, _selectedIndex))),
|
|
17624
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
17625
|
+
}, client.config())),
|
|
17626
|
+
React__default.createElement('span', { className: 'clearfix' }),
|
|
17627
|
+
React__default.createElement(
|
|
17628
|
+
'div',
|
|
17629
|
+
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
17630
|
+
React__default.createElement(AdSlot.DFPAdSlot, _extends$2._extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound }))
|
|
17631
|
+
),
|
|
17632
|
+
React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
17633
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false),
|
|
17634
|
+
blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(_selectedIndex))),
|
|
17635
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
17636
|
+
}, client.config()))
|
|
17637
|
+
);
|
|
17638
|
+
} else if (indexes.length >= 2 && body.length > 3 && payload.contextualVideoAD && !payload.contextualAD) {
|
|
17639
|
+
payload = _extends$2._extends({}, payload, {
|
|
17640
|
+
contextualVideoAD: _extends$2._extends({}, payload.contextualVideoAD, {
|
|
17641
|
+
slotId: (payload.contextualVideoAD.slotId || 'in-context_video') + '-' + payload._id
|
|
17642
|
+
})
|
|
17643
|
+
});
|
|
17644
|
+
var _selectedIndex2 = indexes[1] + 1;
|
|
17645
|
+
|
|
17646
|
+
var _checkIsAdFound2 = function _checkIsAdFound2(isFound) {
|
|
17647
|
+
if (!isFound) {
|
|
17648
|
+
var parent = document.getElementById('contextual-video-ad-' + payload._id);
|
|
17649
|
+
parent.style.height = '0%';
|
|
17650
|
+
parent.style.width = '0%';
|
|
17651
|
+
parent.style.display = 'none';
|
|
17652
|
+
setContextualADFlag(false);
|
|
17653
|
+
} else {
|
|
17654
|
+
if (body && body[1] && body[1]._type === 'figure') {
|
|
17655
|
+
setContextualADFlag(true);
|
|
17656
|
+
}
|
|
17657
|
+
}
|
|
17658
|
+
};
|
|
17659
|
+
|
|
17660
|
+
return React__default.createElement(
|
|
17661
|
+
React__default.Fragment,
|
|
17662
|
+
null,
|
|
17663
|
+
React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
17664
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false, contextualADFlag),
|
|
17665
|
+
blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(0, _selectedIndex2))),
|
|
17666
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
17667
|
+
}, client.config())),
|
|
17668
|
+
React__default.createElement('span', { className: 'clearfix' }),
|
|
17669
|
+
React__default.createElement(
|
|
17670
|
+
'div',
|
|
17671
|
+
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
17672
|
+
React__default.createElement(AdSlot.DFPAdSlot, _extends$2._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
|
|
17673
|
+
),
|
|
17674
|
+
React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
17675
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false),
|
|
17676
|
+
blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(_selectedIndex2))),
|
|
17677
|
+
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
17678
|
+
}, client.config()))
|
|
17679
|
+
);
|
|
17719
17680
|
} else {
|
|
17720
17681
|
return React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
17721
17682
|
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false),
|
|
@@ -18130,6 +18091,9 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
18130
18091
|
visibilitySensor.InfiniteScroll,
|
|
18131
18092
|
{ dataLength: queueData.length, next: loadmore, scrollThreshold: '60%', hasMore: true, style: { overflow: 'hidden' } },
|
|
18132
18093
|
queueData.map(function (article, index) {
|
|
18094
|
+
if (!checkSponseredArticle(article) && Ads.getVideoContextualAD) {
|
|
18095
|
+
article.contextualVideoAD = Ads.getVideoContextualAD(getTargeting(article, 'in-context_video'));
|
|
18096
|
+
}
|
|
18133
18097
|
if (!checkSponseredArticle(article) && Ads.getNativeContextualAD) {
|
|
18134
18098
|
article.contextualAD = Ads.getNativeContextualAD(getTargeting(article, 'native-ad'));
|
|
18135
18099
|
}
|
|
@@ -18162,6 +18126,41 @@ var KMTracker = function KMTracker(props) {
|
|
|
18162
18126
|
}
|
|
18163
18127
|
};
|
|
18164
18128
|
|
|
18129
|
+
var getSeriesDetail = function getSeriesDetail(article, currentSeries) {
|
|
18130
|
+
//For use in getInitialProps to return series detail to display next/prev links when javascript is disabled
|
|
18131
|
+
if (!currentSeries) {
|
|
18132
|
+
return {
|
|
18133
|
+
seriesUrl: '',
|
|
18134
|
+
currentSeries: false,
|
|
18135
|
+
prevUrl: false,
|
|
18136
|
+
nextUrl: false
|
|
18137
|
+
|
|
18138
|
+
};
|
|
18139
|
+
}
|
|
18140
|
+
var nextUrl = false;
|
|
18141
|
+
var prevUrl = false;
|
|
18142
|
+
var galleryBody = article.body.find(function (body) {
|
|
18143
|
+
if (body._type == 'youtubeGallery') {
|
|
18144
|
+
return body;
|
|
18145
|
+
}
|
|
18146
|
+
});
|
|
18147
|
+
if (currentSeries >= 1 && currentSeries < galleryBody.videos.length) {
|
|
18148
|
+
nextUrl = '/view/' + article.url.current + '?seriesVid=' + (parseInt(currentSeries) + 1);
|
|
18149
|
+
}
|
|
18150
|
+
if (currentSeries > 1 && currentSeries <= galleryBody.videos.length) {
|
|
18151
|
+
prevUrl = '/view/' + article.url.current + '?seriesVid=' + (parseInt(currentSeries) - 1);
|
|
18152
|
+
}
|
|
18153
|
+
var seriesDetail = {
|
|
18154
|
+
seriesUrl: article.url.current,
|
|
18155
|
+
currentSeries: currentSeries,
|
|
18156
|
+
nextUrl: nextUrl,
|
|
18157
|
+
prevUrl: prevUrl,
|
|
18158
|
+
type: 'Video'
|
|
18159
|
+
};
|
|
18160
|
+
|
|
18161
|
+
return seriesDetail;
|
|
18162
|
+
};
|
|
18163
|
+
|
|
18165
18164
|
var returnFormField = function returnFormField(_ref) {
|
|
18166
18165
|
var name = _ref.name,
|
|
18167
18166
|
label = _ref.label,
|
|
@@ -22188,3 +22187,4 @@ exports.SocialShare = SocialShare$1;
|
|
|
22188
22187
|
exports.VerticalHero = VerticalHero;
|
|
22189
22188
|
exports.YahooHero = YahooHero;
|
|
22190
22189
|
exports.getSerializers = getSerializers;
|
|
22190
|
+
exports.getSeriesDetail = getSeriesDetail;
|