@mjhls/mjh-framework 1.0.241 → 1.0.243

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 CHANGED
@@ -1,7 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.241
3
-
4
-
2
+ # mjh-framework v. 1.0.243
5
3
 
6
4
 
7
5
  > Foundation Framework
package/dist/cjs/index.js CHANGED
@@ -12608,6 +12608,11 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
12608
12608
  client = _ref.client,
12609
12609
  getSerializers = _ref.getSerializers;
12610
12610
 
12611
+ var builder = index$1.imageUrlBuilder(client);
12612
+ function urlFor(source) {
12613
+ return builder.image(source);
12614
+ }
12615
+
12611
12616
  var router = Router.useRouter();
12612
12617
  //state
12613
12618
 
@@ -12616,15 +12621,20 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
12616
12621
  vidUrl = _useState2[0],
12617
12622
  setVidUrl = _useState2[1];
12618
12623
 
12619
- var _useState3 = React.useState(''),
12624
+ var _useState3 = React.useState('youtube'),
12620
12625
  _useState4 = slicedToArray._slicedToArray(_useState3, 2),
12621
- series = _useState4[0],
12622
- setSeries = _useState4[1];
12626
+ vidType = _useState4[0],
12627
+ setVidType = _useState4[1];
12623
12628
 
12624
- var _useState5 = React.useState([]),
12629
+ var _useState5 = React.useState(''),
12625
12630
  _useState6 = slicedToArray._slicedToArray(_useState5, 2),
12626
- seriesData = _useState6[0],
12627
- setData = _useState6[1];
12631
+ series = _useState6[0],
12632
+ setSeries = _useState6[1];
12633
+
12634
+ var _useState7 = React.useState([]),
12635
+ _useState8 = slicedToArray._slicedToArray(_useState7, 2),
12636
+ seriesData = _useState8[0],
12637
+ setData = _useState8[1];
12628
12638
  //variables
12629
12639
 
12630
12640
 
@@ -12635,19 +12645,32 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
12635
12645
  var params = new URL(document.location).searchParams;
12636
12646
  var seriesVid = params.get('seriesVid') || 1;
12637
12647
  var data = [];
12648
+
12638
12649
  nodes.videos.forEach(function (vid) {
12639
- data.push({ title: vid.title, thumbnail: 'https://img.youtube.com/vi/' + YoutubeGroup.getYoutubeId(vid.url) + '/hqdefault.jpg', url: vid.url });
12650
+ if (vid.type == 'mp4') {
12651
+ data.push({ title: vid.title, thumbnail: urlFor(vid.thumbnail.asset), url: vid.url });
12652
+ } else {
12653
+ data.push({ title: vid.title, thumbnail: 'https://img.youtube.com/vi/' + YoutubeGroup.getYoutubeId(vid.url) + '/hqdefault.jpg', url: vid.url });
12654
+ }
12640
12655
  });
12641
12656
  // if series number doesn't exist, route back to first vid of series
12657
+
12642
12658
  if (data.length < seriesVid) {
12643
12659
  setSeries(1);
12644
12660
  setVidUrl(nodes.videos[0].url);
12661
+ if (nodes.videos[0].type) {
12662
+ setVidType(nodes.videos[0].type);
12663
+ }
12664
+
12645
12665
  var newPath = '/' + get2 + '/' + get3 + '?seriesVid=1';
12646
12666
  var vidState = { vid_id: seriesVid };
12647
12667
  window.history.pushState(vidState, '', newPath);
12648
12668
  } else {
12649
12669
  setSeries(seriesVid);
12650
12670
  setVidUrl(nodes.videos[seriesVid - 1].url);
12671
+ if (nodes.videos[0].type) {
12672
+ setVidType(nodes.videos[seriesVid - 1].type);
12673
+ }
12651
12674
  }
12652
12675
  setData(data);
12653
12676
  }, []);
@@ -12717,9 +12740,14 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
12717
12740
  React__default.createElement(
12718
12741
  'div',
12719
12742
  { className: 'video-block', style: { position: 'relative', overflow: 'hidden' } },
12720
- vidUrl && React__default.createElement(YouTube, { videoId: YoutubeGroup.getYoutubeId(vidUrl), opts: opts, onEnd: function onEnd(e) {
12743
+ vidUrl && vidType == 'youtube' ? React__default.createElement(YouTube, { videoId: YoutubeGroup.getYoutubeId(vidUrl), opts: opts, onEnd: function onEnd(e) {
12721
12744
  return handleOnEnd(e);
12722
- } }),
12745
+ } }) : React__default.createElement(
12746
+ 'video',
12747
+ { style: { width: '100%' }, controls: true },
12748
+ React__default.createElement('source', { src: vidUrl, type: 'video/mp4' }),
12749
+ 'Your browser does not support the video tag.'
12750
+ ),
12723
12751
  React__default.createElement(
12724
12752
  'div',
12725
12753
  {
@@ -12765,7 +12793,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
12765
12793
  { className: 'mb-3' },
12766
12794
  nodes.videos[series - 1].title
12767
12795
  ),
12768
- nodes.videos[series - 1] && React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({ serializers: getSerializers, blocks: nodes.videos[series - 1].text, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
12796
+ nodes.videos[series - 1] && nodes.videos[series - 1].text && React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({ serializers: getSerializers, blocks: nodes.videos[series - 1].text, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
12769
12797
  ),
12770
12798
  React__default.createElement(
12771
12799
  'style',
@@ -14440,6 +14468,168 @@ var YahooHero = function YahooHero(props) {
14440
14468
  );
14441
14469
  };
14442
14470
 
14471
+ var GridHero = function GridHero(props) {
14472
+ var topArticle = props.dataRecord[0];
14473
+ var subArticles = props.dataRecord.slice(1, 3);
14474
+
14475
+ var client = props.client;
14476
+
14477
+ var builder = index$1.imageUrlBuilder(client);
14478
+ function urlFor(source) {
14479
+ return builder.image(source);
14480
+ }
14481
+
14482
+ var topArticleThumbnail = '';
14483
+ var topArticleAltText = topArticle.title;
14484
+ if (topArticle.thumbnail && topArticle.thumbnail.asset) {
14485
+ topArticleThumbnail = urlFor(topArticle.thumbnail.asset).width(600).url();
14486
+ topArticleAltText = topArticle.thumbnail.asset.originalFileName;
14487
+ } else if (props.thumbnail) {
14488
+ topArticleThumbnail = props.thumbnail;
14489
+ }
14490
+
14491
+ var renderAuthor = function renderAuthor(authorDetail, index, length) {
14492
+ if (authorDetail) {
14493
+ var _id = authorDetail._id,
14494
+ displayName = authorDetail.displayName,
14495
+ url = authorDetail.url;
14496
+
14497
+ if (displayName && url && url.current) {
14498
+ return React__default.createElement(
14499
+ 'div',
14500
+ { key: _id },
14501
+ index === 0 && React__default.createElement(
14502
+ 'span',
14503
+ { className: 'pr-1' },
14504
+ 'By'
14505
+ ),
14506
+ React__default.createElement(
14507
+ 'a',
14508
+ { href: '/authors/' + url.current, className: 'text-muted' },
14509
+ displayName,
14510
+ length !== index + 1 && React__default.createElement('br', null)
14511
+ )
14512
+ );
14513
+ } else if (displayName) {
14514
+ return React__default.createElement(
14515
+ 'div',
14516
+ { key: _id },
14517
+ index === 0 && React__default.createElement(
14518
+ 'span',
14519
+ { className: 'pr-1' },
14520
+ 'By'
14521
+ ),
14522
+ React__default.createElement(
14523
+ 'span',
14524
+ { className: 'text-muted' },
14525
+ displayName,
14526
+ length !== index + 1 && React__default.createElement('br', null)
14527
+ )
14528
+ );
14529
+ }
14530
+ } else return null;
14531
+ };
14532
+
14533
+ return React__default.createElement(
14534
+ 'div',
14535
+ { className: 'article-hero' },
14536
+ React__default.createElement(
14537
+ 'div',
14538
+ { className: 'grid-top-article' },
14539
+ topArticleThumbnail && React__default.createElement(
14540
+ 'a',
14541
+ { href: '/view/' + topArticle.url.current },
14542
+ React__default.createElement(
14543
+ 'div',
14544
+ { className: 'grid-top-article--img' },
14545
+ React__default.createElement('img', { src: topArticleThumbnail, alt: topArticleAltText })
14546
+ )
14547
+ ),
14548
+ React__default.createElement(
14549
+ 'div',
14550
+ { className: 'grid-top-article--body' },
14551
+ React__default.createElement(
14552
+ 'a',
14553
+ { href: '/view/' + topArticle.url.current },
14554
+ React__default.createElement(
14555
+ 'h1',
14556
+ null,
14557
+ topArticle.title
14558
+ )
14559
+ ),
14560
+ React__default.createElement(
14561
+ 'p',
14562
+ { className: 'article-date' },
14563
+ visibilitySensor.moment(topArticle.published).format('MMMM DD, YYYY ')
14564
+ ),
14565
+ topArticle.authorMapping && topArticle.authorMapping.length > 0 && topArticle.authorMapping.map(function (authorDetail, index) {
14566
+ return renderAuthor(authorDetail, index, topArticle.authorMapping.length);
14567
+ }),
14568
+ topArticle.summary && React__default.createElement(
14569
+ 'p',
14570
+ { className: 'top-article-summary' },
14571
+ entities.clean_html_1(topArticle.summary)
14572
+ )
14573
+ )
14574
+ ),
14575
+ React__default.createElement(
14576
+ 'div',
14577
+ { className: 'grid-sub-article-container' },
14578
+ subArticles.map(function (article, index) {
14579
+ var articleThumbnail = '';
14580
+ var articleAltText = article.title;
14581
+ if (article.thumbnail && article.thumbnail.asset) {
14582
+ articleThumbnail = urlFor(article.thumbnail.asset).width(480).height(270).url();
14583
+ articleAltText = article.thumbnail.asset.originalFileName;
14584
+ } else if (props.thumbnail) {
14585
+ articleThumbnail = props.thumbnail;
14586
+ }
14587
+
14588
+ return React__default.createElement(
14589
+ 'div',
14590
+ { key: index, className: 'grid-sub-article sub-grid-' + (index + 1) },
14591
+ React__default.createElement(
14592
+ 'a',
14593
+ { href: '/view/' + article.url.current },
14594
+ React__default.createElement('img', { src: articleThumbnail, alt: articleAltText })
14595
+ ),
14596
+ React__default.createElement(
14597
+ 'div',
14598
+ { className: 'grid-sub-article-body' },
14599
+ React__default.createElement(
14600
+ 'a',
14601
+ { href: '/view/' + article.url.current },
14602
+ React__default.createElement(
14603
+ 'h2',
14604
+ { className: 'grid-sub-article--title' },
14605
+ article.title
14606
+ )
14607
+ ),
14608
+ React__default.createElement(
14609
+ 'p',
14610
+ { className: 'article-date' },
14611
+ visibilitySensor.moment(article.published).format('MMMM DD, YYYY ')
14612
+ ),
14613
+ article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
14614
+ return renderAuthor(authorDetail, index, article.authorMapping.length);
14615
+ }),
14616
+ article.summary && React__default.createElement(
14617
+ 'p',
14618
+ { className: 'sub-article-summary' },
14619
+ entities.clean_html_1(article.summary)
14620
+ )
14621
+ )
14622
+ );
14623
+ })
14624
+ ),
14625
+ React__default.createElement(
14626
+ 'style',
14627
+ { jsx: 'true' },
14628
+ '\n .article-hero {\n margin-bottom: 1rem;\n border-bottom: 1px solid #ddd;\n padding-bottom: 0.5rem;\n margin-left: 15px;\n margin-right: 15px;\n }\n .grid-top-article {\n width: 100%;\n margin-bottom: 1rem;\n padding-bottom: 1rem;\n border-bottom: 5px solid var(--primary);\n box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.2);\n }\n .grid-top-article img {\n width: 100%;\n\n max-height: 300px;\n min-height: 275px;\n object-fit: cover;\n height: 112.5px;\n }\n\n .grid-top-article--body {\n padding: 1.25rem;\n }\n .grid-top-article--body h1 {\n color: #373a3c !important;\n margin-bottom: 0.25rem !important;\n font-weight: 600 !important;\n font-size: 1.6rem;\n font-size: 1.40625rem;\n line-height: 1.2;\n }\n .grid-top-article--body p {\n margin-bottom: 0;\n color: #252525;\n }\n\n .grid-sub-article-container {\n display: flex;\n flex-direction: row;\n padding-top: 1rem;\n }\n .grid-sub-article {\n width: 48%;\n margin-bottom: 1.75rem;\n }\n .grid-sub-article-body {\n padding: 1.25rem;\n }\n @media screen and (min-width: 992px) {\n .sub-grid-1 {\n margin-right: 2%;\n }\n .sub-grid-2 {\n margin-left: 2%;\n }\n }\n .grid-sub-article img {\n margin-right: 1rem;\n width: 100%;\n max-height: 240px;\n object-fit: contain;\n }\n .grid-sub-article p {\n margin-bottom: 0;\n\n color: #373a3c;\n }\n .grid-sub-article .grid-sub-article--title {\n color: #373a3c !important;\n margin-bottom: 0.25rem !important;\n font-weight: 600 !important;\n font-size: 1.6rem;\n font-size: 1.40625rem;\n line-height: 1.2;\n }\n .author-text {\n font-size: 0.9375rem;\n font-weight: 400;\n line-height: 1.5;\n }\n .author-text > span {\n color: #868e96 !important;\n }\n .article-date {\n font-style: italic;\n }\n .top-article-summary,\n .sub-article-summary {\n margin-top: 0.5rem;\n }\n\n @media screen and (max-width: 992px) {\n .grid-sub-article-container {\n flex-direction: column;\n }\n .grid-sub-article {\n width: 100%;\n }\n }\n '
14629
+ )
14630
+ );
14631
+ };
14632
+
14443
14633
  /*
14444
14634
  Sample query
14445
14635
  let references = ''
@@ -14494,7 +14684,7 @@ var RelatedContent = function RelatedContent(props) {
14494
14684
  dataRecord.map(function (article, index) {
14495
14685
  return React__default.createElement(
14496
14686
  'a',
14497
- { href: '/view/' + article.url.current, className: 'related-article' },
14687
+ { key: index, href: '/view/' + article.url.current, className: 'related-article' },
14498
14688
  React__default.createElement(
14499
14689
  'figure',
14500
14690
  null,
@@ -15220,6 +15410,7 @@ exports.ConferenceArticleCard = ConferenceArticleCard;
15220
15410
  exports.EventsDeck = EventsDeck;
15221
15411
  exports.Feature = Feature;
15222
15412
  exports.ForbesHero = fbsHero;
15413
+ exports.GridHero = GridHero;
15223
15414
  exports.Hero = Hero;
15224
15415
  exports.HorizontalHero = HorizontalHero;
15225
15416
  exports.OncliveHero = OncliveHero;
package/dist/esm/index.js CHANGED
@@ -12606,6 +12606,11 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
12606
12606
  client = _ref.client,
12607
12607
  getSerializers = _ref.getSerializers;
12608
12608
 
12609
+ var builder = imageUrlBuilder(client);
12610
+ function urlFor(source) {
12611
+ return builder.image(source);
12612
+ }
12613
+
12609
12614
  var router = useRouter();
12610
12615
  //state
12611
12616
 
@@ -12614,15 +12619,20 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
12614
12619
  vidUrl = _useState2[0],
12615
12620
  setVidUrl = _useState2[1];
12616
12621
 
12617
- var _useState3 = useState(''),
12622
+ var _useState3 = useState('youtube'),
12618
12623
  _useState4 = _slicedToArray(_useState3, 2),
12619
- series = _useState4[0],
12620
- setSeries = _useState4[1];
12624
+ vidType = _useState4[0],
12625
+ setVidType = _useState4[1];
12621
12626
 
12622
- var _useState5 = useState([]),
12627
+ var _useState5 = useState(''),
12623
12628
  _useState6 = _slicedToArray(_useState5, 2),
12624
- seriesData = _useState6[0],
12625
- setData = _useState6[1];
12629
+ series = _useState6[0],
12630
+ setSeries = _useState6[1];
12631
+
12632
+ var _useState7 = useState([]),
12633
+ _useState8 = _slicedToArray(_useState7, 2),
12634
+ seriesData = _useState8[0],
12635
+ setData = _useState8[1];
12626
12636
  //variables
12627
12637
 
12628
12638
 
@@ -12633,19 +12643,32 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
12633
12643
  var params = new URL(document.location).searchParams;
12634
12644
  var seriesVid = params.get('seriesVid') || 1;
12635
12645
  var data = [];
12646
+
12636
12647
  nodes.videos.forEach(function (vid) {
12637
- data.push({ title: vid.title, thumbnail: 'https://img.youtube.com/vi/' + getYoutubeId(vid.url) + '/hqdefault.jpg', url: vid.url });
12648
+ if (vid.type == 'mp4') {
12649
+ data.push({ title: vid.title, thumbnail: urlFor(vid.thumbnail.asset), url: vid.url });
12650
+ } else {
12651
+ data.push({ title: vid.title, thumbnail: 'https://img.youtube.com/vi/' + getYoutubeId(vid.url) + '/hqdefault.jpg', url: vid.url });
12652
+ }
12638
12653
  });
12639
12654
  // if series number doesn't exist, route back to first vid of series
12655
+
12640
12656
  if (data.length < seriesVid) {
12641
12657
  setSeries(1);
12642
12658
  setVidUrl(nodes.videos[0].url);
12659
+ if (nodes.videos[0].type) {
12660
+ setVidType(nodes.videos[0].type);
12661
+ }
12662
+
12643
12663
  var newPath = '/' + get2 + '/' + get3 + '?seriesVid=1';
12644
12664
  var vidState = { vid_id: seriesVid };
12645
12665
  window.history.pushState(vidState, '', newPath);
12646
12666
  } else {
12647
12667
  setSeries(seriesVid);
12648
12668
  setVidUrl(nodes.videos[seriesVid - 1].url);
12669
+ if (nodes.videos[0].type) {
12670
+ setVidType(nodes.videos[seriesVid - 1].type);
12671
+ }
12649
12672
  }
12650
12673
  setData(data);
12651
12674
  }, []);
@@ -12715,9 +12738,14 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
12715
12738
  React__default.createElement(
12716
12739
  'div',
12717
12740
  { className: 'video-block', style: { position: 'relative', overflow: 'hidden' } },
12718
- vidUrl && React__default.createElement(YouTube, { videoId: getYoutubeId(vidUrl), opts: opts, onEnd: function onEnd(e) {
12741
+ vidUrl && vidType == 'youtube' ? React__default.createElement(YouTube, { videoId: getYoutubeId(vidUrl), opts: opts, onEnd: function onEnd(e) {
12719
12742
  return handleOnEnd(e);
12720
- } }),
12743
+ } }) : React__default.createElement(
12744
+ 'video',
12745
+ { style: { width: '100%' }, controls: true },
12746
+ React__default.createElement('source', { src: vidUrl, type: 'video/mp4' }),
12747
+ 'Your browser does not support the video tag.'
12748
+ ),
12721
12749
  React__default.createElement(
12722
12750
  'div',
12723
12751
  {
@@ -12763,7 +12791,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
12763
12791
  { className: 'mb-3' },
12764
12792
  nodes.videos[series - 1].title
12765
12793
  ),
12766
- nodes.videos[series - 1] && React__default.createElement(BlockContent, _extends$2({ serializers: getSerializers, blocks: nodes.videos[series - 1].text, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
12794
+ nodes.videos[series - 1] && nodes.videos[series - 1].text && React__default.createElement(BlockContent, _extends$2({ serializers: getSerializers, blocks: nodes.videos[series - 1].text, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
12767
12795
  ),
12768
12796
  React__default.createElement(
12769
12797
  'style',
@@ -14438,6 +14466,168 @@ var YahooHero = function YahooHero(props) {
14438
14466
  );
14439
14467
  };
14440
14468
 
14469
+ var GridHero = function GridHero(props) {
14470
+ var topArticle = props.dataRecord[0];
14471
+ var subArticles = props.dataRecord.slice(1, 3);
14472
+
14473
+ var client = props.client;
14474
+
14475
+ var builder = imageUrlBuilder(client);
14476
+ function urlFor(source) {
14477
+ return builder.image(source);
14478
+ }
14479
+
14480
+ var topArticleThumbnail = '';
14481
+ var topArticleAltText = topArticle.title;
14482
+ if (topArticle.thumbnail && topArticle.thumbnail.asset) {
14483
+ topArticleThumbnail = urlFor(topArticle.thumbnail.asset).width(600).url();
14484
+ topArticleAltText = topArticle.thumbnail.asset.originalFileName;
14485
+ } else if (props.thumbnail) {
14486
+ topArticleThumbnail = props.thumbnail;
14487
+ }
14488
+
14489
+ var renderAuthor = function renderAuthor(authorDetail, index, length) {
14490
+ if (authorDetail) {
14491
+ var _id = authorDetail._id,
14492
+ displayName = authorDetail.displayName,
14493
+ url = authorDetail.url;
14494
+
14495
+ if (displayName && url && url.current) {
14496
+ return React__default.createElement(
14497
+ 'div',
14498
+ { key: _id },
14499
+ index === 0 && React__default.createElement(
14500
+ 'span',
14501
+ { className: 'pr-1' },
14502
+ 'By'
14503
+ ),
14504
+ React__default.createElement(
14505
+ 'a',
14506
+ { href: '/authors/' + url.current, className: 'text-muted' },
14507
+ displayName,
14508
+ length !== index + 1 && React__default.createElement('br', null)
14509
+ )
14510
+ );
14511
+ } else if (displayName) {
14512
+ return React__default.createElement(
14513
+ 'div',
14514
+ { key: _id },
14515
+ index === 0 && React__default.createElement(
14516
+ 'span',
14517
+ { className: 'pr-1' },
14518
+ 'By'
14519
+ ),
14520
+ React__default.createElement(
14521
+ 'span',
14522
+ { className: 'text-muted' },
14523
+ displayName,
14524
+ length !== index + 1 && React__default.createElement('br', null)
14525
+ )
14526
+ );
14527
+ }
14528
+ } else return null;
14529
+ };
14530
+
14531
+ return React__default.createElement(
14532
+ 'div',
14533
+ { className: 'article-hero' },
14534
+ React__default.createElement(
14535
+ 'div',
14536
+ { className: 'grid-top-article' },
14537
+ topArticleThumbnail && React__default.createElement(
14538
+ 'a',
14539
+ { href: '/view/' + topArticle.url.current },
14540
+ React__default.createElement(
14541
+ 'div',
14542
+ { className: 'grid-top-article--img' },
14543
+ React__default.createElement('img', { src: topArticleThumbnail, alt: topArticleAltText })
14544
+ )
14545
+ ),
14546
+ React__default.createElement(
14547
+ 'div',
14548
+ { className: 'grid-top-article--body' },
14549
+ React__default.createElement(
14550
+ 'a',
14551
+ { href: '/view/' + topArticle.url.current },
14552
+ React__default.createElement(
14553
+ 'h1',
14554
+ null,
14555
+ topArticle.title
14556
+ )
14557
+ ),
14558
+ React__default.createElement(
14559
+ 'p',
14560
+ { className: 'article-date' },
14561
+ moment(topArticle.published).format('MMMM DD, YYYY ')
14562
+ ),
14563
+ topArticle.authorMapping && topArticle.authorMapping.length > 0 && topArticle.authorMapping.map(function (authorDetail, index) {
14564
+ return renderAuthor(authorDetail, index, topArticle.authorMapping.length);
14565
+ }),
14566
+ topArticle.summary && React__default.createElement(
14567
+ 'p',
14568
+ { className: 'top-article-summary' },
14569
+ clean_html_1(topArticle.summary)
14570
+ )
14571
+ )
14572
+ ),
14573
+ React__default.createElement(
14574
+ 'div',
14575
+ { className: 'grid-sub-article-container' },
14576
+ subArticles.map(function (article, index) {
14577
+ var articleThumbnail = '';
14578
+ var articleAltText = article.title;
14579
+ if (article.thumbnail && article.thumbnail.asset) {
14580
+ articleThumbnail = urlFor(article.thumbnail.asset).width(480).height(270).url();
14581
+ articleAltText = article.thumbnail.asset.originalFileName;
14582
+ } else if (props.thumbnail) {
14583
+ articleThumbnail = props.thumbnail;
14584
+ }
14585
+
14586
+ return React__default.createElement(
14587
+ 'div',
14588
+ { key: index, className: 'grid-sub-article sub-grid-' + (index + 1) },
14589
+ React__default.createElement(
14590
+ 'a',
14591
+ { href: '/view/' + article.url.current },
14592
+ React__default.createElement('img', { src: articleThumbnail, alt: articleAltText })
14593
+ ),
14594
+ React__default.createElement(
14595
+ 'div',
14596
+ { className: 'grid-sub-article-body' },
14597
+ React__default.createElement(
14598
+ 'a',
14599
+ { href: '/view/' + article.url.current },
14600
+ React__default.createElement(
14601
+ 'h2',
14602
+ { className: 'grid-sub-article--title' },
14603
+ article.title
14604
+ )
14605
+ ),
14606
+ React__default.createElement(
14607
+ 'p',
14608
+ { className: 'article-date' },
14609
+ moment(article.published).format('MMMM DD, YYYY ')
14610
+ ),
14611
+ article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
14612
+ return renderAuthor(authorDetail, index, article.authorMapping.length);
14613
+ }),
14614
+ article.summary && React__default.createElement(
14615
+ 'p',
14616
+ { className: 'sub-article-summary' },
14617
+ clean_html_1(article.summary)
14618
+ )
14619
+ )
14620
+ );
14621
+ })
14622
+ ),
14623
+ React__default.createElement(
14624
+ 'style',
14625
+ { jsx: 'true' },
14626
+ '\n .article-hero {\n margin-bottom: 1rem;\n border-bottom: 1px solid #ddd;\n padding-bottom: 0.5rem;\n margin-left: 15px;\n margin-right: 15px;\n }\n .grid-top-article {\n width: 100%;\n margin-bottom: 1rem;\n padding-bottom: 1rem;\n border-bottom: 5px solid var(--primary);\n box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.2);\n }\n .grid-top-article img {\n width: 100%;\n\n max-height: 300px;\n min-height: 275px;\n object-fit: cover;\n height: 112.5px;\n }\n\n .grid-top-article--body {\n padding: 1.25rem;\n }\n .grid-top-article--body h1 {\n color: #373a3c !important;\n margin-bottom: 0.25rem !important;\n font-weight: 600 !important;\n font-size: 1.6rem;\n font-size: 1.40625rem;\n line-height: 1.2;\n }\n .grid-top-article--body p {\n margin-bottom: 0;\n color: #252525;\n }\n\n .grid-sub-article-container {\n display: flex;\n flex-direction: row;\n padding-top: 1rem;\n }\n .grid-sub-article {\n width: 48%;\n margin-bottom: 1.75rem;\n }\n .grid-sub-article-body {\n padding: 1.25rem;\n }\n @media screen and (min-width: 992px) {\n .sub-grid-1 {\n margin-right: 2%;\n }\n .sub-grid-2 {\n margin-left: 2%;\n }\n }\n .grid-sub-article img {\n margin-right: 1rem;\n width: 100%;\n max-height: 240px;\n object-fit: contain;\n }\n .grid-sub-article p {\n margin-bottom: 0;\n\n color: #373a3c;\n }\n .grid-sub-article .grid-sub-article--title {\n color: #373a3c !important;\n margin-bottom: 0.25rem !important;\n font-weight: 600 !important;\n font-size: 1.6rem;\n font-size: 1.40625rem;\n line-height: 1.2;\n }\n .author-text {\n font-size: 0.9375rem;\n font-weight: 400;\n line-height: 1.5;\n }\n .author-text > span {\n color: #868e96 !important;\n }\n .article-date {\n font-style: italic;\n }\n .top-article-summary,\n .sub-article-summary {\n margin-top: 0.5rem;\n }\n\n @media screen and (max-width: 992px) {\n .grid-sub-article-container {\n flex-direction: column;\n }\n .grid-sub-article {\n width: 100%;\n }\n }\n '
14627
+ )
14628
+ );
14629
+ };
14630
+
14441
14631
  /*
14442
14632
  Sample query
14443
14633
  let references = ''
@@ -14492,7 +14682,7 @@ var RelatedContent = function RelatedContent(props) {
14492
14682
  dataRecord.map(function (article, index) {
14493
14683
  return React__default.createElement(
14494
14684
  'a',
14495
- { href: '/view/' + article.url.current, className: 'related-article' },
14685
+ { key: index, href: '/view/' + article.url.current, className: 'related-article' },
14496
14686
  React__default.createElement(
14497
14687
  'figure',
14498
14688
  null,
@@ -15172,4 +15362,4 @@ var _initialiseProps = function _initialiseProps() {
15172
15362
  };
15173
15363
  };
15174
15364
 
15175
- export { AD300x250, AD300x250x600, ADFooter, AccordionPanel, AdSlotsProvider, AlphabeticList, ArticleDetailDropdown, ArticleQueue, Breadcrumbs$1 as Breadcrumbs, CMEDeck, ConferenceArticleCard, EventsDeck, Feature, fbsHero as ForbesHero, Hero, HorizontalHero, OncliveHero, OncliveLargeHero, PdfDownload, RelatedContent, RelatedTopicsDropdown, SetCookie, SocialShare$1 as SocialShare, VerticalHero, YahooHero, getSerializers };
15365
+ export { AD300x250, AD300x250x600, ADFooter, AccordionPanel, AdSlotsProvider, AlphabeticList, ArticleDetailDropdown, ArticleQueue, Breadcrumbs$1 as Breadcrumbs, CMEDeck, ConferenceArticleCard, EventsDeck, Feature, fbsHero as ForbesHero, GridHero, Hero, HorizontalHero, OncliveHero, OncliveLargeHero, PdfDownload, RelatedContent, RelatedTopicsDropdown, SetCookie, SocialShare$1 as SocialShare, VerticalHero, YahooHero, getSerializers };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.241",
3
+ "version": "1.0.243",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",